Commit f41aebf8 authored by Thomas Haller's avatar Thomas Haller

device: merge branch 'jk/device-types-bgo762538'

https://bugzilla.gnome.org/show_bug.cgi?id=762538
parents a1eb5eba 1b000091
......@@ -40,6 +40,7 @@ devtypes = { 1: "Ethernet",
17: "IPTunnel"
18: "MACVLAN"
19: "VXLAN"
20: "Veth"
}
states = { 0: "Unknown",
......
......@@ -43,6 +43,7 @@ devtypes = { 1 => "Ethernet",
17 => "IPTunnel",
18 => "MACVLAN",
19 => "VXLAN",
20 => "Veth",
}
states = { 0 => "Unknown",
......
......@@ -52,6 +52,7 @@ devtype_to_name()
17) echo "IPTunnel" ;;
18) echo "MACVLAN" ;;
19) echo "VXLAN" ;;
20) echo "Veth" ;;
*) echo "Unknown" ;;
esac
}
......
......@@ -152,6 +152,7 @@ typedef enum {
* @NM_DEVICE_TYPE_IP_TUNNEL: a IP tunnel interface
* @NM_DEVICE_TYPE_MACVLAN: a MACVLAN interface
* @NM_DEVICE_TYPE_VXLAN: a VXLAN interface
* @NM_DEVICE_TYPE_VETH: a VETH interface
*
* #NMDeviceType values indicate the type of hardware represented by
* an #NMDevice.
......@@ -179,6 +180,7 @@ typedef enum {
NM_DEVICE_TYPE_IP_TUNNEL = 17,
NM_DEVICE_TYPE_MACVLAN = 18,
NM_DEVICE_TYPE_VXLAN = 19,
NM_DEVICE_TYPE_VETH = 20,
} NMDeviceType;
/**
......
......@@ -296,6 +296,7 @@ static GType
_nm_device_gtype_from_dtype (NMDeviceType dtype)
{
switch (dtype) {
case NM_DEVICE_TYPE_VETH:
case NM_DEVICE_TYPE_ETHERNET:
return NM_TYPE_DEVICE_ETHERNET;
case NM_DEVICE_TYPE_WIFI:
......@@ -1868,9 +1869,23 @@ get_type_name (NMDevice *device)
return _("VLAN");
case NM_DEVICE_TYPE_ADSL:
return _("ADSL");
default:
return _("Unknown");
case NM_DEVICE_TYPE_MACVLAN:
return _("MACVLAN");
case NM_DEVICE_TYPE_VXLAN:
return _("VXLAN");
case NM_DEVICE_TYPE_IP_TUNNEL:
return _("IPTunnel");
case NM_DEVICE_TYPE_TUN:
return _("Tun");
case NM_DEVICE_TYPE_VETH:
return _("Veth");
case NM_DEVICE_TYPE_GENERIC:
case NM_DEVICE_TYPE_UNUSED1:
case NM_DEVICE_TYPE_UNUSED2:
case NM_DEVICE_TYPE_UNKNOWN:
break;
}
return _("Unknown");
}
static char *
......
......@@ -155,6 +155,7 @@ typedef enum {
* @NM_DEVICE_TYPE_IP_TUNNEL: an IP tunnel interface
* @NM_DEVICE_TYPE_MACVLAN: a MACVLAN interface
* @NM_DEVICE_TYPE_VXLAN: a VXLAN interface
* @NM_DEVICE_TYPE_VETH: a VETH interface
*
* #NMDeviceType values indicate the type of hardware represented by
* an #NMDevice.
......@@ -182,6 +183,7 @@ typedef enum {
NM_DEVICE_TYPE_IP_TUNNEL = 17,
NM_DEVICE_TYPE_MACVLAN = 18,
NM_DEVICE_TYPE_VXLAN = 19,
NM_DEVICE_TYPE_VETH = 20,
} NMDeviceType;
/**
......
......@@ -341,6 +341,7 @@ static GType
_nm_device_gtype_from_dtype (NMDeviceType dtype)
{
switch (dtype) {
case NM_DEVICE_TYPE_VETH:
case NM_DEVICE_TYPE_ETHERNET:
return NM_TYPE_DEVICE_ETHERNET;
case NM_DEVICE_TYPE_WIFI:
......@@ -1819,9 +1820,23 @@ get_type_name (NMDevice *device)
return _("VLAN");
case NM_DEVICE_TYPE_ADSL:
return _("ADSL");
default:
return _("Unknown");
case NM_DEVICE_TYPE_MACVLAN:
return _("MACVLAN");
case NM_DEVICE_TYPE_VXLAN:
return _("VXLAN");
case NM_DEVICE_TYPE_IP_TUNNEL:
return _("IPTunnel");
case NM_DEVICE_TYPE_TUN:
return _("Tun");
case NM_DEVICE_TYPE_VETH:
return _("Veth");
case NM_DEVICE_TYPE_GENERIC:
case NM_DEVICE_TYPE_UNUSED1:
case NM_DEVICE_TYPE_UNUSED2:
case NM_DEVICE_TYPE_UNKNOWN:
break;
}
return _("Unknown");
}
static char *
......
......@@ -187,7 +187,7 @@ create_device (NMDeviceFactory *factory,
return (NMDevice *) g_object_new (NM_TYPE_DEVICE_VETH,
NM_DEVICE_IFACE, iface,
NM_DEVICE_TYPE_DESC, "Veth",
NM_DEVICE_DEVICE_TYPE, NM_DEVICE_TYPE_ETHERNET,
NM_DEVICE_DEVICE_TYPE, NM_DEVICE_TYPE_VETH,
NM_DEVICE_LINK_TYPE, NM_LINK_TYPE_VETH,
NULL);
}
......
......@@ -803,6 +803,8 @@ nm_device_get_priority (NMDevice *self)
return 600;
case NM_DEVICE_TYPE_OLPC_MESH:
return 650;
case NM_DEVICE_TYPE_VETH:
return 665;
case NM_DEVICE_TYPE_IP_TUNNEL:
return 675;
case NM_DEVICE_TYPE_MODEM:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment