[systemd-devel] [networkd] dbus interface?

2016-05-16 Thread Yuri D'Elia
I'd like to monitor interface state changes as emitted by networkd. By monitoring the emitted signals though, it looks like the current interface is either next to useless or I don't understand it at all. For example, the PropertyChanged signal might have a path of "/org/freedesktop/network1/link

Re: [systemd-devel] [networkd] dbus interface?

2016-05-16 Thread Lennart Poettering
On Mon, 16.05.16 21:30, Yuri D'Elia (wav...@thregr.org) wrote: > I'd like to monitor interface state changes as emitted by networkd. > > By monitoring the emitted signals though, it looks like the current > interface is either next to useless or I don't understand it at all. > > For example, the

Re: [systemd-devel] [networkd] dbus interface?

2016-05-16 Thread Yuri D'Elia
On Mon, May 16 2016, Lennart Poettering wrote: >> For example, the PropertyChanged signal might have a path of >> "/org/freedesktop/network1/link/_33", however I have no clue what link >> _33 actually refers to. >> >> In the node /org/freedesktop/network1/link/_33 there's nothing going >> back to

Re: [systemd-devel] [networkd] dbus interface?

2016-05-16 Thread Lennart Poettering
On Mon, 16.05.16 23:42, Yuri D'Elia (wav...@thregr.org) wrote: > On Mon, May 16 2016, Lennart Poettering wrote: > >> For example, the PropertyChanged signal might have a path of > >> "/org/freedesktop/network1/link/_33", however I have no clue what link > >> _33 actually refers to. > >> > >> In t

Re: [systemd-devel] [networkd] dbus interface?

2016-05-16 Thread Yuri D'Elia
On Mon, May 16 2016, Lennart Poettering wrote: > That's actually the interface index formatted as integer > string. However, since D-Bus does not allow object path components to > start with a number it it is escaped with an underscored followed by > the ASCII code of the character... Hence "3" bec

Re: [systemd-devel] [networkd] dbus interface?

2016-05-17 Thread Lennart Poettering
On Tue, 17.05.16 00:14, Yuri D'Elia (wav...@thregr.org) wrote: > On Mon, May 16 2016, Lennart Poettering wrote: > > That's actually the interface index formatted as integer > > string. However, since D-Bus does not allow object path components to > > start with a number it it is escaped with an un

Re: [systemd-devel] [networkd] dbus interface?

2016-05-17 Thread Yuri D'Elia
On Mon, May 16 2016, Lennart Poettering wrote: >> Just as a curiosity though, is there some logic in the link numbers >> given? All my links are _3[123]. Since I just need to emit some >> notifications for the time being, knowing that _XY have the same >> sequence as what is listed by networkctl wo

Re: [systemd-devel] [networkd] dbus interface?

2016-05-17 Thread Zbigniew Jędrzejewski-Szmek
On Tue, May 17, 2016 at 03:00:16PM +0200, Yuri D'Elia wrote: > On Mon, May 16 2016, Lennart Poettering wrote: > >> Just as a curiosity though, is there some logic in the link numbers > >> given? All my links are _3[123]. Since I just need to emit some > >> notifications for the time being, knowing

Re: [systemd-devel] [networkd] dbus interface?

2016-05-18 Thread Christian Hesse
Yuri D'Elia on Mon, 2016/05/16 21:30: > I'd like to monitor interface state changes as emitted by networkd. You may want to take a look at netlink-notify [0]. It does not use networkd at all but kernel's netlink interface. It's not perfect but works pretty well for me. And there's no polling, so

Re: [systemd-devel] [networkd] dbus interface?

2016-05-18 Thread Yuri D'Elia
On Wed, May 18 2016, Christian Hesse wrote: > Yuri D'Elia on Mon, 2016/05/16 21:30: >> I'd like to monitor interface state changes as emitted by networkd. > > You may want to take a look at netlink-notify [0]. It does not use networkd > at all but kernel's netlink interface. It's not perfect but w