[systemd-devel] [networkd] dbus interface?

Lennart Poettering lennart at poettering.net
Mon May 16 21:58:19 UTC 2016


On Mon, 16.05.16 23:42, Yuri D'Elia (wavexx at 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 the node /org/freedesktop/network1/link/_33 there's nothing going
> >> back to /org/freedesktop/network1/network nodes. In network nodes,
> >> there's nothing referring to _33 or methods to get to the referring link
> >> either.
> >> 
> >> Can somebody shed some light?
> >
> > networkd does not offer any useful D-Bus interface at this time. We
> > are working on it, but at this time, we simply have no runtime
> > API. Sorry.
> 
> Fair enough.
> 
> 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 would already be something.

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" becomes "_33", because
0x33 is the ASCII code for the character "3"...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list