return 1;
}
#ifdef CLIENT_SUBNET
+ /* Do not skip cache lookup if no valid subnet data or the client
+ * asks to remain anonymous. */
if(!edns.edns_present || !edns.subnet_validdata ||
edns.subnet_source_mask == 0) {
- /* Do not probe cache if subnet option is set. We always start
- * a full resolve. Unless client specifically asked not to
- * reveal any bits */
#endif
h = query_info_hash(&qinfo);
if((e=slabhash_lookup(worker->env.msg_cache, h, &qinfo, 0))) {
worker_delete(worker);
return 0;
}
-#ifdef CLIENT_SUBNET
- worker->back = outside_network_create(worker->base,
- cfg->msg_buffer_size, (size_t)cfg->outgoing_num_ports,
- cfg->out_ifs, cfg->num_out_ifs, cfg->do_ip4, cfg->do_ip6,
- cfg->do_tcp?cfg->outgoing_num_tcp:0,
- worker->daemon->env->infra_cache, worker->rndstate,
- cfg->use_caps_bits_for_id, worker->ports, worker->numports,
- cfg->unwanted_threshold, &worker_alloc_cleanup, worker,
- cfg->do_udp, worker->daemon->connect_sslctx,
- worker->daemon->edns_subnet_upstreams);
-#else
+
worker->back = outside_network_create(worker->base,
cfg->msg_buffer_size, (size_t)cfg->outgoing_num_ports,
cfg->out_ifs, cfg->num_out_ifs, cfg->do_ip4, cfg->do_ip6,
worker->daemon->env->infra_cache, worker->rndstate,
cfg->use_caps_bits_for_id, worker->ports, worker->numports,
cfg->unwanted_threshold, &worker_alloc_cleanup, worker,
- cfg->do_udp, worker->daemon->connect_sslctx);
+ cfg->do_udp, worker->daemon->connect_sslctx
+#ifdef CLIENT_SUBNET
+ ,worker->daemon->edns_subnet_upstreams
#endif
+ );
if(!worker->back) {
log_err("could not create outgoing sockets");
worker_delete(worker);
if(!e)
return NULL;
e->qstate = q;
-#ifdef CLIENT_SUBNET
e->qsent = outnet_serviced_query(worker->back, qname,
qnamelen, qtype, qclass, flags, dnssec, want_dnssec,
q->env->cfg->tcp_upstream, q->env->cfg->ssl_upstream, addr,
addrlen, zone, zonelen, worker_handle_service_reply, e,
- worker->back->udp_buff, &q->edns_out);
-#else
- e->qsent = outnet_serviced_query(worker->back, qname,
- qnamelen, qtype, qclass, flags, dnssec, want_dnssec,
- q->env->cfg->tcp_upstream, q->env->cfg->ssl_upstream, addr,
- addrlen, zone, zonelen, worker_handle_service_reply, e,
- worker->back->udp_buff);
+ worker->back->udp_buff
+#ifdef CLIENT_SUBNET
+ , &q->edns_out
#endif
+ );
if(!e->qsent) {
return NULL;
}
-
/*
* edns-subnet/edns-subnet.c - Storage for white listed servers
*
- * Copyright (c) 2012, NLnet Labs. All rights reserved.
+ * Copyright (c) 2013, NLnet Labs. All rights reserved.
*
* This software is open source.
*
#include "util/config_file.h"
#include "util/net_help.h"
+/** Opcode for edns subnet option, is TBD. */
+uint16_t EDNSSUBNET_OPCODE = 0x50fa;
+uint8_t EDNSSUBNET_MAX_SUBNET_IP4 = 24;
+uint8_t EDNSSUBNET_MAX_SUBNET_IP6 = 64;
+
struct ednssubnet_upstream*
upstream_create(void)
{
}
int
-upstream_lookup(struct ednssubnet_upstream* upstream, struct sockaddr_storage* addr,
+upstream_is_whitelisted(struct ednssubnet_upstream* upstream, struct sockaddr_storage* addr,
socklen_t addrlen)
{
return addr_tree_lookup(&upstream->tree, addr, addrlen) != NULL;
/*
* edns-subnet/edns-subnet.h - Storage for white listed servers
*
- * Copyright (c) 2012, NLnet Labs. All rights reserved.
+ * Copyright (c) 2013, NLnet Labs. All rights reserved.
*
* This software is open source.
*
struct config_file;
struct regional;
-/** In use by the edns subnet option code*/
-#define IANA_ADDRFAM_IP4 1
-#define IANA_ADDRFAM_IP6 2
+/** In use by the edns subnet option code, as assigned by IANA */
+#define EDNSSUBNET_ADDRFAM_IP4 1
+#define EDNSSUBNET_ADDRFAM_IP6 2
+
+/** Opcode for edns subnet option, is TBD. */
+extern uint16_t EDNSSUBNET_OPCODE;
+/** Maximum number of bits we are willing to expose */
+extern uint8_t EDNSSUBNET_MAX_SUBNET_IP4;
+extern uint8_t EDNSSUBNET_MAX_SUBNET_IP6;
/**
* ednssubnet_upstream structure
int upstream_apply_cfg(struct ednssubnet_upstream* upstream, struct config_file* cfg);
/**
- * See if an address is blocked.
+ * See if an address is whitelisted.
* @param upstream: structure for address storage.
* @param addr: address to check
* @param addrlen: length of addr.
* @return: true if the address is whitelisted for subnet option.
*/
-int upstream_lookup(struct ednssubnet_upstream* upstream, struct sockaddr_storage* addr,
+int upstream_is_whitelisted(struct ednssubnet_upstream* upstream, struct sockaddr_storage* addr,
socklen_t addrlen);
/**
-/**
+/*
+ * edns-subnet/subnetmod.c - process EDNS subnet option.
+ *
+ * Copyright (c) 2013, 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
* subnet module for unbound.
*/
static struct subnet_qstate*
sub_new_getmsg(struct module_qstate* qstate, struct subnet_qstate* snq)
{
- //~ snq->edns.subnet_downstream = 0;
- //~ snq->edns.subnet_validdata = 0;
return snq;
}
int subnetmod_init(struct module_env* env, int id)
{
- //~ env->subnet_module_id = id;
return 1;
}
strmodulevent(event));
log_query_info(VERB_QUERY, "subnet operate: query",
&qstate->qinfo);
- (void)outbound;
/* This query is new for us */
if(event == module_event_new ||
(event == module_event_pass && snq == NULL)) {
return;
}
/* Now see if we allow some stretch */
- max_mask = min(cachehit.scopemask, MAX_CLIENT_SUBNET_IP4);
+ max_mask = min(cachehit.scopemask, EDNSSUBNET_MAX_SUBNET_IP4);
if(max_mask <= snq->subnet_source_mask) {
/* We refuse giving more detail so we use the cache anyway */
//TBD: do stuff and asnwer
verbose(VERB_QUERY, "subnet: done");
qstate->edns_to_client = NULL;
if (!qstate->edns_out.subnet_sent) {
+ verbose(VERB_QUERY, "subnet: did not sent");
if (qstate->edns_in.subnet_validdata) {
verbose(VERB_QUERY, "subnet: received spurious data");
}
if (qstate->edns_out.subnet_downstream) {
+ verbose(VERB_QUERY, "subnet: client shows interest");
qstate->edns_to_client = &qstate->edns_in;
cp_edns_bad_response(qstate->edns_to_client,
qstate->edns_from_client);
}
} else {
+ verbose(VERB_QUERY, "subnet: did sent");
/* subnet sent but nothing came back */
if (!qstate->edns_in.subnet_validdata) {
+ verbose(VERB_QUERY, "subnet: missing data");
// TODO PUT IT IN OUR SPECIAL CACHE
if (qstate->edns_out.subnet_downstream) {
qstate->edns_to_client = &qstate->edns_in;
/* can we accept response? */
size_t sn_octs, remainder;
sn_octs = qstate->edns_out.subnet_source_mask / 8;
+ /* should be enforced by msgparse */
+ assert(sn_octs <= INET6_SIZE);
remainder = 8 - (size_t)(qstate->edns_out.subnet_source_mask % 8);
if(qstate->edns_out.subnet_addr_fam != qstate->edns_in.subnet_addr_fam ||
qstate->edns_out.subnet_source_mask != qstate->edns_in.subnet_source_mask ||
/* we can not, restart query without option */
verbose(VERB_QUERY, "subnet: forged data");
qstate->edns_out.subnet_validdata = 0;
+ qstate->edns_out.subnet_sent = 0;
qstate->ext_state[id] = module_wait_module;
return;
}
verbose(VERB_QUERY, "subnet: now cache it");
- // TODO PUT IT IN OUR SPECIAL CACHE
+ /* TODO PUT IT IN OUR SPECIAL CACHE */
if (qstate->edns_out.subnet_downstream) {
qstate->edns_to_client = qstate->edns_from_client;
verbose(VERB_QUERY, "subnet: attach");
+/*
+ * edns-subnet/subnetmod.h - process EDNS subnet option.
+ *
+ * Copyright (c) 2013, 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
* subnet module for unbound.
/* Construct subnet option from original query */
ss = &s->reply_list->query_reply.addr;
if(((struct sockaddr_in*)ss)->sin_family == AF_INET) {
- edns->subnet_source_mask = MAX_CLIENT_SUBNET_IP4;
- edns->subnet_addr_fam = IANA_ADDRFAM_IP4;
+ edns->subnet_source_mask = EDNSSUBNET_MAX_SUBNET_IP4;
+ edns->subnet_addr_fam = EDNSSUBNET_ADDRFAM_IP4;
sinaddr = &((struct sockaddr_in*)ss)->sin_addr;
memcpy(edns->subnet_addr, (uint8_t *)sinaddr, INET_SIZE);
edns->subnet_validdata = 1;
}
#ifdef INET6
else {
- edns->subnet_source_mask = MAX_CLIENT_SUBNET_IP6;
- edns->subnet_addr_fam = IANA_ADDRFAM_IP6;
+ edns->subnet_source_mask = EDNSSUBNET_MAX_SUBNET_IP6;
+ edns->subnet_addr_fam = EDNSSUBNET_ADDRFAM_IP6;
sinaddr = &((struct sockaddr_in6*)ss)->sin6_addr;
memcpy(edns->subnet_addr, (uint8_t *)sinaddr, INET6_SIZE);
edns->subnet_validdata = 1;
return 0;
}
-#ifdef CLIENT_SUBNET
struct serviced_query*
outnet_serviced_query(struct outside_network* outnet,
uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass,
uint16_t flags, int dnssec, int want_dnssec, int tcp_upstream,
int ssl_upstream, struct sockaddr_storage* addr, socklen_t addrlen,
uint8_t* zone, size_t zonelen, comm_point_callback_t* callback,
- void* callback_arg, ldns_buffer* buff,
- struct edns_data* edns)
-#else
-struct serviced_query*
-outnet_serviced_query(struct outside_network* outnet,
- uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass,
- uint16_t flags, int dnssec, int want_dnssec, int tcp_upstream,
- int ssl_upstream, struct sockaddr_storage* addr, socklen_t addrlen,
- uint8_t* zone, size_t zonelen, comm_point_callback_t* callback,
- void* callback_arg, ldns_buffer* buff)
+ void* callback_arg, ldns_buffer* buff
+#ifdef CLIENT_SUBNET
+ , struct edns_data* edns
#endif
+ )
{
struct serviced_query* sq;
struct service_callback* cb;
}
#ifdef CLIENT_SUBNET
if(edns && edns->subnet_validdata && (edns->subnet_downstream ||
- upstream_lookup(outnet->edns_subnet_upstreams,
+ upstream_is_whitelisted(outnet->edns_subnet_upstreams,
addr, addrlen))) {
sq->edns = edns;
/* This tells our module we've appened the option*/
* @return 0 on error, or pointer to serviced query that is used to answer
* this serviced query may be shared with other callbacks as well.
*/
- #ifdef CLIENT_SUBNET
-struct serviced_query* outnet_serviced_query(struct outside_network* outnet,
- uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass,
- uint16_t flags, int dnssec, int want_dnssec, int tcp_upstream,
- int ssl_upstream, struct sockaddr_storage* addr, socklen_t addrlen,
- uint8_t* zone, size_t zonelen, comm_point_callback_t* callback,
- void* callback_arg, ldns_buffer* buff, struct edns_data* edns);
-#else
+
struct serviced_query* outnet_serviced_query(struct outside_network* outnet,
uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass,
uint16_t flags, int dnssec, int want_dnssec, int tcp_upstream,
int ssl_upstream, struct sockaddr_storage* addr, socklen_t addrlen,
uint8_t* zone, size_t zonelen, comm_point_callback_t* callback,
- void* callback_arg, ldns_buffer* buff);
+ void* callback_arg, ldns_buffer* buff
+#ifdef CLIENT_SUBNET
+ , struct edns_data* edns
#endif
-
+);
/**
* Remove service query callback.
* If that leads to zero callbacks, the query is completely cancelled.
struct edns_data edns;
#ifdef CLIENT_SUBNET
if(edns_out && edns_out->subnet_validdata && (edns_out->subnet_downstream ||
- upstream_lookup(outnet->edns_subnet_upstreams,
+ upstream_is_whitelisted(outnet->edns_subnet_upstreams,
addr, addrlen))) {
/* This tells our module we've appened the option*/
edns_out->subnet_sent = 1;
size_t i, hlen, dlen;
char *errmsg, *ptr;
int wr;
- hlen = strnlen(header, 32);
+ hlen = strlen(header);
dlen = datalen * 3 + 1;
errmsg = (char*) malloc(sizeof(char) * (hlen + dlen));
- strncpy(errmsg, header, hlen+1);
+ strlcpy(errmsg, header, hlen+1);
for(i = 0, ptr = errmsg + hlen; i < datalen; i++, ptr += 3, dlen -= 3) {
wr = snprintf(ptr, dlen, "%02x ", (unsigned int)data[i]);
if (wr < 0 || wr >= (int)dlen) break;
#ifdef HAVE_GLOB_H
# include <glob.h>
#endif
+#if CLIENT_SUBNET
+#include "edns-subnet/edns-subnet.h"
+#endif
/** global config during parsing */
struct config_parser_state* cfg_parser = 0;
cfg->client_subnet = NULL;
/* OPC Not assigned yet! taken from http://wilmer.gaa.st/
* edns-client-subnet/bind-9.7.1-dig-edns-client-subnet.diff */
- cfg->client_subnet_opc = 0x50fa;
+ cfg->client_subnet_opcode = 0x50fa;
cfg->max_client_subnet_ipv4 = 24;
cfg->max_client_subnet_ipv6 = 64;
#endif
else S_STRLIST("send-client-subnet", client_subnet)
else S_NUMBER_OR_ZERO("max-client-subnet-ipv4:", max_client_subnet_ipv4)
else S_NUMBER_OR_ZERO("max-client-subnet-ipv6:", max_client_subnet_ipv6)
- else S_NUMBER_OR_ZERO("client-subnet-opc:", client_subnet_opc)
+ else S_NUMBER_OR_ZERO("client-subnet-opc:", client_subnet_opcode)
#endif
else if (strcmp(opt, "outgoing-interface:") == 0) {
char* d = strdup(val);
else O_LST(opt, "send-client-subnet", client_subnet)
else O_DEC(opt, "max-client-subnet-ipv4", max_client_subnet_ipv4)
else O_DEC(opt, "max-client-subnet-ipv6", max_client_subnet_ipv6)
- else O_DEC(opt, "client-subnet-opc", client_subnet_opc)
+ else O_DEC(opt, "client-subnet-opc", client_subnet_opcode)
#endif
/* not here:
* outgoing-permit, outgoing-avoid - have list of ports
MIN_TTL = (uint32_t)config->min_ttl;
EDNS_ADVERTISED_SIZE = (uint16_t)config->edns_buffer_size;
#ifdef CLIENT_SUBNET
- EDNS_SUBNET_OPC = (uint16_t)config->client_subnet_opc;
- MAX_CLIENT_SUBNET_IP4 = (uint8_t)config->max_client_subnet_ipv4;
- MAX_CLIENT_SUBNET_IP6 = (uint8_t)config->max_client_subnet_ipv6;
+ EDNSSUBNET_OPCODE = (uint16_t)config->client_subnet_opcode;
+ EDNSSUBNET_MAX_SUBNET_IP4 = (uint8_t)config->max_client_subnet_ipv4;
+ EDNSSUBNET_MAX_SUBNET_IP6 = (uint8_t)config->max_client_subnet_ipv6;
#endif
MINIMAL_RESPONSES = config->minimal_responses;
RRSET_ROUNDROBIN = config->rrset_roundrobin;
* accept option from, linked list */
struct config_strlist* client_subnet;
/** opcode assigned by IANA for edns0-client-subnet option */
- int client_subnet_opc;
+ int client_subnet_opcode;
/** Subnet length we are willing to give up privacy for */
int max_client_subnet_ipv4;
int max_client_subnet_ipv6;
#include "config.h"
#include "util/configyyrename.h"
-/* A lexical scanner generated by flex */
-/* Scanner skeleton version:
- * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
- * $FreeBSD: src/usr.bin/lex/flex.skl,v 1.10.2.2.2.1 2010/12/21 17:09:25 kensmith Exp $
- */
+#line 3 "<stdout>"
-#if defined(__FreeBSD__)
-#include <sys/cdefs.h>
-#else
-#define __unused
-#define __dead2
-#endif
+#define YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 35
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+/* end standard C headers. */
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
#endif
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
-#ifdef __cplusplus
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
-#include <stdlib.h>
-#include <unistd.h>
+#endif /* ! C99 */
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
+#endif /* ! FLEXINT_H */
+
+#ifdef __cplusplus
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
-#if __STDC__
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
-#define YY_USE_PROTOS
#define YY_USE_CONST
-#endif /* __STDC__ */
+#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include <io.h>
-#include <stdlib.h>
-#define YY_USE_CONST
-#define YY_USE_PROTOS
-#endif
-
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
/* Returned upon end-of-file. */
#define YY_NULL 0
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
-#define BEGIN yy_start = 1 + 2 *
+#define BEGIN (yy_start) = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
-#define YY_START ((yy_start - 1) / 2)
+#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
+#define YY_NEW_FILE yyrestart(yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
+#endif
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
extern int yyleng;
+
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator). This
- * avoids problems with code like:
- *
- * if ( condition_holds )
- * yyless( 5 );
- * else
- * do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
+ #define YY_LESS_LINENO(n)
+
+/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
- *yy_cp = yy_hold_char; \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
- yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-#define unput(c) yyunput( c, yytext_ptr )
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-typedef unsigned int yy_size_t;
+#define unput(c) yyunput( c, (yytext_ptr) )
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
{
FILE *yy_input_file;
*/
int yy_at_bol;
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
+
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
+
};
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-static YY_BUFFER_STATE yy_current_buffer = 0;
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
*/
-#define YY_CURRENT_BUFFER yy_current_buffer
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+ : NULL)
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
-
static int yy_n_chars; /* number of characters read into yy_ch_buf */
-
-
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1; /* whether we need to initialize */
+static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
*/
static int yy_did_buffer_switch_on_eof;
-void yyrestart YY_PROTO(( FILE *input_file ));
+void yyrestart (FILE *input_file );
+void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
+void yy_delete_buffer (YY_BUFFER_STATE b );
+void yy_flush_buffer (YY_BUFFER_STATE b );
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state (void );
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+static void yyensure_buffer_stack (void );
+static void yy_load_buffer_state (void );
+static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) __unused;
-static void yy_flex_free YY_PROTO(( void * ));
+YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
+
+void *yyalloc (yy_size_t );
+void *yyrealloc (void *,yy_size_t );
+void yyfree (void * );
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
- if ( ! yy_current_buffer ) \
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
- yy_current_buffer->yy_is_interactive = is_interactive; \
+ if ( ! YY_CURRENT_BUFFER ){ \
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
- if ( ! yy_current_buffer ) \
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
- yy_current_buffer->yy_at_bol = at_bol; \
+ if ( ! YY_CURRENT_BUFFER ){\
+ yyensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* Begin user sect3 */
typedef unsigned char YY_CHAR;
+
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+
typedef int yy_state_type;
+
+extern int yylineno;
+
+int yylineno = 1;
+
extern char *yytext;
#define yytext_ptr yytext
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( yyconst char msg[] )) __dead2;
+static yy_state_type yy_get_previous_state (void );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
+static int yy_get_next_buffer (void );
+static void yy_fatal_error (yyconst char msg[] );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
- yytext_ptr = yy_bp; \
- yytext_ptr -= yy_more_len; \
- yyleng = (int) (yy_cp - yytext_ptr); \
- yy_hold_char = *yy_cp; \
+ (yytext_ptr) = yy_bp; \
+ (yytext_ptr) -= (yy_more_len); \
+ yyleng = (size_t) (yy_cp - (yytext_ptr)); \
+ (yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
- yy_c_buf_p = yy_cp;
+ (yy_c_buf_p) = yy_cp;
#define YY_NUM_RULES 146
#define YY_END_OF_BUFFER 147
-static yyconst short int yy_accept[1401] =
+/* This struct is not used in this scanner,
+ but its presence is necessary. */
+struct yy_trans_info
+ {
+ flex_int32_t yy_verify;
+ flex_int32_t yy_nxt;
+ };
+static yyconst flex_int16_t yy_accept[1401] =
{ 0,
1, 1, 128, 128, 132, 132, 136, 136, 140, 140,
1, 1, 147, 144, 1, 126, 126, 145, 2, 145,
} ;
-static yyconst int yy_ec[256] =
+static yyconst flex_int32_t yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
-static yyconst int yy_meta[40] =
+static yyconst flex_int32_t yy_meta[40] =
{ 0,
1, 2, 3, 4, 5, 1, 6, 1, 1, 1,
1, 7, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1
} ;
-static yyconst short int yy_base[1415] =
+static yyconst flex_int16_t yy_base[1415] =
{ 0,
0, 0, 37, 40, 44, 51, 63, 75, 56, 68,
87, 108, 2688, 2479, 50, 2795, 2795, 2795, 129, 94,
2766, 2773, 2780, 2787
} ;
-static yyconst short int yy_def[1415] =
+static yyconst flex_int16_t yy_def[1415] =
{ 0,
1400, 1, 1401, 1401, 1402, 1402, 1403, 1403, 1404, 1404,
1405, 1405, 1400, 1406, 1400, 1400, 1400, 1400, 1407, 1406,
1400, 1400, 1400, 1400
} ;
-static yyconst short int yy_nxt[2835] =
+static yyconst flex_int16_t yy_nxt[2835] =
{ 0,
14, 15, 16, 17, 18, 19, 18, 14, 14, 14,
14, 18, 20, 21, 14, 22, 23, 24, 25, 14,
1400, 1400, 1400, 1400
} ;
-static yyconst short int yy_chk[2835] =
+static yyconst flex_int16_t yy_chk[2835] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
+
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
#define REJECT reject_used_but_not_detected
static int yy_more_flag = 0;
static int yy_more_len = 0;
-#define yymore() (yy_more_flag = 1)
-#define YY_MORE_ADJ yy_more_len
+#define yymore() ((yy_more_flag) = 1)
+#define YY_MORE_ADJ (yy_more_len)
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "./util/configlexer.lex"
-#define INITIAL 0
#line 2 "./util/configlexer.lex"
/*
* configlexer.lex - lexical analyzer for unbound config file
include_stack[config_include_stack_ptr] = YY_CURRENT_BUFFER;
cfg_parser->filename = strdup(filename);
cfg_parser->line = 1;
- yy_switch_to_buffer(yy_create_buffer(input, YY_BUF_SIZE));
+ yy_switch_to_buffer(yy_create_buffer(input,YY_BUF_SIZE));
++config_include_stack_ptr;
}
#define yy_set_bol(at_bol) \
{ \
if ( ! yy_current_buffer ) \
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer = yy_create_buffer(yyin,YY_BUF_SIZE ); \
yy_current_buffer->yy_ch_buf[0] = ((at_bol)?'\n':' '); \
}
#endif
#define YY_NO_INPUT 1
-#define YY_NO_UNPUT 1
#line 148 "./util/configlexer.lex"
#ifndef YY_NO_UNPUT
#define YY_NO_UNPUT 1
#ifndef YY_NO_INPUT
#define YY_NO_INPUT 1
#endif
+
+#line 1701 "<stdout>"
+
+#define INITIAL 0
#define quotedstring 1
#define singlequotedstr 2
#define include 3
#define include_quoted 4
#define val 5
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int yy_init_globals (void );
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy (void );
+
+int yyget_debug (void );
+
+void yyset_debug (int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra (void );
+
+void yyset_extra (YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in (void );
+
+void yyset_in (FILE * in_str );
+
+FILE *yyget_out (void );
+
+void yyset_out (FILE * out_str );
+
+int yyget_leng (void );
+
+char *yyget_text (void );
+
+int yyget_lineno (void );
+
+void yyset_lineno (int line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
+extern "C" int yywrap (void );
#else
-extern int yywrap YY_PROTO(( void ));
+extern int yywrap (void );
#endif
#endif
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
-#endif
-
#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+static int yy_flex_strlen (yyconst char * );
#endif
#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
-#else
-static int input YY_PROTO(( void ));
-#endif
-#endif
-
-#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
-#endif
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
-#endif
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
-#endif
+#ifdef __cplusplus
+static int yyinput (void );
#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
+static int input (void );
#endif
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines. This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
-
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
- if ( yy_current_buffer->yy_is_interactive ) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
- int c = '*', n; \
+ int c = '*'; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
- else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
- && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" );
+ else \
+ { \
+ errno=0; \
+ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+ { \
+ if( errno != EINTR) \
+ { \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ break; \
+ } \
+ errno=0; \
+ clearerr(yyin); \
+ } \
+ }\
+\
+
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
+/* end tables serialization structures and prototypes */
+
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
-#define YY_DECL int yylex YY_PROTO(( void ))
-#endif
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
#define YY_RULE_SETUP \
YY_USER_ACTION
+/** The main scanner function which does all the work.
+ */
YY_DECL
- {
- yy_state_type yy_current_state;
- char *yy_cp, *yy_bp;
- int yy_act;
-
+{
+ register yy_state_type yy_current_state;
+ register char *yy_cp, *yy_bp;
+ register int yy_act;
+
#line 168 "./util/configlexer.lex"
+#line 1893 "<stdout>"
- if ( yy_init )
+ if ( !(yy_init) )
{
- yy_init = 0;
+ (yy_init) = 1;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
- if ( ! yy_start )
- yy_start = 1; /* first start state */
+ if ( ! (yy_start) )
+ (yy_start) = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
- if ( ! yy_current_buffer )
- yy_current_buffer =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ if ( ! YY_CURRENT_BUFFER ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer(yyin,YY_BUF_SIZE );
+ }
- yy_load_buffer_state();
+ yy_load_buffer_state( );
}
while ( 1 ) /* loops until end-of-file is reached */
{
- yy_more_len = 0;
- if ( yy_more_flag )
+ (yy_more_len) = 0;
+ if ( (yy_more_flag) )
{
- yy_more_len = yy_c_buf_p - yytext_ptr;
- yy_more_flag = 0;
+ (yy_more_len) = (yy_c_buf_p) - (yytext_ptr);
+ (yy_more_flag) = 0;
}
- yy_cp = yy_c_buf_p;
+ yy_cp = (yy_c_buf_p);
/* Support of yytext. */
- *yy_cp = yy_hold_char;
+ *yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
- yy_current_state = yy_start;
+ yy_current_state = (yy_start);
yy_match:
do
{
- YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
- yy_cp = yy_last_accepting_cpos;
- yy_current_state = yy_last_accepting_state;
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
yy_act = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
-
do_action: /* This label is used only to access EOF actions. */
-
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = yy_hold_char;
- yy_cp = yy_last_accepting_cpos;
- yy_current_state = yy_last_accepting_state;
+ *yy_cp = (yy_hold_char);
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
goto yy_find_action;
case 1:
{ YDVAR(1, VAR_RRSET_ROUNDROBIN) }
YY_BREAK
case 126:
+/* rule 126 can match eol */
YY_RULE_SETUP
#line 298 "./util/configlexer.lex"
{ LEXOUT(("NL\n")); cfg_parser->line++; }
{ LEXOUT(("STR(%s) ", yytext)); yymore(); }
YY_BREAK
case 129:
+/* rule 129 can match eol */
YY_RULE_SETUP
#line 308 "./util/configlexer.lex"
{ yyerror("newline inside quoted string, no end \"");
{ LEXOUT(("STR(%s) ", yytext)); yymore(); }
YY_BREAK
case 133:
+/* rule 133 can match eol */
YY_RULE_SETUP
#line 329 "./util/configlexer.lex"
{ yyerror("newline inside quoted string, no end '");
{ LEXOUT(("ISP ")); /* ignore */ }
YY_BREAK
case 137:
+/* rule 137 can match eol */
YY_RULE_SETUP
#line 350 "./util/configlexer.lex"
{ LEXOUT(("NL\n")); cfg_parser->line++;}
{ LEXOUT(("ISTR(%s) ", yytext)); yymore(); }
YY_BREAK
case 141:
+/* rule 141 can match eol */
YY_RULE_SETUP
#line 362 "./util/configlexer.lex"
{ yyerror("newline before \" in include name");
#line 392 "./util/configlexer.lex"
ECHO;
YY_BREAK
+#line 2804 "<stdout>"
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = yy_hold_char;
+ *yy_cp = (yy_hold_char);
YY_RESTORE_YY_MORE_OFFSET
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
- * consistency between yy_current_buffer and our
+ * consistency between YY_CURRENT_BUFFER and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yy_current_buffer->yy_input_file = yyin;
- yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
* end-of-buffer state). Contrast this with the test
* in input().
*/
- if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
- yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state();
+ yy_current_state = yy_get_previous_state( );
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
yy_next_state = yy_try_NUL_trans( yy_current_state );
- yy_bp = yytext_ptr + YY_MORE_ADJ;
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
- yy_cp = ++yy_c_buf_p;
+ yy_cp = ++(yy_c_buf_p);
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
- yy_cp = yy_c_buf_p;
+ yy_cp = (yy_c_buf_p);
goto yy_find_action;
}
}
- else switch ( yy_get_next_buffer() )
+ else switch ( yy_get_next_buffer( ) )
{
case EOB_ACT_END_OF_FILE:
{
- yy_did_buffer_switch_on_eof = 0;
+ (yy_did_buffer_switch_on_eof) = 0;
- if ( yywrap() )
+ if ( yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
else
{
- if ( ! yy_did_buffer_switch_on_eof )
+ if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p =
- yytext_ptr + yy_amount_of_matched_text;
+ (yy_c_buf_p) =
+ (yytext_ptr) + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state();
+ yy_current_state = yy_get_previous_state( );
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
- yy_c_buf_p =
- &yy_current_buffer->yy_ch_buf[yy_n_chars];
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
- yy_current_state = yy_get_previous_state();
+ yy_current_state = yy_get_previous_state( );
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
goto yy_find_action;
}
break;
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
- } /* end of yylex */
-
+} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
-
-#ifdef YY_USE_PROTOS
-static int yy_get_next_buffer(void)
-#else
-static int yy_get_next_buffer()
-#endif
- {
- char *dest = yy_current_buffer->yy_ch_buf;
- char *source = yytext_ptr;
- int number_to_move, i;
+static int yy_get_next_buffer (void)
+{
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ register char *source = (yytext_ptr);
+ register int number_to_move, i;
int ret_val;
- if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
- if ( yy_current_buffer->yy_fill_buffer == 0 )
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
- if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
- yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
else
{
- int num_to_read =
- yy_current_buffer->yy_buf_size - number_to_move - 1;
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
-#ifdef YY_USES_REJECT
- YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = yy_current_buffer;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
int yy_c_buf_p_offset =
- (int) (yy_c_buf_p - b->yy_ch_buf);
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yy_flex_realloc( (void *) b->yy_ch_buf,
- b->yy_buf_size + 2 );
+ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
- yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
- num_to_read = yy_current_buffer->yy_buf_size -
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
number_to_move - 1;
-#endif
+
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
- YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
- yy_n_chars, num_to_read );
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), (size_t) num_to_read );
- yy_current_buffer->yy_n_chars = yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
- if ( yy_n_chars == 0 )
+ if ( (yy_n_chars) == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin );
+ yyrestart(yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
- yy_current_buffer->yy_buffer_status =
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- yy_n_chars += number_to_move;
- yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
- yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+ if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ }
- yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+ (yy_n_chars) += number_to_move;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
- return ret_val;
- }
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+ return ret_val;
+}
/* yy_get_previous_state - get the state just before the EOB char was reached */
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_get_previous_state(void)
-#else
-static yy_state_type yy_get_previous_state()
-#endif
- {
- yy_state_type yy_current_state;
- char *yy_cp;
-
- yy_current_state = yy_start;
+ static yy_state_type yy_get_previous_state (void)
+{
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
+
+ yy_current_state = (yy_start);
- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
{
- YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
}
return yy_current_state;
- }
-
+}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+{
+ register int yy_is_jam;
+ register char *yy_cp = (yy_c_buf_p);
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
-#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
-yy_state_type yy_current_state;
-#endif
- {
- int yy_is_jam;
- char *yy_cp = yy_c_buf_p;
-
- YY_CHAR yy_c = 1;
+ register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_is_jam = (yy_current_state == 1400);
return yy_is_jam ? 0 : yy_current_state;
- }
-
-
-#ifndef YY_NO_UNPUT
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-char *yy_bp;
-#endif
- {
- char *yy_cp = yy_c_buf_p;
-
- /* undo effects of setting up yytext */
- *yy_cp = yy_hold_char;
-
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
- /* +2 for EOB chars. */
- int number_to_move = yy_n_chars + 2;
- char *dest = &yy_current_buffer->yy_ch_buf[
- yy_current_buffer->yy_buf_size + 2];
- char *source =
- &yy_current_buffer->yy_ch_buf[number_to_move];
-
- while ( source > yy_current_buffer->yy_ch_buf )
- *--dest = *--source;
-
- yy_cp += (int) (dest - source);
- yy_bp += (int) (dest - source);
- yy_current_buffer->yy_n_chars =
- yy_n_chars = yy_current_buffer->yy_buf_size;
-
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- YY_FATAL_ERROR( "flex scanner push-back overflow" );
- }
-
- *--yy_cp = (char) c;
-
-
- yytext_ptr = yy_bp;
- yy_hold_char = *yy_cp;
- yy_c_buf_p = yy_cp;
- }
-#endif /* ifndef YY_NO_UNPUT */
-
+}
#ifndef YY_NO_INPUT
#ifdef __cplusplus
-static int yyinput()
-#else
-#ifdef YY_USE_PROTOS
-static int input(void)
+ static int yyinput (void)
#else
-static int input()
+ static int input (void)
#endif
-#endif
- {
- int c;
- *yy_c_buf_p = yy_hold_char;
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
- if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
- if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
/* This was really a NUL. */
- *yy_c_buf_p = '\0';
+ *(yy_c_buf_p) = '\0';
else
{ /* need more input */
- int offset = yy_c_buf_p - yytext_ptr;
- ++yy_c_buf_p;
+ int offset = (yy_c_buf_p) - (yytext_ptr);
+ ++(yy_c_buf_p);
- switch ( yy_get_next_buffer() )
+ switch ( yy_get_next_buffer( ) )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
*/
/* Reset buffer status. */
- yyrestart( yyin );
+ yyrestart(yyin );
- /* fall through */
+ /*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap() )
+ if ( yywrap( ) )
return EOF;
- if ( ! yy_did_buffer_switch_on_eof )
+ if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
}
case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p = yytext_ptr + offset;
+ (yy_c_buf_p) = (yytext_ptr) + offset;
break;
}
}
}
- c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
- *yy_c_buf_p = '\0'; /* preserve yytext */
- yy_hold_char = *++yy_c_buf_p;
-
+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
+ (yy_hold_char) = *++(yy_c_buf_p);
return c;
- }
+}
#endif /* ifndef YY_NO_INPUT */
-
-#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
-#else
-void yyrestart( input_file )
-FILE *input_file;
-#endif
- {
- if ( ! yy_current_buffer )
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
-
- yy_init_buffer( yy_current_buffer, input_file );
- yy_load_buffer_state();
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ *
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+ void yyrestart (FILE * input_file )
+{
+
+ if ( ! YY_CURRENT_BUFFER ){
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer(yyin,YY_BUF_SIZE );
}
+ yy_init_buffer(YY_CURRENT_BUFFER,input_file );
+ yy_load_buffer_state( );
+}
-#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-#else
-void yy_switch_to_buffer( new_buffer )
-YY_BUFFER_STATE new_buffer;
-#endif
- {
- if ( yy_current_buffer == new_buffer )
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ *
+ */
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+{
+
+ /* TODO. We should be able to replace this entire function body
+ * with
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
+ */
+ yyensure_buffer_stack ();
+ if ( YY_CURRENT_BUFFER == new_buffer )
return;
- if ( yy_current_buffer )
+ if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
- *yy_c_buf_p = yy_hold_char;
- yy_current_buffer->yy_buf_pos = yy_c_buf_p;
- yy_current_buffer->yy_n_chars = yy_n_chars;
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
- yy_current_buffer = new_buffer;
- yy_load_buffer_state();
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+ yy_load_buffer_state( );
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
- yy_did_buffer_switch_on_eof = 1;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
-#else
-void yy_load_buffer_state()
-#endif
- {
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
- yyin = yy_current_buffer->yy_input_file;
- yy_hold_char = *yy_c_buf_p;
- }
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+static void yy_load_buffer_state (void)
+{
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ (yy_hold_char) = *(yy_c_buf_p);
+}
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
-#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
- {
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ *
+ * @return the allocated buffer state.
+ */
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
+{
YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- yy_init_buffer( b, file );
+ yy_init_buffer(b,file );
return b;
- }
-
+}
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
- {
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ *
+ */
+ void yy_delete_buffer (YY_BUFFER_STATE b )
+{
+
if ( ! b )
return;
- if ( b == yy_current_buffer )
- yy_current_buffer = (YY_BUFFER_STATE) 0;
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yy_flex_free( (void *) b->yy_ch_buf );
-
- yy_flex_free( (void *) b );
- }
-
+ yyfree((void *) b->yy_ch_buf );
-#ifndef YY_ALWAYS_INTERACTIVE
-#ifndef YY_NEVER_INTERACTIVE
-extern int isatty YY_PROTO(( int ));
-#endif
-#endif
-
-#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
-#else
-void yy_init_buffer( b, file )
-YY_BUFFER_STATE b;
-FILE *file;
-#endif
+ yyfree((void *) b );
+}
+#ifndef __cplusplus
+extern int isatty (int );
+#endif /* __cplusplus */
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yyrestart() or at EOF.
+ */
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
- {
- yy_flush_buffer( b );
+{
+ int oerrno = errno;
+
+ yy_flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
-#if YY_ALWAYS_INTERACTIVE
- b->yy_is_interactive = 1;
-#else
-#if YY_NEVER_INTERACTIVE
- b->yy_is_interactive = 0;
-#else
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-#endif
-#endif
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
-#else
-void yy_flush_buffer( b )
-YY_BUFFER_STATE b;
-#endif
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != YY_CURRENT_BUFFER){
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+
+ errno = oerrno;
+}
- {
- if ( ! b )
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ *
+ */
+ void yy_flush_buffer (YY_BUFFER_STATE b )
+{
+ if ( ! b )
return;
b->yy_n_chars = 0;
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
- if ( b == yy_current_buffer )
- yy_load_buffer_state();
+ if ( b == YY_CURRENT_BUFFER )
+ yy_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ * the current state. This function will allocate the stack
+ * if necessary.
+ * @param new_buffer The new state.
+ *
+ */
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+ if (new_buffer == NULL)
+ return;
+
+ yyensure_buffer_stack();
+
+ /* This block is copied from yy_switch_to_buffer. */
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ /* Only push if top exists. Otherwise, replace top. */
+ if (YY_CURRENT_BUFFER)
+ (yy_buffer_stack_top)++;
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ * The next element becomes the new top.
+ *
+ */
+void yypop_buffer_state (void)
+{
+ if (!YY_CURRENT_BUFFER)
+ return;
+
+ yy_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ if ((yy_buffer_stack_top) > 0)
+ --(yy_buffer_stack_top);
+
+ if (YY_CURRENT_BUFFER) {
+ yy_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
}
+}
+/* Allocates the stack if it does not exist.
+ * Guarantees space for at least one push.
+ */
+static void yyensure_buffer_stack (void)
+{
+ int num_to_alloc;
+
+ if (!(yy_buffer_stack)) {
+
+ /* First allocation is just for 2 elements, since we don't know if this
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
+ * immediate realloc on the next call.
+ */
+ num_to_alloc = 1;
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+
+ (yy_buffer_stack_max) = num_to_alloc;
+ (yy_buffer_stack_top) = 0;
+ return;
+ }
-#ifndef YY_NO_SCAN_BUFFER
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
-#else
-YY_BUFFER_STATE yy_scan_buffer( base, size )
-char *base;
-yy_size_t size;
-#endif
- {
- YY_BUFFER_STATE b;
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+
+ /* Increase the buffer to prepare for a possible push. */
+ int grow_size = 8 /* arbitrary grow size */;
+
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+ ((yy_buffer_stack),
+ num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+ /* zero only the new slots.*/
+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+ (yy_buffer_stack_max) = num_to_alloc;
+ }
+}
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
+{
+ YY_BUFFER_STATE b;
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- yy_switch_to_buffer( b );
+ yy_switch_to_buffer(b );
return b;
- }
-#endif
-
-
-#ifndef YY_NO_SCAN_STRING
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
-#else
-YY_BUFFER_STATE yy_scan_string( yy_str )
-yyconst char *yy_str;
-#endif
- {
- int len;
- for ( len = 0; yy_str[len]; ++len )
- ;
-
- return yy_scan_bytes( yy_str, len );
- }
-#endif
+}
+/** Setup the input buffer state to scan a string. The next call to yylex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ *
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ * yy_scan_bytes() instead.
+ */
+YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
+{
+
+ return yy_scan_bytes(yystr,strlen(yystr) );
+}
-#ifndef YY_NO_SCAN_BYTES
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
-#else
-YY_BUFFER_STATE yy_scan_bytes( bytes, len )
-yyconst char *bytes;
-int len;
-#endif
- {
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+ * scan from a @e copy of @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
+{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
- n = len + 2;
- buf = (char *) yy_flex_alloc( n );
+ n = _yybytes_len + 2;
+ buf = (char *) yyalloc(n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
- for ( i = 0; i < len; ++i )
- buf[i] = bytes[i];
+ for ( i = 0; i < _yybytes_len; ++i )
+ buf[i] = yybytes[i];
- buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = yy_scan_buffer( buf, n );
+ b = yy_scan_buffer(buf,n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
b->yy_is_our_buffer = 1;
return b;
- }
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
#endif
+static void yy_fatal_error (yyconst char* msg )
+{
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+}
-#ifndef YY_NO_PUSH_STATE
-#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
-#else
-static void yy_push_state( new_state )
-int new_state;
-#endif
- {
- if ( yy_start_stack_ptr >= yy_start_stack_depth )
- {
- yy_size_t new_size;
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ (yy_hold_char) = *(yy_c_buf_p); \
+ *(yy_c_buf_p) = '\0'; \
+ yyleng = yyless_macro_arg; \
+ } \
+ while ( 0 )
- yy_start_stack_depth += YY_START_STACK_INCR;
- new_size = yy_start_stack_depth * sizeof( int );
+/* Accessor methods (get/set functions) to struct members. */
- if ( ! yy_start_stack )
- yy_start_stack = (int *) yy_flex_alloc( new_size );
+/** Get the current line number.
+ *
+ */
+int yyget_lineno (void)
+{
+
+ return yylineno;
+}
- else
- yy_start_stack = (int *) yy_flex_realloc(
- (void *) yy_start_stack, new_size );
+/** Get the input stream.
+ *
+ */
+FILE *yyget_in (void)
+{
+ return yyin;
+}
- if ( ! yy_start_stack )
- YY_FATAL_ERROR(
- "out of memory expanding start-condition stack" );
- }
+/** Get the output stream.
+ *
+ */
+FILE *yyget_out (void)
+{
+ return yyout;
+}
- yy_start_stack[yy_start_stack_ptr++] = YY_START;
+/** Get the length of the current token.
+ *
+ */
+int yyget_leng (void)
+{
+ return yyleng;
+}
- BEGIN(new_state);
- }
-#endif
+/** Get the current token.
+ *
+ */
+char *yyget_text (void)
+{
+ return yytext;
+}
-#ifndef YY_NO_POP_STATE
-#ifdef YY_USE_PROTOS
-static void yy_pop_state(void)
-#else
-static void yy_pop_state()
-#endif
- {
- if ( --yy_start_stack_ptr < 0 )
- YY_FATAL_ERROR( "start-condition stack underflow" );
+/** Set the current line number.
+ * @param line_number
+ *
+ */
+void yyset_lineno (int line_number )
+{
+
+ yylineno = line_number;
+}
- BEGIN(yy_start_stack[yy_start_stack_ptr]);
- }
-#endif
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ *
+ * @see yy_switch_to_buffer
+ */
+void yyset_in (FILE * in_str )
+{
+ yyin = in_str ;
+}
+void yyset_out (FILE * out_str )
+{
+ yyout = out_str ;
+}
-#ifndef YY_NO_TOP_STATE
-#ifdef YY_USE_PROTOS
-static int yy_top_state(void)
-#else
-static int yy_top_state()
-#endif
- {
- return yy_start_stack[yy_start_stack_ptr - 1];
- }
-#endif
+int yyget_debug (void)
+{
+ return yy_flex_debug;
+}
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
+void yyset_debug (int bdebug )
+{
+ yy_flex_debug = bdebug ;
+}
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
+static int yy_init_globals (void)
+{
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from yylex_destroy(), so don't allocate here.
+ */
+
+ (yy_buffer_stack) = 0;
+ (yy_buffer_stack_top) = 0;
+ (yy_buffer_stack_max) = 0;
+ (yy_c_buf_p) = (char *) 0;
+ (yy_init) = 0;
+ (yy_start) = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+ yyin = stdin;
+ yyout = stdout;
#else
-static void yy_fatal_error( msg )
-char msg[];
+ yyin = (FILE *) 0;
+ yyout = (FILE *) 0;
#endif
- {
- (void) fprintf( stderr, "%s\n", msg );
- exit( YY_EXIT_FAILURE );
- }
+ /* For future reference: Set errno on error, since we are called by
+ * yylex_init()
+ */
+ return 0;
+}
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
+{
+
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER){
+ yy_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ yypop_buffer_state();
+ }
-/* Redefine yyless() so it works in section 3 code. */
+ /* Destroy the stack itself. */
+ yyfree((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
-#undef yyless
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- yytext[yyleng] = yy_hold_char; \
- yy_c_buf_p = yytext + n; \
- yy_hold_char = *yy_c_buf_p; \
- *yy_c_buf_p = '\0'; \
- yyleng = n; \
- } \
- while ( 0 )
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * yylex() is called, initialization will occur. */
+ yy_init_globals( );
+ return 0;
+}
-/* Internal utility routines. */
+/*
+ * Internal utility routines.
+ */
#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-yyconst char *s2;
-int n;
-#endif
- {
- int i;
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+{
+ register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
- }
+}
#endif
#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
- {
- int n;
+static int yy_flex_strlen (yyconst char * s )
+{
+ register int n;
for ( n = 0; s[n]; ++n )
;
return n;
- }
+}
#endif
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
-#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
-#endif
- {
+void *yyalloc (yy_size_t size )
+{
return (void *) malloc( size );
- }
+}
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
-#endif
- {
+void *yyrealloc (void * ptr, yy_size_t size )
+{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
- }
+}
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
- {
- free( ptr );
- }
+void yyfree (void * ptr )
+{
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
-#if YY_MAIN
-int main()
- {
- yylex();
- return 0;
- }
-#endif
#line 392 "./util/configlexer.lex"
+
+
-/* A Bison parser, made by GNU Bison 2.5.1. */
+/* A Bison parser, made by GNU Bison 2.5. */
/* Bison implementation for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.5.1"
+#define YYBISON_VERSION "2.5"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
/* Line 268 of yacc.c */
#line 99 "util/configparser.c"
-# ifndef YY_NULL
-# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULL nullptr
-# else
-# define YY_NULL 0
-# endif
-# endif
-
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
typedef union YYSTYPE
{
-/* Line 295 of yacc.c */
+/* Line 293 of yacc.c */
#line 64 "./util/configparser.y"
char* str;
-/* Line 295 of yacc.c */
-#line 415 "util/configparser.c"
+/* Line 293 of yacc.c */
+#line 407 "util/configparser.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
/* Copy the second part of user declarations. */
-/* Line 345 of yacc.c */
-#line 427 "util/configparser.c"
+/* Line 343 of yacc.c */
+#line 419 "util/configparser.c"
#ifdef short
# undef short
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
# endif
#endif
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from SRC to DST. The source and destination do
+/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(Dst, Src, Count) \
- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
-# define YYCOPY(Dst, Src, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (Dst)[yyi] = (Src)[yyi]; \
- } \
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
while (YYID (0))
# endif
# endif
167, 167, 168, 168, 170, 182, 183, 184, 184, 184,
184, 184, 186, 198, 199, 200, 200, 200, 200, 202,
211, 220, 231, 240, 249, 258, 269, 284, 301, 318,
- 335, 350, 359, 368, 377, 386, 395, 404, 413, 422,
- 431, 440, 449, 458, 465, 472, 481, 490, 504, 513,
- 522, 529, 536, 543, 551, 558, 565, 572, 579, 587,
- 595, 603, 610, 617, 626, 635, 642, 649, 657, 665,
- 678, 689, 697, 710, 719, 728, 736, 749, 758, 766,
- 775, 783, 796, 803, 813, 823, 833, 843, 853, 863,
- 873, 880, 887, 896, 905, 914, 921, 931, 945, 952,
- 970, 983, 996, 1005, 1014, 1023, 1033, 1043, 1052, 1061,
- 1068, 1077, 1086, 1095, 1103, 1116, 1124, 1146, 1153, 1168,
- 1178, 1188, 1198, 1205, 1212, 1221, 1231, 1241, 1248, 1255,
- 1264, 1269, 1270, 1271, 1271, 1271, 1272, 1272, 1272, 1273,
- 1275, 1285, 1294, 1301, 1308, 1315, 1322, 1329, 1334, 1335,
- 1336, 1338
+ 331, 346, 355, 364, 373, 382, 391, 400, 409, 418,
+ 427, 436, 445, 454, 461, 468, 477, 486, 500, 509,
+ 518, 525, 532, 539, 547, 554, 561, 568, 575, 583,
+ 591, 599, 606, 613, 622, 631, 638, 645, 653, 661,
+ 674, 685, 693, 706, 715, 724, 732, 745, 754, 762,
+ 771, 779, 792, 799, 809, 819, 829, 839, 849, 859,
+ 869, 876, 883, 892, 901, 910, 917, 927, 941, 948,
+ 966, 979, 992, 1001, 1010, 1019, 1029, 1039, 1048, 1057,
+ 1064, 1073, 1082, 1091, 1099, 1112, 1120, 1142, 1149, 1164,
+ 1174, 1184, 1194, 1201, 1208, 1217, 1227, 1237, 1244, 1251,
+ 1260, 1265, 1266, 1267, 1267, 1267, 1268, 1268, 1268, 1269,
+ 1271, 1281, 1290, 1297, 1304, 1311, 1318, 1325, 1330, 1331,
+ 1332, 1334
};
#endif
"content_forward", "server_num_threads", "server_verbosity",
"server_statistics_interval", "server_statistics_cumulative",
"server_extended_statistics", "server_port", "server_send_client_subnet",
- "server_client_subnet_opc", "server_max_client_subnet_ipv4",
+ "server_client_subnet_opcode", "server_max_client_subnet_ipv4",
"server_max_client_subnet_ipv6", "server_interface",
"server_outgoing_interface", "server_outgoing_range",
"server_outgoing_port_permit", "server_outgoing_port_avoid",
"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", "pythonstart", "contents_py", "content_py",
- "py_script", YY_NULL
+ "py_script", 0
};
#endif
#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(Token, Value) \
-do \
- if (yychar == YYEMPTY) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (yylen); \
- yystate = *yyssp; \
- goto yybackup; \
- } \
- else \
- { \
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (1); \
+ goto yybackup; \
+ } \
+ else \
+ { \
yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
YYSTYPE const * const yyvaluep;
#endif
{
- FILE *yyo = yyoutput;
- YYUSE (yyo);
if (!yyvaluep)
return;
# ifdef YYPRINT
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
- const char *yyformat = YY_NULL;
+ const char *yyformat = 0;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
break;
}
yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
`yyss': related to states.
`yyvs': related to semantic values.
- Refer to the stacks through separate pointers, to allow yyoverflow
+ Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
{
case 9:
-/* Line 1810 of yacc.c */
+/* Line 1806 of yacc.c */
#line 120 "./util/configparser.y"
{
OUTYY(("\nP(server:)\n"));
case 114:
-/* Line 1810 of yacc.c */
+/* Line 1806 of yacc.c */
#line 171 "./util/configparser.y"
{
struct config_stub* s;
case 122:
-/* Line 1810 of yacc.c */
+/* Line 1806 of yacc.c */
#line 187 "./util/configparser.y"
{
struct config_stub* s;
case 129:
-/* Line 1810 of yacc.c */
+/* Line 1806 of yacc.c */
#line 203 "./util/configparser.y"
{
OUTYY(("P(server_num_threads:%s)\n", (yyvsp[(2) - (2)].str)));
case 130:
-/* Line 1810 of yacc.c */
+/* Line 1806 of yacc.c */
#line 212 "./util/configparser.y"
{
OUTYY(("P(server_verbosity:%s)\n", (yyvsp[(2) - (2)].str)));
case 131:
-/* Line 1810 of yacc.c */
+/* Line 1806 of yacc.c */
#line 221 "./util/configparser.y"
{
OUTYY(("P(server_statistics_interval:%s)\n", (yyvsp[(2) - (2)].str)));
case 132:
-/* Line 1810 of yacc.c */
+/* Line 1806 of yacc.c */
#line 232 "./util/configparser.y"
{
OUTYY(("P(server_statistics_cumulative:%s)\n", (yyvsp[(2) - (2)].str)));
case 133:
-/* Line 1810 of yacc.c */
+/* Line 1806 of yacc.c */
#line 241 "./util/configparser.y"
{
OUTYY(("P(server_extended_statistics:%s)\n", (yyvsp[(2) - (2)].str)));
case 134:
-/* Line 1810 of yacc.c */
+/* Line 1806 of yacc.c */
#line 250 "./util/configparser.y"
{
OUTYY(("P(server_port:%s)\n", (yyvsp[(2) - (2)].str)));
case 135:
-/* Line 1810 of yacc.c */
+/* Line 1806 of yacc.c */
#line 259 "./util/configparser.y"
{
#ifdef CLIENT_SUBNET
case 136:
-/* Line 1810 of yacc.c */
+/* Line 1806 of yacc.c */
#line 270 "./util/configparser.y"
{
#ifdef CLIENT_SUBNET
- OUTYY(("P(client_subnet_opc:%s)\n", (yyvsp[(2) - (2)].str)));
+ OUTYY(("P(client_subnet_opcode:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
yyerror("option code expected");
else if(atoi((yyvsp[(2) - (2)].str)) > 65535 || atoi((yyvsp[(2) - (2)].str)) < 0)
- yyerror("option code must be between 0x0000 and 0xFFFF");
- else cfg_parser->cfg->client_subnet_opc = atoi((yyvsp[(2) - (2)].str));
+ yyerror("option code must be in interval [0, 65535]");
+ else cfg_parser->cfg->client_subnet_opcode = atoi((yyvsp[(2) - (2)].str));
free((yyvsp[(2) - (2)].str));
#else
OUTYY(("P(Compiled without edns subnet option, ignoring)\n"));
case 137:
-/* Line 1810 of yacc.c */
+/* Line 1806 of yacc.c */
#line 285 "./util/configparser.y"
{
#ifdef CLIENT_SUBNET
case 138:
-/* Line 1810 of yacc.c */
+/* Line 1806 of yacc.c */
#line 302 "./util/configparser.y"
{
#ifdef CLIENT_SUBNET
case 139:
-/* Line 1810 of yacc.c */
+/* Line 1806 of yacc.c */
#line 319 "./util/configparser.y"
{
- #ifdef CLIENT_SUBNET
OUTYY(("P(server_interface:%s)\n", (yyvsp[(2) - (2)].str)));
if(cfg_parser->cfg->num_ifs == 0)
cfg_parser->cfg->ifs = calloc(1, sizeof(char*));
yyerror("out of memory");
else
cfg_parser->cfg->ifs[cfg_parser->cfg->num_ifs++] = (yyvsp[(2) - (2)].str);
- #else
- OUTYY(("P(Compiled without edns subnet option, ignoring)\n"));
- #endif
}
break;
case 140:
-/* Line 1810 of yacc.c */
-#line 336 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 332 "./util/configparser.y"
{
OUTYY(("P(server_outgoing_interface:%s)\n", (yyvsp[(2) - (2)].str)));
if(cfg_parser->cfg->num_out_ifs == 0)
case 141:
-/* Line 1810 of yacc.c */
-#line 351 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 347 "./util/configparser.y"
{
OUTYY(("P(server_outgoing_range:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
case 142:
-/* Line 1810 of yacc.c */
-#line 360 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 356 "./util/configparser.y"
{
OUTYY(("P(server_outgoing_port_permit:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_mark_ports((yyvsp[(2) - (2)].str), 1,
case 143:
-/* Line 1810 of yacc.c */
-#line 369 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 365 "./util/configparser.y"
{
OUTYY(("P(server_outgoing_port_avoid:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_mark_ports((yyvsp[(2) - (2)].str), 0,
case 144:
-/* Line 1810 of yacc.c */
-#line 378 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 374 "./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)
case 145:
-/* Line 1810 of yacc.c */
-#line 387 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 383 "./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)
case 146:
-/* Line 1810 of yacc.c */
-#line 396 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 392 "./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)
case 147:
-/* Line 1810 of yacc.c */
-#line 405 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 401 "./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)
case 148:
-/* Line 1810 of yacc.c */
-#line 414 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 410 "./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)
case 149:
-/* Line 1810 of yacc.c */
-#line 423 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 419 "./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)
case 150:
-/* Line 1810 of yacc.c */
-#line 432 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 428 "./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)
case 151:
-/* Line 1810 of yacc.c */
-#line 441 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 437 "./util/configparser.y"
{
OUTYY(("P(server_tcp_upstream:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
case 152:
-/* Line 1810 of yacc.c */
-#line 450 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 446 "./util/configparser.y"
{
OUTYY(("P(server_ssl_upstream:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
case 153:
-/* Line 1810 of yacc.c */
-#line 459 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 455 "./util/configparser.y"
{
OUTYY(("P(server_ssl_service_key:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->ssl_service_key);
case 154:
-/* Line 1810 of yacc.c */
-#line 466 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 462 "./util/configparser.y"
{
OUTYY(("P(server_ssl_service_pem:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->ssl_service_pem);
case 155:
-/* Line 1810 of yacc.c */
-#line 473 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 469 "./util/configparser.y"
{
OUTYY(("P(server_ssl_port:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
case 156:
-/* Line 1810 of yacc.c */
-#line 482 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 478 "./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)
case 157:
-/* Line 1810 of yacc.c */
-#line 491 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 487 "./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)
case 158:
-/* Line 1810 of yacc.c */
-#line 505 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 501 "./util/configparser.y"
{
OUTYY(("P(server_log_time_ascii:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
case 159:
-/* Line 1810 of yacc.c */
-#line 514 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 510 "./util/configparser.y"
{
OUTYY(("P(server_log_queries:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
case 160:
-/* Line 1810 of yacc.c */
-#line 523 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 519 "./util/configparser.y"
{
OUTYY(("P(server_chroot:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->chrootdir);
case 161:
-/* Line 1810 of yacc.c */
-#line 530 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 526 "./util/configparser.y"
{
OUTYY(("P(server_username:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->username);
case 162:
-/* Line 1810 of yacc.c */
-#line 537 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 533 "./util/configparser.y"
{
OUTYY(("P(server_directory:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->directory);
case 163:
-/* Line 1810 of yacc.c */
-#line 544 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 540 "./util/configparser.y"
{
OUTYY(("P(server_logfile:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->logfile);
case 164:
-/* Line 1810 of yacc.c */
-#line 552 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 548 "./util/configparser.y"
{
OUTYY(("P(server_pidfile:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->pidfile);
case 165:
-/* Line 1810 of yacc.c */
-#line 559 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 555 "./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)))
case 166:
-/* Line 1810 of yacc.c */
-#line 566 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 562 "./util/configparser.y"
{
OUTYY(("P(server_dlv_anchor_file:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->dlv_anchor_file);
case 167:
-/* Line 1810 of yacc.c */
-#line 573 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 569 "./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)))
case 168:
-/* Line 1810 of yacc.c */
-#line 580 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 576 "./util/configparser.y"
{
OUTYY(("P(server_auto_trust_anchor_file:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->
case 169:
-/* Line 1810 of yacc.c */
-#line 588 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 584 "./util/configparser.y"
{
OUTYY(("P(server_trust_anchor_file:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->
case 170:
-/* Line 1810 of yacc.c */
-#line 596 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 592 "./util/configparser.y"
{
OUTYY(("P(server_trusted_keys_file:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->
case 171:
-/* Line 1810 of yacc.c */
-#line 604 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 600 "./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)))
case 172:
-/* Line 1810 of yacc.c */
-#line 611 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 607 "./util/configparser.y"
{
OUTYY(("P(server_domain_insecure:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_strlist_insert(&cfg_parser->cfg->domain_insecure, (yyvsp[(2) - (2)].str)))
case 173:
-/* Line 1810 of yacc.c */
-#line 618 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 614 "./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)
case 174:
-/* Line 1810 of yacc.c */
-#line 627 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 623 "./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)
case 175:
-/* Line 1810 of yacc.c */
-#line 636 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 632 "./util/configparser.y"
{
OUTYY(("P(server_identity:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->identity);
case 176:
-/* Line 1810 of yacc.c */
-#line 643 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 639 "./util/configparser.y"
{
OUTYY(("P(server_version:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->version);
case 177:
-/* Line 1810 of yacc.c */
-#line 650 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 646 "./util/configparser.y"
{
OUTYY(("P(server_so_rcvbuf:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->so_rcvbuf))
case 178:
-/* Line 1810 of yacc.c */
-#line 658 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 654 "./util/configparser.y"
{
OUTYY(("P(server_so_sndbuf:%s)\n", (yyvsp[(2) - (2)].str)));
if(!cfg_parse_memsize((yyvsp[(2) - (2)].str), &cfg_parser->cfg->so_sndbuf))
case 179:
-/* Line 1810 of yacc.c */
-#line 666 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 662 "./util/configparser.y"
{
OUTYY(("P(server_edns_buffer_size:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
case 180:
-/* Line 1810 of yacc.c */
-#line 679 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 675 "./util/configparser.y"
{
OUTYY(("P(server_msg_buffer_size:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
case 181:
-/* Line 1810 of yacc.c */
-#line 690 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 686 "./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))
case 182:
-/* Line 1810 of yacc.c */
-#line 698 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 694 "./util/configparser.y"
{
OUTYY(("P(server_msg_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
case 183:
-/* Line 1810 of yacc.c */
-#line 711 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 707 "./util/configparser.y"
{
OUTYY(("P(server_num_queries_per_thread:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
case 184:
-/* Line 1810 of yacc.c */
-#line 720 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 716 "./util/configparser.y"
{
OUTYY(("P(server_jostle_timeout:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
case 185:
-/* Line 1810 of yacc.c */
-#line 729 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 725 "./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))
case 186:
-/* Line 1810 of yacc.c */
-#line 737 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 733 "./util/configparser.y"
{
OUTYY(("P(server_rrset_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
case 187:
-/* Line 1810 of yacc.c */
-#line 750 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 746 "./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)
case 188:
-/* Line 1810 of yacc.c */
-#line 759 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 755 "./util/configparser.y"
{
OUTYY(("P(server_infra_lame_ttl:%s)\n", (yyvsp[(2) - (2)].str)));
verbose(VERB_DETAIL, "ignored infra-lame-ttl: %s (option "
case 189:
-/* Line 1810 of yacc.c */
-#line 767 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 763 "./util/configparser.y"
{
OUTYY(("P(server_infra_cache_numhosts:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
case 190:
-/* Line 1810 of yacc.c */
-#line 776 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 772 "./util/configparser.y"
{
OUTYY(("P(server_infra_cache_lame_size:%s)\n", (yyvsp[(2) - (2)].str)));
verbose(VERB_DETAIL, "ignored infra-cache-lame-size: %s "
case 191:
-/* Line 1810 of yacc.c */
-#line 784 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 780 "./util/configparser.y"
{
OUTYY(("P(server_infra_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
case 192:
-/* Line 1810 of yacc.c */
-#line 797 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 793 "./util/configparser.y"
{
OUTYY(("P(server_target_fetch_policy:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->target_fetch_policy);
case 193:
-/* Line 1810 of yacc.c */
-#line 804 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 800 "./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)
case 194:
-/* Line 1810 of yacc.c */
-#line 814 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 810 "./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)
case 195:
-/* Line 1810 of yacc.c */
-#line 824 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 820 "./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)
case 196:
-/* Line 1810 of yacc.c */
-#line 834 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 830 "./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)
case 197:
-/* Line 1810 of yacc.c */
-#line 844 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 840 "./util/configparser.y"
{
OUTYY(("P(server_harden_below_nxdomain:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
case 198:
-/* Line 1810 of yacc.c */
-#line 854 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 850 "./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)
case 199:
-/* Line 1810 of yacc.c */
-#line 864 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 860 "./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)
case 200:
-/* Line 1810 of yacc.c */
-#line 874 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 870 "./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)))
case 201:
-/* Line 1810 of yacc.c */
-#line 881 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 877 "./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)))
case 202:
-/* Line 1810 of yacc.c */
-#line 888 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 884 "./util/configparser.y"
{
OUTYY(("P(server_prefetch:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
case 203:
-/* Line 1810 of yacc.c */
-#line 897 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 893 "./util/configparser.y"
{
OUTYY(("P(server_prefetch_key:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
case 204:
-/* Line 1810 of yacc.c */
-#line 906 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 902 "./util/configparser.y"
{
OUTYY(("P(server_unwanted_reply_threshold:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
case 205:
-/* Line 1810 of yacc.c */
-#line 915 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 911 "./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)))
case 206:
-/* Line 1810 of yacc.c */
-#line 922 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 918 "./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)
case 207:
-/* Line 1810 of yacc.c */
-#line 932 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 928 "./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 &&
case 208:
-/* Line 1810 of yacc.c */
-#line 946 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 942 "./util/configparser.y"
{
OUTYY(("P(server_module_conf:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->module_conf);
case 209:
-/* Line 1810 of yacc.c */
-#line 953 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 949 "./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) {
case 210:
-/* Line 1810 of yacc.c */
-#line 971 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 967 "./util/configparser.y"
{
OUTYY(("P(server_val_sig_skew_min:%s)\n", (yyvsp[(2) - (2)].str)));
if(strlen((yyvsp[(2) - (2)].str)) == 0 || strcmp((yyvsp[(2) - (2)].str), "0") == 0) {
case 211:
-/* Line 1810 of yacc.c */
-#line 984 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 980 "./util/configparser.y"
{
OUTYY(("P(server_val_sig_skew_max:%s)\n", (yyvsp[(2) - (2)].str)));
if(strlen((yyvsp[(2) - (2)].str)) == 0 || strcmp((yyvsp[(2) - (2)].str), "0") == 0) {
case 212:
-/* Line 1810 of yacc.c */
-#line 997 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 993 "./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)
case 213:
-/* Line 1810 of yacc.c */
-#line 1006 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1002 "./util/configparser.y"
{
OUTYY(("P(server_cache_min_ttl:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
case 214:
-/* Line 1810 of yacc.c */
-#line 1015 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1011 "./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)
case 215:
-/* Line 1810 of yacc.c */
-#line 1024 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1020 "./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)
case 216:
-/* Line 1810 of yacc.c */
-#line 1034 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1030 "./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)
case 217:
-/* Line 1810 of yacc.c */
-#line 1044 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1040 "./util/configparser.y"
{
OUTYY(("P(server_ignore_cd_flag:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
case 218:
-/* Line 1810 of yacc.c */
-#line 1053 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1049 "./util/configparser.y"
{
OUTYY(("P(server_val_log_level:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
case 219:
-/* Line 1810 of yacc.c */
-#line 1062 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1058 "./util/configparser.y"
{
OUTYY(("P(server_val_nsec3_keysize_iterations:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->val_nsec3_key_iterations);
case 220:
-/* Line 1810 of yacc.c */
-#line 1069 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1065 "./util/configparser.y"
{
OUTYY(("P(server_add_holddown:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
case 221:
-/* Line 1810 of yacc.c */
-#line 1078 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1074 "./util/configparser.y"
{
OUTYY(("P(server_del_holddown:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
case 222:
-/* Line 1810 of yacc.c */
-#line 1087 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1083 "./util/configparser.y"
{
OUTYY(("P(server_keep_missing:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0 && strcmp((yyvsp[(2) - (2)].str), "0") != 0)
case 223:
-/* Line 1810 of yacc.c */
-#line 1096 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1092 "./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))
case 224:
-/* Line 1810 of yacc.c */
-#line 1104 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1100 "./util/configparser.y"
{
OUTYY(("P(server_key_cache_slabs:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
case 225:
-/* Line 1810 of yacc.c */
-#line 1117 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1113 "./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))
case 226:
-/* Line 1810 of yacc.c */
-#line 1125 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1121 "./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 &&
case 227:
-/* Line 1810 of yacc.c */
-#line 1147 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1143 "./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)))
case 228:
-/* Line 1810 of yacc.c */
-#line 1154 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1150 "./util/configparser.y"
{
char* ptr;
OUTYY(("P(server_local_data_ptr:%s)\n", (yyvsp[(2) - (2)].str)));
case 229:
-/* Line 1810 of yacc.c */
-#line 1169 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1165 "./util/configparser.y"
{
OUTYY(("P(server_minimal_responses:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
case 230:
-/* Line 1810 of yacc.c */
-#line 1179 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1175 "./util/configparser.y"
{
OUTYY(("P(server_rrset_roundrobin:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
case 231:
-/* Line 1810 of yacc.c */
-#line 1189 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1185 "./util/configparser.y"
{
OUTYY(("P(name:%s)\n", (yyvsp[(2) - (2)].str)));
if(cfg_parser->cfg->stubs->name)
case 232:
-/* Line 1810 of yacc.c */
-#line 1199 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1195 "./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)))
case 233:
-/* Line 1810 of yacc.c */
-#line 1206 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1202 "./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)))
case 234:
-/* Line 1810 of yacc.c */
-#line 1213 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1209 "./util/configparser.y"
{
OUTYY(("P(stub-first:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
case 235:
-/* Line 1810 of yacc.c */
-#line 1222 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1218 "./util/configparser.y"
{
OUTYY(("P(stub-prime:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
case 236:
-/* Line 1810 of yacc.c */
-#line 1232 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1228 "./util/configparser.y"
{
OUTYY(("P(name:%s)\n", (yyvsp[(2) - (2)].str)));
if(cfg_parser->cfg->forwards->name)
case 237:
-/* Line 1810 of yacc.c */
-#line 1242 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1238 "./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)))
case 238:
-/* Line 1810 of yacc.c */
-#line 1249 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1245 "./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)))
case 239:
-/* Line 1810 of yacc.c */
-#line 1256 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1252 "./util/configparser.y"
{
OUTYY(("P(forward-first:%s)\n", (yyvsp[(2) - (2)].str)));
if(strcmp((yyvsp[(2) - (2)].str), "yes") != 0 && strcmp((yyvsp[(2) - (2)].str), "no") != 0)
case 240:
-/* Line 1810 of yacc.c */
-#line 1265 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1261 "./util/configparser.y"
{
OUTYY(("\nP(remote-control:)\n"));
}
case 250:
-/* Line 1810 of yacc.c */
-#line 1276 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1272 "./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)
case 251:
-/* Line 1810 of yacc.c */
-#line 1286 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1282 "./util/configparser.y"
{
OUTYY(("P(control_port:%s)\n", (yyvsp[(2) - (2)].str)));
if(atoi((yyvsp[(2) - (2)].str)) == 0)
case 252:
-/* Line 1810 of yacc.c */
-#line 1295 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1291 "./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)))
case 253:
-/* Line 1810 of yacc.c */
-#line 1302 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1298 "./util/configparser.y"
{
OUTYY(("P(rc_server_key_file:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->server_key_file);
case 254:
-/* Line 1810 of yacc.c */
-#line 1309 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1305 "./util/configparser.y"
{
OUTYY(("P(rc_server_cert_file:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->server_cert_file);
case 255:
-/* Line 1810 of yacc.c */
-#line 1316 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1312 "./util/configparser.y"
{
OUTYY(("P(rc_control_key_file:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->control_key_file);
case 256:
-/* Line 1810 of yacc.c */
-#line 1323 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1319 "./util/configparser.y"
{
OUTYY(("P(rc_control_cert_file:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->control_cert_file);
case 257:
-/* Line 1810 of yacc.c */
-#line 1330 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1326 "./util/configparser.y"
{
OUTYY(("\nP(python:)\n"));
}
case 261:
-/* Line 1810 of yacc.c */
-#line 1339 "./util/configparser.y"
+/* Line 1806 of yacc.c */
+#line 1335 "./util/configparser.y"
{
OUTYY(("P(python-script:%s)\n", (yyvsp[(2) - (2)].str)));
free(cfg_parser->cfg->python_script);
-/* Line 1810 of yacc.c */
-#line 3774 "util/configparser.c"
+/* Line 1806 of yacc.c */
+#line 3758 "util/configparser.c"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
yyresult = 1;
goto yyreturn;
-#if !defined yyoverflow || YYERROR_VERBOSE
+#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
-/* Line 2071 of yacc.c */
-#line 1344 "./util/configparser.y"
+/* Line 2067 of yacc.c */
+#line 1340 "./util/configparser.y"
/* parse helper routines could be here */
-/* A Bison parser, made by GNU Bison 2.5.1. */
+/* A Bison parser, made by GNU Bison 2.5. */
/* Bison interface for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
typedef union YYSTYPE
{
-/* Line 2072 of yacc.c */
+/* Line 2068 of yacc.c */
#line 64 "./util/configparser.y"
char* str;
-/* Line 2072 of yacc.c */
+/* Line 2068 of yacc.c */
#line 322 "util/configparser.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
server_log_queries | server_tcp_upstream | server_ssl_upstream |
server_ssl_service_key | server_ssl_service_pem | server_ssl_port |
server_minimal_responses | server_rrset_roundrobin |
- server_send_client_subnet | server_client_subnet_opc |
+ server_send_client_subnet | server_client_subnet_opcode |
server_max_client_subnet_ipv4 | server_max_client_subnet_ipv6
;
stubstart: VAR_STUB_ZONE
#endif
}
;
-server_client_subnet_opc: VAR_CLIENT_SUBNET_OPCODE STRING_ARG
+server_client_subnet_opcode: VAR_CLIENT_SUBNET_OPCODE STRING_ARG
{
#ifdef CLIENT_SUBNET
- OUTYY(("P(client_subnet_opc:%s)\n", $2));
+ OUTYY(("P(client_subnet_opcode:%s)\n", $2));
if(atoi($2) == 0 && strcmp($2, "0") != 0)
yyerror("option code expected");
else if(atoi($2) > 65535 || atoi($2) < 0)
- yyerror("option code must be between 0x0000 and 0xFFFF");
- else cfg_parser->cfg->client_subnet_opc = atoi($2);
+ yyerror("option code must be in interval [0, 65535]");
+ else cfg_parser->cfg->client_subnet_opcode = atoi($2);
free($2);
#else
OUTYY(("P(Compiled without edns subnet option, ignoring)\n"));
;
server_interface: VAR_INTERFACE STRING_ARG
{
- #ifdef CLIENT_SUBNET
OUTYY(("P(server_interface:%s)\n", $2));
if(cfg_parser->cfg->num_ifs == 0)
cfg_parser->cfg->ifs = calloc(1, sizeof(char*));
yyerror("out of memory");
else
cfg_parser->cfg->ifs[cfg_parser->cfg->num_ifs++] = $2;
- #else
- OUTYY(("P(Compiled without edns subnet option, ignoring)\n"));
- #endif
}
;
server_outgoing_interface: VAR_OUTGOING_INTERFACE STRING_ARG
#include "util/data/msgparse.h"
#include "util/data/dname.h"
#include "util/log.h"
-#include "util/regional.h"
#include "util/net_help.h"
+#include "util/regional.h"
+#if CLIENT_SUBNET
#include "edns-subnet/edns-subnet.h"
+#endif
/** return code that means the function ran out of memory. negative so it does
* not conflict with DNS rcodes. */
#ifdef CLIENT_SUBNET
/* Add edns-subnet option to record */
if(edns->subnet_validdata) {
- assert(edns->subnet_addr_fam == IANA_ADDRFAM_IP4 ||
- edns->subnet_addr_fam == IANA_ADDRFAM_IP6);
- assert(edns->subnet_addr_fam != IANA_ADDRFAM_IP4 ||
+ assert(edns->subnet_addr_fam == EDNSSUBNET_ADDRFAM_IP4 ||
+ edns->subnet_addr_fam == EDNSSUBNET_ADDRFAM_IP6);
+ assert(edns->subnet_addr_fam != EDNSSUBNET_ADDRFAM_IP4 ||
edns->subnet_source_mask <= INET_SIZE*8);
- assert(edns->subnet_addr_fam != IANA_ADDRFAM_IP6 ||
+ assert(edns->subnet_addr_fam != EDNSSUBNET_ADDRFAM_IP6 ||
edns->subnet_source_mask <= INET6_SIZE*8);
sn_octs = edns->subnet_source_mask / 8;
assert(ldns_buffer_available(pkt, sn_octs + sn_octs_remainder + 4 + 6));
ldns_buffer_write_u16(pkt, sn_octs + sn_octs_remainder + 4 + 4); /* rdatalen */
- ldns_buffer_write_u16(pkt, EDNS_SUBNET_OPC); /* opc */
+ ldns_buffer_write_u16(pkt, EDNSSUBNET_OPCODE); /* opc */
ldns_buffer_write_u16(pkt, sn_octs + sn_octs_remainder + 4); /* datalen */
ldns_buffer_write_u16(pkt, edns->subnet_addr_fam); /* addr fam */
ldns_buffer_write_u8(pkt, edns->subnet_source_mask); /* source mask */
#include "util/data/packed_rrset.h"
#include "util/storage/lookup3.h"
#include "util/regional.h"
-#ifdef CLIENT_SUBNET
-#include "util/net_help.h"
+#if CLIENT_SUBNET
+#include "edns-subnet/edns-subnet.h"
#endif
/** smart comparison of (compressed, valid) dnames from packet */
/* Option does not fit in remaining data */
if(opt_start + 4 + opt_len > edns_datalen) return;
opt_start += 4;
- if(opt_opc == EDNS_SUBNET_OPC) {
+ if(opt_opc == EDNSSUBNET_OPCODE) {
if(opt_len < 4) break;
edns->subnet_addr_fam = ldns_read_uint16(data + 2 + opt_start);
edns->subnet_source_mask = data[4 + opt_start];
#ifndef UTIL_DATA_MSGPARSE_H
#define UTIL_DATA_MSGPARSE_H
#include "util/storage/lruhash.h"
+#ifdef CLIENT_SUBNET
+#include "util/net_help.h"
+#endif
#include <ldns/packet.h>
struct rrset_parse;
struct rr_parse;
uint16_t subnet_addr_fam;
uint8_t subnet_source_mask;
uint8_t subnet_scope_mask;
- uint8_t subnet_addr[16];
+ uint8_t subnet_addr[INET6_SIZE];
#endif
};
/** module specific data for query. indexed by module id. */
void* minfo[MAX_MODULE];
#ifdef CLIENT_SUBNET
- /** received from server */
+ /** edns_data for client communication */
struct edns_data* edns_from_client;
struct edns_data* edns_to_client;
+ /** edns data for server communication */
struct edns_data edns_in;
struct edns_data edns_out;
#endif
#define MAX_ADDR_STRLEN 128 /* characters */
/** default value for EDNS ADVERTISED size */
uint16_t EDNS_ADVERTISED_SIZE = 4096;
-#ifdef CLIENT_SUBNET
-/** Opcode for edns subnet option, is TBD. */
-uint16_t EDNS_SUBNET_OPC = 0x50fa;
-uint8_t MAX_CLIENT_SUBNET_IP4 = 24;
-uint8_t MAX_CLIENT_SUBNET_IP6 = 64;
-#endif
/** minimal responses when positive answer: default is no */
int MINIMAL_RESPONSES = 0;
#define EDNS_ADVERTISED_VERSION 0
/** Advertised size of EDNS capabilities */
extern uint16_t EDNS_ADVERTISED_SIZE;
-#ifdef CLIENT_SUBNET
-/** Opcode for edns subnet option, is TBD. */
-extern uint16_t EDNS_SUBNET_OPC;
-/** Maximum number of bits we are willing to expose */
-extern uint8_t MAX_CLIENT_SUBNET_IP4;
-extern uint8_t MAX_CLIENT_SUBNET_IP6;
-#endif
/** bits for EDNS bitfield */
#define EDNS_DO 0x8000 /* Dnssec Ok */
/** byte size of ip4 address */