From 121cb15d678b63ae215d950db7644eefd55b5ca5 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Wed, 10 Sep 2008 15:23:01 +0000 Subject: [PATCH] remote control setup, port binding and service. git-svn-id: file:///svn/unbound/trunk@1227 be551aaa-1e26-0410-a405-d3ace91eadb9 --- Makefile.in | 2 +- configure | 1 - configure.ac | 1 - daemon/daemon.c | 28 +- daemon/daemon.h | 4 + daemon/remote.c | 310 ++++++++ daemon/remote.h | 128 ++++ daemon/worker.c | 14 +- daemon/worker.h | 3 + doc/Changelog | 4 + doc/example.conf.in | 27 +- iterator/iterator.c | 2 + libunbound/libworker.c | 16 + services/listen_dnsport.c | 26 +- services/listen_dnsport.h | 17 + smallapp/worker_cb.c | 16 + testcode/testbound.c | 41 ++ util/config_file.c | 38 + util/config_file.h | 15 + util/configlexer.c | 1455 ++++++++++++++++++++----------------- util/configlexer.lex | 8 + util/configparser.c | 893 +++++++++++++---------- util/configparser.h | 20 +- util/configparser.y | 71 +- util/fptr_wlist.c | 3 + util/netevent.c | 72 +- util/netevent.h | 11 + 27 files changed, 2103 insertions(+), 1123 deletions(-) create mode 100644 daemon/remote.c create mode 100644 daemon/remote.h diff --git a/Makefile.in b/Makefile.in index 0e011848d..0ad4c8915 100644 --- a/Makefile.in +++ b/Makefile.in @@ -152,7 +152,7 @@ endif unbound: $(DAEMON_OBJ) $(ldnslib) $(INFO) Link $@ - $Q$(LINK) -o $@ $(sort $(DAEMON_OBJ)) $(LIBS) + $Q$(LINK) -o $@ $(sort $(DAEMON_OBJ)) -lssl $(LIBS) unbound-checkconf: $(CHECKCONF_OBJ) $(ldnslib) $(INFO) Link $@ diff --git a/configure b/configure index 0332c3095..0eccdb368 100755 --- a/configure +++ b/configure @@ -20958,7 +20958,6 @@ echo "${ECHO_T}found in $ssldir" >&6; } { echo "$as_me:$LINENO: checking for HMAC_CTX_init in -lcrypto" >&5 echo $ECHO_N "checking for HMAC_CTX_init in -lcrypto... $ECHO_C" >&6; } - ORIGLIBS="$LIBS" LIBS="$LIBS -lcrypto" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ diff --git a/configure.ac b/configure.ac index fd3d64b9b..759b426c5 100644 --- a/configure.ac +++ b/configure.ac @@ -522,7 +522,6 @@ AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname], fi AC_MSG_CHECKING([for HMAC_CTX_init in -lcrypto]) - ORIGLIBS="$LIBS" LIBS="$LIBS -lcrypto" AC_TRY_LINK(, [ int HMAC_CTX_init(void); diff --git a/daemon/daemon.c b/daemon/daemon.c index 8ab594123..6da7353af 100644 --- a/daemon/daemon.c +++ b/daemon/daemon.c @@ -42,6 +42,7 @@ #include "config.h" #include "daemon/daemon.h" #include "daemon/worker.h" +#include "daemon/remote.h" #include "daemon/acl_list.h" #include "util/log.h" #include "util/config_file.h" @@ -188,12 +189,24 @@ int daemon_open_shared_ports(struct daemon* daemon) { log_assert(daemon); - if(daemon->cfg->port == daemon->listening_port) - return 1; - listening_ports_free(daemon->ports); - if(!(daemon->ports=listening_ports_open(daemon->cfg))) - return 0; - daemon->listening_port = daemon->cfg->port; + if(daemon->cfg->port != daemon->listening_port) { + listening_ports_free(daemon->ports); + if(!(daemon->ports=listening_ports_open(daemon->cfg))) + return 0; + daemon->listening_port = daemon->cfg->port; + } + if(!daemon->cfg->remote_control_enable && daemon->rc_port) { + listening_ports_free(daemon->rc_ports); + daemon->rc_ports = NULL; + daemon->rc_port = 0; + } + if(daemon->cfg->remote_control_enable && + daemon->cfg->control_port != daemon->rc_port) { + listening_ports_free(daemon->rc_ports); + if(!(daemon->rc_ports=daemon_remote_open_ports(daemon->cfg))) + return 0; + daemon->rc_port = daemon->cfg->control_port; + } return 1; } @@ -391,7 +404,7 @@ daemon_fork(struct daemon* daemon) daemon_start_others(daemon); /* Special handling for the main thread. This is the thread - * that handles signals. + * that handles signals and remote control. */ if(!worker_init(daemon->workers[0], daemon->cfg, daemon->ports, 1)) fatal_exit("Could not initialize main thread"); @@ -441,6 +454,7 @@ daemon_delete(struct daemon* daemon) return; modstack_desetup(&daemon->mods, daemon->env); listening_ports_free(daemon->ports); + listening_ports_free(daemon->rc_ports); if(daemon->env) { slabhash_delete(daemon->env->msg_cache); rrset_cache_delete(daemon->env->rrset_cache); diff --git a/daemon/daemon.h b/daemon/daemon.h index e8fa4a419..e46e5db89 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -68,6 +68,10 @@ struct daemon { int listening_port; /** listening ports, opened, to be shared by threads */ struct listen_port* ports; + /** port number fore remote that has ports opened. */ + int rc_port; + /** listening ports for remote control */ + struct listen_port* rc_ports; /** num threads allocated */ int num; /** the worker entries */ diff --git a/daemon/remote.c b/daemon/remote.c new file mode 100644 index 000000000..565beb80a --- /dev/null +++ b/daemon/remote.c @@ -0,0 +1,310 @@ +/* + * daemon/remote.c - remote control for the unbound daemon. + * + * Copyright (c) 2008, NLnet Labs. All rights reserved. + * + * This software is open source. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of the NLNET LABS nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * \file + * + * This file contains the remote control functionality for the daemon. + * The remote control can be performed using either the commandline + * unbound-control tool, or a SSLv3/TLS capable web browser. + * The channel is secured using SSLv3 or TLSv1, and certificates. + * Both the server and the client(control tool) have their own keys. + */ +#include "config.h" +#include "daemon/remote.h" +#include "daemon/worker.h" +#include "util/log.h" +#include "util/config_file.h" +#include "util/net_help.h" +#include "services/listen_dnsport.h" + +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_NETDB_H +#include +#endif + +struct daemon_remote* +daemon_remote_create(struct worker* worker) +{ + struct daemon_remote* rc = (struct daemon_remote*)calloc(1, + sizeof(*rc)); + if(!rc) { + log_err("out of memory in daemon_remote_create"); + return NULL; + } + rc->worker = worker; + rc->max_active = 10; + /* TODO setup the context */ + return rc; +} + +void daemon_remote_delete(struct daemon_remote* rc) +{ + struct rc_state* p, *np; + if(!rc) return; + /* but do not close the ports */ + listen_list_delete(rc->accept_list); + /* do close these sockets */ + p = rc->busy_list; + while(p) { + np = p->next; + if(p->ssl) + SSL_free(p->ssl); + comm_point_delete(p->c); + free(p); + p = np; + } + SSL_CTX_free(rc->ctx); + free(rc); +} + +/** + * Add and open a new control port + * @param ip: ip str + * @param nr: port nr + * @param list: list head + * @param noproto_is_err: if lack of protocol support is an error. + * @return false on failure. + */ +static int +add_open(char* ip, int nr, struct listen_port** list, int noproto_is_err) +{ + struct addrinfo hints; + struct addrinfo* res; + struct listen_port* n; + int noproto; + int fd, r; + char port[15]; + snprintf(port, sizeof(port), "%d", nr); + port[sizeof(port)-1]=0; + memset(&hints, 0, sizeof(hints)); + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; + if((r = getaddrinfo(ip, port, &hints, &res)) != 0 || !res) { + log_err("control interface %s:%s getaddrinfo: %s %s", + ip?ip:"default", port, gai_strerror(r), +#ifdef EAI_SYSTEM + r==EAI_SYSTEM?(char*)strerror(errno):"" +#else + "" +#endif + ); + } + + /* open fd */ + fd = create_tcp_accept_sock(res, 1, &noproto); + freeaddrinfo(res); + if(fd == -1 && noproto) { + if(!noproto_is_err) + return 1; /* return success, but do nothing */ + log_err("cannot open control interface %s %d : " + "protocol not supported", ip, nr); + return 0; + } + if(fd == -1) { + log_err("cannot open control interface %s %d", ip, nr); + return 0; + } + + /* alloc */ + n = (struct listen_port*)calloc(1, sizeof(*n)); + if(!n) { + close(fd); + log_err("out of memory"); + return 0; + } + n->next = *list; + *list = n; + n->fd = fd; + return 1; +} + +struct listen_port* daemon_remote_open_ports(struct config_file* cfg) +{ + struct listen_port* l = NULL; + log_assert(cfg->remote_control_enable && cfg->control_port); + if(cfg->control_ifs) { + struct config_strlist* p = cfg->control_ifs; + for(p = cfg->control_ifs; p; p = p->next) { + if(!add_open(p->str, cfg->control_port, &l, 1)) { + listening_ports_free(l); + return NULL; + } + } + } else { + /* defaults */ + if(cfg->do_ip6 && + !add_open("::1", cfg->control_port, &l, 0)) { + listening_ports_free(l); + return NULL; + } + if(cfg->do_ip4 && + !add_open("127.0.0.1", cfg->control_port, &l, 1)) { + listening_ports_free(l); + return NULL; + } + } + return l; +} + +/** open accept commpoint */ +static int +accept_open(struct daemon_remote* rc, int fd) +{ + struct listen_list* n = (struct listen_list*)malloc(sizeof(*n)); + if(!n) { + log_err("out of memory"); + return 0; + } + n->next = rc->accept_list; + rc->accept_list = n; + /* open commpt */ + n->com = comm_point_create_raw(rc->worker->base, fd, 0, + &remote_accept_callback, rc); + if(!n->com) + return 0; + /* keep this port open, its fd is kept in the rc portlist */ + n->com->do_not_close = 1; + return 1; +} + +int daemon_remote_open_accept(struct daemon_remote* rc, + struct listen_port* ports) +{ + struct listen_port* p; + for(p = ports; p; p = p->next) { + if(!accept_open(rc, p->fd)) { + log_err("could not create accept comm point"); + return 0; + } + } + return 1; +} + +int remote_accept_callback(struct comm_point* c, void* arg, int err, + struct comm_reply* ATTR_UNUSED(rep)) +{ + struct daemon_remote* rc = (struct daemon_remote*)arg; + struct sockaddr_storage addr; + socklen_t addrlen; + int newfd; + struct rc_state* n; + if(err != NETEVENT_NOERROR) { + log_err("error %d on remote_accept_callback", err); + return 0; + } + /* perform the accept */ + newfd = comm_point_perform_accept(c, &addr, &addrlen); + if(newfd == -1) + return 0; + /* create new commpoint unless we are servicing already */ + if(rc->active >= rc->max_active) { + log_warn("drop incoming remote control: too many connections"); + comm_point_stop_listening(c); + close(newfd); + return 0; + } + + /* setup commpoint to service the remote control command */ + n = (struct rc_state*)calloc(1, sizeof(*n)); + if(!n) { + log_err("out of memory"); + close(newfd); + return 0; + } + /* start in reading state */ + n->c = comm_point_create_raw(rc->worker->base, newfd, 0, + &remote_control_callback, n); + if(!n->c) { + log_err("out of memory"); + close(newfd); + free(n); + return 0; + } + log_addr(VERB_QUERY, "new control connection from", &addr, addrlen); + memcpy(&n->c->repinfo.addr, &addr, addrlen); + n->c->repinfo.addrlen = addrlen; + /* TODO setup ssl, assign fd */ + n->rc = rc; + n->next = rc->busy_list; + rc->busy_list = n; + rc->active ++; + return 0; +} + +/** delete from list */ +static void +state_list_remove_elem(struct rc_state** list, struct comm_point* c) +{ + while(*list) { + if( (*list)->c == c) { + *list = (*list)->next; + return; + } + list = &(*list)->next; + } +} + +/** decrease active count and remove commpoint from busy list */ +static void +clean_point(struct daemon_remote* rc, struct rc_state* s) +{ + state_list_remove_elem(&rc->busy_list, s->c); + rc->active --; + if(s->ssl) + SSL_free(s->ssl); + comm_point_delete(s->c); + free(s); +} + +int remote_control_callback(struct comm_point* c, void* arg, int err, + struct comm_reply* ATTR_UNUSED(rep)) +{ + struct rc_state* s = (struct rc_state*)arg; + struct daemon_remote* rc = s->rc; + if(err != NETEVENT_NOERROR) { + clean_point(rc, s); + return 0; + } + /* TODO (continue to) setup the SSL connection */ + + /* once handshake has completed, check authentication */ + + /* if OK start to actually handle the request */ + + return 0; +} diff --git a/daemon/remote.h b/daemon/remote.h new file mode 100644 index 000000000..dced6537a --- /dev/null +++ b/daemon/remote.h @@ -0,0 +1,128 @@ +/* + * daemon/remote.h - remote control for the unbound daemon. + * + * Copyright (c) 2008, NLnet Labs. All rights reserved. + * + * This software is open source. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of the NLNET LABS nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * \file + * + * This file contains the remote control functionality for the daemon. + * The remote control can be performed using either the commandline + * unbound-control tool, or a SSLv3/TLS capable web browser. + * The channel is secured using SSLv3 or TLSv1, and certificates. + * Both the server and the client(control tool) have their own keys. + */ + +#ifndef DAEMON_REMOTE_H +#define DAEMON_REMOTE_H +struct config_file; +struct listen_list; +struct listen_port; +struct worker; +struct comm_reply; +struct comm_point; +struct daemon_remote; + +/** + * a busy control command connection, SSL state + */ +struct rc_state { + /** the next item in list */ + struct rc_state* next; + /** the commpoint */ + struct comm_point* c; + /** the ssl state */ + SSL* ssl; + /** the rc this is part of */ + struct daemon_remote* rc; +}; + +/** + * The remote control tool state. + * The state is only created for the first thread, other threads + * are called from this thread. Only the first threads listens to + * the control port. The other threads do not, but are called on the + * command channel(pipe) from the first thread. + */ +struct daemon_remote { + /** the worker for this remote control */ + struct worker* worker; + /** commpoints for accepting remote control connections */ + struct listen_list* accept_list; + /** number of active commpoints that are handling remote control */ + int active; + /** max active commpoints */ + int max_active; + /** current commpoints busy; should be a short list, malloced */ + struct rc_state* busy_list; + /** the SSL context for creating new SSL streams */ + SSL_CTX* ctx; +}; + +/** + * Create new remote control state for the daemon. + * @param worker: worker with communication base. and links to command channels. + * @return new state, or NULL on failure. + */ +struct daemon_remote* daemon_remote_create(struct worker* worker); + +/** + * remote control state to delete. + * @param rc: state to delete. + */ +void daemon_remote_delete(struct daemon_remote* rc); + +/** + * Open and create listening ports for remote control. + * @param cfg: config options. + * @return list of ports or NULL on failure. + * can be freed with listening_ports_free(). + */ +struct listen_port* daemon_remote_open_ports(struct config_file* cfg); + +/** + * Setup comm points for accepting remote control connections. + * @param rc: state + * @param ports: already opened ports. + * @return false on error. + */ +int daemon_remote_open_accept(struct daemon_remote* rc, + struct listen_port* ports); + +/** handle remote control accept callbacks */ +int remote_accept_callback(struct comm_point*, void*, int, struct comm_reply*); + +/** handle remote control data callbacks */ +int remote_control_callback(struct comm_point*, void*, int, struct comm_reply*); + +#endif /* DAEMON_REMOTE_H */ diff --git a/daemon/worker.c b/daemon/worker.c index a2f91a218..83e0462ca 100644 --- a/daemon/worker.c +++ b/daemon/worker.c @@ -45,6 +45,7 @@ #include "util/random.h" #include "daemon/worker.h" #include "daemon/daemon.h" +#include "daemon/remote.h" #include "daemon/acl_list.h" #include "util/netevent.h" #include "util/config_file.h" @@ -968,8 +969,18 @@ worker_init(struct worker* worker, struct config_file *cfg, return 0; } #endif /* LIBEVENT_SIGNAL_PROBLEM */ + if(!(worker->rc = daemon_remote_create(worker))) { + worker_delete(worker); + return 0; + } + if(!daemon_remote_open_accept(worker->rc, + worker->daemon->rc_ports)) { + worker_delete(worker); + return 0; + } } else { /* !do_sigs */ - worker->comsig = 0; + worker->comsig = NULL; + worker->rc = NULL; } seed = (unsigned int)time(NULL) ^ (unsigned int)getpid() ^ (((unsigned int)worker->thread_num)<<17); @@ -1082,6 +1093,7 @@ worker_delete(struct worker* worker) comm_signal_delete(worker->comsig); tube_delete(worker->cmd); comm_timer_delete(worker->stat_timer); + daemon_remote_delete(worker->rc); free(worker->ports); if(worker->thread_num == 0) log_set_time(NULL); diff --git a/daemon/worker.h b/daemon/worker.h index 20e11002f..25801d16a 100644 --- a/daemon/worker.h +++ b/daemon/worker.h @@ -59,6 +59,7 @@ struct listen_port; struct ub_randstate; struct regional; struct tube; +struct daemon_remote; /** worker commands */ enum worker_commands { @@ -95,6 +96,8 @@ struct worker { struct comm_point* cmd_com; /** timer for statistics */ struct comm_timer* stat_timer; + /** remote control state (for first thread only) */ + struct daemon_remote* rc; /** number of requests that can be handled by this worker */ size_t request_size; diff --git a/doc/Changelog b/doc/Changelog index dafa31cd0..54856a85a 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +10 September 2008: Wouter + - remove memleak in privacy addresses on reloads and quits. + - remote control work. + 9 September 2008: Wouter - smallapp/unbound-control-setup.sh script to set up certificates. diff --git a/doc/example.conf.in b/doc/example.conf.in index 2c4a72854..c008faeb8 100644 --- a/doc/example.conf.in +++ b/doc/example.conf.in @@ -35,7 +35,7 @@ server: # interface: 2001:DB8::5 # enable this feature to copy the source address of queries to reply. - # Socket options not be supported on all platforms. experimental. + # Socket options are not supported on all platforms. experimental. # interface-automatic: no # port to answer queries from @@ -365,6 +365,31 @@ server: # local-zone: "example.com" redirect # local-data: "example.com A 192.0.2.3" +# Remote control config section. +remote-control: + # Enable remote control with unbound-control(8) here. + # set up the keys and certificates with unbound-control-setup. + # control-enable: no + + # what interfaces are listened to for remote control. + # give 0.0.0.0 and ::0 to listen to all interfaces. + # control-interface: 127.0.0.1 + # control-interface: ::1 + + # port number for remote control operations. Same as BIND rndc uses. + # control-port: 953 + + # unbound server key file. + # server-key-file: "@UNBOUND_RUN_DIR@/unbound_server.key" + + # unbound server certificate file. + # server-key-file: "@UNBOUND_RUN_DIR@/unbound_server.pem" + + # unbound-control key file. + # control-key-file: "@UNBOUND_RUN_DIR@/unbound_control.key" + + # unbound-control certificate file. + # control-key-file: "@UNBOUND_RUN_DIR@/unbound_control.pem" # Stub zones. # Create entries like below, to make all queries for 'example.com' and diff --git a/iterator/iterator.c b/iterator/iterator.c index d63412261..98f8fb095 100644 --- a/iterator/iterator.c +++ b/iterator/iterator.c @@ -49,6 +49,7 @@ #include "iterator/iter_delegpt.h" #include "iterator/iter_resptype.h" #include "iterator/iter_scrub.h" +#include "iterator/iter_priv.h" #include "services/cache/dns.h" #include "services/cache/infra.h" #include "util/module.h" @@ -85,6 +86,7 @@ iter_deinit(struct module_env* env, int id) return; iter_env = (struct iter_env*)env->modinfo[id]; free(iter_env->target_fetch_policy); + priv_delete(iter_env->priv); hints_delete(iter_env->hints); forwards_delete(iter_env->fwds); donotq_delete(iter_env->donotq); diff --git a/libunbound/libworker.c b/libunbound/libworker.c index 457d66d87..846d90b86 100644 --- a/libunbound/libworker.c +++ b/libunbound/libworker.c @@ -769,6 +769,22 @@ int worker_handle_service_reply(struct comm_point* ATTR_UNUSED(c), return 0; } +int remote_accept_callback(struct comm_point* ATTR_UNUSED(c), + void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), + struct comm_reply* ATTR_UNUSED(repinfo)) +{ + log_assert(0); + return 0; +} + +int remote_control_callback(struct comm_point* ATTR_UNUSED(c), + void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), + struct comm_reply* ATTR_UNUSED(repinfo)) +{ + log_assert(0); + return 0; +} + void worker_sighandler(int ATTR_UNUSED(sig), void* ATTR_UNUSED(arg)) { log_assert(0); diff --git a/services/listen_dnsport.c b/services/listen_dnsport.c index 5ea5faa81..48bae0e09 100644 --- a/services/listen_dnsport.c +++ b/services/listen_dnsport.c @@ -190,14 +190,7 @@ create_udp_sock(int family, int socktype, struct sockaddr* addr, return s; } -/** - * Create and bind TCP listening socket - * @param addr: address info ready to make socket. - * @param v6only: enable ip6 only flag on ip6 sockets. - * @param noproto: if error caused by lack of protocol support. - * @return: the socket. -1 on error. - */ -static int +int create_tcp_accept_sock(struct addrinfo *addr, int v6only, int* noproto) { int s; @@ -532,19 +525,24 @@ listen_create(struct comm_base* base, struct listen_port* ports, return front; } -void -listen_delete(struct listen_dnsport* front) +void +listen_list_delete(struct listen_list* list) { - struct listen_list *p, *pn; - if(!front) - return; - p = front->cps; + struct listen_list *p = list, *pn; while(p) { pn = p->next; comm_point_delete(p->com); free(p); p = pn; } +} + +void +listen_delete(struct listen_dnsport* front) +{ + if(!front) + return; + listen_list_delete(front->cps); ldns_buffer_free(front->udp_buff); free(front); } diff --git a/services/listen_dnsport.h b/services/listen_dnsport.h index a35ae0a4d..95f1f0241 100644 --- a/services/listen_dnsport.h +++ b/services/listen_dnsport.h @@ -46,6 +46,7 @@ #include "util/netevent.h" struct listen_list; struct config_file; +struct addrinfo; /** * Listening for queries structure. @@ -155,6 +156,13 @@ void listen_resume(struct listen_dnsport* listen); */ void listen_delete(struct listen_dnsport* listen); +/** + * delete listen_list of commpoints. Calls commpointdelete() on items. + * This may close the fds or not depending on flags. + * @param list: to delete. + */ +void listen_list_delete(struct listen_list* list); + /** * get memory size used by the listening structs * @param listen: listening structure. @@ -178,4 +186,13 @@ size_t listen_get_mem(struct listen_dnsport* listen); int create_udp_sock(int family, int socktype, struct sockaddr* addr, socklen_t addrlen, int v6only, int* inuse, int* noproto); +/** + * Create and bind TCP listening socket + * @param addr: address info ready to make socket. + * @param v6only: enable ip6 only flag on ip6 sockets. + * @param noproto: if error caused by lack of protocol support. + * @return: the socket. -1 on error. + */ +int create_tcp_accept_sock(struct addrinfo *addr, int v6only, int* noproto); + #endif /* LISTEN_DNSPORT_H */ diff --git a/smallapp/worker_cb.c b/smallapp/worker_cb.c index 0eb34a2e8..0026eec97 100644 --- a/smallapp/worker_cb.c +++ b/smallapp/worker_cb.c @@ -78,6 +78,22 @@ int worker_handle_service_reply(struct comm_point* ATTR_UNUSED(c), return 0; } +int remote_accept_callback(struct comm_point* ATTR_UNUSED(c), + void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), + struct comm_reply* ATTR_UNUSED(repinfo)) +{ + log_assert(0); + return 0; +} + +int remote_control_callback(struct comm_point* ATTR_UNUSED(c), + void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), + struct comm_reply* ATTR_UNUSED(repinfo)) +{ + log_assert(0); + return 0; +} + void worker_sighandler(int ATTR_UNUSED(sig), void* ATTR_UNUSED(arg)) { log_assert(0); diff --git a/testcode/testbound.c b/testcode/testbound.c index 58330f1d8..a5860bdfa 100644 --- a/testcode/testbound.c +++ b/testcode/testbound.c @@ -42,6 +42,7 @@ #include "testcode/ldns-testpkts.h" #include "testcode/replay.h" #include "testcode/fake_event.h" +#include "daemon/remote.h" /** * include the main program from the unbound daemon. @@ -268,3 +269,43 @@ main(int argc, char* argv[]) log_info("Testbound Exit Success"); return res; } + +/* fake remote control */ +struct listen_port* daemon_remote_open_ports(struct config_file* + ATTR_UNUSED(cfg)) +{ + return NULL; +} + +struct daemon_remote* daemon_remote_create(struct worker* ATTR_UNUSED(worker)) +{ + return (struct daemon_remote*)calloc(1,1); +} + +void daemon_remote_delete(struct daemon_remote* rc) +{ + free(rc); +} + +int daemon_remote_open_accept(struct daemon_remote* ATTR_UNUSED(rc), + struct listen_port* ATTR_UNUSED(ports)) +{ + return 1; +} + +int remote_accept_callback(struct comm_point* ATTR_UNUSED(c), + void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), + struct comm_reply* ATTR_UNUSED(repinfo)) +{ + log_assert(0); + return 0; +} + +int remote_control_callback(struct comm_point* ATTR_UNUSED(c), + void* ATTR_UNUSED(arg), int ATTR_UNUSED(error), + struct comm_reply* ATTR_UNUSED(repinfo)) +{ + log_assert(0); + return 0; +} + diff --git a/util/config_file.c b/util/config_file.c index 3d8d5e977..892badb8e 100644 --- a/util/config_file.c +++ b/util/config_file.c @@ -151,6 +151,19 @@ config_create() cfg->local_zones = NULL; cfg->local_zones_nodefault = NULL; cfg->local_data = NULL; + + cfg->remote_control_enable = 0; + cfg->control_ifs = NULL; + cfg->control_port = 953; + if(!(cfg->server_key_file = strdup(RUN_DIR"/unbound_server.key"))) + goto error_exit; + if(!(cfg->server_cert_file = strdup(RUN_DIR"/unbound_server.pem"))) + goto error_exit; + if(!(cfg->control_key_file = strdup(RUN_DIR"/unbound_control.key"))) + goto error_exit; + if(!(cfg->control_cert_file = strdup(RUN_DIR"/unbound_control.pem"))) + goto error_exit; + if(!(cfg->module_conf = strdup("validator iterator"))) goto error_exit; if(!(cfg->val_nsec3_key_iterations = strdup("1024 150 2048 500 4096 2500"))) goto error_exit; @@ -355,6 +368,26 @@ int config_set_option(struct config_file* cfg, const char* opt, return cfg_parse_memsize(val, &cfg->neg_cache_size); } else if(strcmp(opt, "local-data:") == 0) { return cfg_strlist_insert(&cfg->local_data, strdup(val)); + } else if(strcmp(opt, "control-enable:") == 0) { + IS_YES_OR_NO; + cfg->remote_control_enable = (strcmp(val, "yes") == 0); + } else if(strcmp(opt, "control-interface:") == 0) { + return cfg_strlist_insert(&cfg->control_ifs, strdup(val)); + } else if(strcmp(opt, "control-port:") == 0) { + IS_NONZERO_NUMBER; + cfg->control_port = atoi(val); + } else if(strcmp(opt, "server-key-file:") == 0) { + free(cfg->server_key_file); + return (cfg->server_key_file = strdup(val)) != NULL; + } else if(strcmp(opt, "server-cert-file:") == 0) { + free(cfg->server_cert_file); + return (cfg->server_cert_file = strdup(val)) != NULL; + } else if(strcmp(opt, "control-key-file:") == 0) { + free(cfg->control_key_file); + return (cfg->control_key_file = strdup(val)) != NULL; + } else if(strcmp(opt, "control-cert-file:") == 0) { + free(cfg->control_cert_file); + return (cfg->control_cert_file = strdup(val)) != NULL; } else if(strcmp(opt, "module-config:") == 0) { free(cfg->module_conf); return (cfg->module_conf = strdup(val)) != NULL; @@ -483,6 +516,11 @@ config_delete(struct config_file* cfg) config_deldblstrlist(cfg->local_zones); config_delstrlist(cfg->local_zones_nodefault); config_delstrlist(cfg->local_data); + config_delstrlist(cfg->control_ifs); + free(cfg->server_key_file); + free(cfg->server_cert_file); + free(cfg->control_key_file); + free(cfg->control_cert_file); free(cfg); } diff --git a/util/config_file.h b/util/config_file.h index 4b0841945..1544122f1 100644 --- a/util/config_file.h +++ b/util/config_file.h @@ -216,6 +216,21 @@ struct config_file { /** local data RRs configged */ struct config_strlist* local_data; + /** remote control section. enable toggle. */ + int remote_control_enable; + /** the interfaces the remote control should listen on */ + struct config_strlist* control_ifs; + /** port number for the control port */ + int control_port; + /** private key file for server */ + char* server_key_file; + /** certificate file for server */ + char* server_cert_file; + /** private key file for unbound-control */ + char* control_key_file; + /** certificate file for unbound-control */ + char* control_cert_file; + /** daemonize, i.e. fork into the background. */ int do_daemonize; }; diff --git a/util/configlexer.c b/util/configlexer.c index 4495f8230..19bd5a5f3 100644 --- a/util/configlexer.c +++ b/util/configlexer.c @@ -361,8 +361,8 @@ static void yy_fatal_error (yyconst char msg[] ); *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 98 -#define YY_END_OF_BUFFER 99 +#define YY_NUM_RULES 106 +#define YY_END_OF_BUFFER 107 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -370,104 +370,113 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[873] = +static yyconst flex_int16_t yy_accept[955] = { 0, - 1, 1, 82, 82, 86, 86, 90, 90, 94, 94, - 99, 97, 1, 80, 81, 2, 85, 98, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 82, 83, 98, 84, 98, - 86, 87, 88, 98, 93, 90, 91, 92, 98, 94, - 95, 96, 98, 97, 0, 1, 2, 2, 2, 2, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 82, 0, 86, 0, 93, 0, 90, 94, 0, + 1, 1, 90, 90, 94, 94, 98, 98, 102, 102, + 107, 105, 1, 88, 89, 2, 93, 106, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 90, 91, 106, 92, 106, + 94, 95, 96, 106, 101, 98, 99, 100, 106, 102, + 103, 104, 106, 105, 0, 1, 2, 2, 2, 2, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 90, 0, 94, 0, 101, 0, 98, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, + 102, 0, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 97, 48, 97, 97, 97, 97, 97, 6, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 20, 97, 97, 97, 12, 13, 97, 15, 14, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, + 105, 105, 105, 105, 105, 105, 105, 105, 48, 105, + 105, 105, 105, 105, 6, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 20, 105, 105, 105, 105, 12, 13, 105, 15, 14, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 3, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 89, 97, - 97, 97, 97, 97, 97, 97, 97, 23, 97, 97, - 97, 97, 97, 97, 97, 24, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 60, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 3, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 97, 105, 105, 105, 105, 105, 105, 105, + 105, 23, 105, 105, 105, 105, 105, 105, 105, 24, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 97, 97, 59, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 21, 97, 97, 97, 97, 97, 97, 97, 97, - 22, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 17, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 49, 50, - 47, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 5, 97, 97, 97, 62, 97, 97, 97, 97, + 105, 105, 60, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 59, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 21, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 22, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 17, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 77, 76, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 25, 97, - 97, 97, 97, 97, 97, 75, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 41, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 4, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 16, 97, 52, 53, 51, 97, 97, 97, 97, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 49, 50, 47, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 5, 105, 105, 105, 105, 105, + 105, 105, 105, 62, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 77, 76, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 25, 105, 105, + 105, 105, 105, 105, 105, 105, 75, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 41, 105, 105, 105, - 97, 58, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 66, 97, - 97, 97, 97, 97, 97, 97, 97, 31, 97, 97, - 97, 97, 97, 97, 97, 57, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 61, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 68, 97, 97, 97, 97, - 56, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 32, 33, 97, 71, 97, 97, 27, 97, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 4, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 83, 105, 16, 105, 52, 53, 51, + 105, 105, 105, 105, 105, 58, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 66, 105, 105, 105, 105, + 105, 105, 105, 105, 31, 105, 105, 105, 105, 105, - 73, 97, 97, 97, 97, 97, 7, 97, 46, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 63, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 72, 26, 28, 97, 97, 97, 97, - 97, 45, 97, 97, 97, 97, 97, 97, 97, 44, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 11, 97, 97, 97, 97, 97, 97, 10, 97, 97, - 29, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 34, - 97, 97, 97, 97, 97, 30, 97, 97, 97, 64, + 105, 105, 105, 105, 105, 105, 57, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 61, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 68, + 105, 105, 105, 105, 56, 105, 81, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 32, 33, 105, 71, 105, 105, 27, 105, 73, 105, + 105, 105, 105, 105, 7, 105, 46, 80, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 63, 105, 105, 105, 105, - 65, 97, 97, 67, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 18, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 19, 97, 9, 97, 97, 78, 38, 97, - 97, 70, 54, 97, 97, 40, 43, 39, 97, 35, - 97, 8, 97, 69, 97, 97, 97, 36, 97, 79, - 97, 55, 42, 37, 97, 97, 97, 97, 97, 97, - 74, 0 + 105, 105, 105, 105, 105, 105, 105, 72, 26, 28, + 105, 105, 105, 105, 105, 45, 105, 105, 105, 84, + 105, 105, 105, 105, 105, 44, 105, 105, 105, 105, + 105, 105, 86, 105, 105, 105, 105, 105, 105, 11, + 105, 105, 105, 105, 105, 105, 10, 105, 105, 29, + 105, 85, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 87, 82, 105, 105, 105, 105, 105, 105, 105, + 105, 34, 105, 105, 105, 105, 105, 30, 105, 105, + 105, 64, 65, 105, 105, 67, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 18, 105, 105, + + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 19, 105, 9, 105, 105, 78, + 38, 105, 105, 70, 54, 105, 105, 40, 43, 39, + 105, 35, 105, 8, 105, 69, 105, 105, 105, 36, + 105, 79, 105, 55, 42, 37, 105, 105, 105, 105, + 105, 105, 74, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -510,209 +519,227 @@ static yyconst flex_int32_t yy_meta[39] = 1, 1, 1, 1, 1, 1, 1, 1 } ; -static yyconst flex_int16_t yy_base[884] = +static yyconst flex_int16_t yy_base[966] = { 0, 0, 0, 36, 39, 43, 50, 62, 74, 55, 67, - 1795, 1781, 49, 1796, 1796, 81, 1796, 88, 32, 83, - 76, 78, 60, 89, 94, 86, 95, 96, 88, 98, - 103, 105, 118, 104, 125, 1780, 1796, 1796, 1796, 57, - 1779, 1796, 1796, 120, 1778, 1788, 1796, 1796, 140, 1776, - 1796, 1796, 136, 1775, 147, 144, 0, 151, 0, 0, - 144, 146, 106, 148, 150, 157, 153, 155, 154, 156, - 160, 159, 173, 164, 162, 174, 175, 177, 178, 181, - 167, 187, 188, 190, 192, 193, 195, 191, 198, 199, - 200, 1774, 213, 1773, 224, 1772, 230, 1782, 1770, 215, + 1959, 1945, 49, 1960, 1960, 81, 1960, 88, 32, 83, + 76, 78, 60, 89, 94, 86, 95, 103, 96, 98, + 105, 101, 117, 111, 125, 1944, 1960, 1960, 1960, 57, + 1943, 1960, 1960, 130, 1942, 1952, 1960, 1960, 144, 1940, + 1960, 1960, 136, 1939, 148, 152, 0, 155, 0, 0, + 148, 150, 71, 143, 114, 152, 159, 157, 158, 160, + 161, 162, 163, 169, 167, 170, 178, 179, 180, 182, + 184, 183, 185, 191, 193, 195, 189, 196, 198, 199, + 204, 210, 205, 1938, 220, 1937, 223, 1936, 234, 1946, - 220, 223, 214, 227, 234, 235, 216, 226, 236, 233, - 242, 240, 245, 252, 258, 237, 249, 265, 261, 267, - 268, 264, 270, 272, 273, 274, 275, 277, 278, 279, - 282, 283, 290, 292, 284, 288, 295, 296, 305, 303, - 311, 299, 309, 313, 315, 317, 320, 326, 322, 324, - 327, 328, 330, 331, 332, 333, 335, 348, 337, 349, - 338, 345, 353, 356, 360, 363, 364, 365, 366, 372, - 368, 369, 371, 377, 391, 378, 376, 379, 386, 380, - 382, 387, 398, 410, 395, 396, 402, 409, 412, 413, - 415, 416, 418, 428, 429, 430, 437, 433, 436, 419, + 1934, 238, 227, 231, 220, 218, 233, 240, 241, 202, + 242, 243, 236, 244, 247, 251, 257, 262, 253, 265, + 271, 267, 273, 274, 270, 275, 276, 278, 279, 282, + 283, 284, 287, 289, 290, 280, 307, 308, 292, 286, + 309, 311, 296, 312, 316, 318, 320, 322, 323, 327, + 328, 332, 338, 321, 330, 334, 341, 339, 344, 343, + 348, 349, 359, 352, 355, 353, 363, 364, 366, 367, + 370, 376, 374, 375, 378, 384, 381, 382, 385, 383, + 404, 391, 390, 392, 400, 394, 397, 402, 409, 415, + 426, 408, 414, 416, 425, 428, 430, 434, 432, 435, - 442, 1769, 445, 438, 440, 447, 449, 1768, 450, 451, - 457, 453, 454, 463, 455, 473, 461, 465, 466, 476, - 475, 477, 479, 480, 481, 482, 492, 491, 484, 493, - 494, 498, 502, 505, 511, 509, 513, 514, 520, 517, - 519, 516, 522, 523, 526, 530, 525, 538, 539, 545, - 541, 543, 548, 549, 533, 552, 553, 555, 557, 556, - 562, 564, 567, 568, 570, 574, 572, 575, 576, 577, - 578, 580, 581, 588, 589, 585, 592, 596, 597, 598, - 1767, 603, 604, 605, 1766, 1765, 606, 1764, 1763, 613, - 623, 610, 607, 611, 617, 614, 625, 618, 628, 633, + 438, 440, 447, 450, 449, 452, 453, 454, 1933, 458, + 456, 461, 462, 463, 1932, 464, 465, 467, 477, 468, + 466, 478, 480, 487, 488, 481, 490, 398, 493, 494, + 495, 496, 497, 500, 507, 498, 509, 506, 511, 518, + 519, 523, 527, 529, 533, 535, 536, 542, 539, 541, + 528, 544, 538, 545, 554, 557, 558, 559, 566, 563, + 565, 567, 571, 513, 572, 573, 574, 580, 577, 581, + 592, 582, 589, 588, 590, 599, 595, 603, 597, 598, + 605, 606, 609, 610, 618, 608, 611, 619, 621, 626, + 1931, 633, 622, 629, 630, 1930, 1929, 631, 1928, 1927, - 631, 637, 642, 644, 645, 646, 647, 649, 650, 653, - 654, 660, 668, 651, 665, 1762, 662, 669, 670, 672, - 674, 676, 682, 675, 679, 678, 681, 686, 691, 692, - 684, 695, 698, 699, 700, 702, 703, 705, 704, 707, - 706, 710, 711, 720, 722, 716, 727, 734, 1761, 736, - 735, 728, 737, 739, 742, 740, 741, 1760, 743, 748, - 750, 751, 752, 762, 765, 1759, 766, 758, 768, 769, - 764, 773, 774, 775, 782, 776, 783, 784, 788, 789, - 790, 795, 793, 796, 794, 1758, 799, 802, 801, 804, - 806, 808, 816, 809, 811, 814, 817, 819, 822, 824, + 640, 648, 636, 634, 638, 643, 646, 649, 654, 656, + 658, 663, 669, 660, 673, 664, 675, 676, 677, 678, + 682, 679, 689, 696, 680, 690, 692, 694, 1926, 698, + 701, 699, 700, 702, 706, 714, 710, 711, 715, 712, + 723, 718, 716, 725, 726, 730, 727, 731, 755, 735, + 734, 736, 742, 738, 740, 750, 743, 747, 766, 756, + 757, 768, 1925, 776, 777, 772, 773, 778, 779, 781, + 782, 1924, 787, 786, 788, 789, 796, 797, 804, 1923, + 802, 807, 792, 809, 808, 810, 814, 816, 818, 819, + 820, 823, 822, 834, 827, 831, 828, 835, 840, 838, - 826, 830, 1757, 827, 833, 829, 842, 851, 849, 834, - 852, 843, 853, 859, 860, 858, 861, 862, 864, 866, - 867, 873, 869, 883, 889, 891, 874, 876, 892, 872, - 894, 1756, 900, 903, 904, 896, 902, 907, 908, 909, - 1755, 915, 886, 912, 913, 916, 918, 919, 921, 923, - 933, 922, 932, 935, 924, 940, 947, 948, 950, 1754, - 936, 953, 956, 957, 964, 958, 960, 961, 962, 968, - 946, 969, 970, 973, 972, 975, 982, 990, 1753, 1752, - 1751, 986, 988, 967, 992, 994, 995, 996, 998, 999, - 1000, 1750, 1004, 1001, 1005, 1749, 1007, 1009, 1010, 1013, + 842, 839, 1922, 843, 849, 845, 847, 852, 853, 854, + 862, 857, 864, 866, 872, 867, 869, 859, 870, 875, + 878, 879, 880, 882, 1921, 885, 886, 887, 895, 902, + 908, 888, 904, 905, 896, 912, 915, 911, 917, 914, + 920, 919, 922, 925, 926, 928, 930, 932, 937, 939, + 941, 942, 944, 946, 947, 948, 1920, 962, 963, 964, + 956, 949, 969, 960, 966, 970, 971, 973, 974, 976, + 1919, 982, 975, 978, 980, 983, 986, 988, 989, 990, + 991, 1002, 1003, 1004, 1005, 1008, 1014, 1015, 1016, 1918, + 1011, 1021, 1023, 1024, 1031, 1027, 1028, 1032, 1033, 1034, - 1017, 1019, 1016, 1023, 1025, 1026, 1029, 1030, 1034, 1036, - 1035, 1037, 1038, 1040, 1748, 1747, 1041, 1039, 1044, 1052, - 1064, 1063, 1047, 1060, 1065, 1067, 1068, 1069, 1746, 1076, - 1074, 1073, 1075, 1078, 1084, 1745, 1079, 1086, 1088, 1089, - 1091, 1095, 1097, 1102, 1104, 1110, 1107, 1113, 1115, 1116, - 1744, 1122, 1118, 1125, 1099, 1127, 1129, 1121, 1128, 1130, - 1131, 1133, 1136, 1138, 1142, 1140, 1143, 1141, 1146, 1743, - 1148, 1157, 1154, 1155, 1159, 1160, 1156, 1163, 1167, 1175, - 1177, 1184, 1186, 1171, 1185, 1168, 1193, 1178, 1187, 1191, - 1194, 1742, 1195, 1741, 1740, 1739, 1202, 1200, 1203, 1207, + 1035, 1038, 1036, 1039, 1041, 1040, 1049, 1056, 1044, 1062, + 1065, 1917, 1916, 1915, 1064, 1054, 1042, 1058, 1070, 1071, + 1073, 1075, 1076, 1077, 1914, 1079, 1078, 1081, 550, 1082, + 1088, 1084, 1086, 1913, 1089, 1091, 1093, 1098, 1099, 1101, + 1108, 1109, 1102, 1105, 1111, 1112, 1116, 1118, 1120, 1121, + 1122, 1123, 1912, 1911, 1126, 1127, 1137, 1129, 1136, 1144, + 1133, 1141, 1147, 1149, 1150, 1154, 1151, 1910, 1161, 1163, + 1159, 1157, 1169, 1170, 1171, 1173, 1909, 1172, 1174, 1175, + 1176, 1179, 1182, 1183, 1197, 1184, 1185, 1193, 1201, 1198, + 1204, 1210, 1209, 1212, 1214, 1215, 1908, 1221, 1206, 1222, - 1211, 1738, 1201, 1212, 1208, 1214, 1215, 1218, 1217, 1219, - 1221, 1233, 1222, 1230, 1234, 1237, 1238, 1227, 1239, 1245, - 1241, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1737, 1264, - 1256, 1273, 1267, 1257, 1274, 1277, 1280, 1736, 1281, 1283, - 1255, 1284, 1285, 1288, 1289, 1735, 1290, 1291, 1292, 1294, - 1297, 1301, 1298, 1307, 1308, 1734, 1311, 1313, 1314, 1318, - 1319, 1315, 1320, 1324, 1328, 1322, 1330, 1331, 1333, 1335, - 1337, 1338, 1341, 1344, 1343, 1733, 1345, 1348, 1358, 1351, - 1732, 1361, 1362, 1365, 1354, 1367, 1374, 1370, 1363, 1375, - 1371, 1381, 1731, 1730, 1384, 1729, 1387, 1389, 1728, 1391, + 1219, 1225, 1231, 1227, 1220, 1228, 1229, 1230, 1232, 1234, + 1235, 1236, 1249, 1237, 1242, 1907, 1246, 1258, 1252, 1256, + 1254, 1260, 1264, 1265, 1266, 1267, 1268, 1273, 1275, 1282, + 1279, 1285, 1284, 1287, 1289, 1297, 1290, 1293, 1299, 1294, + 1296, 1302, 1303, 1906, 1305, 1905, 1306, 1904, 1903, 1902, + 1314, 1310, 1318, 1320, 1324, 1901, 1315, 1327, 1321, 1325, + 1329, 1331, 1330, 1332, 1333, 1339, 1343, 1345, 1346, 1347, + 1349, 1353, 1355, 1356, 1357, 1358, 1359, 1360, 1364, 1369, + 1366, 1367, 1361, 1381, 1382, 1900, 1383, 1384, 1386, 1390, + 1387, 1391, 1392, 1401, 1899, 1394, 1407, 1408, 1402, 1410, - 1727, 1382, 1392, 1394, 1395, 1396, 1723, 1398, 1719, 1399, - 1400, 1403, 1405, 1406, 1407, 1408, 1411, 1412, 1413, 1415, - 1420, 1718, 1423, 1424, 1426, 1427, 1430, 1428, 1436, 1442, - 1433, 1431, 1429, 1717, 1713, 1712, 1439, 1450, 1452, 1441, - 1454, 1708, 1457, 1459, 1460, 1462, 1463, 1464, 1465, 1707, - 1466, 1468, 1474, 1467, 1482, 1475, 1476, 1484, 1488, 1490, - 1706, 1478, 1491, 1495, 1492, 1497, 1498, 1700, 1502, 1500, - 1672, 1507, 1504, 1513, 1515, 1517, 1520, 1508, 1527, 1525, - 1526, 1510, 1529, 1531, 1533, 1532, 1534, 1535, 1536, 1671, - 1539, 1540, 1548, 1541, 1543, 1670, 1549, 1550, 1553, 1669, + 1412, 1404, 1411, 1414, 1417, 1419, 1898, 1420, 1421, 1424, + 1425, 1431, 1438, 1432, 1441, 1427, 1897, 1442, 1449, 1435, + 1451, 1443, 1446, 1454, 1455, 1459, 1461, 1463, 1465, 1466, + 1467, 1469, 1471, 1472, 1473, 1474, 1475, 1477, 1481, 1896, + 1482, 1487, 1489, 1498, 1895, 1483, 1894, 1497, 1499, 1503, + 1505, 1507, 1495, 1506, 1513, 1512, 1515, 1516, 1517, 1363, + 1893, 1892, 1519, 1891, 1523, 1527, 1890, 1529, 1889, 1536, + 1532, 1524, 1534, 1535, 1888, 1538, 1887, 1886, 1541, 1542, + 1543, 1550, 1545, 1547, 1551, 1552, 1554, 1558, 1559, 1553, + 1560, 1561, 1566, 1567, 1570, 1885, 1574, 1575, 1577, 1580, - 1668, 1562, 1556, 1667, 1564, 1554, 1560, 1566, 1567, 1568, - 1570, 1571, 1573, 1579, 1582, 1666, 1584, 1580, 1586, 1589, - 1593, 1590, 1594, 1598, 1603, 1600, 1604, 1606, 1611, 1615, - 1612, 1620, 1665, 1621, 1664, 1624, 1625, 1662, 1661, 1627, - 1628, 1660, 1659, 1616, 1632, 1631, 1349, 1087, 1638, 965, - 1639, 925, 1641, 831, 1629, 1645, 1648, 532, 1650, 421, - 1651, 384, 340, 251, 1634, 1654, 1642, 1595, 1655, 1658, - 201, 1796, 1686, 1692, 1698, 1704, 133, 1710, 1716, 1722, - 83, 1727, 1733 + 1581, 1582, 1584, 1590, 1587, 1586, 1588, 1884, 1883, 1882, + 1589, 1592, 1599, 1602, 1593, 1881, 1606, 1603, 1612, 1880, + 1613, 1609, 1615, 1617, 1618, 1876, 1619, 1620, 1626, 1627, + 1629, 1635, 1872, 1632, 1636, 1639, 1640, 1642, 1644, 1871, + 1638, 1645, 1651, 1646, 1652, 1654, 1870, 1657, 1658, 1866, + 1662, 1865, 1664, 1667, 1669, 1674, 1676, 1665, 1682, 1680, + 1681, 1861, 1860, 1671, 1684, 1686, 1688, 1687, 1690, 1691, + 1694, 1859, 1695, 1697, 1703, 1704, 1696, 1853, 1707, 1699, + 1398, 1825, 1824, 1711, 1709, 1823, 1717, 1719, 1720, 1721, + 1723, 1724, 1725, 1726, 1727, 1729, 1733, 1822, 1740, 1731, + + 1735, 1743, 1747, 1744, 1748, 1753, 1758, 1754, 1759, 1761, + 1763, 1766, 1768, 1770, 1821, 1774, 1818, 1777, 1778, 1817, + 1816, 1780, 1781, 1815, 1814, 1771, 1784, 1812, 1811, 1749, + 1792, 1186, 1785, 1007, 1794, 751, 1782, 1796, 1798, 645, + 1801, 600, 1802, 520, 437, 345, 1787, 1804, 1805, 1807, + 1808, 1810, 300, 1960, 1839, 1845, 1851, 1857, 220, 1863, + 1869, 1875, 144, 1880, 1886 } ; -static yyconst flex_int16_t yy_def[884] = +static yyconst flex_int16_t yy_def[966] = { 0, - 872, 1, 873, 873, 874, 874, 875, 875, 876, 876, - 872, 877, 872, 872, 872, 878, 872, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 879, 872, 872, 872, 879, - 880, 872, 872, 880, 881, 872, 872, 872, 881, 882, - 872, 872, 882, 877, 877, 872, 883, 878, 883, 878, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 879, 879, 880, 880, 881, 881, 872, 882, 882, + 954, 1, 955, 955, 956, 956, 957, 957, 958, 958, + 954, 959, 954, 954, 954, 960, 954, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 961, 954, 954, 954, 961, + 962, 954, 954, 962, 963, 954, 954, 954, 963, 964, + 954, 954, 964, 959, 959, 954, 965, 960, 965, 960, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 961, 961, 962, 962, 963, 963, 954, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, + 964, 964, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 877, 877, 877, 877, 877, 877, 877, 877, 877, - 877, 0, 872, 872, 872, 872, 872, 872, 872, 872, - 872, 872, 872 + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 959, 959, 959, 959, 959, 959, 959, + 959, 959, 959, 0, 954, 954, 954, 954, 954, 954, + 954, 954, 954, 954, 954 } ; -static yyconst flex_int16_t yy_nxt[1835] = +static yyconst flex_int16_t yy_nxt[1999] = { 0, 12, 13, 14, 14, 15, 16, 17, 12, 12, 12, 12, 12, 18, 19, 12, 20, 21, 12, 22, 12, @@ -720,205 +747,223 @@ static yyconst flex_int16_t yy_nxt[1835] = 32, 33, 34, 35, 12, 12, 12, 12, 37, 38, 39, 37, 38, 39, 55, 42, 38, 61, 40, 43, 56, 40, 42, 38, 57, 44, 43, 51, 51, 52, - 92, 92, 44, 46, 47, 47, 48, 53, 38, 51, - 51, 52, 55, 68, 49, 46, 47, 47, 48, 53, - 38, 69, 59, 96, 59, 59, 49, 59, 55, 54, - 55, 54, 54, 60, 54, 55, 62, 64, 55, 65, + 94, 94, 44, 46, 47, 47, 48, 53, 38, 51, + 51, 52, 55, 69, 49, 46, 47, 47, 48, 53, + 38, 70, 59, 55, 59, 59, 49, 59, 55, 54, + 55, 54, 54, 60, 54, 55, 62, 65, 55, 66, - 55, 55, 66, 63, 67, 70, 55, 55, 55, 76, - 55, 72, 73, 77, 71, 55, 55, 55, 55, 80, - 79, 74, 85, 94, 81, 75, 94, 82, 78, 83, - 55, 87, 84, 54, 89, 103, 86, 55, 90, 99, - 99, 96, 91, 96, 96, 56, 96, 88, 54, 57, - 54, 54, 59, 54, 59, 59, 55, 59, 55, 101, - 55, 102, 55, 60, 106, 55, 55, 55, 55, 55, - 109, 55, 55, 110, 55, 111, 55, 104, 112, 55, - 117, 118, 107, 105, 108, 55, 55, 55, 115, 55, - 55, 113, 116, 55, 120, 114, 124, 123, 119, 55, + 105, 55, 67, 63, 68, 71, 55, 55, 55, 64, + 55, 73, 74, 55, 72, 55, 77, 55, 87, 81, + 78, 75, 84, 55, 82, 76, 55, 83, 80, 55, + 89, 85, 88, 96, 86, 79, 96, 55, 92, 101, + 101, 91, 93, 107, 98, 98, 90, 98, 98, 54, + 98, 54, 54, 56, 54, 55, 59, 57, 59, 59, + 55, 59, 55, 103, 55, 104, 109, 60, 106, 55, + 55, 55, 55, 55, 55, 55, 112, 114, 113, 55, + 115, 55, 55, 120, 118, 108, 110, 111, 119, 121, + 55, 55, 55, 116, 55, 55, 55, 55, 123, 117, - 55, 121, 55, 55, 55, 55, 129, 55, 125, 122, - 55, 55, 55, 55, 126, 133, 92, 92, 99, 99, - 127, 128, 134, 132, 131, 130, 55, 94, 55, 135, - 94, 96, 55, 96, 96, 55, 96, 136, 55, 55, - 138, 140, 147, 137, 139, 55, 55, 55, 55, 55, - 146, 141, 55, 148, 55, 156, 142, 55, 149, 154, - 143, 55, 153, 55, 55, 150, 144, 145, 151, 152, - 55, 155, 158, 55, 160, 161, 55, 55, 159, 55, - 55, 157, 55, 162, 55, 55, 55, 55, 163, 55, - 55, 55, 167, 170, 55, 55, 55, 173, 176, 175, + 126, 55, 122, 55, 124, 55, 128, 55, 55, 133, + 55, 55, 127, 125, 55, 129, 55, 55, 132, 130, + 54, 137, 55, 94, 94, 131, 96, 135, 134, 96, + 55, 136, 55, 138, 139, 98, 151, 98, 98, 55, + 98, 101, 101, 55, 140, 55, 142, 145, 55, 143, + 144, 141, 55, 55, 55, 55, 55, 146, 152, 55, + 153, 154, 147, 55, 159, 55, 148, 155, 158, 55, + 156, 161, 149, 150, 55, 160, 157, 55, 163, 55, + 165, 166, 55, 55, 164, 55, 55, 55, 55, 167, + 55, 55, 55, 168, 55, 55, 55, 162, 55, 55, - 55, 171, 55, 164, 55, 166, 165, 55, 55, 169, - 168, 55, 179, 172, 177, 55, 182, 55, 178, 174, - 181, 55, 180, 55, 183, 55, 184, 55, 186, 55, - 188, 187, 55, 190, 55, 185, 55, 189, 55, 55, - 55, 194, 55, 55, 55, 55, 196, 55, 202, 55, - 55, 193, 55, 191, 198, 197, 192, 55, 199, 195, - 55, 55, 200, 201, 203, 55, 204, 208, 55, 205, - 210, 206, 55, 209, 207, 55, 55, 55, 55, 214, - 55, 55, 212, 55, 55, 215, 217, 213, 55, 55, - 55, 55, 55, 228, 55, 211, 55, 226, 55, 55, + 173, 55, 55, 176, 55, 171, 182, 169, 55, 177, + 178, 170, 55, 172, 179, 181, 184, 174, 175, 55, + 55, 55, 183, 55, 55, 187, 185, 188, 55, 189, + 55, 190, 55, 55, 55, 55, 180, 186, 193, 55, + 55, 195, 55, 194, 55, 197, 55, 191, 192, 196, + 55, 55, 198, 55, 201, 55, 55, 55, 200, 203, + 55, 55, 199, 209, 55, 55, 204, 55, 202, 205, + 210, 55, 206, 207, 208, 55, 55, 215, 55, 55, + 216, 211, 55, 218, 212, 214, 55, 55, 55, 213, + 55, 222, 220, 55, 55, 55, 55, 55, 223, 221, - 216, 218, 219, 55, 225, 220, 221, 55, 55, 227, - 55, 229, 231, 230, 55, 232, 222, 223, 224, 233, - 234, 55, 55, 236, 55, 55, 235, 55, 55, 237, - 55, 55, 243, 55, 240, 245, 242, 239, 238, 244, - 55, 55, 55, 247, 248, 55, 241, 246, 55, 55, - 55, 251, 55, 250, 55, 252, 249, 55, 253, 55, - 255, 55, 55, 55, 260, 55, 55, 55, 256, 55, - 254, 259, 257, 55, 269, 55, 263, 55, 55, 271, - 267, 258, 261, 264, 262, 55, 266, 55, 55, 55, - 268, 55, 55, 55, 55, 281, 55, 276, 273, 279, + 225, 217, 55, 55, 55, 219, 55, 236, 227, 55, + 55, 234, 55, 224, 55, 226, 55, 233, 228, 229, + 55, 55, 235, 238, 282, 237, 55, 55, 55, 230, + 231, 232, 241, 239, 240, 242, 243, 55, 55, 244, + 55, 245, 55, 246, 55, 254, 55, 55, 252, 55, + 55, 249, 55, 248, 247, 251, 253, 257, 255, 55, + 256, 55, 55, 250, 55, 55, 55, 261, 55, 259, + 55, 262, 258, 55, 55, 55, 55, 55, 55, 55, + 55, 264, 268, 265, 270, 260, 266, 269, 263, 55, + 55, 273, 55, 55, 277, 267, 272, 271, 274, 55, - 265, 270, 272, 55, 55, 55, 55, 274, 278, 283, - 55, 277, 275, 285, 55, 280, 286, 55, 287, 282, - 288, 55, 284, 55, 289, 55, 55, 291, 55, 55, - 290, 55, 55, 292, 55, 55, 293, 55, 55, 295, - 301, 297, 55, 300, 55, 55, 298, 294, 296, 299, - 55, 55, 305, 55, 302, 55, 304, 55, 307, 306, - 55, 55, 310, 308, 55, 55, 309, 55, 55, 55, - 312, 315, 313, 316, 55, 303, 55, 311, 314, 55, - 55, 321, 55, 318, 55, 322, 55, 55, 55, 55, - 55, 323, 55, 55, 319, 317, 320, 55, 328, 327, + 55, 279, 55, 281, 278, 55, 55, 55, 55, 55, + 55, 276, 55, 286, 289, 275, 283, 280, 55, 55, + 291, 55, 290, 55, 284, 55, 288, 287, 285, 292, + 55, 55, 55, 294, 296, 55, 298, 293, 297, 55, + 55, 55, 321, 295, 299, 55, 300, 55, 55, 302, + 55, 55, 301, 55, 55, 303, 55, 55, 304, 305, + 308, 306, 55, 307, 586, 309, 55, 311, 310, 55, + 55, 55, 312, 316, 313, 55, 315, 55, 55, 55, + 318, 317, 319, 55, 55, 55, 55, 325, 320, 55, + 323, 324, 55, 55, 55, 314, 327, 322, 326, 328, - 55, 55, 326, 324, 55, 329, 330, 325, 55, 55, - 55, 335, 334, 332, 331, 55, 55, 55, 55, 55, - 340, 333, 55, 55, 337, 55, 55, 346, 349, 55, - 55, 338, 336, 350, 339, 55, 347, 55, 351, 341, - 55, 353, 342, 55, 352, 55, 343, 348, 354, 55, - 356, 355, 344, 345, 55, 358, 55, 55, 55, 55, - 359, 55, 55, 55, 360, 55, 55, 361, 357, 362, - 364, 366, 55, 365, 55, 367, 368, 55, 369, 363, - 55, 55, 55, 370, 55, 371, 55, 55, 55, 376, - 55, 55, 374, 55, 55, 379, 55, 373, 55, 381, + 55, 55, 55, 329, 55, 331, 334, 55, 335, 55, + 55, 55, 55, 330, 332, 55, 333, 55, 55, 336, + 55, 55, 55, 55, 337, 340, 341, 342, 338, 339, + 55, 55, 345, 55, 55, 343, 347, 344, 55, 348, + 349, 55, 55, 55, 346, 55, 55, 354, 55, 351, + 55, 350, 55, 360, 363, 55, 352, 55, 55, 353, + 55, 55, 365, 361, 355, 364, 55, 356, 55, 367, + 55, 357, 55, 368, 362, 55, 55, 358, 359, 373, + 366, 55, 370, 369, 372, 55, 371, 55, 55, 55, + 55, 55, 55, 374, 55, 382, 375, 376, 379, 378, - 372, 375, 378, 55, 55, 377, 382, 55, 384, 386, - 55, 55, 55, 380, 55, 55, 55, 55, 55, 55, - 393, 383, 55, 55, 398, 387, 385, 394, 55, 390, - 391, 396, 55, 397, 55, 388, 392, 399, 389, 55, - 55, 401, 400, 404, 395, 403, 55, 55, 55, 55, - 405, 55, 55, 55, 55, 55, 408, 402, 406, 409, - 55, 407, 55, 55, 55, 413, 411, 414, 415, 412, - 55, 410, 418, 416, 55, 417, 55, 55, 55, 419, - 55, 55, 420, 422, 423, 55, 55, 55, 55, 421, - 430, 426, 427, 424, 55, 55, 55, 428, 429, 432, + 380, 55, 55, 381, 55, 384, 55, 377, 55, 385, + 55, 55, 55, 55, 55, 383, 386, 388, 55, 387, + 391, 393, 55, 55, 55, 390, 55, 55, 55, 389, + 55, 392, 396, 399, 395, 55, 398, 55, 55, 55, + 394, 403, 55, 55, 397, 400, 55, 55, 55, 401, + 55, 415, 55, 404, 55, 55, 420, 402, 416, 55, + 412, 413, 55, 55, 421, 418, 405, 55, 55, 55, + 406, 411, 407, 419, 414, 417, 408, 409, 55, 425, + 55, 423, 410, 426, 55, 55, 422, 424, 55, 55, + 55, 55, 427, 55, 55, 430, 431, 429, 55, 55, - 55, 55, 55, 435, 425, 55, 55, 55, 55, 440, - 431, 55, 441, 55, 55, 434, 55, 437, 55, 433, - 55, 55, 436, 55, 439, 444, 55, 443, 55, 55, - 438, 55, 445, 442, 55, 446, 55, 447, 55, 55, - 451, 55, 55, 55, 448, 55, 55, 462, 450, 449, - 452, 454, 455, 456, 55, 55, 461, 453, 459, 458, - 457, 55, 460, 55, 55, 55, 466, 467, 464, 463, - 55, 55, 55, 55, 55, 468, 55, 469, 55, 55, - 474, 55, 465, 470, 55, 55, 55, 471, 55, 472, - 485, 473, 475, 477, 479, 55, 483, 476, 55, 478, + 55, 55, 428, 435, 55, 436, 437, 433, 55, 55, + 439, 440, 432, 434, 55, 441, 55, 438, 442, 55, + 55, 55, 55, 444, 445, 446, 55, 447, 55, 448, + 55, 55, 55, 443, 55, 55, 451, 452, 453, 55, + 55, 455, 457, 55, 454, 449, 55, 55, 460, 450, + 55, 55, 55, 456, 55, 55, 465, 55, 458, 55, + 459, 55, 466, 462, 55, 55, 55, 461, 464, 55, + 469, 55, 467, 471, 55, 463, 55, 468, 55, 55, + 470, 55, 55, 474, 55, 473, 472, 55, 475, 478, + 55, 55, 55, 476, 55, 477, 481, 55, 55, 55, - 480, 55, 481, 55, 55, 482, 55, 487, 55, 484, - 488, 489, 55, 486, 55, 55, 55, 490, 492, 55, - 55, 55, 495, 497, 55, 55, 496, 55, 55, 499, - 55, 55, 491, 55, 55, 55, 55, 55, 503, 493, - 494, 498, 504, 501, 55, 55, 500, 55, 55, 502, - 505, 506, 55, 507, 511, 512, 509, 510, 55, 55, - 55, 508, 55, 513, 515, 55, 514, 516, 55, 55, - 55, 518, 55, 55, 55, 517, 55, 55, 524, 55, - 55, 55, 55, 526, 55, 55, 529, 55, 519, 527, - 520, 521, 522, 523, 55, 525, 528, 531, 55, 530, + 55, 492, 479, 484, 480, 482, 486, 55, 55, 489, + 485, 483, 488, 490, 55, 491, 55, 55, 487, 496, + 55, 493, 497, 55, 55, 495, 55, 55, 498, 55, + 494, 55, 55, 499, 55, 500, 504, 55, 55, 501, + 55, 502, 55, 503, 55, 505, 508, 506, 512, 55, + 513, 55, 514, 55, 55, 507, 55, 509, 55, 55, + 55, 55, 511, 517, 516, 518, 510, 519, 55, 520, + 521, 522, 55, 515, 55, 55, 55, 523, 55, 524, + 525, 55, 55, 55, 529, 55, 55, 55, 55, 533, + 55, 526, 55, 534, 55, 55, 537, 527, 55, 528, - 55, 532, 55, 534, 55, 536, 55, 55, 55, 538, - 55, 55, 55, 55, 533, 540, 55, 55, 535, 55, - 539, 55, 55, 544, 545, 55, 537, 551, 55, 55, - 541, 55, 543, 542, 549, 55, 550, 55, 55, 547, - 552, 55, 55, 558, 548, 546, 55, 55, 55, 55, - 55, 55, 55, 55, 553, 556, 55, 554, 557, 55, - 555, 562, 564, 563, 55, 566, 559, 567, 560, 565, - 561, 569, 55, 568, 570, 55, 55, 55, 571, 55, - 55, 55, 576, 577, 572, 55, 55, 55, 55, 578, - 55, 55, 574, 580, 573, 579, 55, 575, 55, 55, + 55, 55, 55, 55, 530, 532, 541, 536, 543, 542, + 531, 539, 535, 538, 55, 55, 55, 55, 540, 55, + 55, 549, 550, 55, 545, 548, 55, 55, 55, 551, + 546, 544, 553, 55, 554, 55, 55, 547, 556, 55, + 55, 552, 555, 55, 55, 55, 55, 55, 55, 564, + 55, 55, 55, 55, 55, 565, 55, 557, 558, 561, + 568, 55, 559, 560, 563, 566, 55, 562, 55, 571, + 55, 567, 572, 569, 55, 570, 55, 55, 575, 573, + 574, 577, 55, 55, 576, 55, 579, 55, 55, 55, + 55, 55, 581, 55, 55, 588, 55, 580, 55, 587, - 55, 55, 585, 55, 581, 586, 587, 55, 582, 55, - 584, 55, 588, 583, 55, 592, 55, 593, 594, 55, - 590, 589, 55, 591, 595, 55, 596, 55, 55, 598, - 55, 597, 600, 55, 55, 601, 603, 55, 602, 55, - 55, 55, 55, 55, 604, 55, 605, 599, 55, 611, - 55, 606, 55, 55, 55, 55, 615, 612, 55, 607, - 55, 608, 609, 613, 619, 618, 55, 55, 55, 55, - 610, 55, 55, 617, 621, 55, 622, 614, 616, 55, - 55, 623, 627, 55, 628, 620, 624, 55, 629, 55, - 55, 630, 626, 631, 632, 625, 55, 55, 55, 55, + 55, 55, 578, 55, 590, 55, 591, 582, 583, 584, + 55, 55, 585, 55, 55, 589, 595, 55, 596, 597, + 55, 55, 593, 55, 55, 604, 598, 592, 55, 594, + 55, 599, 55, 55, 55, 55, 600, 602, 55, 55, + 603, 55, 601, 615, 608, 55, 609, 610, 55, 55, + 614, 605, 606, 55, 607, 616, 55, 611, 612, 55, + 613, 55, 55, 55, 617, 618, 55, 622, 624, 55, + 625, 55, 627, 55, 620, 55, 619, 626, 628, 621, + 623, 55, 55, 55, 55, 55, 55, 55, 55, 629, + 634, 55, 635, 636, 55, 55, 55, 55, 55, 630, - 635, 633, 638, 55, 634, 55, 55, 55, 640, 642, - 637, 636, 55, 55, 55, 55, 644, 639, 641, 55, - 55, 645, 646, 55, 55, 648, 55, 55, 643, 55, - 55, 55, 647, 55, 55, 655, 654, 650, 651, 55, - 649, 652, 55, 653, 656, 55, 55, 658, 659, 55, - 55, 55, 664, 55, 660, 661, 662, 55, 665, 657, - 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, - 663, 668, 673, 669, 667, 670, 55, 675, 666, 55, - 672, 684, 674, 671, 676, 55, 55, 678, 677, 55, - 679, 681, 55, 55, 680, 55, 55, 55, 682, 683, + 637, 631, 632, 633, 640, 55, 639, 641, 638, 55, + 55, 643, 644, 55, 642, 646, 55, 647, 55, 645, + 648, 55, 55, 649, 55, 650, 55, 55, 652, 654, + 651, 55, 55, 55, 55, 653, 656, 55, 657, 55, + 55, 55, 55, 55, 55, 665, 55, 55, 55, 55, + 658, 661, 659, 666, 55, 655, 667, 660, 55, 662, + 663, 55, 669, 672, 55, 673, 55, 664, 55, 671, + 55, 676, 55, 668, 670, 675, 55, 55, 55, 55, + 55, 677, 684, 674, 680, 55, 687, 55, 681, 685, + 678, 55, 688, 686, 55, 679, 55, 55, 683, 55, - 55, 55, 55, 55, 55, 689, 55, 692, 693, 55, - 55, 687, 694, 55, 685, 690, 691, 686, 696, 55, - 55, 688, 695, 55, 699, 55, 55, 55, 698, 701, - 55, 55, 55, 703, 55, 704, 55, 705, 697, 707, - 55, 709, 55, 55, 700, 55, 711, 55, 702, 55, - 55, 706, 708, 55, 713, 55, 55, 55, 721, 717, - 55, 55, 715, 55, 714, 716, 55, 712, 710, 719, - 55, 720, 722, 55, 55, 55, 718, 55, 723, 55, - 724, 727, 55, 55, 726, 725, 55, 55, 728, 737, - 729, 731, 730, 55, 55, 732, 55, 733, 734, 55, + 682, 55, 55, 690, 692, 55, 55, 689, 55, 55, + 695, 55, 696, 697, 55, 55, 694, 55, 55, 701, + 698, 703, 55, 693, 699, 691, 55, 55, 700, 702, + 55, 705, 55, 55, 706, 707, 55, 55, 704, 55, + 709, 55, 55, 55, 55, 55, 708, 716, 711, 715, + 717, 55, 712, 710, 713, 55, 714, 55, 55, 55, + 720, 55, 719, 725, 721, 55, 722, 55, 55, 55, + 55, 55, 55, 55, 726, 55, 55, 806, 55, 55, + 718, 55, 723, 729, 728, 730, 724, 731, 727, 733, + 732, 734, 735, 55, 55, 55, 55, 740, 55, 55, - 735, 55, 736, 55, 55, 738, 55, 55, 55, 742, - 55, 55, 55, 741, 744, 55, 743, 55, 55, 55, - 55, 739, 750, 55, 55, 55, 745, 55, 740, 747, - 748, 749, 55, 751, 746, 55, 55, 756, 55, 55, - 55, 55, 55, 55, 754, 55, 753, 761, 55, 762, - 752, 55, 755, 55, 55, 757, 758, 759, 760, 763, - 765, 764, 55, 768, 55, 767, 55, 769, 771, 55, - 766, 55, 55, 773, 55, 55, 55, 55, 55, 55, - 55, 776, 777, 770, 775, 779, 55, 55, 55, 772, - 55, 780, 778, 781, 55, 774, 55, 784, 783, 782, + 737, 738, 55, 55, 55, 739, 55, 743, 736, 744, + 55, 741, 745, 55, 55, 746, 55, 742, 747, 55, + 55, 748, 55, 55, 55, 749, 55, 750, 751, 55, + 752, 55, 55, 55, 903, 757, 55, 55, 760, 55, + 755, 753, 761, 55, 55, 758, 754, 55, 759, 762, + 55, 756, 764, 55, 55, 55, 763, 765, 55, 766, + 767, 55, 769, 55, 771, 768, 55, 55, 773, 772, + 775, 55, 770, 55, 777, 55, 778, 55, 55, 55, + 780, 55, 774, 55, 55, 55, 55, 55, 782, 55, + 784, 776, 781, 55, 55, 55, 786, 788, 787, 55, - 55, 786, 55, 55, 55, 785, 790, 55, 788, 55, - 55, 787, 55, 791, 55, 793, 55, 792, 796, 55, - 55, 789, 55, 794, 795, 55, 798, 55, 800, 55, - 799, 801, 55, 802, 803, 797, 804, 55, 55, 55, - 806, 55, 805, 55, 55, 55, 55, 55, 55, 807, - 809, 55, 55, 55, 814, 55, 812, 817, 808, 816, - 55, 55, 55, 810, 818, 55, 55, 813, 55, 815, - 819, 811, 55, 820, 55, 822, 55, 823, 55, 55, - 55, 824, 55, 55, 825, 55, 826, 830, 829, 821, - 833, 55, 55, 827, 55, 835, 55, 828, 55, 834, + 785, 55, 791, 779, 783, 792, 793, 55, 790, 55, + 55, 55, 794, 789, 796, 55, 795, 55, 55, 55, + 801, 797, 798, 800, 55, 55, 799, 55, 55, 55, + 802, 55, 807, 804, 808, 55, 55, 805, 809, 55, + 810, 55, 803, 811, 55, 812, 55, 55, 55, 816, + 55, 813, 815, 55, 55, 55, 818, 55, 817, 55, + 819, 820, 55, 55, 55, 55, 55, 814, 821, 826, + 55, 55, 55, 55, 823, 824, 822, 825, 55, 55, + 827, 833, 55, 831, 832, 830, 55, 55, 835, 55, + 828, 829, 55, 55, 55, 840, 55, 841, 55, 55, - 838, 55, 55, 832, 839, 55, 55, 55, 831, 842, - 55, 836, 55, 840, 843, 55, 55, 846, 55, 837, - 869, 845, 847, 55, 55, 841, 848, 55, 55, 849, - 844, 850, 55, 55, 851, 852, 55, 55, 854, 55, - 55, 55, 853, 55, 55, 855, 55, 856, 857, 858, - 55, 55, 860, 55, 55, 859, 862, 55, 861, 863, - 55, 864, 55, 55, 865, 866, 55, 55, 868, 871, - 55, 55, 55, 55, 55, 867, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 870, 36, 36, 36, 36, - 36, 36, 41, 41, 41, 41, 41, 41, 45, 45, + 55, 55, 55, 834, 55, 55, 836, 846, 838, 837, + 847, 55, 839, 842, 55, 55, 843, 850, 55, 844, + 845, 55, 849, 852, 55, 55, 853, 55, 848, 55, + 55, 55, 55, 851, 856, 857, 855, 859, 55, 55, + 862, 55, 854, 860, 55, 858, 863, 55, 55, 864, + 55, 55, 55, 861, 55, 868, 55, 55, 55, 865, + 866, 867, 872, 55, 55, 869, 55, 873, 870, 55, + 55, 875, 874, 878, 55, 871, 55, 55, 876, 55, + 880, 55, 877, 55, 881, 882, 55, 883, 55, 885, + 884, 886, 55, 55, 55, 879, 55, 887, 55, 55, + + 55, 888, 55, 55, 889, 891, 55, 55, 55, 55, + 896, 55, 894, 890, 898, 55, 55, 900, 892, 55, + 899, 55, 902, 55, 904, 895, 897, 893, 901, 55, + 905, 55, 55, 55, 906, 55, 55, 55, 55, 55, + 915, 55, 912, 55, 911, 55, 908, 55, 909, 907, + 916, 917, 55, 910, 920, 55, 55, 914, 921, 55, + 55, 55, 918, 913, 924, 55, 55, 922, 919, 925, + 55, 55, 928, 55, 929, 55, 927, 930, 55, 923, + 55, 932, 55, 55, 926, 931, 55, 933, 934, 55, + 55, 936, 55, 55, 55, 935, 55, 55, 937, 55, + + 939, 941, 938, 940, 55, 942, 55, 944, 55, 945, + 55, 943, 946, 55, 55, 947, 55, 55, 948, 55, + 55, 953, 55, 55, 55, 949, 55, 55, 55, 55, + 55, 950, 951, 55, 55, 55, 55, 55, 952, 36, + 36, 36, 36, 36, 36, 41, 41, 41, 41, 41, + 41, 45, 45, 45, 45, 45, 45, 50, 50, 50, + 50, 50, 50, 58, 58, 55, 58, 58, 58, 94, + 94, 55, 55, 55, 94, 96, 96, 55, 55, 96, + 101, 101, 55, 55, 55, 101, 59, 59, 55, 59, + 59, 59, 55, 55, 55, 55, 55, 55, 55, 55, - 45, 45, 45, 45, 50, 50, 50, 50, 50, 50, - 58, 58, 55, 58, 58, 58, 92, 92, 55, 55, - 55, 92, 94, 94, 55, 55, 94, 99, 99, 55, - 55, 55, 99, 59, 59, 55, 59, 59, 59, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 100, 98, 97, 95, 93, 55, 100, 98, - 97, 95, 93, 55, 872, 11, 872, 872, 872, 872, + 55, 55, 55, 55, 55, 55, 102, 100, 99, 97, + 95, 55, 102, 100, 99, 97, 95, 55, 954, 11, + 954, 954, 954, 954, 954, 954, 954, 954, 954, 954, + 954, 954, 954, 954, 954, 954, 954, 954, 954, 954, + 954, 954, 954, 954, 954, 954, 954, 954, 954, 954, + 954, 954, 954, 954, 954, 954, 954, 954 - 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, - 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, - 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, - 872, 872, 872, 872 } ; -static yyconst flex_int16_t yy_chk[1835] = +static yyconst flex_int16_t yy_chk[1999] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -928,200 +973,218 @@ static yyconst flex_int16_t yy_chk[1835] = 13, 4, 6, 6, 13, 5, 6, 9, 9, 9, 40, 40, 6, 7, 7, 7, 7, 9, 7, 10, 10, 10, 23, 23, 7, 8, 8, 8, 8, 10, - 8, 23, 16, 881, 16, 16, 8, 16, 21, 18, + 8, 23, 16, 63, 16, 16, 8, 16, 21, 18, 22, 18, 18, 16, 18, 20, 20, 21, 26, 21, - 29, 24, 21, 20, 22, 24, 25, 27, 28, 28, - 30, 25, 26, 28, 24, 31, 34, 32, 63, 30, - 29, 27, 32, 44, 30, 27, 44, 30, 28, 31, - 33, 33, 31, 877, 34, 63, 32, 35, 35, 53, - 53, 49, 35, 49, 49, 56, 49, 33, 55, 56, - 55, 55, 58, 55, 58, 58, 61, 58, 62, 61, - 64, 62, 65, 58, 66, 67, 69, 68, 70, 66, - 69, 72, 71, 70, 75, 71, 74, 64, 71, 81, - 74, 75, 67, 65, 68, 73, 76, 77, 73, 78, - 79, 71, 73, 80, 77, 72, 81, 80, 76, 82, + 63, 24, 21, 20, 22, 24, 25, 27, 29, 20, + 30, 25, 26, 32, 24, 28, 28, 31, 32, 30, + 28, 27, 31, 34, 30, 27, 65, 30, 29, 33, + 33, 31, 32, 44, 31, 28, 44, 35, 35, 53, + 53, 34, 35, 65, 963, 49, 33, 49, 49, 55, + 49, 55, 55, 56, 55, 64, 58, 56, 58, 58, + 61, 58, 62, 61, 66, 62, 67, 58, 64, 68, + 69, 67, 70, 71, 72, 73, 70, 72, 71, 75, + 72, 74, 76, 75, 74, 66, 68, 69, 74, 76, + 77, 78, 79, 72, 80, 82, 81, 83, 78, 73, - 83, 78, 84, 88, 85, 86, 86, 87, 82, 79, - 89, 90, 91, 871, 83, 89, 93, 93, 100, 100, - 84, 85, 90, 88, 87, 86, 103, 95, 107, 91, - 95, 97, 101, 97, 97, 102, 97, 101, 108, 104, - 103, 105, 108, 102, 104, 110, 105, 106, 109, 116, - 107, 106, 112, 109, 111, 116, 106, 113, 110, 114, - 106, 117, 113, 864, 114, 111, 106, 106, 111, 112, - 115, 115, 118, 119, 120, 121, 122, 118, 119, 120, - 121, 117, 123, 122, 124, 125, 126, 127, 123, 128, - 129, 130, 127, 130, 131, 132, 135, 133, 135, 134, + 81, 87, 77, 84, 79, 85, 83, 86, 88, 88, + 89, 90, 82, 80, 110, 84, 91, 93, 87, 85, + 959, 91, 92, 95, 95, 86, 97, 89, 88, 97, + 106, 90, 105, 92, 93, 99, 110, 99, 99, 103, + 99, 102, 102, 104, 103, 107, 105, 108, 113, 106, + 107, 104, 108, 109, 111, 112, 114, 109, 111, 115, + 112, 113, 109, 116, 117, 119, 109, 114, 116, 117, + 114, 119, 109, 109, 118, 118, 115, 120, 121, 122, + 123, 124, 125, 121, 122, 123, 124, 126, 127, 125, + 128, 129, 136, 126, 130, 131, 132, 120, 140, 133, - 136, 131, 133, 124, 134, 126, 125, 137, 138, 129, - 128, 142, 137, 132, 135, 140, 140, 139, 136, 133, - 139, 143, 138, 141, 141, 144, 142, 145, 144, 146, - 146, 145, 147, 148, 149, 143, 150, 147, 148, 151, - 152, 152, 153, 154, 155, 156, 154, 157, 159, 159, - 161, 151, 863, 149, 156, 155, 150, 162, 157, 153, - 158, 160, 158, 158, 160, 163, 161, 164, 164, 161, - 166, 162, 165, 165, 163, 166, 167, 168, 169, 170, - 171, 172, 168, 173, 170, 171, 173, 169, 177, 174, - 176, 178, 180, 179, 181, 167, 862, 177, 179, 182, + 131, 134, 135, 134, 139, 129, 139, 127, 143, 135, + 136, 128, 953, 130, 137, 138, 140, 132, 133, 137, + 138, 141, 139, 142, 144, 143, 141, 144, 145, 145, + 146, 146, 147, 154, 148, 149, 137, 142, 149, 150, + 151, 151, 155, 150, 152, 153, 156, 147, 148, 152, + 153, 158, 154, 157, 157, 160, 159, 946, 156, 159, + 161, 162, 155, 164, 164, 166, 160, 165, 158, 161, + 165, 163, 162, 163, 163, 167, 168, 169, 169, 170, + 170, 166, 171, 172, 166, 168, 173, 174, 172, 167, + 175, 176, 174, 177, 178, 180, 176, 179, 177, 175, - 172, 173, 174, 175, 176, 175, 175, 185, 186, 178, - 183, 180, 182, 181, 187, 183, 175, 175, 175, 184, - 184, 188, 184, 186, 189, 190, 185, 191, 192, 187, - 193, 200, 192, 860, 190, 194, 191, 189, 188, 193, - 194, 195, 196, 196, 197, 198, 190, 195, 199, 197, - 204, 200, 205, 199, 201, 201, 198, 203, 203, 206, - 205, 207, 209, 210, 211, 212, 213, 215, 206, 211, - 204, 210, 207, 217, 217, 214, 214, 218, 219, 219, - 216, 209, 212, 214, 213, 216, 215, 221, 220, 222, - 216, 223, 224, 225, 226, 229, 229, 224, 221, 227, + 179, 171, 183, 182, 184, 173, 186, 185, 180, 187, + 228, 183, 185, 178, 188, 179, 181, 182, 181, 181, + 192, 189, 184, 187, 228, 186, 193, 190, 194, 181, + 181, 181, 190, 188, 189, 191, 191, 195, 191, 192, + 196, 193, 197, 194, 199, 201, 198, 200, 199, 945, + 201, 197, 202, 196, 195, 198, 200, 204, 202, 203, + 203, 205, 204, 197, 206, 207, 208, 208, 211, 206, + 210, 210, 205, 212, 213, 214, 216, 217, 221, 218, + 220, 212, 217, 213, 219, 207, 214, 218, 211, 219, + 222, 222, 223, 226, 224, 216, 221, 220, 222, 224, - 214, 218, 220, 228, 227, 230, 231, 222, 226, 231, - 232, 225, 223, 233, 233, 228, 234, 234, 235, 230, - 236, 236, 232, 235, 237, 237, 238, 239, 242, 240, - 238, 241, 239, 240, 243, 244, 241, 247, 245, 243, - 247, 245, 246, 246, 858, 255, 245, 242, 244, 245, - 248, 249, 250, 251, 248, 252, 249, 250, 252, 251, - 253, 254, 255, 253, 256, 257, 254, 258, 260, 259, - 257, 260, 258, 261, 261, 248, 262, 256, 259, 263, - 264, 266, 265, 263, 267, 267, 266, 268, 269, 270, - 271, 268, 272, 273, 264, 262, 265, 276, 273, 272, + 225, 225, 227, 227, 224, 229, 230, 231, 232, 233, + 236, 223, 234, 232, 235, 222, 229, 226, 238, 235, + 237, 237, 236, 239, 230, 264, 234, 233, 231, 238, + 240, 241, 944, 240, 242, 242, 244, 239, 243, 243, + 251, 244, 264, 241, 245, 245, 246, 246, 247, 248, + 253, 249, 247, 250, 248, 249, 252, 254, 250, 251, + 254, 252, 529, 253, 529, 254, 255, 255, 254, 256, + 257, 258, 256, 259, 257, 260, 258, 261, 259, 262, + 261, 260, 262, 263, 265, 266, 267, 268, 263, 269, + 266, 267, 268, 270, 272, 257, 270, 265, 269, 271, - 274, 275, 271, 269, 277, 274, 275, 270, 278, 279, - 280, 280, 279, 277, 276, 282, 283, 284, 287, 293, - 290, 278, 292, 294, 283, 290, 296, 292, 295, 295, - 298, 284, 282, 296, 287, 291, 293, 297, 297, 291, - 299, 299, 291, 301, 298, 300, 291, 294, 300, 302, - 302, 301, 291, 291, 303, 304, 304, 305, 306, 307, - 305, 308, 309, 314, 306, 310, 311, 307, 303, 308, - 310, 312, 312, 311, 317, 313, 314, 315, 315, 309, - 313, 318, 319, 317, 320, 318, 321, 324, 322, 323, - 326, 325, 321, 327, 323, 326, 331, 320, 328, 328, + 274, 273, 275, 271, 271, 273, 276, 277, 277, 279, + 280, 276, 942, 272, 274, 278, 275, 281, 282, 278, + 286, 283, 284, 287, 279, 282, 283, 284, 280, 281, + 285, 288, 287, 289, 293, 285, 289, 286, 290, 290, + 292, 294, 295, 298, 288, 292, 304, 301, 303, 294, + 305, 293, 301, 303, 306, 306, 295, 940, 307, 298, + 302, 308, 308, 304, 302, 307, 309, 302, 310, 310, + 311, 302, 314, 311, 305, 312, 316, 302, 302, 316, + 309, 313, 313, 312, 315, 315, 314, 317, 318, 319, + 320, 322, 325, 317, 321, 325, 318, 319, 322, 321, - 319, 322, 325, 329, 330, 324, 329, 332, 331, 333, - 333, 334, 335, 327, 336, 337, 339, 338, 341, 340, - 340, 330, 342, 343, 343, 334, 332, 340, 346, 337, - 338, 341, 344, 342, 345, 335, 339, 344, 336, 347, - 352, 346, 345, 350, 340, 348, 348, 351, 350, 353, - 351, 354, 356, 357, 355, 359, 354, 347, 352, 355, - 360, 353, 361, 362, 363, 360, 357, 361, 362, 359, - 368, 356, 365, 363, 364, 364, 371, 365, 367, 367, - 369, 370, 367, 369, 370, 372, 373, 374, 376, 368, - 377, 373, 374, 371, 375, 377, 378, 375, 376, 379, + 323, 323, 326, 324, 327, 327, 328, 320, 324, 328, + 330, 332, 333, 331, 334, 326, 328, 331, 335, 330, + 334, 336, 337, 338, 340, 333, 336, 339, 343, 332, + 342, 335, 339, 342, 338, 341, 341, 344, 345, 347, + 337, 346, 346, 348, 340, 343, 351, 350, 352, 344, + 354, 354, 355, 347, 353, 357, 357, 345, 354, 358, + 351, 352, 356, 936, 358, 355, 348, 349, 360, 361, + 349, 350, 349, 356, 353, 354, 349, 349, 359, 362, + 362, 360, 349, 364, 366, 367, 359, 361, 364, 365, + 368, 369, 365, 370, 371, 368, 369, 367, 374, 373, - 379, 380, 381, 382, 372, 383, 385, 382, 384, 388, - 378, 387, 389, 389, 388, 381, 390, 384, 391, 380, - 392, 394, 383, 395, 387, 392, 396, 391, 393, 397, - 385, 398, 393, 390, 399, 394, 400, 395, 401, 404, - 399, 406, 402, 854, 396, 405, 410, 410, 398, 397, - 400, 402, 404, 405, 407, 412, 409, 401, 408, 407, - 406, 409, 408, 408, 411, 413, 414, 415, 412, 411, - 416, 414, 415, 417, 418, 416, 419, 417, 420, 421, - 419, 423, 413, 418, 430, 422, 427, 418, 428, 418, - 430, 418, 420, 422, 424, 424, 428, 421, 443, 423, + 375, 376, 366, 374, 383, 375, 376, 371, 377, 378, + 378, 379, 370, 373, 381, 381, 379, 377, 381, 382, + 385, 384, 386, 383, 384, 385, 387, 386, 388, 387, + 389, 390, 391, 382, 393, 392, 390, 391, 392, 395, + 397, 394, 396, 396, 393, 388, 394, 398, 399, 389, + 400, 402, 399, 395, 401, 404, 405, 406, 397, 407, + 398, 405, 406, 401, 408, 409, 410, 400, 404, 412, + 409, 418, 407, 411, 411, 402, 413, 408, 414, 416, + 410, 417, 419, 414, 415, 413, 412, 420, 415, 418, + 421, 422, 423, 416, 424, 417, 421, 426, 427, 428, - 425, 425, 426, 426, 429, 427, 431, 433, 436, 429, - 434, 435, 433, 431, 437, 434, 435, 436, 438, 438, - 439, 440, 442, 443, 444, 445, 442, 442, 446, 445, - 447, 448, 437, 449, 452, 450, 455, 852, 449, 439, - 440, 444, 450, 447, 453, 451, 446, 454, 461, 448, - 451, 452, 456, 453, 457, 458, 455, 456, 471, 457, - 458, 454, 459, 459, 462, 462, 461, 463, 463, 464, - 466, 465, 467, 468, 469, 464, 465, 850, 471, 484, - 470, 472, 473, 473, 475, 474, 476, 476, 466, 474, - 467, 468, 469, 470, 477, 472, 475, 478, 482, 477, + 432, 432, 419, 424, 420, 422, 427, 429, 435, 430, + 426, 423, 429, 430, 430, 431, 433, 434, 428, 436, + 431, 433, 437, 438, 436, 435, 440, 437, 438, 439, + 434, 442, 441, 439, 443, 440, 441, 444, 445, 440, + 446, 440, 447, 440, 448, 442, 445, 443, 449, 449, + 450, 450, 451, 451, 452, 444, 453, 446, 454, 455, + 456, 462, 448, 454, 453, 455, 447, 456, 461, 458, + 459, 460, 464, 452, 458, 459, 460, 461, 465, 462, + 463, 463, 466, 467, 467, 468, 469, 473, 470, 472, + 474, 464, 475, 472, 472, 476, 475, 465, 477, 466, - 483, 482, 478, 484, 485, 486, 486, 487, 488, 488, - 489, 490, 491, 494, 483, 490, 493, 495, 485, 497, - 489, 498, 499, 495, 497, 500, 487, 503, 503, 501, - 491, 502, 494, 493, 501, 504, 502, 505, 506, 499, - 504, 507, 508, 510, 500, 498, 509, 511, 510, 512, - 513, 518, 514, 517, 505, 508, 519, 506, 509, 523, - 507, 514, 517, 514, 520, 519, 511, 519, 512, 518, - 513, 521, 524, 520, 522, 522, 521, 525, 523, 526, - 527, 528, 528, 530, 524, 532, 531, 533, 530, 531, - 534, 537, 526, 532, 525, 531, 535, 527, 538, 848, + 478, 479, 480, 481, 468, 470, 479, 474, 481, 480, + 469, 477, 473, 476, 482, 483, 484, 485, 478, 934, + 486, 487, 488, 491, 483, 486, 487, 488, 489, 489, + 484, 482, 492, 492, 493, 493, 494, 485, 495, 496, + 497, 491, 494, 495, 498, 499, 500, 501, 503, 503, + 502, 504, 506, 505, 517, 504, 509, 496, 497, 500, + 507, 507, 498, 499, 502, 505, 516, 501, 508, 510, + 518, 506, 511, 508, 510, 509, 515, 511, 517, 515, + 516, 519, 519, 520, 518, 521, 521, 522, 523, 524, + 527, 526, 523, 528, 530, 531, 532, 522, 533, 530, - 539, 540, 538, 541, 533, 539, 540, 542, 534, 543, - 537, 555, 541, 535, 544, 545, 545, 546, 547, 547, - 543, 542, 546, 544, 548, 548, 549, 549, 550, 552, - 553, 550, 554, 558, 552, 555, 557, 554, 556, 556, - 559, 557, 560, 561, 558, 562, 558, 553, 563, 563, - 564, 558, 566, 568, 565, 567, 567, 564, 569, 559, - 571, 560, 561, 565, 572, 571, 573, 574, 577, 572, - 562, 575, 576, 569, 574, 578, 575, 566, 568, 579, - 586, 576, 580, 584, 581, 573, 577, 580, 581, 581, - 588, 582, 579, 583, 584, 578, 582, 585, 583, 589, + 531, 535, 520, 536, 533, 537, 535, 524, 526, 527, + 538, 539, 528, 540, 543, 532, 539, 544, 540, 541, + 541, 542, 537, 545, 546, 548, 542, 536, 547, 538, + 548, 543, 549, 550, 551, 552, 544, 546, 555, 556, + 547, 558, 545, 559, 552, 561, 552, 555, 559, 557, + 558, 549, 550, 562, 551, 560, 560, 556, 557, 563, + 557, 564, 565, 567, 561, 562, 566, 566, 569, 572, + 570, 571, 572, 569, 564, 570, 563, 571, 572, 565, + 567, 573, 574, 575, 578, 576, 579, 580, 581, 573, + 579, 582, 580, 581, 583, 584, 586, 587, 932, 574, - 587, 585, 590, 590, 586, 587, 591, 593, 593, 597, - 589, 588, 598, 603, 597, 599, 599, 591, 593, 600, - 605, 600, 601, 601, 604, 604, 606, 607, 598, 609, - 608, 610, 603, 611, 613, 611, 610, 606, 607, 618, - 605, 608, 614, 609, 612, 612, 615, 614, 615, 616, - 617, 619, 620, 621, 616, 617, 618, 620, 621, 613, - 622, 623, 624, 625, 626, 627, 628, 641, 631, 634, - 619, 624, 628, 624, 623, 625, 630, 631, 622, 633, - 627, 641, 630, 626, 632, 632, 635, 634, 633, 636, - 635, 637, 637, 639, 636, 640, 642, 643, 639, 640, + 582, 575, 576, 578, 585, 588, 584, 586, 583, 585, + 590, 588, 589, 589, 587, 591, 591, 592, 599, 590, + 593, 593, 592, 594, 594, 595, 595, 596, 598, 600, + 596, 601, 605, 598, 600, 599, 602, 602, 603, 604, + 606, 607, 608, 603, 609, 609, 610, 611, 612, 614, + 604, 605, 604, 610, 615, 601, 611, 604, 617, 606, + 607, 613, 613, 617, 619, 618, 621, 608, 620, 615, + 618, 621, 622, 612, 614, 620, 623, 624, 625, 626, + 627, 622, 629, 619, 625, 628, 631, 629, 626, 630, + 623, 631, 632, 630, 630, 624, 633, 632, 628, 634, - 644, 645, 647, 648, 649, 647, 650, 650, 651, 651, - 653, 644, 652, 652, 642, 648, 649, 643, 654, 654, - 655, 645, 653, 657, 658, 658, 659, 662, 657, 660, - 660, 661, 663, 662, 666, 663, 664, 664, 655, 665, - 665, 667, 667, 668, 659, 669, 669, 670, 661, 671, - 672, 664, 666, 673, 671, 675, 674, 677, 680, 675, - 678, 847, 673, 680, 672, 674, 685, 670, 668, 678, - 679, 679, 682, 682, 683, 689, 677, 684, 683, 686, - 684, 687, 688, 691, 686, 685, 687, 690, 688, 702, - 689, 691, 690, 692, 702, 692, 695, 695, 697, 697, + 627, 635, 637, 634, 636, 638, 640, 633, 641, 636, + 639, 639, 640, 641, 642, 643, 638, 645, 647, 647, + 642, 651, 652, 637, 643, 635, 651, 657, 645, 647, + 653, 653, 654, 659, 654, 655, 655, 660, 652, 658, + 658, 661, 663, 662, 664, 665, 657, 665, 660, 664, + 666, 666, 661, 659, 662, 667, 663, 668, 669, 670, + 669, 671, 668, 674, 670, 672, 671, 673, 674, 675, + 676, 677, 678, 683, 675, 760, 679, 760, 681, 682, + 667, 680, 672, 678, 677, 679, 673, 679, 676, 681, + 680, 682, 683, 684, 685, 687, 688, 689, 689, 691, - 698, 698, 700, 700, 703, 703, 704, 705, 706, 708, - 708, 710, 711, 706, 711, 712, 710, 713, 714, 715, - 716, 704, 717, 717, 718, 719, 712, 720, 705, 714, - 715, 716, 721, 718, 713, 723, 724, 724, 725, 726, - 728, 733, 727, 732, 721, 731, 720, 729, 729, 730, - 719, 737, 723, 740, 730, 725, 726, 727, 728, 731, - 733, 732, 738, 739, 739, 738, 741, 740, 743, 743, - 737, 744, 745, 745, 746, 747, 748, 749, 751, 754, - 752, 748, 749, 741, 747, 752, 753, 756, 757, 744, - 762, 753, 751, 754, 755, 746, 758, 757, 756, 755, + 685, 687, 690, 692, 693, 688, 696, 692, 684, 693, + 881, 690, 694, 694, 699, 696, 702, 691, 697, 697, + 698, 698, 700, 703, 701, 699, 704, 700, 701, 705, + 702, 706, 708, 709, 881, 708, 710, 711, 711, 716, + 705, 703, 712, 712, 714, 709, 704, 720, 710, 713, + 713, 706, 715, 715, 718, 722, 714, 716, 723, 718, + 719, 719, 721, 721, 723, 720, 724, 725, 725, 724, + 726, 726, 722, 727, 728, 728, 729, 729, 730, 731, + 731, 732, 725, 733, 734, 735, 736, 737, 733, 738, + 735, 727, 732, 739, 741, 746, 737, 739, 738, 742, - 759, 759, 760, 763, 765, 758, 764, 764, 762, 766, - 767, 760, 770, 765, 769, 767, 773, 766, 772, 772, - 778, 763, 782, 769, 770, 774, 774, 775, 776, 776, - 775, 777, 777, 778, 779, 773, 780, 780, 781, 779, - 782, 783, 781, 784, 786, 785, 787, 788, 789, 783, - 785, 791, 792, 794, 791, 795, 788, 794, 784, 793, - 793, 797, 798, 786, 795, 799, 806, 789, 803, 792, - 797, 787, 807, 798, 802, 802, 805, 803, 808, 809, - 810, 805, 811, 812, 806, 813, 807, 811, 810, 799, - 814, 814, 818, 808, 815, 817, 817, 809, 819, 815, + 736, 743, 743, 730, 734, 744, 746, 753, 742, 748, + 744, 749, 748, 741, 750, 750, 749, 751, 754, 752, + 755, 751, 752, 754, 756, 755, 753, 757, 758, 759, + 756, 763, 763, 758, 765, 765, 772, 759, 766, 766, + 768, 768, 757, 770, 771, 771, 773, 774, 770, 776, + 776, 772, 774, 779, 780, 781, 780, 783, 779, 784, + 781, 782, 782, 785, 786, 790, 787, 773, 783, 788, + 788, 789, 791, 792, 785, 786, 784, 787, 793, 794, + 789, 795, 795, 793, 794, 792, 797, 798, 798, 799, + 790, 791, 800, 801, 802, 803, 803, 804, 806, 805, - 820, 820, 822, 813, 821, 821, 823, 868, 812, 824, - 824, 818, 826, 822, 825, 825, 827, 828, 828, 819, - 868, 827, 829, 829, 831, 823, 830, 830, 844, 831, - 826, 832, 832, 834, 834, 836, 836, 837, 840, 840, - 841, 855, 837, 846, 845, 841, 865, 844, 845, 849, - 849, 851, 853, 853, 867, 851, 856, 856, 855, 857, - 857, 859, 859, 861, 861, 865, 866, 869, 867, 870, - 870, 843, 842, 839, 838, 866, 835, 833, 816, 804, - 801, 800, 796, 790, 771, 869, 873, 873, 873, 873, - 873, 873, 874, 874, 874, 874, 874, 874, 875, 875, + 807, 811, 804, 797, 812, 815, 799, 812, 801, 800, + 813, 813, 802, 805, 814, 818, 806, 817, 817, 807, + 811, 822, 815, 819, 819, 821, 821, 823, 814, 824, + 825, 827, 828, 818, 824, 825, 823, 828, 829, 830, + 831, 831, 822, 829, 834, 827, 832, 832, 835, 834, + 841, 836, 837, 830, 838, 838, 839, 842, 844, 835, + 836, 837, 843, 843, 845, 839, 846, 844, 841, 848, + 849, 846, 845, 851, 851, 842, 853, 858, 848, 854, + 854, 855, 849, 864, 855, 856, 856, 857, 857, 859, + 858, 860, 860, 861, 859, 853, 865, 861, 866, 868, - 875, 875, 875, 875, 876, 876, 876, 876, 876, 876, - 878, 878, 768, 878, 878, 878, 879, 879, 761, 750, - 742, 879, 880, 880, 736, 735, 880, 882, 882, 734, - 722, 709, 882, 883, 883, 707, 883, 883, 883, 701, - 699, 696, 694, 693, 681, 676, 656, 646, 638, 629, - 602, 596, 595, 594, 592, 570, 551, 536, 529, 516, - 515, 496, 492, 481, 480, 479, 460, 441, 432, 403, - 386, 366, 358, 349, 316, 289, 288, 286, 285, 281, - 208, 202, 99, 98, 96, 94, 92, 54, 50, 46, - 45, 41, 36, 12, 11, 872, 872, 872, 872, 872, + 867, 864, 869, 870, 865, 867, 871, 873, 877, 874, + 873, 880, 870, 866, 875, 875, 876, 877, 868, 879, + 876, 885, 880, 884, 884, 871, 874, 869, 879, 887, + 885, 888, 889, 890, 887, 891, 892, 893, 894, 895, + 896, 896, 893, 900, 892, 897, 889, 901, 890, 888, + 897, 899, 899, 891, 902, 902, 904, 895, 903, 903, + 905, 930, 900, 894, 906, 906, 908, 904, 901, 907, + 907, 909, 910, 910, 911, 911, 909, 912, 912, 905, + 913, 914, 914, 926, 908, 913, 916, 916, 918, 918, + 919, 922, 922, 923, 937, 919, 927, 933, 923, 947, + + 927, 933, 926, 931, 931, 935, 935, 938, 938, 939, + 939, 937, 941, 941, 943, 943, 948, 949, 947, 950, + 951, 952, 952, 929, 928, 948, 925, 924, 921, 920, + 917, 949, 950, 915, 898, 886, 883, 882, 951, 955, + 955, 955, 955, 955, 955, 956, 956, 956, 956, 956, + 956, 957, 957, 957, 957, 957, 957, 958, 958, 958, + 958, 958, 958, 960, 960, 878, 960, 960, 960, 961, + 961, 872, 863, 862, 961, 962, 962, 852, 850, 962, + 964, 964, 847, 840, 833, 964, 965, 965, 826, 965, + 965, 965, 820, 816, 810, 809, 808, 796, 778, 777, + + 775, 769, 767, 764, 762, 761, 747, 745, 740, 717, + 707, 695, 686, 656, 650, 649, 648, 646, 644, 616, + 597, 577, 568, 554, 553, 534, 525, 514, 513, 512, + 490, 471, 457, 425, 403, 380, 372, 363, 329, 300, + 299, 297, 296, 291, 215, 209, 101, 100, 98, 96, + 94, 54, 50, 46, 45, 41, 36, 12, 11, 954, + 954, 954, 954, 954, 954, 954, 954, 954, 954, 954, + 954, 954, 954, 954, 954, 954, 954, 954, 954, 954, + 954, 954, 954, 954, 954, 954, 954, 954, 954, 954, + 954, 954, 954, 954, 954, 954, 954, 954 - 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, - 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, - 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, - 872, 872, 872, 872 } ; static yy_state_type yy_last_accepting_state; @@ -1233,7 +1296,7 @@ static void config_end_include(void) #define YY_NO_INPUT 1 #endif -#line 1236 "" +#line 1299 "" #define INITIAL 0 #define quotedstring 1 @@ -1419,7 +1482,7 @@ YY_DECL #line 107 "util/configlexer.lex" -#line 1422 "" +#line 1485 "" if ( !(yy_init) ) { @@ -1478,13 +1541,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 873 ) + if ( yy_current_state >= 955 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 1796 ); + while ( yy_base[yy_current_state] != 1960 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1904,38 +1967,78 @@ YY_RULE_SETUP { YDOUT; return VAR_STATISTICS_CUMULATIVE;} YY_BREAK case 80: -/* rule 80 can match eol */ YY_RULE_SETUP #line 187 "util/configlexer.lex" +{ YDOUT; return VAR_REMOTE_CONTROL; } + YY_BREAK +case 81: +YY_RULE_SETUP +#line 188 "util/configlexer.lex" +{ YDOUT; return VAR_CONTROL_ENABLE; } + YY_BREAK +case 82: +YY_RULE_SETUP +#line 189 "util/configlexer.lex" +{ YDOUT; return VAR_CONTROL_INTERFACE; } + YY_BREAK +case 83: +YY_RULE_SETUP +#line 190 "util/configlexer.lex" +{ YDOUT; return VAR_CONTROL_PORT; } + YY_BREAK +case 84: +YY_RULE_SETUP +#line 191 "util/configlexer.lex" +{ YDOUT; return VAR_SERVER_KEY_FILE; } + YY_BREAK +case 85: +YY_RULE_SETUP +#line 192 "util/configlexer.lex" +{ YDOUT; return VAR_SERVER_CERT_FILE; } + YY_BREAK +case 86: +YY_RULE_SETUP +#line 193 "util/configlexer.lex" +{ YDOUT; return VAR_CONTROL_KEY_FILE; } + YY_BREAK +case 87: +YY_RULE_SETUP +#line 194 "util/configlexer.lex" +{ YDOUT; return VAR_CONTROL_CERT_FILE; } + YY_BREAK +case 88: +/* rule 88 can match eol */ +YY_RULE_SETUP +#line 195 "util/configlexer.lex" { LEXOUT(("NL\n")); cfg_parser->line++;} YY_BREAK /* Quoted strings. Strip leading and ending quotes */ -case 81: +case 89: YY_RULE_SETUP -#line 190 "util/configlexer.lex" +#line 198 "util/configlexer.lex" { BEGIN(quotedstring); LEXOUT(("QS ")); } YY_BREAK case YY_STATE_EOF(quotedstring): -#line 191 "util/configlexer.lex" +#line 199 "util/configlexer.lex" { yyerror("EOF inside quoted string"); BEGIN(INITIAL); } YY_BREAK -case 82: +case 90: YY_RULE_SETUP -#line 195 "util/configlexer.lex" +#line 203 "util/configlexer.lex" { LEXOUT(("STR(%s) ", yytext)); yymore(); } YY_BREAK -case 83: -/* rule 83 can match eol */ +case 91: +/* rule 91 can match eol */ YY_RULE_SETUP -#line 196 "util/configlexer.lex" +#line 204 "util/configlexer.lex" { cfg_parser->line++; yymore(); } YY_BREAK -case 84: +case 92: YY_RULE_SETUP -#line 197 "util/configlexer.lex" +#line 205 "util/configlexer.lex" { LEXOUT(("QE ")); BEGIN(INITIAL); @@ -1947,32 +2050,32 @@ YY_RULE_SETUP } YY_BREAK /* Single Quoted strings. Strip leading and ending quotes */ -case 85: +case 93: YY_RULE_SETUP -#line 208 "util/configlexer.lex" +#line 216 "util/configlexer.lex" { BEGIN(singlequotedstr); LEXOUT(("SQS ")); } YY_BREAK case YY_STATE_EOF(singlequotedstr): -#line 209 "util/configlexer.lex" +#line 217 "util/configlexer.lex" { yyerror("EOF inside quoted string"); BEGIN(INITIAL); } YY_BREAK -case 86: +case 94: YY_RULE_SETUP -#line 213 "util/configlexer.lex" +#line 221 "util/configlexer.lex" { LEXOUT(("STR(%s) ", yytext)); yymore(); } YY_BREAK -case 87: -/* rule 87 can match eol */ +case 95: +/* rule 95 can match eol */ YY_RULE_SETUP -#line 214 "util/configlexer.lex" +#line 222 "util/configlexer.lex" { cfg_parser->line++; yymore(); } YY_BREAK -case 88: +case 96: YY_RULE_SETUP -#line 215 "util/configlexer.lex" +#line 223 "util/configlexer.lex" { LEXOUT(("SQE ")); BEGIN(INITIAL); @@ -1984,37 +2087,37 @@ YY_RULE_SETUP } YY_BREAK /* include: directive */ -case 89: +case 97: YY_RULE_SETUP -#line 226 "util/configlexer.lex" +#line 234 "util/configlexer.lex" { LEXOUT(("v(%s) ", yytext)); BEGIN(include); } YY_BREAK case YY_STATE_EOF(include): -#line 227 "util/configlexer.lex" +#line 235 "util/configlexer.lex" { yyerror("EOF inside include directive"); BEGIN(INITIAL); } YY_BREAK -case 90: +case 98: YY_RULE_SETUP -#line 231 "util/configlexer.lex" +#line 239 "util/configlexer.lex" { LEXOUT(("ISP ")); /* ignore */ } YY_BREAK -case 91: -/* rule 91 can match eol */ +case 99: +/* rule 99 can match eol */ YY_RULE_SETUP -#line 232 "util/configlexer.lex" +#line 240 "util/configlexer.lex" { LEXOUT(("NL\n")); cfg_parser->line++;} YY_BREAK -case 92: +case 100: YY_RULE_SETUP -#line 233 "util/configlexer.lex" +#line 241 "util/configlexer.lex" { LEXOUT(("IQS ")); BEGIN(include_quoted); } YY_BREAK -case 93: +case 101: YY_RULE_SETUP -#line 234 "util/configlexer.lex" +#line 242 "util/configlexer.lex" { LEXOUT(("Iunquotedstr(%s) ", yytext)); config_start_include(yytext); @@ -2022,26 +2125,26 @@ YY_RULE_SETUP } YY_BREAK case YY_STATE_EOF(include_quoted): -#line 239 "util/configlexer.lex" +#line 247 "util/configlexer.lex" { yyerror("EOF inside quoted string"); BEGIN(INITIAL); } YY_BREAK -case 94: +case 102: YY_RULE_SETUP -#line 243 "util/configlexer.lex" +#line 251 "util/configlexer.lex" { LEXOUT(("ISTR(%s) ", yytext)); yymore(); } YY_BREAK -case 95: -/* rule 95 can match eol */ +case 103: +/* rule 103 can match eol */ YY_RULE_SETUP -#line 244 "util/configlexer.lex" +#line 252 "util/configlexer.lex" { cfg_parser->line++; yymore(); } YY_BREAK -case 96: +case 104: YY_RULE_SETUP -#line 245 "util/configlexer.lex" +#line 253 "util/configlexer.lex" { LEXOUT(("IQE ")); yytext[yyleng - 1] = '\0'; @@ -2050,7 +2153,7 @@ YY_RULE_SETUP } YY_BREAK case YY_STATE_EOF(INITIAL): -#line 251 "util/configlexer.lex" +#line 259 "util/configlexer.lex" { yy_set_bol(1); /* Set beginning of line, so "^" rules match. */ if (config_include_stack_ptr == 0) { @@ -2061,18 +2164,18 @@ case YY_STATE_EOF(INITIAL): } } YY_BREAK -case 97: +case 105: YY_RULE_SETUP -#line 261 "util/configlexer.lex" +#line 269 "util/configlexer.lex" { LEXOUT(("unquotedstr(%s) ", yytext)); yylval.str = strdup(yytext); return STRING; } YY_BREAK -case 98: +case 106: YY_RULE_SETUP -#line 264 "util/configlexer.lex" +#line 272 "util/configlexer.lex" ECHO; YY_BREAK -#line 2075 "" +#line 2178 "" case YY_END_OF_BUFFER: { @@ -2362,7 +2465,7 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 873 ) + if ( yy_current_state >= 955 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2390,11 +2493,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 873 ) + if ( yy_current_state >= 955 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 872); + yy_is_jam = (yy_current_state == 954); return yy_is_jam ? 0 : yy_current_state; } @@ -3031,7 +3134,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 264 "util/configlexer.lex" +#line 272 "util/configlexer.lex" diff --git a/util/configlexer.lex b/util/configlexer.lex index cdbb08b64..4e57657bb 100644 --- a/util/configlexer.lex +++ b/util/configlexer.lex @@ -184,6 +184,14 @@ local-zone{COLON} { YDOUT; return VAR_LOCAL_ZONE;} local-data{COLON} { YDOUT; return VAR_LOCAL_DATA;} statistics-interval{COLON} { YDOUT; return VAR_STATISTICS_INTERVAL;} statistics-cumulative{COLON} { YDOUT; return VAR_STATISTICS_CUMULATIVE;} +remote-control{COLON} { YDOUT; return VAR_REMOTE_CONTROL; } +control-enable{COLON} { YDOUT; return VAR_CONTROL_ENABLE; } +control-interface{COLON} { YDOUT; return VAR_CONTROL_INTERFACE; } +control-port{COLON} { YDOUT; return VAR_CONTROL_PORT; } +server-key-file{COLON} { YDOUT; return VAR_SERVER_KEY_FILE; } +server-cert-file{COLON} { YDOUT; return VAR_SERVER_CERT_FILE; } +control-key-file{COLON} { YDOUT; return VAR_CONTROL_KEY_FILE; } +control-cert-file{COLON} { YDOUT; return VAR_CONTROL_CERT_FILE; } {NEWLINE} { LEXOUT(("NL\n")); cfg_parser->line++;} /* Quoted strings. Strip leading and ending quotes */ diff --git a/util/configparser.c b/util/configparser.c index e5b61a77e..a10f5e527 100644 --- a/util/configparser.c +++ b/util/configparser.c @@ -150,7 +150,15 @@ VAR_NEG_CACHE_SIZE = 339, VAR_HARDEN_REFERRAL_PATH = 340, VAR_PRIVATE_ADDRESS = 341, - VAR_PRIVATE_DOMAIN = 342 + VAR_PRIVATE_DOMAIN = 342, + VAR_REMOTE_CONTROL = 343, + VAR_CONTROL_ENABLE = 344, + VAR_CONTROL_INTERFACE = 345, + VAR_CONTROL_PORT = 346, + VAR_SERVER_KEY_FILE = 347, + VAR_SERVER_CERT_FILE = 348, + VAR_CONTROL_KEY_FILE = 349, + VAR_CONTROL_CERT_FILE = 350 }; #endif /* Tokens. */ @@ -239,6 +247,14 @@ #define VAR_HARDEN_REFERRAL_PATH 340 #define VAR_PRIVATE_ADDRESS 341 #define VAR_PRIVATE_DOMAIN 342 +#define VAR_REMOTE_CONTROL 343 +#define VAR_CONTROL_ENABLE 344 +#define VAR_CONTROL_INTERFACE 345 +#define VAR_CONTROL_PORT 346 +#define VAR_SERVER_KEY_FILE 347 +#define VAR_SERVER_CERT_FILE 348 +#define VAR_CONTROL_KEY_FILE 349 +#define VAR_CONTROL_CERT_FILE 350 @@ -297,7 +313,7 @@ typedef union YYSTYPE char* str; } /* Line 187 of yacc.c. */ -#line 301 "util/configparser.c" +#line 317 "util/configparser.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -310,7 +326,7 @@ typedef union YYSTYPE /* Line 216 of yacc.c. */ -#line 314 "util/configparser.c" +#line 330 "util/configparser.c" #ifdef short # undef short @@ -525,20 +541,20 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 155 +#define YYLAST 171 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 88 +#define YYNTOKENS 96 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 87 +#define YYNNTS 97 /* YYNRULES -- Number of rules. */ -#define YYNRULES 165 +#define YYNRULES 183 /* YYNRULES -- Number of states. */ -#define YYNSTATES 243 +#define YYNSTATES 268 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 342 +#define YYMAXUTOK 350 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -580,7 +596,8 @@ static const yytype_uint8 yytranslate[] = 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87 + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95 }; #if YYDEBUG @@ -588,92 +605,100 @@ static const yytype_uint8 yytranslate[] = YYRHS. */ static const yytype_uint16 yyprhs[] = { - 0, 0, 3, 4, 7, 10, 13, 16, 18, 21, - 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, - 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, - 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, - 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, - 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, - 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, - 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, - 162, 165, 166, 168, 170, 172, 174, 177, 178, 180, - 182, 184, 187, 190, 193, 196, 199, 202, 205, 208, + 0, 0, 3, 4, 7, 10, 13, 16, 19, 21, + 24, 25, 27, 29, 31, 33, 35, 37, 39, 41, + 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, + 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, + 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, + 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, + 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, + 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, + 163, 165, 168, 169, 171, 173, 175, 177, 180, 181, + 183, 185, 187, 190, 193, 196, 199, 202, 205, 208, 211, 214, 217, 220, 223, 226, 229, 232, 235, 238, 241, 244, 247, 250, 253, 256, 259, 262, 265, 268, 271, 274, 277, 280, 283, 286, 289, 292, 295, 298, 301, 304, 307, 310, 313, 316, 319, 322, 325, 328, - 331, 334, 337, 340, 343, 346, 349, 352, 356, 359, - 362, 365, 368, 371, 374, 377, 380, 383, 386, 390, - 393, 396, 399, 402, 405, 408 + 331, 334, 337, 340, 343, 346, 349, 352, 355, 359, + 362, 365, 368, 371, 374, 377, 380, 383, 386, 389, + 393, 396, 399, 402, 405, 408, 411, 414, 416, 419, + 420, 422, 424, 426, 428, 430, 432, 434, 437, 440, + 443, 446, 449, 452 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 89, 0, -1, -1, 89, 90, -1, 91, 92, -1, - 94, 95, -1, 97, 98, -1, 11, -1, 92, 93, - -1, -1, 100, -1, 101, -1, 104, -1, 107, -1, - 113, -1, 114, -1, 115, -1, 116, -1, 105, -1, - 119, -1, 120, -1, 121, -1, 122, -1, 123, -1, - 135, -1, 136, -1, 137, -1, 138, -1, 139, -1, - 110, -1, 140, -1, 141, -1, 144, -1, 142, -1, - 143, -1, 145, -1, 146, -1, 147, -1, 154, -1, - 130, -1, 131, -1, 132, -1, 133, -1, 148, -1, - 157, -1, 127, -1, 129, -1, 158, -1, 160, -1, - 161, -1, 162, -1, 111, -1, 134, -1, 164, -1, - 165, -1, 128, -1, 163, -1, 118, -1, 106, -1, - 124, -1, 155, -1, 159, -1, 149, -1, 156, -1, - 167, -1, 168, -1, 112, -1, 102, -1, 117, -1, - 151, -1, 103, -1, 108, -1, 109, -1, 125, -1, - 126, -1, 166, -1, 150, -1, 152, -1, 153, -1, - 38, -1, 95, 96, -1, -1, 169, -1, 170, -1, - 171, -1, 44, -1, 98, 99, -1, -1, 172, -1, - 173, -1, 174, -1, 13, 10, -1, 12, 10, -1, - 76, 10, -1, 79, 10, -1, 14, 10, -1, 16, - 10, -1, 67, 10, -1, 15, 10, -1, 80, 10, - -1, 81, 10, -1, 31, 10, -1, 60, 10, -1, - 75, 10, -1, 17, 10, -1, 18, 10, -1, 19, - 10, -1, 20, 10, -1, 77, 10, -1, 66, 10, - -1, 21, 10, -1, 22, 10, -1, 23, 10, -1, - 24, 10, -1, 25, 10, -1, 68, 10, -1, 82, - 10, -1, 83, 10, -1, 54, 10, -1, 64, 10, - -1, 55, 10, -1, 48, 10, -1, 49, 10, -1, - 50, 10, -1, 51, 10, -1, 61, 10, -1, 26, - 10, -1, 27, 10, -1, 28, 10, -1, 29, 10, - -1, 30, 10, -1, 32, 10, -1, 33, 10, -1, - 35, 10, -1, 36, 10, -1, 34, 10, -1, 41, - 10, -1, 42, 10, -1, 43, 10, -1, 52, 10, - -1, 71, 10, -1, 85, 10, -1, 78, 10, -1, - 86, 10, -1, 87, 10, -1, 47, 10, -1, 69, - 10, -1, 72, 10, 10, -1, 53, 10, -1, 56, - 10, -1, 70, 10, -1, 57, 10, -1, 58, 10, - -1, 59, 10, -1, 65, 10, -1, 62, 10, -1, - 63, 10, -1, 84, 10, -1, 73, 10, 10, -1, - 74, 10, -1, 37, 10, -1, 39, 10, -1, 40, - 10, -1, 37, 10, -1, 45, 10, -1, 46, 10, - -1 + 97, 0, -1, -1, 97, 98, -1, 99, 100, -1, + 102, 103, -1, 105, 106, -1, 183, 184, -1, 11, + -1, 100, 101, -1, -1, 108, -1, 109, -1, 112, + -1, 115, -1, 121, -1, 122, -1, 123, -1, 124, + -1, 113, -1, 127, -1, 128, -1, 129, -1, 130, + -1, 131, -1, 143, -1, 144, -1, 145, -1, 146, + -1, 147, -1, 118, -1, 148, -1, 149, -1, 152, + -1, 150, -1, 151, -1, 153, -1, 154, -1, 155, + -1, 162, -1, 138, -1, 139, -1, 140, -1, 141, + -1, 156, -1, 165, -1, 135, -1, 137, -1, 166, + -1, 168, -1, 169, -1, 170, -1, 119, -1, 142, + -1, 172, -1, 173, -1, 136, -1, 171, -1, 126, + -1, 114, -1, 132, -1, 163, -1, 167, -1, 157, + -1, 164, -1, 175, -1, 176, -1, 120, -1, 110, + -1, 125, -1, 159, -1, 111, -1, 116, -1, 117, + -1, 133, -1, 134, -1, 174, -1, 158, -1, 160, + -1, 161, -1, 38, -1, 103, 104, -1, -1, 177, + -1, 178, -1, 179, -1, 44, -1, 106, 107, -1, + -1, 180, -1, 181, -1, 182, -1, 13, 10, -1, + 12, 10, -1, 76, 10, -1, 79, 10, -1, 14, + 10, -1, 16, 10, -1, 67, 10, -1, 15, 10, + -1, 80, 10, -1, 81, 10, -1, 31, 10, -1, + 60, 10, -1, 75, 10, -1, 17, 10, -1, 18, + 10, -1, 19, 10, -1, 20, 10, -1, 77, 10, + -1, 66, 10, -1, 21, 10, -1, 22, 10, -1, + 23, 10, -1, 24, 10, -1, 25, 10, -1, 68, + 10, -1, 82, 10, -1, 83, 10, -1, 54, 10, + -1, 64, 10, -1, 55, 10, -1, 48, 10, -1, + 49, 10, -1, 50, 10, -1, 51, 10, -1, 61, + 10, -1, 26, 10, -1, 27, 10, -1, 28, 10, + -1, 29, 10, -1, 30, 10, -1, 32, 10, -1, + 33, 10, -1, 35, 10, -1, 36, 10, -1, 34, + 10, -1, 41, 10, -1, 42, 10, -1, 43, 10, + -1, 52, 10, -1, 71, 10, -1, 85, 10, -1, + 78, 10, -1, 86, 10, -1, 87, 10, -1, 47, + 10, -1, 69, 10, -1, 72, 10, 10, -1, 53, + 10, -1, 56, 10, -1, 70, 10, -1, 57, 10, + -1, 58, 10, -1, 59, 10, -1, 65, 10, -1, + 62, 10, -1, 63, 10, -1, 84, 10, -1, 73, + 10, 10, -1, 74, 10, -1, 37, 10, -1, 39, + 10, -1, 40, 10, -1, 37, 10, -1, 45, 10, + -1, 46, 10, -1, 88, -1, 184, 185, -1, -1, + 186, -1, 188, -1, 187, -1, 189, -1, 190, -1, + 191, -1, 192, -1, 89, 10, -1, 91, 10, -1, + 90, 10, -1, 92, 10, -1, 93, 10, -1, 94, + 10, -1, 95, 10, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 98, 98, 98, 99, 99, 100, 104, 109, 110, - 111, 111, 111, 112, 112, 113, 113, 113, 114, 114, - 114, 115, 115, 115, 116, 116, 117, 117, 118, 118, - 119, 119, 120, 120, 121, 121, 122, 122, 123, 123, - 124, 124, 124, 125, 125, 125, 126, 126, 126, 127, - 127, 128, 128, 129, 129, 130, 130, 131, 131, 131, - 132, 132, 133, 133, 134, 134, 134, 135, 135, 136, - 136, 137, 137, 138, 138, 138, 139, 139, 140, 142, - 154, 155, 156, 156, 156, 158, 170, 171, 172, 172, - 172, 174, 183, 192, 203, 212, 221, 234, 249, 258, - 267, 276, 285, 294, 303, 312, 321, 330, 339, 348, - 362, 369, 376, 383, 391, 398, 405, 412, 419, 427, - 435, 442, 451, 460, 467, 474, 485, 493, 506, 515, - 523, 536, 545, 554, 563, 572, 585, 592, 602, 612, - 622, 632, 642, 652, 659, 666, 673, 683, 697, 704, - 722, 731, 740, 750, 760, 767, 775, 788, 796, 815, - 822, 829, 836, 843, 850, 857 + 0, 100, 100, 100, 101, 101, 102, 102, 106, 111, + 112, 113, 113, 113, 114, 114, 115, 115, 115, 116, + 116, 116, 117, 117, 117, 118, 118, 119, 119, 120, + 120, 121, 121, 122, 122, 123, 123, 124, 124, 125, + 125, 126, 126, 126, 127, 127, 127, 128, 128, 128, + 129, 129, 130, 130, 131, 131, 132, 132, 133, 133, + 133, 134, 134, 135, 135, 136, 136, 136, 137, 137, + 138, 138, 139, 139, 140, 140, 140, 141, 141, 142, + 144, 156, 157, 158, 158, 158, 160, 172, 173, 174, + 174, 174, 176, 185, 194, 205, 214, 223, 236, 251, + 260, 269, 278, 287, 296, 305, 314, 323, 332, 341, + 350, 364, 371, 378, 385, 393, 400, 407, 414, 421, + 429, 437, 444, 453, 462, 469, 476, 487, 495, 508, + 517, 525, 538, 547, 556, 565, 574, 587, 594, 604, + 614, 624, 634, 644, 654, 661, 668, 675, 685, 699, + 706, 724, 733, 742, 752, 762, 769, 777, 790, 798, + 817, 824, 831, 838, 845, 852, 859, 866, 871, 872, + 873, 873, 873, 874, 874, 874, 875, 877, 887, 896, + 903, 910, 917, 924 }; #endif @@ -709,16 +734,19 @@ static const char *const yytname[] = "VAR_STATISTICS_CUMULATIVE", "VAR_OUTGOING_PORT_PERMIT", "VAR_OUTGOING_PORT_AVOID", "VAR_DLV_ANCHOR_FILE", "VAR_DLV_ANCHOR", "VAR_NEG_CACHE_SIZE", "VAR_HARDEN_REFERRAL_PATH", "VAR_PRIVATE_ADDRESS", - "VAR_PRIVATE_DOMAIN", "$accept", "toplevelvars", "toplevelvar", - "serverstart", "contents_server", "content_server", "stubstart", - "contents_stub", "content_stub", "forwardstart", "contents_forward", - "content_forward", "server_num_threads", "server_verbosity", - "server_statistics_interval", "server_statistics_cumulative", - "server_port", "server_interface", "server_outgoing_interface", - "server_outgoing_range", "server_outgoing_port_permit", - "server_outgoing_port_avoid", "server_outgoing_num_tcp", - "server_incoming_num_tcp", "server_interface_automatic", "server_do_ip4", - "server_do_ip6", "server_do_udp", "server_do_tcp", "server_do_daemonize", + "VAR_PRIVATE_DOMAIN", "VAR_REMOTE_CONTROL", "VAR_CONTROL_ENABLE", + "VAR_CONTROL_INTERFACE", "VAR_CONTROL_PORT", "VAR_SERVER_KEY_FILE", + "VAR_SERVER_CERT_FILE", "VAR_CONTROL_KEY_FILE", "VAR_CONTROL_CERT_FILE", + "$accept", "toplevelvars", "toplevelvar", "serverstart", + "contents_server", "content_server", "stubstart", "contents_stub", + "content_stub", "forwardstart", "contents_forward", "content_forward", + "server_num_threads", "server_verbosity", "server_statistics_interval", + "server_statistics_cumulative", "server_port", "server_interface", + "server_outgoing_interface", "server_outgoing_range", + "server_outgoing_port_permit", "server_outgoing_port_avoid", + "server_outgoing_num_tcp", "server_incoming_num_tcp", + "server_interface_automatic", "server_do_ip4", "server_do_ip6", + "server_do_udp", "server_do_tcp", "server_do_daemonize", "server_use_syslog", "server_chroot", "server_username", "server_directory", "server_logfile", "server_pidfile", "server_root_hints", "server_dlv_anchor_file", "server_dlv_anchor", @@ -742,7 +770,10 @@ static const char *const yytname[] = "server_key_cache_size", "server_key_cache_slabs", "server_neg_cache_size", "server_local_zone", "server_local_data", "stub_name", "stub_host", "stub_addr", "forward_name", "forward_host", - "forward_addr", 0 + "forward_addr", "rcstart", "contents_rc", "content_rc", + "rc_control_enable", "rc_control_port", "rc_control_interface", + "rc_server_key_file", "rc_server_cert_file", "rc_control_key_file", + "rc_control_cert_file", 0 }; #endif @@ -759,52 +790,57 @@ static const yytype_uint16 yytoknum[] = 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342 + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 88, 89, 89, 90, 90, 90, 91, 92, 92, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 94, - 95, 95, 96, 96, 96, 97, 98, 98, 99, 99, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174 + 0, 96, 97, 97, 98, 98, 98, 98, 99, 100, + 100, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 102, 103, 103, 104, 104, 104, 105, 106, 106, 107, + 107, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 184, + 185, 185, 185, 185, 185, 185, 185, 186, 187, 188, + 189, 190, 191, 192 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { - 0, 2, 0, 2, 2, 2, 2, 1, 2, 0, + 0, 2, 0, 2, 2, 2, 2, 2, 1, 2, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 0, 1, 1, 1, 1, 2, 0, 1, 1, - 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 2, 0, 1, 1, 1, 1, 2, 0, 1, + 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, - 2, 2, 2, 2, 2, 2 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, + 2, 2, 2, 2, 2, 2, 2, 1, 2, 0, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, + 2, 2, 2, 2 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -812,91 +848,97 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 2, 0, 1, 7, 79, 85, 3, 9, 81, 87, - 4, 5, 6, 0, 0, 0, 0, 0, 0, 0, + 2, 0, 1, 8, 80, 86, 167, 3, 10, 82, + 88, 169, 4, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 8, 10, 11, 67, 70, 12, 18, 58, - 13, 71, 72, 29, 51, 66, 14, 15, 16, 17, - 68, 57, 19, 20, 21, 22, 23, 59, 73, 74, - 45, 55, 46, 39, 40, 41, 42, 52, 24, 25, - 26, 27, 28, 30, 31, 33, 34, 32, 35, 36, - 37, 43, 62, 76, 69, 77, 78, 38, 60, 63, - 44, 47, 61, 48, 49, 50, 56, 53, 54, 75, - 64, 65, 0, 0, 0, 80, 82, 83, 84, 0, - 0, 0, 86, 88, 89, 90, 92, 91, 95, 98, - 96, 104, 105, 106, 107, 110, 111, 112, 113, 114, - 126, 127, 128, 129, 130, 101, 131, 132, 135, 133, - 134, 136, 137, 138, 145, 121, 122, 123, 124, 139, - 148, 118, 120, 149, 151, 152, 153, 102, 125, 155, - 156, 119, 154, 109, 97, 115, 146, 150, 140, 0, - 0, 159, 103, 93, 108, 142, 94, 99, 100, 116, - 117, 157, 141, 143, 144, 160, 161, 162, 163, 164, - 165, 147, 158 + 0, 0, 0, 0, 0, 9, 11, 12, 68, 71, + 13, 19, 59, 14, 72, 73, 30, 52, 67, 15, + 16, 17, 18, 69, 58, 20, 21, 22, 23, 24, + 60, 74, 75, 46, 56, 47, 40, 41, 42, 43, + 53, 25, 26, 27, 28, 29, 31, 32, 34, 35, + 33, 36, 37, 38, 44, 63, 77, 70, 78, 79, + 39, 61, 64, 45, 48, 62, 49, 50, 51, 57, + 54, 55, 76, 65, 66, 0, 0, 0, 81, 83, + 84, 85, 0, 0, 0, 87, 89, 90, 91, 0, + 0, 0, 0, 0, 0, 0, 168, 170, 172, 171, + 173, 174, 175, 176, 93, 92, 96, 99, 97, 105, + 106, 107, 108, 111, 112, 113, 114, 115, 127, 128, + 129, 130, 131, 102, 132, 133, 136, 134, 135, 137, + 138, 139, 146, 122, 123, 124, 125, 140, 149, 119, + 121, 150, 152, 153, 154, 103, 126, 156, 157, 120, + 155, 110, 98, 116, 147, 151, 141, 0, 0, 160, + 104, 94, 109, 143, 95, 100, 101, 117, 118, 158, + 142, 144, 145, 161, 162, 163, 164, 165, 166, 177, + 179, 178, 180, 181, 182, 183, 148, 159 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 1, 6, 7, 10, 82, 8, 11, 155, 9, - 12, 162, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 156, 157, 158, 163, 164, 165 + -1, 1, 7, 8, 12, 85, 9, 13, 158, 10, + 14, 165, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 159, 160, 161, 166, 167, 168, 11, 15, 176, + 177, 178, 179, 180, 181, 182, 183 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -13 +#define YYPACT_NINF -88 static const yytype_int16 yypact[] = { - -13, 76, -13, -13, -13, -13, -13, -13, -13, -13, - -12, 41, 40, 15, 16, 17, 18, 22, 23, 24, - 69, 72, 73, 74, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 105, 106, 107, 108, 109, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, 138, 139, 140, -13, -13, -13, -13, 141, - 142, 143, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, 144, - 145, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13 + -88, 0, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, 42, -25, -36, -87, 3, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, + 30, 31, 32, 33, 35, 36, 37, 38, 39, 40, + 41, 43, 69, 70, 71, 72, 76, 77, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, 147, 148, 149, -88, -88, + -88, -88, 150, 151, 152, -88, -88, -88, -88, 153, + 154, 155, 156, 157, 158, 159, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, 160, 161, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13 + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, -88 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -904,67 +946,73 @@ static const yytype_int8 yypgoto[] = number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 -static const yytype_uint8 yytable[] = +static const yytype_uint16 yytable[] = { - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 166, 167, 168, 169, 38, - 39, 40, 170, 171, 172, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 2, 159, 152, 173, - 153, 154, 174, 175, 176, 160, 161, 3, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 2, 162, 169, 170, 171, 172, 173, 174, 175, 163, + 164, 3, 155, 184, 156, 157, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 4, 203, 204, 205, 206, 207, - 5, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 241, 242 + 199, 200, 201, 202, 203, 204, 205, 206, 4, 207, + 208, 209, 210, 211, 5, 212, 213, 214, 215, 216, + 217, 218, 0, 219, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 220, + 221, 222, 223, 41, 42, 43, 224, 225, 6, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267 }; -static const yytype_uint8 yycheck[] = +static const yytype_int8 yycheck[] = { - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 10, 10, 10, 10, 41, - 42, 43, 10, 10, 10, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 0, 37, 37, 10, - 39, 40, 10, 10, 10, 45, 46, 11, 10, 10, + 0, 37, 89, 90, 91, 92, 93, 94, 95, 45, + 46, 11, 37, 10, 39, 40, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 38, 10, + 10, 10, 10, 10, 44, 10, 10, 10, 10, 10, + 10, 10, -1, 10, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 10, + 10, 10, 10, 41, 42, 43, 10, 10, 88, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 38, 10, 10, 10, 10, 10, - 44, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10 + 10, 10 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 89, 0, 11, 38, 44, 90, 91, 94, 97, - 92, 95, 98, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 41, 42, - 43, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 93, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 168, 37, 39, 40, 96, 169, 170, 171, 37, - 45, 46, 99, 172, 173, 174, 10, 10, 10, 10, + 0, 97, 0, 11, 38, 44, 88, 98, 99, 102, + 105, 183, 100, 103, 106, 184, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 41, 42, 43, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 101, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 37, 39, 40, 104, 177, + 178, 179, 37, 45, 46, 107, 180, 181, 182, 89, + 90, 91, 92, 93, 94, 95, 185, 186, 187, 188, + 189, 190, 191, 192, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, @@ -972,7 +1020,7 @@ static const yytype_uint8 yystos[] = 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10 + 10, 10, 10, 10, 10, 10, 10, 10 }; #define yyerrok (yyerrstatus = 0) @@ -1786,15 +1834,15 @@ yyreduce: YY_REDUCE_PRINT (yyn); switch (yyn) { - case 7: -#line 105 "util/configparser.y" + case 8: +#line 107 "util/configparser.y" { OUTYY(("\nP(server:)\n")); } break; - case 79: -#line 143 "util/configparser.y" + case 80: +#line 145 "util/configparser.y" { struct config_stub* s; OUTYY(("\nP(stub_zone:)\n")); @@ -1807,8 +1855,8 @@ yyreduce: } break; - case 85: -#line 159 "util/configparser.y" + case 86: +#line 161 "util/configparser.y" { struct config_stub* s; OUTYY(("\nP(forward_zone:)\n")); @@ -1821,8 +1869,8 @@ yyreduce: } break; - case 91: -#line 175 "util/configparser.y" + case 92: +#line 177 "util/configparser.y" { OUTYY(("P(server_num_threads:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -1832,8 +1880,8 @@ yyreduce: } break; - case 92: -#line 184 "util/configparser.y" + case 93: +#line 186 "util/configparser.y" { OUTYY(("P(server_verbosity:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -1843,8 +1891,8 @@ yyreduce: } break; - case 93: -#line 193 "util/configparser.y" + case 94: +#line 195 "util/configparser.y" { OUTYY(("P(server_statistics_interval:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "") == 0 || strcmp((yyvsp[(2) - (2)].str), "0") == 0) @@ -1856,8 +1904,8 @@ yyreduce: } break; - case 94: -#line 204 "util/configparser.y" + case 95: +#line 206 "util/configparser.y" { OUTYY(("P(server_statistics_cumulative:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -1867,8 +1915,8 @@ yyreduce: } break; - case 95: -#line 213 "util/configparser.y" + case 96: +#line 215 "util/configparser.y" { OUTYY(("P(server_port:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -1878,8 +1926,8 @@ yyreduce: } break; - case 96: -#line 222 "util/configparser.y" + case 97: +#line 224 "util/configparser.y" { OUTYY(("P(server_interface:%s)\n", (yyvsp[(2) - (2)].str))); if(cfg_parser->cfg->num_ifs == 0) @@ -1893,8 +1941,8 @@ yyreduce: } break; - case 97: -#line 235 "util/configparser.y" + case 98: +#line 237 "util/configparser.y" { OUTYY(("P(server_outgoing_interface:%s)\n", (yyvsp[(2) - (2)].str))); if(cfg_parser->cfg->num_out_ifs == 0) @@ -1910,8 +1958,8 @@ yyreduce: } break; - case 98: -#line 250 "util/configparser.y" + case 99: +#line 252 "util/configparser.y" { OUTYY(("P(server_outgoing_range:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -1921,8 +1969,8 @@ yyreduce: } break; - case 99: -#line 259 "util/configparser.y" + case 100: +#line 261 "util/configparser.y" { OUTYY(("P(server_outgoing_port_permit:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_mark_ports((yyvsp[(2) - (2)].str), 1, @@ -1932,8 +1980,8 @@ yyreduce: } break; - case 100: -#line 268 "util/configparser.y" + case 101: +#line 270 "util/configparser.y" { OUTYY(("P(server_outgoing_port_avoid:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_mark_ports((yyvsp[(2) - (2)].str), 0, @@ -1943,8 +1991,8 @@ yyreduce: } break; - case 101: -#line 277 "util/configparser.y" + case 102: +#line 279 "util/configparser.y" { OUTYY(("P(server_outgoing_num_tcp:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -1954,8 +2002,8 @@ yyreduce: } break; - case 102: -#line 286 "util/configparser.y" + case 103: +#line 288 "util/configparser.y" { OUTYY(("P(server_incoming_num_tcp:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -1965,8 +2013,8 @@ yyreduce: } break; - case 103: -#line 295 "util/configparser.y" + case 104: +#line 297 "util/configparser.y" { OUTYY(("P(server_interface_automatic:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -1976,8 +2024,8 @@ yyreduce: } break; - case 104: -#line 304 "util/configparser.y" + case 105: +#line 306 "util/configparser.y" { OUTYY(("P(server_do_ip4:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -1987,8 +2035,8 @@ yyreduce: } break; - case 105: -#line 313 "util/configparser.y" + case 106: +#line 315 "util/configparser.y" { OUTYY(("P(server_do_ip6:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -1998,8 +2046,8 @@ yyreduce: } break; - case 106: -#line 322 "util/configparser.y" + case 107: +#line 324 "util/configparser.y" { OUTYY(("P(server_do_udp:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2009,8 +2057,8 @@ yyreduce: } break; - case 107: -#line 331 "util/configparser.y" + case 108: +#line 333 "util/configparser.y" { OUTYY(("P(server_do_tcp:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2020,8 +2068,8 @@ yyreduce: } break; - case 108: -#line 340 "util/configparser.y" + case 109: +#line 342 "util/configparser.y" { OUTYY(("P(server_do_daemonize:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2031,8 +2079,8 @@ yyreduce: } break; - case 109: -#line 349 "util/configparser.y" + case 110: +#line 351 "util/configparser.y" { OUTYY(("P(server_use_syslog:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2047,8 +2095,8 @@ yyreduce: } break; - case 110: -#line 363 "util/configparser.y" + case 111: +#line 365 "util/configparser.y" { OUTYY(("P(server_chroot:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->chrootdir); @@ -2056,8 +2104,8 @@ yyreduce: } break; - case 111: -#line 370 "util/configparser.y" + case 112: +#line 372 "util/configparser.y" { OUTYY(("P(server_username:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->username); @@ -2065,8 +2113,8 @@ yyreduce: } break; - case 112: -#line 377 "util/configparser.y" + case 113: +#line 379 "util/configparser.y" { OUTYY(("P(server_directory:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->directory); @@ -2074,8 +2122,8 @@ yyreduce: } break; - case 113: -#line 384 "util/configparser.y" + case 114: +#line 386 "util/configparser.y" { OUTYY(("P(server_logfile:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->logfile); @@ -2084,8 +2132,8 @@ yyreduce: } break; - case 114: -#line 392 "util/configparser.y" + case 115: +#line 394 "util/configparser.y" { OUTYY(("P(server_pidfile:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->pidfile); @@ -2093,8 +2141,8 @@ yyreduce: } break; - case 115: -#line 399 "util/configparser.y" + case 116: +#line 401 "util/configparser.y" { OUTYY(("P(server_root_hints:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->root_hints, (yyvsp[(2) - (2)].str))) @@ -2102,8 +2150,8 @@ yyreduce: } break; - case 116: -#line 406 "util/configparser.y" + case 117: +#line 408 "util/configparser.y" { OUTYY(("P(server_dlv_anchor_file:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->dlv_anchor_file); @@ -2111,8 +2159,8 @@ yyreduce: } break; - case 117: -#line 413 "util/configparser.y" + case 118: +#line 415 "util/configparser.y" { OUTYY(("P(server_dlv_anchor:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->dlv_anchor_list, (yyvsp[(2) - (2)].str))) @@ -2120,8 +2168,8 @@ yyreduce: } break; - case 118: -#line 420 "util/configparser.y" + case 119: +#line 422 "util/configparser.y" { OUTYY(("P(server_trust_anchor_file:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg-> @@ -2130,8 +2178,8 @@ yyreduce: } break; - case 119: -#line 428 "util/configparser.y" + case 120: +#line 430 "util/configparser.y" { OUTYY(("P(server_trusted_keys_file:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg-> @@ -2140,8 +2188,8 @@ yyreduce: } break; - case 120: -#line 436 "util/configparser.y" + case 121: +#line 438 "util/configparser.y" { OUTYY(("P(server_trust_anchor:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->trust_anchor_list, (yyvsp[(2) - (2)].str))) @@ -2149,8 +2197,8 @@ yyreduce: } break; - case 121: -#line 443 "util/configparser.y" + case 122: +#line 445 "util/configparser.y" { OUTYY(("P(server_hide_identity:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2160,8 +2208,8 @@ yyreduce: } break; - case 122: -#line 452 "util/configparser.y" + case 123: +#line 454 "util/configparser.y" { OUTYY(("P(server_hide_version:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2171,8 +2219,8 @@ yyreduce: } break; - case 123: -#line 461 "util/configparser.y" + case 124: +#line 463 "util/configparser.y" { OUTYY(("P(server_identity:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->identity); @@ -2180,8 +2228,8 @@ yyreduce: } break; - case 124: -#line 468 "util/configparser.y" + case 125: +#line 470 "util/configparser.y" { OUTYY(("P(server_version:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->version); @@ -2189,8 +2237,8 @@ yyreduce: } break; - case 125: -#line 475 "util/configparser.y" + case 126: +#line 477 "util/configparser.y" { OUTYY(("P(server_msg_buffer_size:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -2202,8 +2250,8 @@ yyreduce: } break; - case 126: -#line 486 "util/configparser.y" + case 127: +#line 488 "util/configparser.y" { OUTYY(("P(server_msg_cache_size:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->msg_cache_size)) @@ -2212,8 +2260,8 @@ yyreduce: } break; - case 127: -#line 494 "util/configparser.y" + case 128: +#line 496 "util/configparser.y" { OUTYY(("P(server_msg_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -2227,8 +2275,8 @@ yyreduce: } break; - case 128: -#line 507 "util/configparser.y" + case 129: +#line 509 "util/configparser.y" { OUTYY(("P(server_num_queries_per_thread:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -2238,8 +2286,8 @@ yyreduce: } break; - case 129: -#line 516 "util/configparser.y" + case 130: +#line 518 "util/configparser.y" { OUTYY(("P(server_rrset_cache_size:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->rrset_cache_size)) @@ -2248,8 +2296,8 @@ yyreduce: } break; - case 130: -#line 524 "util/configparser.y" + case 131: +#line 526 "util/configparser.y" { OUTYY(("P(server_rrset_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -2263,8 +2311,8 @@ yyreduce: } break; - case 131: -#line 537 "util/configparser.y" + case 132: +#line 539 "util/configparser.y" { OUTYY(("P(server_infra_host_ttl:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -2274,8 +2322,8 @@ yyreduce: } break; - case 132: -#line 546 "util/configparser.y" + case 133: +#line 548 "util/configparser.y" { OUTYY(("P(server_infra_lame_ttl:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -2285,8 +2333,8 @@ yyreduce: } break; - case 133: -#line 555 "util/configparser.y" + case 134: +#line 557 "util/configparser.y" { OUTYY(("P(server_infra_cache_numhosts:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -2296,8 +2344,8 @@ yyreduce: } break; - case 134: -#line 564 "util/configparser.y" + case 135: +#line 566 "util/configparser.y" { OUTYY(("P(server_infra_cache_lame_size:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg-> @@ -2307,8 +2355,8 @@ yyreduce: } break; - case 135: -#line 573 "util/configparser.y" + case 136: +#line 575 "util/configparser.y" { OUTYY(("P(server_infra_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -2322,8 +2370,8 @@ yyreduce: } break; - case 136: -#line 586 "util/configparser.y" + case 137: +#line 588 "util/configparser.y" { OUTYY(("P(server_target_fetch_policy:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->target_fetch_policy); @@ -2331,8 +2379,8 @@ yyreduce: } break; - case 137: -#line 593 "util/configparser.y" + case 138: +#line 595 "util/configparser.y" { OUTYY(("P(server_harden_short_bufsize:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2343,8 +2391,8 @@ yyreduce: } break; - case 138: -#line 603 "util/configparser.y" + case 139: +#line 605 "util/configparser.y" { OUTYY(("P(server_harden_large_queries:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2355,8 +2403,8 @@ yyreduce: } break; - case 139: -#line 613 "util/configparser.y" + case 140: +#line 615 "util/configparser.y" { OUTYY(("P(server_harden_glue:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2367,8 +2415,8 @@ yyreduce: } break; - case 140: -#line 623 "util/configparser.y" + case 141: +#line 625 "util/configparser.y" { OUTYY(("P(server_harden_dnssec_stripped:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2379,8 +2427,8 @@ yyreduce: } break; - case 141: -#line 633 "util/configparser.y" + case 142: +#line 635 "util/configparser.y" { OUTYY(("P(server_harden_referral_path:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2391,8 +2439,8 @@ yyreduce: } break; - case 142: -#line 643 "util/configparser.y" + case 143: +#line 645 "util/configparser.y" { OUTYY(("P(server_use_caps_for_id:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2403,8 +2451,8 @@ yyreduce: } break; - case 143: -#line 653 "util/configparser.y" + case 144: +#line 655 "util/configparser.y" { OUTYY(("P(server_private_address:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->private_address, (yyvsp[(2) - (2)].str))) @@ -2412,8 +2460,8 @@ yyreduce: } break; - case 144: -#line 660 "util/configparser.y" + case 145: +#line 662 "util/configparser.y" { OUTYY(("P(server_private_domain:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->private_domain, (yyvsp[(2) - (2)].str))) @@ -2421,8 +2469,8 @@ yyreduce: } break; - case 145: -#line 667 "util/configparser.y" + case 146: +#line 669 "util/configparser.y" { OUTYY(("P(server_do_not_query_address:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->donotqueryaddrs, (yyvsp[(2) - (2)].str))) @@ -2430,8 +2478,8 @@ yyreduce: } break; - case 146: -#line 674 "util/configparser.y" + case 147: +#line 676 "util/configparser.y" { OUTYY(("P(server_do_not_query_localhost:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2442,8 +2490,8 @@ yyreduce: } break; - case 147: -#line 684 "util/configparser.y" + case 148: +#line 686 "util/configparser.y" { OUTYY(("P(server_access_control:%s %s)\n", (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str))); if(strcmp((yyvsp[(3) - (3)].str), "deny")!=0 && strcmp((yyvsp[(3) - (3)].str), "refuse")!=0 && @@ -2458,8 +2506,8 @@ yyreduce: } break; - case 148: -#line 698 "util/configparser.y" + case 149: +#line 700 "util/configparser.y" { OUTYY(("P(server_module_conf:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->module_conf); @@ -2467,8 +2515,8 @@ yyreduce: } break; - case 149: -#line 705 "util/configparser.y" + case 150: +#line 707 "util/configparser.y" { OUTYY(("P(server_val_override_date:%s)\n", (yyvsp[(2) - (2)].str))); if(strlen((yyvsp[(2) - (2)].str)) == 0 || strcmp((yyvsp[(2) - (2)].str), "0") == 0) { @@ -2487,8 +2535,8 @@ yyreduce: } break; - case 150: -#line 723 "util/configparser.y" + case 151: +#line 725 "util/configparser.y" { OUTYY(("P(server_cache_max_ttl:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -2498,8 +2546,8 @@ yyreduce: } break; - case 151: -#line 732 "util/configparser.y" + case 152: +#line 734 "util/configparser.y" { OUTYY(("P(server_bogus_ttl:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0) @@ -2509,8 +2557,8 @@ yyreduce: } break; - case 152: -#line 741 "util/configparser.y" + case 153: +#line 743 "util/configparser.y" { OUTYY(("P(server_val_clean_additional:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2521,8 +2569,8 @@ yyreduce: } break; - case 153: -#line 751 "util/configparser.y" + case 154: +#line 753 "util/configparser.y" { OUTYY(("P(server_val_permissive_mode:%s)\n", (yyvsp[(2) - (2)].str))); if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) @@ -2533,8 +2581,8 @@ yyreduce: } break; - case 154: -#line 761 "util/configparser.y" + case 155: +#line 763 "util/configparser.y" { OUTYY(("P(server_val_nsec3_keysize_iterations:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->val_nsec3_key_iterations); @@ -2542,8 +2590,8 @@ yyreduce: } break; - case 155: -#line 768 "util/configparser.y" + case 156: +#line 770 "util/configparser.y" { OUTYY(("P(server_key_cache_size:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->key_cache_size)) @@ -2552,8 +2600,8 @@ yyreduce: } break; - case 156: -#line 776 "util/configparser.y" + case 157: +#line 778 "util/configparser.y" { OUTYY(("P(server_key_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str))); if(atoi((yyvsp[(2) - (2)].str)) == 0) @@ -2567,8 +2615,8 @@ yyreduce: } break; - case 157: -#line 789 "util/configparser.y" + case 158: +#line 791 "util/configparser.y" { OUTYY(("P(server_neg_cache_size:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->neg_cache_size)) @@ -2577,8 +2625,8 @@ yyreduce: } break; - case 158: -#line 797 "util/configparser.y" + case 159: +#line 799 "util/configparser.y" { OUTYY(("P(server_local_zone:%s %s)\n", (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str))); if(strcmp((yyvsp[(3) - (3)].str), "static")!=0 && strcmp((yyvsp[(3) - (3)].str), "deny")!=0 && @@ -2598,8 +2646,8 @@ yyreduce: } break; - case 159: -#line 816 "util/configparser.y" + case 160: +#line 818 "util/configparser.y" { OUTYY(("P(server_local_data:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->local_data, (yyvsp[(2) - (2)].str))) @@ -2607,8 +2655,8 @@ yyreduce: } break; - case 160: -#line 823 "util/configparser.y" + case 161: +#line 825 "util/configparser.y" { OUTYY(("P(name:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->stubs->name); @@ -2616,8 +2664,8 @@ yyreduce: } break; - case 161: -#line 830 "util/configparser.y" + case 162: +#line 832 "util/configparser.y" { OUTYY(("P(stub-host:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->hosts, (yyvsp[(2) - (2)].str))) @@ -2625,8 +2673,8 @@ yyreduce: } break; - case 162: -#line 837 "util/configparser.y" + case 163: +#line 839 "util/configparser.y" { OUTYY(("P(stub-addr:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->stubs->addrs, (yyvsp[(2) - (2)].str))) @@ -2634,8 +2682,8 @@ yyreduce: } break; - case 163: -#line 844 "util/configparser.y" + case 164: +#line 846 "util/configparser.y" { OUTYY(("P(name:%s)\n", (yyvsp[(2) - (2)].str))); free(cfg_parser->cfg->forwards->name); @@ -2643,8 +2691,8 @@ yyreduce: } break; - case 164: -#line 851 "util/configparser.y" + case 165: +#line 853 "util/configparser.y" { OUTYY(("P(forward-host:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->hosts, (yyvsp[(2) - (2)].str))) @@ -2652,8 +2700,8 @@ yyreduce: } break; - case 165: -#line 858 "util/configparser.y" + case 166: +#line 860 "util/configparser.y" { OUTYY(("P(forward-addr:%s)\n", (yyvsp[(2) - (2)].str))); if(!cfg_strlist_insert(&cfg_parser->cfg->forwards->addrs, (yyvsp[(2) - (2)].str))) @@ -2661,9 +2709,84 @@ yyreduce: } break; + case 167: +#line 867 "util/configparser.y" + { + OUTYY(("\nP(remote-control:)\n")); + } + break; + + case 177: +#line 878 "util/configparser.y" + { + OUTYY(("P(control_enable:%s)\n", (yyvsp[(2) - (2)].str))); + if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0) + yyerror("expected yes or no."); + else cfg_parser->cfg->remote_control_enable = + (strcmp((yyvsp[(2) - (2)].str), "yes")==0); + free((yyvsp[(2) - (2)].str)); + } + break; + + case 178: +#line 888 "util/configparser.y" + { + OUTYY(("P(control_port:%s)\n", (yyvsp[(2) - (2)].str))); + if(atoi((yyvsp[(2) - (2)].str)) == 0) + yyerror("control port number expected"); + else cfg_parser->cfg->control_port = atoi((yyvsp[(2) - (2)].str)); + free((yyvsp[(2) - (2)].str)); + } + break; + + case 179: +#line 897 "util/configparser.y" + { + OUTYY(("P(control_interface:%s)\n", (yyvsp[(2) - (2)].str))); + if(!cfg_strlist_insert(&cfg_parser->cfg->control_ifs, (yyvsp[(2) - (2)].str))) + yyerror("out of memory"); + } + break; + + case 180: +#line 904 "util/configparser.y" + { + OUTYY(("P(rc_server_key_file:%s)\n", (yyvsp[(2) - (2)].str))); + free(cfg_parser->cfg->server_key_file); + cfg_parser->cfg->server_key_file = (yyvsp[(2) - (2)].str); + } + break; + + case 181: +#line 911 "util/configparser.y" + { + OUTYY(("P(rc_server_cert_file:%s)\n", (yyvsp[(2) - (2)].str))); + free(cfg_parser->cfg->server_cert_file); + cfg_parser->cfg->server_cert_file = (yyvsp[(2) - (2)].str); + } + break; + + case 182: +#line 918 "util/configparser.y" + { + OUTYY(("P(rc_control_key_file:%s)\n", (yyvsp[(2) - (2)].str))); + free(cfg_parser->cfg->control_key_file); + cfg_parser->cfg->control_key_file = (yyvsp[(2) - (2)].str); + } + break; + + case 183: +#line 925 "util/configparser.y" + { + OUTYY(("P(rc_control_cert_file:%s)\n", (yyvsp[(2) - (2)].str))); + free(cfg_parser->cfg->control_cert_file); + cfg_parser->cfg->control_cert_file = (yyvsp[(2) - (2)].str); + } + break; + /* Line 1267 of yacc.c. */ -#line 2667 "util/configparser.c" +#line 2790 "util/configparser.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2877,7 +3000,7 @@ yyreturn: } -#line 864 "util/configparser.y" +#line 931 "util/configparser.y" /* parse helper routines could be here */ diff --git a/util/configparser.h b/util/configparser.h index e0082daec..d6987c4f6 100644 --- a/util/configparser.h +++ b/util/configparser.h @@ -123,7 +123,15 @@ VAR_NEG_CACHE_SIZE = 339, VAR_HARDEN_REFERRAL_PATH = 340, VAR_PRIVATE_ADDRESS = 341, - VAR_PRIVATE_DOMAIN = 342 + VAR_PRIVATE_DOMAIN = 342, + VAR_REMOTE_CONTROL = 343, + VAR_CONTROL_ENABLE = 344, + VAR_CONTROL_INTERFACE = 345, + VAR_CONTROL_PORT = 346, + VAR_SERVER_KEY_FILE = 347, + VAR_SERVER_CERT_FILE = 348, + VAR_CONTROL_KEY_FILE = 349, + VAR_CONTROL_CERT_FILE = 350 }; #endif /* Tokens. */ @@ -212,6 +220,14 @@ #define VAR_HARDEN_REFERRAL_PATH 340 #define VAR_PRIVATE_ADDRESS 341 #define VAR_PRIVATE_DOMAIN 342 +#define VAR_REMOTE_CONTROL 343 +#define VAR_CONTROL_ENABLE 344 +#define VAR_CONTROL_INTERFACE 345 +#define VAR_CONTROL_PORT 346 +#define VAR_SERVER_KEY_FILE 347 +#define VAR_SERVER_CERT_FILE 348 +#define VAR_CONTROL_KEY_FILE 349 +#define VAR_CONTROL_CERT_FILE 350 @@ -223,7 +239,7 @@ typedef union YYSTYPE char* str; } /* Line 1489 of yacc.c. */ -#line 227 "util/configparser.h" +#line 243 "util/configparser.h" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 diff --git a/util/configparser.y b/util/configparser.y index fb920ee28..2a7f2079a 100644 --- a/util/configparser.y +++ b/util/configparser.y @@ -92,12 +92,14 @@ extern struct config_parser_state* cfg_parser; %token VAR_STATISTICS_CUMULATIVE VAR_OUTGOING_PORT_PERMIT %token VAR_OUTGOING_PORT_AVOID VAR_DLV_ANCHOR_FILE VAR_DLV_ANCHOR %token VAR_NEG_CACHE_SIZE VAR_HARDEN_REFERRAL_PATH VAR_PRIVATE_ADDRESS -%token VAR_PRIVATE_DOMAIN +%token VAR_PRIVATE_DOMAIN VAR_REMOTE_CONTROL VAR_CONTROL_ENABLE +%token VAR_CONTROL_INTERFACE VAR_CONTROL_PORT VAR_SERVER_KEY_FILE +%token VAR_SERVER_CERT_FILE VAR_CONTROL_KEY_FILE VAR_CONTROL_CERT_FILE %% toplevelvars: /* empty */ | toplevelvars toplevelvar ; toplevelvar: serverstart contents_server | stubstart contents_stub | - forwardstart contents_forward + forwardstart contents_forward | rcstart contents_rc ; /* server: declaration */ @@ -861,6 +863,71 @@ forward_addr: VAR_FORWARD_ADDR STRING yyerror("out of memory"); } ; +rcstart: VAR_REMOTE_CONTROL + { + OUTYY(("\nP(remote-control:)\n")); + } + ; +contents_rc: contents_rc content_rc + | ; +content_rc: rc_control_enable | rc_control_interface | rc_control_port | + rc_server_key_file | rc_server_cert_file | rc_control_key_file | + rc_control_cert_file + ; +rc_control_enable: VAR_CONTROL_ENABLE STRING + { + OUTYY(("P(control_enable:%s)\n", $2)); + if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0) + yyerror("expected yes or no."); + else cfg_parser->cfg->remote_control_enable = + (strcmp($2, "yes")==0); + free($2); + } + ; +rc_control_port: VAR_CONTROL_PORT STRING + { + OUTYY(("P(control_port:%s)\n", $2)); + if(atoi($2) == 0) + yyerror("control port number expected"); + else cfg_parser->cfg->control_port = atoi($2); + free($2); + } + ; +rc_control_interface: VAR_CONTROL_INTERFACE STRING + { + OUTYY(("P(control_interface:%s)\n", $2)); + if(!cfg_strlist_insert(&cfg_parser->cfg->control_ifs, $2)) + yyerror("out of memory"); + } + ; +rc_server_key_file: VAR_SERVER_KEY_FILE STRING + { + OUTYY(("P(rc_server_key_file:%s)\n", $2)); + free(cfg_parser->cfg->server_key_file); + cfg_parser->cfg->server_key_file = $2; + } + ; +rc_server_cert_file: VAR_SERVER_CERT_FILE STRING + { + OUTYY(("P(rc_server_cert_file:%s)\n", $2)); + free(cfg_parser->cfg->server_cert_file); + cfg_parser->cfg->server_cert_file = $2; + } + ; +rc_control_key_file: VAR_CONTROL_KEY_FILE STRING + { + OUTYY(("P(rc_control_key_file:%s)\n", $2)); + free(cfg_parser->cfg->control_key_file); + cfg_parser->cfg->control_key_file = $2; + } + ; +rc_control_cert_file: VAR_CONTROL_CERT_FILE STRING + { + OUTYY(("P(rc_control_cert_file:%s)\n", $2)); + free(cfg_parser->cfg->control_cert_file); + cfg_parser->cfg->control_cert_file = $2; + } + ; %% /* parse helper routines could be here */ diff --git a/util/fptr_wlist.c b/util/fptr_wlist.c index 949b24b57..7646ceb92 100644 --- a/util/fptr_wlist.c +++ b/util/fptr_wlist.c @@ -47,6 +47,7 @@ #include "util/fptr_wlist.h" #include "util/mini_event.h" #include "daemon/worker.h" +#include "daemon/remote.h" #include "services/outside_network.h" #include "services/mesh.h" #include "services/localzone.h" @@ -84,6 +85,8 @@ fptr_whitelist_comm_point_raw(comm_point_callback_t *fptr) { if(fptr == &tube_handle_listen) return 1; else if(fptr == &tube_handle_write) return 1; + else if(fptr == &remote_accept_callback) return 1; + else if(fptr == &remote_control_callback) return 1; return 0; } diff --git a/util/netevent.c b/util/netevent.c index ba23f4aeb..b6d9cccfb 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -539,6 +539,44 @@ setup_tcp_handler(struct comm_point* c, int fd) comm_point_start_listening(c, fd, TCP_QUERY_TIMEOUT); } +int comm_point_perform_accept(struct comm_point* c, + struct sockaddr_storage* addr, socklen_t* addrlen) +{ + int new_fd; + *addrlen = (socklen_t)sizeof(*addr); + new_fd = accept(c->fd, (struct sockaddr*)addr, addrlen); + if(new_fd == -1) { +#ifndef USE_WINSOCK + /* EINTR is signal interrupt. others are closed connection. */ + if( errno != EINTR +#ifdef EWOULDBLOCK + && errno != EWOULDBLOCK +#endif +#ifdef ECONNABORTED + && errno != ECONNABORTED +#endif +#ifdef EPROTO + && errno != EPROTO +#endif /* EPROTO */ + ) + return -1; + log_err("accept failed: %s", strerror(errno)); +#else /* USE_WINSOCK */ + if(WSAGetLastError() == WSAEINPROGRESS || + WSAGetLastError() == WSAECONNRESET) + return -1; + if(WSAGetLastError() == WSAEWOULDBLOCK) { + winsock_tcp_wouldblock(&c->ev->ev, EV_READ); + return -1; + } + log_err("accept failed: %s", wsa_strerror(WSAGetLastError())); +#endif + log_addr(0, "remote address is", addr, *addrlen); + return -1; + } + return new_fd; +} + void comm_point_tcp_accept_callback(int fd, short event, void* arg) { @@ -557,40 +595,10 @@ comm_point_tcp_accept_callback(int fd, short event, void* arg) } /* accept incoming connection. */ c_hdl = c->tcp_free; - c_hdl->repinfo.addrlen = (socklen_t)sizeof(c_hdl->repinfo.addr); log_assert(fd != -1); - new_fd = accept(fd, (struct sockaddr*)&c_hdl->repinfo.addr, + new_fd = comm_point_perform_accept(c, &c_hdl->repinfo.addr, &c_hdl->repinfo.addrlen); - if(new_fd == -1) { -#ifndef USE_WINSOCK - /* EINTR is signal interrupt. others are closed connection. */ - if( errno != EINTR -#ifdef EWOULDBLOCK - && errno != EWOULDBLOCK -#endif -#ifdef ECONNABORTED - && errno != ECONNABORTED -#endif -#ifdef EPROTO - && errno != EPROTO -#endif /* EPROTO */ - ) - return; - log_err("accept failed: %s", strerror(errno)); -#else /* USE_WINSOCK */ - if(WSAGetLastError() == WSAEINPROGRESS || - WSAGetLastError() == WSAECONNRESET) - return; - if(WSAGetLastError() == WSAEWOULDBLOCK) { - winsock_tcp_wouldblock(&c->ev->ev, EV_READ); - return ; - } - log_err("accept failed: %s", wsa_strerror(WSAGetLastError())); -#endif - log_addr(0, "remote address is", &c_hdl->repinfo.addr, - c_hdl->repinfo.addrlen); - return; - } + /* grab the tcp handler buffers */ c->tcp_free = c_hdl->tcp_free; if(!c->tcp_free) { diff --git a/util/netevent.h b/util/netevent.h index 2684e3f47..b2959b392 100644 --- a/util/netevent.h +++ b/util/netevent.h @@ -520,6 +520,17 @@ int comm_signal_bind(struct comm_signal* comsig, int sig); */ void comm_signal_delete(struct comm_signal* comsig); +/** + * perform accept(2) with error checking. + * @param c: commpoint with accept fd. + * @param addr: remote end returned here. + * @param len: length of remote end returned here. + * @return new fd, or -1 on error. + * if -1, error message has been printed if necessary, simply drop + * out of the reading handler. + */ +int comm_point_perform_accept(struct comm_point* c, + struct sockaddr_storage* addr, socklen_t* addrlen); /**** internal routines ****/