NetworkManager/introspection
Thomas Haller 4eeb4b1bdd all: avoid byte ordering issue for IP4Config's Nameservers/WinsServers on D-Bus
Some properties in NetworkManager's D-Bus API are IPv4 addresses
in network byte order (big endian). That is problematic.

It is no problem, when the NetworkManager client runs on the same
host. That is the case with libnm, which does not support to be used
remotely for the time being.

It is a problem for an application that wants to access the D-Bus
interface of NetworkManager remotely. Possibly, such an application
would be implemented in two layers:

 - one layer merely remotes D-Bus, without specific knowledge of
   NetworkManager's API.

 - a higher layer which accesses the remote D-Bus interface of NetworkManager.
   Preferably it does so in an agnostic way, regardless of whether it runs
   locally or remotely.

When using a D-Bus library, all accesses to 32 bit integers are in
native endianness (regardless of how the integer is actually encoded
on the lower layers). Likewise, D-Bus does not support annotating integer
types in non-native endianness. There is no way to annotate an integer
type "u" to be anything but native order.
That means, when remoting D-Bus at some point the endianness must be
corrected.
But by looking at the D-Bus introspection alone, it is not possible
to know which property need correction and which don't. One would need
to understand the meaning of the properties.

That makes it problematic, because the higher layer of the application,
which knows that the "Nameservers" property is supposed to be in network
order, might not easily know, whether it must correct for endianness.

Deprecate IP4Config properties that are only accessible with a particular
endianness, and add new properties that expose the same data in an
agnostic way.

Note that I added "WinsServerData" to be a plain "as", while
"NameserverData" is of type "aa{sv}". There is no particularly strong
reason for these choices, except that I could imagine that it could be
useful to expose additional information in the future about nameservers
(e.g. are they received via DHCP or manual configuration?). On the other
hand, WINS information likely won't get extended in the future.

Also note, libnm was not modified to use the new D-Bus fields. The
endianness issue is no problem for libnm, so there is little reason to
change it (at this point).

https://bugzilla.redhat.com/show_bug.cgi?id=1153559
https://bugzilla.redhat.com/show_bug.cgi?id=1584584
2018-08-01 14:27:20 +02:00
..
meson.build introspection: add o.fd.NM.Device.Lowpan interface 2018-06-26 16:21:55 +02:00
org.freedesktop.NetworkManager.AccessPoint.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.AgentManager.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Checkpoint.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Connection.Active.xml libnm: add NMActivationStateFlags 2017-10-05 11:50:31 +02:00
org.freedesktop.NetworkManager.Device.Adsl.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Device.Bluetooth.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Device.Bond.xml all/trivial: grammar fix 2018-07-10 13:12:02 +02:00
org.freedesktop.NetworkManager.Device.Bridge.xml all/trivial: grammar fix 2018-07-10 13:12:02 +02:00
org.freedesktop.NetworkManager.Device.Dummy.xml libnm: add 'hw-address' property to NMDeviceDummy 2017-06-30 22:04:03 +02:00
org.freedesktop.NetworkManager.Device.Generic.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Device.Infiniband.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Device.IPTunnel.xml ip-tunnel: add support for tunnel flags 2018-01-05 18:25:08 +01:00
org.freedesktop.NetworkManager.Device.Lowpan.xml introspection: add o.fd.NM.Device.Lowpan interface 2018-06-26 16:21:55 +02:00
org.freedesktop.NetworkManager.Device.Macsec.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Device.Macvlan.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Device.Modem.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Device.OlpcMesh.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Device.OvsBridge.xml devices/ovs: expose slaves on D-Bus for OVS bridges and ports 2018-07-10 13:12:02 +02:00
org.freedesktop.NetworkManager.Device.OvsInterface.xml introspection: add o.fd.NM.Device.OvsInterface interface 2017-10-30 17:40:08 +01:00
org.freedesktop.NetworkManager.Device.OvsPort.xml devices/ovs: expose slaves on D-Bus for OVS bridges and ports 2018-07-10 13:12:02 +02:00
org.freedesktop.NetworkManager.Device.Ppp.xml device: add NMDevicePPP 2017-08-05 08:03:15 +02:00
org.freedesktop.NetworkManager.Device.Statistics.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Device.Team.xml all/trivial: grammar fix 2018-07-10 13:12:02 +02:00
org.freedesktop.NetworkManager.Device.Tun.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Device.Veth.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Device.Vlan.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Device.Vxlan.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Device.WiMax.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Device.Wired.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Device.Wireless.xml wifi: expose LastScan as milliseconds not seconds 2018-06-15 16:23:30 +02:00
org.freedesktop.NetworkManager.Device.Wpan.xml introspection: add o.fd.NM.Device.Wpan interface 2018-06-26 16:21:54 +02:00
org.freedesktop.NetworkManager.Device.xml device: sanitze UTF-8 values for D-Bus 2017-05-19 09:46:08 +02:00
org.freedesktop.NetworkManager.DHCP4Config.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.DHCP6Config.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.DnsManager.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.IP4Config.xml all: avoid byte ordering issue for IP4Config's Nameservers/WinsServers on D-Bus 2018-08-01 14:27:20 +02:00
org.freedesktop.NetworkManager.IP6Config.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.PPP.xml ppp: introduce SetIfindex pppd plugin D-Bus method 2018-01-10 15:36:29 +01:00
org.freedesktop.NetworkManager.SecretAgent.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.Settings.Connection.xml settings-connection: expose Filename property on D-Bus 2018-06-11 15:06:49 +02:00
org.freedesktop.NetworkManager.Settings.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.VPN.Connection.xml vpn-connection: use NMActiveConnectionStateReason 2017-03-17 10:21:19 +01:00
org.freedesktop.NetworkManager.VPN.Plugin.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.WiMax.Nsp.xml introspection: include short description everywhere 2017-03-17 10:15:11 +01:00
org.freedesktop.NetworkManager.xml all: replace "it's" with "its" where needed 2018-04-18 14:14:07 +02:00