summaryrefslogtreecommitdiff
path: root/introspection
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-10-21 08:33:18 -0400
committerDan Winship <danw@gnome.org>2014-11-07 07:49:40 -0500
commitd16905df633ceea08c93b6e982f660627d06ff34 (patch)
tree2578344aa6e4fcbfb0191c85880fbdc8d5845a0e /introspection
parentf17699f4e3dacb9358a8503c8b15efe3cb852b48 (diff)
downloadNetworkManager-d16905df633ceea08c93b6e982f660627d06ff34.tar.gz
libnm-core, libnm, core: add AddressData and RouteData properties
Add AddressData and RouteData properties to NMSettingIPConfig and NMIP[46]Config. These are like the existing "addresses" and "routes" properties, but using strings and containing additional attributes, like NMIPAddress and NMIPRoute. This only affects the D-Bus representations; there are no API changes to NMSettingIP{,4,6}Config or NMIP{4,6}Config as a result of this; the additional information is just added to the existing 'addresses' and 'routes' properties. NMSettingIP4Config and NMSettingIP6Config now always generate both old-style data ('addresses', 'address-labels', 'routes') and new-style data ('address-data', 'gateway', 'route-data') when serializing to D-Bus, for backward compatibility. When deserializing, they will fill in the 'addresses' and 'routes' properties from the new-style data if it is present (ignoring the old-style data), or from the old-style data if the new-style isn't present. The daemon-side NMIP4Config and NMIP6Config always emit changes for both 'Addresses'/'Routes' and 'AddressData'/'RouteData'. The libnm-side classes initially listen for changes on both properties, but start ignoring the 'Addresses' and 'Routes' properties once they know the daemon is also providing 'AddressData' and 'RouteData'.
Diffstat (limited to 'introspection')
-rw-r--r--introspection/nm-ip4-config.xml40
-rw-r--r--introspection/nm-ip6-config.xml31
2 files changed, 58 insertions, 13 deletions
diff --git a/introspection/nm-ip4-config.xml b/introspection/nm-ip4-config.xml
index 6a8750b7f6..9807653495 100644
--- a/introspection/nm-ip4-config.xml
+++ b/introspection/nm-ip4-config.xml
@@ -2,20 +2,42 @@
<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<interface name="org.freedesktop.NetworkManager.IP4Config">
+ <property name="Addresses" type="aau" access="read">
+ <tp:docstring>
+ Array of arrays of IPv4 address/prefix/gateway. All 3
+ elements of each array are in network byte order. Essentially:
+ [(addr, prefix, gateway), (addr, prefix, gateway), ...]
+
+ Deprecated: use AddressData and Gateway
+ </tp:docstring>
+ </property>
+ <property name="AddressData" type="aa{sv}" access="read">
+ <tp:docstring>
+ Array of IP address data objects. All addresses will include
+ "address" (an IP address string), and "prefix" (a uint). Some
+ addresses may include additional attributes.
+ </tp:docstring>
+ </property>
<property name="Gateway" type="s" access="read">
<tp:docstring>The gateway in use.</tp:docstring>
</property>
- <property name="Addresses" type="aau" access="read">
- <tp:docstring>Array of tuples of IPv4 address/prefix/gateway. All 3
- elements of each tuple are in network byte order. Essentially:
- [(addr, prefix, gateway), (addr, prefix, gateway), ...]
+ <property name="Routes" type="aau" access="read">
+ <tp:docstring>
+ Arrays of IPv4 route/prefix/next-hop/metric. All 4 elements of
+ each tuple are in network byte order. 'route' and 'next hop'
+ are IPv4 addresses, while prefix and metric are simple
+ unsigned integers. Essentially: [(route, prefix, next-hop,
+ metric), (route, prefix, next-hop, metric), ...]
+
+ Deprecated: use RouteData
</tp:docstring>
</property>
- <property name="Routes" type="aau" access="read">
- <tp:docstring>Tuples of IPv4 route/prefix/next-hop/metric. All 4 elements
- of each tuple are in network byte order. 'route' and 'next hop' are IPv4
- addresses, while prefix and metric are simple unsigned integers. Essentially:
- [(route, prefix, next-hop, metric), (route, prefix, next-hop, metric), ...]
+ <property name="RouteData" type="aa{sv}" access="read">
+ <tp:docstring>
+ Array of IP route data objects. All routes will include "dest"
+ (an IP address string) and "prefix" (a uint). Some routes may
+ include "next-hop" (an IP address string), "metric" (a uint),
+ and additional attributes.
</tp:docstring>
</property>
<property name="Nameservers" type="au" access="read">
diff --git a/introspection/nm-ip6-config.xml b/introspection/nm-ip6-config.xml
index 55c519e701..985dd2e331 100644
--- a/introspection/nm-ip6-config.xml
+++ b/introspection/nm-ip6-config.xml
@@ -2,14 +2,37 @@
<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<interface name="org.freedesktop.NetworkManager.IP6Config">
+ <property name="Addresses" type="a(ayuay)" access="read">
+ <tp:docstring>
+ Array of tuples of IPv6 address/prefix/gateway.
+
+ Deprecated: use AddressData and Gateway.
+ </tp:docstring>
+ </property>
+ <property name="AddressData" type="aa{sv}" access="read">
+ <tp:docstring>
+ Array of IP address data objects. All addresses will include
+ "address" (an IP address string), and "prefix" (a uint). Some
+ addresses may include additional attributes.
+ </tp:docstring>
+ </property>
<property name="Gateway" type="s" access="read">
<tp:docstring>The gateway in use.</tp:docstring>
</property>
- <property name="Addresses" type="a(ayuay)" access="read">
- <tp:docstring>Tuples of IPv6 address/prefix/gateway.</tp:docstring>
- </property>
<property name="Routes" type="a(ayuayu)" access="read">
- <tp:docstring>Tuples of IPv6 route/prefix/next-hop/metric.</tp:docstring>
+ <tp:docstring>
+ Tuples of IPv6 route/prefix/next-hop/metric.
+
+ Deprecated: use RouteData
+ </tp:docstring>
+ </property>
+ <property name="RouteData" type="aa{sv}" access="read">
+ <tp:docstring>
+ Array of IP route data objects. All routes will include "dest"
+ (an IP address string) and "prefix" (a uint). Some routes may
+ include "next-hop" (an IP address string), "metric" (a uint),
+ and additional attributes.
+ </tp:docstring>
</property>
<property name="Nameservers" type="aay" access="read">
<tp:docstring>The nameservers in use.</tp:docstring>