diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2016-02-23 15:27:25 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-02-23 15:56:43 +0100 |
commit | 4b66ddf273f6e9a3c0967963b9f87766383c5f2f (patch) | |
tree | 3a1ead082da5f3ce0a3367b400dabc3e7799c483 | |
parent | a1eb5eba303dea77524c9b890de805cf247f5f34 (diff) | |
download | NetworkManager-jk/device-types.tar.gz |
device: add new NMDeviceType NM_DEVICE_TYPE_VETHjk/device-types
-rwxr-xr-x | examples/python/dbus/list-devices.py | 1 | ||||
-rwxr-xr-x | examples/ruby/list-devices.rb | 1 | ||||
-rwxr-xr-x | examples/shell/list-devices.sh | 1 | ||||
-rw-r--r-- | libnm-core/nm-dbus-interface.h | 2 | ||||
-rw-r--r-- | libnm-util/NetworkManager.h | 2 | ||||
-rw-r--r-- | src/devices/nm-device-veth.c | 2 | ||||
-rw-r--r-- | src/devices/nm-device.c | 2 |
7 files changed, 10 insertions, 1 deletions
diff --git a/examples/python/dbus/list-devices.py b/examples/python/dbus/list-devices.py index c9c753ec8b..8dd41f6164 100755 --- a/examples/python/dbus/list-devices.py +++ b/examples/python/dbus/list-devices.py @@ -40,6 +40,7 @@ devtypes = { 1: "Ethernet", 17: "IPTunnel" 18: "MACVLAN" 19: "VXLAN" + 20: "Veth" } states = { 0: "Unknown", diff --git a/examples/ruby/list-devices.rb b/examples/ruby/list-devices.rb index 9949a40977..bf37425839 100755 --- a/examples/ruby/list-devices.rb +++ b/examples/ruby/list-devices.rb @@ -43,6 +43,7 @@ devtypes = { 1 => "Ethernet", 17 => "IPTunnel", 18 => "MACVLAN", 19 => "VXLAN", + 20 => "Veth", } states = { 0 => "Unknown", diff --git a/examples/shell/list-devices.sh b/examples/shell/list-devices.sh index 817c8b7cc4..c5c4114012 100755 --- a/examples/shell/list-devices.sh +++ b/examples/shell/list-devices.sh @@ -52,6 +52,7 @@ devtype_to_name() 17) echo "IPTunnel" ;; 18) echo "MACVLAN" ;; 19) echo "VXLAN" ;; + 20) echo "Veth" ;; *) echo "Unknown" ;; esac } diff --git a/libnm-core/nm-dbus-interface.h b/libnm-core/nm-dbus-interface.h index 2edc8cb49d..1b16cce527 100644 --- a/libnm-core/nm-dbus-interface.h +++ b/libnm-core/nm-dbus-interface.h @@ -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; /** diff --git a/libnm-util/NetworkManager.h b/libnm-util/NetworkManager.h index 8b083b91bf..c4105fd4c0 100644 --- a/libnm-util/NetworkManager.h +++ b/libnm-util/NetworkManager.h @@ -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; /** diff --git a/src/devices/nm-device-veth.c b/src/devices/nm-device-veth.c index 3b845642b2..ff198a7d76 100644 --- a/src/devices/nm-device-veth.c +++ b/src/devices/nm-device-veth.c @@ -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); } diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index bbad10946b..6e399cabcf 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -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: |