[Dnsmasq-discuss] [PATCH 2/2] dbus: add SetServersEx method

Dan Williams dcbw at redhat.com
Mon Sep 17 20:58:46 BST 2012


On Sat, 2012-08-18 at 07:28 +0100, Simon Kelley wrote:
> On 17/08/12 23:35, Dan Williams wrote:
> > The SetServers method has a few deficiencies:
> >
> > First, given its argument structure, you cannot actually
> > introspect it since it expects a variable number of arguments.
> > Typically these are encoded into arrays, but that's not the
> > case with SetServers.  This means it's hard to use the method
> > from dbus client libraries like dbus-glib, gdbus, or many bound
> > languages like python or javascript.
> >
> > Second, given that the address arguments are either uint32
> > or a number of bytes, additional options like IPv6 scope or
> > DNS server port numbers are impossible.
> >
> > To address these issues, create a new method SetServersEx that
> > performs the same function, but accepts arrays of strings as input.
> > This allows more complex parsing of addresses and easier groupings
> > of addresses and domains from clients.
> >
> > For example, from Python:
> >
> > import dbus
> >
> > bus = dbus.SystemBus()
> > p = bus.get_object("uk.org.thekelleys.dnsmasq", "/uk/org/thekelleys/dnsmasq")
> > l = dbus.Interface(p, dbus_interface="uk.org.thekelleys.dnsmasq")
> >
> > array = dbus.Array()
> > array.append(["1.2.3.5"])
> > array.append(["1.2.3.4#664", "foobar.com"])
> > array.append(["1003:1234:abcd::1%eth0", "eng.mycorp.com", "lab.mycorp.com"])
> > print l.SetServersEx(array)
> >
> 
> 
> This looks very sensible to me. Your timing is highly suspect as we 
> released 2.63 yesterday and I am about to go away for 10 days or so. 
> When I get back this, or something very like it, will be the first 
> change into 2.64.

Simon,

Had a chance to review these yet?  Looks like we're getting close to
2.64...

Dan




More information about the Dnsmasq-discuss mailing list