]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/unbound/doc/control_proto_spec.txt
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / unbound / doc / control_proto_spec.txt
1
2 Specification for the unbound-control protocol.
3
4 Server listens on 8953 TCP (localhost by default). Client connects,
5 SSLv3 or TLSv1 connection setup (server selfsigned certificate, 
6 client has cert signed by server certificate).
7
8 Port 8953 is registered with IANA as:
9 ub-dns-control  8953/tcp    unbound dns nameserver control
10 # Wouter Wijngaards <wouter&nlnetlabs.nl> 10 May 2011
11 On may 11 2011, ticket [IANA #442315].
12
13 Query and Response
14 ------------------
15 Client sends 
16         UBCT[version] [commandline] \n
17         fixed string UBCT1 (for version 1), then an ascii text line,
18         with a command, some whitespace allowed. Line ends with '\n'.
19
20 Server executes command. And sends reply in ascii text over channel, 
21 closes the channel when done.
22         in case of error the first line of the response is:
23                 error <descriptive text possible> \n
24         or the remainder is data of the response, for many commands the 
25         response is 'ok\n'.
26
27 Queries and responses
28 ---------------------
29 stop
30         stops the server.
31 reload
32         reloads the config file, and flushes the cache.
33 verbosity <new value>
34         Change logging verbosity to new value.
35 stats
36         output is a list of [name]=[value] lines.
37         clears the counters.
38 dump_cache
39         output is a text representation of the cache contents.
40         data ends with a line 'EOF' before connection close.
41 load_cache
42         client sends cache contents (like from dump_cache), which is stored 
43         in the cache. end of data indicated with a line with 'EOF' on it.
44         The data is sent after the query line.
45 flush <name>
46         flushes some information regarding the name from the cache.
47         removes the A, AAAA, NS, SOA, CNAME, DNAME, MX, PTR, SRV, NAPTR types.
48         Does not remove other types.
49 flush_type <name> <RR type>
50         removes rrtype entry from the cache.
51 flush_zone <name>
52         removes name and everything below that name from the cache.
53         has to search through the cache item by item, so this is slow.
54 lookup <name>
55         see what servers would be queried for a lookup of the given name.
56 local_zone_remove <name of local-zone entry>
57         the local-zone entry is removed.
58         All data from the local zone is also deleted.
59         If it did not exist, nothing happens.
60 local_zone <name of local zone> <type>
61         As the config file entry. Adds new local zone or updates
62         existing zone type.
63 local_data_remove <name>
64         Removes local-data (all types) name.
65 local_data <resource record string>
66         Add new local data record (on the rest of the line).
67         local_data_add www.example.com. IN A 192.0.2.2
68         if no local_zone exists for it; a transparent zone with the same
69         name as the data is created.
70 Other commands in the unbound-control manual page.