mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-27 20:24:55 +02:00
remote setup.
git-svn-id: file:///svn/unbound/trunk@1234 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
+1
-2
@@ -382,8 +382,7 @@ clean_point(struct daemon_remote* rc, struct rc_state* s)
|
||||
static void
|
||||
handle_req(struct daemon_remote* rc, struct rc_state* s, SSL* ssl)
|
||||
{
|
||||
char* msg = "HTTP/1.0 200 OK\r\nContent-type: text/plain\r\n\r\n"
|
||||
"unbound server control channel\n";
|
||||
char* msg = "ok\n";
|
||||
int r;
|
||||
char buf[1024];
|
||||
fd_set_block(s->c->fd);
|
||||
|
||||
+19
-12
@@ -16,23 +16,25 @@ Server executes command. And sends reply in ascii text over channel,
|
||||
closes the channel when done.
|
||||
in case of error the first line of the response is:
|
||||
error <descriptive text possible> \n
|
||||
or the remainder is data of the response.
|
||||
or the remainder is data of the response, for many commands the
|
||||
response is 'ok\n'.
|
||||
|
||||
Queries and responses
|
||||
---------------------
|
||||
stop
|
||||
no output
|
||||
stops the server.
|
||||
reload
|
||||
no output
|
||||
reloads the config file, and flushes the cache.
|
||||
stats
|
||||
output is a list of [name]=[value] lines.
|
||||
clears the counters.
|
||||
dump_cache
|
||||
output is a text representation of the cache contents.
|
||||
data ends with a line 'EOF' before connection close.
|
||||
load_cache
|
||||
client sends cache contents (like from dump_cache), stored in the
|
||||
cache. If client sends 'ok' or 'error' lines at start, ignored.
|
||||
end of data indicated with a line with 'EOF' on it.
|
||||
client sends cache contents (like from dump_cache), which is stored
|
||||
in the cache. end of data indicated with a line with 'EOF' on it.
|
||||
The data is sent after the query line.
|
||||
flush_name <name>
|
||||
flushes some information regarding the name from the cache.
|
||||
removes the A, AAAA, NS, SOA, CNAME, DNAME, MX, PTR types.
|
||||
@@ -41,20 +43,25 @@ flush_type <name> <RR type>
|
||||
flush_zone <name>
|
||||
removes name and everything below that name from the cache.
|
||||
has to search through the cache item by item, so this is slow.
|
||||
delegation <domain name>
|
||||
see what servers would be queried for the given domain name.
|
||||
info <domain name>
|
||||
see data about the domain name
|
||||
delegation <name>
|
||||
see what servers would be queried for the given name.
|
||||
info <name>
|
||||
see data about the name. Slow, searches the cache item by item.
|
||||
local_zone_remove <name of local-zone entry>
|
||||
the local-zone entry is removed.
|
||||
All data from the local zone is also deleted.
|
||||
If it did not exist, nothing happens.
|
||||
local_zone_add <name of local zone> <type>
|
||||
local_zone <name of local zone> <type>
|
||||
As the config file entry. Adds new local zone or updates
|
||||
existing zone type.
|
||||
local_data_remove <name>
|
||||
Removes local-data (all types) name.
|
||||
local_data_add <resource record string>
|
||||
local_data <resource record string>
|
||||
Add new local data record (on the rest of the line).
|
||||
local_data_add www.example.com. IN A 192.0.2.2
|
||||
if no local_zone exists for it; a transparent zone with the same
|
||||
name as the data is created.
|
||||
verbosity <new value>
|
||||
Change logging verbosity to new value.
|
||||
|
||||
|
||||
|
||||
@@ -187,9 +187,20 @@ static void
|
||||
go_cmd(SSL* ssl, int argc, char* argv[])
|
||||
{
|
||||
char* cmd = "GET / HTTP/1.0\n\n";
|
||||
int r;
|
||||
char* pre="UBCT";
|
||||
char* space=" ";
|
||||
char* newline="\n";
|
||||
int r, i;
|
||||
char buf[1024];
|
||||
if(SSL_write(ssl, cmd, (int)strlen(cmd)) <= 0)
|
||||
if(SSL_write(ssl, pre, (int)strlen(pre)) <= 0)
|
||||
ssl_err("could not SSL_write");
|
||||
for(i=0; i<argc; i++) {
|
||||
if(SSL_write(ssl, space, (int)strlen(space)) <= 0)
|
||||
ssl_err("could not SSL_write");
|
||||
if(SSL_write(ssl, argv[i], (int)strlen(argv[i])) <= 0)
|
||||
ssl_err("could not SSL_write");
|
||||
}
|
||||
if(SSL_write(ssl, newline, (int)strlen(newline)) <= 0)
|
||||
ssl_err("could not SSL_write");
|
||||
while(1) {
|
||||
ERR_clear_error();
|
||||
|
||||
Reference in New Issue
Block a user