[Dnsmasq-discuss] [PATCH] Add interface name, vendor class if present and lease expiration time to dbus signals

Pali Rohár pali.rohar at gmail.com
Wed Dec 4 19:54:05 GMT 2019


On Wednesday 04 December 2019 20:18:56 Nicolas Cavallari wrote:
> On 04/12/2019 13:24, Victorien Molle wrote:
> > For our usage, we need to have more informations sent over D-Bus such as the interface
> > name, the vendor class identifier and the lease expiration time.
> > 
> > Note: in order to get leases extradata be populated, we enabled this feature if D-Bus
> > is enabled in configuration file (this was enabled in the past only if a script was
> > ran on leases updates).
> 
> D-Bus has this disadvantage that the change you are proposing completely
> breaks the existing D-Bus API that one may be relying on, and many D-Bus
> handling libraries would be incapable of understanding both API at the time.

Victorien, just for explanation: You cannot change order, number or
types of DBus method / signal arguments. It is like function call in any
C-like language. It is part of public API which is used by many
applications. Number and types of DBus methods / signals is encoded in
signature which is passed between DBus clients.

> One solution would be to keep the old signal and also send a new signal
> with the original info plus the extra, possibly in a way that allows to
> add more over time (a dict ?).

If you want to create a backward compatible DBus API, you should use
array or dictionary (ordered hash map) argument and then pass new values
into this array/dictionary.

> (Also, this API should be documented in the file dbus/DBus-interface...)

-- 
Pali Rohár
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20191204/e3cc6cb3/attachment.sig>


More information about the Dnsmasq-discuss mailing list