libnm-core, libnm, core: add AddressData and RouteData properties
authorDan Winship <danw@gnome.org>
Tue, 21 Oct 2014 12:33:18 +0000 (08:33 -0400)
committerDan Winship <danw@gnome.org>
Fri, 7 Nov 2014 12:49:40 +0000 (07:49 -0500)
commitd16905df633ceea08c93b6e982f660627d06ff34
tree2578344aa6e4fcbfb0191c85880fbdc8d5845a0e
parentf17699f4e3dacb9358a8503c8b15efe3cb852b48
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'.
15 files changed:
include/nm-dbus-glib-types.h
introspection/nm-ip4-config.xml
introspection/nm-ip6-config.xml
libnm-core/nm-setting-ip-config.c
libnm-core/nm-setting-ip4-config.c
libnm-core/nm-setting-ip6-config.c
libnm-core/nm-utils.c
libnm-core/nm-utils.h
libnm-core/tests/test-general.c
libnm/nm-ip4-config.c
libnm/nm-ip6-config.c
src/nm-ip4-config.c
src/nm-ip4-config.h
src/nm-ip6-config.c
src/nm-ip6-config.h