Is your feature request related to a problem? Please describe.
When querying dbus or networkctl --json for network information, there are certain network critical parameters that are missing. I believe this is done because these parameters are not really controlled by networkd, they are instead queried from netlink, so networkctl can parse them when called, but networkd does not pass them to dbus, and networkctl doesn't include them with its json output.
Some things that would be really nice and are also missing:
Driver/interface specific things e.g. Bonding mode, in the above examples
Routing information? Nothing seems to show this except ip, but it would be really useful especially if networkd is managing routes.
Other network tools with dbus APIs expose this information, see NetworkManager. They have all of the above information and more on their dbus API, including DNS information and NTP information. I know timesyncd and resolved expose NTP and DNS information as well, so I guess that isn't strictly necessary. But that means that for listening for changed properties it would require watching three signals instead of one. Not that difficult, but it opens the potential for race conditions which networkd-dispatcher has struggled with before.
Describe the solution you'd like
Expose this information on the dbus API, so that they can be used by tools such as networkd-dispatcher or other similar scripts using networkd's dbus API.
Describe alternatives you've considered
Currently what networkd-dispatcher does is shell out networkctl which requires manually parsing the output since the machine readable version doesn't contain this information. This is obviously less than ideal, and quite fragile.
Some other solutions:
Shell out networkctl --json, and then additionally shell out ip and/or ethtool at the same time? Could cause race conditions if settings are being dynamically changed by networkd.
Switch to NetworkManager, which already does this
The systemd version you checked that didn't have the feature you are asking for
Is your feature request related to a problem? Please describe. When querying dbus or
networkctl --json
for network information, there are certain network critical parameters that are missing. I believe this is done because these parameters are not really controlled by networkd, they are instead queried from netlink, so networkctl can parse them when called, but networkd does not pass them to dbus, and networkctl doesn't include them with its json output.Compare
networkctl status bond1
to
networkctl --json=pretty status bond1
Some network critical things I see missing:
Some things that would be really nice and are also missing:
ip
, but it would be really useful especially if networkd is managing routes.Other network tools with dbus APIs expose this information, see NetworkManager. They have all of the above information and more on their dbus API, including DNS information and NTP information. I know timesyncd and resolved expose NTP and DNS information as well, so I guess that isn't strictly necessary. But that means that for listening for changed properties it would require watching three signals instead of one. Not that difficult, but it opens the potential for race conditions which
networkd-dispatcher
has struggled with before.Describe the solution you'd like Expose this information on the dbus API, so that they can be used by tools such as networkd-dispatcher or other similar scripts using networkd's dbus API.
Describe alternatives you've considered Currently what networkd-dispatcher does is shell out
networkctl
which requires manually parsing the output since the machine readable version doesn't contain this information. This is obviously less than ideal, and quite fragile.Some other solutions:
networkctl --json
, and then additionally shell outip
and/orethtool
at the same time? Could cause race conditions if settings are being dynamically changed by networkd.The systemd version you checked that didn't have the feature you are asking for
I also briefly looked at the git log for
src/network
and didn't see anything relevant.