summaryrefslogtreecommitdiff
path: root/dbus
diff options
context:
space:
mode:
authorSimon Kelley <simon@thekelleys.org.uk>2012-09-20 14:17:39 +0100
committerSimon Kelley <simon@thekelleys.org.uk>2012-09-20 14:17:39 +0100
commitfaafb3f7b749218dbfc2d5a2989fe8c2384a831d (patch)
tree02a2c52a44671c2819726594daedf356dc04b273 /dbus
parent2b127a1eab194b39ea65e4b69570f233b0abbafc (diff)
downloaddnsmasq-faafb3f7b749218dbfc2d5a2989fe8c2384a831d.tar.gz
Add SetServersEX method in DBus interface.
Diffstat (limited to 'dbus')
-rw-r--r--dbus/DBus-interface42
1 files changed, 42 insertions, 0 deletions
diff --git a/dbus/DBus-interface b/dbus/DBus-interface
index 9fa08f2..58ae03c 100644
--- a/dbus/DBus-interface
+++ b/dbus/DBus-interface
@@ -95,6 +95,48 @@ Each call to SetServers completely replaces the set of servers
specified by via the DBus, but it leaves any servers specified via the
command line or /etc/dnsmasq.conf or /etc/resolv.conf alone.
+SetServersEx
+------------
+
+This function is more flexible and the SetServers function, in that it can
+handle address scoping, port numbers, and is easier for clients to use.
+
+Returns nothing. Takes a set of arguments representing the new
+upstream DNS servers to be used by dnsmasq. All addresses (both IPv4 and IPv6)
+are represented as STRINGS. Each server address may be followed by one or more
+STRINGS, which are the domains for which the preceding server should be used.
+
+This function takes an array of STRING arrays, where each inner array represents
+a set of DNS servers and domains for which those servers may be used. Each
+string represents a list of upstream DNS servers first, and domains second.
+Mixing of domains and servers within a the string array is not allowed.
+
+Examples.
+
+[
+ ["1.2.3.4", "foobar.com"],
+ ["1003:1234:abcd::1%eth0", "eng.mycorp.com", "lab.mycorp.com"]
+]
+
+is equivalent to
+
+--server=/foobar.com/1.2.3.4 \
+ --server=/eng.mycorp.com/lab.mycorp.com/1003:1234:abcd::1%eth0
+
+An IPv4 address of 0.0.0.0 is interpreted as "no address, local only",
+so
+
+[ ["0.0.0.0", "local.domain"] ]
+
+is equivalent to
+
+--local=/local.domain/
+
+
+Each call to SetServersEx completely replaces the set of servers
+specified by via the DBus, but it leaves any servers specified via the
+command line or /etc/dnsmasq.conf or /etc/resolv.conf alone.
+
2. SIGNALS
----------