summaryrefslogtreecommitdiffstats
path: root/contrib/bind/bin
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-11-30 03:40:06 +0000
committerpeter <peter@FreeBSD.org>1999-11-30 03:40:06 +0000
commit9a9bef5e16cc23b6dcbc07d1c08491203427bd20 (patch)
tree1a707e9f4064cb91fe00d09f59b1714823b3fdb9 /contrib/bind/bin
parent2a7d5352ce2de1e057044219b6fe59bd9f0af0bc (diff)
downloadFreeBSD-src-9a9bef5e16cc23b6dcbc07d1c08491203427bd20.zip
FreeBSD-src-9a9bef5e16cc23b6dcbc07d1c08491203427bd20.tar.gz
Files removed in 8.2.2.p5
Diffstat (limited to 'contrib/bind/bin')
-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/pathnames.c55
3 files changed, 0 insertions, 490 deletions
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/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);
-}
OpenPOWER on IntegriCloud