summaryrefslogtreecommitdiffstats
path: root/contrib/bind/bin
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind/bin')
-rw-r--r--contrib/bind/bin/named-xfer/named-xfer.c86
-rw-r--r--contrib/bind/bin/named/Makefile3
-rw-r--r--contrib/bind/bin/named/db_dict.c111
-rwxr-xr-xcontrib/bind/bin/named/named-bootconf.pl324
-rw-r--r--contrib/bind/bin/named/ns_parser.c3271
-rw-r--r--contrib/bind/bin/named/ns_parser.h150
-rw-r--r--contrib/bind/bin/named/pathnames.c55
-rw-r--r--contrib/bind/bin/ndc/ndc.sh83
-rw-r--r--contrib/bind/bin/nslookup/commands.c2025
-rw-r--r--contrib/bind/bin/nslookup/commands.l57
-rw-r--r--contrib/bind/bin/nslookup/debug.c1
-rw-r--r--contrib/bind/bin/nslookup/getinfo.c34
-rw-r--r--contrib/bind/bin/nslookup/main.c12
13 files changed, 123 insertions, 6089 deletions
diff --git a/contrib/bind/bin/named-xfer/named-xfer.c b/contrib/bind/bin/named-xfer/named-xfer.c
index 696c821..ea3ecc8 100644
--- a/contrib/bind/bin/named-xfer/named-xfer.c
+++ b/contrib/bind/bin/named-xfer/named-xfer.c
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
/*
* The original version of named-xfer by Kevin Dunlap.
* Completed and integrated with named by David Waitzman
@@ -130,7 +131,7 @@ char copyright[] =
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)named-xfer.c 4.18 (Berkeley) 3/7/91";
-static const char rcsid[] = "$Id: named-xfer.c,v 8.122.8.2 2003/06/02 05:59:56 marka Exp $";
+static const char rcsid[] = "$Id: named-xfer.c,v 8.121 2002/06/26 03:27:22 marka Exp $";
#endif /* not lint */
#include "port_before.h"
@@ -242,9 +243,8 @@ LIST(tsig_node) tsig_list;
/*
* Debugging printf.
*/
-static void lprintf(int level, const char *format, ...) ISC_FORMAT_PRINTF(2, 3);
-static void
-lprintf(int level, const char *format, ...) {
+void
+dprintf(int level, const char *format, ...) {
va_list ap;
va_start(ap, format);
@@ -597,15 +597,15 @@ main(int argc, char *argv[]) {
#endif /* SIGUSR1&&SIGUSR2 */
if (dbfile)
- lprintf(1, "domain `%s'; file `%s'; serial %u\n",
+ dprintf(1, "domain `%s'; file `%s'; serial %u\n",
domain, dbfile, serial_no);
if (ixfrfile)
- lprintf(1, "domain `%s'; ixfrfile `%s'; serial %u\n",
+ dprintf(1, "domain `%s'; ixfrfile `%s'; serial %u\n",
domain, ixfrfile, serial_no);
if (tsigfile)
- lprintf(1, "tsigfile `%s'\n", tsigfile);
+ dprintf(1, "tsigfile `%s'\n", tsigfile);
buildservicelist();
buildprotolist();
@@ -627,7 +627,7 @@ main(int argc, char *argv[]) {
zp->z_source = dbfile;
zp->z_axfr_src = axfr_src;
zp->z_addrcnt = 0;
- lprintf(1, "zone found (%d): \"%s\", source = %s\n",
+ dprintf(1, "zone found (%d): \"%s\", source = %s\n",
zp->z_type,
(zp->z_origin[0] == '\0') ? "." : zp->z_origin,
zp->z_source);
@@ -671,15 +671,15 @@ main(int argc, char *argv[]) {
memcpy(&zp->z_addr[zp->z_addrcnt],
hp->h_addr,
INADDRSZ);
- lprintf(1, "Arg: \"%s\" %s\n", tm,((tmpsupportixfr) ? "IXFR":"AXFR"));
+ dprintf(1, "Arg: \"%s\" %s\n", tm,((tmpsupportixfr) ? "IXFR":"AXFR"));
}
if (++zp->z_addrcnt >= NSMAX) {
zp->z_addrcnt = NSMAX;
- lprintf(1, "NSMAX reached\n");
+ dprintf(1, "NSMAX reached\n");
break;
}
}
- lprintf(1, "addrcnt = %d\n", zp->z_addrcnt);
+ dprintf(1, "addrcnt = %d\n", zp->z_addrcnt);
res_ninit(&res);
res.options &= ~(RES_DEFNAMES | RES_DNSRCH | RES_RECURSE);
@@ -891,7 +891,7 @@ make_query(int fd, struct zoneinfo *zp, int type, u_int32_t serial_no,
if (type == T_IXFR) {
hp = (HEADER *) buf;
cp = buf;
- lprintf(1, "len = %d\n", n);
+ dprintf(1, "len = %d\n", n);
hp->nscount = htons(1+ntohs(hp->nscount));
cp += n;
n = dn_comp(zp->z_origin, cp, bufsize - (cp - buf), NULL, NULL);
@@ -912,7 +912,7 @@ make_query(int fd, struct zoneinfo *zp, int type, u_int32_t serial_no,
PUTLONG(0xABCD, cp); /* Expire */
PUTLONG(0x1776, cp); /* Min TTL */
n = cp - buf;
- lprintf(1, "len = %d\n", cp-buf);
+ dprintf(1, "len = %d\n", cp-buf);
}
tsig_signed = 0;
@@ -1117,7 +1117,7 @@ getzone(struct zoneinfo *zp, u_int32_t serial_no, int port) {
for (cnt = 0; cnt < zp->z_addrcnt; cnt++) {
methode = servermethode[cnt];
sin.sin_addr = zp->z_addr[cnt];
- lprintf(3, "address [%s] %s\n",
+ dprintf(3, "address [%s] %s\n",
inet_ntoa(sin.sin_addr),
(methode == ISIXFR) ? "IXFR":"AXFR");
}
@@ -1157,7 +1157,7 @@ getzone(struct zoneinfo *zp, u_int32_t serial_no, int port) {
sin.sin_family = AF_INET;
sin.sin_port = 0; /* "ANY" */
sin.sin_addr = z_axfr_src;
- lprintf(2, "binding to address [%s]\n",
+ dprintf(2, "binding to address [%s]\n",
inet_ntoa(sin.sin_addr));
if (bind(s, (struct sockaddr *)&sin, sizeof sin) < 0)
syslog(LOG_INFO, "warning: bind(%s) failed",
@@ -1167,11 +1167,11 @@ getzone(struct zoneinfo *zp, u_int32_t serial_no, int port) {
sin.sin_family = AF_INET;
sin.sin_port = port;
sin.sin_addr = zp->z_addr[cnt];
- lprintf(2, "connecting to server #%d [%s].%d\n",
+ dprintf(2, "connecting to server #%d [%s].%d\n",
cnt + 1, inet_ntoa(sin.sin_addr), ntohs(sin.sin_port));
if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
if (z_axfr_src.s_addr != 0) {
- lprintf(2, "connect failed, trying w/o -x");
+ dprintf(2, "connect failed, trying w/o -x");
z_axfr_src.s_addr = 0;
(void) my_close(s);
goto try_again;
@@ -1370,7 +1370,7 @@ getzone(struct zoneinfo *zp, u_int32_t serial_no, int port) {
}
}
if ((loop_cnt >= 1) && (soa_cnt < 2)) {
- lprintf(1,
+ dprintf(1,
"server %s %d rejected IXFR and responded with AXFR\n",
inet_ntoa(sin.sin_addr), soa_cnt);
methode = ISNOTIXFR;
@@ -1380,7 +1380,7 @@ getzone(struct zoneinfo *zp, u_int32_t serial_no, int port) {
break;
}
/* Skip to next record, if any. */
- lprintf(1, "skipping %s %s RR in response\n",
+ dprintf(1, "skipping %s %s RR in response\n",
name2, p_type(type));
tmp = cp4 + dlen;
loop_cnt++;
@@ -1392,7 +1392,7 @@ getzone(struct zoneinfo *zp, u_int32_t serial_no, int port) {
if (check_serial &&
!SEQ_GT(zp_start.z_serial, query_serial)) {
(void) my_close(s);
- lprintf(1,
+ dprintf(1,
"zone up-to-date, serial %u\n",
zp_start.z_serial);
if (ixfp) {
@@ -1541,7 +1541,7 @@ getzone(struct zoneinfo *zp, u_int32_t serial_no, int port) {
soa_cnt = 0;
goto axfr_response;
}
- lprintf(1, "need update, serial %u\n",
+ dprintf(1, "need update, serial %u\n",
zp_start.z_serial);
soa_cnt = 0;
hp = (HEADER *) buf;
@@ -1565,16 +1565,14 @@ getzone(struct zoneinfo *zp, u_int32_t serial_no, int port) {
serial_no, tsig_key,
buf, bufsize);
syslog(LOG_INFO,
- "send %s query %d to %s for %s",
- p_type(query_type),
- cnt, inet_ntoa(sin.sin_addr),
- (*zp->z_origin != '\0') ?
- zp->z_origin : ".");
- lprintf(1,
+ "send %s query %d to %s",
+ p_type(query_type),
+ cnt, inet_ntoa(sin.sin_addr));
+ dprintf(1,
"send %s query to %s\n",
p_type(query_type),
inet_ntoa(sin.sin_addr));
- lprintf(1,"bufsize = %d\n", bufsize);
+ dprintf(1,"bufsize = %d\n", bufsize);
if (n < 0) {
if (!quiet) {
if (zp->z_type == Z_STUB)
@@ -1648,7 +1646,7 @@ receive:
axfr_response:
if (query_type == T_IXFR)
if (hp->rcode != NOERROR) {
- lprintf(1,
+ dprintf(1,
"server %s did not support IXFR\n",
inet_ntoa(sin.sin_addr));
methode = ISNOTIXFR;
@@ -1658,7 +1656,7 @@ axfr_response:
if (ntohs(hp->qdcount) == 1) {
if ((query_type == T_IXFR) &&
(methode == ISIXFR)) {
- lprintf(1,
+ dprintf(1,
"server %s rejected IXFR and responded with AXFR\n",
inet_ntoa(sin.sin_addr));
methode = ISNOTIXFR;
@@ -1808,10 +1806,10 @@ axfr_response:
(void) fclose(ixfp);
ixfp = NULL;
}
- lprintf(2, "error receiving zone transfer\n");
+ dprintf(2, "error receiving zone transfer\n");
} else if (zp_start.z_serial == serial_no) {
(void) my_close(s);
- lprintf(1, "zone up-to-date, serial %u\n",
+ dprintf(1, "zone up-to-date, serial %u\n",
zp_start.z_serial);
if (ixfp) {
(void) fclose(ixfp);
@@ -1831,7 +1829,7 @@ axfr_response:
} else {
if (zp_finish.z_serial == query_serial) {
(void) my_close(s);
- lprintf(1, "zone up-to-date, serial %u\n",
+ dprintf(1, "zone up-to-date, serial %u\n",
zp_start.z_serial);
if (ixfp) {
(void) fclose(ixfp);
@@ -1846,7 +1844,7 @@ axfr_response:
"serial from [%s], zone %s: %u lower than current: %u\n",
inet_ntoa(sin.sin_addr), zp->z_origin,
zp_finish.z_serial, query_serial);
- lprintf(1,
+ dprintf(1,
"serial from [%s], zone %s: %u lower than current: %u\n",
inet_ntoa(sin.sin_addr), zp->z_origin,
zp_finish.z_serial, query_serial);
@@ -1886,7 +1884,7 @@ axfr_response:
soa_cnt = 0;
goto axfr_response;
}
- lprintf(1, "We have an IXFR\n");
+ dprintf(1, "We have an IXFR\n");
loop_cnt = 0;
while (SEQ_GT(zp_finish.z_serial, serial_no)) {
/*
@@ -2058,7 +2056,7 @@ writemsg(int rfd, const u_char *msg, int msglen) {
u_char len[INT16SZ];
int ret;
- ns_put16(msglen, len);
+ __putshort(msglen, len);
iov[0].iov_base = (char *)len;
iov[0].iov_len = INT16SZ;
DE_CONST(msg, iov[1].iov_base);
@@ -2174,7 +2172,7 @@ print_output(struct zoneinfo *zp, u_int32_t serial_no, u_char *msg,
}
escaped = (*origin++ == '\\') && !escaped;
}
- lprintf(3, "print_output: dname %s type %d class %d ttl %u\n",
+ dprintf(3, "print_output: dname %s type %d class %d ttl %u\n",
dname, type, class, ttl);
/*
* Convert the resource record data into the internal database format.
@@ -2433,13 +2431,13 @@ print_output(struct zoneinfo *zp, u_int32_t serial_no, u_char *msg,
}
if (n > MAXDATA) {
- lprintf(1, "update type %d: %d bytes is too much data\n",
+ dprintf(1, "update type %d: %d bytes is too much data\n",
type, n);
hp->rcode = FORMERR;
return (-1);
}
if (cp != rdatap + dlen) {
- lprintf(1,
+ dprintf(1,
"encoded rdata length is %u, but actual length was %u\n",
dlen, (u_int)(cp - rdatap));
hp->rcode = FORMERR;
@@ -2520,10 +2518,10 @@ print_output(struct zoneinfo *zp, u_int32_t serial_no, u_char *msg,
} else
soa_cnt++;
} else {
- lprintf(2, "SOA, serial %u\n",
+ dprintf(2, "SOA, serial %u\n",
zp_finish.z_serial);
if (zp_start.z_serial != zp_finish.z_serial) {
- lprintf(1, "serial changed, restart\n");
+ dprintf(1, "serial changed, restart\n");
restarts++;
if (restarts > MAX_XFER_RESTARTS) {
syslog(LOG_INFO,
@@ -3193,13 +3191,13 @@ ixfr_log(const u_char *msg, int len, int *delete, FILE *file,
ns_rr rr;
if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- lprintf(1, "ixfr_log() failed\n");
+ dprintf(1, "ixfr_log() failed\n");
return (-1);
}
if (ns_initparse(msg, len, &handle) < 0) {
fprintf(file, ";; ns_initparse: %s\n", strerror(errno));
- lprintf(1, "ixfr_log() failed\n");
+ dprintf(1, "ixfr_log() failed\n");
return (-1);
}
opcode = (ns_opcode) ns_msg_getflag(handle, ns_f_opcode);
@@ -3210,7 +3208,7 @@ ixfr_log(const u_char *msg, int len, int *delete, FILE *file,
{
(void) fprintf(file,"ns_parserr() failed");
- lprintf(1, "ixfr_log() failed\n");
+ dprintf(1, "ixfr_log() failed\n");
return (-1);
}
type = (ns_type)rr.type;
diff --git a/contrib/bind/bin/named/Makefile b/contrib/bind/bin/named/Makefile
index 78e4fee..5a09205 100644
--- a/contrib/bind/bin/named/Makefile
+++ b/contrib/bind/bin/named/Makefile
@@ -14,6 +14,7 @@
## SOFTWARE.
# $Id: Makefile,v 8.51 2000/12/23 08:02:53 vixie Exp $
+# $FreeBSD$
DESTDIR=
CC= cc
@@ -50,7 +51,7 @@ LDFLAGS=
CFLAGS= ${CDEBUG}
CPPFLAGS= -I${PORTINCL} -I${INCL} ${DEFS}
-VER= LOCAL-`date +%y%m%d.%H%M%S`
+VER= LOCAL-`date +%Y%m%d.%H%M%S`
HOSTNAMECMD= hostname || uname -n
PROG= named
diff --git a/contrib/bind/bin/named/db_dict.c b/contrib/bind/bin/named/db_dict.c
deleted file mode 100644
index a0b8921..0000000
--- a/contrib/bind/bin/named/db_dict.c
+++ /dev/null
@@ -1,111 +0,0 @@
-#if !defined(lint) && !defined(SABER)
-static char rcsid[] = "$Id: db_dict.c,v 8.1 1997/09/26 17:55:40 halley Exp $";
-#endif /* not lint */
-
-/*
- * Portions Copyright (c) 1997 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include "port_before.h"
-
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <assert.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <isc/eventlib.h>
-#include <isc/logging.h>
-#include <isc/memcluster.h>
-
-#include "port_after.h"
-
-#include "named.h"
-
-#define DICT_BLOCKBITS 8
-#define DICT_BLOCKSHIFT 16
-#define DICT_BLOCKMAX (1 << DICT_BLOCKBITS)
-#define DICT_OFFSETBITS 16
-#define DICT_OFFSETSHIFT 0
-#define DICT_OFFSETMAX (1 << DICT_OFFSETBITS)
-
-#define DICT_CONSUMED(Length) ((Length) + 1)
-#define DICT_INDEX(Block,Offset) (((Block) << DICT_BLOCKSHIFT) | \
- ((Offset) << DICT_OFFSETSHIFT))
-
-static int dict_new(const char *, int);
-
-static char * blocks[DICT_BLOCKMAX];
-static int offsets[DICT_BLOCKMAX];
-static int cur_block = 0;
-static int cur_offset = -1;
-
-int
-dict_lookup(const char *text, int length, int flags) {
- int block, offset, ret;
-
- /* XXX this is a proof of concept, some kind of hash is needed. */
- for (block = 0; block <= cur_block; block++) {
- const char *cur = &blocks[block][0];
- const char *end = &blocks[block][offsets[block]];
-
- while (cur < end) {
- int xlength = *cur;
-
- if (xlength == length &&
- memcmp(cur+1, text, length) == 0)
- return (DICT_INDEX(block, offset));
- cur += DICT_CONSUMED(length);
- }
- }
- if ((flags & DICT_INSERT_P) != 0)
- return (dict_new(text, length));
- return (-ENOENT);
-}
-
-static int
-dict_new(const char *text, int length) {
- int ret;
-
- if (length < 0 || length > DICT_MAXLENGTH)
- return (-E2BIG);
- if (cur_offset + DICT_CONSUMED(length) >= DICT_OFFSETMAX) {
- if (cur_block + 1 == DICT_BLOCKMAX)
- return (-ENOSPC);
- cur_block++;
- blocks[cur_block] = memget(DICT_OFFSETMAX);
- if (blocks[cur_block] == NULL)
- return (-ENOMEM);
- cur_offset = 0;
- }
- assert(cur_offset >= 0);
- assert(cur_offset + DICT_CONSUMED(length) < DICT_OFFSETMAX);
- ret = DICT_INDEX(cur_block, cur_offset);
- blocks[cur_block][cur_offset] = length;
- memcpy(&blocks[cur_block][cur_offset+1], text, length);
- cur_offset += DICT_CONSUMED(length);
- offsets[cur_block] = cur_offset;
- return (ret);
-}
diff --git a/contrib/bind/bin/named/named-bootconf.pl b/contrib/bind/bin/named/named-bootconf.pl
deleted file mode 100755
index ce474c4..0000000
--- a/contrib/bind/bin/named/named-bootconf.pl
+++ /dev/null
@@ -1,324 +0,0 @@
-#!/usr/bin/perl
-
-## Copyright (c) 1996, 1997 by Internet Software Consortium
-##
-## Permission to use, copy, modify, and distribute this software for any
-## purpose with or without fee is hereby granted, provided that the above
-## copyright notice and this permission notice appear in all copies.
-##
-## THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
-## ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
-## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
-## CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
-## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
-## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-## SOFTWARE.
-
-## $Id: named-bootconf.pl,v 8.16 1998/02/13 19:48:25 halley Exp $
-
-# This is a filter. Input is a named.boot. Output is a named.conf.
-
-$new_config = "";
-
-$have_options = 0;
-%options = ();
-%options_comments = ();
-@topology = ();
-@topology_comments = ();
-@bogus = ();
-@bogus_comments = ();
-@transfer_acl = ();
-@transfer_comments = ();
-$logging = "";
-
-while(<>) {
- next if /^$/;
-
- # skip comment-only lines
- if (/^\s*;+\s*(.*)$/) {
- $new_config .= "// $1\n";
- next;
- }
-
- # handle continued lines
- while (/\\$/) {
- s/\\$/ /;
- $_ .= <>;
- }
-
- chop;
-
- # deal with lines ending in a coment
- if (s/\s*;+\s*(.*)$//) {
- $comment = "// $1";
- } else {
- $comment = "";
- }
-
- ($directive, @rest) = split;
-
- $class = "";
- if ($directive =~ /^(.*)\/(.*)$/) {
- $directive = $1;
- $class = $2;
- }
-
- if ($directive eq "primary") {
- $zname = shift(@rest);
- &maybe_print_comment("","\n");
- $new_config .= "zone \"$zname\" ";
- if ($class ne "") {
- $new_config .= "$class ";
- }
- $new_config .= "{\n";
- $new_config .= "\ttype master;\n";
- $filename = shift(@rest);
- $new_config .= "\tfile \"$filename\";\n";
- $new_config .= "};\n\n";
- } elsif ($directive eq "secondary" || $directive eq "stub") {
- if ($directive eq "secondary") {
- $type = "slave";
- } else {
- $type = "stub";
- }
- $zname = shift(@rest);
- &maybe_print_comment("","\n");
- $new_config .= "zone \"$zname\" ";
- if ($class ne "") {
- $new_config .= "$class ";
- }
- $new_config .= "{\n";
- $new_config .= "\ttype $type;\n";
- $filename = pop(@rest);
- if ($filename =~ /^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/) {
- push(@rest, $filename);
- $filename = "";
- } else {
- $new_config .= "\tfile \"$filename\";\n";
- }
- $new_config .= "\tmasters {\n";
- foreach $master (@rest) {
- $new_config .= "\t\t$master;\n";
- }
- $new_config .= "\t};\n";
- $new_config .= "};\n\n";
- } elsif ($directive eq "cache") {
- $zname = shift(@rest);
- &maybe_print_comment("","\n");
- $new_config .= "zone \"$zname\" {\n";
- $new_config .= "\ttype hint;\n";
- $filename = shift(@rest);
- $new_config .= "\tfile \"$filename\";\n";
- $new_config .= "};\n\n";
- } elsif ($directive eq "directory") {
- $options{"directory"} = "\"$rest[0]\"";
- $options_comments{"directory"} = $comment;
- $have_options = 1;
- } elsif ($directive eq "check-names") {
- $type = shift(@rest);
- if ($type eq "primary") {
- $type = "master";
- } elsif ($type eq "secondary") {
- $type = "slave";
- }
- $action = shift(@rest);
- $options{"check-names $type"} = $action;
- $options_comments{"check-names $type"} = $comment;
- $have_options = 1;
- } elsif ($directive eq "forwarders") {
- $options{"forwarders"}="{\n";
- foreach $forwarder (@rest) {
- $options{"forwarders"} .= "\t\t$forwarder;\n";
- }
- $options{"forwarders"} .= "\t}";
- $options_comments{"forwarders"} = $comment;
- $have_options = 1;
- } elsif ($directive eq "slave") {
- &handle_options("forward-only");
- } elsif ($directive eq "options") {
- &handle_options(@rest);
- } elsif ($directive eq "limit") {
- &handle_limit(@rest);
- } elsif ($directive eq "include") {
- $new_config .=
- "// make sure your include is still in the right place\n";
- $comment = "\t" . $comment;
- $new_config .= "include \"$rest[0]\";$comment\n\n";
- } elsif ($directive eq "xfrnets" || $directive eq "tcplist") {
- if ($comment ne "") {
- $comment = "\t$comment";
- }
- foreach $elt (@rest) {
- push(@transfer_acl, $elt);
- push(@transfer_comments, $comment);
- }
- $have_options = 1;
- } elsif ($directive eq "sortlist") {
- if ($comment ne "") {
- $comment = "\t$comment";
- }
- foreach $elt (@rest) {
- push(@topology, $elt);
- push(@topology_comments, $comment);
- }
- } elsif ($directive eq "bogusns") {
- if ($comment ne "") {
- $comment = "\t$comment";
- }
- foreach $elt (@rest) {
- push(@bogus, $elt);
- push(@bogus_comments, $comment);
- }
- } elsif ($directive eq "max-fetch") {
- $options{"transfers-in"}=$rest[0];
- $options_comments{"transfers-in"}=$comment;
- $have_options = 1;
- } else {
- $new_config .= "// NOTE: unconverted directive '$directive @rest'\n\n";
- }
-}
-
-print "// generated by named-bootconf.pl\n\n";
-if ($have_options) {
- print "options {\n";
- foreach $option (sort(keys(%options))) {
- print "\t$option $options{$option};";
- if ($options_comments{$option} ne "") {
- print "\t$options_comments{$option}";
- }
- print "\n";
- }
- if (@transfer_acl > 0) {
- print "\tallow-transfer {\n";
- for ($i = 0; $i <= $#transfer_acl; $i++) {
- &print_maybe_masked("\t\t", $transfer_acl[$i],
- $transfer_comments[$i]);
- }
- print "\t};\n";
- }
- print "\t/*
-\t * If there is a firewall between you and nameservers you want
-\t * to talk to, you might need to uncomment the query-source
-\t * directive below. Previous versions of BIND always asked
-\t * questions using port 53, but BIND 8.1 uses an unprivileged
-\t * port by default.
-\t */
-\t// query-source address * port 53;
-";
-
- print "};\n\n";
-}
-if ($logging ne "") {
- print "logging {\n$logging};\n\n";
-}
-if (@topology > 0) {
- print "// Note: the following will be supported in a future release.\n";
- print "/*\n";
- print "host { any; } {\n\ttopology {\n";
- for ($i = 0; $i <= $#topology; $i++) {
- &print_maybe_masked("\t\t", $topology[$i],
- $topology_comments[$i]);
- }
- print "\t};\n};\n";
- print "*/\n";
- print "\n";
-}
-if (@bogus > 0) {
- for ($i = 0; $i <= $#bogus; $i++) {
- print "server $bogus[$i] { bogus yes; };$bogus_comments[$i]\n";
- }
- print "\n";
-}
-print $new_config;
-
-exit 0;
-
-sub maybe_print_comment {
- $prefix = shift;
- $suffix = shift;
- if ($comment ne "") {
- $new_config .= sprintf("%s%s%s", $prefix, $comment, $suffix);
- }
-}
-
-sub handle_options {
- foreach $option (@_) {
- if ($option eq "forward-only") {
- $options{"forward"}="only";
- $options_comments{"forward"}=$comment;
- $have_options = 1;
- } elsif ($option eq "no-recursion") {
- $options{"recursion"}="no";
- $options_comments{"recursion"}=$comment;
- $have_options = 1;
- } elsif ($option eq "no-fetch-glue") {
- $options{"fetch-glue"}="no";
- $options_comments{"fetch-glue"}=$comment;
- $have_options = 1;
- } elsif ($option eq "fake-iquery") {
- $options{"fake-iquery"}="yes";
- $options_comments{"fake-iquery"}=$comment;
- $have_options = 1;
- } elsif ($option eq "query-log") {
- if ($comment ne "") {
- $logging .= "\t$comment\n";
- }
- $logging .= "\tcategory queries { default_syslog; };\n";
- } else {
- $options{"// NOTE: unconverted option '$option'"}="";
- $options_comments{"// NOTE: unconverted option '$option'"}=
- $comment;
- $have_options = 1;
- }
- }
-}
-
-sub handle_limit {
- $limit = shift;
- if ($limit eq "datasize" || $limit eq "transfers-in"
- || $limit eq "transfers-per-ns" || $limit eq "files") {
- $options{$limit}=$_[0];
- $options_comments{$limit}=$comment;
- $have_options = 1;
- } else {
- $options{"// NOTE: unconverted limit '$limit @_'"}="";
- $options_comments{"// NOTE: unconverted limit '$limit @_'"}=$comment;
- $have_options = 1;
- }
-}
-
-sub print_maybe_masked {
- # this assumes a contiguous netmask starting at the MSB
- $prefix = shift;
- $elt = shift;
- $elt_comment = shift;
- if ($elt =~ /^(.*)&(.*)$/) {
- $address = $1;
- $mask = $2;
- ($m1,$m2,$m3,$m4) = split(/\./, $mask);
- $mask_val = ($m1 << 24) + ($m2 << 16) +($m3 << 8) + $m4;
- $zero_bits = 0;
- while (($mask_val % 2) == 0) {
- $mask_val /= 2;
- $zero_bits++;
- }
- $mask_bits = 32 - $zero_bits;
- } else {
- $address = $elt;
- ($a1,$a2,$a3,$a4) = split(/\./, $address);
- if ($a1 < 128) {
- $mask_bits = 8;
- } elsif ($a1 < 192) {
- $mask_bits = 16;
- } else {
- $mask_bits = 24;
- }
- }
-
- print "$prefix$address";
- if ($mask_bits != 32) {
- print "/$mask_bits";
- }
- print ";$elt_comment\n";
-}
diff --git a/contrib/bind/bin/named/ns_parser.c b/contrib/bind/bin/named/ns_parser.c
deleted file mode 100644
index 28f5f70..0000000
--- a/contrib/bind/bin/named/ns_parser.c
+++ /dev/null
@@ -1,3271 +0,0 @@
-#ifndef lint
-static char const yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
-#endif
-#include <stdlib.h>
-#define YYBYACC 1
-#define YYMAJOR 1
-#define YYMINOR 9
-#define YYLEX yylex()
-#define YYEMPTY -1
-#define yyclearin (yychar=(YYEMPTY))
-#define yyerrok (yyerrflag=0)
-#define YYRECOVERING (yyerrflag!=0)
-#if defined(c_plusplus) || defined(__cplusplus)
-#include <stdlib.h>
-#else
-extern char *getenv();
-extern void *realloc();
-#endif
-static int yygrowstack();
-#define YYPREFIX "yy"
-#line 2 "ns_parser.y"
-#if !defined(lint) && !defined(SABER)
-static char rcsid[] = "$Id: ns_parser.y,v 8.79 2002/04/25 05:27:13 marka Exp $";
-#endif /* not lint */
-
-/*
- * Copyright (c) 1996-2000 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/* Global C stuff goes here. */
-
-#include "port_before.h"
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <arpa/inet.h>
-
-#include <ctype.h>
-#include <limits.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <syslog.h>
-#include <time.h>
-
-#include <isc/eventlib.h>
-#include <isc/logging.h>
-
-#include <isc/dst.h>
-
-#include "port_after.h"
-
-#include "named.h"
-#include "ns_parseutil.h"
-#include "ns_lexer.h"
-
-#define SYM_ZONE 0x010000
-#define SYM_SERVER 0x020000
-#define SYM_KEY 0x030000
-#define SYM_ACL 0x040000
-#define SYM_CHANNEL 0x050000
-#define SYM_PORT 0x060000
-
-#define SYMBOL_TABLE_SIZE 29989 /* should always be prime */
-static symbol_table symtab;
-
-#define AUTH_TABLE_SIZE 397 /* should always be prime */
-static symbol_table authtab = NULL;
-static symbol_table channeltab = NULL;
-
-static zone_config current_zone;
-static int should_install;
-
-static options current_options;
-static int seen_options;
-static int logged_options_error;
-
-static controls current_controls;
-
-static int seen_topology;
-
-static server_config current_server;
-static int seen_server;
-
-static char *current_algorithm;
-static char *current_secret;
-
-static log_config current_logging;
-static int current_category;
-static int chan_type;
-static int chan_level;
-static u_int chan_flags;
-static int chan_facility;
-static char *chan_name;
-static int chan_versions;
-static u_long chan_max_size;
-
-static log_channel lookup_channel(char *);
-static void define_channel(const char *, log_channel);
-static char *canonical_name(char *);
-
-int yyparse();
-
-#line 105 "ns_parser.y"
-typedef union {
- char * cp;
- int s_int;
- long num;
- u_long ul_int;
- u_int16_t us_int;
- struct in_addr ip_addr;
- ip_match_element ime;
- ip_match_list iml;
- rrset_order_list rol;
- rrset_order_element roe;
- struct dst_key * keyi;
- enum axfr_format axfr_fmt;
-} YYSTYPE;
-#line 139 "y.tab.c"
-#define L_EOS 257
-#define L_IPADDR 258
-#define L_NUMBER 259
-#define L_STRING 260
-#define L_QSTRING 261
-#define L_END_INCLUDE 262
-#define T_INCLUDE 263
-#define T_OPTIONS 264
-#define T_DIRECTORY 265
-#define T_PIDFILE 266
-#define T_NAMED_XFER 267
-#define T_DUMP_FILE 268
-#define T_STATS_FILE 269
-#define T_MEMSTATS_FILE 270
-#define T_FAKE_IQUERY 271
-#define T_RECURSION 272
-#define T_FETCH_GLUE 273
-#define T_HITCOUNT 274
-#define T_PREFERRED_GLUE 275
-#define T_QUERY_SOURCE 276
-#define T_LISTEN_ON 277
-#define T_PORT 278
-#define T_ADDRESS 279
-#define T_RRSET_ORDER 280
-#define T_ORDER 281
-#define T_NAME 282
-#define T_CLASS 283
-#define T_CONTROLS 284
-#define T_INET 285
-#define T_UNIX 286
-#define T_PERM 287
-#define T_OWNER 288
-#define T_GROUP 289
-#define T_ALLOW 290
-#define T_DATASIZE 291
-#define T_STACKSIZE 292
-#define T_CORESIZE 293
-#define T_DEFAULT 294
-#define T_UNLIMITED 295
-#define T_FILES 296
-#define T_VERSION 297
-#define T_HOSTNAME 298
-#define T_HOSTSTATS 299
-#define T_HOSTSTATSMAX 300
-#define T_DEALLOC_ON_EXIT 301
-#define T_TRANSFERS_IN 302
-#define T_TRANSFERS_OUT 303
-#define T_TRANSFERS_PER_NS 304
-#define T_TRANSFER_FORMAT 305
-#define T_MAX_TRANSFER_TIME_IN 306
-#define T_SERIAL_QUERIES 307
-#define T_ONE_ANSWER 308
-#define T_MANY_ANSWERS 309
-#define T_NOTIFY 310
-#define T_EXPLICIT 311
-#define T_NOTIFY_INITIAL 312
-#define T_AUTH_NXDOMAIN 313
-#define T_MULTIPLE_CNAMES 314
-#define T_USE_IXFR 315
-#define T_MAINTAIN_IXFR_BASE 316
-#define T_CLEAN_INTERVAL 317
-#define T_INTERFACE_INTERVAL 318
-#define T_STATS_INTERVAL 319
-#define T_MAX_LOG_SIZE_IXFR 320
-#define T_HEARTBEAT 321
-#define T_USE_ID_POOL 322
-#define T_MAX_NCACHE_TTL 323
-#define T_HAS_OLD_CLIENTS 324
-#define T_RFC2308_TYPE1 325
-#define T_LAME_TTL 326
-#define T_MIN_ROOTS 327
-#define T_TREAT_CR_AS_SPACE 328
-#define T_LOGGING 329
-#define T_CATEGORY 330
-#define T_CHANNEL 331
-#define T_SEVERITY 332
-#define T_DYNAMIC 333
-#define T_FILE 334
-#define T_VERSIONS 335
-#define T_SIZE 336
-#define T_SYSLOG 337
-#define T_DEBUG 338
-#define T_NULL_OUTPUT 339
-#define T_PRINT_TIME 340
-#define T_PRINT_CATEGORY 341
-#define T_PRINT_SEVERITY 342
-#define T_SORTLIST 343
-#define T_TOPOLOGY 344
-#define T_SERVER 345
-#define T_LONG_AXFR 346
-#define T_BOGUS 347
-#define T_TRANSFERS 348
-#define T_KEYS 349
-#define T_SUPPORT_IXFR 350
-#define T_ZONE 351
-#define T_IN 352
-#define T_CHAOS 353
-#define T_HESIOD 354
-#define T_TYPE 355
-#define T_MASTER 356
-#define T_SLAVE 357
-#define T_STUB 358
-#define T_RESPONSE 359
-#define T_HINT 360
-#define T_MASTERS 361
-#define T_TRANSFER_SOURCE 362
-#define T_PUBKEY 363
-#define T_ALSO_NOTIFY 364
-#define T_DIALUP 365
-#define T_FILE_IXFR 366
-#define T_IXFR_TMP 367
-#define T_TRUSTED_KEYS 368
-#define T_ACL 369
-#define T_ALLOW_UPDATE 370
-#define T_ALLOW_QUERY 371
-#define T_ALLOW_TRANSFER 372
-#define T_ALLOW_RECURSION 373
-#define T_BLACKHOLE 374
-#define T_SEC_KEY 375
-#define T_ALGID 376
-#define T_SECRET 377
-#define T_CHECK_NAMES 378
-#define T_WARN 379
-#define T_FAIL 380
-#define T_IGNORE 381
-#define T_FORWARD 382
-#define T_FORWARDERS 383
-#define T_ONLY 384
-#define T_FIRST 385
-#define T_IF_NO_ANSWER 386
-#define T_IF_NO_DOMAIN 387
-#define T_YES 388
-#define T_TRUE 389
-#define T_NO 390
-#define T_FALSE 391
-#define YYERRCODE 256
-const short yylhs[] = { -1,
- 0, 31, 31, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 33, 42, 34, 43, 43,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 46,
- 44, 44, 44, 44, 44, 44, 44, 49, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 35,
- 53, 53, 54, 54, 54, 54, 54, 54, 15, 15,
- 12, 12, 13, 13, 14, 14, 16, 6, 6, 5,
- 5, 4, 4, 56, 57, 48, 48, 48, 48, 2,
- 2, 3, 3, 29, 29, 29, 29, 29, 27, 27,
- 27, 28, 28, 28, 45, 45, 45, 45, 51, 51,
- 51, 51, 26, 26, 26, 26, 52, 52, 52, 47,
- 47, 58, 58, 59, 50, 50, 60, 60, 61, 62,
- 36, 63, 63, 63, 65, 64, 67, 64, 69, 69,
- 69, 69, 70, 70, 71, 72, 72, 72, 72, 72,
- 73, 10, 10, 11, 11, 74, 75, 75, 75, 75,
- 75, 75, 75, 68, 68, 68, 9, 9, 76, 66,
- 66, 66, 8, 8, 8, 7, 77, 37, 78, 78,
- 79, 79, 79, 79, 79, 79, 20, 20, 18, 18,
- 18, 17, 17, 17, 17, 17, 19, 23, 81, 80,
- 80, 80, 82, 55, 55, 55, 83, 41, 84, 84,
- 84, 24, 25, 40, 86, 38, 85, 85, 21, 21,
- 22, 22, 22, 22, 22, 87, 87, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 88, 91, 88,
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 89, 89, 94, 94, 93, 93, 95, 95, 96, 90,
- 90, 92, 92, 97, 97, 98, 39, 99, 99, 100,
- 100, 1, 30, 30,
-};
-const short yylen[] = { 2,
- 1, 1, 2, 1, 2, 2, 2, 2, 2, 2,
- 2, 2, 1, 2, 2, 3, 0, 5, 2, 3,
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 3, 2, 2, 5, 2, 0,
- 5, 2, 2, 4, 4, 4, 4, 0, 5, 4,
- 4, 1, 1, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 4, 2, 2, 1, 4,
- 2, 3, 0, 8, 10, 12, 8, 1, 2, 3,
- 0, 2, 0, 2, 0, 2, 5, 1, 1, 1,
- 1, 1, 1, 2, 2, 1, 1, 2, 2, 0,
- 2, 0, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
- 2, 2, 1, 1, 1, 1, 2, 2, 2, 0,
- 1, 2, 3, 1, 0, 1, 2, 3, 1, 0,
- 5, 2, 3, 1, 0, 6, 0, 6, 1, 1,
- 2, 1, 2, 2, 2, 0, 1, 1, 2, 2,
- 3, 1, 1, 0, 1, 2, 1, 1, 1, 2,
- 2, 2, 2, 2, 3, 1, 1, 1, 1, 2,
- 3, 1, 1, 1, 1, 1, 0, 6, 2, 3,
- 2, 2, 2, 2, 4, 1, 2, 3, 1, 2,
- 2, 1, 3, 3, 1, 3, 1, 1, 1, 2,
- 3, 1, 1, 2, 3, 1, 0, 6, 2, 2,
- 1, 3, 3, 5, 0, 5, 0, 3, 0, 1,
- 1, 1, 1, 1, 1, 2, 3, 2, 2, 2,
- 2, 5, 2, 2, 4, 4, 4, 2, 0, 5,
- 2, 2, 2, 2, 2, 5, 5, 4, 2, 1,
- 2, 3, 1, 3, 0, 1, 2, 3, 1, 1,
- 1, 0, 1, 2, 3, 1, 4, 2, 3, 5,
- 5, 1, 1, 1,
-};
-const short yydefred[] = { 0,
- 0, 13, 0, 17, 0, 150, 0, 0, 0, 0,
- 227, 0, 0, 2, 4, 0, 0, 0, 0, 0,
- 0, 0, 0, 14, 15, 0, 0, 0, 0, 197,
- 0, 0, 293, 294, 0, 0, 3, 5, 6, 7,
- 8, 9, 10, 11, 12, 16, 0, 88, 0, 0,
- 0, 0, 0, 0, 235, 240, 0, 0, 0, 0,
- 0, 79, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 58, 0, 0, 0, 0, 0, 0, 0,
- 50, 0, 0, 62, 63, 100, 101, 0, 0, 80,
- 0, 81, 154, 0, 0, 0, 0, 0, 0, 0,
- 0, 287, 0, 288, 0, 0, 0, 0, 0, 209,
- 0, 215, 0, 217, 0, 24, 26, 25, 29, 27,
- 28, 118, 114, 115, 116, 117, 31, 32, 33, 34,
- 30, 0, 0, 52, 0, 0, 0, 0, 0, 134,
- 135, 136, 129, 133, 130, 131, 132, 23, 22, 38,
- 70, 39, 137, 138, 139, 98, 99, 64, 65, 66,
- 35, 36, 37, 43, 44, 40, 41, 67, 68, 69,
- 71, 74, 46, 72, 42, 47, 73, 78, 77, 0,
- 0, 53, 0, 75, 0, 0, 0, 0, 119, 120,
- 121, 0, 125, 126, 127, 128, 49, 0, 18, 0,
- 19, 0, 0, 0, 82, 194, 195, 155, 196, 193,
- 188, 157, 187, 151, 0, 152, 206, 0, 0, 0,
- 0, 0, 0, 0, 0, 236, 0, 0, 289, 0,
- 0, 211, 0, 210, 207, 234, 0, 231, 0, 0,
- 0, 0, 0, 292, 103, 102, 105, 104, 108, 109,
- 111, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 122, 123, 124, 45, 0, 20, 0,
- 0, 0, 0, 0, 153, 204, 201, 203, 0, 202,
- 198, 0, 199, 270, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 259, 0, 0, 0, 0, 213, 214, 216,
- 208, 0, 0, 229, 230, 228, 0, 92, 0, 0,
- 76, 0, 89, 57, 61, 149, 0, 0, 0, 54,
- 56, 55, 60, 144, 0, 0, 0, 0, 0, 0,
- 0, 0, 222, 219, 218, 0, 0, 200, 261, 263,
- 264, 265, 262, 249, 241, 242, 244, 243, 245, 248,
- 0, 0, 253, 0, 0, 0, 269, 250, 251, 0,
- 0, 0, 254, 280, 281, 258, 0, 238, 0, 246,
- 290, 291, 232, 233, 48, 94, 0, 0, 90, 59,
- 0, 147, 51, 0, 142, 0, 0, 0, 192, 189,
- 0, 0, 186, 0, 0, 0, 179, 0, 0, 0,
- 0, 177, 178, 0, 205, 0, 220, 113, 0, 0,
- 0, 279, 0, 0, 0, 0, 0, 0, 0, 247,
- 96, 0, 148, 143, 0, 0, 0, 156, 0, 190,
- 162, 0, 159, 180, 0, 173, 175, 176, 172, 181,
- 182, 183, 158, 0, 184, 221, 0, 0, 0, 0,
- 0, 268, 0, 277, 255, 256, 257, 286, 0, 0,
- 0, 97, 0, 0, 87, 191, 161, 0, 0, 0,
- 0, 171, 185, 0, 252, 0, 271, 266, 267, 278,
- 260, 0, 284, 0, 226, 223, 0, 0, 163, 164,
- 165, 169, 170, 274, 272, 285, 0, 85, 0, 224,
- 0, 225, 86,
-};
-const short yydgoto[] = { 12,
- 286, 178, 402, 287, 128, 198, 248, 249, 440, 487,
- 488, 294, 360, 428, 295, 296, 150, 151, 152, 153,
- 55, 400, 536, 281, 282, 183, 232, 307, 167, 154,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 27, 122, 123, 237, 238, 375, 174, 223, 367,
- 124, 125, 51, 52, 537, 175, 176, 376, 377, 368,
- 369, 29, 136, 137, 313, 441, 314, 451, 484, 520,
- 521, 522, 452, 453, 454, 442, 54, 263, 264, 386,
- 387, 538, 36, 283, 266, 139, 344, 345, 498, 416,
- 417, 509, 463, 499, 464, 465, 510, 511, 58, 59,
-};
-const short yysindex[] = { 148,
- -173, 0, -245, 0, -82, 0, -202, -214, -65, -180,
- 0, 0, 148, 0, 0, -193, -183, -179, -170, -159,
- -154, -150, -143, 0, 0, -120, 18, -151, 20, 0,
- -180, -108, 0, 0, 41, -180, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 414, 0, -25, -93,
- -102, -85, -218, 51, 0, 0, -139, -90, -71, 66,
- 55, 0, -47, -42, -34, 10, 33, 53, -123, -123,
- -123, -123, -62, -67, -17, 196, 56, 56, 56, 56,
- 73, 82, -123, 88, -123, 89, 99, 100, -92, 102,
- 103, -182, -123, -123, -123, -123, -123, 104, 105, 107,
- 56, 118, -123, 119, -123, -123, 121, 122, -123, 259,
- 260, -25, 0, -123, 261, 265, 266, 268, -162, -56,
- 0, 295, 136, 0, 0, 0, 0, -181, 108, 0,
- 139, 0, 0, -134, -200, -72, 140, -217, 275, 141,
- 143, 0, 142, 0, 356, 359, 149, 66, -79, 0,
- 150, 0, -29, 0, -219, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -31, -25, 0, 130, 137, 159, 299, 145, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
- 66, 0, 300, 0, 66, 66, 66, 66, 0, 0,
- 0, -177, 0, 0, 0, 0, 0, 301, 0, 169,
- 0, 159, 307, 174, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 178, 0, 0, -92, -123, 179,
- 317, -123, -100, 187, 439, 0, 186, 188, 0, 190,
- 191, 0, -23, 0, 0, 0, 195, 0, -180, -180,
- 80, 83, 335, 0, 0, 0, 0, 0, 0, 0,
- 0, 66, -180, 106, -110, 205, -19, -15, 207, -6,
- 15, 19, 26, 0, 0, 0, 0, 208, 0, 173,
- 66, 180, 344, 346, 0, 0, 0, 0, -145, 0,
- 0, 221, 0, 0, 223, -49, -123, 56, 222, -3,
- 206, -25, 22, 362, -123, 225, 227, 366, 367, 371,
- -177, -128, 0, 109, 238, 235, 236, 0, 0, 0,
- 0, 241, 243, 0, 0, 0, 30, 0, -180, 224,
- 0, 248, 0, 0, 0, 0, 382, 207, 251, 0,
- 0, 0, 0, 0, 386, 208, 255, 390, 38, 256,
- -211, 114, 0, 0, 0, -70, 262, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 159, 395, 0, 263, 267, 270, 0, 0, 0, 66,
- 66, 66, 0, 0, 0, 0, 397, 0, 264, 0,
- 0, 0, 0, 0, 0, 0, 269, 244, 0, 0,
- 272, 0, 0, 274, 0, 66, 175, 245, 0, 0,
- -113, 276, 0, -188, 271, -178, 0, -123, -123, -123,
- -119, 0, 0, 278, 0, 279, 0, 0, 280, 281,
- 283, 0, 418, 270, 282, 42, 46, 52, 286, 0,
- 0, 285, 0, 0, 62, 423, 288, 0, 291, 0,
- 0, 290, 0, 0, -43, 0, 0, 0, 0, 0,
- 0, 0, 0, 293, 0, 0, 177, -112, 296, 294,
- 312, 0, 297, 0, 0, 0, 0, 0, 431, 286,
- 319, 0, 228, -138, 0, 0, 0, -205, 56, 242,
- 239, 0, 0, -180, 0, 322, 0, 0, 0, 0,
- 0, 323, 0, 458, 0, 0, -68, 325, 0, 0,
- 0, 0, 0, 0, 0, 0, -138, 0, 327, 0,
- -60, 0, 0,
-};
-const short yyrindex[] = { 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 585, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 332, 0, 0,
- -95, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 333, 0, 0, 0,
- 332, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 480, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 333, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 347, 0,
- 0, 0, 0, 0, 349, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 368, 369, 0, 0, -189, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 63, -189, 0, 0, 0, 499, 0,
- 0, 0, 0, 0, 0, 0, 0, 502, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 505, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 348,
- 0, 0, 0, 0, 0, 0, 0, 506, 0, 0,
- 0, 0, 0, 0, 0, 507, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 508, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 373, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 509, 0, 0, 0, 0, 510, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 379, 0, 0, 380, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 383, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 516,
- 0, 0, 385, 0, 0, 0, 0, 0, 0, 387,
- 388, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,
-};
-const short yygindex[] = { 0,
- -141, 0, 0, 0, -107, 389, 0, 0, 511, 0,
- 0, 0, 0, 0, 0, 353, 494, 35, 0, 147,
- 0, 0, -300, 370, 372, -77, 0, 308, -63, -10,
- 0, 637, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 529, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 603, 111, 479, 481, 0, 287, 0,
- 303, 0, 0, 525, 0, 0, 0, 0, 0, 144,
- 152, 0, 0, 0, 211, 233, 0, 0, 401, 0,
- 289, -475, 0, 0, 0, 0, 0, 352, 0, 0,
- 0, 0, 0, 194, 0, 212, 0, 183, 0, 639,
-};
-#define YYTABLESIZE 822
-const short yytable[] = { 35,
- 185, 186, 187, 149, 222, 493, 168, 169, 170, 149,
- 285, 478, 525, 149, 361, 26, 127, 149, 384, 190,
- 56, 192, 130, 211, 321, 61, 149, 239, 202, 203,
- 204, 205, 206, 207, 142, 291, 278, 133, 257, 213,
- 28, 215, 216, 148, 439, 219, 31, 149, 33, 34,
- 224, 149, 254, 539, 455, 30, 548, 32, 149, 33,
- 34, 549, 149, 38, 553, 288, 184, 184, 184, 184,
- 149, 33, 34, 39, 149, 549, 162, 40, 149, 33,
- 34, 33, 34, 24, 149, 384, 41, 258, 25, 540,
- 184, 91, 91, 148, 149, 276, 242, 42, 149, 148,
- 310, 350, 43, 148, 48, 364, 44, 148, 243, 365,
- 383, 134, 135, 45, 33, 34, 148, 535, 370, 140,
- 141, 33, 34, 250, 253, 33, 34, 251, 201, 259,
- 260, 261, 262, 49, 50, 162, 46, 148, 251, 371,
- 47, 148, 53, 372, 481, 497, 33, 34, 148, 482,
- 373, 57, 148, 48, 425, 257, 279, 280, 486, 246,
- 148, 239, 437, 60, 148, 91, 505, 129, 148, 57,
- 506, 132, 293, 138, 148, 247, 507, 155, 145, 146,
- 33, 34, 49, 50, 148, 144, 513, 277, 148, 33,
- 34, 33, 34, 229, 230, 317, 231, 171, 320, 33,
- 34, 304, 305, 306, 258, 163, 164, 165, 166, 162,
- 172, 173, 444, 156, 445, 196, 197, 446, 157, 447,
- 448, 449, 450, 544, 403, 251, 158, 284, 145, 146,
- 33, 34, 126, 418, 145, 146, 33, 34, 145, 146,
- 33, 34, 145, 146, 33, 34, 259, 260, 261, 262,
- 393, 145, 146, 33, 34, 414, 415, 134, 135, 458,
- 177, 390, 391, 392, 163, 164, 165, 166, 352, 353,
- 159, 407, 145, 146, 33, 34, 145, 146, 33, 34,
- 404, 405, 358, 145, 146, 33, 34, 145, 146, 33,
- 34, 518, 519, 160, 273, 145, 146, 33, 34, 145,
- 146, 33, 34, 145, 146, 33, 34, 277, 385, 145,
- 146, 33, 34, 161, 180, 33, 34, 184, 179, 145,
- 146, 33, 34, 145, 146, 33, 34, 233, 234, 235,
- 236, 277, 277, 188, 277, 277, 277, 277, 163, 164,
- 165, 166, 189, 93, 93, 147, 191, 193, 426, 181,
- 182, 147, 395, 396, 397, 147, 398, 194, 195, 147,
- 199, 200, 208, 209, 324, 210, 297, 298, 147, 443,
- 253, 300, 301, 302, 303, 385, 212, 214, 399, 217,
- 218, 220, 221, 225, 490, 491, 492, 226, 227, 147,
- 228, 277, 241, 147, 244, 245, 256, 265, 269, 267,
- 147, 268, 270, 1, 147, 271, 275, 172, 272, 2,
- 3, 4, 147, 277, 325, 173, 147, 284, 326, 239,
- 147, 292, 299, 308, 327, 309, 147, 293, 328, 311,
- 253, 5, 312, 483, 315, 489, 147, 318, 357, 319,
- 147, 541, 329, 323, 346, 444, 347, 445, 348, 349,
- 446, 351, 447, 448, 449, 450, 280, 379, 279, 356,
- 359, 363, 378, 330, 366, 374, 381, 380, 382, 331,
- 332, 333, 334, 335, 336, 337, 6, 388, 338, 339,
- 340, 389, 394, 401, 406, 408, 341, 409, 410, 411,
- 342, 343, 7, 412, 420, 421, 422, 423, 8, 424,
- 277, 277, 277, 385, 429, 427, 430, 432, 184, 277,
- 433, 435, 436, 385, 438, 9, 10, 459, 457, 469,
- 470, 460, 11, 476, 472, 461, 385, 462, 473, 471,
- 474, 485, 480, 477, 495, 496, 385, 497, 504, 500,
- 385, 501, 502, 508, 512, 514, 515, 516, 517, 523,
- 62, 524, 527, 530, 528, 531, 466, 467, 468, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, 75, 529, 518, 76, 533, 534, 519, 545, 546,
- 547, 550, 475, 552, 1, 77, 78, 79, 83, 21,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
- 90, 91, 110, 237, 92, 212, 93, 94, 95, 96,
- 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
- 107, 108, 109, 145, 106, 107, 140, 112, 95, 174,
- 146, 141, 275, 276, 282, 160, 166, 110, 111, 273,
- 283, 84, 274, 167, 168, 252, 316, 362, 413, 37,
- 240, 355, 354, 131, 290, 289, 112, 551, 113, 114,
- 255, 494, 434, 322, 543, 115, 116, 117, 118, 62,
- 431, 542, 119, 479, 456, 503, 120, 121, 63, 64,
- 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
- 75, 526, 532, 76, 324, 419, 143, 0, 0, 0,
- 0, 0, 0, 0, 77, 78, 79, 0, 0, 80,
- 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
- 91, 0, 0, 92, 0, 93, 94, 95, 96, 97,
- 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
- 108, 109, 0, 0, 325, 0, 0, 0, 326, 0,
- 0, 0, 0, 0, 327, 0, 110, 111, 328, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 329, 0, 0, 112, 0, 113, 114, 0,
- 0, 0, 0, 0, 115, 116, 117, 118, 0, 0,
- 0, 119, 0, 330, 0, 120, 121, 0, 0, 331,
- 332, 333, 334, 335, 336, 337, 0, 0, 338, 339,
- 340, 0, 0, 0, 0, 0, 341, 0, 0, 0,
- 342, 343,
-};
-const short yycheck[] = { 10,
- 78, 79, 80, 33, 112, 125, 70, 71, 72, 33,
- 42, 125, 125, 33, 125, 261, 42, 33, 319, 83,
- 31, 85, 125, 101, 125, 36, 33, 123, 92, 93,
- 94, 95, 96, 97, 125, 177, 256, 256, 256, 103,
- 123, 105, 106, 123, 256, 109, 261, 33, 260, 261,
- 114, 33, 125, 259, 125, 258, 125, 123, 33, 260,
- 261, 537, 33, 257, 125, 173, 77, 78, 79, 80,
- 33, 260, 261, 257, 33, 551, 259, 257, 33, 260,
- 261, 260, 261, 257, 33, 386, 257, 305, 262, 295,
- 101, 281, 282, 123, 33, 125, 278, 257, 33, 123,
- 242, 125, 257, 123, 256, 125, 257, 123, 290, 125,
- 256, 330, 331, 257, 260, 261, 123, 256, 125, 259,
- 260, 260, 261, 134, 135, 260, 261, 339, 311, 347,
- 348, 349, 350, 285, 286, 259, 257, 123, 339, 125,
- 123, 123, 123, 125, 333, 258, 260, 261, 123, 338,
- 125, 260, 123, 256, 125, 256, 376, 377, 337, 294,
- 123, 257, 125, 123, 123, 355, 125, 261, 123, 260,
- 125, 257, 283, 123, 123, 310, 125, 123, 258, 259,
- 260, 261, 285, 286, 123, 257, 125, 153, 123, 260,
- 261, 260, 261, 356, 357, 259, 359, 260, 262, 260,
- 261, 379, 380, 381, 305, 388, 389, 390, 391, 259,
- 278, 279, 332, 261, 334, 308, 309, 337, 261, 339,
- 340, 341, 342, 524, 332, 339, 261, 259, 258, 259,
- 260, 261, 258, 125, 258, 259, 260, 261, 258, 259,
- 260, 261, 258, 259, 260, 261, 347, 348, 349, 350,
- 328, 258, 259, 260, 261, 384, 385, 330, 331, 401,
- 278, 311, 326, 327, 388, 389, 390, 391, 279, 280,
- 261, 335, 258, 259, 260, 261, 258, 259, 260, 261,
- 259, 260, 293, 258, 259, 260, 261, 258, 259, 260,
- 261, 335, 336, 261, 148, 258, 259, 260, 261, 258,
- 259, 260, 261, 258, 259, 260, 261, 273, 319, 258,
- 259, 260, 261, 261, 259, 260, 261, 328, 123, 258,
- 259, 260, 261, 258, 259, 260, 261, 384, 385, 386,
- 387, 297, 298, 261, 300, 301, 302, 303, 388, 389,
- 390, 391, 261, 281, 282, 375, 259, 259, 359, 294,
- 295, 375, 356, 357, 358, 375, 360, 259, 259, 375,
- 259, 259, 259, 259, 256, 259, 220, 221, 375, 256,
- 381, 225, 226, 227, 228, 386, 259, 259, 382, 259,
- 259, 123, 123, 123, 448, 449, 450, 123, 123, 375,
- 123, 357, 257, 375, 287, 257, 257, 123, 257, 259,
- 375, 259, 47, 256, 375, 47, 257, 278, 260, 262,
- 263, 264, 375, 379, 306, 279, 375, 259, 310, 125,
- 375, 123, 123, 123, 316, 257, 375, 283, 320, 123,
- 441, 284, 259, 444, 257, 446, 375, 259, 292, 123,
- 375, 519, 334, 257, 259, 332, 259, 334, 259, 259,
- 337, 257, 339, 340, 341, 342, 377, 311, 376, 125,
- 355, 257, 290, 355, 258, 258, 123, 288, 123, 361,
- 362, 363, 364, 365, 366, 367, 329, 257, 370, 371,
- 372, 259, 261, 278, 123, 261, 378, 261, 123, 123,
- 382, 383, 345, 123, 257, 261, 261, 257, 351, 257,
- 466, 467, 468, 514, 257, 282, 125, 257, 519, 475,
- 125, 257, 123, 524, 259, 368, 369, 123, 257, 123,
- 257, 259, 375, 349, 281, 259, 537, 258, 257, 261,
- 257, 261, 257, 289, 257, 257, 547, 258, 257, 259,
- 551, 259, 125, 258, 260, 123, 259, 257, 259, 257,
- 256, 375, 257, 257, 261, 125, 410, 411, 412, 265,
- 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
- 276, 277, 261, 335, 280, 257, 349, 336, 257, 257,
- 123, 257, 436, 257, 0, 291, 292, 293, 257, 257,
- 296, 297, 298, 299, 300, 301, 302, 303, 304, 305,
- 306, 307, 123, 257, 310, 257, 312, 313, 314, 315,
- 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
- 326, 327, 328, 125, 257, 257, 125, 123, 281, 257,
- 125, 125, 125, 125, 125, 257, 257, 343, 344, 257,
- 125, 257, 149, 257, 257, 135, 258, 295, 341, 13,
- 122, 282, 281, 51, 176, 175, 362, 547, 364, 365,
- 136, 451, 376, 263, 521, 371, 372, 373, 374, 256,
- 368, 520, 378, 441, 386, 464, 382, 383, 265, 266,
- 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
- 277, 498, 510, 280, 256, 344, 58, -1, -1, -1,
- -1, -1, -1, -1, 291, 292, 293, -1, -1, 296,
- 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
- 307, -1, -1, 310, -1, 312, 313, 314, 315, 316,
- 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
- 327, 328, -1, -1, 306, -1, -1, -1, 310, -1,
- -1, -1, -1, -1, 316, -1, 343, 344, 320, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 334, -1, -1, 362, -1, 364, 365, -1,
- -1, -1, -1, -1, 371, 372, 373, 374, -1, -1,
- -1, 378, -1, 355, -1, 382, 383, -1, -1, 361,
- 362, 363, 364, 365, 366, 367, -1, -1, 370, 371,
- 372, -1, -1, -1, -1, -1, 378, -1, -1, -1,
- 382, 383,
-};
-#define YYFINAL 12
-#ifndef YYDEBUG
-#define YYDEBUG 0
-#elif YYDEBUG
-#include <stdio.h>
-#endif
-#define YYMAXTOKEN 391
-#if YYDEBUG
-const char * const yyname[] = {
-"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-"'!'",0,0,0,0,0,0,0,0,"'*'",0,0,0,0,"'/'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'{'",0,"'}'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"L_EOS",
-"L_IPADDR","L_NUMBER","L_STRING","L_QSTRING","L_END_INCLUDE","T_INCLUDE",
-"T_OPTIONS","T_DIRECTORY","T_PIDFILE","T_NAMED_XFER","T_DUMP_FILE",
-"T_STATS_FILE","T_MEMSTATS_FILE","T_FAKE_IQUERY","T_RECURSION","T_FETCH_GLUE",
-"T_HITCOUNT","T_PREFERRED_GLUE","T_QUERY_SOURCE","T_LISTEN_ON","T_PORT",
-"T_ADDRESS","T_RRSET_ORDER","T_ORDER","T_NAME","T_CLASS","T_CONTROLS","T_INET",
-"T_UNIX","T_PERM","T_OWNER","T_GROUP","T_ALLOW","T_DATASIZE","T_STACKSIZE",
-"T_CORESIZE","T_DEFAULT","T_UNLIMITED","T_FILES","T_VERSION","T_HOSTNAME",
-"T_HOSTSTATS","T_HOSTSTATSMAX","T_DEALLOC_ON_EXIT","T_TRANSFERS_IN",
-"T_TRANSFERS_OUT","T_TRANSFERS_PER_NS","T_TRANSFER_FORMAT",
-"T_MAX_TRANSFER_TIME_IN","T_SERIAL_QUERIES","T_ONE_ANSWER","T_MANY_ANSWERS",
-"T_NOTIFY","T_EXPLICIT","T_NOTIFY_INITIAL","T_AUTH_NXDOMAIN",
-"T_MULTIPLE_CNAMES","T_USE_IXFR","T_MAINTAIN_IXFR_BASE","T_CLEAN_INTERVAL",
-"T_INTERFACE_INTERVAL","T_STATS_INTERVAL","T_MAX_LOG_SIZE_IXFR","T_HEARTBEAT",
-"T_USE_ID_POOL","T_MAX_NCACHE_TTL","T_HAS_OLD_CLIENTS","T_RFC2308_TYPE1",
-"T_LAME_TTL","T_MIN_ROOTS","T_TREAT_CR_AS_SPACE","T_LOGGING","T_CATEGORY",
-"T_CHANNEL","T_SEVERITY","T_DYNAMIC","T_FILE","T_VERSIONS","T_SIZE","T_SYSLOG",
-"T_DEBUG","T_NULL_OUTPUT","T_PRINT_TIME","T_PRINT_CATEGORY","T_PRINT_SEVERITY",
-"T_SORTLIST","T_TOPOLOGY","T_SERVER","T_LONG_AXFR","T_BOGUS","T_TRANSFERS",
-"T_KEYS","T_SUPPORT_IXFR","T_ZONE","T_IN","T_CHAOS","T_HESIOD","T_TYPE",
-"T_MASTER","T_SLAVE","T_STUB","T_RESPONSE","T_HINT","T_MASTERS",
-"T_TRANSFER_SOURCE","T_PUBKEY","T_ALSO_NOTIFY","T_DIALUP","T_FILE_IXFR",
-"T_IXFR_TMP","T_TRUSTED_KEYS","T_ACL","T_ALLOW_UPDATE","T_ALLOW_QUERY",
-"T_ALLOW_TRANSFER","T_ALLOW_RECURSION","T_BLACKHOLE","T_SEC_KEY","T_ALGID",
-"T_SECRET","T_CHECK_NAMES","T_WARN","T_FAIL","T_IGNORE","T_FORWARD",
-"T_FORWARDERS","T_ONLY","T_FIRST","T_IF_NO_ANSWER","T_IF_NO_DOMAIN","T_YES",
-"T_TRUE","T_NO","T_FALSE",
-};
-const char * const yyrule[] = {
-"$accept : config_file",
-"config_file : statement_list",
-"statement_list : statement",
-"statement_list : statement_list statement",
-"statement : include_stmt",
-"statement : options_stmt L_EOS",
-"statement : controls_stmt L_EOS",
-"statement : logging_stmt L_EOS",
-"statement : server_stmt L_EOS",
-"statement : zone_stmt L_EOS",
-"statement : trusted_keys_stmt L_EOS",
-"statement : acl_stmt L_EOS",
-"statement : key_stmt L_EOS",
-"statement : L_END_INCLUDE",
-"statement : error L_EOS",
-"statement : error L_END_INCLUDE",
-"include_stmt : T_INCLUDE L_QSTRING L_EOS",
-"$$1 :",
-"options_stmt : T_OPTIONS $$1 '{' options '}'",
-"options : option L_EOS",
-"options : options option L_EOS",
-"option :",
-"option : T_HOSTNAME L_QSTRING",
-"option : T_VERSION L_QSTRING",
-"option : T_DIRECTORY L_QSTRING",
-"option : T_NAMED_XFER L_QSTRING",
-"option : T_PIDFILE L_QSTRING",
-"option : T_STATS_FILE L_QSTRING",
-"option : T_MEMSTATS_FILE L_QSTRING",
-"option : T_DUMP_FILE L_QSTRING",
-"option : T_PREFERRED_GLUE L_STRING",
-"option : T_FAKE_IQUERY yea_or_nay",
-"option : T_RECURSION yea_or_nay",
-"option : T_FETCH_GLUE yea_or_nay",
-"option : T_HITCOUNT yea_or_nay",
-"option : T_NOTIFY T_EXPLICIT",
-"option : T_NOTIFY yea_or_nay",
-"option : T_NOTIFY_INITIAL yea_or_nay",
-"option : T_HOSTSTATS yea_or_nay",
-"option : T_DEALLOC_ON_EXIT yea_or_nay",
-"option : T_USE_IXFR yea_or_nay",
-"option : T_MAINTAIN_IXFR_BASE yea_or_nay",
-"option : T_HAS_OLD_CLIENTS yea_or_nay",
-"option : T_AUTH_NXDOMAIN yea_or_nay",
-"option : T_MULTIPLE_CNAMES yea_or_nay",
-"option : T_CHECK_NAMES check_names_type check_names_opt",
-"option : T_USE_ID_POOL yea_or_nay",
-"option : T_RFC2308_TYPE1 yea_or_nay",
-"option : T_LISTEN_ON maybe_port '{' address_match_list '}'",
-"option : T_FORWARD forward_opt",
-"$$2 :",
-"option : T_FORWARDERS $$2 '{' opt_forwarders_list '}'",
-"option : T_QUERY_SOURCE query_source",
-"option : T_TRANSFER_SOURCE maybe_wild_addr",
-"option : T_ALLOW_QUERY '{' address_match_list '}'",
-"option : T_ALLOW_RECURSION '{' address_match_list '}'",
-"option : T_ALLOW_TRANSFER '{' address_match_list '}'",
-"option : T_SORTLIST '{' address_match_list '}'",
-"$$3 :",
-"option : T_ALSO_NOTIFY $$3 '{' opt_also_notify_list '}'",
-"option : T_BLACKHOLE '{' address_match_list '}'",
-"option : T_TOPOLOGY '{' address_match_list '}'",
-"option : size_clause",
-"option : transfer_clause",
-"option : T_TRANSFER_FORMAT transfer_format",
-"option : T_MAX_TRANSFER_TIME_IN L_NUMBER",
-"option : T_SERIAL_QUERIES L_NUMBER",
-"option : T_CLEAN_INTERVAL L_NUMBER",
-"option : T_INTERFACE_INTERVAL L_NUMBER",
-"option : T_STATS_INTERVAL L_NUMBER",
-"option : T_HOSTSTATSMAX L_NUMBER",
-"option : T_MAX_LOG_SIZE_IXFR size_spec",
-"option : T_MAX_NCACHE_TTL L_NUMBER",
-"option : T_LAME_TTL L_NUMBER",
-"option : T_HEARTBEAT L_NUMBER",
-"option : T_DIALUP yea_or_nay",
-"option : T_RRSET_ORDER '{' rrset_ordering_list '}'",
-"option : T_TREAT_CR_AS_SPACE yea_or_nay",
-"option : T_MIN_ROOTS L_NUMBER",
-"option : error",
-"controls_stmt : T_CONTROLS '{' controls '}'",
-"controls : control L_EOS",
-"controls : controls control L_EOS",
-"control :",
-"control : T_INET maybe_wild_addr T_PORT in_port T_ALLOW '{' address_match_list '}'",
-"control : T_INET maybe_wild_addr T_ALLOW '{' address_match_list '}' T_KEYS '{' dummy_key_list '}'",
-"control : T_INET maybe_wild_addr T_PORT in_port T_ALLOW '{' address_match_list '}' T_KEYS '{' dummy_key_list '}'",
-"control : T_UNIX L_QSTRING T_PERM L_NUMBER T_OWNER L_NUMBER T_GROUP L_NUMBER",
-"control : error",
-"rrset_ordering_list : rrset_ordering_element L_EOS",
-"rrset_ordering_list : rrset_ordering_list rrset_ordering_element L_EOS",
-"ordering_class :",
-"ordering_class : T_CLASS any_string",
-"ordering_type :",
-"ordering_type : T_TYPE any_string",
-"ordering_name :",
-"ordering_name : T_NAME L_QSTRING",
-"rrset_ordering_element : ordering_class ordering_type ordering_name T_ORDER L_STRING",
-"transfer_format : T_ONE_ANSWER",
-"transfer_format : T_MANY_ANSWERS",
-"maybe_wild_addr : L_IPADDR",
-"maybe_wild_addr : '*'",
-"maybe_wild_port : in_port",
-"maybe_wild_port : '*'",
-"query_source_address : T_ADDRESS maybe_wild_addr",
-"query_source_port : T_PORT maybe_wild_port",
-"query_source : query_source_address",
-"query_source : query_source_port",
-"query_source : query_source_address query_source_port",
-"query_source : query_source_port query_source_address",
-"maybe_port :",
-"maybe_port : T_PORT in_port",
-"maybe_zero_port :",
-"maybe_zero_port : T_PORT in_port",
-"yea_or_nay : T_YES",
-"yea_or_nay : T_TRUE",
-"yea_or_nay : T_NO",
-"yea_or_nay : T_FALSE",
-"yea_or_nay : L_NUMBER",
-"check_names_type : T_MASTER",
-"check_names_type : T_SLAVE",
-"check_names_type : T_RESPONSE",
-"check_names_opt : T_WARN",
-"check_names_opt : T_FAIL",
-"check_names_opt : T_IGNORE",
-"forward_opt : T_ONLY",
-"forward_opt : T_FIRST",
-"forward_opt : T_IF_NO_ANSWER",
-"forward_opt : T_IF_NO_DOMAIN",
-"size_clause : T_DATASIZE size_spec",
-"size_clause : T_STACKSIZE size_spec",
-"size_clause : T_CORESIZE size_spec",
-"size_clause : T_FILES size_spec",
-"size_spec : any_string",
-"size_spec : L_NUMBER",
-"size_spec : T_DEFAULT",
-"size_spec : T_UNLIMITED",
-"transfer_clause : T_TRANSFERS_IN L_NUMBER",
-"transfer_clause : T_TRANSFERS_OUT L_NUMBER",
-"transfer_clause : T_TRANSFERS_PER_NS L_NUMBER",
-"opt_forwarders_list :",
-"opt_forwarders_list : forwarders_in_addr_list",
-"forwarders_in_addr_list : forwarders_in_addr L_EOS",
-"forwarders_in_addr_list : forwarders_in_addr_list forwarders_in_addr L_EOS",
-"forwarders_in_addr : L_IPADDR",
-"opt_also_notify_list :",
-"opt_also_notify_list : also_notify_in_addr_list",
-"also_notify_in_addr_list : also_notify_in_addr L_EOS",
-"also_notify_in_addr_list : also_notify_in_addr_list also_notify_in_addr L_EOS",
-"also_notify_in_addr : L_IPADDR",
-"$$4 :",
-"logging_stmt : T_LOGGING $$4 '{' logging_opts_list '}'",
-"logging_opts_list : logging_opt L_EOS",
-"logging_opts_list : logging_opts_list logging_opt L_EOS",
-"logging_opts_list : error",
-"$$5 :",
-"logging_opt : T_CATEGORY category $$5 '{' channel_list '}'",
-"$$6 :",
-"logging_opt : T_CHANNEL channel_name $$6 '{' channel_opt_list '}'",
-"channel_severity : any_string",
-"channel_severity : T_DEBUG",
-"channel_severity : T_DEBUG L_NUMBER",
-"channel_severity : T_DYNAMIC",
-"version_modifier : T_VERSIONS L_NUMBER",
-"version_modifier : T_VERSIONS T_UNLIMITED",
-"size_modifier : T_SIZE size_spec",
-"maybe_file_modifiers :",
-"maybe_file_modifiers : version_modifier",
-"maybe_file_modifiers : size_modifier",
-"maybe_file_modifiers : version_modifier size_modifier",
-"maybe_file_modifiers : size_modifier version_modifier",
-"channel_file : T_FILE L_QSTRING maybe_file_modifiers",
-"facility_name : any_string",
-"facility_name : T_SYSLOG",
-"maybe_syslog_facility :",
-"maybe_syslog_facility : facility_name",
-"channel_syslog : T_SYSLOG maybe_syslog_facility",
-"channel_opt : channel_file",
-"channel_opt : channel_syslog",
-"channel_opt : T_NULL_OUTPUT",
-"channel_opt : T_SEVERITY channel_severity",
-"channel_opt : T_PRINT_TIME yea_or_nay",
-"channel_opt : T_PRINT_CATEGORY yea_or_nay",
-"channel_opt : T_PRINT_SEVERITY yea_or_nay",
-"channel_opt_list : channel_opt L_EOS",
-"channel_opt_list : channel_opt_list channel_opt L_EOS",
-"channel_opt_list : error",
-"channel_name : any_string",
-"channel_name : T_NULL_OUTPUT",
-"channel : channel_name",
-"channel_list : channel L_EOS",
-"channel_list : channel_list channel L_EOS",
-"channel_list : error",
-"category_name : any_string",
-"category_name : T_DEFAULT",
-"category_name : T_NOTIFY",
-"category : category_name",
-"$$7 :",
-"server_stmt : T_SERVER L_IPADDR $$7 '{' server_info_list '}'",
-"server_info_list : server_info L_EOS",
-"server_info_list : server_info_list server_info L_EOS",
-"server_info : T_BOGUS yea_or_nay",
-"server_info : T_SUPPORT_IXFR yea_or_nay",
-"server_info : T_TRANSFERS L_NUMBER",
-"server_info : T_TRANSFER_FORMAT transfer_format",
-"server_info : T_KEYS '{' key_list '}'",
-"server_info : error",
-"address_match_list : address_match_element L_EOS",
-"address_match_list : address_match_list address_match_element L_EOS",
-"address_match_element : address_match_simple",
-"address_match_element : '!' address_match_simple",
-"address_match_element : T_SEC_KEY L_STRING",
-"address_match_simple : L_IPADDR",
-"address_match_simple : L_IPADDR '/' L_NUMBER",
-"address_match_simple : L_NUMBER '/' L_NUMBER",
-"address_match_simple : address_name",
-"address_match_simple : '{' address_match_list '}'",
-"address_name : any_string",
-"key_ref : any_string",
-"key_list_element : key_ref",
-"key_list : key_list_element L_EOS",
-"key_list : key_list key_list_element L_EOS",
-"key_list : error",
-"dummy_key_list_element : key_ref",
-"dummy_key_list : dummy_key_list_element L_EOS",
-"dummy_key_list : dummy_key_list dummy_key_list_element L_EOS",
-"dummy_key_list : error",
-"$$8 :",
-"key_stmt : T_SEC_KEY $$8 any_string '{' key_definition '}'",
-"key_definition : algorithm_id secret",
-"key_definition : secret algorithm_id",
-"key_definition : error",
-"algorithm_id : T_ALGID any_string L_EOS",
-"secret : T_SECRET any_string L_EOS",
-"acl_stmt : T_ACL any_string '{' address_match_list '}'",
-"$$9 :",
-"zone_stmt : T_ZONE L_QSTRING optional_class $$9 optional_zone_options_list",
-"optional_zone_options_list :",
-"optional_zone_options_list : '{' zone_option_list '}'",
-"optional_class :",
-"optional_class : any_string",
-"zone_type : T_MASTER",
-"zone_type : T_SLAVE",
-"zone_type : T_HINT",
-"zone_type : T_STUB",
-"zone_type : T_FORWARD",
-"zone_option_list : zone_option L_EOS",
-"zone_option_list : zone_option_list zone_option L_EOS",
-"zone_option : T_TYPE zone_type",
-"zone_option : T_FILE L_QSTRING",
-"zone_option : T_FILE_IXFR L_QSTRING",
-"zone_option : T_IXFR_TMP L_QSTRING",
-"zone_option : T_MASTERS maybe_zero_port '{' master_in_addr_list '}'",
-"zone_option : T_TRANSFER_SOURCE maybe_wild_addr",
-"zone_option : T_CHECK_NAMES check_names_opt",
-"zone_option : T_ALLOW_UPDATE '{' address_match_list '}'",
-"zone_option : T_ALLOW_QUERY '{' address_match_list '}'",
-"zone_option : T_ALLOW_TRANSFER '{' address_match_list '}'",
-"zone_option : T_FORWARD zone_forward_opt",
-"$$10 :",
-"zone_option : T_FORWARDERS $$10 '{' opt_zone_forwarders_list '}'",
-"zone_option : T_MAX_TRANSFER_TIME_IN L_NUMBER",
-"zone_option : T_MAX_LOG_SIZE_IXFR size_spec",
-"zone_option : T_NOTIFY T_EXPLICIT",
-"zone_option : T_NOTIFY yea_or_nay",
-"zone_option : T_MAINTAIN_IXFR_BASE yea_or_nay",
-"zone_option : T_PUBKEY L_NUMBER L_NUMBER L_NUMBER L_QSTRING",
-"zone_option : T_PUBKEY L_STRING L_NUMBER L_NUMBER L_QSTRING",
-"zone_option : T_ALSO_NOTIFY '{' opt_notify_in_addr_list '}'",
-"zone_option : T_DIALUP yea_or_nay",
-"zone_option : error",
-"master_in_addr_list : master_in_addr L_EOS",
-"master_in_addr_list : master_in_addr_list master_in_addr L_EOS",
-"master_in_addr : L_IPADDR",
-"master_in_addr : L_IPADDR T_SEC_KEY key_ref",
-"opt_notify_in_addr_list :",
-"opt_notify_in_addr_list : notify_in_addr_list",
-"notify_in_addr_list : notify_in_addr L_EOS",
-"notify_in_addr_list : notify_in_addr_list notify_in_addr L_EOS",
-"notify_in_addr : L_IPADDR",
-"zone_forward_opt : T_ONLY",
-"zone_forward_opt : T_FIRST",
-"opt_zone_forwarders_list :",
-"opt_zone_forwarders_list : zone_forwarders_in_addr_list",
-"zone_forwarders_in_addr_list : zone_forwarders_in_addr L_EOS",
-"zone_forwarders_in_addr_list : zone_forwarders_in_addr_list zone_forwarders_in_addr L_EOS",
-"zone_forwarders_in_addr : L_IPADDR",
-"trusted_keys_stmt : T_TRUSTED_KEYS '{' trusted_keys_list '}'",
-"trusted_keys_list : trusted_key L_EOS",
-"trusted_keys_list : trusted_keys_list trusted_key L_EOS",
-"trusted_key : L_STRING L_NUMBER L_NUMBER L_NUMBER L_QSTRING",
-"trusted_key : L_STRING L_STRING L_NUMBER L_NUMBER L_QSTRING",
-"in_port : L_NUMBER",
-"any_string : L_STRING",
-"any_string : L_QSTRING",
-};
-#endif
-#ifdef YYSTACKSIZE
-#undef YYMAXDEPTH
-#define YYMAXDEPTH YYSTACKSIZE
-#else
-#ifdef YYMAXDEPTH
-#define YYSTACKSIZE YYMAXDEPTH
-#else
-#define YYSTACKSIZE 10000
-#define YYMAXDEPTH 10000
-#endif
-#endif
-#define YYINITSTACKSIZE 200
-int yydebug;
-int yynerrs;
-int yyerrflag;
-int yychar;
-short *yyssp;
-YYSTYPE *yyvsp;
-YYSTYPE yyval;
-YYSTYPE yylval;
-short *yyss;
-short *yysslim;
-YYSTYPE *yyvs;
-int yystacksize;
-#line 1857 "ns_parser.y"
-
-static char *
-canonical_name(char *name) {
- char canonical[MAXDNAME];
-
- if (strlen(name) >= MAXDNAME)
- return (NULL);
- strcpy(canonical, name);
- if (makename(canonical, ".", sizeof canonical) < 0)
- return (NULL);
- return (savestr(canonical, 0));
-}
-
-static void
-init_acls() {
- ip_match_element ime;
- ip_match_list iml;
- struct in_addr address;
-
- /* Create the predefined ACLs */
-
- address.s_addr = 0U;
-
- /* ACL "any" */
- ime = new_ip_match_pattern(address, 0);
- iml = new_ip_match_list();
- add_to_ip_match_list(iml, ime);
- define_acl("any", iml);
-
- /* ACL "none" */
- ime = new_ip_match_pattern(address, 0);
- ip_match_negate(ime);
- iml = new_ip_match_list();
- add_to_ip_match_list(iml, ime);
- define_acl("none", iml);
-
- /* ACL "localhost" */
- ime = new_ip_match_localhost();
- iml = new_ip_match_list();
- add_to_ip_match_list(iml, ime);
- define_acl("localhost", iml);
-
- /* ACL "localnets" */
- ime = new_ip_match_localnets();
- iml = new_ip_match_list();
- add_to_ip_match_list(iml, ime);
- define_acl("localnets", iml);
-}
-
-static void
-free_sym_value(int type, void *value) {
- ns_debug(ns_log_parser, 99, "free_sym_value: type %06x value %p",
- type, value);
- type &= ~0xffff;
- switch (type) {
- case SYM_ACL:
- free_ip_match_list(value);
- break;
- case SYM_KEY:
- free_key_info(value);
- break;
- case SYM_CHANNEL:
- INSIST(log_free_channel(value) == 0);
- break;
- default:
- ns_panic(ns_log_parser, 1,
- "unhandled case in free_sym_value()");
- /* NOTREACHED */
- break;
- }
-}
-
-static log_channel
-lookup_channel(char *name) {
- symbol_value value;
-
- if (lookup_symbol(channeltab, name, SYM_CHANNEL, &value))
- return ((log_channel)(value.pointer));
- return (NULL);
-}
-
-static void
-define_channel(const char *name, log_channel channel) {
- symbol_value value;
-
- value.pointer = channel;
- INSIST(log_inc_references(channel) == 0);
- define_symbol(channeltab, name, SYM_CHANNEL, value, SYMBOL_FREE_VALUE);
-}
-
-static void
-define_builtin_channels() {
- define_channel("default_syslog", syslog_channel);
- define_channel("default_debug", debug_channel);
- define_channel("default_stderr", stderr_channel);
- define_channel("null", null_channel);
-}
-
-static void
-parser_setup() {
- seen_options = 0;
- logged_options_error = 0;
- seen_topology = 0;
- symtab = new_symbol_table(SYMBOL_TABLE_SIZE, NULL);
- if (authtab != NULL)
- free_symbol_table(authtab);
- authtab = new_symbol_table(AUTH_TABLE_SIZE, free_sym_value);
- if (channeltab != NULL)
- free_symbol_table(channeltab);
- channeltab = new_symbol_table(AUTH_TABLE_SIZE, free_sym_value);
- init_acls();
- define_builtin_channels();
- INIT_LIST(current_controls);
-}
-
-static void
-parser_cleanup() {
- if (symtab != NULL)
- free_symbol_table(symtab);
- symtab = NULL;
- /*
- * We don't clean up authtab here because the ip_match_lists are in
- * use.
- */
-}
-
-/*
- * Public Interface
- */
-
-ip_match_list
-lookup_acl(const char *name) {
- symbol_value value;
-
- if (lookup_symbol(authtab, name, SYM_ACL, &value))
- return ((ip_match_list)(value.pointer));
- return (NULL);
-}
-
-void
-define_acl(const char *name, ip_match_list iml) {
- symbol_value value;
-
- INSIST(name != NULL);
- INSIST(iml != NULL);
-
- value.pointer = iml;
- define_symbol(authtab, name, SYM_ACL, value, SYMBOL_FREE_VALUE);
- ns_debug(ns_log_parser, 7, "acl %s", name);
- dprint_ip_match_list(ns_log_parser, iml, 2, "allow ", "deny ");
-}
-
-struct dst_key *
-lookup_key(char *name) {
- symbol_value value;
-
- if (lookup_symbol(authtab, name, SYM_KEY, &value))
- return ((struct dst_key *)(value.pointer));
- return (NULL);
-}
-
-void
-define_key(const char *name, struct dst_key *dst_key) {
- symbol_value value;
-
- INSIST(name != NULL);
- INSIST(dst_key != NULL);
-
- value.pointer = dst_key;
- define_symbol(authtab, name, SYM_KEY, value, SYMBOL_FREE_VALUE);
- dprint_key_info(dst_key);
-}
-
-time_t
-parse_configuration(const char *filename) {
- FILE *config_stream;
- struct stat sb;
-
- config_stream = fopen(filename, "r");
- if (config_stream == NULL)
- ns_panic(ns_log_parser, 0, "can't open '%s'", filename);
- if (fstat(fileno(config_stream), &sb) == -1)
- ns_panic(ns_log_parser, 0, "can't stat '%s'", filename);
-
- lexer_setup();
- parser_setup();
- lexer_begin_file(filename, config_stream);
- (void)yyparse();
- lexer_end_file();
- parser_cleanup();
- return (sb.st_mtime);
-}
-
-void
-parser_initialize(void) {
- lexer_initialize();
-}
-
-void
-parser_shutdown(void) {
- if (authtab != NULL)
- free_symbol_table(authtab);
- if (channeltab != NULL)
- free_symbol_table(channeltab);
- lexer_shutdown();
-}
-#line 1279 "y.tab.c"
-/* allocate initial stack or double stack size, up to YYMAXDEPTH */
-static int yygrowstack()
-{
- int newsize, i;
- short *newss;
- YYSTYPE *newvs;
-
- if ((newsize = yystacksize) == 0)
- newsize = YYINITSTACKSIZE;
- else if (newsize >= YYMAXDEPTH)
- return -1;
- else if ((newsize *= 2) > YYMAXDEPTH)
- newsize = YYMAXDEPTH;
- i = yyssp - yyss;
- if ((newss = (short *)realloc(yyss, newsize * sizeof *newss)) == NULL)
- return -1;
- yyss = newss;
- yyssp = newss + i;
- if ((newvs = (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs)) == NULL)
- return -1;
- yyvs = newvs;
- yyvsp = newvs + i;
- yystacksize = newsize;
- yysslim = yyss + newsize - 1;
- return 0;
-}
-
-#define YYABORT goto yyabort
-#define YYREJECT goto yyabort
-#define YYACCEPT goto yyaccept
-#define YYERROR goto yyerrlab
-
-int
-yyparse()
-{
- register int yym, yyn, yystate;
-#if YYDEBUG
- register const char *yys;
-
- if ((yys = getenv("YYDEBUG")))
- {
- yyn = *yys;
- if (yyn >= '0' && yyn <= '9')
- yydebug = yyn - '0';
- }
-#endif
-
- yynerrs = 0;
- yyerrflag = 0;
- yychar = (-1);
-
- if (yyss == NULL && yygrowstack()) goto yyoverflow;
- yyssp = yyss;
- yyvsp = yyvs;
- *yyssp = yystate = 0;
-
-yyloop:
- if ((yyn = yydefred[yystate])) goto yyreduce;
- if (yychar < 0)
- {
- if ((yychar = yylex()) < 0) yychar = 0;
-#if YYDEBUG
- if (yydebug)
- {
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
- printf("%sdebug: state %d, reading %d (%s)\n",
- YYPREFIX, yystate, yychar, yys);
- }
-#endif
- }
- if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
- {
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: state %d, shifting to state %d\n",
- YYPREFIX, yystate, yytable[yyn]);
-#endif
- if (yyssp >= yysslim && yygrowstack())
- {
- goto yyoverflow;
- }
- *++yyssp = yystate = yytable[yyn];
- *++yyvsp = yylval;
- yychar = (-1);
- if (yyerrflag > 0) --yyerrflag;
- goto yyloop;
- }
- if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
- {
- yyn = yytable[yyn];
- goto yyreduce;
- }
- if (yyerrflag) goto yyinrecovery;
-#if defined(lint) || defined(__GNUC__)
- goto yynewerror;
-#endif
-yynewerror:
- yyerror("syntax error");
-#if defined(lint) || defined(__GNUC__)
- goto yyerrlab;
-#endif
-yyerrlab:
- ++yynerrs;
-yyinrecovery:
- if (yyerrflag < 3)
- {
- yyerrflag = 3;
- for (;;)
- {
- if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
- {
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: state %d, error recovery shifting\
- to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
-#endif
- if (yyssp >= yysslim && yygrowstack())
- {
- goto yyoverflow;
- }
- *++yyssp = yystate = yytable[yyn];
- *++yyvsp = yylval;
- goto yyloop;
- }
- else
- {
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: error recovery discarding state %d\n",
- YYPREFIX, *yyssp);
-#endif
- if (yyssp <= yyss) goto yyabort;
- --yyssp;
- --yyvsp;
- }
- }
- }
- else
- {
- if (yychar == 0) goto yyabort;
-#if YYDEBUG
- if (yydebug)
- {
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
- printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
- YYPREFIX, yystate, yychar, yys);
- }
-#endif
- yychar = (-1);
- goto yyloop;
- }
-yyreduce:
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: state %d, reducing by rule %d (%s)\n",
- YYPREFIX, yystate, yyn, yyrule[yyn]);
-#endif
- yym = yylen[yyn];
- yyval = yyvsp[1-yym];
- switch (yyn)
- {
-case 1:
-#line 246 "ns_parser.y"
-{
- if (EMPTY(current_controls))
- ns_ctl_defaults(&current_controls);
- ns_ctl_install(&current_controls);
- }
-break;
-case 16:
-#line 272 "ns_parser.y"
-{
- lexer_begin_file(yyvsp[-1].cp, NULL);
- (void)freestr(yyvsp[-1].cp);
- }
-break;
-case 17:
-#line 283 "ns_parser.y"
-{
- if (seen_options)
- parser_error(0, "cannot redefine options");
- current_options = new_options();
- }
-break;
-case 18:
-#line 289 "ns_parser.y"
-{
- if (!seen_options)
- set_options(current_options, 0);
- else
- free_options(current_options);
- current_options = NULL;
- seen_options = 1;
- }
-break;
-case 22:
-#line 305 "ns_parser.y"
-{
- if (current_options->hostname != NULL)
- (void)freestr(current_options->hostname);
- current_options->hostname = yyvsp[0].cp;
- }
-break;
-case 23:
-#line 311 "ns_parser.y"
-{
- if (current_options->version != NULL)
- (void)freestr(current_options->version);
- current_options->version = yyvsp[0].cp;
- }
-break;
-case 24:
-#line 317 "ns_parser.y"
-{
- if (current_options->directory != NULL)
- (void)freestr(current_options->directory);
- current_options->directory = yyvsp[0].cp;
- }
-break;
-case 25:
-#line 323 "ns_parser.y"
-{
- if (current_options->named_xfer != NULL)
- (void)freestr(current_options->named_xfer);
- current_options->named_xfer = yyvsp[0].cp;
- }
-break;
-case 26:
-#line 329 "ns_parser.y"
-{
- if (current_options->pid_filename != NULL)
- (void)freestr(current_options->pid_filename);
- current_options->pid_filename = yyvsp[0].cp;
- }
-break;
-case 27:
-#line 335 "ns_parser.y"
-{
- if (current_options->stats_filename != NULL)
- (void)freestr(current_options->stats_filename);
- current_options->stats_filename = yyvsp[0].cp;
- }
-break;
-case 28:
-#line 341 "ns_parser.y"
-{
- if (current_options->memstats_filename != NULL)
- (void)freestr(current_options->memstats_filename);
- current_options->memstats_filename = yyvsp[0].cp;
- }
-break;
-case 29:
-#line 347 "ns_parser.y"
-{
- if (current_options->dump_filename != NULL)
- (void)freestr(current_options->dump_filename);
- current_options->dump_filename = yyvsp[0].cp;
- }
-break;
-case 30:
-#line 353 "ns_parser.y"
-{
- current_options->preferred_glue =
- strcasecmp(yyvsp[0].cp, "aaaa") ? T_A : T_AAAA;
- }
-break;
-case 31:
-#line 358 "ns_parser.y"
-{
- set_global_boolean_option(current_options,
- OPTION_FAKE_IQUERY, yyvsp[0].num);
- }
-break;
-case 32:
-#line 363 "ns_parser.y"
-{
- set_global_boolean_option(current_options,
- OPTION_NORECURSE, !yyvsp[0].num);
- }
-break;
-case 33:
-#line 368 "ns_parser.y"
-{
- set_global_boolean_option(current_options,
- OPTION_NOFETCHGLUE, !yyvsp[0].num);
- }
-break;
-case 34:
-#line 373 "ns_parser.y"
-{
- set_global_boolean_option(current_options,
- OPTION_HITCOUNT, yyvsp[0].num);
- }
-break;
-case 35:
-#line 378 "ns_parser.y"
-{
- current_options->notify = notify_explicit;
- }
-break;
-case 36:
-#line 382 "ns_parser.y"
-{
- if (yyvsp[0].num)
- current_options->notify = notify_yes;
- else
- current_options->notify = notify_no;
- }
-break;
-case 37:
-#line 389 "ns_parser.y"
-{
- if (initial_configuration && yyvsp[0].num)
- ns_notice(ns_log_default,
- "suppressing initial notifies");
- set_global_boolean_option(current_options,
- OPTION_SUPNOTIFY_INITIAL, yyvsp[0].num);
- }
-break;
-case 38:
-#line 397 "ns_parser.y"
-{
- set_global_boolean_option(current_options,
- OPTION_HOSTSTATS, yyvsp[0].num);
- }
-break;
-case 39:
-#line 402 "ns_parser.y"
-{
- set_global_boolean_option(current_options,
- OPTION_DEALLOC_ON_EXIT, yyvsp[0].num);
- }
-break;
-case 40:
-#line 407 "ns_parser.y"
-{
- set_global_boolean_option(current_options, OPTION_USE_IXFR, yyvsp[0].num);
- }
-break;
-case 41:
-#line 411 "ns_parser.y"
-{
- set_global_boolean_option(current_options,
- OPTION_MAINTAIN_IXFR_BASE, yyvsp[0].num);
- }
-break;
-case 42:
-#line 416 "ns_parser.y"
-{
- set_global_boolean_option(current_options,
- OPTION_NORFC2308_TYPE1, yyvsp[0].num);
- set_global_boolean_option(current_options,
- OPTION_NONAUTH_NXDOMAIN, !yyvsp[0].num);
- }
-break;
-case 43:
-#line 423 "ns_parser.y"
-{
- set_global_boolean_option(current_options, OPTION_NONAUTH_NXDOMAIN,
- !yyvsp[0].num);
- }
-break;
-case 44:
-#line 428 "ns_parser.y"
-{
- set_global_boolean_option(current_options,
- OPTION_MULTIPLE_CNAMES, yyvsp[0].num);
- }
-break;
-case 45:
-#line 433 "ns_parser.y"
-{
- current_options->check_names[yyvsp[-1].s_int] = (enum severity)yyvsp[0].s_int;
- }
-break;
-case 46:
-#line 437 "ns_parser.y"
-{
- set_global_boolean_option(current_options,
- OPTION_USE_ID_POOL, yyvsp[0].num);
- }
-break;
-case 47:
-#line 442 "ns_parser.y"
-{
- set_global_boolean_option(current_options,
- OPTION_NORFC2308_TYPE1, !yyvsp[0].num);
- }
-break;
-case 48:
-#line 447 "ns_parser.y"
-{
- char port_string[10];
- symbol_value value;
-
- (void)sprintf(port_string, "%u", yyvsp[-3].us_int);
- if (lookup_symbol(symtab, port_string, SYM_PORT, NULL))
- parser_error(0,
- "cannot redefine listen-on for port %u",
- ntohs(yyvsp[-3].us_int));
- else {
- add_listen_on(current_options, yyvsp[-3].us_int, yyvsp[-1].iml);
- value.pointer = NULL;
- define_symbol(symtab, port_string, SYM_PORT, value, 0);
- }
-
- }
-break;
-case 50:
-#line 465 "ns_parser.y"
-{
- if (current_options->fwdtab) {
- free_forwarders(current_options->fwdtab);
- current_options->fwdtab = NULL;
- }
- }
-break;
-case 53:
-#line 474 "ns_parser.y"
-{
- current_options->axfr_src = yyvsp[0].ip_addr;
- }
-break;
-case 54:
-#line 478 "ns_parser.y"
-{
- if (current_options->query_acl) {
- parser_warning(0,
- "options allow-query acl already set; skipping");
- free_ip_match_list(yyvsp[-1].iml);
- } else
- current_options->query_acl = yyvsp[-1].iml;
- }
-break;
-case 55:
-#line 487 "ns_parser.y"
-{
- if (current_options->recursion_acl) {
- parser_warning(0,
- "options allow-recursion acl already set; skipping");
- free_ip_match_list(yyvsp[-1].iml);
- } else
- current_options->recursion_acl = yyvsp[-1].iml;
- }
-break;
-case 56:
-#line 496 "ns_parser.y"
-{
- if (current_options->transfer_acl) {
- parser_warning(0,
- "options allow-transfer acl already set; skipping");
- free_ip_match_list(yyvsp[-1].iml);
- } else
- current_options->transfer_acl = yyvsp[-1].iml;
- }
-break;
-case 57:
-#line 505 "ns_parser.y"
-{
- if (current_options->sortlist) {
- parser_warning(0,
- "options sortlist already set; skipping");
- free_ip_match_list(yyvsp[-1].iml);
- } else
- current_options->sortlist = yyvsp[-1].iml;
- }
-break;
-case 58:
-#line 514 "ns_parser.y"
-{
- if (current_options->also_notify) {
- parser_warning(0,
- "duplicate also-notify clause: overwriting");
- free_also_notify(current_options);
- current_options->also_notify = NULL;
- }
- }
-break;
-case 60:
-#line 524 "ns_parser.y"
-{
- if (current_options->blackhole_acl) {
- parser_warning(0,
- "options blackhole already set; skipping");
- free_ip_match_list(yyvsp[-1].iml);
- } else
- current_options->blackhole_acl = yyvsp[-1].iml;
- }
-break;
-case 61:
-#line 533 "ns_parser.y"
-{
- if (current_options->topology) {
- parser_warning(0,
- "options topology already set; skipping");
- free_ip_match_list(yyvsp[-1].iml);
- } else
- current_options->topology = yyvsp[-1].iml;
- }
-break;
-case 62:
-#line 542 "ns_parser.y"
-{
- /* To get around the $$ = $1 default rule. */
- }
-break;
-case 64:
-#line 547 "ns_parser.y"
-{
- current_options->transfer_format = yyvsp[0].axfr_fmt;
- }
-break;
-case 65:
-#line 551 "ns_parser.y"
-{
- current_options->max_transfer_time_in = yyvsp[0].num * 60;
- }
-break;
-case 66:
-#line 555 "ns_parser.y"
-{
- current_options->serial_queries = yyvsp[0].num;
- }
-break;
-case 67:
-#line 559 "ns_parser.y"
-{
- current_options->clean_interval = yyvsp[0].num * 60;
- }
-break;
-case 68:
-#line 563 "ns_parser.y"
-{
- current_options->interface_interval = yyvsp[0].num * 60;
- }
-break;
-case 69:
-#line 567 "ns_parser.y"
-{
- current_options->stats_interval = yyvsp[0].num * 60;
- }
-break;
-case 70:
-#line 571 "ns_parser.y"
-{
- current_options->max_host_stats = yyvsp[0].num;
- }
-break;
-case 71:
-#line 575 "ns_parser.y"
-{
- current_options->max_log_size_ixfr = yyvsp[0].ul_int;
- }
-break;
-case 72:
-#line 579 "ns_parser.y"
-{
- current_options->max_ncache_ttl = yyvsp[0].num;
- }
-break;
-case 73:
-#line 583 "ns_parser.y"
-{
- current_options->lame_ttl = yyvsp[0].num;
- }
-break;
-case 74:
-#line 587 "ns_parser.y"
-{
- current_options->heartbeat_interval = yyvsp[0].num * 60;
- }
-break;
-case 75:
-#line 591 "ns_parser.y"
-{
- set_global_boolean_option(current_options,
- OPTION_NODIALUP, !yyvsp[0].num);
- }
-break;
-case 76:
-#line 596 "ns_parser.y"
-{
- if (current_options->ordering)
- free_rrset_order_list(current_options->ordering);
- current_options->ordering = yyvsp[-1].rol;
- }
-break;
-case 77:
-#line 602 "ns_parser.y"
-{
- set_global_boolean_option(current_options,
- OPTION_TREAT_CR_AS_SPACE, yyvsp[0].num);
- }
-break;
-case 78:
-#line 607 "ns_parser.y"
-{
- if (yyvsp[0].num >= 1)
- current_options->minroots = yyvsp[0].num;
- }
-break;
-case 84:
-#line 627 "ns_parser.y"
-{
- ns_ctl_add(&current_controls, ns_ctl_new_inet(yyvsp[-6].ip_addr, yyvsp[-4].us_int, yyvsp[-1].iml));
- }
-break;
-case 85:
-#line 633 "ns_parser.y"
-{
- parser_warning(0, "Ignoring BIND 9 inet control clause");
- free_ip_match_list(yyvsp[-5].iml);
- }
-break;
-case 86:
-#line 640 "ns_parser.y"
-{
- parser_warning(0, "Ignoring BIND 9 inet control clause");
- free_ip_match_list(yyvsp[-5].iml);
- }
-break;
-case 87:
-#line 645 "ns_parser.y"
-{
-#ifndef NO_SOCKADDR_UN
- ns_ctl_add(&current_controls, ns_ctl_new_unix(yyvsp[-6].cp, yyvsp[-4].num, yyvsp[-2].num, yyvsp[0].num));
-#endif
- freestr(yyvsp[-6].cp);
- }
-break;
-case 89:
-#line 655 "ns_parser.y"
-{
- rrset_order_list rol;
-
- rol = new_rrset_order_list();
- if (yyvsp[-1].roe != NULL) {
- add_to_rrset_order_list(rol, yyvsp[-1].roe);
- }
-
- yyval.rol = rol;
- }
-break;
-case 90:
-#line 666 "ns_parser.y"
-{
- if (yyvsp[-1].roe != NULL) {
- add_to_rrset_order_list(yyvsp[-2].rol, yyvsp[-1].roe);
- }
- yyval.rol = yyvsp[-2].rol;
- }
-break;
-case 91:
-#line 675 "ns_parser.y"
-{
- yyval.s_int = C_ANY;
- }
-break;
-case 92:
-#line 679 "ns_parser.y"
-{
- symbol_value value;
-
- if (lookup_symbol(constants, yyvsp[0].cp, SYM_CLASS, &value))
- yyval.s_int = value.integer;
- else {
- parser_error(0, "unknown class '%s'; using ANY", yyvsp[0].cp);
- yyval.s_int = C_ANY;
- }
- (void)freestr(yyvsp[0].cp);
- }
-break;
-case 93:
-#line 693 "ns_parser.y"
-{
- yyval.s_int = ns_t_any;
- }
-break;
-case 94:
-#line 697 "ns_parser.y"
-{
- int success;
-
- if (strcmp(yyvsp[0].cp, "*") == 0) {
- yyval.s_int = ns_t_any;
- } else {
- yyval.s_int = __sym_ston(__p_type_syms, yyvsp[0].cp, &success);
- if (success == 0) {
- yyval.s_int = ns_t_any;
- parser_error(0,
- "unknown type '%s'; assuming ANY",
- yyvsp[0].cp);
- }
- }
- (void)freestr(yyvsp[0].cp);
- }
-break;
-case 95:
-#line 715 "ns_parser.y"
-{
- yyval.cp = savestr("*", 1);
- }
-break;
-case 96:
-#line 719 "ns_parser.y"
-{
- if (strcmp(".",yyvsp[0].cp) == 0 || strcmp("*.",yyvsp[0].cp) == 0) {
- yyval.cp = savestr("*", 1);
- (void)freestr(yyvsp[0].cp);
- } else {
- yyval.cp = yyvsp[0].cp ;
- }
- /* XXX Should do any more name validation here? */
- }
-break;
-case 97:
-#line 731 "ns_parser.y"
-{
- enum ordering o;
-
- if (strlen(yyvsp[0].cp) == 0) {
- parser_error(0, "null order name");
- yyval.roe = NULL ;
- } else {
- o = lookup_ordering(yyvsp[0].cp);
- if (o == unknown_order) {
- o = (enum ordering)DEFAULT_ORDERING;
- parser_error(0,
- "invalid order name '%s'; using %s",
- yyvsp[0].cp, p_order(o));
- }
-
- (void)freestr(yyvsp[0].cp);
-
- yyval.roe = new_rrset_order_element(yyvsp[-4].s_int, yyvsp[-3].s_int, yyvsp[-2].cp, o);
- }
- }
-break;
-case 98:
-#line 754 "ns_parser.y"
-{
- yyval.axfr_fmt = axfr_one_answer;
- }
-break;
-case 99:
-#line 758 "ns_parser.y"
-{
- yyval.axfr_fmt = axfr_many_answers;
- }
-break;
-case 100:
-#line 763 "ns_parser.y"
-{ yyval.ip_addr = yyvsp[0].ip_addr; }
-break;
-case 101:
-#line 764 "ns_parser.y"
-{ yyval.ip_addr.s_addr = htonl(INADDR_ANY); }
-break;
-case 102:
-#line 767 "ns_parser.y"
-{ yyval.us_int = yyvsp[0].us_int; }
-break;
-case 103:
-#line 768 "ns_parser.y"
-{ yyval.us_int = htons(0); }
-break;
-case 104:
-#line 772 "ns_parser.y"
-{
- current_options->query_source.sin_addr = yyvsp[0].ip_addr;
- }
-break;
-case 105:
-#line 778 "ns_parser.y"
-{
- current_options->query_source.sin_port = yyvsp[0].us_int;
- }
-break;
-case 110:
-#line 789 "ns_parser.y"
-{ yyval.us_int = htons(NS_DEFAULTPORT); }
-break;
-case 111:
-#line 790 "ns_parser.y"
-{ yyval.us_int = yyvsp[0].us_int; }
-break;
-case 112:
-#line 793 "ns_parser.y"
-{ yyval.us_int = htons(0); }
-break;
-case 113:
-#line 794 "ns_parser.y"
-{ yyval.us_int = yyvsp[0].us_int; }
-break;
-case 114:
-#line 799 "ns_parser.y"
-{
- yyval.num = 1;
- }
-break;
-case 115:
-#line 803 "ns_parser.y"
-{
- yyval.num = 1;
- }
-break;
-case 116:
-#line 807 "ns_parser.y"
-{
- yyval.num = 0;
- }
-break;
-case 117:
-#line 811 "ns_parser.y"
-{
- yyval.num = 0;
- }
-break;
-case 118:
-#line 815 "ns_parser.y"
-{
- if (yyvsp[0].num == 1 || yyvsp[0].num == 0) {
- yyval.num = yyvsp[0].num;
- } else {
- parser_warning(0,
- "number should be 0 or 1; assuming 1");
- yyval.num = 1;
- }
- }
-break;
-case 119:
-#line 827 "ns_parser.y"
-{
- yyval.s_int = primary_trans;
- }
-break;
-case 120:
-#line 831 "ns_parser.y"
-{
- yyval.s_int = secondary_trans;
- }
-break;
-case 121:
-#line 835 "ns_parser.y"
-{
- yyval.s_int = response_trans;
- }
-break;
-case 122:
-#line 841 "ns_parser.y"
-{
- yyval.s_int = warn;
- }
-break;
-case 123:
-#line 845 "ns_parser.y"
-{
- yyval.s_int = fail;
- }
-break;
-case 124:
-#line 849 "ns_parser.y"
-{
- yyval.s_int = ignore;
- }
-break;
-case 125:
-#line 855 "ns_parser.y"
-{
- set_global_boolean_option(current_options,
- OPTION_FORWARD_ONLY, 1);
- }
-break;
-case 126:
-#line 860 "ns_parser.y"
-{
- set_global_boolean_option(current_options,
- OPTION_FORWARD_ONLY, 0);
- }
-break;
-case 127:
-#line 865 "ns_parser.y"
-{
- parser_warning(0, "forward if-no-answer is unimplemented");
- }
-break;
-case 128:
-#line 869 "ns_parser.y"
-{
- parser_warning(0, "forward if-no-domain is unimplemented");
- }
-break;
-case 129:
-#line 875 "ns_parser.y"
-{
- current_options->data_size = yyvsp[0].ul_int;
- }
-break;
-case 130:
-#line 879 "ns_parser.y"
-{
- current_options->stack_size = yyvsp[0].ul_int;
- }
-break;
-case 131:
-#line 883 "ns_parser.y"
-{
- current_options->core_size = yyvsp[0].ul_int;
- }
-break;
-case 132:
-#line 887 "ns_parser.y"
-{
- current_options->files = yyvsp[0].ul_int;
- }
-break;
-case 133:
-#line 893 "ns_parser.y"
-{
- u_long result;
-
- if (unit_to_ulong(yyvsp[0].cp, &result))
- yyval.ul_int = result;
- else {
- parser_error(0, "invalid unit string '%s'", yyvsp[0].cp);
- /* 0 means "use default" */
- yyval.ul_int = 0;
- }
- (void)freestr(yyvsp[0].cp);
- }
-break;
-case 134:
-#line 906 "ns_parser.y"
-{
- yyval.ul_int = (u_long)yyvsp[0].num;
- }
-break;
-case 135:
-#line 910 "ns_parser.y"
-{
- yyval.ul_int = 0;
- }
-break;
-case 136:
-#line 914 "ns_parser.y"
-{
- yyval.ul_int = ULONG_MAX;
- }
-break;
-case 137:
-#line 920 "ns_parser.y"
-{
- current_options->transfers_in = (u_long) yyvsp[0].num;
- }
-break;
-case 138:
-#line 924 "ns_parser.y"
-{
- current_options->transfers_out = (u_long) yyvsp[0].num;
- }
-break;
-case 139:
-#line 928 "ns_parser.y"
-{
- current_options->transfers_per_ns = (u_long) yyvsp[0].num;
- }
-break;
-case 142:
-#line 938 "ns_parser.y"
-{
- /* nothing */
- }
-break;
-case 143:
-#line 942 "ns_parser.y"
-{
- /* nothing */
- }
-break;
-case 144:
-#line 948 "ns_parser.y"
-{
- add_global_forwarder(current_options, yyvsp[0].ip_addr);
- }
-break;
-case 147:
-#line 958 "ns_parser.y"
-{
- /* nothing */
- }
-break;
-case 148:
-#line 962 "ns_parser.y"
-{
- /* nothing */
- }
-break;
-case 149:
-#line 968 "ns_parser.y"
-{
- add_global_also_notify(current_options, yyvsp[0].ip_addr);
- }
-break;
-case 150:
-#line 978 "ns_parser.y"
-{
- current_logging = begin_logging();
- }
-break;
-case 151:
-#line 982 "ns_parser.y"
-{
- end_logging(current_logging, 1);
- current_logging = NULL;
- }
-break;
-case 155:
-#line 994 "ns_parser.y"
-{
- current_category = yyvsp[0].s_int;
- }
-break;
-case 157:
-#line 999 "ns_parser.y"
-{
- chan_type = log_null;
- chan_flags = 0;
- chan_level = log_info;
- }
-break;
-case 158:
-#line 1005 "ns_parser.y"
-{
- log_channel current_channel = NULL;
-
- if (lookup_channel(yyvsp[-4].cp) != NULL) {
- parser_error(0, "can't redefine channel '%s'", yyvsp[-4].cp);
- } else {
- switch (chan_type) {
- case log_file:
- current_channel =
- log_new_file_channel(chan_flags,
- chan_level,
- chan_name, NULL,
- chan_versions,
- chan_max_size);
- log_set_file_owner(current_channel,
- user_id, group_id);
- chan_name = freestr(chan_name);
- break;
- case log_syslog:
- current_channel =
- log_new_syslog_channel(chan_flags,
- chan_level,
- chan_facility);
- break;
- case log_null:
- current_channel = log_new_null_channel();
- break;
- default:
- ns_panic(ns_log_parser, 1,
- "unknown channel type: %d",
- chan_type);
- }
- if (current_channel == NULL)
- ns_panic(ns_log_parser, 0,
- "couldn't create channel");
- define_channel(yyvsp[-4].cp, current_channel);
- }
- (void)freestr(yyvsp[-4].cp);
- }
-break;
-case 159:
-#line 1047 "ns_parser.y"
-{
- symbol_value value;
-
- if (lookup_symbol(constants, yyvsp[0].cp, SYM_LOGGING, &value)) {
- chan_level = value.integer;
- } else {
- parser_error(0, "unknown severity '%s'", yyvsp[0].cp);
- chan_level = log_debug(99);
- }
- (void)freestr(yyvsp[0].cp);
- }
-break;
-case 160:
-#line 1059 "ns_parser.y"
-{
- chan_level = log_debug(1);
- }
-break;
-case 161:
-#line 1063 "ns_parser.y"
-{
- chan_level = yyvsp[0].num;
- }
-break;
-case 162:
-#line 1067 "ns_parser.y"
-{
- chan_level = 0;
- chan_flags |= LOG_USE_CONTEXT_LEVEL|LOG_REQUIRE_DEBUG;
- }
-break;
-case 163:
-#line 1074 "ns_parser.y"
-{
- chan_versions = yyvsp[0].num;
- }
-break;
-case 164:
-#line 1078 "ns_parser.y"
-{
- chan_versions = LOG_MAX_VERSIONS;
- }
-break;
-case 165:
-#line 1084 "ns_parser.y"
-{
- chan_max_size = yyvsp[0].ul_int;
- }
-break;
-case 166:
-#line 1090 "ns_parser.y"
-{
- chan_versions = 0;
- chan_max_size = ULONG_MAX;
- }
-break;
-case 167:
-#line 1095 "ns_parser.y"
-{
- chan_max_size = ULONG_MAX;
- }
-break;
-case 168:
-#line 1099 "ns_parser.y"
-{
- chan_versions = 0;
- }
-break;
-case 171:
-#line 1107 "ns_parser.y"
-{
- chan_flags |= LOG_CLOSE_STREAM;
- chan_type = log_file;
- chan_name = yyvsp[-1].cp;
- }
-break;
-case 172:
-#line 1115 "ns_parser.y"
-{ yyval.cp = yyvsp[0].cp; }
-break;
-case 173:
-#line 1116 "ns_parser.y"
-{ yyval.cp = savestr("syslog", 1); }
-break;
-case 174:
-#line 1119 "ns_parser.y"
-{ yyval.s_int = LOG_DAEMON; }
-break;
-case 175:
-#line 1121 "ns_parser.y"
-{
- symbol_value value;
-
- if (lookup_symbol(constants, yyvsp[0].cp, SYM_SYSLOG, &value)) {
- yyval.s_int = value.integer;
- } else {
- parser_error(0, "unknown facility '%s'", yyvsp[0].cp);
- yyval.s_int = LOG_DAEMON;
- }
- (void)freestr(yyvsp[0].cp);
- }
-break;
-case 176:
-#line 1135 "ns_parser.y"
-{
- chan_type = log_syslog;
- chan_facility = yyvsp[0].s_int;
- }
-break;
-case 177:
-#line 1141 "ns_parser.y"
-{ /* nothing to do */ }
-break;
-case 178:
-#line 1142 "ns_parser.y"
-{ /* nothing to do */ }
-break;
-case 179:
-#line 1144 "ns_parser.y"
-{
- chan_type = log_null;
- }
-break;
-case 180:
-#line 1147 "ns_parser.y"
-{ /* nothing to do */ }
-break;
-case 181:
-#line 1149 "ns_parser.y"
-{
- if (yyvsp[0].num)
- chan_flags |= LOG_TIMESTAMP;
- else
- chan_flags &= ~LOG_TIMESTAMP;
- }
-break;
-case 182:
-#line 1156 "ns_parser.y"
-{
- if (yyvsp[0].num)
- chan_flags |= LOG_PRINT_CATEGORY;
- else
- chan_flags &= ~LOG_PRINT_CATEGORY;
- }
-break;
-case 183:
-#line 1163 "ns_parser.y"
-{
- if (yyvsp[0].num)
- chan_flags |= LOG_PRINT_LEVEL;
- else
- chan_flags &= ~LOG_PRINT_LEVEL;
- }
-break;
-case 188:
-#line 1177 "ns_parser.y"
-{ yyval.cp = savestr("null", 1); }
-break;
-case 189:
-#line 1181 "ns_parser.y"
-{
- log_channel channel;
-
- if (current_category >= 0) {
- channel = lookup_channel(yyvsp[0].cp);
- if (channel != NULL) {
- add_log_channel(current_logging,
- current_category, channel);
- } else
- parser_error(0, "unknown channel '%s'", yyvsp[0].cp);
- }
- (void)freestr(yyvsp[0].cp);
- }
-break;
-case 194:
-#line 1202 "ns_parser.y"
-{ yyval.cp = savestr("default", 1); }
-break;
-case 195:
-#line 1203 "ns_parser.y"
-{ yyval.cp = savestr("notify", 1); }
-break;
-case 196:
-#line 1207 "ns_parser.y"
-{
- symbol_value value;
-
- if (lookup_symbol(constants, yyvsp[0].cp, SYM_CATEGORY, &value))
- yyval.s_int = value.integer;
- else {
- parser_error(0, "invalid logging category '%s'",
- yyvsp[0].cp);
- yyval.s_int = -1;
- }
- (void)freestr(yyvsp[0].cp);
- }
-break;
-case 197:
-#line 1226 "ns_parser.y"
-{
- const char *ip_printable;
- symbol_value value;
-
- ip_printable = inet_ntoa(yyvsp[0].ip_addr);
- value.pointer = NULL;
- if (lookup_symbol(symtab, ip_printable, SYM_SERVER, NULL))
- seen_server = 1;
- else
- seen_server = 0;
- if (seen_server)
- parser_error(0, "cannot redefine server '%s'",
- ip_printable);
- else
- define_symbol(symtab, ip_printable, SYM_SERVER, value,
- 0);
- current_server = begin_server(yyvsp[0].ip_addr);
- }
-break;
-case 198:
-#line 1245 "ns_parser.y"
-{
- end_server(current_server, !seen_server);
- }
-break;
-case 201:
-#line 1255 "ns_parser.y"
-{
- set_server_option(current_server, SERVER_INFO_BOGUS, yyvsp[0].num);
- }
-break;
-case 202:
-#line 1259 "ns_parser.y"
-{
- set_server_option(current_server, SERVER_INFO_SUPPORT_IXFR, yyvsp[0].num);
- }
-break;
-case 203:
-#line 1263 "ns_parser.y"
-{
- set_server_transfers(current_server, (int)yyvsp[0].num);
- }
-break;
-case 204:
-#line 1267 "ns_parser.y"
-{
- set_server_transfer_format(current_server, yyvsp[0].axfr_fmt);
- }
-break;
-case 207:
-#line 1279 "ns_parser.y"
-{
- ip_match_list iml;
-
- iml = new_ip_match_list();
- if (yyvsp[-1].ime != NULL)
- add_to_ip_match_list(iml, yyvsp[-1].ime);
- yyval.iml = iml;
- }
-break;
-case 208:
-#line 1288 "ns_parser.y"
-{
- if (yyvsp[-1].ime != NULL)
- add_to_ip_match_list(yyvsp[-2].iml, yyvsp[-1].ime);
- yyval.iml = yyvsp[-2].iml;
- }
-break;
-case 210:
-#line 1297 "ns_parser.y"
-{
- if (yyvsp[0].ime != NULL)
- ip_match_negate(yyvsp[0].ime);
- yyval.ime = yyvsp[0].ime;
- }
-break;
-case 211:
-#line 1303 "ns_parser.y"
-{
- char *key_name;
- struct dst_key *dst_key;
-
- key_name = canonical_name(yyvsp[0].cp);
- if (key_name == NULL) {
- parser_error(0, "can't make key name '%s' canonical",
- yyvsp[0].cp);
- key_name = savestr("__bad_key__", 1);
- }
- dst_key = find_key(key_name, NULL);
- if (dst_key == NULL) {
- parser_error(0, "key \"%s\" not found", key_name);
- yyval.ime = NULL;
- }
- else
- yyval.ime = new_ip_match_key(dst_key);
- (void)freestr(key_name);
- freestr(yyvsp[0].cp);
- }
-break;
-case 212:
-#line 1326 "ns_parser.y"
-{
- yyval.ime = new_ip_match_pattern(yyvsp[0].ip_addr, 32);
- }
-break;
-case 213:
-#line 1330 "ns_parser.y"
-{
- if (yyvsp[0].num < 0 || yyvsp[0].num > 32) {
- parser_error(0, "mask bits out of range; skipping");
- yyval.ime = NULL;
- } else {
- yyval.ime = new_ip_match_pattern(yyvsp[-2].ip_addr, yyvsp[0].num);
- if (yyval.ime == NULL)
- parser_error(0,
- "address/mask mismatch; skipping");
- }
- }
-break;
-case 214:
-#line 1342 "ns_parser.y"
-{
- struct in_addr ia;
-
- if (yyvsp[-2].num > 255) {
- parser_error(0, "address out of range; skipping");
- yyval.ime = NULL;
- } else {
- if (yyvsp[0].num < 0 || yyvsp[0].num > 32) {
- parser_error(0,
- "mask bits out of range; skipping");
- yyval.ime = NULL;
- } else {
- ia.s_addr = htonl((yyvsp[-2].num & 0xff) << 24);
- yyval.ime = new_ip_match_pattern(ia, yyvsp[0].num);
- if (yyval.ime == NULL)
- parser_error(0,
- "address/mask mismatch; skipping");
- }
- }
- }
-break;
-case 216:
-#line 1364 "ns_parser.y"
-{
- char name[256];
-
- /*
- * We want to be able to clean up this iml later so
- * we give it a name and treat it like any other acl.
- */
- sprintf(name, "__internal_%p", yyvsp[-1].iml);
- define_acl(name, yyvsp[-1].iml);
- yyval.ime = new_ip_match_indirect(yyvsp[-1].iml);
- }
-break;
-case 217:
-#line 1378 "ns_parser.y"
-{
- ip_match_list iml;
-
- iml = lookup_acl(yyvsp[0].cp);
- if (iml == NULL) {
- parser_error(0, "unknown ACL '%s'", yyvsp[0].cp);
- yyval.ime = NULL;
- } else
- yyval.ime = new_ip_match_indirect(iml);
- (void)freestr(yyvsp[0].cp);
- }
-break;
-case 218:
-#line 1396 "ns_parser.y"
-{
- struct dst_key *dst_key;
- char *key_name;
-
- key_name = canonical_name(yyvsp[0].cp);
- if (key_name == NULL) {
- parser_error(0, "can't make key name '%s' canonical",
- yyvsp[0].cp);
- yyval.keyi = NULL;
- } else {
- dst_key = lookup_key(key_name);
- if (dst_key == NULL) {
- parser_error(0, "unknown key '%s'", key_name);
- yyval.keyi = NULL;
- } else
- yyval.keyi = dst_key;
- key_name = freestr(key_name);
- }
- (void)freestr(yyvsp[0].cp);
- }
-break;
-case 219:
-#line 1419 "ns_parser.y"
-{
- if (yyvsp[0].keyi == NULL)
- parser_error(0, "empty key not added to server list ");
- else
- add_server_key_info(current_server, yyvsp[0].keyi);
- }
-break;
-case 227:
-#line 1440 "ns_parser.y"
-{
- current_algorithm = NULL;
- current_secret = NULL;
- }
-break;
-case 228:
-#line 1445 "ns_parser.y"
-{
- struct dst_key *dst_key;
- char *key_name;
-
- key_name = canonical_name(yyvsp[-3].cp);
- if (key_name == NULL) {
- parser_error(0, "can't make key name '%s' canonical",
- yyvsp[-3].cp);
- } else if (lookup_key(key_name) != NULL) {
- parser_error(0, "can't redefine key '%s'", key_name);
- } else {
- if (current_algorithm == NULL ||
- current_secret == NULL) {
- parser_error(0, "skipping bad key '%s'",
- key_name);
- } else {
- dst_key = new_key_info(key_name,
- current_algorithm,
- current_secret);
- if (dst_key != NULL) {
- define_key(key_name, dst_key);
- if (secretkey_info == NULL)
- secretkey_info =
- new_key_info_list();
- add_to_key_info_list(secretkey_info,
- dst_key);
- }
- }
- }
- if (key_name != NULL)
- key_name = freestr(key_name);
- if (current_algorithm != NULL)
- current_algorithm = freestr(current_algorithm);
- if (current_secret != NULL)
- current_secret = freestr(current_secret);
- (void)freestr(yyvsp[-3].cp);
- }
-break;
-case 229:
-#line 1485 "ns_parser.y"
-{
- current_algorithm = yyvsp[-1].cp;
- current_secret = yyvsp[0].cp;
- }
-break;
-case 230:
-#line 1490 "ns_parser.y"
-{
- current_algorithm = yyvsp[0].cp;
- current_secret = yyvsp[-1].cp;
- }
-break;
-case 231:
-#line 1495 "ns_parser.y"
-{
- current_algorithm = NULL;
- current_secret = NULL;
- }
-break;
-case 232:
-#line 1501 "ns_parser.y"
-{ yyval.cp = yyvsp[-1].cp; }
-break;
-case 233:
-#line 1504 "ns_parser.y"
-{ yyval.cp = yyvsp[-1].cp; }
-break;
-case 234:
-#line 1512 "ns_parser.y"
-{
- if (lookup_acl(yyvsp[-3].cp) != NULL) {
- parser_error(0, "can't redefine ACL '%s'", yyvsp[-3].cp);
- } else
- define_acl(yyvsp[-3].cp, yyvsp[-1].iml);
- (void)freestr(yyvsp[-3].cp);
- }
-break;
-case 235:
-#line 1526 "ns_parser.y"
-{
- int sym_type;
- symbol_value value;
- char *zone_name;
-
- if (!seen_options && !logged_options_error) {
- parser_error(0,
- "no options statement before first zone; using previous/default");
- logged_options_error = 1;
- }
- sym_type = SYM_ZONE | (yyvsp[0].num & 0xffff);
- value.pointer = NULL;
- zone_name = canonical_name(yyvsp[-1].cp);
- if (zone_name == NULL) {
- parser_error(0, "can't make zone name '%s' canonical",
- yyvsp[-1].cp);
- should_install = 0;
- zone_name = savestr("__bad_zone__", 1);
- } else {
- if (lookup_symbol(symtab, zone_name, sym_type, NULL)) {
- should_install = 0;
- parser_error(0,
- "cannot redefine zone '%s' class %s",
- *zone_name ? zone_name : ".",
- p_class(yyvsp[0].num));
- } else {
- should_install = 1;
- define_symbol(symtab, zone_name, sym_type,
- value, 0);
- }
- }
- (void)freestr(yyvsp[-1].cp);
- current_zone = begin_zone(zone_name, yyvsp[0].num);
- }
-break;
-case 236:
-#line 1561 "ns_parser.y"
-{
- end_zone(current_zone, should_install);
- }
-break;
-case 239:
-#line 1571 "ns_parser.y"
-{
- yyval.num = C_IN;
- }
-break;
-case 240:
-#line 1575 "ns_parser.y"
-{
- symbol_value value;
-
- if (lookup_symbol(constants, yyvsp[0].cp, SYM_CLASS, &value))
- yyval.num = value.integer;
- else {
- /* the zone validator will give the error */
- yyval.num = C_NONE;
- }
- (void)freestr(yyvsp[0].cp);
- }
-break;
-case 241:
-#line 1589 "ns_parser.y"
-{
- yyval.s_int = Z_MASTER;
- }
-break;
-case 242:
-#line 1593 "ns_parser.y"
-{
- yyval.s_int = Z_SLAVE;
- }
-break;
-case 243:
-#line 1597 "ns_parser.y"
-{
- yyval.s_int = Z_HINT;
- }
-break;
-case 244:
-#line 1601 "ns_parser.y"
-{
- yyval.s_int = Z_STUB;
- }
-break;
-case 245:
-#line 1605 "ns_parser.y"
-{
- yyval.s_int = Z_FORWARD;
- }
-break;
-case 248:
-#line 1615 "ns_parser.y"
-{
- if (!set_zone_type(current_zone, yyvsp[0].s_int))
- parser_warning(0, "zone type already set; skipping");
- }
-break;
-case 249:
-#line 1620 "ns_parser.y"
-{
- if (!set_zone_filename(current_zone, yyvsp[0].cp))
- parser_warning(0,
- "zone filename already set; skipping");
- }
-break;
-case 250:
-#line 1626 "ns_parser.y"
-{
- if (!set_zone_ixfr_file(current_zone, yyvsp[0].cp))
- parser_warning(0,
- "zone ixfr data base already set; skipping");
- }
-break;
-case 251:
-#line 1632 "ns_parser.y"
-{
- if (!set_zone_ixfr_tmp(current_zone, yyvsp[0].cp))
- parser_warning(0,
- "zone ixfr temp filename already set; skipping");
- }
-break;
-case 252:
-#line 1638 "ns_parser.y"
-{
- set_zone_master_port(current_zone, yyvsp[-3].us_int);
- }
-break;
-case 253:
-#line 1642 "ns_parser.y"
-{
- set_zone_transfer_source(current_zone, yyvsp[0].ip_addr);
- }
-break;
-case 254:
-#line 1646 "ns_parser.y"
-{
- if (!set_zone_checknames(current_zone, (enum severity)yyvsp[0].s_int))
- parser_warning(0,
- "zone checknames already set; skipping");
- }
-break;
-case 255:
-#line 1652 "ns_parser.y"
-{
- if (!set_zone_update_acl(current_zone, yyvsp[-1].iml))
- parser_warning(0,
- "zone update acl already set; skipping");
- }
-break;
-case 256:
-#line 1658 "ns_parser.y"
-{
- if (!set_zone_query_acl(current_zone, yyvsp[-1].iml))
- parser_warning(0,
- "zone query acl already set; skipping");
- }
-break;
-case 257:
-#line 1664 "ns_parser.y"
-{
- if (!set_zone_transfer_acl(current_zone, yyvsp[-1].iml))
- parser_warning(0,
- "zone transfer acl already set; skipping");
- }
-break;
-case 259:
-#line 1671 "ns_parser.y"
-{
- struct zoneinfo *zp = current_zone.opaque;
- if (zp->z_fwdtab) {
- free_forwarders(zp->z_fwdtab);
- zp->z_fwdtab = NULL;
- }
-
- }
-break;
-case 261:
-#line 1681 "ns_parser.y"
-{
- if (!set_zone_transfer_time_in(current_zone, yyvsp[0].num*60))
- parser_warning(0,
- "zone max transfer time (in) already set; skipping");
- }
-break;
-case 262:
-#line 1687 "ns_parser.y"
-{
- set_zone_max_log_size_ixfr(current_zone, yyvsp[0].ul_int);
- }
-break;
-case 263:
-#line 1691 "ns_parser.y"
-{
- set_zone_notify(current_zone, notify_explicit);
- }
-break;
-case 264:
-#line 1695 "ns_parser.y"
-{
- if (yyvsp[0].num)
- set_zone_notify(current_zone, notify_yes);
- else
- set_zone_notify(current_zone, notify_no);
- }
-break;
-case 265:
-#line 1702 "ns_parser.y"
-{
- set_zone_maintain_ixfr_base(current_zone, yyvsp[0].num);
- }
-break;
-case 266:
-#line 1706 "ns_parser.y"
-{
- /* flags proto alg key */
- set_zone_pubkey(current_zone, yyvsp[-3].num, yyvsp[-2].num, yyvsp[-1].num, yyvsp[0].cp);
- }
-break;
-case 267:
-#line 1711 "ns_parser.y"
-{
- /* flags proto alg key */
- char *endp;
- int flags = (int) strtol(yyvsp[-3].cp, &endp, 0);
- if (*endp != '\0')
- ns_panic(ns_log_parser, 1,
- "Invalid flags string: %s", yyvsp[-3].cp);
- set_zone_pubkey(current_zone, flags, yyvsp[-2].num, yyvsp[-1].num, yyvsp[0].cp);
-
- }
-break;
-case 269:
-#line 1723 "ns_parser.y"
-{
- set_zone_dialup(current_zone, yyvsp[0].num);
- }
-break;
-case 271:
-#line 1730 "ns_parser.y"
-{
- /* nothing */
- }
-break;
-case 272:
-#line 1734 "ns_parser.y"
-{
- /* nothing */
- }
-break;
-case 273:
-#line 1740 "ns_parser.y"
-{
- add_zone_master(current_zone, yyvsp[0].ip_addr, NULL);
- }
-break;
-case 274:
-#line 1744 "ns_parser.y"
-{
- add_zone_master(current_zone, yyvsp[-2].ip_addr, yyvsp[0].keyi);
- }
-break;
-case 277:
-#line 1754 "ns_parser.y"
-{
- /* nothing */
- }
-break;
-case 278:
-#line 1758 "ns_parser.y"
-{
- /* nothing */
- }
-break;
-case 279:
-#line 1764 "ns_parser.y"
-{
- add_zone_notify(current_zone, yyvsp[0].ip_addr);
- }
-break;
-case 280:
-#line 1770 "ns_parser.y"
-{
- set_zone_boolean_option(current_zone, OPTION_FORWARD_ONLY, 1);
- }
-break;
-case 281:
-#line 1774 "ns_parser.y"
-{
- set_zone_boolean_option(current_zone, OPTION_FORWARD_ONLY, 0);
- }
-break;
-case 282:
-#line 1780 "ns_parser.y"
-{
- set_zone_forward(current_zone);
- }
-break;
-case 284:
-#line 1787 "ns_parser.y"
-{
- /* nothing */
- }
-break;
-case 285:
-#line 1791 "ns_parser.y"
-{
- /* nothing */
- }
-break;
-case 286:
-#line 1797 "ns_parser.y"
-{
- add_zone_forwarder(current_zone, yyvsp[0].ip_addr);
- }
-break;
-case 287:
-#line 1807 "ns_parser.y"
-{
- }
-break;
-case 288:
-#line 1811 "ns_parser.y"
-{
- /* nothing */
- }
-break;
-case 289:
-#line 1815 "ns_parser.y"
-{
- /* nothing */
- }
-break;
-case 290:
-#line 1820 "ns_parser.y"
-{
- /* name flags proto alg key */
- set_trusted_key(yyvsp[-4].cp, yyvsp[-3].num, yyvsp[-2].num, yyvsp[-1].num, yyvsp[0].cp);
- }
-break;
-case 291:
-#line 1825 "ns_parser.y"
-{
- /* name flags proto alg key */
- char *endp;
- int flags = (int) strtol(yyvsp[-3].cp, &endp, 0);
- if (*endp != '\0')
- ns_panic(ns_log_parser, 1,
- "Invalid flags string: %s", yyvsp[-3].cp);
- set_trusted_key(yyvsp[-4].cp, flags, yyvsp[-2].num, yyvsp[-1].num, yyvsp[0].cp);
- }
-break;
-case 292:
-#line 1841 "ns_parser.y"
-{
- if (yyvsp[0].num < 0 || yyvsp[0].num > 65535) {
- parser_warning(0,
- "invalid IP port number '%d'; setting port to 0",
- (int)yyvsp[0].num);
- yyvsp[0].num = 0;
- } else
- yyval.us_int = htons(yyvsp[0].num);
- }
-break;
-#line 3214 "y.tab.c"
- }
- yyssp -= yym;
- yystate = *yyssp;
- yyvsp -= yym;
- yym = yylhs[yyn];
- if (yystate == 0 && yym == 0)
- {
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: after reduction, shifting from state 0 to\
- state %d\n", YYPREFIX, YYFINAL);
-#endif
- yystate = YYFINAL;
- *++yyssp = YYFINAL;
- *++yyvsp = yyval;
- if (yychar < 0)
- {
- if ((yychar = yylex()) < 0) yychar = 0;
-#if YYDEBUG
- if (yydebug)
- {
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
- printf("%sdebug: state %d, reading %d (%s)\n",
- YYPREFIX, YYFINAL, yychar, yys);
- }
-#endif
- }
- if (yychar == 0) goto yyaccept;
- goto yyloop;
- }
- if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
- yystate = yytable[yyn];
- else
- yystate = yydgoto[yym];
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: after reduction, shifting from state %d \
-to state %d\n", YYPREFIX, *yyssp, yystate);
-#endif
- if (yyssp >= yysslim && yygrowstack())
- {
- goto yyoverflow;
- }
- *++yyssp = yystate;
- *++yyvsp = yyval;
- goto yyloop;
-yyoverflow:
- yyerror("yacc stack overflow");
-yyabort:
- return (1);
-yyaccept:
- return (0);
-}
diff --git a/contrib/bind/bin/named/ns_parser.h b/contrib/bind/bin/named/ns_parser.h
deleted file mode 100644
index 80dceab..0000000
--- a/contrib/bind/bin/named/ns_parser.h
+++ /dev/null
@@ -1,150 +0,0 @@
-#define L_EOS 257
-#define L_IPADDR 258
-#define L_NUMBER 259
-#define L_STRING 260
-#define L_QSTRING 261
-#define L_END_INCLUDE 262
-#define T_INCLUDE 263
-#define T_OPTIONS 264
-#define T_DIRECTORY 265
-#define T_PIDFILE 266
-#define T_NAMED_XFER 267
-#define T_DUMP_FILE 268
-#define T_STATS_FILE 269
-#define T_MEMSTATS_FILE 270
-#define T_FAKE_IQUERY 271
-#define T_RECURSION 272
-#define T_FETCH_GLUE 273
-#define T_HITCOUNT 274
-#define T_PREFERRED_GLUE 275
-#define T_QUERY_SOURCE 276
-#define T_LISTEN_ON 277
-#define T_PORT 278
-#define T_ADDRESS 279
-#define T_RRSET_ORDER 280
-#define T_ORDER 281
-#define T_NAME 282
-#define T_CLASS 283
-#define T_CONTROLS 284
-#define T_INET 285
-#define T_UNIX 286
-#define T_PERM 287
-#define T_OWNER 288
-#define T_GROUP 289
-#define T_ALLOW 290
-#define T_DATASIZE 291
-#define T_STACKSIZE 292
-#define T_CORESIZE 293
-#define T_DEFAULT 294
-#define T_UNLIMITED 295
-#define T_FILES 296
-#define T_VERSION 297
-#define T_HOSTNAME 298
-#define T_HOSTSTATS 299
-#define T_HOSTSTATSMAX 300
-#define T_DEALLOC_ON_EXIT 301
-#define T_TRANSFERS_IN 302
-#define T_TRANSFERS_OUT 303
-#define T_TRANSFERS_PER_NS 304
-#define T_TRANSFER_FORMAT 305
-#define T_MAX_TRANSFER_TIME_IN 306
-#define T_SERIAL_QUERIES 307
-#define T_ONE_ANSWER 308
-#define T_MANY_ANSWERS 309
-#define T_NOTIFY 310
-#define T_EXPLICIT 311
-#define T_NOTIFY_INITIAL 312
-#define T_AUTH_NXDOMAIN 313
-#define T_MULTIPLE_CNAMES 314
-#define T_USE_IXFR 315
-#define T_MAINTAIN_IXFR_BASE 316
-#define T_CLEAN_INTERVAL 317
-#define T_INTERFACE_INTERVAL 318
-#define T_STATS_INTERVAL 319
-#define T_MAX_LOG_SIZE_IXFR 320
-#define T_HEARTBEAT 321
-#define T_USE_ID_POOL 322
-#define T_MAX_NCACHE_TTL 323
-#define T_HAS_OLD_CLIENTS 324
-#define T_RFC2308_TYPE1 325
-#define T_LAME_TTL 326
-#define T_MIN_ROOTS 327
-#define T_TREAT_CR_AS_SPACE 328
-#define T_LOGGING 329
-#define T_CATEGORY 330
-#define T_CHANNEL 331
-#define T_SEVERITY 332
-#define T_DYNAMIC 333
-#define T_FILE 334
-#define T_VERSIONS 335
-#define T_SIZE 336
-#define T_SYSLOG 337
-#define T_DEBUG 338
-#define T_NULL_OUTPUT 339
-#define T_PRINT_TIME 340
-#define T_PRINT_CATEGORY 341
-#define T_PRINT_SEVERITY 342
-#define T_SORTLIST 343
-#define T_TOPOLOGY 344
-#define T_SERVER 345
-#define T_LONG_AXFR 346
-#define T_BOGUS 347
-#define T_TRANSFERS 348
-#define T_KEYS 349
-#define T_SUPPORT_IXFR 350
-#define T_ZONE 351
-#define T_IN 352
-#define T_CHAOS 353
-#define T_HESIOD 354
-#define T_TYPE 355
-#define T_MASTER 356
-#define T_SLAVE 357
-#define T_STUB 358
-#define T_RESPONSE 359
-#define T_HINT 360
-#define T_MASTERS 361
-#define T_TRANSFER_SOURCE 362
-#define T_PUBKEY 363
-#define T_ALSO_NOTIFY 364
-#define T_DIALUP 365
-#define T_FILE_IXFR 366
-#define T_IXFR_TMP 367
-#define T_TRUSTED_KEYS 368
-#define T_ACL 369
-#define T_ALLOW_UPDATE 370
-#define T_ALLOW_QUERY 371
-#define T_ALLOW_TRANSFER 372
-#define T_ALLOW_RECURSION 373
-#define T_BLACKHOLE 374
-#define T_SEC_KEY 375
-#define T_ALGID 376
-#define T_SECRET 377
-#define T_CHECK_NAMES 378
-#define T_WARN 379
-#define T_FAIL 380
-#define T_IGNORE 381
-#define T_FORWARD 382
-#define T_FORWARDERS 383
-#define T_ONLY 384
-#define T_FIRST 385
-#define T_IF_NO_ANSWER 386
-#define T_IF_NO_DOMAIN 387
-#define T_YES 388
-#define T_TRUE 389
-#define T_NO 390
-#define T_FALSE 391
-typedef union {
- char * cp;
- int s_int;
- long num;
- u_long ul_int;
- u_int16_t us_int;
- struct in_addr ip_addr;
- ip_match_element ime;
- ip_match_list iml;
- rrset_order_list rol;
- rrset_order_element roe;
- struct dst_key * keyi;
- enum axfr_format axfr_fmt;
-} YYSTYPE;
-extern YYSTYPE yylval;
diff --git a/contrib/bind/bin/named/pathnames.c b/contrib/bind/bin/named/pathnames.c
deleted file mode 100644
index 2ba2415..0000000
--- a/contrib/bind/bin/named/pathnames.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * $Id: pathnames.c,v 8.5 1997/05/21 19:52:28 halley Exp $
- */
-
-#include "port_before.h"
-
-#include <sys/types.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-
-#include <isc/eventlib.h>
-#include <isc/logging.h>
-
-#include "port_after.h"
-
-#include "named.h"
-
-int
-main(int argc, char *argv[], char *envp[]) {
- char *arg;
-
- argc--, argv++;
- while (argc-- && (arg = *argv++) != NULL)
- if (!strcasecmp("_PATH_XFER", arg))
- puts(_PATH_XFER);
- else if (!strcasecmp("_PATH_PIDFILE", arg))
- puts(_PATH_PIDFILE);
- else if (!strcasecmp("_PATH_NAMED", arg))
- puts(_PATH_NAMED);
- else
- exit(1);
- exit(0);
-}
diff --git a/contrib/bind/bin/ndc/ndc.sh b/contrib/bind/bin/ndc/ndc.sh
deleted file mode 100644
index a9b1018..0000000
--- a/contrib/bind/bin/ndc/ndc.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/sh
-
-USAGE='echo \
- "usage: $0 \
- (status|dumpdb|reload|stats|trace|notrace|querylog|start|stop|restart) \
- ... \
- "; exit 1'
-
-PATH=/bin:/usr/bin:/usr/ucb:$PATH; export PATH
-PIDFILE=%PIDFILE%
-
-if [ -f $PIDFILE ]
-then
- PID=`cat $PIDFILE`
- PS=`%PS% $PID | tail -1 | grep $PID`
- RUNNING=1
- [ `echo $PS | wc -w` -ne 0 ] || {
- PS="named (pid $PID?) not running"
- RUNNING=0
- }
-else
- PS="named (no pid file) not running"
- RUNNING=0
-fi
-
-for ARG
-do
- case $ARG in
- start|stop|restart)
- ;;
- *)
- [ $RUNNING -eq 0 ] && {
- echo $PS
- exit 1
- }
- esac
-
- case $ARG in
- status) echo "$PS";;
- dumpdb) kill -INT $PID && echo Dumping Database;;
- reload) kill -HUP $PID && echo Reloading Database;;
- stats) kill -ILL $PID && echo Dumping Statistics;;
- trace) kill -USR1 $PID && echo Trace Level Incremented;;
- notrace) kill -USR2 $PID && echo Tracing Cleared;;
- querylog|qrylog) kill -WINCH $PID && echo Query Logging Toggled;;
- start)
- [ $RUNNING -eq 1 ] && {
- echo "$0: start: named (pid $PID) already running"
- continue
- }
- rm -f $PIDFILE
- %NAMED% && {
- sleep 5
- echo Name Server Started
- }
- ;;
- stop)
- [ $RUNNING -eq 0 ] && {
- echo "$0: stop: named not running"
- continue
- }
- kill $PID && {
- sleep 5
- rm -f $PIDFILE
- echo Name Server Stopped
- }
- ;;
- restart)
- [ $RUNNING -eq 1 ] && {
- kill $PID && sleep 5
- }
- rm -f $PIDFILE
- %NAMED% && {
- sleep 5
- echo Name Server Restarted
- }
- ;;
- *) eval "$USAGE";;
- esac
-done
-test -z "$ARG" && eval "$USAGE"
-
-exit 0
diff --git a/contrib/bind/bin/nslookup/commands.c b/contrib/bind/bin/nslookup/commands.c
deleted file mode 100644
index 298eda7..0000000
--- a/contrib/bind/bin/nslookup/commands.c
+++ /dev/null
@@ -1,2025 +0,0 @@
-/* A lexical scanner generated by flex */
-
-/* Scanner skeleton version:
- * $FreeBSD$
- */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-
-#include <stdio.h>
-
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
-#include <stdlib.h>
-#include <unistd.h>
-
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_PROTOS
-#define YY_USE_CONST
-
-#endif /* __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
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition. This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#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 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_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#define YY_BUF_SIZE 16384
-
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-
-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 yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- *yy_cp = yy_hold_char; \
- YY_RESTORE_YY_MORE_OFFSET \
- yy_c_buf_p = yy_cp = yy_bp + n - 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;
-
-
-struct yy_buffer_state
- {
- FILE *yy_input_file;
-
- char *yy_ch_buf; /* input buffer */
- char *yy_buf_pos; /* current position in input buffer */
-
- /* Size of input buffer in bytes, not including room for EOB
- * characters.
- */
- yy_size_t yy_buf_size;
-
- /* Number of characters read into yy_ch_buf, not including EOB
- * characters.
- */
- int yy_n_chars;
-
- /* Whether we "own" the buffer - i.e., we know we created it,
- * and can realloc() it to grow it, and should free() it to
- * delete it.
- */
- int yy_is_our_buffer;
-
- /* Whether this is an "interactive" input source; if so, and
- * if we're using stdio for input, then we want to use getc()
- * instead of fread(), to make sure we stop fetching input after
- * each newline.
- */
- int yy_is_interactive;
-
- /* Whether we're considered to be at the beginning of a line.
- * If so, '^' rules will be active on the next match, otherwise
- * not.
- */
- int yy_at_bol;
-
- /* 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
- * then we mark the buffer as YY_EOF_PENDING, to indicate that we
- * shouldn't try reading from the input source any more. We might
- * still have a bunch of tokens to match, though, because of
- * possible backing-up.
- *
- * When we actually see the EOF, we change the status to "new"
- * (via yyrestart()), so that the user can continue scanning by
- * just pointing yyin at a new input file.
- */
-#define YY_BUFFER_EOF_PENDING 2
- };
-
-static YY_BUFFER_STATE yy_current_buffer = 0;
-
-/* 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".
- */
-#define YY_CURRENT_BUFFER yy_current_buffer
-
-
-/* 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_start = 0; /* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin. A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void yyrestart YY_PROTO(( FILE *input_file ));
-
-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 )
-
-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 ));
-
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
-static void yy_flex_free YY_PROTO(( 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; \
- }
-
-#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; \
- }
-
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
-typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-typedef int yy_state_type;
-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[] ));
-
-/* 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; \
- yyleng = (int) (yy_cp - yy_bp); \
- yy_hold_char = *yy_cp; \
- *yy_cp = '\0'; \
- yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 21
-#define YY_END_OF_BUFFER 22
-static yyconst short int yy_accept[158] =
- { 0,
- 0, 0, 22, 21, 20, 21, 21, 18, 21, 21,
- 21, 21, 21, 21, 21, 21, 0, 19, 0, 18,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 15,
- 0, 0, 13, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 17, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 14, 0, 3, 0,
- 0, 12, 0, 8, 0, 0, 0, 0, 0, 4,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 11, 0, 0, 11, 0, 16, 0,
-
- 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 8, 0, 0, 10, 0, 0, 0, 0, 6,
- 0, 0, 0, 0, 0, 7, 0, 0, 0, 0,
- 0, 1, 0, 0, 0, 5, 0, 0, 0, 0,
- 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,
- 0, 5, 0, 7, 0, 9, 0
- } ;
-
-static yyconst int yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 1, 1, 5, 4, 6, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
- 6, 7, 8, 1, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 1, 9, 1, 1, 4, 1, 10, 4, 4, 11,
-
- 12, 13, 14, 15, 16, 4, 4, 17, 18, 19,
- 20, 21, 4, 22, 23, 24, 4, 25, 4, 26,
- 4, 4, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1
- } ;
-
-static yyconst int yy_meta[27] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1
- } ;
-
-static yyconst short int yy_base[187] =
- { 0,
- 445, 0, 447, 565, 565, 443, 26, 565, 52, 54,
- 61, 49, 46, 48, 47, 54, 433, 565, 0, 565,
- 401, 74, 0, 62, 67, 58, 63, 70, 96, 565,
- 394, 83, 565, 74, 87, 90, 106, 89, 88, 132,
- 141, 68, 97, 96, 150, 69, 95, 99, 128, 124,
- 565, 159, 168, 126, 0, 161, 153, 170, 196, 203,
- 111, 181, 162, 227, 236, 143, 565, 245, 565, 156,
- 178, 565, 183, 565, 254, 189, 191, 183, 198, 565,
- 186, 263, 272, 281, 208, 0, 214, 213, 290, 299,
- 197, 223, 307, 565, 314, 239, 565, 256, 565, 323,
-
- 565, 332, 417, 341, 350, 285, 359, 368, 377, 386,
- 389, 565, 396, 405, 565, 414, 423, 432, 435, 565,
- 442, 451, 265, 0, 274, 565, 454, 461, 464, 471,
- 474, 565, 481, 490, 283, 565, 499, 310, 502, 509,
- 518, 316, 521, 565, 528, 537, 334, 0, 546, 555,
- 343, 565, 352, 565, 370, 565, 565, 417, 408, 401,
- 400, 399, 389, 382, 381, 380, 373, 362, 355, 346,
- 337, 326, 319, 302, 293, 277, 268, 259, 230, 223,
- 221, 201, 188, 146, 137, 119
- } ;
-
-static yyconst short int yy_def[187] =
- { 0,
- 158, 157, 157, 157, 157, 159, 157, 157, 160, 159,
- 160, 11, 11, 11, 11, 11, 159, 157, 7, 157,
- 11, 159, 11, 11, 11, 11, 11, 11, 161, 157,
- 11, 159, 157, 11, 11, 11, 11, 11, 11, 162,
- 163, 11, 11, 11, 164, 11, 11, 11, 11, 159,
- 157, 162, 163, 53, 53, 11, 11, 11, 165, 159,
- 11, 11, 11, 166, 167, 159, 157, 161, 157, 11,
- 68, 157, 159, 157, 165, 159, 159, 11, 68, 157,
- 11, 168, 169, 167, 84, 84, 11, 84, 170, 171,
- 11, 11, 159, 157, 168, 159, 157, 159, 157, 172,
-
- 157, 173, 84, 174, 175, 11, 176, 177, 178, 173,
- 159, 157, 174, 179, 157, 175, 180, 181, 159, 157,
- 177, 178, 122, 122, 159, 157, 159, 182, 159, 183,
- 159, 157, 181, 184, 159, 157, 185, 159, 159, 182,
- 186, 159, 159, 157, 183, 184, 146, 146, 185, 186,
- 159, 157, 159, 157, 159, 157, 0, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157
- } ;
-
-static yyconst short int yy_nxt[592] =
- { 0,
- 6, 7, 8, 9, 6, 6, 6, 10, 9, 9,
- 9, 11, 12, 9, 13, 9, 14, 9, 9, 9,
- 9, 15, 16, 9, 9, 9, 17, 19, 20, 21,
- 17, 17, 17, 22, 21, 21, 21, 23, 24, 21,
- 25, 21, 26, 21, 21, 21, 21, 27, 28, 21,
- 21, 21, 17, 29, 30, 32, 33, 36, 17, 17,
- 17, 17, 29, 30, 35, 39, 38, 17, 17, 17,
- 37, 31, 31, 31, 31, 32, 33, 35, 36, 31,
- 37, 39, 38, 31, 32, 33, 34, 31, 31, 42,
- 61, 56, 31, 31, 31, 31, 17, 29, 30, 31,
-
- 17, 17, 41, 17, 17, 43, 44, 45, 47, 48,
- 57, 49, 31, 31, 31, 31, 58, 46, 62, 150,
- 31, 31, 31, 63, 31, 50, 51, 66, 67, 64,
- 65, 31, 17, 50, 51, 78, 31, 149, 17, 17,
- 17, 17, 53, 18, 66, 67, 147, 55, 17, 17,
- 17, 45, 30, 31, 60, 17, 41, 17, 17, 17,
- 50, 51, 68, 69, 70, 17, 17, 17, 17, 53,
- 18, 71, 72, 81, 17, 17, 17, 87, 31, 71,
- 72, 31, 79, 80, 73, 74, 31, 31, 145, 88,
- 89, 18, 90, 18, 91, 31, 17, 73, 74, 79,
-
- 80, 140, 17, 17, 17, 18, 31, 92, 31, 98,
- 99, 31, 76, 76, 102, 100, 101, 76, 106, 103,
- 76, 133, 31, 130, 107, 76, 77, 17, 64, 30,
- 128, 83, 83, 41, 17, 17, 17, 84, 18, 31,
- 96, 97, 86, 17, 17, 17, 68, 69, 31, 17,
- 17, 41, 17, 17, 17, 73, 74, 98, 99, 123,
- 17, 17, 17, 17, 93, 94, 135, 136, 121, 17,
- 17, 17, 17, 96, 97, 125, 126, 118, 17, 17,
- 17, 17, 84, 18, 135, 136, 117, 17, 17, 17,
- 17, 89, 18, 116, 17, 17, 17, 17, 17, 17,
-
- 90, 18, 113, 17, 17, 17, 17, 17, 93, 94,
- 31, 137, 18, 65, 17, 93, 94, 141, 18, 110,
- 17, 17, 17, 17, 100, 101, 108, 17, 17, 109,
- 17, 17, 17, 102, 18, 151, 152, 105, 17, 17,
- 17, 17, 111, 112, 151, 152, 104, 17, 17, 17,
- 17, 114, 115, 153, 154, 83, 17, 17, 17, 17,
- 107, 30, 95, 17, 17, 41, 17, 17, 17, 119,
- 120, 155, 156, 85, 17, 17, 17, 17, 122, 18,
- 82, 75, 59, 124, 17, 17, 17, 125, 126, 54,
- 111, 112, 17, 17, 17, 127, 17, 111, 112, 52,
-
- 40, 31, 17, 17, 17, 17, 114, 115, 17, 17,
- 17, 129, 17, 17, 17, 114, 115, 4, 102, 31,
- 17, 17, 17, 17, 117, 30, 31, 17, 17, 41,
- 17, 17, 17, 131, 132, 18, 119, 120, 17, 17,
- 17, 134, 17, 119, 120, 18, 157, 5, 17, 17,
- 17, 17, 122, 18, 157, 137, 18, 17, 17, 17,
- 138, 17, 139, 115, 157, 141, 18, 17, 17, 17,
- 142, 17, 143, 144, 157, 131, 132, 17, 17, 17,
- 65, 17, 131, 132, 157, 157, 157, 17, 17, 17,
- 17, 146, 18, 157, 157, 157, 148, 17, 17, 17,
-
- 137, 18, 157, 139, 115, 17, 17, 17, 129, 17,
- 139, 115, 157, 157, 157, 17, 17, 17, 17, 141,
- 18, 157, 143, 144, 17, 17, 17, 65, 17, 143,
- 144, 157, 157, 157, 17, 17, 17, 17, 146, 18,
- 157, 157, 157, 17, 17, 17, 17, 153, 154, 157,
- 157, 157, 17, 17, 17, 17, 155, 156, 157, 157,
- 157, 17, 17, 17, 3, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157
-
- } ;
-
-static yyconst short int yy_chk[592] =
- { 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 9, 9, 9, 10, 10, 13, 9, 9,
- 9, 11, 11, 11, 12, 16, 15, 11, 11, 11,
- 14, 13, 15, 14, 12, 22, 22, 24, 25, 16,
- 26, 28, 27, 26, 32, 32, 11, 24, 27, 34,
- 46, 42, 25, 42, 46, 28, 29, 29, 29, 34,
-
- 29, 29, 29, 29, 29, 35, 36, 37, 38, 39,
- 43, 39, 35, 39, 38, 36, 44, 37, 47, 186,
- 47, 44, 43, 48, 48, 50, 50, 54, 54, 49,
- 50, 37, 40, 40, 40, 61, 61, 185, 40, 40,
- 40, 41, 41, 41, 66, 66, 184, 41, 41, 41,
- 45, 45, 45, 49, 45, 45, 45, 45, 45, 52,
- 52, 52, 56, 56, 57, 52, 52, 52, 53, 53,
- 53, 58, 58, 63, 53, 53, 53, 70, 57, 71,
- 71, 70, 62, 62, 73, 73, 56, 63, 183, 73,
- 76, 76, 77, 77, 78, 58, 59, 59, 59, 79,
-
- 79, 182, 59, 59, 59, 60, 62, 81, 78, 85,
- 85, 81, 60, 60, 88, 87, 87, 60, 91, 88,
- 60, 181, 91, 180, 92, 60, 60, 64, 64, 64,
- 179, 64, 64, 64, 64, 64, 65, 65, 65, 87,
- 96, 96, 65, 65, 65, 68, 68, 68, 92, 68,
- 68, 68, 68, 68, 75, 75, 75, 98, 98, 178,
- 75, 75, 75, 82, 82, 82, 123, 123, 177, 82,
- 82, 82, 83, 83, 83, 125, 125, 176, 83, 83,
- 83, 84, 84, 84, 135, 135, 106, 84, 84, 84,
- 89, 89, 89, 175, 89, 89, 89, 89, 89, 90,
-
- 90, 90, 174, 90, 90, 90, 90, 90, 93, 93,
- 106, 138, 138, 93, 95, 95, 95, 142, 142, 173,
- 95, 95, 95, 100, 100, 100, 172, 100, 100, 100,
- 100, 100, 102, 102, 102, 147, 147, 171, 102, 102,
- 102, 104, 104, 104, 151, 151, 170, 104, 104, 104,
- 105, 105, 105, 153, 153, 169, 105, 105, 105, 107,
- 107, 107, 168, 107, 107, 107, 107, 107, 108, 108,
- 108, 155, 155, 167, 108, 108, 108, 109, 109, 109,
- 166, 165, 164, 109, 109, 109, 110, 110, 110, 163,
- 111, 111, 110, 110, 110, 111, 113, 113, 113, 162,
-
- 161, 160, 113, 113, 113, 114, 114, 114, 159, 114,
- 114, 114, 114, 114, 116, 116, 116, 158, 103, 31,
- 116, 116, 116, 117, 117, 117, 21, 117, 117, 117,
- 117, 117, 118, 118, 118, 17, 119, 119, 118, 118,
- 118, 119, 121, 121, 121, 6, 3, 1, 121, 121,
- 121, 122, 122, 122, 0, 127, 127, 122, 122, 122,
- 127, 128, 128, 128, 0, 129, 129, 128, 128, 128,
- 129, 130, 130, 130, 0, 131, 131, 130, 130, 130,
- 131, 133, 133, 133, 0, 0, 0, 133, 133, 133,
- 134, 134, 134, 0, 0, 0, 134, 134, 134, 137,
-
- 137, 137, 0, 139, 139, 137, 137, 137, 139, 140,
- 140, 140, 0, 0, 0, 140, 140, 140, 141, 141,
- 141, 0, 143, 143, 141, 141, 141, 143, 145, 145,
- 145, 0, 0, 0, 145, 145, 145, 146, 146, 146,
- 0, 0, 0, 146, 146, 146, 149, 149, 149, 0,
- 0, 0, 149, 149, 149, 150, 150, 150, 0, 0,
- 0, 150, 150, 150, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
- 157
-
- } ;
-
-static yy_state_type yy_last_accepting_state;
-static char *yy_last_accepting_cpos;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "commands.l"
-#define INITIAL 0
-#line 2 "commands.l"
-
-/*
- * Copyright (c) 1985
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University 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 REGENTS 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.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)commands.l 5.13 (Berkeley) 7/24/90";
-#endif /* not lint */
-
-/*
- *******************************************************************************
- *
- * commands.l
- *
- * Andrew Cherenson CS298-26 Fall 1985
- *
- * Lex input file for the nslookup program command interpreter.
- * When a sequence is recognized, the associated action
- * routine is called. The action routine may need to
- * parse the string for additional information.
- *
- * Recognized commands: (identifiers are shown in uppercase)
- *
- * server NAME - set default server to NAME, using default server
- * lserver NAME - set default server to NAME, using initial server
- * finger [NAME] - finger the optional NAME
- * exit - exit the program
- * root - set default server to the root
- * ls NAME - list the domain NAME
- * view FILE - sorts and view the file with more
- * set OPTION - set an option
- * help - print help information
- * ? - print help information
- * NAME - print info about the host/domain NAME
- * using default server.
- * NAME1 NAME2 - as above, but use NAME2 as server
- *
- *
- * yylex Results:
- * 0 upon end-of-file.
- * 1 after each command.
- *
- *******************************************************************************
- */
-
-#include "port_before.h"
-#include <sys/types.h>
-#include <netinet/in.h>
-#include "port_after.h"
-#include <resolv.h>
-#include "res.h"
-
-extern char rootServerName[];
-extern void PrintHelp();
-extern void ViewList(char *);
-
-
-/* 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 ));
-#else
-extern int yywrap YY_PROTO(( 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 ));
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( 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
-
-#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
-#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
-#define YY_READ_BUF_SIZE 8192
-#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 )
-#endif
-
-/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
- if ( yy_current_buffer->yy_is_interactive ) \
- { \
- int c = '*', n; \
- for ( n = 0; n < max_size && \
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
- buf[n] = (char) c; \
- if ( c == '\n' ) \
- buf[n++] = (char) c; \
- if ( c == EOF && ferror( yyin ) ) \
- 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" );
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* 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
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
- if ( yyleng > 0 ) \
- yy_current_buffer->yy_at_bol = \
- (yytext[yyleng - 1] == '\n'); \
- YY_USER_ACTION
-
-YY_DECL
- {
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
-
-#line 112 "commands.l"
-
-
- yy_cp = yy_bp = NULL;
-
- if ( yy_init )
- {
- yy_init = 0;
-
-#ifdef YY_USER_INIT
- YY_USER_INIT;
-#endif
-
- 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 );
-
- yy_load_buffer_state();
- }
-
- while ( 1 ) /* loops until end-of-file is reached */
- {
- yy_cp = yy_c_buf_p;
-
- /* Support of yytext. */
- *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_AT_BOL();
-yy_match:
- do
- {
- 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;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 158 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- ++yy_cp;
- }
- while ( yy_base[yy_current_state] != 565 );
-
-yy_find_action:
- 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_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;
- goto yy_find_action;
-
-case 1:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 113 "commands.l"
-{
- /*
- * 0 == use current server to find
- * the new one.
- * 1 == use original server to find
- * the new one.
- */
- SetDefaultServer(yytext, 0);
- return(1);
- }
- YY_BREAK
-case 2:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 123 "commands.l"
-{
- SetDefaultServer(yytext, 1);
- return(1);
- }
- YY_BREAK
-case 3:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 127 "commands.l"
-{
- return(0);
- }
- YY_BREAK
-case 4:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 130 "commands.l"
-{
- SetDefaultServer(rootServerName, 1);
- return(1);
- }
- YY_BREAK
-case 5:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 134 "commands.l"
-{
- /*
- * 2nd arg.
- * 0 == output to stdout
- * 1 == output to file
- */
- Finger(yytext, 1);
- return(1);
- }
- YY_BREAK
-case 6:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 143 "commands.l"
-{
- Finger(yytext, 0);
- return(1);
- }
- YY_BREAK
-case 7:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 147 "commands.l"
-{
- /*
- * 2nd arg.
- * 0 == output to stdout
- * 1 == output to file
- */
- ListHosts(yytext, 1);
- return(1);
- }
- YY_BREAK
-case 8:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 156 "commands.l"
-{
- ListHosts(yytext, 0);
- return(1);
- }
- YY_BREAK
-case 9:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 160 "commands.l"
-{
- /*
- * 2nd arg.
- * 0 == output to stdout
- * 1 == output to file
- */
- ListHostsByType(yytext, 1);
- return(1);
- }
- YY_BREAK
-case 10:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 169 "commands.l"
-{
- ListHostsByType(yytext, 0);
- return(1);
- }
- YY_BREAK
-case 11:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 173 "commands.l"
-{
- SetOption(yytext);
- return(1);
- }
- YY_BREAK
-case 12:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 177 "commands.l"
-{
- PrintHelp();
- return(1);
- }
- YY_BREAK
-case 13:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 181 "commands.l"
-{
- extern void PrintHelp();
-
- PrintHelp();
- return(1);
- }
- YY_BREAK
-case 14:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 187 "commands.l"
-{
- /*
- * 0 == output to stdout
- * 1 == output to file
- */
- LookupHost(yytext, 1);
- return(1);
- }
- YY_BREAK
-case 15:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 195 "commands.l"
-{
- LookupHost(yytext, 0);
- return(1);
- }
- YY_BREAK
-case 16:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 199 "commands.l"
-{
- /*
- * 0 == output to stdout
- * 1 == output to file
- */
- LookupHostWithServer(yytext, 1);
- return(1);
- }
- YY_BREAK
-case 17:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
-#line 207 "commands.l"
-{
- LookupHostWithServer(yytext, 0);
- return(1);
- }
- YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 211 "commands.l"
-{
- return(1);
- }
- YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 214 "commands.l"
-{
- printf("Unrecognized command: %s",
- yytext);
- return(1);
- }
- YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 219 "commands.l"
-{ ; }
- YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 220 "commands.l"
-ECHO;
- YY_BREAK
-case YY_STATE_EOF(INITIAL):
- yyterminate();
-
- 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;
-
- /* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = yy_hold_char;
- YY_RESTORE_YY_MORE_OFFSET
-
- if ( yy_current_buffer->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
- * 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;
- }
-
- /* Note that here we test for yy_c_buf_p "<=" to the position
- * of the first EOB in the buffer, since yy_c_buf_p will
- * already have been incremented past the NUL character
- * (since all states make transitions on EOB to the
- * 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] )
- { /* This was really a NUL. */
- yy_state_type yy_next_state;
-
- yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state();
-
- /* Okay, we're now positioned to make the NUL
- * transition. We couldn't have
- * yy_get_previous_state() go ahead and do it
- * for us because it doesn't know how to deal
- * with the possibility of jamming (and we don't
- * want to build jamming into it because then it
- * will run more slowly).
- */
-
- yy_next_state = yy_try_NUL_trans( yy_current_state );
-
- yy_bp = yytext_ptr + YY_MORE_ADJ;
-
- if ( yy_next_state )
- {
- /* Consume the NUL. */
- yy_cp = ++yy_c_buf_p;
- yy_current_state = yy_next_state;
- goto yy_match;
- }
-
- else
- {
- yy_cp = yy_c_buf_p;
- goto yy_find_action;
- }
- }
-
- else switch ( yy_get_next_buffer() )
- {
- case EOB_ACT_END_OF_FILE:
- {
- yy_did_buffer_switch_on_eof = 0;
-
- if ( yywrap() )
- {
- /* Note: because we've taken care in
- * yy_get_next_buffer() to have set up
- * yytext, we can now set up
- * yy_c_buf_p so that if some total
- * hoser (like flex itself) wants to
- * call the scanner after we return the
- * YY_NULL, it'll still work - another
- * YY_NULL will get returned.
- */
- 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 )
- YY_NEW_FILE;
- }
- break;
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p =
- yytext_ptr + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state();
-
- 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_current_state = yy_get_previous_state();
-
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
- goto yy_find_action;
- }
- break;
- }
-
- default:
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--no action found" );
- } /* end of action switch */
- } /* end of scanning one token */
- } /* end of yylex */
-
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- * EOB_ACT_LAST_MATCH -
- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- * EOB_ACT_END_OF_FILE - end of file
- */
-
-static int yy_get_next_buffer()
- {
- register char *dest = yy_current_buffer->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] )
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--end of buffer missed" );
-
- if ( yy_current_buffer->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 )
- {
- /* We matched a single character, the EOB, so
- * treat this as a final EOF.
- */
- return EOB_ACT_END_OF_FILE;
- }
-
- else
- {
- /* We matched some text prior to the EOB, first
- * process it.
- */
- return EOB_ACT_LAST_MATCH;
- }
- }
-
- /* Try to read more data. */
-
- /* First move last chars to start of buffer. */
- 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 )
- /* 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;
-
- else
- {
- int num_to_read =
- yy_current_buffer->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;
-
- int yy_c_buf_p_offset =
- (int) (yy_c_buf_p - b->yy_ch_buf);
-
- if ( b->yy_is_our_buffer )
- {
- int new_size = b->yy_buf_size * 2;
-
- if ( new_size <= 0 )
- b->yy_buf_size += b->yy_buf_size / 8;
- else
- b->yy_buf_size *= 2;
-
- 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 );
- }
- else
- /* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
-
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR(
- "fatal error - scanner input buffer overflow" );
-
- yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
- num_to_read = yy_current_buffer->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_current_buffer->yy_n_chars = yy_n_chars;
- }
-
- if ( yy_n_chars == 0 )
- {
- if ( number_to_move == YY_MORE_ADJ )
- {
- ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin );
- }
-
- else
- {
- ret_val = EOB_ACT_LAST_MATCH;
- yy_current_buffer->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;
-
- yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
-
- return ret_val;
- }
-
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-static yy_state_type yy_get_previous_state()
- {
- register yy_state_type yy_current_state;
- register char *yy_cp;
-
- yy_current_state = yy_start;
- yy_current_state += YY_AT_BOL();
-
- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
- {
- 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;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 158 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- }
-
- 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 );
- */
-
-#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
- {
- register int yy_is_jam;
- register char *yy_cp = yy_c_buf_p;
-
- 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;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 158 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 157);
-
- return yy_is_jam ? 0 : yy_current_state;
- }
-
-
-#ifndef YY_NO_UNPUT
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-register char *yy_bp;
-#endif
- {
- register 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. */
- register int number_to_move = yy_n_chars + 2;
- register char *dest = &yy_current_buffer->yy_ch_buf[
- yy_current_buffer->yy_buf_size + 2];
- register 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 */
-
-
-#ifdef __cplusplus
-static int yyinput()
-#else
-static int input()
-#endif
- {
- int c;
-
- *yy_c_buf_p = yy_hold_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] )
- /* This was really a NUL. */
- *yy_c_buf_p = '\0';
-
- else
- { /* need more input */
- int offset = yy_c_buf_p - yytext_ptr;
- ++yy_c_buf_p;
-
- switch ( yy_get_next_buffer() )
- {
- case EOB_ACT_LAST_MATCH:
- /* This happens because yy_g_n_b()
- * sees that we've accumulated a
- * token and flags that we need to
- * try matching the token before
- * proceeding. But for input(),
- * there's no matching to consider.
- * So convert the EOB_ACT_LAST_MATCH
- * to EOB_ACT_END_OF_FILE.
- */
-
- /* Reset buffer status. */
- yyrestart( yyin );
-
- /* fall through */
-
- case EOB_ACT_END_OF_FILE:
- {
- if ( yywrap() )
- return EOF;
-
- if ( ! yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
-#ifdef __cplusplus
- return yyinput();
-#else
- return input();
-#endif
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- 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;
-
- yy_current_buffer->yy_at_bol = (c == '\n');
-
- return c;
- }
-
-
-#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();
- }
-
-
-#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 )
- return;
-
- 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_current_buffer = 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;
- }
-
-
-#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
- {
- YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
- b->yy_buf_size = size;
-
- /* 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 );
- 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 );
-
- 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
- {
- if ( ! b )
- return;
-
- if ( b == yy_current_buffer )
- yy_current_buffer = (YY_BUFFER_STATE) 0;
-
- if ( b->yy_is_our_buffer )
- yy_flex_free( (void *) b->yy_ch_buf );
-
- yy_flex_free( (void *) b );
- }
-
-
-#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
-
-
- {
- 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 )
- return;
-
- b->yy_n_chars = 0;
-
- /* We always need two end-of-buffer characters. The first causes
- * a transition to the end-of-buffer state. The second causes
- * a jam in that state.
- */
- b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
- b->yy_buf_pos = &b->yy_ch_buf[0];
-
- b->yy_at_bol = 1;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- if ( b == yy_current_buffer )
- yy_load_buffer_state();
- }
-
-
-#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 ( 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 ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
-
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
- b->yy_buf_pos = b->yy_ch_buf = base;
- b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
- b->yy_n_chars = b->yy_buf_size;
- b->yy_is_interactive = 0;
- b->yy_at_bol = 1;
- b->yy_fill_buffer = 0;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- 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
-
-
-#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
- {
- 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 );
- if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
-
- for ( i = 0; i < len; ++i )
- buf[i] = bytes[i];
-
- buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
-
- b = yy_scan_buffer( buf, n );
- if ( ! b )
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
-
- /* It's okay to grow etc. this buffer, and we should throw it
- * away when we're done.
- */
- b->yy_is_our_buffer = 1;
-
- return b;
- }
-#endif
-
-
-#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;
-
- yy_start_stack_depth += YY_START_STACK_INCR;
- new_size = yy_start_stack_depth * sizeof( int );
-
- if ( ! yy_start_stack )
- yy_start_stack = (int *) yy_flex_alloc( new_size );
-
- else
- yy_start_stack = (int *) yy_flex_realloc(
- (void *) yy_start_stack, new_size );
-
- if ( ! yy_start_stack )
- YY_FATAL_ERROR(
- "out of memory expanding start-condition stack" );
- }
-
- yy_start_stack[yy_start_stack_ptr++] = YY_START;
-
- BEGIN(new_state);
- }
-#endif
-
-
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state()
- {
- if ( --yy_start_stack_ptr < 0 )
- YY_FATAL_ERROR( "start-condition stack underflow" );
-
- BEGIN(yy_start_stack[yy_start_stack_ptr]);
- }
-#endif
-
-
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
- {
- return yy_start_stack[yy_start_stack_ptr - 1];
- }
-#endif
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
-#else
-static void yy_fatal_error( msg )
-char msg[];
-#endif
- {
- (void) fprintf( stderr, "%s\n", msg );
- exit( YY_EXIT_FAILURE );
- }
-
-
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#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 )
-
-
-/* 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
- {
- 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
- {
- 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
- {
- 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
- {
- /* 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
- * because both ANSI C and C++ allow castless assignment from
- * any pointer type to void*, and deal with argument conversions
- * 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 );
- }
-
-#if YY_MAIN
-int main()
- {
- yylex();
- return 0;
- }
-#endif
-#line 220 "commands.l"
-
diff --git a/contrib/bind/bin/nslookup/commands.l b/contrib/bind/bin/nslookup/commands.l
index 7abf7d3..fd228a4 100644
--- a/contrib/bind/bin/nslookup/commands.l
+++ b/contrib/bind/bin/nslookup/commands.l
@@ -1,5 +1,5 @@
%{
-
+/* $FreeBSD$ */
/*
* Copyright (c) 1985
* The Regents of the University of California. All rights reserved.
@@ -96,6 +96,7 @@ static char sccsid[] = "@(#)commands.l 5.13 (Berkeley) 7/24/90";
#include "port_before.h"
#include <sys/types.h>
#include <netinet/in.h>
+#include <histedit.h>
#include "port_after.h"
#include <resolv.h>
#include "res.h"
@@ -104,6 +105,60 @@ extern char rootServerName[];
extern void PrintHelp();
extern void ViewList(char *);
+#define YY_INPUT(buf, result, max_size) \
+ { \
+ nslookup_yy_input((char *)buf, &result, \
+ max_size, yy_current_buffer->yy_is_interactive); \
+ }
+
+const char *
+nslookup_prompt()
+{
+ return ("> ");
+}
+
+int
+nslookup_yy_input(buf, result, max_size, intr)
+ char * buf;
+ int * result;
+ int max_size;
+ int intr;
+{
+ static EditLine *el = NULL;
+ static History *hist = NULL;
+ HistEvent he;
+ int num = 0;
+ const char *bp = NULL;
+
+ if (intr) {
+ if (!el) {
+ el = el_init("nslookup", yyin, yyout, stderr);
+ hist = history_init();
+ history(hist, &he, H_EVENT, 100);
+ el_set(el, EL_HIST, history, hist);
+ el_set(el, EL_EDITOR, "emacs");
+ el_set(el, EL_PROMPT, nslookup_prompt);
+ el_set(el, EL_SIGNAL, 1);
+ el_source(el, NULL);
+ }
+
+ if ((bp = el_gets(el, &num)) == NULL || num == 0) {
+ *result = 0;
+ return;
+ }
+
+ *result = (num > max_size) ? max_size : num;
+ strncpy(buf, bp, *result);
+ history(hist, &he, H_ENTER, bp);
+ } else {
+ if ( ((*result = fread( buf, 1, max_size, yyin )) == 0)
+ && ferror( yyin ) )
+ yy_fatal_error( "input in flex scanner failed" );
+ }
+
+ return;
+}
+
%}
WS [ \t]
FLET [:A-Za-z0-9.*\\_]
diff --git a/contrib/bind/bin/nslookup/debug.c b/contrib/bind/bin/nslookup/debug.c
index 5dcf927..1d99ddc 100644
--- a/contrib/bind/bin/nslookup/debug.c
+++ b/contrib/bind/bin/nslookup/debug.c
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
/*
* Copyright (c) 1985, 1989
* The Regents of the University of California. All rights reserved.
diff --git a/contrib/bind/bin/nslookup/getinfo.c b/contrib/bind/bin/nslookup/getinfo.c
index 3f64aa6..0c1072e 100644
--- a/contrib/bind/bin/nslookup/getinfo.c
+++ b/contrib/bind/bin/nslookup/getinfo.c
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
/*
* Copyright (c) 1985, 1989
* The Regents of the University of California. All rights reserved.
@@ -53,7 +54,7 @@
#ifndef lint
static const char sccsid[] = "@(#)getinfo.c 5.26 (Berkeley) 3/21/91";
-static const char rcsid[] = "$Id: getinfo.c,v 8.29.8.2 2003/06/02 09:24:39 marka Exp $";
+static const char rcsid[] = "$Id: getinfo.c,v 8.27 2002/05/22 04:06:57 marka Exp $";
#endif /* not lint */
/*
@@ -111,7 +112,7 @@ ServerTable server[MAXSERVERS];
typedef union {
HEADER qb1;
- u_char qb2[NS_MAXMSG];
+ u_char qb2[64*1024];
} querybuf;
typedef union {
@@ -149,14 +150,14 @@ GetAnswer(union res_sockaddr_union *nsAddrPtr, int queryType,
register const u_char *cp;
querybuf answer;
char **aliasPtr;
- u_char *eom, *bp, *ep;
+ u_char *eom, *bp;
char **addrPtr;
int *lenPtr;
int *typePtr;
char *namePtr;
char *dnamePtr;
int type, class;
- int qdcount, ancount, arcount, nscount;
+ int qdcount, ancount, arcount, nscount, buflen;
int origClass = 0;
int numAliases = 0;
int numAddresses = 0;
@@ -211,9 +212,9 @@ GetAnswer(union res_sockaddr_union *nsAddrPtr, int queryType,
}
- bp = hostbuf;
- ep = hostbuf + sizeof(hostbuf);
- cp = (u_char *) &answer + HFIXEDSZ;
+ bp = hostbuf;
+ buflen = sizeof(hostbuf);
+ cp = (u_char *) &answer + HFIXEDSZ;
/* Skip over question section. */
while (qdcount-- > 0) {
@@ -256,7 +257,7 @@ GetAnswer(union res_sockaddr_union *nsAddrPtr, int queryType,
printedAnswers = TRUE;
} else {
while (--ancount >= 0 && cp < eom) {
- n = dn_expand(answer.qb2, eom, cp, (char *)bp, ep - bp);
+ n = dn_expand(answer.qb2, eom, cp, (char *)bp, buflen);
if (n < 0)
return(ERROR);
cp += n;
@@ -281,12 +282,13 @@ GetAnswer(union res_sockaddr_union *nsAddrPtr, int queryType,
host_aliases_len[numAliases] = s;
numAliases++;
bp += s;
+ buflen -= s;
continue;
} else if (type == T_PTR) {
/*
* Found a "pointer" to the real name.
*/
- n = dn_expand(answer.qb2, eom, cp, (char *)bp, ep - bp);
+ n = dn_expand(answer.qb2, eom, cp, (char *)bp, buflen);
if (n < 0) {
cp += n;
continue;
@@ -326,7 +328,7 @@ GetAnswer(union res_sockaddr_union *nsAddrPtr, int queryType,
memcpy(hostPtr->name, bp, s);
}
}
- bp += (((size_t)bp) % sizeof(align));
+ bp += (((u_long)bp) % sizeof(align));
if (bp + dlen >= &hostbuf[sizeof(hostbuf)]) {
if (res.options & RES_DEBUG) {
@@ -466,7 +468,7 @@ GetAnswer(union res_sockaddr_union *nsAddrPtr, int queryType,
* that serve the requested domain.
*/
- n = dn_expand(answer.qb2, eom, cp, (char *)bp, ep - bp);
+ n = dn_expand(answer.qb2, eom, cp, (char *)bp, buflen);
if (n < 0) {
return(ERROR);
}
@@ -489,7 +491,7 @@ GetAnswer(union res_sockaddr_union *nsAddrPtr, int queryType,
} else {
Boolean found;
- n = dn_expand(answer.qb2, eom, cp, (char *)bp, ep - bp);
+ n = dn_expand(answer.qb2, eom, cp, (char *)bp, buflen);
if (n < 0) {
return(ERROR);
}
@@ -545,7 +547,7 @@ GetAnswer(union res_sockaddr_union *nsAddrPtr, int queryType,
}
} else {
while (--arcount >= 0 && cp < eom) {
- n = dn_expand(answer.qb2, eom, cp, (char *)bp, ep - bp);
+ n = dn_expand(answer.qb2, eom, cp, (char *)bp, buflen);
if (n < 0) {
break;
}
@@ -943,7 +945,7 @@ GetHostInfoByAddr(union res_sockaddr_union *nsAddrPtr,
p[9] & 0xf, (p[9] >> 4) & 0xf,
p[8] & 0xf, (p[8] >> 4) & 0xf,
p[7] & 0xf, (p[7] >> 4) & 0xf,
- p[6] & 0xf, (p[6] >> 4) & 0xf,
+ p[6] & 0xf, (p[4] >> 4) & 0xf,
p[5] & 0xf, (p[5] >> 4) & 0xf,
p[4] & 0xf, (p[4] >> 4) & 0xf,
p[3] & 0xf, (p[3] >> 4) & 0xf,
@@ -963,7 +965,7 @@ GetHostInfoByAddr(union res_sockaddr_union *nsAddrPtr,
p[9] & 0xf, (p[9] >> 4) & 0xf,
p[8] & 0xf, (p[8] >> 4) & 0xf,
p[7] & 0xf, (p[7] >> 4) & 0xf,
- p[6] & 0xf, (p[6] >> 4) & 0xf,
+ p[6] & 0xf, (p[4] >> 4) & 0xf,
p[5] & 0xf, (p[5] >> 4) & 0xf,
p[4] & 0xf, (p[4] >> 4) & 0xf,
p[3] & 0xf, (p[3] >> 4) & 0xf,
@@ -1016,7 +1018,7 @@ GetHostInfoByAddr(union res_sockaddr_union *nsAddrPtr,
n = GetAnswer(nsAddrPtr, T_PTR, (char *) &buf, n, 1, hostPtr, 1, 0);
if (n == SUCCESS) {
hostPtr->addrList = (AddrInfo **)Calloc(2, sizeof(AddrInfo *));
- hostPtr->addrList[0] = (AddrInfo *)Calloc(1, sizeof(AddrInfo));
+ hostPtr->addrList[0] = (AddrInfo *)Calloc(1, sizeof(AddrInfo *));
hostPtr->addrList[0]->addr = Calloc(16, sizeof(char));
memcpy(hostPtr->addrList[0]->addr, p, 16);
hostPtr->addrList[0]->addrType = AF_INET6;
diff --git a/contrib/bind/bin/nslookup/main.c b/contrib/bind/bin/nslookup/main.c
index 7213c42..5bce811 100644
--- a/contrib/bind/bin/nslookup/main.c
+++ b/contrib/bind/bin/nslookup/main.c
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
/*
* Copyright (c) 1985, 1989
* The Regents of the University of California. All rights reserved.
@@ -77,7 +78,7 @@ char copyright[] =
#ifndef lint
static const char sccsid[] = "@(#)main.c 5.42 (Berkeley) 3/3/91";
-static const char rcsid[] = "$Id: main.c,v 8.25 2003/01/26 11:38:56 marka Exp $";
+static const char rcsid[] = "$Id: main.c,v 8.24 2002/05/26 03:12:20 marka Exp $";
#endif /* not lint */
/*
@@ -418,12 +419,7 @@ main(int argc, char **argv) {
* Yylex returns 0 when ^D or 'exit' is typed.
*/
- printf("> ");
- fflush(stdout);
- while(yylex()) {
- printf("> ");
- fflush(stdout);
- }
+ while(yylex());
}
exit(0);
}
@@ -611,7 +607,7 @@ SetDefaultServer(string, local)
UnionFromAddr(&servAddr, defaultPtr->addrList[0]->addrType,
defaultPtr->addrList[0]->addr);
} else {
- UnionFromAddr(&servAddr, defaultPtr->servers[0]->addrList[0]->addrType,
+ UnionFromAddr(&servAddr, defaultPtr->addrList[0]->addrType,
defaultPtr->servers[0]->addrList[0]->addr);
}
OpenPOWER on IntegriCloud