diff options
author | Colin Walters <walters@verbum.org> | 2012-07-13 15:44:07 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2012-07-13 16:53:47 -0400 |
commit | e3154b22405ad4fe4551af4ac1f1191a137059cc (patch) | |
tree | bc9d200c1332da3380196e40706a261061d0dc43 | |
parent | ba7ff7ffd7eec36a03b354656246aea409308119 (diff) |
device: Export the ifindex propertywip/scc
This can useful for NM-consuming components to use as a primary key on
interfaces, because it's how things like netlink reference interfaces
too.
-rw-r--r-- | introspection/nm-device.xml | 5 | ||||
-rw-r--r-- | src/nm-device.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/introspection/nm-device.xml b/introspection/nm-device.xml index 20bbb917..7dd1d3d9 100644 --- a/introspection/nm-device.xml +++ b/introspection/nm-device.xml @@ -23,6 +23,11 @@ The name of the device's control (and often data) interface. </tp:docstring> </property> + <property name="Ifindex" type="u" access="read"> + <tp:docstring> + Kernel interface index; useful as a "primary key". + </tp:docstring> + </property> <property name="IpInterface" type="s" access="read"> <tp:docstring> The name of the device's data interface when available. This property diff --git a/src/nm-device.c b/src/nm-device.c index 6eaa94da..7c8810b1 100644 --- a/src/nm-device.c +++ b/src/nm-device.c @@ -4226,7 +4226,7 @@ nm_device_class_init (NMDeviceClass *klass) "Ifindex", "Ifindex", 0, G_MAXINT, 0, - G_PARAM_READABLE | NM_PROPERTY_PARAM_NO_EXPORT)); + G_PARAM_READABLE)); /* Signals */ signals[STATE_CHANGED] = |