summaryrefslogtreecommitdiffstats
path: root/contrib/isc-dhcp/includes
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2005-06-29 01:46:40 +0000
committerbrooks <brooks@FreeBSD.org>2005-06-29 01:46:40 +0000
commitbd7fc02cf00f7446a4fc2151d3367d5e935dacae (patch)
treec334ad76a77de064f9dde5e545e004461813e6a5 /contrib/isc-dhcp/includes
parent37efc775b590475026ff6366785a1b78bcb697f5 (diff)
downloadFreeBSD-src-bd7fc02cf00f7446a4fc2151d3367d5e935dacae.zip
FreeBSD-src-bd7fc02cf00f7446a4fc2151d3367d5e935dacae.tar.gz
Remove isc-dhcp files from HEAD now that we're using the OpenBSD
dhclient. Reminded by: ru Approved by: re (blanket dhclient)
Diffstat (limited to 'contrib/isc-dhcp/includes')
-rw-r--r--contrib/isc-dhcp/includes/arpa/nameser.h467
-rw-r--r--contrib/isc-dhcp/includes/arpa/nameser_compat.h183
-rw-r--r--contrib/isc-dhcp/includes/cdefs.h57
-rw-r--r--contrib/isc-dhcp/includes/cf/freebsd.h151
-rw-r--r--contrib/isc-dhcp/includes/ctrace.h77
-rw-r--r--contrib/isc-dhcp/includes/dhcp.h186
-rw-r--r--contrib/isc-dhcp/includes/dhcpd.h2643
-rw-r--r--contrib/isc-dhcp/includes/dhctoken.h316
-rw-r--r--contrib/isc-dhcp/includes/failover.h313
-rw-r--r--contrib/isc-dhcp/includes/inet.h45
-rw-r--r--contrib/isc-dhcp/includes/isc-dhcp/boolean.h38
-rw-r--r--contrib/isc-dhcp/includes/isc-dhcp/dst.h142
-rw-r--r--contrib/isc-dhcp/includes/isc-dhcp/int.h42
-rw-r--r--contrib/isc-dhcp/includes/isc-dhcp/lang.h35
-rw-r--r--contrib/isc-dhcp/includes/isc-dhcp/list.h122
-rw-r--r--contrib/isc-dhcp/includes/isc-dhcp/result.h119
-rw-r--r--contrib/isc-dhcp/includes/isc-dhcp/types.h46
-rw-r--r--contrib/isc-dhcp/includes/minires/minires.h230
-rw-r--r--contrib/isc-dhcp/includes/minires/res_update.h57
-rw-r--r--contrib/isc-dhcp/includes/minires/resolv.h320
-rw-r--r--contrib/isc-dhcp/includes/netinet/if_ether.h61
-rw-r--r--contrib/isc-dhcp/includes/netinet/ip.h163
-rw-r--r--contrib/isc-dhcp/includes/netinet/ip_icmp.h182
-rw-r--r--contrib/isc-dhcp/includes/netinet/udp.h70
-rw-r--r--contrib/isc-dhcp/includes/omapip/alloc.h111
-rw-r--r--contrib/isc-dhcp/includes/omapip/buffer.h83
-rw-r--r--contrib/isc-dhcp/includes/omapip/convert.h52
-rw-r--r--contrib/isc-dhcp/includes/omapip/hash.h150
-rw-r--r--contrib/isc-dhcp/includes/omapip/omapip.h611
-rw-r--r--contrib/isc-dhcp/includes/omapip/omapip_p.h293
-rw-r--r--contrib/isc-dhcp/includes/omapip/trace.h115
-rw-r--r--contrib/isc-dhcp/includes/osdep.h315
-rw-r--r--contrib/isc-dhcp/includes/site.h179
-rw-r--r--contrib/isc-dhcp/includes/statement.h104
-rw-r--r--contrib/isc-dhcp/includes/tree.h337
-rw-r--r--contrib/isc-dhcp/includes/version.h3
36 files changed, 0 insertions, 8418 deletions
diff --git a/contrib/isc-dhcp/includes/arpa/nameser.h b/contrib/isc-dhcp/includes/arpa/nameser.h
deleted file mode 100644
index 1b0d2e9..0000000
--- a/contrib/isc-dhcp/includes/arpa/nameser.h
+++ /dev/null
@@ -1,467 +0,0 @@
-/*
- * Copyright (c) 1983, 1989, 1993
- * 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.
- */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1996-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- */
-
-/*
- * $Id: nameser.h,v 1.4.2.1 2004/06/10 17:59:31 dhankins Exp $
- */
-
-#ifndef _ARPA_NAMESER_H_
-#define _ARPA_NAMESER_H_
-
-/*
- * Revision information. This is the release date in YYYYMMDD format.
- * It can change every day so the right thing to do with it is use it
- * in preprocessor commands such as "#if (__NAMESER > 19931104)". Do not
- * compare for equality; rather, use it to determine whether your libbind.a
- * contains a new enough lib/nameser/ to support the feature you need.
- */
-
-#define __NAMESER 19991006 /* New interface version stamp. */
-
-/*
- * Define constants based on RFC 883, RFC 1034, RFC 1035
- */
-#define NS_PACKETSZ 512 /* maximum packet size */
-#define NS_MAXDNAME 1025 /* maximum domain name */
-#define NS_MAXCDNAME 255 /* maximum compressed domain name */
-#define NS_MAXLABEL 63 /* maximum length of domain label */
-#define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */
-#define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */
-#define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */
-#define NS_INT32SZ 4 /* #/bytes of data in a u_int32_t */
-#define NS_INT16SZ 2 /* #/bytes of data in a u_int16_t */
-#define NS_INT8SZ 1 /* #/bytes of data in a u_int8_t */
-#define NS_INADDRSZ 4 /* IPv4 T_A */
-#define NS_IN6ADDRSZ 16 /* IPv6 T_AAAA */
-#define NS_CMPRSFLGS 0xc0 /* Flag bits indicating name compression. */
-#define NS_DEFAULTPORT 53 /* For both TCP and UDP. */
-
-/*
- * These can be expanded with synonyms, just keep ns_parse.c:ns_parserecord()
- * in synch with it.
- */
-typedef enum __ns_sect {
- ns_s_qd = 0, /* Query: Question. */
- ns_s_zn = 0, /* Update: Zone. */
- ns_s_an = 1, /* Query: Answer. */
- ns_s_pr = 1, /* Update: Prerequisites. */
- ns_s_ns = 2, /* Query: Name servers. */
- ns_s_ud = 2, /* Update: Update. */
- ns_s_ar = 3, /* Query|Update: Additional records. */
- ns_s_max = 4
-} ns_sect;
-
-/*
- * This is a message handle. It is caller allocated and has no dynamic data.
- * This structure is intended to be opaque to all but ns_parse.c, thus the
- * leading _'s on the member names. Use the accessor functions, not the _'s.
- */
-typedef struct __ns_msg {
- const u_int8_t *_msg, *_eom;
- u_int16_t _id, _flags, _counts[ns_s_max];
- const u_int8_t *_sections[ns_s_max];
- ns_sect _sect;
- int _rrnum;
- const u_int8_t *_ptr;
-} ns_msg;
-
-/* Private data structure - do not use from outside library. */
-struct _ns_flagdata { int mask, shift; };
-extern struct _ns_flagdata _ns_flagdata[];
-
-/* Accessor macros - this is part of the public interface. */
-#define ns_msg_getflag(handle, flag) ( \
- ((handle)._flags & _ns_flagdata[flag].mask) \
- >> _ns_flagdata[flag].shift \
- )
-#define ns_msg_id(handle) ((handle)._id + 0)
-#define ns_msg_base(handle) ((handle)._msg + 0)
-#define ns_msg_end(handle) ((handle)._eom + 0)
-#define ns_msg_size(handle) ((handle)._eom - (handle)._msg)
-#define ns_msg_count(handle, section) ((handle)._counts[section] + 0)
-
-/*
- * This is a parsed record. It is caller allocated and has no dynamic data.
- */
-typedef struct __ns_rr {
- char name[NS_MAXDNAME];
- u_int16_t type;
- u_int16_t rr_class;
- u_int32_t ttl;
- u_int16_t rdlength;
- const u_int8_t *rdata;
-} ns_rr;
-
-/* Accessor macros - this is part of the public interface. */
-#define ns_rr_name(rr) (((rr).name[0] != '\0') ? (rr).name : ".")
-#define ns_rr_type(rr) ((ns_type)((rr).type + 0))
-#define ns_rr_class(rr) ((ns_class)((rr).rr_class + 0))
-#define ns_rr_ttl(rr) ((rr).ttl + 0)
-#define ns_rr_rdlen(rr) ((rr).rdlength + 0)
-#define ns_rr_rdata(rr) ((rr).rdata + 0)
-
-/*
- * These don't have to be in the same order as in the packet flags word,
- * and they can even overlap in some cases, but they will need to be kept
- * in synch with ns_parse.c:ns_flagdata[].
- */
-typedef enum __ns_flag {
- ns_f_qr, /* Question/Response. */
- ns_f_opcode, /* Operation code. */
- ns_f_aa, /* Authoritative Answer. */
- ns_f_tc, /* Truncation occurred. */
- ns_f_rd, /* Recursion Desired. */
- ns_f_ra, /* Recursion Available. */
- ns_f_z, /* MBZ. */
- ns_f_ad, /* Authentic Data (DNSSEC). */
- ns_f_cd, /* Checking Disabled (DNSSEC). */
- ns_f_rcode, /* Response code. */
- ns_f_max
-} ns_flag;
-
-/*
- * Currently defined opcodes.
- */
-typedef enum __ns_opcode {
- ns_o_query = 0, /* Standard query. */
- ns_o_iquery = 1, /* Inverse query (deprecated/unsupported). */
- ns_o_status = 2, /* Name server status query (unsupported). */
- /* Opcode 3 is undefined/reserved. */
- ns_o_notify = 4, /* Zone change notification. */
- ns_o_update = 5, /* Zone update message. */
- ns_o_max = 6
-} ns_opcode;
-
-/*
- * Currently defined response codes.
- */
-typedef enum __ns_rcode {
- ns_r_noerror = 0, /* No error occurred. */
- ns_r_formerr = 1, /* Format error. */
- ns_r_servfail = 2, /* Server failure. */
- ns_r_nxdomain = 3, /* Name error. */
- ns_r_notimpl = 4, /* Unimplemented. */
- ns_r_refused = 5, /* Operation refused. */
- /* these are for BIND_UPDATE */
- ns_r_yxdomain = 6, /* Name exists */
- ns_r_yxrrset = 7, /* RRset exists */
- ns_r_nxrrset = 8, /* RRset does not exist */
- ns_r_notauth = 9, /* Not authoritative for zone */
- ns_r_notzone = 10, /* Zone of record different from zone section */
- ns_r_max = 11,
- /* The following are TSIG extended errors */
- ns_r_badsig = 16,
- ns_r_badkey = 17,
- ns_r_badtime = 18
-} ns_rcode;
-
-/* BIND_UPDATE */
-typedef enum __ns_update_operation {
- ns_uop_delete = 0,
- ns_uop_add = 1,
- ns_uop_max = 2
-} ns_update_operation;
-
-/*
- * This structure is used for TSIG authenticated messages
- */
-struct ns_tsig_key {
- char name[NS_MAXDNAME], alg[NS_MAXDNAME];
- unsigned char *data;
- unsigned len;
-};
-typedef struct ns_tsig_key ns_tsig_key;
-
-/*
- * This structure is used for TSIG authenticated TCP messages
- */
-struct ns_tcp_tsig_state {
- int counter;
- struct dst_key *key;
- void *ctx;
- unsigned char sig[NS_PACKETSZ];
- unsigned siglen;
-};
-typedef struct ns_tcp_tsig_state ns_tcp_tsig_state;
-
-#define NS_TSIG_FUDGE 300
-#define NS_TSIG_TCP_COUNT 100
-#define NS_TSIG_ALG_HMAC_MD5 "HMAC-MD5.SIG-ALG.REG.INT"
-
-#define NS_TSIG_ERROR_NO_TSIG -10
-#define NS_TSIG_ERROR_NO_SPACE -11
-#define NS_TSIG_ERROR_FORMERR -12
-
-/*
- * Currently defined type values for resources and queries.
- */
-typedef enum __ns_type {
- ns_t_invalid = 0, /* Cookie. */
- ns_t_a = 1, /* Host address. */
- ns_t_ns = 2, /* Authoritative server. */
- ns_t_md = 3, /* Mail destination. */
- ns_t_mf = 4, /* Mail forwarder. */
- ns_t_cname = 5, /* Canonical name. */
- ns_t_soa = 6, /* Start of authority zone. */
- ns_t_mb = 7, /* Mailbox domain name. */
- ns_t_mg = 8, /* Mail group member. */
- ns_t_mr = 9, /* Mail rename name. */
- ns_t_null = 10, /* Null resource record. */
- ns_t_wks = 11, /* Well known service. */
- ns_t_ptr = 12, /* Domain name pointer. */
- ns_t_hinfo = 13, /* Host information. */
- ns_t_minfo = 14, /* Mailbox information. */
- ns_t_mx = 15, /* Mail routing information. */
- ns_t_txt = 16, /* Text strings. */
- ns_t_rp = 17, /* Responsible person. */
- ns_t_afsdb = 18, /* AFS cell database. */
- ns_t_x25 = 19, /* X_25 calling address. */
- ns_t_isdn = 20, /* ISDN calling address. */
- ns_t_rt = 21, /* Router. */
- ns_t_nsap = 22, /* NSAP address. */
- ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */
- ns_t_sig = 24, /* Security signature. */
- ns_t_key = 25, /* Security key. */
- ns_t_px = 26, /* X.400 mail mapping. */
- ns_t_gpos = 27, /* Geographical position (withdrawn). */
- ns_t_aaaa = 28, /* Ip6 Address. */
- ns_t_loc = 29, /* Location Information. */
- ns_t_nxt = 30, /* Next domain (security). */
- ns_t_eid = 31, /* Endpoint identifier. */
- ns_t_nimloc = 32, /* Nimrod Locator. */
- ns_t_srv = 33, /* Server Selection. */
- ns_t_atma = 34, /* ATM Address */
- ns_t_naptr = 35, /* Naming Authority PoinTeR */
- ns_t_kx = 36, /* Key Exchange */
- ns_t_cert = 37, /* Certification record */
- ns_t_a6 = 38, /* IPv6 address (deprecates AAAA) */
- ns_t_dname = 39, /* Non-terminal DNAME (for IPv6) */
- ns_t_sink = 40, /* Kitchen sink (experimentatl) */
- ns_t_opt = 41, /* EDNS0 option (meta-RR) */
- ns_t_tsig = 250, /* Transaction signature. */
- ns_t_ixfr = 251, /* Incremental zone transfer. */
- ns_t_axfr = 252, /* Transfer zone of authority. */
- ns_t_mailb = 253, /* Transfer mailbox records. */
- ns_t_maila = 254, /* Transfer mail agent records. */
- ns_t_any = 255, /* Wildcard match. */
- ns_t_zxfr = 256, /* BIND-specific, nonstandard. */
- ns_t_max = 65536
-} ns_type;
-
-/* Exclusively a QTYPE? (not also an RTYPE) */
-#define ns_t_qt_p(t) (ns_t_xfr_p(t) || (t) == ns_t_any || \
- (t) == ns_t_mailb || (t) == ns_t_maila)
-/* Some kind of meta-RR? (not a QTYPE, but also not an RTYPE) */
-#define ns_t_mrr_p(t) ((t) == ns_t_tsig || (t) == ns_t_opt)
-/* Exclusively an RTYPE? (not also a QTYPE or a meta-RR) */
-#define ns_t_rr_p(t) (!ns_t_qt_p(t) && !ns_t_mrr_p(t))
-#define ns_t_udp_p(t) ((t) != ns_t_axfr && (t) != ns_t_zxfr)
-#define ns_t_xfr_p(t) ((t) == ns_t_axfr || (t) == ns_t_ixfr || \
- (t) == ns_t_zxfr)
-
-/*
- * Values for class field
- */
-typedef enum __ns_class {
- ns_c_invalid = 0, /* Cookie. */
- ns_c_in = 1, /* Internet. */
- ns_c_2 = 2, /* unallocated/unsupported. */
- ns_c_chaos = 3, /* MIT Chaos-net. */
- ns_c_hs = 4, /* MIT Hesiod. */
- /* Query class values which do not appear in resource records */
- ns_c_none = 254, /* for prereq. sections in update requests */
- ns_c_any = 255, /* Wildcard match. */
- ns_c_max = 65536
-} ns_class;
-
-/* DNSSEC constants. */
-
-typedef enum __ns_key_types {
- ns_kt_rsa = 1, /* key type RSA/MD5 */
- ns_kt_dh = 2, /* Diffie Hellman */
- ns_kt_dsa = 3, /* Digital Signature Standard (MANDATORY) */
- ns_kt_private = 254 /* Private key type starts with OID */
-} ns_key_types;
-
-typedef enum __ns_cert_types {
- cert_t_pkix = 1, /* PKIX (X.509v3) */
- cert_t_spki = 2, /* SPKI */
- cert_t_pgp = 3, /* PGP */
- cert_t_url = 253, /* URL private type */
- cert_t_oid = 254 /* OID private type */
-} ns_cert_types;
-
-/* Flags field of the KEY RR rdata. */
-#define NS_KEY_TYPEMASK 0xC000 /* Mask for "type" bits */
-#define NS_KEY_TYPE_AUTH_CONF 0x0000 /* Key usable for both */
-#define NS_KEY_TYPE_CONF_ONLY 0x8000 /* Key usable for confidentiality */
-#define NS_KEY_TYPE_AUTH_ONLY 0x4000 /* Key usable for authentication */
-#define NS_KEY_TYPE_NO_KEY 0xC000 /* No key usable for either; no key */
-/* The type bits can also be interpreted independently, as single bits: */
-#define NS_KEY_NO_AUTH 0x8000 /* Key unusable for authentication */
-#define NS_KEY_NO_CONF 0x4000 /* Key unusable for confidentiality */
-#define NS_KEY_RESERVED2 0x2000 /* Security is *mandatory* if bit=0 */
-#define NS_KEY_EXTENDED_FLAGS 0x1000 /* reserved - must be zero */
-#define NS_KEY_RESERVED4 0x0800 /* reserved - must be zero */
-#define NS_KEY_RESERVED5 0x0400 /* reserved - must be zero */
-#define NS_KEY_NAME_TYPE 0x0300 /* these bits determine the type */
-#define NS_KEY_NAME_USER 0x0000 /* key is assoc. with user */
-#define NS_KEY_NAME_ENTITY 0x0200 /* key is assoc. with entity eg host */
-#define NS_KEY_NAME_ZONE 0x0100 /* key is zone key */
-#define NS_KEY_NAME_RESERVED 0x0300 /* reserved meaning */
-#define NS_KEY_RESERVED8 0x0080 /* reserved - must be zero */
-#define NS_KEY_RESERVED9 0x0040 /* reserved - must be zero */
-#define NS_KEY_RESERVED10 0x0020 /* reserved - must be zero */
-#define NS_KEY_RESERVED11 0x0010 /* reserved - must be zero */
-#define NS_KEY_SIGNATORYMASK 0x000F /* key can sign RR's of same name */
-#define NS_KEY_RESERVED_BITMASK ( NS_KEY_RESERVED2 | \
- NS_KEY_RESERVED4 | \
- NS_KEY_RESERVED5 | \
- NS_KEY_RESERVED8 | \
- NS_KEY_RESERVED9 | \
- NS_KEY_RESERVED10 | \
- NS_KEY_RESERVED11 )
-#define NS_KEY_RESERVED_BITMASK2 0xFFFF /* no bits defined here */
-
-/* The Algorithm field of the KEY and SIG RR's is an integer, {1..254} */
-#define NS_ALG_MD5RSA 1 /* MD5 with RSA */
-#define NS_ALG_DH 2 /* Diffie Hellman KEY */
-#define NS_ALG_DSA 3 /* DSA KEY */
-#define NS_ALG_DSS NS_ALG_DSA
-#define NS_ALG_EXPIRE_ONLY 253 /* No alg, no security */
-#define NS_ALG_PRIVATE_OID 254 /* Key begins with OID giving alg */
-
-/* Protocol values */
-/* value 0 is reserved */
-#define NS_KEY_PROT_TLS 1
-#define NS_KEY_PROT_EMAIL 2
-#define NS_KEY_PROT_DNSSEC 3
-#define NS_KEY_PROT_IPSEC 4
-#define NS_KEY_PROT_ANY 255
-
-/* Signatures */
-#define NS_MD5RSA_MIN_BITS 512 /* Size of a mod or exp in bits */
-#define NS_MD5RSA_MAX_BITS 2552
- /* Total of binary mod and exp */
-#define NS_MD5RSA_MAX_BYTES ((NS_MD5RSA_MAX_BITS+7/8)*2+3)
- /* Max length of text sig block */
-#define NS_MD5RSA_MAX_BASE64 (((NS_MD5RSA_MAX_BYTES+2)/3)*4)
-#define NS_MD5RSA_MIN_SIZE ((NS_MD5RSA_MIN_BITS+7)/8)
-#define NS_MD5RSA_MAX_SIZE ((NS_MD5RSA_MAX_BITS+7)/8)
-
-#define NS_DSA_SIG_SIZE 41
-#define NS_DSA_MIN_SIZE 213
-#define NS_DSA_MAX_BYTES 405
-
-/* Offsets into SIG record rdata to find various values */
-#define NS_SIG_TYPE 0 /* Type flags */
-#define NS_SIG_ALG 2 /* Algorithm */
-#define NS_SIG_LABELS 3 /* How many labels in name */
-#define NS_SIG_OTTL 4 /* Original TTL */
-#define NS_SIG_EXPIR 8 /* Expiration time */
-#define NS_SIG_SIGNED 12 /* Signature time */
-#define NS_SIG_FOOT 16 /* Key footprint */
-#define NS_SIG_SIGNER 18 /* Domain name of who signed it */
-
-/* How RR types are represented as bit-flags in NXT records */
-#define NS_NXT_BITS 8
-#define NS_NXT_BIT_SET( n,p) (p[(n)/NS_NXT_BITS] |= (0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_BIT_CLEAR(n,p) (p[(n)/NS_NXT_BITS] &= ~(0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_BIT_ISSET(n,p) (p[(n)/NS_NXT_BITS] & (0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_MAX 127
-
-/*
- * Inline versions of get/put short/long. Pointer is advanced.
- */
-#define NS_GET16(s, cp) do { \
- register u_int8_t *t_cp = (u_int8_t *)(cp); \
- (s) = ((u_int16_t)t_cp[0] << 8) \
- | ((u_int16_t)t_cp[1]) \
- ; \
- (cp) += NS_INT16SZ; \
-} while (0)
-
-#define NS_GET32(l, cp) do { \
- register u_int8_t *t_cp = (u_int8_t *)(cp); \
- (l) = ((u_int32_t)t_cp[0] << 24) \
- | ((u_int32_t)t_cp[1] << 16) \
- | ((u_int32_t)t_cp[2] << 8) \
- | ((u_int32_t)t_cp[3]) \
- ; \
- (cp) += NS_INT32SZ; \
-} while (0)
-
-#define NS_PUT16(s, cp) do { \
- register u_int16_t t_s = (u_int16_t)(s); \
- register u_int8_t *t_cp = (u_int8_t *)(cp); \
- *t_cp++ = t_s >> 8; \
- *t_cp = t_s; \
- (cp) += NS_INT16SZ; \
-} while (0)
-
-#define NS_PUT32(l, cp) do { \
- register u_int32_t t_l = (u_int32_t)(l); \
- register u_int8_t *t_cp = (u_int8_t *)(cp); \
- *t_cp++ = t_l >> 24; \
- *t_cp++ = t_l >> 16; \
- *t_cp++ = t_l >> 8; \
- *t_cp = t_l; \
- (cp) += NS_INT32SZ; \
-} while (0)
-
-#include <arpa/nameser_compat.h>
-
-#endif /* !_ARPA_NAMESER_H_ */
diff --git a/contrib/isc-dhcp/includes/arpa/nameser_compat.h b/contrib/isc-dhcp/includes/arpa/nameser_compat.h
deleted file mode 100644
index 3ae17f0..0000000
--- a/contrib/isc-dhcp/includes/arpa/nameser_compat.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/* Copyright (c) 1983, 1989
- * 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.
- */
-
-/*
- * from nameser.h 8.1 (Berkeley) 6/2/93
- * $Id: nameser_compat.h,v 1.2 2000/01/27 23:28:08 mellon Exp $
- */
-
-#ifndef _ARPA_NAMESER_COMPAT_
-#define _ARPA_NAMESER_COMPAT_
-
-/*
- * Structure for query header. The order of the fields is machine- and
- * compiler-dependent, depending on the byte/bit order and the layout
- * of bit fields. We use bit fields only in int variables, as this
- * is all ANSI requires. This requires a somewhat confusing rearrangement.
- */
-
-typedef struct {
- unsigned id :16; /* query identification number */
-#if BYTE_ORDER == BIG_ENDIAN
- /* fields in third byte */
- unsigned qr: 1; /* response flag */
- unsigned opcode: 4; /* purpose of message */
- unsigned aa: 1; /* authoritive answer */
- unsigned tc: 1; /* truncated message */
- unsigned rd: 1; /* recursion desired */
- /* fields in fourth byte */
- unsigned ra: 1; /* recursion available */
- unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
- unsigned ad: 1; /* authentic data from named */
- unsigned cd: 1; /* checking disabled by resolver */
- unsigned rcode :4; /* response code */
-#endif
-#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN
- /* fields in third byte */
- unsigned rd :1; /* recursion desired */
- unsigned tc :1; /* truncated message */
- unsigned aa :1; /* authoritive answer */
- unsigned opcode :4; /* purpose of message */
- unsigned qr :1; /* response flag */
- /* fields in fourth byte */
- unsigned rcode :4; /* response code */
- unsigned cd: 1; /* checking disabled by resolver */
- unsigned ad: 1; /* authentic data from named */
- unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
- unsigned ra :1; /* recursion available */
-#endif
- /* remaining bytes */
- unsigned qdcount :16; /* number of question entries */
- unsigned ancount :16; /* number of answer entries */
- unsigned nscount :16; /* number of authority entries */
- unsigned arcount :16; /* number of resource entries */
-} HEADER;
-
-#define PACKETSZ NS_PACKETSZ
-#define MAXDNAME NS_MAXDNAME
-#define MAXCDNAME NS_MAXCDNAME
-#define MAXLABEL NS_MAXLABEL
-#define HFIXEDSZ NS_HFIXEDSZ
-#define QFIXEDSZ NS_QFIXEDSZ
-#define RRFIXEDSZ NS_RRFIXEDSZ
-#define INT32SZ NS_INT32SZ
-#define INT16SZ NS_INT16SZ
-#define INADDRSZ NS_INADDRSZ
-#define IN6ADDRSZ NS_IN6ADDRSZ
-#define INDIR_MASK NS_CMPRSFLGS
-#define NAMESERVER_PORT NS_DEFAULTPORT
-
-#define S_ZONE ns_s_zn
-#define S_PREREQ ns_s_pr
-#define S_UPDATE ns_s_ud
-#define S_ADDT ns_s_ar
-
-#define QUERY ns_o_query
-#define IQUERY ns_o_iquery
-#define STATUS ns_o_status
-#define NS_NOTIFY_OP ns_o_notify
-#define NS_UPDATE_OP ns_o_update
-
-#define NOERROR ns_r_noerror
-#define FORMERR ns_r_formerr
-#define SERVFAIL ns_r_servfail
-#define NXDOMAIN ns_r_nxdomain
-#define NOTIMP ns_r_notimpl
-#define REFUSED ns_r_refused
-#define YXDOMAIN ns_r_yxdomain
-#define YXRRSET ns_r_yxrrset
-#define NXRRSET ns_r_nxrrset
-#define NOTAUTH ns_r_notauth
-#define NOTZONE ns_r_notzone
-/*#define BADSIG ns_r_badsig*/
-/*#define BADKEY ns_r_badkey*/
-/*#define BADTIME ns_r_badtime*/
-
-
-#define DELETE ns_uop_delete
-#define ADD ns_uop_add
-
-#define T_A ns_t_a
-#define T_NS ns_t_ns
-#define T_MD ns_t_md
-#define T_MF ns_t_mf
-#define T_CNAME ns_t_cname
-#define T_SOA ns_t_soa
-#define T_MB ns_t_mb
-#define T_MG ns_t_mg
-#define T_MR ns_t_mr
-#define T_NULL ns_t_null
-#define T_WKS ns_t_wks
-#define T_PTR ns_t_ptr
-#define T_HINFO ns_t_hinfo
-#define T_MINFO ns_t_minfo
-#define T_MX ns_t_mx
-#define T_TXT ns_t_txt
-#define T_RP ns_t_rp
-#define T_AFSDB ns_t_afsdb
-#define T_X25 ns_t_x25
-#define T_ISDN ns_t_isdn
-#define T_RT ns_t_rt
-#define T_NSAP ns_t_nsap
-#define T_NSAP_PTR ns_t_nsap_ptr
-#define T_SIG ns_t_sig
-#define T_KEY ns_t_key
-#define T_PX ns_t_px
-#define T_GPOS ns_t_gpos
-#define T_AAAA ns_t_aaaa
-#define T_LOC ns_t_loc
-#define T_NXT ns_t_nxt
-#define T_EID ns_t_eid
-#define T_NIMLOC ns_t_nimloc
-#define T_SRV ns_t_srv
-#define T_ATMA ns_t_atma
-#define T_NAPTR ns_t_naptr
-#define T_TSIG ns_t_tsig
-#define T_IXFR ns_t_ixfr
-#define T_AXFR ns_t_axfr
-#define T_MAILB ns_t_mailb
-#define T_MAILA ns_t_maila
-#define T_ANY ns_t_any
-
-#define C_IN ns_c_in
-#define C_CHAOS ns_c_chaos
-#define C_HS ns_c_hs
-/* BIND_UPDATE */
-#define C_NONE ns_c_none
-#define C_ANY ns_c_any
-
-#define GETSHORT NS_GET16
-#define GETLONG NS_GET32
-#define PUTSHORT NS_PUT16
-#define PUTLONG NS_PUT32
-
-#endif /* _ARPA_NAMESER_COMPAT_ */
diff --git a/contrib/isc-dhcp/includes/cdefs.h b/contrib/isc-dhcp/includes/cdefs.h
deleted file mode 100644
index 3e344c9..0000000
--- a/contrib/isc-dhcp/includes/cdefs.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* cdefs.h
-
- Standard C definitions... */
-
-/*
- * Copyright (c) 1995 RadioMail Corporation. All rights reserved.
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1996-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software was written for RadioMail Corporation by Ted Lemon
- * under a contract with Vixie Enterprises. Further modifications have
- * been made for Internet Systems Consortium under a contract
- * with Vixie Laboratories.
- */
-
-#if !defined (__ISC_DHCP_CDEFS_H__)
-#define __ISC_DHCP_CDEFS_H__
-/* Delete attributes if not gcc or not the right version of gcc. */
-#if !defined(__GNUC__) || __GNUC__ < 2 || \
- (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || defined (darwin)
-#define __attribute__(x)
-#endif
-
-#if (defined (__GNUC__) || defined (__STDC__)) && !defined (BROKEN_ANSI)
-#define PROTO(x) x
-#define KandR(x)
-#define ANSI_DECL(x) x
-#if defined (__GNUC__)
-#define INLINE inline
-#else
-#define INLINE
-#endif /* __GNUC__ */
-#else
-#define PROTO(x) ()
-#define KandR(x) x
-#define ANSI_DECL(x)
-#define INLINE
-#endif /* __GNUC__ || __STDC__ */
-#endif /* __ISC_DHCP_CDEFS_H__ */
diff --git a/contrib/isc-dhcp/includes/cf/freebsd.h b/contrib/isc-dhcp/includes/cf/freebsd.h
deleted file mode 100644
index d929c0d..0000000
--- a/contrib/isc-dhcp/includes/cf/freebsd.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/* freebsd.h
-
- System dependencies for FreeBSD... */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1996-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software has been written for Internet Systems Consortium
- * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about Internet Systems Consortium, see
- * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
- * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
- * ``http://www.nominum.com''.
- *
- * $FreeBSD$
- */
-
-#include <syslog.h>
-#include <sys/types.h>
-#include <string.h>
-#include <paths.h>
-#include <errno.h>
-#include <unistd.h>
-#include <setjmp.h>
-#include <limits.h>
-
-#include <sys/wait.h>
-#include <signal.h>
-
-extern int h_errno;
-
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/if_arp.h>
-#if !defined (INADDR_LOOPBACK)
-# define INADDR_LOOPBACK ((u_int32_t)0x7f000001)
-#endif
-
-/* Varargs stuff... */
-#include <stdarg.h>
-#define VA_DOTDOTDOT ...
-#define va_dcl
-#define VA_start(list, last) va_start (list, last)
-
-#ifndef _PATH_DHCPD_PID
-#define _PATH_DHCPD_PID "/var/run/dhcpd.pid"
-#endif
-#ifndef _PATH_DHCPD_DB
-#define _PATH_DHCPD_DB "/var/db/dhcpd.leases"
-#endif
-#ifndef _PATH_DHCLIENT_PID
-#define _PATH_DHCLIENT_PID "/var/run/dhclient.pid"
-#endif
-#ifndef _PATH_DHCLIENT_DB
-#define _PATH_DHCLIENT_DB "/var/db/dhclient.leases"
-#endif
-
-#define EOL '\n'
-#define VOIDPTR void *
-
-/* Time stuff... */
-#include <sys/time.h>
-#define TIME time_t
-#define GET_TIME(x) time ((x))
-
-#define HAVE_SA_LEN
-
-/* socklen_t was first defined on November 24 in sys/socket.h, and
- __FreeBSD_version was changed to 400013 on December 4, so if you
- get a compile error on this, and you updated between those dates,
- that's why. Also, it may be that some 3.x version after 3.4 will
- have socklen_t, but no such change has been made so far. */
-
-#if __FreeBSD_version < 400013
-#define SOCKLEN_T int
-#endif
-
-#ifdef RESCUE
-#define _PATH_DHCLIENT_SCRIPT "/rescue/dhclient-script"
-#endif
-
-#if defined (USE_DEFAULT_NETWORK)
-# define USE_BPF
-#endif
-#define HAVE_MKSTEMP
-#ifdef NEED_PRAND_CONF
-#ifndef HAVE_DEV_RANDOM
- # define HAVE_DEV_RANDOM 1
- #endif /* HAVE_DEV_RANDOM */
-
-const char *cmds[] = {
-#ifndef RESCUE
- /* rescue environment can't rely on these ... */
- /* Actually, /sbin/dhclient shouldn't use these, either. */
- "/bin/ps -axlw 2>&1",
- "/usr/sbin/arp -an 2>&1",
- "/usr/bin/netstat -an 2>&1",
- "/bin/df 2>&1",
- "/usr/bin/dig com. soa +ti=1 +retry=0 2>&1",
- "/usr/bin/netstat -an 2>&1",
- "/usr/bin/dig . soa +ti=1 +retry=0 2>&1",
- "/usr/sbin/iostat 2>&1",
- "/usr/bin/vmstat 2>&1",
- "/usr/bin/w 2>&1",
-#endif
- NULL
-};
-
-const char *dirs[] = {
-#ifndef RESCUE
- "/tmp",
- "/usr/tmp",
- ".",
- "/",
- "/var/spool",
- "/dev",
- "/var/mail",
- "/home",
- "/usr/home",
-#endif
- NULL
-};
-
-const char *files[] = {
-#ifndef RESCUE
- "/var/log/messages",
- "/var/log/wtmp",
- "/var/log/lastlog",
-#endif
- NULL
-};
-#endif /* NEED_PRAND_CONF */
diff --git a/contrib/isc-dhcp/includes/ctrace.h b/contrib/isc-dhcp/includes/ctrace.h
deleted file mode 100644
index 6b0ad75..0000000
--- a/contrib/isc-dhcp/includes/ctrace.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* trace.h
-
- Definitions for dhcp tracing facility... */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 2001-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software has been written for Internet Systems Consortium
- * by Ted Lemon, as part of a project for Nominum, Inc. To learn more
- * about Internet Systems Consortium, see http://www.isc.org/. To
- * learn more about Nominum, Inc., see ``http://www.nominum.com''.
- */
-
-typedef struct {
- struct in_addr primary_address;
- u_int32_t index;
- struct hardware hw_address;
- char name [IFNAMSIZ];
-} trace_interface_packet_t;
-
-typedef struct {
- u_int32_t index;
- struct iaddr from;
- u_int16_t from_port;
- struct hardware hfrom;
- u_int8_t havehfrom;
-} trace_inpacket_t;
-
-typedef struct {
- u_int32_t index;
- struct iaddr from;
- struct iaddr to;
- u_int16_t to_port;
- struct hardware hto;
- u_int8_t havehto;
-} trace_outpacket_t;
-
-void trace_interface_register (trace_type_t *, struct interface_info *);
-void trace_interface_input (trace_type_t *, unsigned, char *);
-void trace_interface_stop (trace_type_t *);
-void trace_inpacket_stash (struct interface_info *,
- struct dhcp_packet *, unsigned, unsigned int,
- struct iaddr, struct hardware *);
-void trace_inpacket_input (trace_type_t *, unsigned, char *);
-void trace_inpacket_stop (trace_type_t *);
-void trace_outpacket_input (trace_type_t *, unsigned, char *);
-void trace_outpacket_stop (trace_type_t *);
-ssize_t trace_packet_send (struct interface_info *,
- struct packet *, struct dhcp_packet *, size_t,
- struct in_addr,
- struct sockaddr_in *, struct hardware *);
-void trace_icmp_input_input (trace_type_t *, unsigned, char *);
-void trace_icmp_input_stop (trace_type_t *);
-void trace_icmp_output_input (trace_type_t *, unsigned, char *);
-void trace_icmp_output_stop (trace_type_t *);
-void trace_seed_stash (trace_type_t *, unsigned);
-void trace_seed_input (trace_type_t *, unsigned, char *);
-void trace_seed_stop (trace_type_t *);
diff --git a/contrib/isc-dhcp/includes/dhcp.h b/contrib/isc-dhcp/includes/dhcp.h
deleted file mode 100644
index 76dd07b..0000000
--- a/contrib/isc-dhcp/includes/dhcp.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/* dhcp.h
-
- Protocol structures... */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1995-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software has been written for Internet Systems Consortium
- * by Ted Lemon in cooperation with Vixie Enterprises. To learn more
- * about Internet Systems Consortium, see ``http://www.isc.org''.
- * To learn more about Vixie Enterprises, see ``http://www.vix.com''.
- */
-
-#define DHCP_UDP_OVERHEAD (14 + /* Ethernet header */ \
- 20 + /* IP header */ \
- 8) /* UDP header */
-#define DHCP_SNAME_LEN 64
-#define DHCP_FILE_LEN 128
-#define DHCP_FIXED_NON_UDP 236
-#define DHCP_FIXED_LEN (DHCP_FIXED_NON_UDP + DHCP_UDP_OVERHEAD)
- /* Everything but options. */
-#define DHCP_MTU_MAX 1500
-#define DHCP_OPTION_LEN (DHCP_MTU_MAX - DHCP_FIXED_LEN)
-
-#define BOOTP_MIN_LEN 300
-#define DHCP_MIN_LEN 548
-
-struct dhcp_packet {
- u_int8_t op; /* 0: Message opcode/type */
- u_int8_t htype; /* 1: Hardware addr type (net/if_types.h) */
- u_int8_t hlen; /* 2: Hardware addr length */
- u_int8_t hops; /* 3: Number of relay agent hops from client */
- u_int32_t xid; /* 4: Transaction ID */
- u_int16_t secs; /* 8: Seconds since client started looking */
- u_int16_t flags; /* 10: Flag bits */
- struct in_addr ciaddr; /* 12: Client IP address (if already in use) */
- struct in_addr yiaddr; /* 16: Client IP address */
- struct in_addr siaddr; /* 18: IP address of next server to talk to */
- struct in_addr giaddr; /* 20: DHCP relay agent IP address */
- unsigned char chaddr [16]; /* 24: Client hardware address */
- char sname [DHCP_SNAME_LEN]; /* 40: Server name */
- char file [DHCP_FILE_LEN]; /* 104: Boot filename */
- unsigned char options [DHCP_OPTION_LEN];
- /* 212: Optional parameters
- (actual length dependent on MTU). */
-};
-
-/* BOOTP (rfc951) message types */
-#define BOOTREQUEST 1
-#define BOOTREPLY 2
-
-/* Possible values for flags field... */
-#define BOOTP_BROADCAST 32768L
-
-/* Possible values for hardware type (htype) field... */
-#define HTYPE_ETHER 1 /* Ethernet 10Mbps */
-#define HTYPE_IEEE802 6 /* IEEE 802.2 Token Ring... */
-#define HTYPE_FDDI 8 /* FDDI... */
-
-/* Magic cookie validating dhcp options field (and bootp vendor
- extensions field). */
-#define DHCP_OPTIONS_COOKIE "\143\202\123\143"
-
-/* DHCP Option codes: */
-
-#define DHO_PAD 0
-#define DHO_SUBNET_MASK 1
-#define DHO_TIME_OFFSET 2
-#define DHO_ROUTERS 3
-#define DHO_TIME_SERVERS 4
-#define DHO_NAME_SERVERS 5
-#define DHO_DOMAIN_NAME_SERVERS 6
-#define DHO_LOG_SERVERS 7
-#define DHO_COOKIE_SERVERS 8
-#define DHO_LPR_SERVERS 9
-#define DHO_IMPRESS_SERVERS 10
-#define DHO_RESOURCE_LOCATION_SERVERS 11
-#define DHO_HOST_NAME 12
-#define DHO_BOOT_SIZE 13
-#define DHO_MERIT_DUMP 14
-#define DHO_DOMAIN_NAME 15
-#define DHO_SWAP_SERVER 16
-#define DHO_ROOT_PATH 17
-#define DHO_EXTENSIONS_PATH 18
-#define DHO_IP_FORWARDING 19
-#define DHO_NON_LOCAL_SOURCE_ROUTING 20
-#define DHO_POLICY_FILTER 21
-#define DHO_MAX_DGRAM_REASSEMBLY 22
-#define DHO_DEFAULT_IP_TTL 23
-#define DHO_PATH_MTU_AGING_TIMEOUT 24
-#define DHO_PATH_MTU_PLATEAU_TABLE 25
-#define DHO_INTERFACE_MTU 26
-#define DHO_ALL_SUBNETS_LOCAL 27
-#define DHO_BROADCAST_ADDRESS 28
-#define DHO_PERFORM_MASK_DISCOVERY 29
-#define DHO_MASK_SUPPLIER 30
-#define DHO_ROUTER_DISCOVERY 31
-#define DHO_ROUTER_SOLICITATION_ADDRESS 32
-#define DHO_STATIC_ROUTES 33
-#define DHO_TRAILER_ENCAPSULATION 34
-#define DHO_ARP_CACHE_TIMEOUT 35
-#define DHO_IEEE802_3_ENCAPSULATION 36
-#define DHO_DEFAULT_TCP_TTL 37
-#define DHO_TCP_KEEPALIVE_INTERVAL 38
-#define DHO_TCP_KEEPALIVE_GARBAGE 39
-#define DHO_NIS_DOMAIN 40
-#define DHO_NIS_SERVERS 41
-#define DHO_NTP_SERVERS 42
-#define DHO_VENDOR_ENCAPSULATED_OPTIONS 43
-#define DHO_NETBIOS_NAME_SERVERS 44
-#define DHO_NETBIOS_DD_SERVER 45
-#define DHO_NETBIOS_NODE_TYPE 46
-#define DHO_NETBIOS_SCOPE 47
-#define DHO_FONT_SERVERS 48
-#define DHO_X_DISPLAY_MANAGER 49
-#define DHO_DHCP_REQUESTED_ADDRESS 50
-#define DHO_DHCP_LEASE_TIME 51
-#define DHO_DHCP_OPTION_OVERLOAD 52
-#define DHO_DHCP_MESSAGE_TYPE 53
-#define DHO_DHCP_SERVER_IDENTIFIER 54
-#define DHO_DHCP_PARAMETER_REQUEST_LIST 55
-#define DHO_DHCP_MESSAGE 56
-#define DHO_DHCP_MAX_MESSAGE_SIZE 57
-#define DHO_DHCP_RENEWAL_TIME 58
-#define DHO_DHCP_REBINDING_TIME 59
-#define DHO_VENDOR_CLASS_IDENTIFIER 60
-#define DHO_DHCP_CLIENT_IDENTIFIER 61
-#define DHO_NWIP_DOMAIN_NAME 62
-#define DHO_NWIP_SUBOPTIONS 63
-#define DHO_USER_CLASS 77
-#define DHO_FQDN 81
-#define DHO_DHCP_AGENT_OPTIONS 82
-#define DHO_SUBNET_SELECTION 118 /* RFC3011! */
-/* The DHO_AUTHENTICATE option is not a standard yet, so I've
- allocated an option out of the "local" option space for it on a
- temporary basis. Once an option code number is assigned, I will
- immediately and shamelessly break this, so don't count on it
- continuing to work. */
-#define DHO_AUTHENTICATE 210
-
-#define DHO_END 255
-
-/* DHCP message types. */
-#define DHCPDISCOVER 1
-#define DHCPOFFER 2
-#define DHCPREQUEST 3
-#define DHCPDECLINE 4
-#define DHCPACK 5
-#define DHCPNAK 6
-#define DHCPRELEASE 7
-#define DHCPINFORM 8
-
-/* Relay Agent Information option subtypes: */
-#define RAI_CIRCUIT_ID 1
-#define RAI_REMOTE_ID 2
-#define RAI_AGENT_ID 3
-
-/* FQDN suboptions: */
-#define FQDN_NO_CLIENT_UPDATE 1
-#define FQDN_SERVER_UPDATE 2
-#define FQDN_ENCODED 3
-#define FQDN_RCODE1 4
-#define FQDN_RCODE2 5
-#define FQDN_HOSTNAME 6
-#define FQDN_DOMAINNAME 7
-#define FQDN_FQDN 8
-#define FQDN_SUBOPTION_COUNT 8
diff --git a/contrib/isc-dhcp/includes/dhcpd.h b/contrib/isc-dhcp/includes/dhcpd.h
deleted file mode 100644
index 37f9a8e..0000000
--- a/contrib/isc-dhcp/includes/dhcpd.h
+++ /dev/null
@@ -1,2643 +0,0 @@
-/* dhcpd.h
-
- Definitions for dhcpd... */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1996-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software has been written for Internet Systems Consortium
- * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about Internet Systems Consortium, see
- * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
- * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
- * ``http://www.nominum.com''.
- *
- * $FreeBSD$
- */
-
-#ifndef __CYGWIN32__
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <arpa/inet.h>
-
-#include <netdb.h>
-#else
-#define fd_set cygwin_fd_set
-#include <sys/types.h>
-#endif
-#include <fcntl.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <ctype.h>
-#include <time.h>
-
-#include "cdefs.h"
-#include "osdep.h"
-
-#include "arpa/nameser.h"
-#if defined (NSUPDATE)
-# include "minires/minires.h"
-#endif
-
-struct hash_table;
-typedef struct hash_table group_hash_t;
-typedef struct hash_table universe_hash_t;
-typedef struct hash_table option_hash_t;
-typedef struct hash_table dns_zone_hash_t;
-typedef struct hash_table lease_hash_t;
-typedef struct hash_table host_hash_t;
-typedef struct hash_table class_hash_t;
-
-#include "dhcp.h"
-#include "statement.h"
-#include "tree.h"
-#include "inet.h"
-#include "dhctoken.h"
-
-#include <isc-dhcp/result.h>
-#include <omapip/omapip_p.h>
-
-#if !defined (OPTION_HASH_SIZE)
-# define OPTION_HASH_SIZE 17
-# define OPTION_HASH_PTWO 32 /* Next power of two above option hash. */
-# define OPTION_HASH_EXP 5 /* The exponent for that power of two. */
-#endif
-
-#define compute_option_hash(x) \
- (((x) & (OPTION_HASH_PTWO - 1)) + \
- (((x) >> OPTION_HASH_EXP) & \
- (OPTION_HASH_PTWO - 1))) % OPTION_HASH_SIZE;
-
-#define NOLINK 0
-#define HAVELINK 1
-
-enum dhcp_shutdown_state {
- shutdown_listeners,
- shutdown_omapi_connections,
- shutdown_drop_omapi_connections,
- shutdown_dhcp,
- shutdown_done
-};
-
-/* Client FQDN option, failover FQDN option, etc. */
-typedef struct {
- u_int8_t codes [2];
- unsigned length;
- u_int8_t *data;
-} ddns_fqdn_t;
-
-#include "failover.h"
-
-/* A parsing context. */
-
-struct parse {
- int lexline;
- int lexchar;
- char *token_line;
- char *prev_line;
- char *cur_line;
- const char *tlname;
- int eol_token;
-
- char line1 [81];
- char line2 [81];
- int lpos;
- int line;
- int tlpos;
- int tline;
- enum dhcp_token token;
- int ugflag;
- char *tval;
- int tlen;
- char tokbuf [1500];
-
-#ifdef OLD_LEXER
- char comments [4096];
- int comment_index;
-#endif
- int warnings_occurred;
- int file;
- char *inbuf;
- unsigned bufix, buflen;
- unsigned bufsiz;
-};
-
-/* Variable-length array of data. */
-
-struct string_list {
- struct string_list *next;
- char string [1];
-};
-
-/* A name server, from /etc/resolv.conf. */
-struct name_server {
- struct name_server *next;
- struct sockaddr_in addr;
- TIME rcdate;
-};
-
-/* A domain search list element. */
-struct domain_search_list {
- struct domain_search_list *next;
- char *domain;
- TIME rcdate;
-};
-
-/* Option tag structures are used to build chains of option tags, for
- when we're sure we're not going to have enough of them to justify
- maintaining an array. */
-
-struct option_tag {
- struct option_tag *next;
- u_int8_t data [1];
-};
-
-/* An agent option structure. We need a special structure for the
- Relay Agent Information option because if more than one appears in
- a message, we have to keep them seperate. */
-
-struct agent_options {
- struct agent_options *next;
- int length;
- struct option_tag *first;
-};
-
-struct option_cache {
- int refcnt;
- struct option_cache *next;
- struct expression *expression;
- struct option *option;
- struct data_string data;
-};
-
-struct option_state {
- int refcnt;
- int universe_count;
- int site_universe;
- int site_code_min;
- VOIDPTR universes [1];
-};
-
-/* A dhcp packet and the pointers to its option values. */
-struct packet {
- struct dhcp_packet *raw;
- int refcnt;
- unsigned packet_length;
- int packet_type;
- int options_valid;
- int client_port;
- struct iaddr client_addr;
- struct interface_info *interface; /* Interface on which packet
- was received. */
- struct hardware *haddr; /* Physical link address
- of local sender (maybe gateway). */
-
- /* Information for relay agent options (see
- draft-ietf-dhc-agent-options-xx.txt). */
- u_int8_t *circuit_id; /* Circuit ID of client connection. */
- int circuit_id_len;
- u_int8_t *remote_id; /* Remote ID of client. */
- int remote_id_len;
-
- int got_requested_address; /* True if client sent the
- dhcp-requested-address option. */
-
- struct shared_network *shared_network;
- struct option_state *options;
-
-#if !defined (PACKET_MAX_CLASSES)
-# define PACKET_MAX_CLASSES 5
-#endif
- int class_count;
- struct class *classes [PACKET_MAX_CLASSES];
-
- int known;
- int authenticated;
-};
-
-/* A network interface's MAC address. */
-
-struct hardware {
- u_int8_t hlen;
- u_int8_t hbuf [17];
-};
-
-typedef enum {
- server_startup = 0,
- server_running = 1,
- server_shutdown = 2,
- server_hibernate = 3,
- server_awaken = 4
-} control_object_state_t;
-
-typedef struct {
- OMAPI_OBJECT_PREAMBLE;
- control_object_state_t state;
-} dhcp_control_object_t;
-
-/* Lease states: */
-typedef enum {
- FTS_FREE = 1,
- FTS_ACTIVE = 2,
- FTS_EXPIRED = 3,
- FTS_RELEASED = 4,
- FTS_ABANDONED = 5,
- FTS_RESET = 6,
- FTS_BACKUP = 7
-} binding_state_t;
-
-/* FTS_LAST is the highest value that is valid for a lease binding state. */
-#define FTS_LAST FTS_BACKUP
-
-/* A dhcp lease declaration structure. */
-struct lease {
- OMAPI_OBJECT_PREAMBLE;
- struct lease *next;
- struct lease *n_uid, *n_hw;
-
- struct iaddr ip_addr;
- TIME starts, ends, timestamp, sort_time;
- char *client_hostname;
- struct binding_scope *scope;
- struct host_decl *host;
- struct subnet *subnet;
- struct pool *pool;
- struct class *billing_class;
- struct option_chain_head *agent_options;
-
- struct executable_statement *on_expiry;
- struct executable_statement *on_commit;
- struct executable_statement *on_release;
-
- unsigned char *uid;
- unsigned short uid_len;
- unsigned short uid_max;
- unsigned char uid_buf [7];
- struct hardware hardware_addr;
-
- u_int8_t flags;
-# define STATIC_LEASE 1
-# define BOOTP_LEASE 2
-# define PERSISTENT_FLAGS (ON_ACK_QUEUE | ON_UPDATE_QUEUE)
-# define MS_NULL_TERMINATION 8
-# define ON_UPDATE_QUEUE 16
-# define ON_ACK_QUEUE 32
-# define UNICAST_BROADCAST_HACK 64
-# define ON_DEFERRED_QUEUE 128
-# define EPHEMERAL_FLAGS (MS_NULL_TERMINATION | \
- UNICAST_BROADCAST_HACK)
-
- binding_state_t __attribute__ ((mode (__byte__))) binding_state;
- binding_state_t __attribute__ ((mode (__byte__))) next_binding_state;
- binding_state_t __attribute__ ((mode (__byte__))) desired_binding_state;
-
- struct lease_state *state;
-
- TIME tstp; /* Time sent to partner. */
- TIME tsfp; /* Time sent from partner. */
- TIME cltt; /* Client last transaction time. */
- struct lease *next_pending;
-};
-
-struct lease_state {
- struct lease_state *next;
-
- struct interface_info *ip;
-
- struct packet *packet; /* The incoming packet. */
-
- TIME offered_expiry;
-
- struct option_state *options;
- struct data_string parameter_request_list;
- int max_message_size;
- TIME expiry, renewal, rebind;
- struct data_string filename, server_name;
- int got_requested_address;
- int got_server_identifier;
- struct shared_network *shared_network; /* Shared network of interface
- on which request arrived. */
-
- u_int32_t xid;
- u_int16_t secs;
- u_int16_t bootp_flags;
- struct in_addr ciaddr;
- struct in_addr siaddr;
- struct in_addr giaddr;
- u_int8_t hops;
- u_int8_t offer;
- struct iaddr from;
-};
-
-#define ROOT_GROUP 0
-#define HOST_DECL 1
-#define SHARED_NET_DECL 2
-#define SUBNET_DECL 3
-#define CLASS_DECL 4
-#define GROUP_DECL 5
-#define POOL_DECL 6
-
-/* Possible modes in which discover_interfaces can run. */
-
-#define DISCOVER_RUNNING 0
-#define DISCOVER_SERVER 1
-#define DISCOVER_UNCONFIGURED 2
-#define DISCOVER_RELAY 3
-#define DISCOVER_REQUESTED 4
-
-/* Server option names. */
-
-#define SV_DEFAULT_LEASE_TIME 1
-#define SV_MAX_LEASE_TIME 2
-#define SV_MIN_LEASE_TIME 3
-#define SV_BOOTP_LEASE_CUTOFF 4
-#define SV_BOOTP_LEASE_LENGTH 5
-#define SV_BOOT_UNKNOWN_CLIENTS 6
-#define SV_DYNAMIC_BOOTP 7
-#define SV_ALLOW_BOOTP 8
-#define SV_ALLOW_BOOTING 9
-#define SV_ONE_LEASE_PER_CLIENT 10
-#define SV_GET_LEASE_HOSTNAMES 11
-#define SV_USE_HOST_DECL_NAMES 12
-#define SV_USE_LEASE_ADDR_FOR_DEFAULT_ROUTE 13
-#define SV_MIN_SECS 14
-#define SV_FILENAME 15
-#define SV_SERVER_NAME 16
-#define SV_NEXT_SERVER 17
-#define SV_AUTHORITATIVE 18
-#define SV_VENDOR_OPTION_SPACE 19
-#define SV_ALWAYS_REPLY_RFC1048 20
-#define SV_SITE_OPTION_SPACE 21
-#define SV_ALWAYS_BROADCAST 22
-#define SV_DDNS_DOMAIN_NAME 23
-#define SV_DDNS_HOST_NAME 24
-#define SV_DDNS_REV_DOMAIN_NAME 25
-#define SV_LEASE_FILE_NAME 26
-#define SV_PID_FILE_NAME 27
-#define SV_DUPLICATES 28
-#define SV_DECLINES 29
-#define SV_DDNS_UPDATES 30
-#define SV_OMAPI_PORT 31
-#define SV_LOCAL_PORT 32
-#define SV_LIMITED_BROADCAST_ADDRESS 33
-#define SV_REMOTE_PORT 34
-#define SV_LOCAL_ADDRESS 35
-#define SV_OMAPI_KEY 36
-#define SV_STASH_AGENT_OPTIONS 37
-#define SV_DDNS_TTL 38
-#define SV_DDNS_UPDATE_STYLE 39
-#define SV_CLIENT_UPDATES 40
-#define SV_UPDATE_OPTIMIZATION 41
-#define SV_PING_CHECKS 42
-#define SV_UPDATE_STATIC_LEASES 43
-#define SV_LOG_FACILITY 44
-#define SV_DO_FORWARD_UPDATES 45
-#define SV_PING_TIMEOUT 46
-
-#if !defined (DEFAULT_PING_TIMEOUT)
-# define DEFAULT_PING_TIMEOUT 1
-#endif
-
-#if !defined (DEFAULT_DEFAULT_LEASE_TIME)
-# define DEFAULT_DEFAULT_LEASE_TIME 43200
-#endif
-
-#if !defined (DEFAULT_MIN_LEASE_TIME)
-# define DEFAULT_MIN_LEASE_TIME 0
-#endif
-
-#if !defined (DEFAULT_MAX_LEASE_TIME)
-# define DEFAULT_MAX_LEASE_TIME 86400
-#endif
-
-#if !defined (DEFAULT_DDNS_TTL)
-# define DEFAULT_DDNS_TTL 3600
-#endif
-
-/* Client option names */
-
-#define CL_TIMEOUT 1
-#define CL_SELECT_INTERVAL 2
-#define CL_REBOOT_TIMEOUT 3
-#define CL_RETRY_INTERVAL 4
-#define CL_BACKOFF_CUTOFF 5
-#define CL_INITIAL_INTERVAL 6
-#define CL_BOOTP_POLICY 7
-#define CL_SCRIPT_NAME 8
-#define CL_REQUESTED_OPTIONS 9
-#define CL_REQUESTED_LEASE_TIME 10
-#define CL_SEND_OPTIONS 11
-#define CL_MEDIA 12
-#define CL_REJECT_LIST 13
-
-#ifndef CL_DEFAULT_TIMEOUT
-# define CL_DEFAULT_TIMEOUT 60
-#endif
-
-#ifndef CL_DEFAULT_SELECT_INTERVAL
-# define CL_DEFAULT_SELECT_INTERVAL 0
-#endif
-
-#ifndef CL_DEFAULT_REBOOT_TIMEOUT
-# define CL_DEFAULT_REBOOT_TIMEOUT 10
-#endif
-
-#ifndef CL_DEFAULT_RETRY_INTERVAL
-# define CL_DEFAULT_RETRY_INTERVAL 300
-#endif
-
-#ifndef CL_DEFAULT_BACKOFF_CUTOFF
-# define CL_DEFAULT_BACKOFF_CUTOFF 120
-#endif
-
-#ifndef CL_DEFAULT_INITIAL_INTERVAL
-# define CL_DEFAULT_INITIAL_INTERVAL 10
-#endif
-
-#ifndef CL_DEFAULT_BOOTP_POLICY
-# define CL_DEFAULT_BOOTP_POLICY P_ACCEPT
-#endif
-
-#ifndef CL_DEFAULT_REQUESTED_OPTIONS
-# define CL_DEFAULT_REQUESTED_OPTIONS \
- { DHO_SUBNET_MASK, \
- DHO_BROADCAST_ADDRESS, \
- DHO_TIME_OFFSET, \
- DHO_ROUTERS, \
- DHO_DOMAIN_NAME, \
- DHO_DOMAIN_NAME_SERVERS, \
- DHO_HOST_NAME }
-#endif
-
-struct group_object {
- OMAPI_OBJECT_PREAMBLE;
-
- struct group_object *n_dynamic;
- struct group *group;
- char *name;
- int flags;
-#define GROUP_OBJECT_DELETED 1
-#define GROUP_OBJECT_DYNAMIC 2
-#define GROUP_OBJECT_STATIC 4
-};
-
-/* Group of declarations that share common parameters. */
-struct group {
- struct group *next;
-
- int refcnt;
- struct group_object *object;
- struct subnet *subnet;
- struct shared_network *shared_network;
- int authoritative;
- struct executable_statement *statements;
-};
-
-/* A dhcp host declaration structure. */
-struct host_decl {
- OMAPI_OBJECT_PREAMBLE;
- struct host_decl *n_ipaddr;
- struct host_decl *n_dynamic;
- char *name;
- struct hardware interface;
- struct data_string client_identifier;
- struct option_cache *fixed_addr;
- struct group *group;
- struct group_object *named_group;
- struct data_string auth_key_id;
- int flags;
-#define HOST_DECL_DELETED 1
-#define HOST_DECL_DYNAMIC 2
-#define HOST_DECL_STATIC 4
-};
-
-struct permit {
- struct permit *next;
- enum {
- permit_unknown_clients,
- permit_known_clients,
- permit_authenticated_clients,
- permit_unauthenticated_clients,
- permit_all_clients,
- permit_dynamic_bootp_clients,
- permit_class
- } type;
- struct class *class;
-};
-
-struct pool {
- OMAPI_OBJECT_PREAMBLE;
- struct pool *next;
- struct group *group;
- struct shared_network *shared_network;
- struct permit *permit_list;
- struct permit *prohibit_list;
- struct lease *active;
- struct lease *expired;
- struct lease *free;
- struct lease *backup;
- struct lease *abandoned;
- TIME next_event_time;
- int lease_count;
- int free_leases;
- int backup_leases;
- int index;
-#if defined (FAILOVER_PROTOCOL)
- dhcp_failover_state_t *failover_peer;
-#endif
-};
-
-struct shared_network {
- OMAPI_OBJECT_PREAMBLE;
- struct shared_network *next;
- char *name;
- struct subnet *subnets;
- struct interface_info *interface;
- struct pool *pools;
- struct group *group;
-#if defined (FAILOVER_PROTOCOL)
- dhcp_failover_state_t *failover_peer;
-#endif
-};
-
-struct subnet {
- OMAPI_OBJECT_PREAMBLE;
- struct subnet *next_subnet;
- struct subnet *next_sibling;
- struct shared_network *shared_network;
- struct interface_info *interface;
- struct iaddr interface_address;
- struct iaddr net;
- struct iaddr netmask;
-
- struct group *group;
-};
-
-struct collection {
- struct collection *next;
-
- const char *name;
- struct class *classes;
-};
-
-/* XXX classes must be reference-counted. */
-struct class {
- OMAPI_OBJECT_PREAMBLE;
- struct class *nic; /* Next in collection. */
- struct class *superclass; /* Set for spawned classes only. */
- char *name; /* Not set for spawned classes. */
-
- /* A class may be configured to permit a limited number of leases. */
- int lease_limit;
- int leases_consumed;
- struct lease **billed_leases;
-
- /* If nonzero, class has not been saved since it was last
- modified. */
- int dirty;
-
- /* Hash table containing subclasses. */
- class_hash_t *hash;
- struct data_string hash_string;
-
- /* Expression used to match class. */
- struct expression *expr;
-
- /* Expression used to compute subclass identifiers for spawning
- and to do subclass matching. */
- struct expression *submatch;
- int spawning;
-
- struct group *group;
-
- /* Statements to execute if class matches. */
- struct executable_statement *statements;
-};
-
-/* DHCP client lease structure... */
-struct client_lease {
- struct client_lease *next; /* Next lease in list. */
- TIME expiry, renewal, rebind; /* Lease timeouts. */
- struct iaddr address; /* Address being leased. */
- char *server_name; /* Name of boot server. */
- char *filename; /* Name of file we're supposed to boot. */
- struct string_list *medium; /* Network medium. */
- struct auth_key *key; /* Key used in basic DHCP authentication. */
-
- unsigned int is_static : 1; /* If set, lease is from config file. */
- unsigned int is_bootp: 1; /* If set, lease was acquired with BOOTP. */
-
- struct option_state *options; /* Options supplied with lease. */
-};
-
-/* Possible states in which the client can be. */
-enum dhcp_state {
- S_REBOOTING = 1,
- S_INIT = 2,
- S_SELECTING = 3,
- S_REQUESTING = 4,
- S_BOUND = 5,
- S_RENEWING = 6,
- S_REBINDING = 7,
- S_STOPPED = 8
-};
-
-/* Authentication and BOOTP policy possibilities (not all values work
- for each). */
-enum policy { P_IGNORE, P_ACCEPT, P_PREFER, P_REQUIRE, P_DONT };
-
-/* Configuration information from the config file... */
-struct client_config {
- /*
- * When a message has been received, run these statements
- * over it.
- */
- struct group *on_receipt;
-
- /*
- * When a message is sent, run these statements.
- */
- struct group *on_transmission;
-
- u_int32_t *required_options; /* Options server must supply. */
- u_int32_t *requested_options; /* Options to request from server. */
-
- TIME timeout; /* Start to panic if we don't get a
- lease in this time period when
- SELECTING. */
- TIME initial_interval; /* All exponential backoff intervals
- start here. */
- TIME retry_interval; /* If the protocol failed to produce
- an address before the timeout,
- try the protocol again after this
- many seconds. */
- TIME select_interval; /* Wait this many seconds from the
- first DHCPDISCOVER before
- picking an offered lease. */
- TIME reboot_timeout; /* When in INIT-REBOOT, wait this
- long before giving up and going
- to INIT. */
- TIME backoff_cutoff; /* When doing exponential backoff,
- never back off to an interval
- longer than this amount. */
- u_int32_t requested_lease; /* Requested lease time, if user
- doesn't configure one. */
- struct string_list *media; /* Possible network media values. */
- char *script_name; /* Name of config script. */
- char *vendor_space_name; /* Name of config script. */
- enum policy bootp_policy;
- /* Ignore, accept or prefer BOOTP
- responses. */
- enum policy auth_policy;
- /* Require authentication, prefer
- authentication, or don't try to
- authenticate. */
- struct string_list *medium; /* Current network medium. */
-
- struct iaddrlist *reject_list; /* Servers to reject. */
-
- int omapi_port; /* port on which to accept OMAPI
- connections, or -1 for no
- listener. */
- int do_forward_update; /* If nonzero, and if we have the
- information we need, update the
- A record for the address we get. */
-};
-
-/* Per-interface state used in the dhcp client... */
-struct client_state {
- struct client_state *next;
- struct interface_info *interface;
- char *name;
-
- struct client_lease *active; /* Currently active lease. */
- struct client_lease *new; /* New lease. */
- struct client_lease *offered_leases; /* Leases offered to us. */
- struct client_lease *leases; /* Leases we currently hold. */
- struct client_lease *alias; /* Alias lease. */
-
- enum dhcp_state state; /* Current state for this interface. */
- struct iaddr destination; /* Where to send packet. */
- u_int32_t xid; /* Transaction ID. */
- u_int16_t secs; /* secs value from DHCPDISCOVER. */
- TIME first_sending; /* When was first copy sent? */
- TIME interval; /* What's the current resend interval? */
- int dns_update_timeout; /* Last timeout set for DNS update. */
- struct string_list *medium; /* Last media type tried. */
- struct dhcp_packet packet; /* Outgoing DHCP packet. */
- unsigned packet_length; /* Actual length of generated packet. */
-
- struct iaddr requested_address; /* Address we would like to get. */
-
- struct client_config *config; /* Client configuration. */
- struct string_list *env; /* Client script environment. */
- int envc; /* Number of entries in environment. */
-
- struct option_state *sent_options; /* Options we sent. */
-};
-
-/* Information about each network interface. */
-
-struct interface_info {
- OMAPI_OBJECT_PREAMBLE;
- struct interface_info *next; /* Next interface in list... */
- struct shared_network *shared_network;
- /* Networks connected to this interface. */
- struct hardware hw_address; /* Its physical address. */
- struct in_addr primary_address; /* Primary interface address. */
-
- u_int8_t *circuit_id; /* Circuit ID associated with this
- interface. */
- unsigned circuit_id_len; /* Length of Circuit ID, if there
- is one. */
- u_int8_t *remote_id; /* Remote ID associated with this
- interface (if any). */
- unsigned remote_id_len; /* Length of Remote ID. */
-
- char name [IFNAMSIZ]; /* Its name... */
- int ieee80211; /* True if media is ieee802.11 */
- int havemedia; /* True if we have a media table */
- int linkstate; /* True if we have link */
- int polling; /* True if polling is enabled */
- int forcediscover; /* True if a discover is needed */
- int index; /* Its index. */
- int rfdesc; /* Its read file descriptor. */
- int wfdesc; /* Its write file descriptor, if
- different. */
- unsigned char *rbuf; /* Read buffer, if required. */
- unsigned int rbuf_max; /* Size of read buffer. */
- size_t rbuf_offset; /* Current offset into buffer. */
- size_t rbuf_len; /* Length of data in buffer. */
-
- struct ifreq *ifp; /* Pointer to ifreq struct. */
- u_int32_t flags; /* Control flags... */
-#define INTERFACE_REQUESTED 1
-#define INTERFACE_AUTOMATIC 2
-#define INTERFACE_RUNNING 4
-
- /* Only used by DHCP client code. */
- struct client_state *client;
-# if defined (USE_DLPI_SEND) || defined (USE_DLPI_RECEIVE)
- int dlpi_sap_length;
- struct hardware dlpi_broadcast_addr;
-# endif /* DLPI_SEND || DLPI_RECEIVE */
-};
-
-struct hardware_link {
- struct hardware_link *next;
- char name [IFNAMSIZ];
- struct hardware address;
-};
-
-typedef void (*tvref_t)(void *, void *, const char *, int);
-typedef void (*tvunref_t)(void *, const char *, int);
-struct timeout {
- struct timeout *next;
- TIME when;
- void (*func) PROTO ((void *));
- void *what;
- tvref_t ref;
- tvunref_t unref;
-};
-
-struct protocol {
- struct protocol *next;
- int fd;
- void (*handler) PROTO ((struct protocol *));
- void *local;
-};
-
-struct dns_query; /* forward */
-
-struct dns_wakeup {
- struct dns_wakeup *next; /* Next wakeup in chain. */
- void (*func) PROTO ((struct dns_query *));
-};
-
-struct dns_question {
- u_int16_t type; /* Type of query. */
- u_int16_t class; /* Class of query. */
- unsigned char data [1]; /* Query data. */
-};
-
-struct dns_answer {
- u_int16_t type; /* Type of answer. */
- u_int16_t class; /* Class of answer. */
- int count; /* Number of answers. */
- unsigned char *answers[1]; /* Pointers to answers. */
-};
-
-struct dns_query {
- struct dns_query *next; /* Next query in hash bucket. */
- u_int32_t hash; /* Hash bucket index. */
- TIME expiry; /* Query expiry time (zero if not yet
- answered. */
- u_int16_t id; /* Query ID (also hash table index) */
- caddr_t waiters; /* Pointer to list of things waiting
- on this query. */
-
- struct dns_question *question; /* Question, internal format. */
- struct dns_answer *answer; /* Answer, internal format. */
-
- unsigned char *query; /* Query formatted for DNS server. */
- unsigned len; /* Length of entire query. */
- int sent; /* The query has been sent. */
- struct dns_wakeup *wakeups; /* Wakeups to call if this query is
- answered. */
- struct name_server *next_server; /* Next server to try. */
- int backoff; /* Current backoff, in seconds. */
-};
-
-struct dns_zone {
- int refcnt;
- TIME timeout;
- char *name;
- struct option_cache *primary;
- struct option_cache *secondary;
- struct auth_key *key;
-};
-
-struct icmp_state {
- OMAPI_OBJECT_PREAMBLE;
- int socket;
- void (*icmp_handler) PROTO ((struct iaddr, u_int8_t *, int));
-};
-
-#include "ctrace.h"
-
-/* Bitmask of dhcp option codes. */
-typedef unsigned char option_mask [16];
-
-/* DHCP Option mask manipulation macros... */
-#define OPTION_ZERO(mask) (memset (mask, 0, 16))
-#define OPTION_SET(mask, bit) (mask [bit >> 8] |= (1 << (bit & 7)))
-#define OPTION_CLR(mask, bit) (mask [bit >> 8] &= ~(1 << (bit & 7)))
-#define OPTION_ISSET(mask, bit) (mask [bit >> 8] & (1 << (bit & 7)))
-#define OPTION_ISCLR(mask, bit) (!OPTION_ISSET (mask, bit))
-
-/* An option occupies its length plus two header bytes (code and
- length) for every 255 bytes that must be stored. */
-#define OPTION_SPACE(x) ((x) + 2 * ((x) / 255 + 1))
-
-/* Default path to dhcpd config file. */
-#ifdef DEBUG
-#undef _PATH_DHCPD_CONF
-#define _PATH_DHCPD_CONF "dhcpd.conf"
-#undef _PATH_DHCPD_DB
-#define _PATH_DHCPD_DB "dhcpd.leases"
-#undef _PATH_DHCPD_PID
-#define _PATH_DHCPD_PID "dhcpd.pid"
-#else
-#ifndef _PATH_DHCPD_CONF
-#define _PATH_DHCPD_CONF "/etc/dhcpd.conf"
-#endif
-
-#ifndef _PATH_DHCPD_DB
-#define _PATH_DHCPD_DB "/etc/dhcpd.leases"
-#endif
-
-#ifndef _PATH_DHCPD_PID
-#define _PATH_DHCPD_PID "/var/run/dhcpd.pid"
-#endif
-#endif
-
-#ifndef _PATH_DHCLIENT_CONF
-#define _PATH_DHCLIENT_CONF "/etc/dhclient.conf"
-#endif
-
-#ifndef _PATH_DHCLIENT_SCRIPT
-#define _PATH_DHCLIENT_SCRIPT "/sbin/dhclient-script"
-#endif
-
-#ifndef _PATH_DHCLIENT_PID
-#define _PATH_DHCLIENT_PID "/var/run/dhclient.pid"
-#endif
-
-#ifndef _PATH_DHCLIENT_DB
-#define _PATH_DHCLIENT_DB "/etc/dhclient.leases"
-#endif
-
-#ifndef _PATH_RESOLV_CONF
-#define _PATH_RESOLV_CONF "/etc/resolv.conf"
-#endif
-
-#ifndef _PATH_DHCRELAY_PID
-#define _PATH_DHCRELAY_PID "/var/run/dhcrelay.pid"
-#endif
-
-#ifndef DHCPD_LOG_FACILITY
-#define DHCPD_LOG_FACILITY LOG_DAEMON
-#endif
-
-#define MAX_TIME 0x7fffffff
-#define MIN_TIME 0
-
-/* External definitions... */
-
-HASH_FUNCTIONS_DECL (group, const char *, struct group_object, group_hash_t)
-HASH_FUNCTIONS_DECL (universe, const char *, struct universe, universe_hash_t)
-HASH_FUNCTIONS_DECL (option, const char *, struct option, option_hash_t)
-HASH_FUNCTIONS_DECL (dns_zone, const char *, struct dns_zone, dns_zone_hash_t)
-HASH_FUNCTIONS_DECL (lease, const unsigned char *, struct lease, lease_hash_t)
-HASH_FUNCTIONS_DECL (host, const unsigned char *, struct host_decl, host_hash_t)
-HASH_FUNCTIONS_DECL (class, const char *, struct class, class_hash_t)
-
-/* options.c */
-
-extern struct option *vendor_cfg_option;
-int parse_options PROTO ((struct packet *));
-int parse_option_buffer PROTO ((struct option_state *, const unsigned char *,
- unsigned, struct universe *));
-struct universe *find_option_universe (struct option *, const char *);
-int parse_encapsulated_suboptions (struct option_state *, struct option *,
- const unsigned char *, unsigned,
- struct universe *, const char *);
-int cons_options PROTO ((struct packet *, struct dhcp_packet *, struct lease *,
- struct client_state *,
- int, struct option_state *, struct option_state *,
- struct binding_scope **,
- int, int, int, struct data_string *, const char *));
-int fqdn_universe_decode (struct option_state *,
- const unsigned char *, unsigned, struct universe *);
-int store_options PROTO ((unsigned char *, unsigned, struct packet *,
- struct lease *, struct client_state *,
- struct option_state *,
- struct option_state *, struct binding_scope **,
- unsigned *, int, unsigned, unsigned,
- int, const char *));
-const char *pretty_print_option PROTO ((struct option *, const unsigned char *,
- unsigned, int, int));
-int get_option (struct data_string *, struct universe *,
- struct packet *, struct lease *, struct client_state *,
- struct option_state *, struct option_state *,
- struct option_state *, struct binding_scope **, unsigned,
- const char *, int);
-void set_option (struct universe *, struct option_state *,
- struct option_cache *, enum statement_op);
-struct option_cache *lookup_option PROTO ((struct universe *,
- struct option_state *, unsigned));
-struct option_cache *lookup_hashed_option PROTO ((struct universe *,
- struct option_state *,
- unsigned));
-int save_option_buffer (struct universe *, struct option_state *,
- struct buffer *, unsigned char *, unsigned,
- struct option *, int);
-void save_option PROTO ((struct universe *,
- struct option_state *, struct option_cache *));
-void save_hashed_option PROTO ((struct universe *,
- struct option_state *, struct option_cache *));
-void delete_option PROTO ((struct universe *, struct option_state *, int));
-void delete_hashed_option PROTO ((struct universe *,
- struct option_state *, int));
-int option_cache_dereference PROTO ((struct option_cache **,
- const char *, int));
-int hashed_option_state_dereference PROTO ((struct universe *,
- struct option_state *,
- const char *, int));
-int store_option PROTO ((struct data_string *,
- struct universe *, struct packet *, struct lease *,
- struct client_state *,
- struct option_state *, struct option_state *,
- struct binding_scope **, struct option_cache *));
-int option_space_encapsulate PROTO ((struct data_string *,
- struct packet *, struct lease *,
- struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct data_string *));
-int hashed_option_space_encapsulate PROTO ((struct data_string *,
- struct packet *, struct lease *,
- struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct universe *));
-int nwip_option_space_encapsulate PROTO ((struct data_string *,
- struct packet *, struct lease *,
- struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct universe *));
-int fqdn_option_space_encapsulate (struct data_string *,
- struct packet *, struct lease *,
- struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct universe *);
-void suboption_foreach (struct packet *, struct lease *, struct client_state *,
- struct option_state *, struct option_state *,
- struct binding_scope **, struct universe *, void *,
- void (*) (struct option_cache *, struct packet *,
- struct lease *, struct client_state *,
- struct option_state *, struct option_state *,
- struct binding_scope **,
- struct universe *, void *),
- struct option_cache *, const char *);
-void option_space_foreach (struct packet *, struct lease *,
- struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct universe *, void *,
- void (*) (struct option_cache *,
- struct packet *,
- struct lease *, struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct universe *, void *));
-void hashed_option_space_foreach (struct packet *, struct lease *,
- struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct universe *, void *,
- void (*) (struct option_cache *,
- struct packet *,
- struct lease *,
- struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct universe *, void *));
-int linked_option_get PROTO ((struct data_string *, struct universe *,
- struct packet *, struct lease *,
- struct client_state *,
- struct option_state *, struct option_state *,
- struct option_state *, struct binding_scope **,
- unsigned));
-int linked_option_state_dereference PROTO ((struct universe *,
- struct option_state *,
- const char *, int));
-void save_linked_option (struct universe *, struct option_state *,
- struct option_cache *);
-void linked_option_space_foreach (struct packet *, struct lease *,
- struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct universe *, void *,
- void (*) (struct option_cache *,
- struct packet *,
- struct lease *,
- struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct universe *, void *));
-int linked_option_space_encapsulate (struct data_string *, struct packet *,
- struct lease *, struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct universe *);
-void delete_linked_option (struct universe *, struct option_state *, int);
-struct option_cache *lookup_linked_option (struct universe *,
- struct option_state *, unsigned);
-void do_packet PROTO ((struct interface_info *,
- struct dhcp_packet *, unsigned,
- unsigned int, struct iaddr, struct hardware *));
-
-/* dhcpd.c */
-extern TIME cur_time;
-
-int ddns_update_style;
-
-extern const char *path_dhcpd_conf;
-extern const char *path_dhcpd_db;
-extern const char *path_dhcpd_pid;
-
-extern int dhcp_max_agent_option_packet_length;
-
-int main PROTO ((int, char **, char **));
-void postconf_initialization (int);
-void postdb_startup (void);
-void cleanup PROTO ((void));
-void lease_pinged PROTO ((struct iaddr, u_int8_t *, int));
-void lease_ping_timeout PROTO ((void *));
-int dhcpd_interface_setup_hook (struct interface_info *ip, struct iaddr *ia);
-enum dhcp_shutdown_state shutdown_state;
-isc_result_t dhcp_io_shutdown (omapi_object_t *, void *);
-isc_result_t dhcp_set_control_state (control_object_state_t oldstate,
- control_object_state_t newstate);
-
-/* conflex.c */
-isc_result_t new_parse PROTO ((struct parse **, int,
- char *, unsigned, const char *, int));
-isc_result_t end_parse PROTO ((struct parse **));
-enum dhcp_token next_token PROTO ((const char **, unsigned *, struct parse *));
-enum dhcp_token peek_token PROTO ((const char **, unsigned *, struct parse *));
-
-/* confpars.c */
-void parse_trace_setup (void);
-isc_result_t readconf PROTO ((void));
-isc_result_t read_conf_file (const char *, struct group *, int, int);
-#if defined (TRACING)
-void trace_conf_input (trace_type_t *, unsigned, char *);
-void trace_conf_stop (trace_type_t *ttype);
-#endif
-isc_result_t conf_file_subparse (struct parse *, struct group *, int);
-isc_result_t lease_file_subparse (struct parse *);
-int parse_statement PROTO ((struct parse *,
- struct group *, int, struct host_decl *, int));
-#if defined (FAILOVER_PROTOCOL)
-void parse_failover_peer PROTO ((struct parse *, struct group *, int));
-void parse_failover_state_declaration (struct parse *,
- dhcp_failover_state_t *);
-void parse_failover_state PROTO ((struct parse *,
- enum failover_state *, TIME *));
-#endif
-int permit_list_match (struct permit *, struct permit *);
-void parse_pool_statement PROTO ((struct parse *, struct group *, int));
-int parse_boolean PROTO ((struct parse *));
-int parse_lbrace PROTO ((struct parse *));
-void parse_host_declaration PROTO ((struct parse *, struct group *));
-int parse_class_declaration PROTO ((struct class **, struct parse *,
- struct group *, int));
-void parse_shared_net_declaration PROTO ((struct parse *, struct group *));
-void parse_subnet_declaration PROTO ((struct parse *,
- struct shared_network *));
-void parse_group_declaration PROTO ((struct parse *, struct group *));
-int parse_fixed_addr_param PROTO ((struct option_cache **, struct parse *));
-TIME parse_timestamp PROTO ((struct parse *));
-int parse_lease_declaration PROTO ((struct lease **, struct parse *));
-void parse_address_range PROTO ((struct parse *, struct group *, int,
- struct pool *, struct lease **));
-
-/* ddns.c */
-int ddns_updates PROTO ((struct packet *, struct lease *, struct lease *,
- struct lease_state *));
-int ddns_removals PROTO ((struct lease *));
-
-/* parse.c */
-void add_enumeration (struct enumeration *);
-struct enumeration *find_enumeration (const char *, int);
-struct enumeration_value *find_enumeration_value (const char *, int,
- const char *);
-void skip_to_semi PROTO ((struct parse *));
-void skip_to_rbrace PROTO ((struct parse *, int));
-int parse_semi PROTO ((struct parse *));
-int parse_string PROTO ((struct parse *, char **, unsigned *));
-char *parse_host_name PROTO ((struct parse *));
-int parse_ip_addr_or_hostname PROTO ((struct expression **,
- struct parse *, int));
-void parse_hardware_param PROTO ((struct parse *, struct hardware *));
-void parse_lease_time PROTO ((struct parse *, TIME *));
-unsigned char *parse_numeric_aggregate PROTO ((struct parse *,
- unsigned char *, unsigned *,
- int, int, unsigned));
-void convert_num PROTO ((struct parse *, unsigned char *, const char *,
- int, unsigned));
-TIME parse_date PROTO ((struct parse *));
-struct option *parse_option_name PROTO ((struct parse *, int, int *));
-void parse_option_space_decl PROTO ((struct parse *));
-int parse_option_code_definition PROTO ((struct parse *, struct option *));
-int parse_base64 (struct data_string *, struct parse *);
-int parse_cshl PROTO ((struct data_string *, struct parse *));
-int parse_executable_statement PROTO ((struct executable_statement **,
- struct parse *, int *,
- enum expression_context));
-int parse_executable_statements PROTO ((struct executable_statement **,
- struct parse *, int *,
- enum expression_context));
-int parse_zone (struct dns_zone *, struct parse *);
-int parse_key (struct parse *);
-int parse_on_statement PROTO ((struct executable_statement **,
- struct parse *, int *));
-int parse_switch_statement PROTO ((struct executable_statement **,
- struct parse *, int *));
-int parse_case_statement PROTO ((struct executable_statement **,
- struct parse *, int *,
- enum expression_context));
-int parse_if_statement PROTO ((struct executable_statement **,
- struct parse *, int *));
-int parse_boolean_expression PROTO ((struct expression **,
- struct parse *, int *));
-int parse_data_expression PROTO ((struct expression **,
- struct parse *, int *));
-int parse_numeric_expression PROTO ((struct expression **,
- struct parse *, int *));
-int parse_dns_expression PROTO ((struct expression **, struct parse *, int *));
-int parse_non_binary PROTO ((struct expression **, struct parse *, int *,
- enum expression_context));
-int parse_expression PROTO ((struct expression **, struct parse *, int *,
- enum expression_context,
- struct expression **, enum expr_op));
-int parse_option_statement PROTO ((struct executable_statement **,
- struct parse *, int,
- struct option *, enum statement_op));
-int parse_option_token PROTO ((struct expression **, struct parse *,
- const char **, struct expression *, int, int));
-int parse_allow_deny PROTO ((struct option_cache **, struct parse *, int));
-int parse_auth_key PROTO ((struct data_string *, struct parse *));
-int parse_warn (struct parse *, const char *, ...)
- __attribute__((__format__(__printf__,2,3)));
-
-/* tree.c */
-#if defined (NSUPDATE)
-extern struct __res_state resolver_state;
-extern int resolver_inited;
-#endif
-
-extern struct binding_scope *global_scope;
-pair cons PROTO ((caddr_t, pair));
-int make_const_option_cache PROTO ((struct option_cache **, struct buffer **,
- u_int8_t *, unsigned, struct option *,
- const char *, int));
-int make_host_lookup PROTO ((struct expression **, const char *));
-int enter_dns_host PROTO ((struct dns_host_entry **, const char *));
-int make_const_data (struct expression **,
- const unsigned char *, unsigned, int, int,
- const char *, int);
-int make_const_int PROTO ((struct expression **, unsigned long));
-int make_concat PROTO ((struct expression **,
- struct expression *, struct expression *));
-int make_encapsulation PROTO ((struct expression **, struct data_string *));
-int make_substring PROTO ((struct expression **, struct expression *,
- struct expression *, struct expression *));
-int make_limit PROTO ((struct expression **, struct expression *, int));
-int make_let PROTO ((struct executable_statement **, const char *));
-int option_cache PROTO ((struct option_cache **, struct data_string *,
- struct expression *, struct option *,
- const char *, int));
-int evaluate_expression (struct binding_value **, struct packet *,
- struct lease *, struct client_state *,
- struct option_state *, struct option_state *,
- struct binding_scope **, struct expression *,
- const char *, int);
-int binding_value_dereference (struct binding_value **, const char *, int);
-#if defined (NSUPDATE)
-int evaluate_dns_expression PROTO ((ns_updrec **, struct packet *,
- struct lease *,
- struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct expression *));
-#endif
-int evaluate_boolean_expression PROTO ((int *,
- struct packet *, struct lease *,
- struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct expression *));
-int evaluate_data_expression PROTO ((struct data_string *,
- struct packet *, struct lease *,
- struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct expression *, const char *, int));
-int evaluate_numeric_expression (unsigned long *, struct packet *,
- struct lease *, struct client_state *,
- struct option_state *, struct option_state *,
- struct binding_scope **,
- struct expression *);
-int evaluate_option_cache PROTO ((struct data_string *,
- struct packet *, struct lease *,
- struct client_state *,
- struct option_state *, struct option_state *,
- struct binding_scope **,
- struct option_cache *,
- const char *, int));
-int evaluate_boolean_option_cache PROTO ((int *,
- struct packet *, struct lease *,
- struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct option_cache *,
- const char *, int));
-int evaluate_boolean_expression_result PROTO ((int *,
- struct packet *, struct lease *,
- struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct expression *));
-void expression_dereference PROTO ((struct expression **, const char *, int));
-int is_dns_expression PROTO ((struct expression *));
-int is_boolean_expression PROTO ((struct expression *));
-int is_data_expression PROTO ((struct expression *));
-int is_numeric_expression PROTO ((struct expression *));
-int is_compound_expression PROTO ((struct expression *));
-int op_precedence PROTO ((enum expr_op, enum expr_op));
-enum expression_context expression_context (struct expression *);
-enum expression_context op_context PROTO ((enum expr_op));
-int write_expression PROTO ((FILE *, struct expression *, int, int, int));
-struct binding *find_binding PROTO ((struct binding_scope *, const char *));
-int free_bindings PROTO ((struct binding_scope *, const char *, int));
-int binding_scope_dereference PROTO ((struct binding_scope **,
- const char *, int));
-int fundef_dereference (struct fundef **, const char *, int);
-int data_subexpression_length (int *, struct expression *);
-int expr_valid_for_context (struct expression *, enum expression_context);
-struct binding *create_binding (struct binding_scope **, const char *);
-int bind_ds_value (struct binding_scope **,
- const char *, struct data_string *);
-int find_bound_string (struct data_string *,
- struct binding_scope *, const char *);
-int unset (struct binding_scope *, const char *);
-
-/* dhcp.c */
-extern int outstanding_pings;
-
-void dhcp PROTO ((struct packet *));
-void dhcpdiscover PROTO ((struct packet *, int));
-void dhcprequest PROTO ((struct packet *, int, struct lease *));
-void dhcprelease PROTO ((struct packet *, int));
-void dhcpdecline PROTO ((struct packet *, int));
-void dhcpinform PROTO ((struct packet *, int));
-void nak_lease PROTO ((struct packet *, struct iaddr *cip));
-void ack_lease PROTO ((struct packet *, struct lease *,
- unsigned int, TIME, char *, int));
-void dhcp_reply PROTO ((struct lease *));
-int find_lease PROTO ((struct lease **, struct packet *,
- struct shared_network *, int *, int *, struct lease *,
- const char *, int));
-int mockup_lease PROTO ((struct lease **, struct packet *,
- struct shared_network *,
- struct host_decl *));
-void static_lease_dereference PROTO ((struct lease *, const char *, int));
-
-int allocate_lease PROTO ((struct lease **, struct packet *,
- struct pool *, int *));
-int permitted PROTO ((struct packet *, struct permit *));
-int locate_network PROTO ((struct packet *));
-int parse_agent_information_option PROTO ((struct packet *, int, u_int8_t *));
-unsigned cons_agent_information_options PROTO ((struct option_state *,
- struct dhcp_packet *,
- unsigned, unsigned));
-
-/* bootp.c */
-void bootp PROTO ((struct packet *));
-
-/* memory.c */
-int (*group_write_hook) (struct group_object *);
-extern struct group *root_group;
-extern group_hash_t *group_name_hash;
-isc_result_t delete_group (struct group_object *, int);
-isc_result_t supersede_group (struct group_object *, int);
-int clone_group (struct group **, struct group *, const char *, int);
-int write_group PROTO ((struct group_object *));
-
-/* salloc.c */
-void relinquish_lease_hunks (void);
-struct lease *new_leases PROTO ((unsigned, const char *, int));
-#if defined (DEBUG_MEMORY_LEAKAGE) || \
- defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
-void relinquish_free_lease_states (void);
-#endif
-OMAPI_OBJECT_ALLOC_DECL (lease, struct lease, dhcp_type_lease)
-OMAPI_OBJECT_ALLOC_DECL (class, struct class, dhcp_type_class)
-OMAPI_OBJECT_ALLOC_DECL (pool, struct pool, dhcp_type_pool)
-OMAPI_OBJECT_ALLOC_DECL (host, struct host_decl, dhcp_type_host)
-
-/* alloc.c */
-OMAPI_OBJECT_ALLOC_DECL (subnet, struct subnet, dhcp_type_subnet)
-OMAPI_OBJECT_ALLOC_DECL (shared_network, struct shared_network,
- dhcp_type_shared_network)
-OMAPI_OBJECT_ALLOC_DECL (group_object, struct group_object, dhcp_type_group)
-OMAPI_OBJECT_ALLOC_DECL (dhcp_control,
- dhcp_control_object_t, dhcp_type_control)
-
-#if defined (DEBUG_MEMORY_LEAKAGE) || \
- defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
-void relinquish_free_pairs (void);
-void relinquish_free_expressions (void);
-void relinquish_free_binding_values (void);
-void relinquish_free_option_caches (void);
-void relinquish_free_packets (void);
-#endif
-
-int option_chain_head_allocate (struct option_chain_head **,
- const char *, int);
-int option_chain_head_reference (struct option_chain_head **,
- struct option_chain_head *,
- const char *, int);
-int option_chain_head_dereference (struct option_chain_head **,
- const char *, int);
-int group_allocate (struct group **, const char *, int);
-int group_reference (struct group **, struct group *, const char *, int);
-int group_dereference (struct group **, const char *, int);
-struct dhcp_packet *new_dhcp_packet PROTO ((const char *, int));
-struct protocol *new_protocol PROTO ((const char *, int));
-struct lease_state *new_lease_state PROTO ((const char *, int));
-struct domain_search_list *new_domain_search_list PROTO ((const char *, int));
-struct name_server *new_name_server PROTO ((const char *, int));
-void free_name_server PROTO ((struct name_server *, const char *, int));
-struct option *new_option PROTO ((const char *, int));
-int group_allocate (struct group **, const char *, int);
-int group_reference (struct group **, struct group *, const char *, int);
-int group_dereference (struct group **, const char *, int);
-void free_option PROTO ((struct option *, const char *, int));
-struct universe *new_universe PROTO ((const char *, int));
-void free_universe PROTO ((struct universe *, const char *, int));
-void free_domain_search_list PROTO ((struct domain_search_list *,
- const char *, int));
-void free_lease_state PROTO ((struct lease_state *, const char *, int));
-void free_protocol PROTO ((struct protocol *, const char *, int));
-void free_dhcp_packet PROTO ((struct dhcp_packet *, const char *, int));
-struct client_lease *new_client_lease PROTO ((const char *, int));
-void free_client_lease PROTO ((struct client_lease *, const char *, int));
-struct permit *new_permit PROTO ((const char *, int));
-void free_permit PROTO ((struct permit *, const char *, int));
-pair new_pair PROTO ((const char *, int));
-void free_pair PROTO ((pair, const char *, int));
-int expression_allocate PROTO ((struct expression **, const char *, int));
-int expression_reference PROTO ((struct expression **,
- struct expression *, const char *, int));
-void free_expression PROTO ((struct expression *, const char *, int));
-int binding_value_allocate PROTO ((struct binding_value **,
- const char *, int));
-int binding_value_reference PROTO ((struct binding_value **,
- struct binding_value *,
- const char *, int));
-void free_binding_value PROTO ((struct binding_value *, const char *, int));
-int fundef_allocate PROTO ((struct fundef **, const char *, int));
-int fundef_reference PROTO ((struct fundef **,
- struct fundef *, const char *, int));
-int option_cache_allocate PROTO ((struct option_cache **, const char *, int));
-int option_cache_reference PROTO ((struct option_cache **,
- struct option_cache *, const char *, int));
-int buffer_allocate PROTO ((struct buffer **, unsigned, const char *, int));
-int buffer_reference PROTO ((struct buffer **, struct buffer *,
- const char *, int));
-int buffer_dereference PROTO ((struct buffer **, const char *, int));
-int dns_host_entry_allocate PROTO ((struct dns_host_entry **,
- const char *, const char *, int));
-int dns_host_entry_reference PROTO ((struct dns_host_entry **,
- struct dns_host_entry *,
- const char *, int));
-int dns_host_entry_dereference PROTO ((struct dns_host_entry **,
- const char *, int));
-int option_state_allocate PROTO ((struct option_state **, const char *, int));
-int option_state_reference PROTO ((struct option_state **,
- struct option_state *, const char *, int));
-int option_state_dereference PROTO ((struct option_state **,
- const char *, int));
-void data_string_copy PROTO ((struct data_string *,
- struct data_string *, const char *, int));
-void data_string_forget PROTO ((struct data_string *, const char *, int));
-void data_string_truncate PROTO ((struct data_string *, int));
-int executable_statement_allocate PROTO ((struct executable_statement **,
- const char *, int));
-int executable_statement_reference PROTO ((struct executable_statement **,
- struct executable_statement *,
- const char *, int));
-int packet_allocate PROTO ((struct packet **, const char *, int));
-int packet_reference PROTO ((struct packet **,
- struct packet *, const char *, int));
-int packet_dereference PROTO ((struct packet **, const char *, int));
-int binding_scope_allocate PROTO ((struct binding_scope **,
- const char *, int));
-int binding_scope_reference PROTO ((struct binding_scope **,
- struct binding_scope *,
- const char *, int));
-int dns_zone_allocate PROTO ((struct dns_zone **, const char *, int));
-int dns_zone_reference PROTO ((struct dns_zone **,
- struct dns_zone *, const char *, int));
-
-/* print.c */
-char *quotify_string (const char *, const char *, int);
-char *quotify_buf (const unsigned char *, unsigned, const char *, int);
-char *print_base64 (const unsigned char *, unsigned, const char *, int);
-char *print_hw_addr PROTO ((int, int, unsigned char *));
-void print_lease PROTO ((struct lease *));
-void dump_raw PROTO ((const unsigned char *, unsigned));
-void dump_packet_option (struct option_cache *, struct packet *,
- struct lease *, struct client_state *,
- struct option_state *, struct option_state *,
- struct binding_scope **, struct universe *, void *);
-void dump_packet PROTO ((struct packet *));
-void hash_dump PROTO ((struct hash_table *));
-char *print_hex_1 PROTO ((unsigned, const u_int8_t *, unsigned));
-char *print_hex_2 PROTO ((unsigned, const u_int8_t *, unsigned));
-char *print_hex_3 PROTO ((unsigned, const u_int8_t *, unsigned));
-char *print_dotted_quads PROTO ((unsigned, const u_int8_t *));
-char *print_dec_1 PROTO ((unsigned long));
-char *print_dec_2 PROTO ((unsigned long));
-void print_expression PROTO ((const char *, struct expression *));
-int token_print_indent_concat (FILE *, int, int,
- const char *, const char *, ...);
-int token_indent_data_string (FILE *, int, int, const char *, const char *,
- struct data_string *);
-int token_print_indent (FILE *, int, int,
- const char *, const char *, const char *);
-void indent_spaces (FILE *, int);
-#if defined (NSUPDATE)
-void print_dns_status (int, ns_updque *);
-#endif
-
-/* socket.c */
-#if defined (USE_SOCKET_SEND) || defined (USE_SOCKET_RECEIVE) \
- || defined (USE_SOCKET_FALLBACK)
-int if_register_socket PROTO ((struct interface_info *));
-#endif
-
-#if defined (USE_SOCKET_FALLBACK) && !defined (USE_SOCKET_SEND)
-void if_reinitialize_fallback PROTO ((struct interface_info *));
-void if_register_fallback PROTO ((struct interface_info *));
-ssize_t send_fallback PROTO ((struct interface_info *,
- struct packet *, struct dhcp_packet *, size_t,
- struct in_addr,
- struct sockaddr_in *, struct hardware *));
-#endif
-
-#ifdef USE_SOCKET_SEND
-void if_reinitialize_send PROTO ((struct interface_info *));
-void if_register_send PROTO ((struct interface_info *));
-void if_deregister_send PROTO ((struct interface_info *));
-ssize_t send_packet PROTO ((struct interface_info *,
- struct packet *, struct dhcp_packet *, size_t,
- struct in_addr,
- struct sockaddr_in *, struct hardware *));
-#endif
-#ifdef USE_SOCKET_RECEIVE
-void if_reinitialize_receive PROTO ((struct interface_info *));
-void if_register_receive PROTO ((struct interface_info *));
-void if_deregister_receive PROTO ((struct interface_info *));
-ssize_t receive_packet PROTO ((struct interface_info *,
- unsigned char *, size_t,
- struct sockaddr_in *, struct hardware *));
-#endif
-
-#if defined (USE_SOCKET_FALLBACK)
-isc_result_t fallback_discard PROTO ((omapi_object_t *));
-#endif
-
-#if defined (USE_SOCKET_SEND)
-int can_unicast_without_arp PROTO ((struct interface_info *));
-int can_receive_unicast_unconfigured PROTO ((struct interface_info *));
-int supports_multiple_interfaces (struct interface_info *);
-void maybe_setup_fallback PROTO ((void));
-#endif
-
-/* bpf.c */
-#if defined (USE_BPF_SEND) || defined (USE_BPF_RECEIVE)
-int if_register_bpf PROTO ( (struct interface_info *));
-#endif
-#ifdef USE_BPF_SEND
-void if_reinitialize_send PROTO ((struct interface_info *));
-void if_register_send PROTO ((struct interface_info *));
-void if_deregister_send PROTO ((struct interface_info *));
-ssize_t send_packet PROTO ((struct interface_info *,
- struct packet *, struct dhcp_packet *, size_t,
- struct in_addr,
- struct sockaddr_in *, struct hardware *));
-#endif
-#ifdef USE_BPF_RECEIVE
-void if_reinitialize_receive PROTO ((struct interface_info *));
-void if_register_receive PROTO ((struct interface_info *));
-void if_deregister_receive PROTO ((struct interface_info *));
-ssize_t receive_packet PROTO ((struct interface_info *,
- unsigned char *, size_t,
- struct sockaddr_in *, struct hardware *));
-#endif
-#if defined (USE_BPF_SEND)
-int can_unicast_without_arp PROTO ((struct interface_info *));
-int can_receive_unicast_unconfigured PROTO ((struct interface_info *));
-int supports_multiple_interfaces (struct interface_info *);
-void maybe_setup_fallback PROTO ((void));
-#endif
-
-/* lpf.c */
-#if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
-int if_register_lpf PROTO ( (struct interface_info *));
-#endif
-#ifdef USE_LPF_SEND
-void if_reinitialize_send PROTO ((struct interface_info *));
-void if_register_send PROTO ((struct interface_info *));
-void if_deregister_send PROTO ((struct interface_info *));
-ssize_t send_packet PROTO ((struct interface_info *,
- struct packet *, struct dhcp_packet *, size_t,
- struct in_addr,
- struct sockaddr_in *, struct hardware *));
-#endif
-#ifdef USE_LPF_RECEIVE
-void if_reinitialize_receive PROTO ((struct interface_info *));
-void if_register_receive PROTO ((struct interface_info *));
-void if_deregister_receive PROTO ((struct interface_info *));
-ssize_t receive_packet PROTO ((struct interface_info *,
- unsigned char *, size_t,
- struct sockaddr_in *, struct hardware *));
-#endif
-#if defined (USE_LPF_SEND)
-int can_unicast_without_arp PROTO ((struct interface_info *));
-int can_receive_unicast_unconfigured PROTO ((struct interface_info *));
-int supports_multiple_interfaces (struct interface_info *);
-void maybe_setup_fallback PROTO ((void));
-#endif
-
-/* nit.c */
-#if defined (USE_NIT_SEND) || defined (USE_NIT_RECEIVE)
-int if_register_nit PROTO ( (struct interface_info *));
-#endif
-
-#ifdef USE_NIT_SEND
-void if_reinitialize_send PROTO ((struct interface_info *));
-void if_register_send PROTO ((struct interface_info *));
-void if_deregister_send PROTO ((struct interface_info *));
-ssize_t send_packet PROTO ((struct interface_info *,
- struct packet *, struct dhcp_packet *, size_t,
- struct in_addr,
- struct sockaddr_in *, struct hardware *));
-#endif
-#ifdef USE_NIT_RECEIVE
-void if_reinitialize_receive PROTO ((struct interface_info *));
-void if_register_receive PROTO ((struct interface_info *));
-void if_deregister_receive PROTO ((struct interface_info *));
-ssize_t receive_packet PROTO ((struct interface_info *,
- unsigned char *, size_t,
- struct sockaddr_in *, struct hardware *));
-#endif
-#if defined (USE_NIT_SEND)
-int can_unicast_without_arp PROTO ((struct interface_info *));
-int can_receive_unicast_unconfigured PROTO ((struct interface_info *));
-int supports_multiple_interfaces (struct interface_info *);
-void maybe_setup_fallback PROTO ((void));
-#endif
-
-/* dlpi.c */
-#if defined (USE_DLPI_SEND) || defined (USE_DLPI_RECEIVE)
-int if_register_dlpi PROTO ( (struct interface_info *));
-#endif
-
-#ifdef USE_DLPI_SEND
-void if_reinitialize_send PROTO ((struct interface_info *));
-void if_register_send PROTO ((struct interface_info *));
-void if_deregister_send PROTO ((struct interface_info *));
-ssize_t send_packet PROTO ((struct interface_info *,
- struct packet *, struct dhcp_packet *, size_t,
- struct in_addr,
- struct sockaddr_in *, struct hardware *));
-#endif
-#ifdef USE_DLPI_RECEIVE
-void if_reinitialize_receive PROTO ((struct interface_info *));
-void if_register_receive PROTO ((struct interface_info *));
-void if_deregister_receive PROTO ((struct interface_info *));
-ssize_t receive_packet PROTO ((struct interface_info *,
- unsigned char *, size_t,
- struct sockaddr_in *, struct hardware *));
-#endif
-
-
-/* raw.c */
-#ifdef USE_RAW_SEND
-void if_reinitialize_send PROTO ((struct interface_info *));
-void if_register_send PROTO ((struct interface_info *));
-void if_deregister_send PROTO ((struct interface_info *));
-ssize_t send_packet PROTO ((struct interface_info *,
- struct packet *, struct dhcp_packet *, size_t,
- struct in_addr,
- struct sockaddr_in *, struct hardware *));
-int can_unicast_without_arp PROTO ((struct interface_info *));
-int can_receive_unicast_unconfigured PROTO ((struct interface_info *));
-int supports_multiple_interfaces (struct interface_info *);
-void maybe_setup_fallback PROTO ((void));
-#endif
-
-/* discover.c */
-extern struct interface_info *interfaces,
- *dummy_interfaces, *fallback_interface;
-extern struct protocol *protocols;
-extern int quiet_interface_discovery;
-isc_result_t interface_setup (void);
-void interface_trace_setup (void);
-
-extern struct in_addr limited_broadcast;
-extern struct in_addr local_address;
-
-extern u_int16_t local_port;
-extern u_int16_t remote_port;
-extern int (*dhcp_interface_setup_hook) (struct interface_info *,
- struct iaddr *);
-extern int (*dhcp_interface_discovery_hook) (struct interface_info *);
-isc_result_t (*dhcp_interface_startup_hook) (struct interface_info *);
-
-extern void (*bootp_packet_handler) PROTO ((struct interface_info *,
- struct dhcp_packet *, unsigned,
- unsigned int,
- struct iaddr, struct hardware *));
-extern struct timeout *timeouts;
-extern omapi_object_type_t *dhcp_type_interface;
-#if defined (TRACING)
-trace_type_t *interface_trace;
-trace_type_t *inpacket_trace;
-trace_type_t *outpacket_trace;
-#endif
-extern struct interface_info **interface_vector;
-extern int interface_count;
-extern int interface_max;
-isc_result_t interface_initialize (omapi_object_t *, const char *, int);
-void discover_interfaces PROTO ((int));
-int setup_fallback (struct interface_info **, const char *, int);
-int if_readsocket PROTO ((omapi_object_t *));
-void reinitialize_interfaces PROTO ((void));
-
-/* dispatch.c */
-void set_time (TIME);
-struct timeval *process_outstanding_timeouts (struct timeval *);
-void dispatch PROTO ((void));
-isc_result_t got_one PROTO ((omapi_object_t *));
-isc_result_t interface_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *, omapi_typed_data_t *);
-isc_result_t interface_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *, omapi_value_t **);
-isc_result_t interface_destroy (omapi_object_t *, const char *, int);
-isc_result_t interface_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t interface_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-
-void add_timeout PROTO ((TIME, void (*) PROTO ((void *)), void *,
- tvref_t, tvunref_t));
-void cancel_timeout PROTO ((void (*) PROTO ((void *)), void *));
-void cancel_all_timeouts (void);
-void relinquish_timeouts (void);
-#if 0
-struct protocol *add_protocol PROTO ((const char *, int,
- void (*) PROTO ((struct protocol *)),
- void *));
-
-void remove_protocol PROTO ((struct protocol *));
-#endif
-OMAPI_OBJECT_ALLOC_DECL (interface,
- struct interface_info, dhcp_type_interface)
-
-/* tables.c */
-extern struct universe dhcp_universe;
-extern struct option dhcp_options [256];
-extern struct universe nwip_universe;
-extern struct option nwip_options [256];
-extern struct universe fqdn_universe;
-extern struct option fqdn_options [256];
-extern int dhcp_option_default_priority_list [];
-extern int dhcp_option_default_priority_list_count;
-extern const char *hardware_types [256];
-int universe_count, universe_max;
-struct universe **universes;
-extern universe_hash_t *universe_hash;
-void initialize_common_option_spaces PROTO ((void));
-struct universe *config_universe;
-
-/* stables.c */
-#if defined (FAILOVER_PROTOCOL)
-extern failover_option_t null_failover_option;
-extern failover_option_t skip_failover_option;
-extern struct failover_option_info ft_options [];
-extern u_int32_t fto_allowed [];
-extern int ft_sizes [];
-extern const char *dhcp_flink_state_names [];
-#endif
-extern const char *binding_state_names [];
-
-extern struct universe agent_universe;
-extern struct option agent_options [256];
-extern struct universe server_universe;
-extern struct option server_options [256];
-
-extern struct enumeration ddns_styles;
-extern struct enumeration syslog_enum;
-void initialize_server_option_spaces PROTO ((void));
-
-/* inet.c */
-struct iaddr subnet_number PROTO ((struct iaddr, struct iaddr));
-struct iaddr ip_addr PROTO ((struct iaddr, struct iaddr, u_int32_t));
-struct iaddr broadcast_addr PROTO ((struct iaddr, struct iaddr));
-u_int32_t host_addr PROTO ((struct iaddr, struct iaddr));
-int addr_eq PROTO ((struct iaddr, struct iaddr));
-char *piaddr PROTO ((struct iaddr));
-char *piaddrmask (struct iaddr, struct iaddr, const char *, int);
-char *piaddr1 PROTO ((struct iaddr));
-
-/* dhclient.c */
-extern const char *path_dhclient_conf;
-extern const char *path_dhclient_db;
-extern const char *path_dhclient_pid;
-extern char *path_dhclient_script;
-extern int interfaces_requested;
-
-extern struct client_config top_level_config;
-
-void dhcpoffer PROTO ((struct packet *));
-void dhcpack PROTO ((struct packet *));
-void dhcpnak PROTO ((struct packet *));
-
-void send_discover PROTO ((void *));
-void send_request PROTO ((void *));
-void send_release PROTO ((void *));
-void send_decline PROTO ((void *));
-
-void state_reboot PROTO ((void *));
-#ifdef ENABLE_POLLING_MODE
-void state_polling PROTO (());
-void state_background PROTO ((void *));
-#endif
-void state_init PROTO ((void *));
-void state_selecting PROTO ((void *));
-void state_requesting PROTO ((void *));
-void state_bound PROTO ((void *));
-void state_stop PROTO ((void *));
-void state_panic PROTO ((void *));
-
-#ifdef __FreeBSD__
-void set_ieee80211 PROTO ((struct interface_info *));
-#endif
-int interface_active PROTO ((struct interface_info *));
-
-void bind_lease PROTO ((struct client_state *));
-
-void make_client_options PROTO ((struct client_state *,
- struct client_lease *, u_int8_t *,
- struct option_cache *, struct iaddr *,
- u_int32_t *, struct option_state **));
-void make_discover PROTO ((struct client_state *, struct client_lease *));
-void make_request PROTO ((struct client_state *, struct client_lease *));
-void make_decline PROTO ((struct client_state *, struct client_lease *));
-void make_release PROTO ((struct client_state *, struct client_lease *));
-
-void destroy_client_lease PROTO ((struct client_lease *));
-void rewrite_client_leases PROTO ((void));
-void write_lease_option (struct option_cache *, struct packet *,
- struct lease *, struct client_state *,
- struct option_state *, struct option_state *,
- struct binding_scope **, struct universe *, void *);
-int write_client_lease PROTO ((struct client_state *,
- struct client_lease *, int, int));
-int dhcp_option_ev_name (char *, size_t, struct option *);
-
-void script_init PROTO ((struct client_state *, const char *,
- struct string_list *));
-void client_option_envadd (struct option_cache *, struct packet *,
- struct lease *, struct client_state *,
- struct option_state *, struct option_state *,
- struct binding_scope **, struct universe *, void *);
-void script_write_params PROTO ((struct client_state *,
- const char *, struct client_lease *));
-int script_go PROTO ((struct client_state *));
-void client_envadd (struct client_state *,
- const char *, const char *, const char *, ...)
- __attribute__((__format__(__printf__,4,5)));
-
-struct client_lease *packet_to_lease (struct packet *, struct client_state *);
-void go_daemon PROTO ((void));
-void write_client_pid_file PROTO ((void));
-void client_location_changed PROTO ((void));
-void do_release PROTO ((struct client_state *));
-int dhclient_interface_shutdown_hook (struct interface_info *);
-int dhclient_interface_discovery_hook (struct interface_info *);
-isc_result_t dhclient_interface_startup_hook (struct interface_info *);
-void client_dns_update_timeout (void *cp);
-isc_result_t client_dns_update (struct client_state *client, int, int);
-
-/* db.c */
-int write_lease PROTO ((struct lease *));
-int write_host PROTO ((struct host_decl *));
-#if defined (FAILOVER_PROTOCOL)
-int write_failover_state (dhcp_failover_state_t *);
-#endif
-int db_printable PROTO ((const char *));
-int db_printable_len PROTO ((const unsigned char *, unsigned));
-void write_named_billing_class (const char *, unsigned, struct class *);
-void write_billing_classes (void);
-int write_billing_class PROTO ((struct class *));
-void commit_leases_timeout PROTO ((void *));
-int commit_leases PROTO ((void));
-void db_startup PROTO ((int));
-int new_lease_file PROTO ((void));
-int group_writer (struct group_object *);
-
-/* packet.c */
-u_int32_t checksum PROTO ((unsigned char *, unsigned, u_int32_t));
-u_int32_t wrapsum PROTO ((u_int32_t));
-void assemble_hw_header PROTO ((struct interface_info *, unsigned char *,
- unsigned *, struct hardware *));
-void assemble_udp_ip_header PROTO ((struct interface_info *, unsigned char *,
- unsigned *, u_int32_t, u_int32_t,
- u_int32_t, unsigned char *, unsigned));
-ssize_t decode_hw_header PROTO ((struct interface_info *, unsigned char *,
- unsigned, struct hardware *));
-ssize_t decode_udp_ip_header PROTO ((struct interface_info *, unsigned char *,
- unsigned, struct sockaddr_in *,
- unsigned char *, unsigned));
-
-/* ethernet.c */
-void assemble_ethernet_header PROTO ((struct interface_info *, unsigned char *,
- unsigned *, struct hardware *));
-ssize_t decode_ethernet_header PROTO ((struct interface_info *,
- unsigned char *,
- unsigned, struct hardware *));
-
-/* tr.c */
-void assemble_tr_header PROTO ((struct interface_info *, unsigned char *,
- unsigned *, struct hardware *));
-ssize_t decode_tr_header PROTO ((struct interface_info *,
- unsigned char *,
- unsigned, struct hardware *));
-
-/* dhxpxlt.c */
-void convert_statement PROTO ((struct parse *));
-void convert_host_statement PROTO ((struct parse *, jrefproto));
-void convert_host_name PROTO ((struct parse *, jrefproto));
-void convert_class_statement PROTO ((struct parse *, jrefproto, int));
-void convert_class_decl PROTO ((struct parse *, jrefproto));
-void convert_lease_time PROTO ((struct parse *, jrefproto, char *));
-void convert_shared_net_statement PROTO ((struct parse *, jrefproto));
-void convert_subnet_statement PROTO ((struct parse *, jrefproto));
-void convert_subnet_decl PROTO ((struct parse *, jrefproto));
-void convert_host_decl PROTO ((struct parse *, jrefproto));
-void convert_hardware_decl PROTO ((struct parse *, jrefproto));
-void convert_hardware_addr PROTO ((struct parse *, jrefproto));
-void convert_filename_decl PROTO ((struct parse *, jrefproto));
-void convert_servername_decl PROTO ((struct parse *, jrefproto));
-void convert_ip_addr_or_hostname PROTO ((struct parse *, jrefproto, int));
-void convert_fixed_addr_decl PROTO ((struct parse *, jrefproto));
-void convert_option_decl PROTO ((struct parse *, jrefproto));
-void convert_timestamp PROTO ((struct parse *, jrefproto));
-void convert_lease_statement PROTO ((struct parse *, jrefproto));
-void convert_address_range PROTO ((struct parse *, jrefproto));
-void convert_date PROTO ((struct parse *, jrefproto, char *));
-void convert_numeric_aggregate PROTO ((struct parse *, jrefproto, int, int, int, int));
-void indent PROTO ((int));
-
-/* route.c */
-void add_route_direct PROTO ((struct interface_info *, struct in_addr));
-void add_route_net PROTO ((struct interface_info *, struct in_addr,
- struct in_addr));
-void add_route_default_gateway PROTO ((struct interface_info *,
- struct in_addr));
-void remove_routes PROTO ((struct in_addr));
-void remove_if_route PROTO ((struct interface_info *, struct in_addr));
-void remove_all_if_routes PROTO ((struct interface_info *));
-void set_netmask PROTO ((struct interface_info *, struct in_addr));
-void set_broadcast_addr PROTO ((struct interface_info *, struct in_addr));
-void set_ip_address PROTO ((struct interface_info *, struct in_addr));
-
-/* clparse.c */
-isc_result_t read_client_conf PROTO ((void));
-int read_client_conf_file (const char *,
- struct interface_info *, struct client_config *);
-void read_client_leases PROTO ((void));
-void parse_client_statement PROTO ((struct parse *, struct interface_info *,
- struct client_config *));
-int parse_X PROTO ((struct parse *, u_int8_t *, unsigned));
-void parse_option_list PROTO ((struct parse *, u_int32_t **));
-void parse_interface_declaration PROTO ((struct parse *,
- struct client_config *, char *));
-int interface_or_dummy PROTO ((struct interface_info **, const char *));
-void make_client_state PROTO ((struct client_state **));
-void make_client_config PROTO ((struct client_state *,
- struct client_config *));
-void parse_client_lease_statement PROTO ((struct parse *, int));
-void parse_client_lease_declaration PROTO ((struct parse *,
- struct client_lease *,
- struct interface_info **,
- struct client_state **));
-int parse_option_decl PROTO ((struct option_cache **, struct parse *));
-void parse_string_list PROTO ((struct parse *, struct string_list **, int));
-int parse_ip_addr PROTO ((struct parse *, struct iaddr *));
-void parse_reject_statement PROTO ((struct parse *, struct client_config *));
-
-/* dhcrelay.c */
-void relay PROTO ((struct interface_info *, struct dhcp_packet *, unsigned,
- unsigned int, struct iaddr, struct hardware *));
-int strip_relay_agent_options PROTO ((struct interface_info *,
- struct interface_info **,
- struct dhcp_packet *, unsigned));
-int find_interface_by_agent_option PROTO ((struct dhcp_packet *,
- struct interface_info **,
- u_int8_t *, int));
-int add_relay_agent_options PROTO ((struct interface_info *,
- struct dhcp_packet *,
- unsigned, struct in_addr));
-
-/* icmp.c */
-OMAPI_OBJECT_ALLOC_DECL (icmp_state, struct icmp_state, dhcp_type_icmp)
-extern struct icmp_state *icmp_state;
-void icmp_startup PROTO ((int, void (*) PROTO ((struct iaddr,
- u_int8_t *, int))));
-int icmp_readsocket PROTO ((omapi_object_t *));
-int icmp_echorequest PROTO ((struct iaddr *));
-isc_result_t icmp_echoreply PROTO ((omapi_object_t *));
-
-/* dns.c */
-#if defined (NSUPDATE)
-isc_result_t find_tsig_key (ns_tsig_key **, const char *, struct dns_zone *);
-void tkey_free (ns_tsig_key **);
-#endif
-isc_result_t enter_dns_zone (struct dns_zone *);
-isc_result_t dns_zone_lookup (struct dns_zone **, const char *);
-int dns_zone_dereference PROTO ((struct dns_zone **, const char *, int));
-#if defined (NSUPDATE)
-isc_result_t find_cached_zone (const char *, ns_class, char *,
- size_t, struct in_addr *, int, int *,
- struct dns_zone **);
-void forget_zone (struct dns_zone **);
-void repudiate_zone (struct dns_zone **);
-void cache_found_zone (ns_class, char *, struct in_addr *, int);
-int get_dhcid (struct data_string *, int, const u_int8_t *, unsigned);
-isc_result_t ddns_update_a (struct data_string *, struct iaddr,
- struct data_string *, unsigned long, int);
-isc_result_t ddns_remove_a (struct data_string *,
- struct iaddr, struct data_string *);
-#endif /* NSUPDATE */
-
-/* resolv.c */
-extern char path_resolv_conf [];
-struct name_server *name_servers;
-struct domain_search_list *domains;
-
-void read_resolv_conf PROTO ((TIME));
-struct name_server *first_name_server PROTO ((void));
-
-/* inet_addr.c */
-#ifdef NEED_INET_ATON
-int inet_aton PROTO ((const char *, struct in_addr *));
-#endif
-
-/* class.c */
-extern int have_billing_classes;
-struct class unknown_class;
-struct class known_class;
-struct collection default_collection;
-struct collection *collections;
-struct executable_statement *default_classification_rules;
-
-void classification_setup PROTO ((void));
-void classify_client PROTO ((struct packet *));
-int check_collection PROTO ((struct packet *, struct lease *,
- struct collection *));
-void classify PROTO ((struct packet *, struct class *));
-isc_result_t find_class PROTO ((struct class **, const char *,
- const char *, int));
-int unbill_class PROTO ((struct lease *, struct class *));
-int bill_class PROTO ((struct lease *, struct class *));
-
-/* execute.c */
-int execute_statements PROTO ((struct binding_value **result,
- struct packet *, struct lease *,
- struct client_state *,
- struct option_state *, struct option_state *,
- struct binding_scope **,
- struct executable_statement *));
-void execute_statements_in_scope PROTO ((struct binding_value **result,
- struct packet *, struct lease *,
- struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct group *, struct group *));
-int executable_statement_dereference PROTO ((struct executable_statement **,
- const char *, int));
-void write_statements (FILE *, struct executable_statement *, int);
-int find_matching_case (struct executable_statement **,
- struct packet *, struct lease *, struct client_state *,
- struct option_state *, struct option_state *,
- struct binding_scope **,
- struct expression *, struct executable_statement *);
-int executable_statement_foreach (struct executable_statement *,
- int (*) (struct executable_statement *,
- void *, int), void *, int);
-
-/* comapi.c */
-extern omapi_object_type_t *dhcp_type_interface;
-extern omapi_object_type_t *dhcp_type_group;
-extern omapi_object_type_t *dhcp_type_shared_network;
-extern omapi_object_type_t *dhcp_type_subnet;
-extern omapi_object_type_t *dhcp_type_control;
-extern dhcp_control_object_t *dhcp_control_object;
-
-void dhcp_common_objects_setup (void);
-
-isc_result_t dhcp_group_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t dhcp_group_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t dhcp_group_destroy (omapi_object_t *, const char *, int);
-isc_result_t dhcp_group_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t dhcp_group_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_group_lookup (omapi_object_t **,
- omapi_object_t *, omapi_object_t *);
-isc_result_t dhcp_group_create (omapi_object_t **,
- omapi_object_t *);
-isc_result_t dhcp_group_remove (omapi_object_t *,
- omapi_object_t *);
-
-isc_result_t dhcp_control_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t dhcp_control_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t dhcp_control_destroy (omapi_object_t *, const char *, int);
-isc_result_t dhcp_control_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t dhcp_control_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_control_lookup (omapi_object_t **,
- omapi_object_t *, omapi_object_t *);
-isc_result_t dhcp_control_create (omapi_object_t **,
- omapi_object_t *);
-isc_result_t dhcp_control_remove (omapi_object_t *,
- omapi_object_t *);
-
-isc_result_t dhcp_subnet_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t dhcp_subnet_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t dhcp_subnet_destroy (omapi_object_t *, const char *, int);
-isc_result_t dhcp_subnet_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t dhcp_subnet_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_subnet_lookup (omapi_object_t **,
- omapi_object_t *, omapi_object_t *);
-isc_result_t dhcp_subnet_create (omapi_object_t **,
- omapi_object_t *);
-isc_result_t dhcp_subnet_remove (omapi_object_t *,
- omapi_object_t *);
-
-isc_result_t dhcp_shared_network_set_value (omapi_object_t *,
- omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t dhcp_shared_network_get_value (omapi_object_t *,
- omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t dhcp_shared_network_destroy (omapi_object_t *, const char *, int);
-isc_result_t dhcp_shared_network_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t dhcp_shared_network_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_shared_network_lookup (omapi_object_t **,
- omapi_object_t *, omapi_object_t *);
-isc_result_t dhcp_shared_network_create (omapi_object_t **,
- omapi_object_t *);
-isc_result_t dhcp_shared_network_remove (omapi_object_t *,
- omapi_object_t *);
-
-/* omapi.c */
-extern int (*dhcp_interface_shutdown_hook) (struct interface_info *);
-
-extern omapi_object_type_t *dhcp_type_lease;
-extern omapi_object_type_t *dhcp_type_pool;
-extern omapi_object_type_t *dhcp_type_class;
-
-#if defined (FAILOVER_PROTOCOL)
-extern omapi_object_type_t *dhcp_type_failover_state;
-extern omapi_object_type_t *dhcp_type_failover_link;
-extern omapi_object_type_t *dhcp_type_failover_listener;
-#endif
-
-void dhcp_db_objects_setup (void);
-
-isc_result_t dhcp_lease_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t dhcp_lease_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t dhcp_lease_destroy (omapi_object_t *, const char *, int);
-isc_result_t dhcp_lease_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t dhcp_lease_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_lease_lookup (omapi_object_t **,
- omapi_object_t *, omapi_object_t *);
-isc_result_t dhcp_lease_create (omapi_object_t **,
- omapi_object_t *);
-isc_result_t dhcp_lease_remove (omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_group_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t dhcp_group_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t dhcp_group_destroy (omapi_object_t *, const char *, int);
-isc_result_t dhcp_group_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t dhcp_group_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_group_lookup (omapi_object_t **,
- omapi_object_t *, omapi_object_t *);
-isc_result_t dhcp_group_create (omapi_object_t **,
- omapi_object_t *);
-isc_result_t dhcp_group_remove (omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_host_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t dhcp_host_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t dhcp_host_destroy (omapi_object_t *, const char *, int);
-isc_result_t dhcp_host_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t dhcp_host_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_host_lookup (omapi_object_t **,
- omapi_object_t *, omapi_object_t *);
-isc_result_t dhcp_host_create (omapi_object_t **,
- omapi_object_t *);
-isc_result_t dhcp_host_remove (omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_pool_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t dhcp_pool_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t dhcp_pool_destroy (omapi_object_t *, const char *, int);
-isc_result_t dhcp_pool_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t dhcp_pool_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_pool_lookup (omapi_object_t **,
- omapi_object_t *, omapi_object_t *);
-isc_result_t dhcp_pool_create (omapi_object_t **,
- omapi_object_t *);
-isc_result_t dhcp_pool_remove (omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_class_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t dhcp_class_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t dhcp_class_destroy (omapi_object_t *, const char *, int);
-isc_result_t dhcp_class_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t dhcp_class_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_class_lookup (omapi_object_t **,
- omapi_object_t *, omapi_object_t *);
-isc_result_t dhcp_class_create (omapi_object_t **,
- omapi_object_t *);
-isc_result_t dhcp_class_remove (omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_subclass_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t dhcp_subclass_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t dhcp_subclass_destroy (omapi_object_t *, const char *, int);
-isc_result_t dhcp_subclass_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t dhcp_subclass_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_subclass_lookup (omapi_object_t **,
- omapi_object_t *, omapi_object_t *);
-isc_result_t dhcp_subclass_create (omapi_object_t **,
- omapi_object_t *);
-isc_result_t dhcp_subclass_remove (omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_shared_network_set_value (omapi_object_t *,
- omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t dhcp_shared_network_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t dhcp_shared_network_destroy (omapi_object_t *, const char *, int);
-isc_result_t dhcp_shared_network_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t dhcp_shared_network_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_shared_network_lookup (omapi_object_t **,
- omapi_object_t *, omapi_object_t *);
-isc_result_t dhcp_shared_network_create (omapi_object_t **,
- omapi_object_t *);
-isc_result_t dhcp_subnet_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t dhcp_subnet_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t dhcp_subnet_destroy (omapi_object_t *, const char *, int);
-isc_result_t dhcp_subnet_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t dhcp_subnet_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_subnet_lookup (omapi_object_t **,
- omapi_object_t *, omapi_object_t *);
-isc_result_t dhcp_subnet_create (omapi_object_t **,
- omapi_object_t *);
-isc_result_t dhcp_interface_set_value (omapi_object_t *,
- omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t dhcp_interface_get_value (omapi_object_t *,
- omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t dhcp_interface_destroy (omapi_object_t *,
- const char *, int);
-isc_result_t dhcp_interface_signal_handler (omapi_object_t *,
- const char *,
- va_list ap);
-isc_result_t dhcp_interface_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_interface_lookup (omapi_object_t **,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_interface_create (omapi_object_t **,
- omapi_object_t *);
-isc_result_t dhcp_interface_remove (omapi_object_t *,
- omapi_object_t *);
-void interface_stash (struct interface_info *);
-void interface_snorf (struct interface_info *, int);
-
-isc_result_t binding_scope_set_value (struct binding_scope *, int,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t binding_scope_get_value (omapi_value_t **,
- struct binding_scope *,
- omapi_data_string_t *);
-isc_result_t binding_scope_stuff_values (omapi_object_t *,
- struct binding_scope *);
-
-/* mdb.c */
-
-extern struct subnet *subnets;
-extern struct shared_network *shared_networks;
-extern host_hash_t *host_hw_addr_hash;
-extern host_hash_t *host_uid_hash;
-extern host_hash_t *host_name_hash;
-extern lease_hash_t *lease_uid_hash;
-extern lease_hash_t *lease_ip_addr_hash;
-extern lease_hash_t *lease_hw_addr_hash;
-
-extern omapi_object_type_t *dhcp_type_host;
-
-isc_result_t enter_host PROTO ((struct host_decl *, int, int));
-isc_result_t delete_host PROTO ((struct host_decl *, int));
-int find_hosts_by_haddr PROTO ((struct host_decl **, int,
- const unsigned char *, unsigned,
- const char *, int));
-int find_hosts_by_uid PROTO ((struct host_decl **, const unsigned char *,
- unsigned, const char *, int));
-int find_host_for_network PROTO ((struct subnet **, struct host_decl **,
- struct iaddr *, struct shared_network *));
-void new_address_range PROTO ((struct parse *, struct iaddr, struct iaddr,
- struct subnet *, struct pool *,
- struct lease **));
-isc_result_t dhcp_lease_free (omapi_object_t *, const char *, int);
-isc_result_t dhcp_lease_get (omapi_object_t **, const char *, int);
-int find_grouped_subnet PROTO ((struct subnet **, struct shared_network *,
- struct iaddr, const char *, int));
-int find_subnet (struct subnet **, struct iaddr, const char *, int);
-void enter_shared_network PROTO ((struct shared_network *));
-void new_shared_network_interface PROTO ((struct parse *,
- struct shared_network *,
- const char *));
-int subnet_inner_than PROTO ((struct subnet *, struct subnet *, int));
-void enter_subnet PROTO ((struct subnet *));
-void enter_lease PROTO ((struct lease *));
-int supersede_lease PROTO ((struct lease *, struct lease *, int, int, int));
-void make_binding_state_transition (struct lease *);
-int lease_copy PROTO ((struct lease **, struct lease *, const char *, int));
-void release_lease PROTO ((struct lease *, struct packet *));
-void abandon_lease PROTO ((struct lease *, const char *));
-void dissociate_lease PROTO ((struct lease *));
-void pool_timer PROTO ((void *));
-int find_lease_by_uid PROTO ((struct lease **, const unsigned char *,
- unsigned, const char *, int));
-int find_lease_by_hw_addr PROTO ((struct lease **, const unsigned char *,
- unsigned, const char *, int));
-int find_lease_by_ip_addr PROTO ((struct lease **, struct iaddr,
- const char *, int));
-void uid_hash_add PROTO ((struct lease *));
-void uid_hash_delete PROTO ((struct lease *));
-void hw_hash_add PROTO ((struct lease *));
-void hw_hash_delete PROTO ((struct lease *));
-int write_leases PROTO ((void));
-int lease_enqueue (struct lease *);
-void lease_instantiate (const unsigned char *, unsigned, struct lease *);
-void expire_all_pools PROTO ((void));
-void dump_subnets PROTO ((void));
-#if defined (DEBUG_MEMORY_LEAKAGE) || \
- defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
-void free_everything (void);
-#endif
-
-/* nsupdate.c */
-char *ddns_rev_name (struct lease *, struct lease_state *, struct packet *);
-char *ddns_fwd_name (struct lease *, struct lease_state *, struct packet *);
-int nsupdateA (const char *, const unsigned char *, u_int32_t, int);
-int nsupdatePTR (const char *, const unsigned char *, u_int32_t, int);
-void nsupdate (struct lease *, struct lease_state *, struct packet *, int);
-int updateA (const struct data_string *, const struct data_string *,
- unsigned int, struct lease *);
-int updatePTR (const struct data_string *, const struct data_string *,
- unsigned int, struct lease *);
-int deleteA (const struct data_string *, const struct data_string *,
- struct lease *);
-int deletePTR (const struct data_string *, const struct data_string *,
- struct lease *);
-
-/* failover.c */
-#if defined (FAILOVER_PROTOCOL)
-extern dhcp_failover_state_t *failover_states;
-void dhcp_failover_startup PROTO ((void));
-int dhcp_failover_write_all_states (void);
-isc_result_t enter_failover_peer PROTO ((dhcp_failover_state_t *));
-isc_result_t find_failover_peer PROTO ((dhcp_failover_state_t **,
- const char *, const char *, int));
-isc_result_t dhcp_failover_link_initiate PROTO ((omapi_object_t *));
-isc_result_t dhcp_failover_link_signal PROTO ((omapi_object_t *,
- const char *, va_list));
-isc_result_t dhcp_failover_link_set_value PROTO ((omapi_object_t *,
- omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *));
-isc_result_t dhcp_failover_link_get_value PROTO ((omapi_object_t *,
- omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **));
-isc_result_t dhcp_failover_link_destroy PROTO ((omapi_object_t *,
- const char *, int));
-isc_result_t dhcp_failover_link_stuff_values PROTO ((omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *));
-isc_result_t dhcp_failover_listen PROTO ((omapi_object_t *));
-
-isc_result_t dhcp_failover_listener_signal PROTO ((omapi_object_t *,
- const char *,
- va_list));
-isc_result_t dhcp_failover_listener_set_value PROTO ((omapi_object_t *,
- omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *));
-isc_result_t dhcp_failover_listener_get_value PROTO ((omapi_object_t *,
- omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **));
-isc_result_t dhcp_failover_listener_destroy PROTO ((omapi_object_t *,
- const char *, int));
-isc_result_t dhcp_failover_listener_stuff PROTO ((omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *));
-isc_result_t dhcp_failover_register PROTO ((omapi_object_t *));
-isc_result_t dhcp_failover_state_signal PROTO ((omapi_object_t *,
- const char *, va_list));
-isc_result_t dhcp_failover_state_transition (dhcp_failover_state_t *,
- const char *);
-isc_result_t dhcp_failover_set_service_state (dhcp_failover_state_t *state);
-isc_result_t dhcp_failover_set_state (dhcp_failover_state_t *,
- enum failover_state);
-isc_result_t dhcp_failover_peer_state_changed (dhcp_failover_state_t *,
- failover_message_t *);
-int dhcp_failover_pool_rebalance (dhcp_failover_state_t *);
-int dhcp_failover_pool_check (struct pool *);
-int dhcp_failover_state_pool_check (dhcp_failover_state_t *);
-void dhcp_failover_timeout (void *);
-void dhcp_failover_send_contact (void *);
-isc_result_t dhcp_failover_send_state (dhcp_failover_state_t *);
-isc_result_t dhcp_failover_send_updates (dhcp_failover_state_t *);
-int dhcp_failover_queue_update (struct lease *, int);
-int dhcp_failover_send_acks (dhcp_failover_state_t *);
-void dhcp_failover_toack_queue_timeout (void *);
-int dhcp_failover_queue_ack (dhcp_failover_state_t *, failover_message_t *msg);
-void dhcp_failover_ack_queue_remove (dhcp_failover_state_t *, struct lease *);
-isc_result_t dhcp_failover_state_set_value PROTO ((omapi_object_t *,
- omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *));
-void dhcp_failover_keepalive (void *);
-void dhcp_failover_reconnect (void *);
-void dhcp_failover_startup_timeout (void *);
-void dhcp_failover_link_startup_timeout (void *);
-void dhcp_failover_listener_restart (void *);
-isc_result_t dhcp_failover_state_get_value PROTO ((omapi_object_t *,
- omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **));
-isc_result_t dhcp_failover_state_destroy PROTO ((omapi_object_t *,
- const char *, int));
-isc_result_t dhcp_failover_state_stuff PROTO ((omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *));
-isc_result_t dhcp_failover_state_lookup PROTO ((omapi_object_t **,
- omapi_object_t *,
- omapi_object_t *));
-isc_result_t dhcp_failover_state_create PROTO ((omapi_object_t **,
- omapi_object_t *));
-isc_result_t dhcp_failover_state_remove PROTO ((omapi_object_t *,
- omapi_object_t *));
-int dhcp_failover_state_match (dhcp_failover_state_t *, u_int8_t *, unsigned);
-const char *dhcp_failover_reject_reason_print (int);
-const char *dhcp_failover_state_name_print (enum failover_state);
-const char *dhcp_failover_message_name (unsigned);
-const char *dhcp_failover_option_name (unsigned);
-failover_option_t *dhcp_failover_option_printf (unsigned, char *,
- unsigned *,
- unsigned,
- const char *, ...)
- __attribute__((__format__(__printf__,5,6)));
-failover_option_t *dhcp_failover_make_option (unsigned, char *,
- unsigned *, unsigned, ...);
-isc_result_t dhcp_failover_put_message (dhcp_failover_link_t *,
- omapi_object_t *, int, ...);
-isc_result_t dhcp_failover_send_connect PROTO ((omapi_object_t *));
-isc_result_t dhcp_failover_send_connectack PROTO ((omapi_object_t *,
- dhcp_failover_state_t *,
- int, const char *));
-isc_result_t dhcp_failover_send_disconnect PROTO ((omapi_object_t *,
- int, const char *));
-isc_result_t dhcp_failover_send_bind_update (dhcp_failover_state_t *,
- struct lease *);
-isc_result_t dhcp_failover_send_bind_ack (dhcp_failover_state_t *,
- failover_message_t *,
- int, const char *);
-isc_result_t dhcp_failover_send_poolreq (dhcp_failover_state_t *);
-isc_result_t dhcp_failover_send_poolresp (dhcp_failover_state_t *, int);
-isc_result_t dhcp_failover_send_update_request (dhcp_failover_state_t *);
-isc_result_t dhcp_failover_send_update_request_all (dhcp_failover_state_t *);
-isc_result_t dhcp_failover_send_update_done (dhcp_failover_state_t *);
-isc_result_t dhcp_failover_process_bind_update (dhcp_failover_state_t *,
- failover_message_t *);
-isc_result_t dhcp_failover_process_bind_ack (dhcp_failover_state_t *,
- failover_message_t *);
-isc_result_t dhcp_failover_generate_update_queue (dhcp_failover_state_t *,
- int);
-isc_result_t dhcp_failover_process_update_request (dhcp_failover_state_t *,
- failover_message_t *);
-isc_result_t dhcp_failover_process_update_request_all (dhcp_failover_state_t *,
- failover_message_t *);
-isc_result_t dhcp_failover_process_update_done (dhcp_failover_state_t *,
- failover_message_t *);
-void dhcp_failover_recover_done (void *);
-void failover_print PROTO ((char *, unsigned *, unsigned, const char *));
-void update_partner PROTO ((struct lease *));
-int load_balance_mine (struct packet *, dhcp_failover_state_t *);
-binding_state_t normal_binding_state_transition_check (struct lease *,
- dhcp_failover_state_t *,
- binding_state_t,
- u_int32_t);
-binding_state_t
-conflict_binding_state_transition_check (struct lease *,
- dhcp_failover_state_t *,
- binding_state_t, u_int32_t);
-int lease_mine_to_reallocate (struct lease *);
-
-OMAPI_OBJECT_ALLOC_DECL (dhcp_failover_state, dhcp_failover_state_t,
- dhcp_type_failover_state)
-OMAPI_OBJECT_ALLOC_DECL (dhcp_failover_listener, dhcp_failover_listener_t,
- dhcp_type_failover_listener)
-OMAPI_OBJECT_ALLOC_DECL (dhcp_failover_link, dhcp_failover_link_t,
- dhcp_type_failover_link)
-#endif /* FAILOVER_PROTOCOL */
-
-const char *binding_state_print (enum failover_state);
diff --git a/contrib/isc-dhcp/includes/dhctoken.h b/contrib/isc-dhcp/includes/dhctoken.h
deleted file mode 100644
index 6c53a6a..0000000
--- a/contrib/isc-dhcp/includes/dhctoken.h
+++ /dev/null
@@ -1,316 +0,0 @@
-/* dhctoken.h
-
- Tokens for config file lexer and parser. */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1996-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software has been written for Internet Systems Consortium
- * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about Internet Systems Consortium, see
- * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
- * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
- * ``http://www.nominum.com''.
- */
-
-enum dhcp_token {
- SEMI = ';',
- DOT = '.',
- COLON = ':',
- COMMA = ',',
- SLASH = '/',
- LBRACE = '{',
- RBRACE = '}',
- LPAREN = '(',
- RPAREN = ')',
- EQUAL = '=',
- BANG = '!',
- PERCENT = '%',
- PLUS = '+',
- MINUS = '-',
- ASTERISK = '*',
- AMPERSAND = '&',
- PIPE = '|',
- CARET = '^',
-
- HOST = 256,
- FIRST_TOKEN = HOST,
- HARDWARE = 257,
- FILENAME = 258,
- FIXED_ADDR = 259,
- OPTION = 260,
- ETHERNET = 261,
- STRING = 262,
- NUMBER = 263,
- NUMBER_OR_NAME = 264,
- NAME = 265,
- TIMESTAMP = 266,
- STARTS = 267,
- ENDS = 268,
- UID = 269,
- CLASS = 270,
- LEASE = 271,
- RANGE = 272,
- PACKET = 273,
- CIADDR = 274,
- YIADDR = 275,
- SIADDR = 276,
- GIADDR = 277,
- SUBNET = 278,
- NETMASK = 279,
- DEFAULT_LEASE_TIME = 280,
- MAX_LEASE_TIME = 281,
- VENDOR_CLASS = 282,
- USER_CLASS = 283,
- SHARED_NETWORK = 284,
- SERVER_NAME = 285,
- DYNAMIC_BOOTP = 286,
- SERVER_IDENTIFIER = 287,
- DYNAMIC_BOOTP_LEASE_CUTOFF = 288,
- DYNAMIC_BOOTP_LEASE_LENGTH = 289,
- BOOT_UNKNOWN_CLIENTS = 290,
- NEXT_SERVER = 291,
- TOKEN_RING = 292,
- GROUP = 293,
- ONE_LEASE_PER_CLIENT = 294,
- GET_LEASE_HOSTNAMES = 295,
- USE_HOST_DECL_NAMES = 296,
- SEND = 297,
- CLIENT_IDENTIFIER = 298,
- REQUEST = 299,
- REQUIRE = 300,
- TIMEOUT = 301,
- RETRY = 302,
- SELECT_TIMEOUT = 303,
- SCRIPT = 304,
- INTERFACE = 305,
- RENEW = 306,
- REBIND = 307,
- EXPIRE = 308,
- UNKNOWN_CLIENTS = 309,
- ALLOW = 310,
- DENY = 312,
- BOOTING = 313,
- DEFAULT = 314,
- MEDIA = 315,
- MEDIUM = 316,
- ALIAS = 317,
- REBOOT = 318,
- TOKEN_ABANDONED = 319,
- BACKOFF_CUTOFF = 320,
- INITIAL_INTERVAL = 321,
- NAMESERVER = 322,
- DOMAIN = 323,
- SEARCH = 324,
- SUPERSEDE = 325,
- APPEND = 326,
- PREPEND = 327,
- HOSTNAME = 328,
- CLIENT_HOSTNAME = 329,
- REJECT = 330,
- USE_LEASE_ADDR_FOR_DEFAULT_ROUTE = 331,
- MIN_LEASE_TIME = 332,
- MIN_SECS = 333,
- AND = 334,
- OR = 335,
- SUBSTRING = 337,
- SUFFIX = 338,
- CHECK = 339,
- EXTRACT_INT = 340,
- IF = 341,
- TOKEN_ADD = 342,
- BREAK = 343,
- ELSE = 344,
- ELSIF = 345,
- SUBCLASS = 346,
- MATCH = 347,
- SPAWN = 348,
- WITH = 349,
- EXISTS = 350,
- POOL = 351,
- UNKNOWN = 352,
- CLIENTS = 353,
- KNOWN = 354,
- AUTHENTICATED = 355,
- UNAUTHENTICATED = 356,
- ALL = 357,
- DYNAMIC = 358,
- MEMBERS = 359,
- OF = 360,
- PSEUDO = 361,
- LIMIT = 362,
- BILLING = 363,
- PEER = 364,
- FAILOVER = 365,
- MY = 366,
- PARTNER = 367,
- PRIMARY = 368,
- SECONDARY = 369,
- IDENTIFIER = 370,
- PORT = 371,
- MAX_TRANSMIT_IDLE = 372,
- MAX_RESPONSE_DELAY = 373,
- PARTNER_DOWN = 374,
- NORMAL = 375,
- COMMUNICATIONS_INTERRUPTED = 376,
- POTENTIAL_CONFLICT = 377,
- RECOVER = 378,
- FDDI = 379,
- AUTHORITATIVE = 380,
- TOKEN_NOT = 381,
- AUTHENTICATION = 383,
- IGNORE = 384,
- ACCEPT = 385,
- PREFER = 386,
- DONT = 387,
- CODE = 388,
- ARRAY = 389,
- BOOLEAN = 390,
- INTEGER = 391,
- SIGNED = 392,
- UNSIGNED = 393,
- IP_ADDRESS = 394,
- TEXT = 395,
- STRING_TOKEN = 396,
- SPACE = 397,
- CONCAT = 398,
- ENCODE_INT = 399,
- REVERSE = 402,
- LEASED_ADDRESS = 403,
- BINARY_TO_ASCII = 404,
- PICK = 405,
- CONFIG_OPTION = 406,
- HOST_DECL_NAME = 407,
- ON = 408,
- EXPIRY = 409,
- RELEASE = 410,
- COMMIT = 411,
- DNS_UPDATE = 412,
- LEASE_TIME = 413,
- STATIC = 414,
- NEVER = 415,
- INFINITE = 416,
- TOKEN_DELETED = 417,
- UPDATED_DNS_RR = 418,
- DNS_DELETE = 419,
- DUPLICATES = 420,
- DECLINES = 421,
- TSTP = 422,
- TSFP = 423,
- OWNER = 424,
- IS = 425,
- HBA = 426,
- MAX_UNACKED_UPDATES = 427,
- MCLT = 428,
- SPLIT = 429,
- AT = 430,
- NO = 431,
- TOKEN_DELETE = 432,
- NS_UPDATE = 433,
- UPDATE = 434,
- SWITCH = 435,
- CASE = 436,
- NS_FORMERR = 437,
- NS_NOERROR = 438,
- NS_NOTAUTH = 439,
- NS_NOTIMP = 440,
- NS_NOTZONE = 441,
- NS_NXDOMAIN = 442,
- NS_NXRRSET = 443,
- NS_REFUSED = 444,
- NS_SERVFAIL = 445,
- NS_YXDOMAIN = 446,
- NS_YXRRSET = 447,
- TOKEN_NULL = 448,
- TOKEN_SET = 449,
- DEFINED = 450,
- UNSET = 451,
- EVAL = 452,
- LET = 453,
- FUNCTION = 454,
- DEFINE = 455,
- ZONE = 456,
- KEY = 457,
- SECRET = 458,
- ALGORITHM = 459,
- LOAD = 460,
- BALANCE = 461,
- TOKEN_MAX = 462,
- SECONDS = 463,
- ADDRESS = 464,
- RESOLUTION_INTERRUPTED = 465,
- STATE = 466,
- UNKNOWN_STATE = 567,
- CLTT = 568,
- INCLUDE = 569,
- BINDING = 570,
- TOKEN_FREE = 571,
- TOKEN_ACTIVE = 572,
- TOKEN_EXPIRED = 573,
- TOKEN_RELEASED = 574,
- TOKEN_RESET = 575,
- TOKEN_BACKUP = 576,
- TOKEN_RESERVED = 577,
- TOKEN_BOOTP = 578,
- TOKEN_NEXT = 579,
- OMAPI = 580,
- LOG = 581,
- FATAL = 582,
- ERROR = 583,
- TOKEN_DEBUG = 584,
- INFO = 585,
- RETURN = 586,
- PAUSED = 587,
- RECOVER_DONE = 588,
- SHUTDOWN = 589,
- STARTUP = 590,
- ENCAPSULATE = 591,
- VENDOR = 592,
- CLIENT_STATE = 593,
- INIT_REBOOT = 594,
- TOKEN_INIT = 595,
- SELECT = 596,
- BOUND = 597,
- RENEWING = 598,
- REBINDING = 599,
- RECONTACT_INTERVAL = 600,
- CLIENT_UPDATES = 601,
- TOKEN_NEW = 601,
- TRANSMISSION = 602,
- TOKEN_CLOSE = 603,
- TOKEN_CREATE = 604,
- TOKEN_OPEN = 605,
- TOKEN_HELP = 606,
- END_OF_FILE = 607,
- RECOVER_WAIT = 608,
- SERVER = 609,
- CONNECT = 610,
- REMOVE = 611,
- REFRESH = 612,
- DOMAIN_NAME = 613,
- DO_FORWARD_UPDATE = 614
-};
-
-#define is_identifier(x) ((x) >= FIRST_TOKEN && \
- (x) != STRING && \
- (x) != NUMBER && \
- (x) != END_OF_FILE)
diff --git a/contrib/isc-dhcp/includes/failover.h b/contrib/isc-dhcp/includes/failover.h
deleted file mode 100644
index 2fd880d..0000000
--- a/contrib/isc-dhcp/includes/failover.h
+++ /dev/null
@@ -1,313 +0,0 @@
-/* failover.h
-
- Definitions for address trees... */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 2000-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software has been written for Internet Systems Consortium
- * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about Internet Systems Consortium, see
- * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
- * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
- * ``http://www.nominum.com''.
- */
-
-#if defined (FAILOVER_PROTOCOL)
-struct failover_option_info {
- int code;
- const char *name;
- enum { FT_UINT8, FT_IPADDR, FT_UINT32, FT_BYTES, FT_TEXT_OR_BYTES,
- FT_DDNS, FT_DDNS1, FT_UINT16, FT_TEXT,
- FT_UNDEF, FT_DIGEST } type;
- int num_present;
- int offset;
- u_int32_t bit;
-};
-
-typedef struct {
- unsigned count;
- u_int8_t *data;
-} failover_option_t;
-
-#define FM_OFFSET(x) (long)(&(((failover_message_t *)0) -> x))
-
-/* Failover message options: */
-#define FTO_BINDING_STATUS 1
-#define FTB_BINDING_STATUS 0x00000002
-#define FTO_ASSIGNED_IP_ADDRESS 2
-#define FTB_ASSIGNED_IP_ADDRESS 0x00000004
-#define FTO_SERVER_ADDR 3
-#define FTB_SERVER_ADDR 0x00000008
-#define FTO_ADDRESSES_TRANSFERRED 4
-#define FTB_ADDRESSES_TRANSFERRED 0x00000010
-#define FTO_CLIENT_IDENTIFIER 5
-#define FTB_CLIENT_IDENTIFIER 0x00000020
-#define FTO_CHADDR 6
-#define FTB_CHADDR 0x00000040
-#define FTO_DDNS 7
-#define FTB_DDNS 0x00000080
-#define FTO_REJECT_REASON 8
-#define FTB_REJECT_REASON 0x00000100
-#define FTO_MESSAGE 9
-#define FTB_MESSAGE 0x00000200
-#define FTO_MCLT 10
-#define FTB_MCLT 0x00000400
-#define FTO_VENDOR_CLASS 11
-#define FTB_VENDOR_CLASS 0x00000800
-#define FTO_LEASE_EXPIRY 13
-#define FTB_LEASE_EXPIRY 0x00002000
-#define FTO_POTENTIAL_EXPIRY 14
-#define FTB_POTENTIAL_EXPIRY 0x00004000
-#define FTO_GRACE_EXPIRY 15
-#define FTB_GRACE_EXPIRY 0x00008000
-#define FTO_CLTT 16
-#define FTB_CLTT 0x00010000
-#define FTO_STOS 17
-#define FTB_STOS 0x00020000
-#define FTO_SERVER_STATE 18
-#define FTB_SERVER_STATE 0x00040000
-#define FTO_SERVER_FLAGS 19
-#define FTB_SERVER_FLAGS 0x00080000
-#define FTO_VENDOR_OPTIONS 20
-#define FTB_VENDOR_OPTIONS 0x00100000
-#define FTO_MAX_UNACKED 21
-#define FTB_MAX_UNACKED 0x00200000
-#define FTO_RECEIVE_TIMER 23
-#define FTB_RECEIVE_TIMER 0x00800000
-#define FTO_HBA 24
-#define FTB_HBA 0x01000000
-#define FTO_MESSAGE_DIGEST 25
-#define FTB_MESSAGE_DIGEST 0x02000000
-#define FTO_PROTOCOL_VERSION 26
-#define FTB_PROTOCOL_VERSION 0x04000000
-#define FTO_TLS_REQUEST 27
-#define FTB_TLS_REQUEST 0x08000000
-#define FTO_TLS_REPLY 28
-#define FTB_TLS_REPLY 0x10000000
-#define FTO_REQUEST_OPTIONS 29
-#define FTB_REQUEST_OPTIONS 0x20000000
-#define FTO_REPLY_OPTIONS 30
-#define FTB_REPLY_OPTIONS 0x40000000
-#define FTO_MAX FTO_REPLY_OPTIONS
-
-/* Failover protocol message types: */
-#define FTM_POOLREQ 1
-#define FTM_POOLRESP 2
-#define FTM_BNDUPD 3
-#define FTM_BNDACK 4
-#define FTM_CONNECT 5
-#define FTM_CONNECTACK 6
-#define FTM_UPDREQ 7
-#define FTM_UPDDONE 8
-#define FTM_UPDREQALL 9
-#define FTM_STATE 10
-#define FTM_CONTACT 11
-#define FTM_DISCONNECT 12
-
-/* Reject reasons: */
-
-#define FTR_ILLEGAL_IP_ADDR 1
-#define FTR_FATAL_CONFLICT 2
-#define FTR_MISSING_BINDINFO 3
-#define FTR_TIMEMISMATCH 4
-#define FTR_INVALID_MCLT 5
-#define FTR_MISC_REJECT 6
-#define FTR_DUP_CONNECTION 7
-#define FTR_INVALID_PARTNER 8
-#define FTR_TLS_UNSUPPORTED 9
-#define FTR_TLS_UNCONFIGURED 10
-#define FTR_TLS_REQUIRED 11
-#define FTR_DIGEST_UNSUPPORTED 12
-#define FTR_DIGEST_UNCONFIGURED 13
-#define FTR_VERSION_MISMATCH 14
-#define FTR_MISSING_BIND_INFO 15
-#define FTR_OUTDATED_BIND_INFO 16
-#define FTR_LESS_CRIT_BIND_INFO 17
-#define FTR_NO_TRAFFIC 18
-#define FTR_HBA_CONFLICT 19
-#define FTR_UNKNOWN 254
-
-#define DHCP_FAILOVER_MAX_MESSAGE_SIZE 2048
-
-/* Failover server flags. */
-#define FTF_STARTUP 1
-
-typedef struct failover_message {
- int refcnt;
- struct failover_message *next;
-
- u_int8_t type;
-
- u_int8_t binding_status;
- u_int8_t protocol_version;
- u_int8_t reject_reason;
- u_int8_t server_flags;
- u_int8_t server_state;
- u_int8_t tls_reply;
- u_int8_t tls_request;
- u_int32_t stos;
- u_int32_t time;
- u_int32_t xid;
- u_int32_t addresses_transferred;
- u_int32_t assigned_addr;
- u_int32_t client_ltt;
- u_int32_t expiry;
- u_int32_t grace_expiry;
- u_int32_t max_unacked;
- u_int32_t mclt;
- u_int32_t potential_expiry;
- u_int32_t receive_timer;
- u_int32_t server_addr;
- failover_option_t chaddr;
- failover_option_t client_identifier;
- failover_option_t hba;
- failover_option_t message;
- failover_option_t reply_options;
- failover_option_t request_options;
- ddns_fqdn_t ddns;
- failover_option_t vendor_class;
- failover_option_t vendor_options;
-
- int options_present;
-} failover_message_t;
-
-typedef struct {
- OMAPI_OBJECT_PREAMBLE;
- struct option_cache *peer_address;
- unsigned peer_port;
- int options_present;
- enum dhcp_flink_state {
- dhcp_flink_start,
- dhcp_flink_message_length_wait,
- dhcp_flink_message_wait,
- dhcp_flink_disconnected,
- dhcp_flink_state_max
- } state;
- failover_message_t *imsg;
- struct _dhcp_failover_state *state_object;
- u_int16_t imsg_len;
- unsigned imsg_count;
- u_int8_t imsg_payoff; /* Pay*load* offset. :') */
- u_int32_t xid;
-} dhcp_failover_link_t;
-
-typedef struct _dhcp_failover_listener {
- OMAPI_OBJECT_PREAMBLE;
- struct _dhcp_failover_listener *next;
- omapi_addr_t address;
-} dhcp_failover_listener_t;
-#endif /* FAILOVER_PROTOCOL */
-
-/* A failover peer. */
-enum failover_state {
- unknown_state,
- partner_down,
- normal,
- communications_interrupted,
- resolution_interrupted,
- potential_conflict,
- recover,
- recover_done,
- shut_down,
- paused,
- startup,
- recover_wait
-};
-
-/* Service states are simplifications of failover states, particularly
- useful because the startup state isn't actually implementable as a
- seperate failover state without maintaining a state stack. */
-
-enum service_state {
- unknown_service_state,
- cooperating,
- not_cooperating,
- service_partner_down,
- not_responding,
- service_startup
-};
-
-#if defined (FAILOVER_PROTOCOL)
-typedef struct _dhcp_failover_config {
- struct option_cache *address;
- int port;
- u_int32_t max_flying_updates;
- enum failover_state state;
- TIME stos;
- u_int32_t max_response_delay;
-} dhcp_failover_config_t;
-
-typedef struct _dhcp_failover_state {
- OMAPI_OBJECT_PREAMBLE;
- struct _dhcp_failover_state *next;
- char *name; /* Name of this failover instance. */
- dhcp_failover_config_t me; /* My configuration. */
- dhcp_failover_config_t partner; /* Partner's configuration. */
- enum failover_state saved_state; /* Saved state during startup. */
- struct data_string server_identifier; /* Server identifier (IP addr) */
- u_int32_t mclt;
-
- u_int8_t *hba; /* Hash bucket array for load balancing. */
- int load_balance_max_secs;
-
- enum service_state service_state;
- const char *nrr; /* Printable reason why we're in the
- not_responding service state (empty
- string if we are responding. */
-
- dhcp_failover_link_t *link_to_peer; /* Currently-established link
- to peer. */
-
- enum {
- primary, secondary
- } i_am; /* We are primary or secondary in this relationship. */
-
- TIME last_packet_sent; /* Timestamp on last packet we sent. */
- TIME last_timestamp_received; /* The last timestamp we sent that
- has been returned by our partner. */
- TIME skew; /* The skew between our clock and our partner's. */
- struct lease *update_queue_head; /* List of leases we haven't sent
- to peer. */
- struct lease *update_queue_tail;
-
- struct lease *ack_queue_head; /* List of lease updates the peer
- hasn't yet acked. */
- struct lease *ack_queue_tail;
-
- struct lease *send_update_done; /* When we get a BNDACK for this
- lease, send an UPDDONE message. */
- int cur_unacked_updates; /* Number of updates we've sent
- that have not yet been acked. */
-
- /* List of messages which we haven't
- acked yet. */
- failover_message_t *toack_queue_head;
- failover_message_t *toack_queue_tail;
- int pending_acks; /* Number of messages in the toack
- queue. */
- int pool_count; /* Number of pools referencing this
- failover state object. */
-} dhcp_failover_state_t;
-
-#define DHCP_FAILOVER_VERSION 1
-#endif /* FAILOVER_PROTOCOL */
diff --git a/contrib/isc-dhcp/includes/inet.h b/contrib/isc-dhcp/includes/inet.h
deleted file mode 100644
index d037d78..0000000
--- a/contrib/isc-dhcp/includes/inet.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* inet.h
-
- Portable definitions for internet addresses */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1996-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software has been written for Internet Systems Consortium
- * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about Internet Systems Consortium, see
- * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
- * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
- * ``http://www.nominum.com''.
- */
-
-/* An internet address of up to 128 bits. */
-
-struct iaddr {
- unsigned len;
- unsigned char iabuf [16];
-};
-
-struct iaddrlist {
- struct iaddrlist *next;
- struct iaddr addr;
-};
diff --git a/contrib/isc-dhcp/includes/isc-dhcp/boolean.h b/contrib/isc-dhcp/includes/isc-dhcp/boolean.h
deleted file mode 100644
index e0dd968..0000000
--- a/contrib/isc-dhcp/includes/isc-dhcp/boolean.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1998-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- */
-
-#ifndef ISC_BOOLEAN_H
-#define ISC_BOOLEAN_H 1
-
-#include <isc-dhcp/lang.h>
-
-ISC_LANG_BEGINDECLS
-
-typedef enum { isc_boolean_false = 0, isc_boolean_true = 1 } isc_boolean_t;
-
-#define ISC_FALSE isc_boolean_false
-#define ISC_TRUE isc_boolean_true
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_BOOLEAN_H */
diff --git a/contrib/isc-dhcp/includes/isc-dhcp/dst.h b/contrib/isc-dhcp/includes/isc-dhcp/dst.h
deleted file mode 100644
index 65c54d2..0000000
--- a/contrib/isc-dhcp/includes/isc-dhcp/dst.h
+++ /dev/null
@@ -1,142 +0,0 @@
-#ifndef DST_H
-#define DST_H
-
-#ifndef HAS_DST_KEY
-typedef struct dst_key {
- char *dk_key_name; /* name of the key */
- int dk_key_size; /* this is the size of the key in bits */
- int dk_proto; /* what protocols this key can be used for */
- int dk_alg; /* algorithm number from key record */
- unsigned dk_flags; /* and the flags of the public key */
- unsigned dk_id; /* identifier of the key */
-} DST_KEY;
-#endif /* HAS_DST_KEY */
-
-/*
- * DST Crypto API defintions
- */
-void dst_init(void);
-int dst_check_algorithm(const int);
-
-int dst_sign_data(const int mode, /* specifies INIT/UPDATE/FINAL/ALL */
- DST_KEY *in_key, /* the key to use */
- void **context, /* pointer to state structure */
- const u_char *data, /* data to be signed */
- const unsigned len, /* length of input data */
- u_char *signature, /* buffer to write signature to */
- const unsigned sig_len); /* size of output buffer */
-
-int dst_verify_data(const int mode, /* specifies INIT/UPDATE/FINAL/ALL */
- DST_KEY *in_key, /* the key to use */
- void **context, /* pointer to state structure */
- const u_char *data, /* data to be verified */
- const unsigned len, /* length of input data */
- const u_char *signature,/* buffer containing signature */
- const unsigned sig_len); /* length of signature */
-
-
-DST_KEY *dst_read_key(const char *in_name, /* name of key */
- const unsigned in_id, /* key tag identifier */
- const int in_alg, /* key algorithm */
- const int key_type); /* Private/PublicKey wanted*/
-
-int dst_write_key(const DST_KEY *key, /* key to write out */
- const int key_type); /* Public/Private */
-
-DST_KEY *dst_dnskey_to_key(const char *in_name, /* KEY record name */
- const u_char *key, /* KEY RDATA */
- const unsigned len); /* size of input buffer*/
-
-
-int dst_key_to_dnskey(const DST_KEY *key, /* key to translate */
- u_char *out_storage, /* output buffer */
- const unsigned out_len); /* size of out_storage*/
-
-
-DST_KEY *dst_buffer_to_key(const char *key_name, /* name of the key */
- const int alg, /* algorithm */
- const unsigned flags, /* dns flags */
- const int protocol, /* dns protocol */
- const u_char *key_buf, /* key in dns wire fmt */
- const unsigned key_len); /* size of key */
-
-
-int dst_key_to_buffer(DST_KEY *key, u_char *out_buff, unsigned buf_len);
-
-DST_KEY *dst_generate_key(const char *name, /* name of new key */
- const int bits, /* size of new key */
- const int exp, /* alg dependent parameter*/
- const unsigned flags, /* key DNS flags */
- const int protocol, /* key DNS protocol */
- const int alg); /* key algorithm to generate */
-
-DST_KEY *dst_free_key(DST_KEY *f_key);
-int dst_compare_keys(const DST_KEY *key1, const DST_KEY *key2);
-
-int dst_sig_size(DST_KEY *key);
-
-int dst_random(const int mode, unsigned wanted, u_char *outran);
-
-
-/* support for dns key tags/ids */
-u_int16_t dst_s_dns_key_id(const u_char *dns_key_rdata,
- const unsigned rdata_len);
-u_int16_t dst_s_id_calc(const u_char *key_data, const unsigned key_len);
-
-/* Used by callers as well as by the library. */
-#define RAW_KEY_SIZE 8192 /* large enough to store any key */
-
-/* DST_API control flags */
-/* These are used used in functions dst_sign_data and dst_verify_data */
-#define SIG_MODE_INIT 1 /* initalize digest */
-#define SIG_MODE_UPDATE 2 /* add data to digest */
-#define SIG_MODE_FINAL 4 /* generate/verify signature */
-#define SIG_MODE_ALL (SIG_MODE_INIT|SIG_MODE_UPDATE|SIG_MODE_FINAL)
-
-/* Flags for dst_read_private_key() */
-#define DST_FORCE_READ 0x1000000
-#define DST_CAN_SIGN 0x010F
-#define DST_NO_AUTHEN 0x8000
-#define DST_EXTEND_FLAG 0x1000
-#define DST_STANDARD 0
-#define DST_PRIVATE 0x2000000
-#define DST_PUBLIC 0x4000000
-#define DST_RAND_SEMI 1
-#define DST_RAND_STD 2
-#define DST_RAND_KEY 3
-#define DST_RAND_DSS 4
-
-
-/* DST algorithm codes */
-#define KEY_RSA 1
-#define KEY_DH 2
-#define KEY_DSA 3
-#define KEY_PRIVATE 254
-#define KEY_EXPAND 255
-#define KEY_HMAC_MD5 157
-#define KEY_HMAC_SHA1 158
-#define UNKNOWN_KEYALG 0
-#define DST_MAX_ALGS KEY_HMAC_SHA1
-
-/* DST constants to locations in KEY record changes in new KEY record */
-#define DST_FLAGS_SIZE 2
-#define DST_KEY_PROT 2
-#define DST_KEY_ALG 3
-#define DST_EXT_FLAG 4
-#define DST_KEY_START 4
-
-#ifndef SIGN_F_NOKEY
-#define SIGN_F_NOKEY 0xC000
-#endif
-
-/* error codes from dst routines */
-#define SIGN_INIT_FAILURE (-23)
-#define SIGN_UPDATE_FAILURE (-24)
-#define SIGN_FINAL_FAILURE (-25)
-#define VERIFY_INIT_FAILURE (-26)
-#define VERIFY_UPDATE_FAILURE (-27)
-#define VERIFY_FINAL_FAILURE (-28)
-#define MISSING_KEY_OR_SIGNATURE (-30)
-#define UNSUPPORTED_KEYALG (-31)
-
-#endif /* DST_H */
diff --git a/contrib/isc-dhcp/includes/isc-dhcp/int.h b/contrib/isc-dhcp/includes/isc-dhcp/int.h
deleted file mode 100644
index c5deef5..0000000
--- a/contrib/isc-dhcp/includes/isc-dhcp/int.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1999-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- */
-
-#ifndef ISC_INT_H
-#define ISC_INT_H 1
-
-#include <isc-dhcp/lang.h>
-
-ISC_LANG_BEGINDECLS
-
-typedef char isc_int8_t;
-typedef unsigned char isc_uint8_t;
-typedef short isc_int16_t;
-typedef unsigned short isc_uint16_t;
-typedef int isc_int32_t;
-typedef unsigned int isc_uint32_t;
-typedef long long isc_int64_t;
-typedef unsigned long long isc_uint64_t;
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_INT_H */
diff --git a/contrib/isc-dhcp/includes/isc-dhcp/lang.h b/contrib/isc-dhcp/includes/isc-dhcp/lang.h
deleted file mode 100644
index 00de9bf..0000000
--- a/contrib/isc-dhcp/includes/isc-dhcp/lang.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1999-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- */
-
-#ifndef ISC_LANG_H
-#define ISC_LANG_H 1
-
-#ifdef __cplusplus
-#define ISC_LANG_BEGINDECLS extern "C" {
-#define ISC_LANG_ENDDECLS }
-#else
-#define ISC_LANG_BEGINDECLS
-#define ISC_LANG_ENDDECLS
-#endif
-
-#endif /* ISC_LANG_H */
diff --git a/contrib/isc-dhcp/includes/isc-dhcp/list.h b/contrib/isc-dhcp/includes/isc-dhcp/list.h
deleted file mode 100644
index 0d06244..0000000
--- a/contrib/isc-dhcp/includes/isc-dhcp/list.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1997-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- */
-
-#ifndef ISC_LIST_H
-#define ISC_LIST_H 1
-
-#define ISC_LIST(type) struct { type *head, *tail; }
-#define ISC_LIST_INIT(list) \
- do { (list).head = NULL; (list).tail = NULL; } while (0)
-
-#define ISC_LINK(type) struct { type *prev, *next; }
-#define ISC_LINK_INIT(elt, link) \
- do { \
- (elt)->link.prev = (void *)(-1); \
- (elt)->link.next = (void *)(-1); \
- } while (0)
-#define ISC_LINK_LINKED(elt, link) ((elt)->link.prev != (void *)(-1))
-
-#define ISC_LIST_HEAD(list) ((list).head)
-#define ISC_LIST_TAIL(list) ((list).tail)
-#define ISC_LIST_EMPTY(list) ((list).head == NULL)
-
-#define ISC_LIST_PREPEND(list, elt, link) \
- do { \
- if ((list).head != NULL) \
- (list).head->link.prev = (elt); \
- else \
- (list).tail = (elt); \
- (elt)->link.prev = NULL; \
- (elt)->link.next = (list).head; \
- (list).head = (elt); \
- } while (0)
-
-#define ISC_LIST_APPEND(list, elt, link) \
- do { \
- if ((list).tail != NULL) \
- (list).tail->link.next = (elt); \
- else \
- (list).head = (elt); \
- (elt)->link.prev = (list).tail; \
- (elt)->link.next = NULL; \
- (list).tail = (elt); \
- } while (0)
-
-#define ISC_LIST_UNLINK(list, elt, link) \
- do { \
- if ((elt)->link.next != NULL) \
- (elt)->link.next->link.prev = (elt)->link.prev; \
- else \
- (list).tail = (elt)->link.prev; \
- if ((elt)->link.prev != NULL) \
- (elt)->link.prev->link.next = (elt)->link.next; \
- else \
- (list).head = (elt)->link.next; \
- (elt)->link.prev = (void *)(-1); \
- (elt)->link.next = (void *)(-1); \
- } while (0)
-
-#define ISC_LIST_PREV(elt, link) ((elt)->link.prev)
-#define ISC_LIST_NEXT(elt, link) ((elt)->link.next)
-
-#define ISC_LIST_INSERTBEFORE(list, before, elt, link) \
- do { \
- if ((before)->link.prev == NULL) \
- ISC_LIST_PREPEND(list, elt, link); \
- else { \
- (elt)->link.prev = (before)->link.prev; \
- (before)->link.prev = (elt); \
- (elt)->link.prev->link.next = (elt); \
- (elt)->link.next = (before); \
- } \
- } while (0)
-
-#define ISC_LIST_INSERTAFTER(list, after, elt, link) \
- do { \
- if ((after)->link.next == NULL) \
- ISC_LIST_APPEND(list, elt, link); \
- else { \
- (elt)->link.next = (after)->link.next; \
- (after)->link.next = (elt); \
- (elt)->link.next->link.prev = (elt); \
- (elt)->link.prev = (after); \
- } \
- } while (0)
-
-#define ISC_LIST_APPENDLIST(list1, list2, link) \
- do { \
- if (ISC_LIST_EMPTY(list1)) \
- (list1) = (list2); \
- else if (!ISC_LIST_EMPTY(list2)) { \
- (list1).tail->link.next = (list2).head; \
- (list2).head->link.prev = (list1).tail; \
- (list1).tail = (list2).tail; \
- (list2).head = NULL; \
- (list2).tail = NULL; \
- } \
- } while (0)
-
-#define ISC_LIST_ENQUEUE(list, elt, link) ISC_LIST_APPEND(list, elt, link)
-#define ISC_LIST_DEQUEUE(list, elt, link) ISC_LIST_UNLINK(list, elt, link)
-
-#endif /* ISC_LIST_H */
diff --git a/contrib/isc-dhcp/includes/isc-dhcp/result.h b/contrib/isc-dhcp/includes/isc-dhcp/result.h
deleted file mode 100644
index 0590f86..0000000
--- a/contrib/isc-dhcp/includes/isc-dhcp/result.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1998-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- */
-
-#ifndef ISC_RESULT_H
-#define ISC_RESULT_H 1
-
-#include <isc-dhcp/boolean.h>
-#include <isc-dhcp/lang.h>
-#include <isc-dhcp/list.h>
-#include <isc-dhcp/types.h>
-
-ISC_LANG_BEGINDECLS
-
-typedef enum {
- ISC_R_SUCCESS = 0,
- ISC_R_NOMEMORY = 1,
- ISC_R_TIMEDOUT = 2,
- ISC_R_NOTHREADS = 3,
- ISC_R_ADDRNOTAVAIL = 4,
- ISC_R_ADDRINUSE = 5,
- ISC_R_NOPERM = 6,
- ISC_R_NOCONN = 7,
- ISC_R_NETUNREACH = 8,
- ISC_R_HOSTUNREACH = 9,
- ISC_R_NETDOWN = 10,
- ISC_R_HOSTDOWN = 11,
- ISC_R_CONNREFUSED = 12,
- ISC_R_NORESOURCES = 13,
- ISC_R_EOF = 14,
- ISC_R_BOUND = 15,
- ISC_R_TASKDONE = 16,
- ISC_R_LOCKBUSY = 17,
- ISC_R_EXISTS = 18,
- ISC_R_NOSPACE = 19,
- ISC_R_CANCELED = 20,
- ISC_R_TASKNOSEND = 21,
- ISC_R_SHUTTINGDOWN = 22,
- ISC_R_NOTFOUND = 23,
- ISC_R_UNEXPECTEDEND = 24,
- ISC_R_FAILURE = 25,
- ISC_R_IOERROR = 26,
- ISC_R_NOTIMPLEMENTED = 27,
- ISC_R_UNBALANCED = 28,
- ISC_R_NOMORE = 29,
- ISC_R_INVALIDFILE = 30,
- ISC_R_BADBASE64 = 31,
- ISC_R_UNEXPECTEDTOKEN = 32,
- ISC_R_QUOTA = 33,
- ISC_R_UNEXPECTED = 34,
- ISC_R_ALREADYRUNNING = 35,
- ISC_R_HOSTUNKNOWN = 36,
- ISC_R_VERSIONMISMATCH = 37,
- ISC_R_PROTOCOLERROR = 38,
- ISC_R_INVALIDARG = 39,
- ISC_R_NOTCONNECTED = 40,
- ISC_R_NOTYET = 41,
- ISC_R_UNCHANGED = 42,
- ISC_R_MULTIPLE = 43,
- ISC_R_KEYCONFLICT = 44,
- ISC_R_BADPARSE = 45,
- ISC_R_NOKEYS = 46,
- ISC_R_KEY_UNKNOWN = 47,
- ISC_R_INVALIDKEY = 48,
- ISC_R_INCOMPLETE = 49,
- ISC_R_FORMERR = 50,
- ISC_R_SERVFAIL = 51,
- ISC_R_NXDOMAIN = 52,
- ISC_R_NOTIMPL = 53,
- ISC_R_REFUSED = 54,
- ISC_R_YXDOMAIN = 55,
- ISC_R_YXRRSET = 56,
- ISC_R_NXRRSET = 57,
- ISC_R_NOTAUTH = 58,
- ISC_R_NOTZONE = 59,
- ISC_R_BADSIG = 60,
- ISC_R_BADKEY = 61,
- ISC_R_BADTIME = 62,
- ISC_R_NOROOTZONE = 63,
- ISC_R_DESTADDRREQ = 64,
- ISC_R_CROSSZONE = 65,
- ISC_R_NO_TSIG = 66,
- ISC_R_NOT_EQUAL = 67,
- ISC_R_CONNRESET = 68,
- ISC_R_UNKNOWNATTRIBUTE = 69
-} isc_result_t;
-
-
-#define ISC_R_NRESULTS 70 /* Number of results */
-
-const char * isc_result_totext(isc_result_t);
-isc_result_t isc_result_register(unsigned int base,
- unsigned int nresults,
- char **text,
- isc_msgcat_t *msgcat,
- int set);
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_RESULT_H */
diff --git a/contrib/isc-dhcp/includes/isc-dhcp/types.h b/contrib/isc-dhcp/includes/isc-dhcp/types.h
deleted file mode 100644
index 5da4e2e..0000000
--- a/contrib/isc-dhcp/includes/isc-dhcp/types.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1999-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- */
-
-#ifndef ISC_TYPES_H
-#define ISC_TYPES_H 1
-
-#include <isc-dhcp/int.h>
-#include <isc-dhcp/boolean.h>
-#include <isc-dhcp/list.h>
-
-/***
- *** Core Types.
- ***/
-
-typedef struct isc_mem isc_mem_t;
-typedef struct isc_mempool isc_mempool_t;
-typedef struct isc_msgcat isc_msgcat_t;
-typedef unsigned int isc_eventtype_t;
-typedef struct isc_event isc_event_t;
-typedef struct isc_task isc_task_t;
-typedef struct isc_taskmgr isc_taskmgr_t;
-typedef struct isc_rwlock isc_rwlock_t;
-
-typedef void (*isc_taskaction_t)(isc_task_t *, isc_event_t *);
-
-#endif /* ISC_TYPES_H */
diff --git a/contrib/isc-dhcp/includes/minires/minires.h b/contrib/isc-dhcp/includes/minires/minires.h
deleted file mode 100644
index 19d2131..0000000
--- a/contrib/isc-dhcp/includes/minires/minires.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 2001-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- */
-
-#include "cdefs.h"
-#include "osdep.h"
-
-#define _ns_flagdata MR_ns_flagdata
-
-#include "minires/resolv.h"
-#include "minires/res_update.h"
-#include "isc-dhcp/result.h"
-
-/*
- * Based on the Dynamic DNS reference implementation by Viraj Bais
- * <viraj_bais@ccm.fm.intel.com>
- */
-
-int minires_mkupdate (ns_updrec *, unsigned char *, unsigned);
-int minires_update (ns_updrec *);
-ns_updrec *minires_mkupdrec (int, const char *, unsigned int,
- unsigned int, unsigned long);
-void minires_freeupdrec (ns_updrec *);
-int minires_nmkupdate (res_state, ns_updrec *, double *, unsigned *);
-isc_result_t minires_nupdate (res_state, ns_updrec *);
-int minires_ninit (res_state);
-ns_rcode isc_rcode_to_ns (isc_result_t);
-
-#if defined (MINIRES_LIB)
-#define res_update minires_update
-#define res_mkupdate minires_mkupdate
-#define res_mkupdrec minires_mkupdrec
-#define res_freeupdrec minires_freeupdrec
-#define res_nmkupdate minires_nmkupdate
-#define res_nupdate minires_nupdate
-#define __p_type_syms MR__p_type_syms
-#define dn_comp MRdn_comp
-#define loc_aton MRloc_aton
-#define sym_ston MRsym_ston
-#define res_buildservicelist MRres_buildservicelist
-#define res_destroyservicelist MRres_destroyservicelist
-#define res_buildprotolist MRres_buildprotolist
-#define res_destroyprotolist MRres_destroyprotolist
-#define res_servicenumber MRres_servicenumber
-#define res_protocolnumber MRres_protocolnumber
-#define res_protocolname MRres_protocolname
-#define res_servicename MRres_servicename
-#define ns_datetosecs MRns_datetosecs
-#define b64_pton MRb64_pton
-#define res_ninit minires_ninit
-#define res_randomid MRres_randomid
-#define res_findzonecut MRres_findzonecut
-#define res_nsend MRres_nsend
-#define res_nsendsigned MRres_nsendsigned
-#define ns_samename MRns_samename
-#define res_nameinquery MRres_nameinquery
-#define res_queriesmatch MRres_queriesmatch
-#define dn_expand MRdn_expand
-#define ns_get16 MRns_get16
-#define res_close MRres_close
-#define res_nclose MRres_nclose
-#define res_ourserver_p MRres_ourserver_p
-#define ns_sign MRns_sign
-#define p_class MRp_class
-#define p_section MRp_section
-#define ns_makecanon MRns_makecanon
-#define ns_parserr MRns_parserr
-#define ns_samedomain MRns_samedomain
-#define ns_name_uncompress MRns_name_uncompress
-#define res_nmkquery MRres_nmkquery
-#define ns_initparse MRns_initparse
-#define res_nquery MRres_nquery
-#define res_nsearch MRres_nsearch
-#define res_hostalias MRres_hostalias
-#define res_nquerydomain MRres_nquerydomain
-#define ns_skiprr MRns_skiprr
-#define dn_skipname MRdn_skipname
-#define ns_name_ntol MRns_name_ntol
-#define ns_sign_tcp_init MRns_sign_tcp_init
-#define ns_sign_tcp MRns_sign_tcp
-#define ns_name_ntop MRns_name_ntop
-#define ns_name_pton MRns_name_pton
-#define ns_name_unpack MRns_name_unpack
-#define ns_name_pack MRns_name_pack
-#define ns_name_compress MRns_name_compress
-#define ns_name_skip MRns_name_skip
-#define ns_subdomain MRns_subdomain
-#define ns_find_tsig MRns_find_tsig
-#define ns_verify MRns_verify
-#define ns_verify_tcp_init MRns_verify_tcp_init
-#define ns_verify_tcp MRns_verify_tcp
-#define b64_ntop MRb64_ntop
-
-extern const struct res_sym __p_type_syms[];
-extern time_t cur_time;
-
-int dn_comp (const char *,
- unsigned char *, unsigned, unsigned char **, unsigned char **);
-int loc_aton (const char *, u_char *);
-int sym_ston (const struct res_sym *, const char *, int *);
-void res_buildservicelist (void);
-void res_destroyservicelist (void);
-void res_buildprotolist(void);
-void res_destroyprotolist(void);
-int res_servicenumber(const char *);
-int res_protocolnumber(const char *);
-const char *res_protocolname(int);
-const char *res_servicename(u_int16_t, const char *);
-u_int32_t ns_datetosecs (const char *cp, int *errp);
-int b64_pton (char const *, unsigned char *, size_t);
-unsigned int res_randomid (void);
-isc_result_t res_findzonecut (res_state, const char *, ns_class, int, char *,
- size_t, struct in_addr *, int, int *, void *);
-isc_result_t res_nsend (res_state,
- double *, unsigned, double *, unsigned, unsigned *);
-isc_result_t res_nsendsigned (res_state, double *, unsigned, ns_tsig_key *,
- double *, unsigned, unsigned *);
-int ns_samename (const char *, const char *);
-int res_nameinquery (const char *, int, int,
- const unsigned char *, const unsigned char *);
-int res_queriesmatch (const unsigned char *, const unsigned char *,
- const unsigned char *, const unsigned char *);
-int dn_expand (const unsigned char *,
- const unsigned char *, const unsigned char *, char *, unsigned);
-unsigned int ns_get16 (const unsigned char *);
-void res_close (void);
-void res_nclose (res_state);
-int res_ourserver_p (const res_state, const struct sockaddr_in *);
-isc_result_t ns_sign (unsigned char *, unsigned *,
- unsigned, int, void *, const unsigned char *,
- unsigned, unsigned char *, unsigned *, time_t);
-const char *p_class (int);
-const char *p_section (int section, int opcode);
-isc_result_t ns_makecanon (const char *, char *, size_t);
-isc_result_t ns_parserr (ns_msg *, ns_sect, int, ns_rr *);
-int ns_samedomain (const char *, const char *);
-int ns_name_uncompress (const u_char *, const u_char *,
- const u_char *, char *, size_t);
-isc_result_t res_nmkquery (res_state, int, const char *, ns_class, ns_type,
- const unsigned char *, unsigned,
- const unsigned char *, double *,
- unsigned, unsigned *);
-isc_result_t ns_initparse (const unsigned char *, unsigned, ns_msg *);
-isc_result_t res_nquery(res_state, const char *,
- ns_class, ns_type, double *, unsigned, unsigned *);
-isc_result_t res_nsearch(res_state, const char *,
- ns_class, ns_type, double *, unsigned, unsigned *);
-const char *res_hostalias (const res_state, const char *, char *, size_t);
-isc_result_t res_nquerydomain(res_state, const char *, const char *,
- ns_class class, ns_type type,
- double *, unsigned, unsigned *);
-
-isc_result_t ns_skiprr(const unsigned char *,
- const unsigned char *, ns_sect, int, int *);
-int dn_skipname (const unsigned char *, const unsigned char *);
-u_int32_t getULong (const unsigned char *);
-int32_t getLong (const unsigned char *);
-u_int32_t getUShort (const unsigned char *);
-int32_t getShort (const unsigned char *);
-u_int32_t getUChar (const unsigned char *);
-void putULong (unsigned char *, u_int32_t);
-void putLong (unsigned char *, int32_t);
-void putUShort (unsigned char *, u_int32_t);
-void putShort (unsigned char *, int32_t);
-void putUChar (unsigned char *, u_int32_t);
-int ns_name_ntol (const unsigned char *, unsigned char *, size_t);
-isc_result_t ns_sign_tcp_init (void *, const unsigned char *,
- unsigned, ns_tcp_tsig_state *);
-isc_result_t ns_sign_tcp (unsigned char *,
- unsigned *, unsigned, int, ns_tcp_tsig_state *, int);
-int ns_name_ntop (const unsigned char *, char *, size_t);
-int ns_name_pton (const char *, unsigned char *, size_t);
-int ns_name_unpack (const unsigned char *, const unsigned char *,
- const unsigned char *, unsigned char *, size_t);
-int ns_name_pack (const unsigned char *, unsigned char *,
- unsigned, const unsigned char **, const unsigned char **);
-int ns_name_compress (const char *, unsigned char *,
- size_t, const unsigned char **, const unsigned char **);
-int ns_name_skip (const unsigned char **, const unsigned char *);
-int ns_subdomain (const char *, const char *);
-unsigned char *ns_find_tsig (unsigned char *, unsigned char *);
-isc_result_t ns_verify (unsigned char *, unsigned *, void *,
- const unsigned char *,
- unsigned, unsigned char *, unsigned *, time_t *, int);
-isc_result_t ns_verify_tcp_init (void *, const unsigned char *, unsigned,
- ns_tcp_tsig_state *);
-isc_result_t ns_verify_tcp (unsigned char *, unsigned *,
- ns_tcp_tsig_state *, int);
-int b64_ntop (unsigned char const *, size_t, char *, size_t);
-
-ns_rcode find_cached_zone (const char *, ns_class, char *,
- size_t, struct in_addr *, int, int *, void *);
-int find_tsig_key (ns_tsig_key **, const char *, void *);
-int forget_zone (void *);
-int repudiate_zone (void *);
-void cache_found_zone (ns_class, char *, struct in_addr *, int);
-isc_result_t uerr2isc (int);
-isc_result_t ns_rcode_to_isc (int);
-
-#define DprintQ(a,b,c,d)
-#define Dprint(a,b)
-#define Perror(a, b, c, d)
-#define Aerror(a, b, c, d, e)
-#define DPRINTF(x)
-
-#define USE_MD5
-#endif
-
-#if defined (TRACING)
-void trace_mr_statp_setup (res_state);
-#endif
diff --git a/contrib/isc-dhcp/includes/minires/res_update.h b/contrib/isc-dhcp/includes/minires/res_update.h
deleted file mode 100644
index 24569c5..0000000
--- a/contrib/isc-dhcp/includes/minires/res_update.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1999-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- */
-
-/*
- * $Id: res_update.h,v 1.2.2.2 2004/06/10 17:59:37 dhankins Exp $
- */
-
-#ifndef __RES_UPDATE_H
-#define __RES_UPDATE_H
-
-#include <sys/types.h>
-#include "arpa/nameser.h"
-#include <isc-dhcp/list.h>
-
-/*
- * This RR-like structure is particular to UPDATE.
- */
-typedef struct ns_updrec {
- ISC_LINK(struct ns_updrec) r_link, r_glink;
- ns_sect r_section; /* ZONE/PREREQUISITE/UPDATE */
- char *r_dname; /* owner of the RR */
- ns_class r_class; /* class number */
- ns_type r_type; /* type number */
- u_int32_t r_ttl; /* time to live */
- const unsigned char *r_data; /* rdata fields as text string */
- unsigned char *r_data_ephem; /* pointer to freeable r_data */
- unsigned int r_size; /* size of r_data field */
- int r_opcode; /* type of operation */
- /* following fields for private use by the resolver/server
- routines */
- struct databuf *r_dp; /* databuf to process */
- struct databuf *r_deldp; /* databuf's deleted/overwritten */
- unsigned int r_zone; /* zone number on server */
-} ns_updrec;
-typedef ISC_LIST(ns_updrec) ns_updque;
-
-#endif /*__RES_UPDATE_H*/
diff --git a/contrib/isc-dhcp/includes/minires/resolv.h b/contrib/isc-dhcp/includes/minires/resolv.h
deleted file mode 100644
index 15bcd2e..0000000
--- a/contrib/isc-dhcp/includes/minires/resolv.h
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Copyright (c) 1983, 1987, 1989
- * 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) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Portions Copyright (c) 1995-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- */
-
-/*
- * @(#)resolv.h 8.1 (Berkeley) 6/2/93
- * $Id: resolv.h,v 1.3.2.1 2004/06/10 17:59:37 dhankins Exp $
- */
-
-#ifndef _RESOLV_H_
-#define _RESOLV_H_
-
-/*
- * This used to be defined in res_query.c, now it's in herror.c.
- * [XXX no it's not. It's in irs/irs_data.c]
- * It was
- * never extern'd by any *.h file before it was placed here. For thread
- * aware programs, the last h_errno value set is stored in res->h_errno.
- *
- * XXX: There doesn't seem to be a good reason for exposing RES_SET_H_ERRNO
- * (and __h_errno_set) to the public via <resolv.h>.
- * XXX: __h_errno_set is really part of IRS, not part of the resolver.
- * If somebody wants to build and use a resolver that doesn't use IRS,
- * what do they do? Perhaps something like
- * #ifdef WANT_IRS
- * # define RES_SET_H_ERRNO(r,x) __h_errno_set(r,x)
- * #else
- * # define RES_SET_H_ERRNO(r,x) (h_errno = (r)->res_h_errno = (x))
- * #endif
- */
-
-#define RES_SET_H_ERRNO(r,x) __h_errno_set(r,x)
-struct __res_state; /* forward */
-void __h_errno_set(struct __res_state *res, int err);
-
-/*
- * Resolver configuration file.
- * Normally not present, but may contain the address of the
- * inital name server(s) to query and the domain search list.
- */
-
-#ifndef _PATH_RESCONF
-#define _PATH_RESCONF "/etc/resolv.conf"
-#endif
-
-typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
- res_sendhookact;
-
-typedef res_sendhookact (*res_send_qhook) (struct sockaddr_in * const *ns,
- double **query,
- unsigned *querylen,
- double *ans,
- unsigned anssiz,
- int *resplen);
-
-typedef res_sendhookact (*res_send_rhook) (const struct sockaddr_in *ns,
- double *query,
- unsigned querylen,
- double *ans,
- unsigned anssiz,
- int *resplen);
-
-struct res_sym {
- int number; /* Identifying number, like T_MX */
- char * name; /* Its symbolic name, like "MX" */
- char * humanname; /* Its fun name, like "mail exchanger" */
-};
-
-/*
- * Global defines and variables for resolver stub.
- */
-#define MAXNS 3 /* max # name servers we'll track */
-#define MAXDFLSRCH 3 /* # default domain levels to try */
-#define MAXDNSRCH 6 /* max # domains in search path */
-#define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */
-
-#define RES_TIMEOUT 5 /* min. seconds between retries */
-#define MAXRESOLVSORT 10 /* number of net to sort on */
-#define RES_MAXNDOTS 15 /* should reflect bit field size */
-#define RES_MAXRETRANS 30 /* only for resolv.conf/RES_OPTIONS */
-#define RES_MAXRETRY 5 /* only for resolv.conf/RES_OPTIONS */
-#define RES_DFLRETRY 2 /* Default #/tries. */
-
-struct __res_state {
- int retrans; /* retransmition time interval */
- int retry; /* number of times to retransmit */
- u_long options; /* option flags - see below. */
- int nscount; /* number of name servers */
- struct sockaddr_in
- nsaddr_list[MAXNS]; /* address of name server */
-#define nsaddr nsaddr_list[0] /* for backward compatibility */
- u_short id; /* current message id */
- char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
- char defdname[256]; /* default domain (deprecated) */
- u_long pfcode; /* RES_PRF_ flags - see below. */
- unsigned ndots:4; /* threshold for initial abs. query */
- unsigned nsort:4; /* number of elements in sort_list[] */
- char unused[3];
- struct {
- struct in_addr addr;
- u_int32_t mask;
- } sort_list[MAXRESOLVSORT];
- res_send_qhook qhook; /* query hook */
- res_send_rhook rhook; /* response hook */
- int res_h_errno; /* last one set for this context */
- int _sock; /* PRIVATE: for res_send i/o */
- u_int _flags; /* PRIVATE: see below */
- char pad[52]; /* On an i386 this means 512b total. */
-};
-
-typedef struct __res_state *res_state;
-
-/*
- * Resolver flags (used to be discrete per-module statics ints).
- */
-#define RES_F_VC 0x00000001 /* socket is TCP */
-#define RES_F_CONN 0x00000002 /* socket is connected */
-
-/* res_findzonecut() options */
-#define RES_EXHAUSTIVE 0x00000001 /* always do all queries */
-
-/*
- * Resolver options (keep these in synch with res_debug.c, please)
- */
-#define RES_INIT 0x00000001 /* address initialized */
-#define RES_DEBUG 0x00000002 /* print debug messages */
-#define RES_AAONLY 0x00000004 /* authoritative answers only (!IMPL)*/
-#define RES_USEVC 0x00000008 /* use virtual circuit */
-#define RES_PRIMARY 0x00000010 /* query primary server only (!IMPL) */
-#define RES_IGNTC 0x00000020 /* ignore trucation errors */
-#define RES_RECURSE 0x00000040 /* recursion desired */
-#define RES_DEFNAMES 0x00000080 /* use default domain name */
-#define RES_STAYOPEN 0x00000100 /* Keep TCP socket open */
-#define RES_DNSRCH 0x00000200 /* search up local domain tree */
-#define RES_INSECURE1 0x00000400 /* type 1 security disabled */
-#define RES_INSECURE2 0x00000800 /* type 2 security disabled */
-#define RES_NOALIASES 0x00001000 /* shuts off HOSTALIASES feature */
-#define RES_USE_INET6 0x00002000 /* use/map IPv6 in gethostbyname() */
-#define RES_ROTATE 0x00004000 /* rotate ns list after each query */
-#define RES_NOCHECKNAME 0x00008000 /* do not check names for sanity. */
-#define RES_KEEPTSIG 0x00010000 /* do not strip TSIG records */
-
-#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
-
-/*
- * Resolver "pfcode" values. Used by dig.
- */
-#define RES_PRF_STATS 0x00000001
-#define RES_PRF_UPDATE 0x00000002
-#define RES_PRF_CLASS 0x00000004
-#define RES_PRF_CMD 0x00000008
-#define RES_PRF_QUES 0x00000010
-#define RES_PRF_ANS 0x00000020
-#define RES_PRF_AUTH 0x00000040
-#define RES_PRF_ADD 0x00000080
-#define RES_PRF_HEAD1 0x00000100
-#define RES_PRF_HEAD2 0x00000200
-#define RES_PRF_TTLID 0x00000400
-#define RES_PRF_HEADX 0x00000800
-#define RES_PRF_QUERY 0x00001000
-#define RES_PRF_REPLY 0x00002000
-#define RES_PRF_INIT 0x00004000
-/* 0x00008000 */
-
-#if 0
-/* Things involving an internal (static) resolver context. */
-#ifdef _REENTRANT
-extern struct __res_state *__res_state(void);
-#define _res (*__res_state())
-#else
-#ifndef __BIND_NOSTATIC
-extern struct __res_state _res;
-#endif
-#endif
-
-void fp_nquery (const u_char *, int, FILE *);
-void fp_query (const u_char *, FILE *);
-const char * hostalias (const char *);
-void p_query (const u_char *);
-void res_close (void);
-int res_init (void);
-int res_isourserver (const struct sockaddr_in *);
-int res_mkquery (int, const char *, int, int, const u_char *,
- int, const u_char *, u_char *, int);
-int res_query (const char *, int, int, u_char *, int);
-int res_querydomain (const char *, const char *, int, int,
- u_char *, int);
-int res_search (const char *, int, int, u_char *, int);
-int res_send (const u_char *, int, u_char *, int);
-int res_sendsigned (const u_char *, int, ns_tsig_key *,
- u_char *, int);
-
-#if !defined(SHARED_LIBBIND) || defined(LIB)
-/*
- * If libbind is a shared object (well, DLL anyway)
- * these externs break the linker when resolv.h is
- * included by a lib client (like named)
- * Make them go away if a client is including this
- *
- */
-extern const struct res_sym __p_key_syms[];
-extern const struct res_sym __p_cert_syms[];
-extern const struct res_sym __p_class_syms[];
-extern const struct res_sym __p_type_syms[];
-extern const struct res_sym __p_rcode_syms[];
-#endif /* SHARED_LIBBIND */
-
-int res_hnok (const char *);
-int res_ownok (const char *);
-int res_mailok (const char *);
-int res_dnok (const char *);
-int sym_ston (const struct res_sym *, const char *, int *);
-const char * sym_ntos (const struct res_sym *, int, int *);
-const char * sym_ntop (const struct res_sym *, int, int *);
-int b64_ntop (u_char const *, size_t, char *, size_t);
-int b64_pton (char const *, u_char *, size_t);
-int loc_aton (const char *ascii, u_char *binary);
-const char * loc_ntoa (const u_char *binary, char *ascii);
-int dn_skipname (const u_char *, const u_char *);
-void putlong (u_int32_t, u_char *);
-void putshort (u_int16_t, u_char *);
-const char * p_class (int);
-const char * p_time (u_int32_t);
-const char * p_type (int);
-const char * p_rcode (int);
-const u_char * p_cdnname (const u_char *, const u_char *, int, FILE *);
-const u_char * p_cdname (const u_char *, const u_char *, FILE *);
-const u_char * p_fqnname (const u_char *cp, const u_char *msg,
- int, char *, int);
-const u_char * p_fqname (const u_char *, const u_char *, FILE *);
-const char * p_option (u_long option);
-char * p_secstodate (u_long);
-int dn_count_labels (const char *);
-int dn_expand (const u_char *, const u_char *, const u_char *,
- char *, int);
-u_int res_randomid (void);
-int res_nameinquery (const char *, int, int,
- const u_char *, const u_char *);
-int res_queriesmatch (const u_char *, const u_char *,
- const u_char *, const u_char *);
-const char * p_section (int section, int opcode);
-/* Things involving a resolver context. */
-int res_ninit (res_state);
-int res_nisourserver (const res_state,
- const struct sockaddr_in *);
-void fp_resstat (const res_state, FILE *);
-void res_npquery (const res_state, const u_char *, int, FILE *);
-const char * res_hostalias (const res_state, const char *,
- char *, size_t);
-int res_nquery (res_state,
- const char *, int, int, u_char *, int);
-int res_nsearch (res_state, const char *, int,
- int, u_char *, int);
-int res_nquerydomain (res_state,
- const char *, const char *, int, int,
- u_char *, int);
-int res_nmkquery (res_state,
- int, const char *, int, int, const u_char *,
- int, const u_char *, u_char *, int);
-int res_nsend (res_state, const u_char *, int, u_char *, int);
-int res_nsendsigned (res_state, const u_char *, int,
- ns_tsig_key *, u_char *, int);
-int res_findzonecut (res_state, const char *, ns_class, int,
- char *, size_t, struct in_addr *, int);
-void res_nclose (res_state);
-
-#endif /* 0 */
-#endif /* !_RESOLV_H_ */
diff --git a/contrib/isc-dhcp/includes/netinet/if_ether.h b/contrib/isc-dhcp/includes/netinet/if_ether.h
deleted file mode 100644
index e53b4c7..0000000
--- a/contrib/isc-dhcp/includes/netinet/if_ether.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* $NetBSD: if_ether.h,v 1.20 1995/06/12 00:47:27 mycroft Exp $ */
-
-/*
- * Copyright (c) 1982, 1986, 1993
- * 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.
- *
- * @(#)if_ether.h 8.1 (Berkeley) 6/10/93
- */
-
-/*
- * Ethernet address - 6 octets
- * this is only used by the ethers(3) functions.
- */
-struct ether_addr {
- u_int8_t ether_addr_octet[6];
-};
-
-/*
- * Structure of a 10Mb/s Ethernet header.
- */
-#define ETHER_ADDR_LEN 6
-
-struct isc_ether_header {
- u_int8_t ether_dhost[ETHER_ADDR_LEN];
- u_int8_t ether_shost[ETHER_ADDR_LEN];
- u_int16_t ether_type;
-};
-
-#define ETHERTYPE_PUP 0x0200 /* PUP protocol */
-#define ETHERTYPE_IP 0x0800 /* IP protocol */
-#define ETHERTYPE_ARP 0x0806 /* address resolution protocol */
-
-#define ETHER_HEADER_SIZE (ETHER_ADDR_LEN * 2 + sizeof (u_int16_t))
diff --git a/contrib/isc-dhcp/includes/netinet/ip.h b/contrib/isc-dhcp/includes/netinet/ip.h
deleted file mode 100644
index 0a1e358..0000000
--- a/contrib/isc-dhcp/includes/netinet/ip.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/* $NetBSD: ip.h,v 1.9 1995/05/15 01:22:44 cgd Exp $ */
-
-/*
- * Copyright (c) 1982, 1986, 1993
- * 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.
- *
- * @(#)ip.h 8.1 (Berkeley) 6/10/93
- */
-
-/*
- * Definitions for internet protocol version 4.
- * Per RFC 791, September 1981.
- */
-#define IPVERSION 4
-
-/*
- * Structure of an internet header, naked of options.
- *
- * We declare ip_len and ip_off to be short, rather than u_short
- * pragmatically since otherwise unsigned comparisons can result
- * against negative integers quite easily, and fail in subtle ways.
- */
-struct ip {
- u_int8_t ip_fvhl; /* header length, version */
- u_int8_t ip_tos; /* type of service */
- int16_t ip_len; /* total length */
- u_int16_t ip_id; /* identification */
- int16_t ip_off; /* fragment offset field */
-#define IP_DF 0x4000 /* dont fragment flag */
-#define IP_MF 0x2000 /* more fragments flag */
-#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
- u_int8_t ip_ttl; /* time to live */
- u_int8_t ip_p; /* protocol */
- u_int16_t ip_sum; /* checksum */
- struct in_addr ip_src, ip_dst; /* source and dest address */
-};
-
-#define IP_V(iph) ((iph)->ip_fvhl >> 4)
-#define IP_HL(iph) (((iph)->ip_fvhl & 0x0F) << 2)
-#define IP_V_SET(iph,x) ((iph)->ip_fvhl = ((iph)->ip_fvhl & 0x0F) | ((x) << 4))
-#define IP_HL_SET(iph,x) ((iph)->ip_fvhl = \
- ((iph)->ip_fvhl & 0xF0) | (((x) >> 2) & 0x0F))
-
-#define IP_MAXPACKET 65535 /* maximum packet size */
-
-/*
- * Definitions for IP type of service (ip_tos)
- */
-#define IPTOS_LOWDELAY 0x10
-#define IPTOS_THROUGHPUT 0x08
-#define IPTOS_RELIABILITY 0x04
-/* IPTOS_LOWCOST 0x02 XXX */
-
-/*
- * Definitions for IP precedence (also in ip_tos) (hopefully unused)
- */
-#define IPTOS_PREC_NETCONTROL 0xe0
-#define IPTOS_PREC_INTERNETCONTROL 0xc0
-#define IPTOS_PREC_CRITIC_ECP 0xa0
-#define IPTOS_PREC_FLASHOVERRIDE 0x80
-#define IPTOS_PREC_FLASH 0x60
-#define IPTOS_PREC_IMMEDIATE 0x40
-#define IPTOS_PREC_PRIORITY 0x20
-#define IPTOS_PREC_ROUTINE 0x00
-
-/*
- * Definitions for options.
- */
-#define IPOPT_COPIED(o) ((o)&0x80)
-#define IPOPT_CLASS(o) ((o)&0x60)
-#define IPOPT_NUMBER(o) ((o)&0x1f)
-
-#define IPOPT_CONTROL 0x00
-#define IPOPT_RESERVED1 0x20
-#define IPOPT_DEBMEAS 0x40
-#define IPOPT_RESERVED2 0x60
-
-#define IPOPT_EOL 0 /* end of option list */
-#define IPOPT_NOP 1 /* no operation */
-
-#define IPOPT_RR 7 /* record packet route */
-#define IPOPT_TS 68 /* timestamp */
-#define IPOPT_SECURITY 130 /* provide s,c,h,tcc */
-#define IPOPT_LSRR 131 /* loose source route */
-#define IPOPT_SATID 136 /* satnet id */
-#define IPOPT_SSRR 137 /* strict source route */
-
-/*
- * Offsets to fields in options other than EOL and NOP.
- */
-#define IPOPT_OPTVAL 0 /* option ID */
-#define IPOPT_OLEN 1 /* option length */
-#define IPOPT_OFFSET 2 /* offset within option */
-#define IPOPT_MINOFF 4 /* min value of above */
-
-/*
- * Time stamp option structure.
- */
-struct ip_timestamp {
- u_int8_t ipt_code; /* IPOPT_TS */
- u_int8_t ipt_len; /* size of structure (variable) */
- u_int8_t ipt_ptr; /* index of current entry */
- u_int8_t ipt_flg_oflw; /* flags, see below, overflow counter */
- union ipt_timestamp {
- u_int32_t ipt_time[1];
- struct ipt_ta {
- struct in_addr ipt_addr;
- u_int32_t ipt_time;
- } ipt_ta[1];
- } ipt_timestamp;
-};
-
-/* flag bits for ipt_flg */
-#define IPOPT_TS_TSONLY 0 /* timestamps only */
-#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
-#define IPOPT_TS_PRESPEC 3 /* specified modules only */
-
-/* bits for security (not byte swapped) */
-#define IPOPT_SECUR_UNCLASS 0x0000
-#define IPOPT_SECUR_CONFID 0xf135
-#define IPOPT_SECUR_EFTO 0x789a
-#define IPOPT_SECUR_MMMM 0xbc4d
-#define IPOPT_SECUR_RESTR 0xaf13
-#define IPOPT_SECUR_SECRET 0xd788
-#define IPOPT_SECUR_TOPSECRET 0x6bc5
-
-/*
- * Internet implementation parameters.
- */
-#define MAXTTL 255 /* maximum time to live (seconds) */
-#define IPDEFTTL 64 /* default ttl, from RFC 1340 */
-#define IPFRAGTTL 60 /* time to live for frags, slowhz */
-#define IPTTLDEC 1 /* subtracted when forwarding */
-
-#define IP_MSS 576 /* default maximum segment size */
diff --git a/contrib/isc-dhcp/includes/netinet/ip_icmp.h b/contrib/isc-dhcp/includes/netinet/ip_icmp.h
deleted file mode 100644
index 8fffb58..0000000
--- a/contrib/isc-dhcp/includes/netinet/ip_icmp.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/* $NetBSD: ip_icmp.h,v 1.11 1996/08/03 15:48:18 neil Exp $ */
-
-/*
- * Copyright (c) 1982, 1986, 1993
- * 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.
- *
- * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93
- */
-
-
-/*
- * Interface Control Message Protocol Definitions.
- * Per RFC 792, September 1981.
- */
-
-/*
- * Internal of an ICMP Router Advertisement
- */
-struct icmp_ra_addr {
- u_int32_t ira_addr;
- u_int32_t ira_preference;
-};
-
-/*
- * Structure of an icmp header.
- */
-struct icmp {
- u_int8_t icmp_type; /* type of message, see below */
- u_int8_t icmp_code; /* type sub code */
- u_int16_t icmp_cksum; /* ones complement cksum of struct */
- union {
- u_int8_t ih_pptr; /* ICMP_PARAMPROB */
- struct in_addr ih_gwaddr; /* ICMP_REDIRECT */
- struct ih_idseq {
- int16_t icd_id;
- int16_t icd_seq;
- } ih_idseq;
- int32_t ih_void;
-
- /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
- struct ih_pmtu {
- int16_t ipm_void;
- int16_t ipm_nextmtu;
- } ih_pmtu;
- struct ih_rtradv {
- u_int8_t irt_num_addrs;
- u_int8_t irt_wpa;
- u_int16_t irt_lifetime;
- } ih_rtradv;
- } icmp_hun;
-#define icmp_pptr icmp_hun.ih_pptr
-#define icmp_gwaddr icmp_hun.ih_gwaddr
-#define icmp_id icmp_hun.ih_idseq.icd_id
-#define icmp_seq icmp_hun.ih_idseq.icd_seq
-#define icmp_void icmp_hun.ih_void
-#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void
-#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu
-#define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs
-#define icmp_wpa icmp_hun.ih_rtradv.irt_wpa
-#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime
- union {
- struct id_ts {
- u_int32_t its_otime;
- u_int32_t its_rtime;
- u_int32_t its_ttime;
- } id_ts;
- struct id_ip {
- struct ip idi_ip;
- /* options and then 64 bits of data */
- } id_ip;
- struct icmp_ra_addr id_radv;
- u_int32_t id_mask;
- int8_t id_data[1];
- } icmp_dun;
-#define icmp_otime icmp_dun.id_ts.its_otime
-#define icmp_rtime icmp_dun.id_ts.its_rtime
-#define icmp_ttime icmp_dun.id_ts.its_ttime
-#define icmp_ip icmp_dun.id_ip.idi_ip
-#define icmp_radv icmp_dun.id_mask
-#define icmp_mask icmp_dun.id_mask
-#define icmp_data icmp_dun.id_data
-};
-
-/*
- * Lower bounds on packet lengths for various types.
- * For the error advice packets must first insure that the
- * packet is large enought to contain the returned ip header.
- * Only then can we do the check to see if 64 bits of packet
- * data have been returned, since we need to check the returned
- * ip header length.
- */
-#define ICMP_MINLEN 8 /* abs minimum */
-#define ICMP_TSLEN (8 + 3 * sizeof (u_int32_t)) /* timestamp */
-#define ICMP_MASKLEN 12 /* address mask */
-#define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8) /* min */
-#define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8)
- /* N.B.: must separately check that ip_hl >= 5 */
-
-/*
- * Definition of type and code field values.
- */
-#define ICMP_ECHOREPLY 0 /* echo reply */
-#define ICMP_UNREACH 3 /* dest unreachable, codes: */
-#define ICMP_UNREACH_NET 0 /* bad net */
-#define ICMP_UNREACH_HOST 1 /* bad host */
-#define ICMP_UNREACH_PROTOCOL 2 /* bad protocol */
-#define ICMP_UNREACH_PORT 3 /* bad port */
-#define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */
-#define ICMP_UNREACH_SRCFAIL 5 /* src route failed */
-#define ICMP_UNREACH_NET_UNKNOWN 6 /* unknown net */
-#define ICMP_UNREACH_HOST_UNKNOWN 7 /* unknown host */
-#define ICMP_UNREACH_ISOLATED 8 /* src host isolated */
-#define ICMP_UNREACH_NET_PROHIB 9 /* prohibited access */
-#define ICMP_UNREACH_HOST_PROHIB 10 /* ditto */
-#define ICMP_UNREACH_TOSNET 11 /* bad tos for net */
-#define ICMP_UNREACH_TOSHOST 12 /* bad tos for host */
-#define ICMP_SOURCEQUENCH 4 /* packet lost, slow down */
-#define ICMP_REDIRECT 5 /* shorter route, codes: */
-#define ICMP_REDIRECT_NET 0 /* for network */
-#define ICMP_REDIRECT_HOST 1 /* for host */
-#define ICMP_REDIRECT_TOSNET 2 /* for tos and net */
-#define ICMP_REDIRECT_TOSHOST 3 /* for tos and host */
-#define ICMP_ECHO 8 /* echo service */
-#define ICMP_ROUTERADVERT 9 /* router advertisement */
-#define ICMP_ROUTERSOLICIT 10 /* router solicitation */
-#define ICMP_TIMXCEED 11 /* time exceeded, code: */
-#define ICMP_TIMXCEED_INTRANS 0 /* ttl==0 in transit */
-#define ICMP_TIMXCEED_REASS 1 /* ttl==0 in reass */
-#define ICMP_PARAMPROB 12 /* ip header bad */
-#define ICMP_PARAMPROB_OPTABSENT 1 /* req. opt. absent */
-#define ICMP_TSTAMP 13 /* timestamp request */
-#define ICMP_TSTAMPREPLY 14 /* timestamp reply */
-#define ICMP_IREQ 15 /* information request */
-#define ICMP_IREQREPLY 16 /* information reply */
-#define ICMP_MASKREQ 17 /* address mask request */
-#define ICMP_MASKREPLY 18 /* address mask reply */
-
-#define ICMP_MAXTYPE 18
-
-#define ICMP_INFOTYPE(type) \
- ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \
- (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \
- (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \
- (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
- (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
-
-#ifdef _KERNEL
-void icmp_error __P((struct mbuf *, int, int, n_long, struct ifnet *));
-void icmp_input __P((struct mbuf *, ...));
-void icmp_reflect __P((struct mbuf *));
-void icmp_send __P((struct mbuf *, struct mbuf *));
-int icmp_sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
-#endif
-
diff --git a/contrib/isc-dhcp/includes/netinet/udp.h b/contrib/isc-dhcp/includes/netinet/udp.h
deleted file mode 100644
index 350f1ec..0000000
--- a/contrib/isc-dhcp/includes/netinet/udp.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* $NetBSD: udp.h,v 1.6 1995/04/13 06:37:10 cgd Exp $ */
-
-/*
- * Copyright (c) 1982, 1986, 1993
- * 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.
- *
- * @(#)udp.h 8.1 (Berkeley) 6/10/93
- */
-
-/*
- * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Portions Copyright (c) 2000-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- */
-
-/*
- * Udp protocol header.
- * Per RFC 768, September, 1981.
- */
-struct udphdr {
- u_int16_t uh_sport; /* source port */
- u_int16_t uh_dport; /* destination port */
- u_int16_t uh_ulen; /* udp length */
- u_int16_t uh_sum; /* udp checksum */
-};
diff --git a/contrib/isc-dhcp/includes/omapip/alloc.h b/contrib/isc-dhcp/includes/omapip/alloc.h
deleted file mode 100644
index 5d1dec0..0000000
--- a/contrib/isc-dhcp/includes/omapip/alloc.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* alloc.h
-
- Definitions for the object management API protocol memory allocation... */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1996-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software has been written for Internet Systems Consortium
- * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about Internet Systems Consortium, see
- * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
- * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
- * ``http://www.nominum.com''.
- */
-
-isc_result_t omapi_buffer_new (omapi_buffer_t **, const char *, int);
-isc_result_t omapi_buffer_reference (omapi_buffer_t **,
- omapi_buffer_t *, const char *, int);
-isc_result_t omapi_buffer_dereference (omapi_buffer_t **, const char *, int);
-
-#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
- defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
-#define DMDOFFSET (sizeof (struct dmalloc_preamble))
-#define DMLFSIZE 16
-#define DMUFSIZE 16
-#define DMDSIZE (DMDOFFSET + DMLFSIZE + DMUFSIZE)
-
-struct dmalloc_preamble {
- struct dmalloc_preamble *prev, *next;
- const char *file;
- int line;
- size_t size;
- unsigned long generation;
- unsigned char low_fence [DMLFSIZE];
-};
-#else
-#define DMDOFFSET 0
-#define DMDSIZE 0
-#endif
-
-/* rc_history flags... */
-#define RC_LEASE 1
-#define RC_MISC 2
-
-#if defined (DEBUG_RC_HISTORY)
-#if !defined (RC_HISTORY_MAX)
-# define RC_HISTORY_MAX 256
-#endif
-
-#if !defined (RC_HISTORY_FLAGS)
-# define RC_HISTORY_FLAGS (RC_LEASE | RC_MISC)
-#endif
-
-struct rc_history_entry {
- const char *file;
- int line;
- void *reference;
- void *addr;
- int refcnt;
-};
-
-#define rc_register(x, l, r, y, z, d, f) do { \
- if (RC_HISTORY_FLAGS & ~(f)) { \
- rc_history [rc_history_index].file = (x); \
- rc_history [rc_history_index].line = (l); \
- rc_history [rc_history_index].reference = (r); \
- rc_history [rc_history_index].addr = (y); \
- rc_history [rc_history_index].refcnt = (z); \
- rc_history_next (d); \
- } \
- } while (0)
-#define rc_register_mdl(r, y, z, d, f) \
- rc_register (__FILE__, __LINE__, r, y, z, d, f)
-#else
-#define rc_register(file, line, reference, addr, refcnt, d, f)
-#define rc_register_mdl(reference, addr, refcnt, d, f)
-#endif
-
-#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
- defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
-extern struct dmalloc_preamble *dmalloc_list;
-extern unsigned long dmalloc_outstanding;
-extern unsigned long dmalloc_longterm;
-extern unsigned long dmalloc_generation;
-extern unsigned long dmalloc_cutoff_generation;
-#endif
-
-#if defined (DEBUG_RC_HISTORY)
-extern struct rc_history_entry rc_history [RC_HISTORY_MAX];
-extern int rc_history_index;
-extern int rc_history_count;
-#endif
diff --git a/contrib/isc-dhcp/includes/omapip/buffer.h b/contrib/isc-dhcp/includes/omapip/buffer.h
deleted file mode 100644
index cc6b6a9..0000000
--- a/contrib/isc-dhcp/includes/omapip/buffer.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* buffer.h
-
- Definitions for the object management API protocol buffering... */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1996-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software has been written for Internet Systems Consortium
- * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about Internet Systems Consortium, see
- * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
- * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
- * ``http://www.nominum.com''.
- */
-
-/* OMAPI buffers are ring buffers, which means that the beginning of the
- buffer and the end of the buffer chase each other around. As long as
- the tail never catches up to the head, there's room in the buffer for
- data.
-
- - If the tail and the head are equal, the buffer is empty.
-
- - If the tail is less than the head, the contents of the buffer
- are the bytes from the head to the end of buffer, and in addition,
- the bytes between the beginning of the buffer and the tail, not
- including the byte addressed by the tail.
-
- - If the tail is greater than the head, then the buffer contains
- valid bytes starting with the byte addressed by the head, and
- ending with the byte before the byte addressed by the tail.
-
- There will always be at least one byte of waste, because the tail can't
- increase so that it's equal to the head (that would represent an empty
- buffer. */
-#define OMAPI_BUF_SIZE 4048
-typedef struct _omapi_buffer {
- struct _omapi_buffer *next; /* Buffers can be chained. */
- u_int32_t refcnt; /* Buffers are reference counted. */
- u_int16_t head, tail; /* Buffers are organized in a ring. */
- char buf [OMAPI_BUF_SIZE]; /* The actual buffer is included in
- the buffer data structure. */
-} omapi_buffer_t;
-
-#define BUFFER_BYTES_FREE(x) \
- ((x) -> tail > (x) -> head \
- ? sizeof ((x) -> buf) - ((x) -> tail - (x) -> head) \
- : (x) -> head - (x) -> tail)
-
-#define BYTES_IN_BUFFER(x) \
- ((x) -> tail > (x) -> head \
- ? (x) -> tail - (x) -> head - 1 \
- : sizeof ((x) -> buf) - ((x) -> head - (x) -> tail) - 1)
-
-isc_result_t omapi_connection_require (omapi_object_t *, unsigned);
-isc_result_t omapi_connection_copyout (unsigned char *,
- omapi_object_t *, unsigned);
-isc_result_t omapi_connection_copyin (omapi_object_t *,
- const unsigned char *, unsigned);
-isc_result_t omapi_connection_flush (omapi_object_t *);
-isc_result_t omapi_connection_get_uint32 (omapi_object_t *, u_int32_t *);
-isc_result_t omapi_connection_put_uint32 (omapi_object_t *, u_int32_t);
-isc_result_t omapi_connection_get_uint16 (omapi_object_t *, u_int16_t *);
-isc_result_t omapi_connection_put_uint16 (omapi_object_t *, u_int32_t);
-
diff --git a/contrib/isc-dhcp/includes/omapip/convert.h b/contrib/isc-dhcp/includes/omapip/convert.h
deleted file mode 100644
index 3fbf347..0000000
--- a/contrib/isc-dhcp/includes/omapip/convert.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* convert.h
-
- Safe copying of integers into and out of a non-aligned memory buffer. */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1996-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software has been written for Internet Systems Consortium
- * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about Internet Systems Consortium, see
- * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
- * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
- * ``http://www.nominum.com''.
- */
-
-#ifndef OMAPI_CONVERT_H
-#define OMAPI_CONVERT_H
-
-u_int32_t getULong (const unsigned char *);
-int32_t getLong (const unsigned char *);
-u_int32_t getUShort (const unsigned char *);
-int32_t getShort (const unsigned char *);
-u_int32_t getUChar (const unsigned char *);
-void putULong (unsigned char *, u_int32_t);
-void putLong (unsigned char *, int32_t);
-void putUShort (unsigned char *, u_int32_t);
-void putShort (unsigned char *, int32_t);
-void putUChar (unsigned char *, u_int32_t);
-int converted_length (const unsigned char *, unsigned int, unsigned int);
-int binary_to_ascii (unsigned char *, const unsigned char *,
- unsigned int, unsigned int);
-
-#endif /* OMAPI_CONVERT_H */
diff --git a/contrib/isc-dhcp/includes/omapip/hash.h b/contrib/isc-dhcp/includes/omapip/hash.h
deleted file mode 100644
index b8ecbe6..0000000
--- a/contrib/isc-dhcp/includes/omapip/hash.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/* hash.h
-
- Definitions for hashing... */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1995-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software has been written for Internet Systems Consortium
- * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about Internet Systems Consortium, see
- * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
- * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
- * ``http://www.nominum.com''.
- */
-
-#ifndef OMAPI_HASH_H
-#define OMAPI_HASH_H
-
-#define DEFAULT_HASH_SIZE 9973
-
-/* The purpose of the hashed_object_t struct is to not match anything else. */
-typedef struct {
- int foo;
-} hashed_object_t;
-
-typedef void (*hash_foreach_func) (const unsigned char *,
- unsigned, hashed_object_t *);
-typedef int (*hash_reference) (hashed_object_t **, hashed_object_t *,
- const char *, int);
-typedef int (*hash_dereference) (hashed_object_t **, const char *, int);
-
-struct hash_bucket {
- struct hash_bucket *next;
- const unsigned char *name;
- unsigned len;
- hashed_object_t *value;
-};
-
-typedef int (*hash_comparator_t)(const void *, const void *, unsigned long);
-
-struct hash_table {
- unsigned hash_count;
- struct hash_bucket *buckets [DEFAULT_HASH_SIZE];
- hash_reference referencer;
- hash_dereference dereferencer;
- hash_comparator_t cmp;
- int (*do_hash) (const unsigned char *, unsigned, unsigned);
-};
-
-struct named_hash {
- struct named_hash *next;
- const char *name;
- struct hash_table *hash;
-};
-
-#define HASH_FUNCTIONS_DECL(name, bufarg, type, hashtype) \
-void name##_hash_add (hashtype *, bufarg, unsigned, type *, \
- const char *, int); \
-void name##_hash_delete (hashtype *, bufarg, unsigned, \
- const char *, int); \
-int name##_hash_lookup (type **, hashtype *, bufarg, unsigned, \
- const char *, int); \
-int name##_hash_foreach (hashtype *, \
- void (*) (bufarg, unsigned, type *)); \
-int name##_new_hash (hashtype **, int, const char *, int); \
-void name##_free_hash_table (hashtype **, const char *, int);
-
-
-#define HASH_FUNCTIONS(name, bufarg, type, hashtype, ref, deref) \
-void name##_hash_add (hashtype *table, \
- bufarg buf, unsigned len, type *ptr, \
- const char *file, int line) \
-{ \
- add_hash ((struct hash_table *)table, \
- (const unsigned char *)buf, \
- len, (hashed_object_t *)ptr, file, line); \
-} \
- \
-void name##_hash_delete (hashtype *table, \
- bufarg buf, unsigned len, const char *file, int line)\
-{ \
- delete_hash_entry ((struct hash_table *)table, \
- (const unsigned char *)buf, \
- len, file, line); \
-} \
- \
-int name##_hash_lookup (type **ptr, hashtype *table, \
- bufarg buf, unsigned len, const char *file, int line) \
-{ \
- return hash_lookup ((hashed_object_t **)ptr, \
- (struct hash_table *)table, \
- (const unsigned char *)buf, len, file, line); \
-} \
- \
-int name##_hash_foreach (hashtype *table, \
- void (*func) (bufarg, unsigned, type *)) \
-{ \
- return hash_foreach ((struct hash_table *)table, \
- (hash_foreach_func)func); \
-} \
- \
-int name##_new_hash (hashtype **tp, int c, const char *file, int line) \
-{ \
- return new_hash ((struct hash_table **)tp, \
- (hash_reference)ref, (hash_dereference)deref, c, \
- file, line); \
-} \
- \
-void name##_free_hash_table (hashtype **table, const char *file, int line) \
-{ \
- free_hash_table ((struct hash_table **)table, file, line); \
-}
-
-void relinquish_hash_bucket_hunks (void);
-int new_hash_table (struct hash_table **, int, const char *, int);
-void free_hash_table (struct hash_table **, const char *, int);
-struct hash_bucket *new_hash_bucket (const char *, int);
-void free_hash_bucket (struct hash_bucket *, const char *, int);
-int new_hash (struct hash_table **,
- hash_reference, hash_dereference, int, const char *, int);
-void add_hash (struct hash_table *,
- const unsigned char *, unsigned, hashed_object_t *,
- const char *, int);
-void delete_hash_entry (struct hash_table *, const unsigned char *,
- unsigned, const char *, int);
-int hash_lookup (hashed_object_t **, struct hash_table *,
- const unsigned char *, unsigned, const char *, int);
-int hash_foreach (struct hash_table *, hash_foreach_func);
-int casecmp (const void *s, const void *t, unsigned long len);
-
-#endif /* OMAPI_HASH_H */
diff --git a/contrib/isc-dhcp/includes/omapip/omapip.h b/contrib/isc-dhcp/includes/omapip/omapip.h
deleted file mode 100644
index 3c8f156..0000000
--- a/contrib/isc-dhcp/includes/omapip/omapip.h
+++ /dev/null
@@ -1,611 +0,0 @@
-/* omapip.h
-
- Definitions for the object management API and protocol... */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1996-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software has been written for Internet Systems Consortium
- * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about Internet Systems Consortium, see
- * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
- * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
- * ``http://www.nominum.com''.
- */
-
-#ifndef _OMAPIP_H_
-#define _OMAPIP_H_
-#include <isc-dhcp/result.h>
-
-typedef unsigned int omapi_handle_t;
-
-struct __omapi_object;
-typedef struct __omapi_object omapi_object_t;
-
-typedef enum {
- omapi_datatype_int,
- omapi_datatype_string,
- omapi_datatype_data,
- omapi_datatype_object
-} omapi_datatype_t;
-
-typedef struct {
- int refcnt;
- omapi_datatype_t type;
- union {
- struct {
- unsigned len;
-#define OMAPI_TYPED_DATA_NOBUFFER_LEN (sizeof (int) + \
- sizeof (omapi_datatype_t) + \
- sizeof (int))
- unsigned char value [1];
- } buffer;
-#define OMAPI_TYPED_DATA_OBJECT_LEN (sizeof (int) + \
- sizeof (omapi_datatype_t) + \
- sizeof (omapi_object_t *))
- omapi_object_t *object;
-#define OMAPI_TYPED_DATA_REF_LEN (sizeof (int) + \
- sizeof (omapi_datatype_t) + \
- 3 * sizeof (void *))
- struct {
- void *ptr;
- isc_result_t (*reference) (void *,
- void *, const char *, int);
- isc_result_t (*dereference) (void *,
- const char *, int);
- } ref;
-#define OMAPI_TYPED_DATA_INT_LEN (sizeof (int) + \
- sizeof (omapi_datatype_t) + \
- sizeof (int))
- int integer;
- } u;
-} omapi_typed_data_t;
-
-typedef struct {
- int refcnt;
- unsigned len;
-#define OMAPI_DATA_STRING_EMPTY_SIZE (2 * sizeof (int))
- unsigned char value [1];
-} omapi_data_string_t;
-
-typedef struct {
- int refcnt;
- omapi_data_string_t *name;
- omapi_typed_data_t *value;
-} omapi_value_t;
-
-typedef struct __omapi_object_type_t {
- const char *name;
- struct __omapi_object_type_t *next;
-
- isc_result_t (*set_value) (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
- isc_result_t (*get_value) (omapi_object_t *,
- omapi_object_t *,
- omapi_data_string_t *, omapi_value_t **);
- isc_result_t (*destroy) (omapi_object_t *, const char *, int);
- isc_result_t (*signal_handler) (omapi_object_t *,
- const char *, va_list);
- isc_result_t (*stuff_values) (omapi_object_t *,
- omapi_object_t *, omapi_object_t *);
- isc_result_t (*lookup) (omapi_object_t **, omapi_object_t *,
- omapi_object_t *);
- isc_result_t (*create) (omapi_object_t **, omapi_object_t *);
- isc_result_t (*remove) (omapi_object_t *, omapi_object_t *);
- isc_result_t (*freer) (omapi_object_t *, const char *, int);
- isc_result_t (*allocator) (omapi_object_t **, const char *, int);
- isc_result_t (*sizer) (size_t);
- size_t size;
- int rc_flag;
- isc_result_t (*initialize) (omapi_object_t *, const char *, int);
-} omapi_object_type_t;
-
-#define OMAPI_OBJECT_PREAMBLE \
- omapi_object_type_t *type; \
- int refcnt; \
- omapi_handle_t handle; \
- omapi_object_t *outer, *inner
-
-/* The omapi handle structure. */
-struct __omapi_object {
- OMAPI_OBJECT_PREAMBLE;
-};
-
-/* The port on which applications should listen for OMAPI connections. */
-#define OMAPI_PROTOCOL_PORT 7911
-
-typedef struct {
- unsigned addrtype;
- unsigned addrlen;
- unsigned char address [16];
- unsigned port;
-} omapi_addr_t;
-
-typedef struct {
- int refcnt;
- unsigned count;
- omapi_addr_t *addresses;
-} omapi_addr_list_t;
-
-typedef struct auth_key {
- OMAPI_OBJECT_PREAMBLE;
- char *name;
- char *algorithm;
- omapi_data_string_t *key;
-} omapi_auth_key_t;
-
-#define OMAPI_CREATE 1
-#define OMAPI_UPDATE 2
-#define OMAPI_EXCL 4
-#define OMAPI_NOTIFY_PROTOCOL 8
-
-#define OMAPI_OBJECT_ALLOC(name, stype, type) \
-isc_result_t name##_allocate (stype **p, const char *file, int line) \
-{ \
- return omapi_object_allocate ((omapi_object_t **)p, \
- type, 0, file, line); \
-} \
- \
-isc_result_t name##_reference (stype **pptr, stype *ptr, \
- const char *file, int line) \
-{ \
- return omapi_object_reference ((omapi_object_t **)pptr, \
- (omapi_object_t *)ptr, file, line); \
-} \
- \
-isc_result_t name##_dereference (stype **ptr, const char *file, int line) \
-{ \
- return omapi_object_dereference ((omapi_object_t **)ptr, file, line); \
-}
-
-#define OMAPI_OBJECT_ALLOC_DECL(name, stype, type) \
-isc_result_t name##_allocate (stype **p, const char *file, int line); \
-isc_result_t name##_reference (stype **pptr, stype *ptr, \
- const char *file, int line); \
-isc_result_t name##_dereference (stype **ptr, const char *file, int line);
-
-typedef isc_result_t (*omapi_array_ref_t) (char **, char *, const char *, int);
-typedef isc_result_t (*omapi_array_deref_t) (char **, const char *, int);
-
-/* An extensible array type. */
-typedef struct {
- char **data;
- omapi_array_ref_t ref;
- omapi_array_deref_t deref;
- int count;
- int max;
-} omapi_array_t;
-
-#define OMAPI_ARRAY_TYPE(name, stype) \
-isc_result_t name##_array_allocate (omapi_array_t **p, \
- const char *file, int line) \
-{ \
- return (omapi_array_allocate \
- (p, \
- (omapi_array_ref_t)name##_reference, \
- (omapi_array_deref_t)name##_dereference, \
- file, line)); \
-} \
- \
-isc_result_t name##_array_free (omapi_array_t **p, \
- const char *file, int line) \
-{ \
- return omapi_array_free (p, file, line); \
-} \
- \
-isc_result_t name##_array_extend (omapi_array_t *pptr, stype *ptr, int *index,\
- const char *file, int line) \
-{ \
- return omapi_array_extend (pptr, (char *)ptr, index, file, line); \
-} \
- \
-isc_result_t name##_array_set (omapi_array_t *pptr, stype *ptr, int index, \
- const char *file, int line) \
-{ \
- return omapi_array_set (pptr, (char *)ptr, index, file, line); \
-} \
- \
-isc_result_t name##_array_lookup (stype **ptr, omapi_array_t *pptr, \
- int index, const char *file, int line) \
-{ \
- return omapi_array_lookup ((char **)ptr, pptr, index, file, line); \
-}
-
-#define OMAPI_ARRAY_TYPE_DECL(name, stype) \
-isc_result_t name##_array_allocate (omapi_array_t **, const char *, int); \
-isc_result_t name##_array_free (omapi_array_t **, const char *, int); \
-isc_result_t name##_array_extend (omapi_array_t *, stype *, int *, \
- const char *, int); \
-isc_result_t name##_array_set (omapi_array_t *, \
- stype *, int, const char *, int); \
-isc_result_t name##_array_lookup (stype **, \
- omapi_array_t *, int, const char *, int)
-
-#define omapi_array_foreach_begin(array, stype, var) \
- { \
- int omapi_array_foreach_index; \
- stype *var = (stype *)0; \
- for (omapi_array_foreach_index = 0; \
- array && \
- omapi_array_foreach_index < (array) -> count; \
- omapi_array_foreach_index++) { \
- if ((array) -> data [omapi_array_foreach_index]) { \
- ((*(array) -> ref) \
- ((char **)&var, \
- (array) -> data [omapi_array_foreach_index],\
- MDL));
-
-#define omapi_array_foreach_end(array, stype, var) \
- (*(array) -> deref) ((char **)&var, MDL); \
- } \
- } \
- }
-
-isc_result_t omapi_protocol_connect (omapi_object_t *,
- const char *, unsigned, omapi_object_t *);
-isc_result_t omapi_connect_list (omapi_object_t *, omapi_addr_list_t *,
- omapi_addr_t *);
-isc_result_t omapi_protocol_listen (omapi_object_t *, unsigned, int);
-isc_boolean_t omapi_protocol_authenticated (omapi_object_t *);
-isc_result_t omapi_protocol_configure_security (omapi_object_t *,
- isc_result_t (*)
- (omapi_object_t *,
- omapi_addr_t *),
- isc_result_t (*)
- (omapi_object_t *,
- omapi_auth_key_t *));
-isc_result_t omapi_protocol_accept (omapi_object_t *);
-isc_result_t omapi_protocol_send_intro (omapi_object_t *, unsigned, unsigned);
-isc_result_t omapi_protocol_ready (omapi_object_t *);
-isc_result_t omapi_protocol_add_auth (omapi_object_t *, omapi_object_t *,
- omapi_handle_t);
-isc_result_t omapi_protocol_lookup_auth (omapi_object_t **, omapi_object_t *,
- omapi_handle_t);
-isc_result_t omapi_protocol_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t omapi_protocol_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t omapi_protocol_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-
-isc_result_t omapi_protocol_destroy (omapi_object_t *, const char *, int);
-isc_result_t omapi_protocol_send_message (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t omapi_protocol_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t omapi_protocol_listener_set_value (omapi_object_t *,
- omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t omapi_protocol_listener_get_value (omapi_object_t *,
- omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t omapi_protocol_listener_destroy (omapi_object_t *,
- const char *, int);
-isc_result_t omapi_protocol_listener_signal (omapi_object_t *,
- const char *, va_list);
-isc_result_t omapi_protocol_listener_stuff (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t omapi_protocol_send_status (omapi_object_t *, omapi_object_t *,
- isc_result_t, unsigned, const char *);
-isc_result_t omapi_protocol_send_open (omapi_object_t *, omapi_object_t *,
- const char *, omapi_object_t *,
- unsigned);
-isc_result_t omapi_protocol_send_update (omapi_object_t *, omapi_object_t *,
- unsigned, omapi_object_t *);
-
-isc_result_t omapi_connect (omapi_object_t *, const char *, unsigned);
-isc_result_t omapi_disconnect (omapi_object_t *, int);
-int omapi_connection_readfd (omapi_object_t *);
-int omapi_connection_writefd (omapi_object_t *);
-isc_result_t omapi_connection_connect (omapi_object_t *);
-isc_result_t omapi_connection_reader (omapi_object_t *);
-isc_result_t omapi_connection_writer (omapi_object_t *);
-isc_result_t omapi_connection_reaper (omapi_object_t *);
-isc_result_t omapi_connection_output_auth_length (omapi_object_t *,
- unsigned *);
-isc_result_t omapi_connection_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t omapi_connection_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t omapi_connection_destroy (omapi_object_t *, const char *, int);
-isc_result_t omapi_connection_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t omapi_connection_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t omapi_connection_write_typed_data (omapi_object_t *,
- omapi_typed_data_t *);
-isc_result_t omapi_connection_put_name (omapi_object_t *, const char *);
-isc_result_t omapi_connection_put_string (omapi_object_t *, const char *);
-isc_result_t omapi_connection_put_handle (omapi_object_t *c,
- omapi_object_t *h);
-
-isc_result_t omapi_listen (omapi_object_t *, unsigned, int);
-isc_result_t omapi_listen_addr (omapi_object_t *,
- omapi_addr_t *, int);
-isc_result_t omapi_listener_accept (omapi_object_t *);
-int omapi_listener_readfd (omapi_object_t *);
-isc_result_t omapi_accept (omapi_object_t *);
-isc_result_t omapi_listener_configure_security (omapi_object_t *,
- isc_result_t (*)
- (omapi_object_t *,
- omapi_addr_t *));
-isc_result_t omapi_listener_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t omapi_listener_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t omapi_listener_destroy (omapi_object_t *, const char *, int);
-isc_result_t omapi_listener_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t omapi_listener_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-
-isc_result_t omapi_register_io_object (omapi_object_t *,
- int (*)(omapi_object_t *),
- int (*)(omapi_object_t *),
- isc_result_t (*)(omapi_object_t *),
- isc_result_t (*)(omapi_object_t *),
- isc_result_t (*)(omapi_object_t *));
-isc_result_t omapi_unregister_io_object (omapi_object_t *);
-isc_result_t omapi_dispatch (struct timeval *);
-isc_result_t omapi_wait_for_completion (omapi_object_t *, struct timeval *);
-isc_result_t omapi_one_dispatch (omapi_object_t *, struct timeval *);
-isc_result_t omapi_io_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t omapi_io_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *, omapi_value_t **);
-isc_result_t omapi_io_destroy (omapi_object_t *, const char *, int);
-isc_result_t omapi_io_signal_handler (omapi_object_t *, const char *, va_list);
-isc_result_t omapi_io_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t omapi_waiter_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t omapi_io_state_foreach (isc_result_t (*func) (omapi_object_t *,
- void *),
- void *p);
-
-isc_result_t omapi_generic_new (omapi_object_t **, const char *, int);
-isc_result_t omapi_generic_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t omapi_generic_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t omapi_generic_destroy (omapi_object_t *, const char *, int);
-isc_result_t omapi_generic_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t omapi_generic_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t omapi_generic_clear_flags (omapi_object_t *);
-
-isc_result_t omapi_message_new (omapi_object_t **, const char *, int);
-isc_result_t omapi_message_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t omapi_message_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t omapi_message_destroy (omapi_object_t *, const char *, int);
-isc_result_t omapi_message_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t omapi_message_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t omapi_message_register (omapi_object_t *);
-isc_result_t omapi_message_unregister (omapi_object_t *);
-isc_result_t omapi_message_process (omapi_object_t *, omapi_object_t *);
-
-OMAPI_OBJECT_ALLOC_DECL (omapi_auth_key,
- omapi_auth_key_t, omapi_type_auth_key)
-isc_result_t omapi_auth_key_new (omapi_auth_key_t **, const char *, int);
-isc_result_t omapi_auth_key_destroy (omapi_object_t *, const char *, int);
-isc_result_t omapi_auth_key_enter (omapi_auth_key_t *);
-isc_result_t omapi_auth_key_lookup_name (omapi_auth_key_t **, const char *);
-isc_result_t omapi_auth_key_lookup (omapi_object_t **,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t omapi_auth_key_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t omapi_auth_key_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-
-extern omapi_object_type_t *omapi_type_connection;
-extern omapi_object_type_t *omapi_type_listener;
-extern omapi_object_type_t *omapi_type_io_object;
-extern omapi_object_type_t *omapi_type_generic;
-extern omapi_object_type_t *omapi_type_protocol;
-extern omapi_object_type_t *omapi_type_protocol_listener;
-extern omapi_object_type_t *omapi_type_waiter;
-extern omapi_object_type_t *omapi_type_remote;
-extern omapi_object_type_t *omapi_type_message;
-extern omapi_object_type_t *omapi_type_auth_key;
-
-extern omapi_object_type_t *omapi_object_types;
-
-void omapi_type_relinquish (void);
-isc_result_t omapi_init (void);
-isc_result_t omapi_object_type_register (omapi_object_type_t **,
- const char *,
- isc_result_t (*)
- (omapi_object_t *,
- omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *),
- isc_result_t (*)
- (omapi_object_t *,
- omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **),
- isc_result_t (*) (omapi_object_t *,
- const char *, int),
- isc_result_t (*) (omapi_object_t *,
- const char *,
- va_list),
- isc_result_t (*) (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *),
- isc_result_t (*) (omapi_object_t **,
- omapi_object_t *,
- omapi_object_t *),
- isc_result_t (*) (omapi_object_t **,
- omapi_object_t *),
- isc_result_t (*) (omapi_object_t *,
- omapi_object_t *),
- isc_result_t (*) (omapi_object_t *,
- const char *, int),
- isc_result_t (*) (omapi_object_t **,
- const char *, int),
- isc_result_t (*) (size_t), size_t,
- isc_result_t (*) (omapi_object_t *,
- const char *, int),
- int);
-isc_result_t omapi_signal (omapi_object_t *, const char *, ...);
-isc_result_t omapi_signal_in (omapi_object_t *, const char *, ...);
-isc_result_t omapi_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t omapi_set_value_str (omapi_object_t *, omapi_object_t *,
- const char *, omapi_typed_data_t *);
-isc_result_t omapi_set_boolean_value (omapi_object_t *, omapi_object_t *,
- const char *, int);
-isc_result_t omapi_set_int_value (omapi_object_t *, omapi_object_t *,
- const char *, int);
-isc_result_t omapi_set_object_value (omapi_object_t *, omapi_object_t *,
- const char *, omapi_object_t *);
-isc_result_t omapi_set_string_value (omapi_object_t *, omapi_object_t *,
- const char *, const char *);
-isc_result_t omapi_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t omapi_get_value_str (omapi_object_t *, omapi_object_t *,
- const char *, omapi_value_t **);
-isc_result_t omapi_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t omapi_object_create (omapi_object_t **, omapi_object_t *,
- omapi_object_type_t *);
-isc_result_t omapi_object_update (omapi_object_t *, omapi_object_t *,
- omapi_object_t *, omapi_handle_t);
-int omapi_data_string_cmp (omapi_data_string_t *, omapi_data_string_t *);
-int omapi_ds_strcmp (omapi_data_string_t *, const char *);
-int omapi_td_strcmp (omapi_typed_data_t *, const char *);
-int omapi_td_strcasecmp (omapi_typed_data_t *, const char *);
-isc_result_t omapi_make_value (omapi_value_t **, omapi_data_string_t *,
- omapi_typed_data_t *, const char *, int);
-isc_result_t omapi_make_const_value (omapi_value_t **, omapi_data_string_t *,
- const unsigned char *,
- unsigned, const char *, int);
-isc_result_t omapi_make_int_value (omapi_value_t **, omapi_data_string_t *,
- int, const char *, int);
-isc_result_t omapi_make_uint_value (omapi_value_t **, omapi_data_string_t *,
- unsigned int, const char *, int);
-isc_result_t omapi_make_object_value (omapi_value_t **, omapi_data_string_t *,
- omapi_object_t *, const char *, int);
-isc_result_t omapi_make_handle_value (omapi_value_t **, omapi_data_string_t *,
- omapi_object_t *, const char *, int);
-isc_result_t omapi_make_string_value (omapi_value_t **, omapi_data_string_t *,
- const char *, const char *, int);
-isc_result_t omapi_get_int_value (unsigned long *, omapi_typed_data_t *);
-
-isc_result_t omapi_object_handle (omapi_handle_t *, omapi_object_t *);
-isc_result_t omapi_handle_lookup (omapi_object_t **, omapi_handle_t);
-isc_result_t omapi_handle_td_lookup (omapi_object_t **, omapi_typed_data_t *);
-
-void * dmalloc (unsigned, const char *, int);
-void dfree (void *, const char *, int);
-#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
- defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
-void dmalloc_reuse (void *, const char *, int, int);
-void dmalloc_dump_outstanding (void);
-#else
-#define dmalloc_reuse(x,y,l,z)
-#endif
-#define MDL __FILE__, __LINE__
-#if defined (DEBUG_RC_HISTORY)
-void dump_rc_history (void *);
-void rc_history_next (int);
-#endif
-void omapi_print_dmalloc_usage_by_caller (void);
-isc_result_t omapi_object_allocate (omapi_object_t **,
- omapi_object_type_t *,
- size_t, const char *, int);
-isc_result_t omapi_object_initialize (omapi_object_t *,
- omapi_object_type_t *,
- size_t, size_t, const char *, int);
-isc_result_t omapi_object_reference (omapi_object_t **,
- omapi_object_t *, const char *, int);
-isc_result_t omapi_object_dereference (omapi_object_t **, const char *, int);
-isc_result_t omapi_typed_data_new (const char *, int, omapi_typed_data_t **,
- omapi_datatype_t, ...);
-isc_result_t omapi_typed_data_reference (omapi_typed_data_t **,
- omapi_typed_data_t *,
- const char *, int);
-isc_result_t omapi_typed_data_dereference (omapi_typed_data_t **,
- const char *, int);
-isc_result_t omapi_data_string_new (omapi_data_string_t **,
- unsigned, const char *, int);
-isc_result_t omapi_data_string_reference (omapi_data_string_t **,
- omapi_data_string_t *,
- const char *, int);
-isc_result_t omapi_data_string_dereference (omapi_data_string_t **,
- const char *, int);
-isc_result_t omapi_value_new (omapi_value_t **, const char *, int);
-isc_result_t omapi_value_reference (omapi_value_t **,
- omapi_value_t *, const char *, int);
-isc_result_t omapi_value_dereference (omapi_value_t **, const char *, int);
-isc_result_t omapi_addr_list_new (omapi_addr_list_t **, unsigned,
- const char *, int);
-isc_result_t omapi_addr_list_reference (omapi_addr_list_t **,
- omapi_addr_list_t *,
- const char *, int);
-isc_result_t omapi_addr_list_dereference (omapi_addr_list_t **,
- const char *, int);
-
-isc_result_t omapi_array_allocate (omapi_array_t **, omapi_array_ref_t,
- omapi_array_deref_t, const char *, int);
-isc_result_t omapi_array_free (omapi_array_t **, const char *, int);
-isc_result_t omapi_array_extend (omapi_array_t *, char *, int *,
- const char *, int);
-isc_result_t omapi_array_set (omapi_array_t *, void *, int, const char *, int);
-isc_result_t omapi_array_lookup (char **,
- omapi_array_t *, int, const char *, int);
-OMAPI_ARRAY_TYPE_DECL(omapi_object, omapi_object_t);
-#endif /* _OMAPIP_H_ */
diff --git a/contrib/isc-dhcp/includes/omapip/omapip_p.h b/contrib/isc-dhcp/includes/omapip/omapip_p.h
deleted file mode 100644
index d8adecd..0000000
--- a/contrib/isc-dhcp/includes/omapip/omapip_p.h
+++ /dev/null
@@ -1,293 +0,0 @@
-/* omapip_p.h
-
- Private master include file for the OMAPI library. */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1996-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software has been written for Internet Systems Consortium
- * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about Internet Systems Consortium, see
- * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
- * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
- * ``http://www.nominum.com''.
- */
-
-#ifndef __OMAPIP_OMAPIP_P_H__
-#define __OMAPIP_OMAPIP_P_H__
-
-#ifndef __CYGWIN32__
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <arpa/inet.h>
-
-#include <netdb.h>
-#else
-#define fd_set cygwin_fd_set
-#include <sys/types.h>
-#endif
-#include <fcntl.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <memory.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <ctype.h>
-#include <time.h>
-
-#include "cdefs.h"
-#include "osdep.h"
-
-#include <isc-dhcp/dst.h>
-#include <isc-dhcp/result.h>
-
-#include <omapip/convert.h>
-#include <omapip/hash.h>
-#include <omapip/omapip.h>
-#include <omapip/trace.h>
-
-/* OMAPI protocol header, version 1.00 */
-typedef struct {
- u_int32_t authlen; /* Length of authenticator. */
- u_int32_t authid; /* Authenticator object ID. */
- u_int32_t op; /* Opcode. */
- omapi_handle_t handle; /* Handle of object being operated on,
- or zero. */
- u_int32_t id; /* Transaction ID. */
- u_int32_t rid; /* ID of transaction to which this is a response. */
-} omapi_protocol_header_t;
-
-#define OMAPI_PROTOCOL_VERSION 100
-
-#define OMAPI_OP_OPEN 1
-#define OMAPI_OP_REFRESH 2
-#define OMAPI_OP_UPDATE 3
-#define OMAPI_OP_NOTIFY 4
-#define OMAPI_OP_STATUS 5
-#define OMAPI_OP_DELETE 6
-
-typedef enum {
- omapi_connection_unconnected,
- omapi_connection_connecting,
- omapi_connection_connected,
- omapi_connection_disconnecting,
- omapi_connection_closed
-} omapi_connection_state_t;
-
-typedef enum {
- omapi_protocol_intro_wait,
- omapi_protocol_header_wait,
- omapi_protocol_signature_wait,
- omapi_protocol_name_wait,
- omapi_protocol_name_length_wait,
- omapi_protocol_value_wait,
- omapi_protocol_value_length_wait
-} omapi_protocol_state_t;
-
-typedef struct __omapi_message_object {
- OMAPI_OBJECT_PREAMBLE;
- struct __omapi_message_object *next, *prev;
- omapi_object_t *object;
- omapi_object_t *notify_object;
- struct __omapi_protocol_object *protocol_object;
- u_int32_t authlen;
- omapi_typed_data_t *authenticator;
- u_int32_t authid;
- omapi_object_t *id_object;
- u_int32_t op;
- u_int32_t h;
- u_int32_t id;
- u_int32_t rid;
-} omapi_message_object_t;
-
-typedef struct __omapi_remote_auth {
- struct __omapi_remote_auth *next;
- omapi_handle_t remote_handle;
- omapi_object_t *a;
-} omapi_remote_auth_t;
-
-typedef struct __omapi_protocol_object {
- OMAPI_OBJECT_PREAMBLE;
- u_int32_t header_size;
- u_int32_t protocol_version;
- u_int32_t next_xid;
-
- omapi_protocol_state_t state; /* Input state. */
- int reading_message_values; /* True if reading message-specific
- values. */
- omapi_message_object_t *message; /* Incoming message. */
- omapi_data_string_t *name; /* Incoming name. */
- omapi_typed_data_t *value; /* Incoming value. */
- isc_result_t verify_result;
- omapi_remote_auth_t *default_auth; /* Default authinfo to use. */
- omapi_remote_auth_t *remote_auth_list; /* Authenticators active on
- this connection. */
-
- isc_boolean_t insecure; /* Set to allow unauthenticated
- messages. */
-
- isc_result_t (*verify_auth) (omapi_object_t *, omapi_auth_key_t *);
-} omapi_protocol_object_t;
-
-typedef struct {
- OMAPI_OBJECT_PREAMBLE;
-
- isc_boolean_t insecure; /* Set to allow unauthenticated
- messages. */
-
- isc_result_t (*verify_auth) (omapi_object_t *, omapi_auth_key_t *);
-} omapi_protocol_listener_object_t;
-
-#include <omapip/buffer.h>
-
-typedef struct __omapi_listener_object {
- OMAPI_OBJECT_PREAMBLE;
- int socket; /* Connection socket. */
- int index;
- struct sockaddr_in address;
- isc_result_t (*verify_addr) (omapi_object_t *, omapi_addr_t *);
-} omapi_listener_object_t;
-
-typedef struct __omapi_connection_object {
- OMAPI_OBJECT_PREAMBLE;
- int socket; /* Connection socket. */
- int32_t index;
- omapi_connection_state_t state;
- struct sockaddr_in remote_addr;
- struct sockaddr_in local_addr;
- omapi_addr_list_t *connect_list; /* List of addresses to which
- to connect. */
- int cptr; /* Current element we are connecting to. */
- u_int32_t bytes_needed; /* Bytes of input needed before wakeup. */
- u_int32_t in_bytes; /* Bytes of input already buffered. */
- omapi_buffer_t *inbufs;
- u_int32_t out_bytes; /* Bytes of output in buffers. */
- omapi_buffer_t *outbufs;
- omapi_listener_object_t *listener; /* Listener that accepted this
- connection, if any. */
- DST_KEY *in_key; /* Authenticator signing incoming
- data. */
- void *in_context; /* Input hash context. */
- DST_KEY *out_key; /* Authenticator signing outgoing
- data. */
- void *out_context; /* Output hash context. */
-} omapi_connection_object_t;
-
-typedef struct __omapi_io_object {
- OMAPI_OBJECT_PREAMBLE;
- struct __omapi_io_object *next;
- int (*readfd) (omapi_object_t *);
- int (*writefd) (omapi_object_t *);
- isc_result_t (*reader) (omapi_object_t *);
- isc_result_t (*writer) (omapi_object_t *);
- isc_result_t (*reaper) (omapi_object_t *);
-} omapi_io_object_t;
-
-typedef struct __omapi_generic_object {
- OMAPI_OBJECT_PREAMBLE;
- omapi_value_t **values;
- u_int8_t *changed;
- int nvalues, va_max;
-} omapi_generic_object_t;
-
-typedef struct __omapi_waiter_object {
- OMAPI_OBJECT_PREAMBLE;
- int ready;
- isc_result_t waitstatus;
- struct __omapi_waiter_object *next;
-} omapi_waiter_object_t;
-
-#define OMAPI_HANDLE_TABLE_SIZE 120
-
-typedef struct __omapi_handle_table {
- omapi_handle_t first, limit;
- omapi_handle_t next;
- int leafp;
- union {
- omapi_object_t *object;
- struct __omapi_handle_table *table;
- } children [OMAPI_HANDLE_TABLE_SIZE];
-} omapi_handle_table_t;
-
-#include <omapip/alloc.h>
-
-OMAPI_OBJECT_ALLOC_DECL (omapi_protocol, omapi_protocol_object_t,
- omapi_type_protocol)
-OMAPI_OBJECT_ALLOC_DECL (omapi_protocol_listener,
- omapi_protocol_listener_object_t,
- omapi_type_protocol_listener)
-OMAPI_OBJECT_ALLOC_DECL (omapi_connection,
- omapi_connection_object_t, omapi_type_connection)
-OMAPI_OBJECT_ALLOC_DECL (omapi_listener,
- omapi_listener_object_t, omapi_type_listener)
-OMAPI_OBJECT_ALLOC_DECL (omapi_io,
- omapi_io_object_t, omapi_type_io_object)
-OMAPI_OBJECT_ALLOC_DECL (omapi_waiter,
- omapi_waiter_object_t, omapi_type_waiter)
-OMAPI_OBJECT_ALLOC_DECL (omapi_generic,
- omapi_generic_object_t, omapi_type_generic)
-OMAPI_OBJECT_ALLOC_DECL (omapi_message,
- omapi_message_object_t, omapi_type_message)
-
-isc_result_t omapi_connection_sign_data (int mode,
- DST_KEY *key,
- void **context,
- const unsigned char *data,
- const unsigned len,
- omapi_typed_data_t **result);
-isc_result_t omapi_listener_connect (omapi_connection_object_t **obj,
- omapi_listener_object_t *listener,
- int socket,
- struct sockaddr_in *remote_addr);
-void omapi_listener_trace_setup (void);
-void omapi_connection_trace_setup (void);
-void omapi_buffer_trace_setup (void);
-void omapi_connection_register (omapi_connection_object_t *,
- const char *, int);
-void trace_mr_init (void);
-
-OMAPI_ARRAY_TYPE_DECL(omapi_listener, omapi_listener_object_t);
-OMAPI_ARRAY_TYPE_DECL(omapi_connection, omapi_connection_object_t);
-
-extern int log_priority;
-extern int log_perror;
-extern void (*log_cleanup) (void);
-
-void log_fatal (const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
-int log_error (const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
-int log_info (const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
-int log_debug (const char *, ...)
- __attribute__((__format__(__printf__,1,2)));
-void do_percentm (char *obuf, const char *ibuf);
-
-isc_result_t uerr2isc (int);
-isc_result_t ns_rcode_to_isc (int);
-
-extern omapi_message_object_t *omapi_registered_messages;
-
-#endif /* __OMAPIP_OMAPIP_P_H__ */
diff --git a/contrib/isc-dhcp/includes/omapip/trace.h b/contrib/isc-dhcp/includes/omapip/trace.h
deleted file mode 100644
index d48c370..0000000
--- a/contrib/isc-dhcp/includes/omapip/trace.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* trace.h
-
- Definitions for omapi tracing facility... */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 2001-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software has been written for Internet Systems Consortium
- * by Ted Lemon, as part of a project for Nominum, Inc. To learn more
- * about Internet Systems Consortium, see http://www.isc.org/. To
- * learn more about Nominum, Inc., see ``http://www.nominum.com''.
- */
-
-#define TRACEFILE_MAGIC 0x64484370UL /* dHCp */
-#define TRACEFILE_VERSION 1
-
-/* The first thing in a trace file is the header, which basically just
- defines the version of the file. */
-typedef struct {
- u_int32_t magic; /* Magic number for trace file. */
- u_int32_t version; /* Version of file. */
- int32_t hlen; /* Length of this header. */
- int32_t phlen; /* Length of packet headers. */
-} tracefile_header_t;
-
-/* The trace file is composed of a bunch of trace packets. Each such packet
- has a type, followed by a length, followed by a timestamp, followed by
- the actual contents of the packet. The type indexes are not fixed -
- they are allocated either on readback or when writing a trace file.
- One index type is reserved - type zero means that this record is a type
- name to index mapping. */
-typedef struct {
- u_int32_t type_index; /* Index to the type of handler that this
- packet needs. */
- u_int32_t length; /* Length of the packet. This includes
- everything except the fixed header. */
- u_int32_t when; /* When the packet was written. */
- u_int32_t pad; /* Round this out to a quad boundary. */
-} tracepacket_t;
-
-#define TRACE_INDEX_MAPPING_SIZE 4 /* trace_index_mapping_t less name. */
-typedef struct {
- u_int32_t index;
- char name [1];
-} trace_index_mapping_t;
-
-struct trace_type; /* forward */
-typedef struct trace_type trace_type_t;
-
-struct trace_type {
- trace_type_t *next;
- int index;
- char *name;
- void *baggage;
- void (*have_packet) (trace_type_t *, unsigned, char *);
- void (*stop_tracing) (trace_type_t *);
-};
-
-typedef struct trace_iov {
- const char *buf;
- unsigned len;
-} trace_iov_t;
-
-typedef struct {
- u_int16_t addrtype;
- u_int16_t addrlen;
- u_int8_t address [16];
- u_int16_t port;
-} trace_addr_t;
-
-void trace_free_all (void);
-int trace_playback (void);
-int trace_record (void);
-isc_result_t trace_init (void (*set_time) (u_int32_t), const char *, int);
-isc_result_t trace_begin (const char *, const char *, int);
-isc_result_t trace_write_packet (trace_type_t *, unsigned, const char *,
- const char *, int);
-isc_result_t trace_write_packet_iov (trace_type_t *, int, trace_iov_t *,
- const char *, int);
-void trace_type_stash (trace_type_t *);
-trace_type_t *trace_type_register (const char *, void *,
- void (*) (trace_type_t *,
- unsigned, char *),
- void (*) (trace_type_t *),
- const char *, int);
-void trace_stop (void);
-void trace_index_map_input (trace_type_t *, unsigned, char *);
-void trace_index_stop_tracing (trace_type_t *);
-void trace_replay_init (void);
-void trace_file_replay (const char *);
-isc_result_t trace_get_next_packet (trace_type_t **, tracepacket_t *,
- char **, unsigned *, unsigned *);
-isc_result_t trace_get_file (trace_type_t *,
- const char *, unsigned *, char **);
-isc_result_t trace_get_packet (trace_type_t **, unsigned *, char **);
-time_t trace_snoop_time (trace_type_t **);
diff --git a/contrib/isc-dhcp/includes/osdep.h b/contrib/isc-dhcp/includes/osdep.h
deleted file mode 100644
index 40affe7..0000000
--- a/contrib/isc-dhcp/includes/osdep.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/* osdep.h
-
- Operating system dependencies... */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1996-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software has been written for Internet Systems Consortium
- * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about Internet Systems Consortium, see
- * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
- * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
- * ``http://www.nominum.com''.
- */
-
-#if !defined (__ISC_DHCP_OSDEP_H__)
-#define __ISC_DHCP_OSDEP_H__
-
-#include "site.h"
-
-/* Porting::
-
- If you add a new network API, you must add a check for it below: */
-
-#if !defined (USE_SOCKETS) && \
- !defined (USE_SOCKET_SEND) && \
- !defined (USE_SOCKET_RECEIVE) && \
- !defined (USE_RAW_SOCKETS) && \
- !defined (USE_RAW_SEND) && \
- !defined (USE_SOCKET_RECEIVE) && \
- !defined (USE_BPF) && \
- !defined (USE_BPF_SEND) && \
- !defined (USE_BPF_RECEIVE) && \
- !defined (USE_LPF) && \
- !defined (USE_LPF_SEND) && \
- !defined (USE_LPF_RECEIVE) && \
- !defined (USE_NIT) && \
- !defined (USE_NIT_SEND) && \
- !defined (USE_NIT_RECEIVE) && \
- !defined (USR_DLPI_SEND) && \
- !defined (USE_DLPI_RECEIVE)
-# define USE_DEFAULT_NETWORK
-#endif
-
-#if !defined (TIME_MAX)
-# define TIME_MAX 2147483647
-#endif
-
-/* Porting::
-
- If you add a new system configuration file, include it here: */
-
-#if defined (sun)
-# if defined (__svr4__) || defined (__SVR4)
-# include "cf/sunos5-5.h"
-# else
-# include "cf/sunos4.h"
-# endif
-#endif
-
-#ifdef aix
-# include "cf/aix.h"
-#endif
-
-#ifdef bsdi
-# include "cf/bsdos.h"
-#endif
-
-#ifdef __NetBSD__
-# include "cf/netbsd.h"
-#endif
-
-#ifdef __FreeBSD__
-# include "cf/freebsd.h"
-#endif
-
-#ifdef OpenBSD
-# include "cf/openbsd.h"
-#endif
-
-#if defined (__osf__) && defined (__alpha)
-# include "cf/alphaosf.h"
-#endif
-
-#ifdef ultrix
-# include "cf/ultrix.h"
-#endif
-
-#ifdef linux
-# include "cf/linux.h"
-#endif
-
-#ifdef SCO
-# include "cf/sco.h"
-#endif
-
-#if defined (hpux) || defined (__hpux)
-# include "cf/hpux.h"
-#endif
-
-#ifdef __QNX__
-# include "cf/qnx.h"
-#endif
-
-#ifdef __CYGWIN32__
-# include "cf/cygwin32.h"
-#endif
-
-#ifdef __APPLE__
-# include "cf/rhapsody.h"
-#else
-# if defined (NeXT)
-# include "cf/nextstep.h"
-# endif
-#endif
-
-/* snprintf/vsnprintf hacks. for systems with no libc versions only. */
-#ifdef NO_SNPRINTF
- extern int isc_print_snprintf(char *, size_t, const char *, ...);
- extern int isc_print_vsnprintf(char *, size_t, const char *, va_list ap);
-# define snprintf isc_print_snprintf
-# define vsnprintf isc_print_vsnprintf
-#endif
-
-/* Porting::
-
- If you add a new network API, and have it set up so that it can be
- used for sending or receiving, but doesn't have to be used for both,
- then set up an ifdef like the ones below: */
-
-#ifdef USE_SOCKETS
-# define USE_SOCKET_SEND
-# define USE_SOCKET_RECEIVE
-#endif
-
-#ifdef USE_RAW_SOCKETS
-# define USE_RAW_SEND
-# define USE_SOCKET_RECEIVE
-#endif
-
-#ifdef USE_BPF
-# define USE_BPF_SEND
-# define USE_BPF_RECEIVE
-#endif
-
-#ifdef USE_LPF
-# define USE_LPF_SEND
-# define USE_LPF_RECEIVE
-#endif
-
-#ifdef USE_NIT
-# define USE_NIT_SEND
-# define USE_NIT_RECEIVE
-#endif
-
-#ifdef USE_DLPI
-# define USE_DLPI_SEND
-# define USE_DLPI_RECEIVE
-#endif
-
-#ifdef USE_UPF
-# define USE_UPF_SEND
-# define USE_UPF_RECEIVE
-#endif
-
-/* Porting::
-
- If you add support for sending packets directly out an interface,
- and your support does not do ARP or routing, you must use a fallback
- mechanism to deal with packets that need to be sent to routers.
- Currently, all low-level packet interfaces use BSD sockets as a
- fallback. */
-
-#if defined (USE_BPF_SEND) || defined (USE_NIT_SEND) || \
- defined (USE_DLPI_SEND) || defined (USE_UPF_SEND) || \
- defined (USE_LPF_SEND) || \
- (defined (USE_SOCKET_SEND) && defined (HAVE_SO_BINDTODEVICE))
-# define USE_SOCKET_FALLBACK
-# define USE_FALLBACK
-#endif
-
-/* Porting::
-
- If you add support for sending packets directly out an interface
- and need to be able to assemble packets, add the USE_XXX_SEND
- definition for your interface to the list tested below. */
-
-#if defined (USE_RAW_SEND) || defined (USE_BPF_SEND) || \
- defined (USE_NIT_SEND) || defined (USE_UPF_SEND) || \
- defined (USE_DLPI_SEND) || defined (USE_LPF_SEND)
-# define PACKET_ASSEMBLY
-#endif
-
-/* Porting::
-
- If you add support for receiving packets directly from an interface
- and need to be able to decode raw packets, add the USE_XXX_RECEIVE
- definition for your interface to the list tested below. */
-
-#if defined (USE_RAW_RECEIVE) || defined (USE_BPF_SEND) || \
- defined (USE_NIT_RECEIVE) || defined (USE_UPF_RECEIVE) || \
- defined (USE_DLPI_RECEIVE) || defined (USE_LPF_RECEIVE)
-# define PACKET_DECODING
-#endif
-
-/* If we don't have a DLPI packet filter, we have to filter in userland.
- Probably not worth doing, actually. */
-#if defined (USE_DLPI_RECEIVE) && !defined (USE_DLPI_PFMOD)
-# define USERLAND_FILTER
-#endif
-
-/* jmp_buf is assumed to be a struct unless otherwise defined in the
- system header. */
-#ifndef jbp_decl
-# define jbp_decl(x) jmp_buf *x
-#endif
-#ifndef jref
-# define jref(x) (&(x))
-#endif
-#ifndef jdref
-# define jdref(x) (*(x))
-#endif
-#ifndef jrefproto
-# define jrefproto jmp_buf *
-#endif
-
-#ifndef BPF_FORMAT
-# define BPF_FORMAT "/dev/bpf%d"
-#endif
-
-#if defined (F_SETFD) && !defined (HAVE_SETFD)
-# define HAVE_SETFD
-#endif
-
-#if defined (IFF_POINTOPOINT) && !defined (HAVE_IFF_POINTOPOINT)
-# define HAVE_IFF_POINTOPOINT
-#endif
-
-#if defined (AF_LINK) && !defined (HAVE_AF_LINK)
-# define HAVE_AF_LINK
-#endif
-
-#if defined (ARPHRD_TUNNEL) && !defined (HAVE_ARPHRD_TUNNEL)
-# define HAVE_ARPHRD_TUNNEL
-#endif
-
-#if defined (ARPHRD_LOOPBACK) && !defined (HAVE_ARPHRD_LOOPBACK)
-# define HAVE_ARPHRD_LOOPBACK
-#endif
-
-#if defined (ARPHRD_ROSE) && !defined (HAVE_ARPHRD_ROSE)
-# define HAVE_ARPHRD_ROSE
-#endif
-
-#if defined (ARPHRD_IEEE802) && !defined (HAVE_ARPHRD_IEEE802)
-# define HAVE_ARPHRD_IEEE802
-#endif
-
-#if defined (ARPHRD_IEEE802_TR) && !defined (HAVE_ARPHRD_IEEE802_TR)
-# define HAVE_ARPHRD_IEEE802_TR
-#endif
-
-#if defined (ARPHRD_FDDI) && !defined (HAVE_ARPHRD_FDDI)
-# define HAVE_ARPHRD_FDDI
-#endif
-
-#if defined (ARPHRD_AX25) && !defined (HAVE_ARPHRD_AX25)
-# define HAVE_ARPHRD_AX25
-#endif
-
-#if defined (ARPHRD_NETROM) && !defined (HAVE_ARPHRD_NETROM)
-# define HAVE_ARPHRD_NETROM
-#endif
-
-#if defined (ARPHRD_METRICOM) && !defined (HAVE_ARPHRD_METRICOM)
-# define HAVE_ARPHRD_METRICOM
-#endif
-
-#if defined (SO_BINDTODEVICE) && !defined (HAVE_SO_BINDTODEVICE)
-# define HAVE_SO_BINDTODEVICE
-#endif
-
-#if defined (AF_LINK) && !defined (HAVE_AF_LINK)
-# define HAVE_AF_LINK
-#endif
-
-/* Linux needs to define SHUT_* in /usr/include/sys/socket.h someday... */
-#if !defined (SHUT_RD)
-# define SHUT_RD 0
-#endif
-
-#if !defined (SOCKLEN_T)
-#define SOCKLEN_T socklen_t
-#endif
-
-#endif /* __ISC_DHCP_OSDEP_H__ */
diff --git a/contrib/isc-dhcp/includes/site.h b/contrib/isc-dhcp/includes/site.h
deleted file mode 100644
index b4d910a..0000000
--- a/contrib/isc-dhcp/includes/site.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/* Site-specific definitions.
-
- For supported systems, you shouldn't need to make any changes here.
- However, you may want to, in order to deal with site-specific
- differences. */
-
-/* Add any site-specific definitions and inclusions here... */
-
-/* #include <site-foo-bar.h> */
-/* #define SITE_FOOBAR */
-
-/* Define this if you don't want dhcpd to run as a daemon and do want
- to see all its output printed to stdout instead of being logged via
- syslog(). This also makes dhcpd use the dhcpd.conf in its working
- directory and write the dhcpd.leases file there. */
-
-/* #define DEBUG */
-
-/* Define this to see what the parser is parsing. You probably don't
- want to see this. */
-
-/* #define DEBUG_TOKENS */
-
-/* Define this to see dumps of incoming and outgoing packets. This
- slows things down quite a bit... */
-
-/* #define DEBUG_PACKET */
-
-/* Define this if you want to see dumps of expression evaluation. */
-
-/* #define DEBUG_EXPRESSIONS */
-
-/* Define this if you want to see dumps of find_lease() in action. */
-
-/* #define DEBUG_FIND_LEASE */
-
-/* Define this if you want to see dumps of parsed expressions. */
-
-/* #define DEBUG_EXPRESSION_PARSE */
-
-/* Define this if you want to watch the class matching process. */
-
-/* #define DEBUG_CLASS_MATCHING */
-
-/* Define this if you want to track memory usage for the purpose of
- noticing memory leaks quickly. */
-
-/* #define DEBUG_MEMORY_LEAKAGE */
-
-/* Define this if you want exhaustive (and very slow) checking of the
- malloc pool for corruption. */
-
-/* #define DEBUG_MALLOC_POOL */
-
-/* Define this if you want to see a message every time a lease's state
- changes. */
-/* #define DEBUG_LEASE_STATE_TRANSITIONS */
-
-/* Define this if you want to maintain a history of the last N operations
- that changed reference counts on objects. This can be used to debug
- cases where an object is dereferenced too often, or not often enough. */
-
-/* #define DEBUG_RC_HISTORY */
-
-/* Define this if you want to see the history every cycle. */
-
-/* #define DEBUG_RC_HISTORY_EXHAUSTIVELY */
-
-/* This is the number of history entries to maintain - by default, 256. */
-
-/* #define RC_HISTORY_MAX 10240 */
-
-/* Define this if you want dhcpd to dump core when a non-fatal memory
- allocation error is detected (i.e., something that would cause a
- memory leak rather than a memory smash). */
-
-/* #define POINTER_DEBUG */
-
-/* Define this if you want debugging output for DHCP failover protocol
- messages. */
-
-/* #define DEBUG_FAILOVER_MESSAGES */
-
-/* Define this if you want debugging output for DHCP failover protocol
- lease assignment timing. */
-
-/* #define DEBUG_FAILOVER_TIMING */
-
-/* Define this if you want all leases written to the lease file, even if
- they are free leases that have never been used. */
-
-/* #define DEBUG_DUMP_ALL_LEASES */
-
-/* Define this if you want DHCP failover protocol support in the DHCP
- server. */
-
-#define FAILOVER_PROTOCOL
-
-/* Define this if you want DNS update functionality to be available. */
-
-#define NSUPDATE
-
-/* Define this if you want the dhcpd.pid file to go somewhere other than
- the default (which varies from system to system, but is usually either
- /etc or /var/run. */
-
-/* #define _PATH_DHCPD_PID "/var/run/dhcpd.pid" */
-
-/* Define this if you want the dhcpd.leases file (the dynamic lease database)
- to go somewhere other than the default location, which is normally
- /etc/dhcpd.leases. */
-
-/* #define _PATH_DHCPD_DB "/etc/dhcpd.leases" */
-
-/* Define this if you want the dhcpd.conf file to go somewhere other than
- the default location. By default, it goes in /etc/dhcpd.conf. */
-
-/* #define _PATH_DHCPD_CONF "/etc/dhcpd.conf" */
-
-/* Network API definitions. You do not need to choose one of these - if
- you don't choose, one will be chosen for you in your system's config
- header. DON'T MESS WITH THIS UNLESS YOU KNOW WHAT YOU'RE DOING!!! */
-
-/* Define this to use the standard BSD socket API.
-
- On many systems, the BSD socket API does not provide the ability to
- send packets to the 255.255.255.255 broadcast address, which can
- prevent some clients (e.g., Win95) from seeing replies. This is
- not a problem on Solaris.
-
- In addition, the BSD socket API will not work when more than one
- network interface is configured on the server.
-
- However, the BSD socket API is about as efficient as you can get, so if
- the aforementioned problems do not matter to you, or if no other
- API is supported for your system, you may want to go with it. */
-
-/* #define USE_SOCKETS */
-
-/* Define this to use the Sun Streams NIT API.
-
- The Sun Streams NIT API is only supported on SunOS 4.x releases. */
-
-/* #define USE_NIT */
-
-/* Define this to use the Berkeley Packet Filter API.
-
- The BPF API is available on all 4.4-BSD derivatives, including
- NetBSD, FreeBSD and BSDI's BSD/OS. It's also available on
- DEC Alpha OSF/1 in a compatibility mode supported by the Alpha OSF/1
- packetfilter interface. */
-
-/* #define USE_BPF */
-
-/* Define this to use the raw socket API.
-
- The raw socket API is provided on many BSD derivatives, and provides
- a way to send out raw IP packets. It is only supported for sending
- packets - packets must be received with the regular socket API.
- This code is experimental - I've never gotten it to actually transmit
- a packet to the 255.255.255.255 broadcast address - so use it at your
- own risk. */
-
-/* #define USE_RAW_SOCKETS */
-
-/* Define this to change the logging facility used by dhcpd. */
-
-/* #define DHCPD_LOG_FACILITY LOG_DAEMON */
-
-/* Define this if you aren't debugging and you want to save memory
- (potentially a _lot_ of memory) by allocating leases in chunks rather
- than one at a time. */
-
-#define COMPACT_LEASES
-
-/* Define this if you want to be able to save and playback server operational
- traces. */
-
-#define TRACING
diff --git a/contrib/isc-dhcp/includes/statement.h b/contrib/isc-dhcp/includes/statement.h
deleted file mode 100644
index 44fe8a8..0000000
--- a/contrib/isc-dhcp/includes/statement.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/* statement.h
-
- Definitions for executable statements... */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1996-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software has been written for Internet Systems Consortium
- * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about Internet Systems Consortium, see
- * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
- * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
- * ``http://www.nominum.com''.
- */
-
-struct executable_statement {
- int refcnt;
- struct executable_statement *next;
- enum statement_op {
- null_statement,
- if_statement,
- add_statement,
- eval_statement,
- break_statement,
- default_option_statement,
- supersede_option_statement,
- append_option_statement,
- prepend_option_statement,
- send_option_statement,
- statements_statement,
- on_statement,
- switch_statement,
- case_statement,
- default_statement,
- set_statement,
- unset_statement,
- let_statement,
- define_statement,
- log_statement,
- return_statement
- } op;
- union {
- struct {
- struct executable_statement *tc, *fc;
- struct expression *expr;
- } ie;
- struct expression *eval;
- struct expression *retval;
- struct class *add;
- struct option_cache *option;
- struct option_cache *supersede;
- struct option_cache *prepend;
- struct option_cache *append;
- struct executable_statement *statements;
- struct {
- int evtypes;
-# define ON_COMMIT 1
-# define ON_EXPIRY 2
-# define ON_RELEASE 4
-# define ON_TRANSMISSION 8
- struct executable_statement *statements;
- } on;
- struct {
- struct expression *expr;
- struct executable_statement *statements;
- } s_switch;
- struct expression *c_case;
- struct {
- char *name;
- struct expression *expr;
- struct executable_statement *statements;
- } set, let;
- char *unset;
- struct {
- enum {
- log_priority_fatal,
- log_priority_error,
- log_priority_debug,
- log_priority_info
- } priority;
- struct expression *expr;
- } log;
- } data;
-};
-
diff --git a/contrib/isc-dhcp/includes/tree.h b/contrib/isc-dhcp/includes/tree.h
deleted file mode 100644
index 64f4397..0000000
--- a/contrib/isc-dhcp/includes/tree.h
+++ /dev/null
@@ -1,337 +0,0 @@
-/* tree.h
-
- Definitions for address trees... */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1996-2003 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 ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
- *
- * Internet Systems Consortium, Inc.
- * 950 Charter Street
- * Redwood City, CA 94063
- * <info@isc.org>
- * http://www.isc.org/
- *
- * This software has been written for Internet Systems Consortium
- * by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
- * To learn more about Internet Systems Consortium, see
- * ``http://www.isc.org/''. To learn more about Vixie Enterprises,
- * see ``http://www.vix.com''. To learn more about Nominum, Inc., see
- * ``http://www.nominum.com''.
- */
-
-/* A pair of pointers, suitable for making a linked list. */
-typedef struct _pair {
- caddr_t car;
- struct _pair *cdr;
-} *pair;
-
-struct option_chain_head {
- int refcnt;
- pair first;
-};
-
-struct enumeration_value {
- const char *name;
- u_int8_t value;
-};
-
-struct enumeration {
- struct enumeration *next;
- const char *name;
- struct enumeration_value *values;
-};
-
-/* Tree node types... */
-#define TREE_CONCAT 1
-#define TREE_HOST_LOOKUP 2
-#define TREE_CONST 3
-#define TREE_LIMIT 4
-#define TREE_DATA_EXPR 5
-
-/* A data buffer with a reference count. */
-struct buffer {
- int refcnt;
- unsigned char data [1];
-};
-
-/* XXX The mechanism by which data strings are returned is currently
- XXX broken: rather than returning an ephemeral pointer, we create
- XXX a reference to the data in the caller's space, which the caller
- XXX then has to dereference - instead, the reference should be
- XXX ephemeral by default and be made a persistent reference explicitly. */
-/* XXX on the other hand, it seems to work pretty nicely, so maybe the
- XXX above comment is meshuggenah. */
-
-/* A string of data bytes, possibly accompanied by a larger buffer. */
-struct data_string {
- struct buffer *buffer;
- const unsigned char *data;
- unsigned len; /* Does not include NUL terminator, if any. */
- int terminated;
-};
-
-enum expression_context {
- context_any, /* indefinite */
- context_boolean,
- context_data,
- context_numeric,
- context_dns,
- context_data_or_numeric, /* indefinite */
- context_function
-};
-
-struct fundef {
- int refcnt;
- struct string_list *args;
- struct executable_statement *statements;
-};
-
-struct binding_value {
- int refcnt;
- enum {
- binding_boolean,
- binding_data,
- binding_numeric,
- binding_dns,
- binding_function
- } type;
- union value {
- struct data_string data;
- unsigned long intval;
- int boolean;
-#if defined (NSUPDATE)
- ns_updrec *dns;
-#endif
- struct fundef *fundef;
- struct binding_value *bv;
- } value;
-};
-
-struct binding {
- struct binding *next;
- char *name;
- struct binding_value *value;
-};
-
-struct binding_scope {
- int refcnt;
- struct binding_scope *outer;
- struct binding *bindings;
-};
-
-/* Expression tree structure. */
-
-enum expr_op {
- expr_none,
- expr_match,
- expr_check,
- expr_equal,
- expr_substring,
- expr_suffix,
- expr_concat,
- expr_host_lookup,
- expr_and,
- expr_or,
- expr_not,
- expr_option,
- expr_hardware,
- expr_packet,
- expr_const_data,
- expr_extract_int8,
- expr_extract_int16,
- expr_extract_int32,
- expr_encode_int8,
- expr_encode_int16,
- expr_encode_int32,
- expr_const_int,
- expr_exists,
- expr_encapsulate,
- expr_known,
- expr_reverse,
- expr_leased_address,
- expr_binary_to_ascii,
- expr_config_option,
- expr_host_decl_name,
- expr_pick_first_value,
- expr_lease_time,
- expr_dns_transaction,
- expr_static,
- expr_ns_add,
- expr_ns_delete,
- expr_ns_exists,
- expr_ns_not_exists,
- expr_not_equal,
- expr_null,
- expr_variable_exists,
- expr_variable_reference,
- expr_filename,
- expr_sname,
- expr_arg,
- expr_funcall,
- expr_function,
- expr_add,
- expr_subtract,
- expr_multiply,
- expr_divide,
- expr_remainder,
- expr_binary_and,
- expr_binary_or,
- expr_binary_xor,
- expr_client_state
-};
-
-struct expression {
- int refcnt;
- enum expr_op op;
- union {
- struct {
- struct expression *expr;
- struct expression *offset;
- struct expression *len;
- } substring;
- struct expression *equal [2];
- struct expression *and [2];
- struct expression *or [2];
- struct expression *not;
- struct expression *add;
- struct expression *subtract;
- struct expression *multiply;
- struct expression *divide;
- struct expression *remainder;
- struct collection *check;
- struct {
- struct expression *expr;
- struct expression *len;
- } suffix;
- struct option *option;
- struct option *config_option;
- struct {
- struct expression *offset;
- struct expression *len;
- } packet;
- struct data_string const_data;
- struct expression *extract_int;
- struct expression *encode_int;
- unsigned long const_int;
- struct expression *concat [2];
- struct dns_host_entry *host_lookup;
- struct option *exists;
- struct data_string encapsulate;
- struct {
- struct expression *base;
- struct expression *width;
- struct expression *seperator;
- struct expression *buffer;
- } b2a;
- struct {
- struct expression *width;
- struct expression *buffer;
- } reverse;
- struct {
- struct expression *car;
- struct expression *cdr;
- } pick_first_value;
- struct {
- struct expression *car;
- struct expression *cdr;
- } dns_transaction;
- struct {
- unsigned rrclass;
- unsigned rrtype;
- struct expression *rrname;
- struct expression *rrdata;
- struct expression *ttl;
- } ns_add;
- struct {
- unsigned rrclass;
- unsigned rrtype;
- struct expression *rrname;
- struct expression *rrdata;
- } ns_delete, ns_exists, ns_not_exists;
- char *variable;
- struct {
- struct expression *val;
- struct expression *next;
- } arg;
- struct {
- char *name;
- struct expression *arglist;
- } funcall;
- struct fundef *func;
- } data;
- int flags;
-# define EXPR_EPHEMERAL 1
-};
-
-/* DNS host entry structure... */
-struct dns_host_entry {
- int refcnt;
- TIME timeout;
- struct data_string data;
- char hostname [1];
-};
-
-struct option_cache; /* forward */
-struct packet; /* forward */
-struct option_state; /* forward */
-struct decoded_option_state; /* forward */
-struct lease; /* forward */
-struct client_state; /* forward */
-
-struct universe {
- const char *name;
- struct option_cache *(*lookup_func) (struct universe *,
- struct option_state *,
- unsigned);
- void (*save_func) (struct universe *, struct option_state *,
- struct option_cache *);
- void (*foreach) (struct packet *,
- struct lease *, struct client_state *,
- struct option_state *, struct option_state *,
- struct binding_scope **, struct universe *, void *,
- void (*) (struct option_cache *, struct packet *,
- struct lease *, struct client_state *,
- struct option_state *,
- struct option_state *,
- struct binding_scope **,
- struct universe *, void *));
- void (*delete_func) (struct universe *universe,
- struct option_state *, int);
- int (*option_state_dereference) (struct universe *,
- struct option_state *,
- const char *, int);
- int (*decode) (struct option_state *,
- const unsigned char *, unsigned, struct universe *);
- int (*encapsulate) (struct data_string *, struct packet *,
- struct lease *, struct client_state *,
- struct option_state *, struct option_state *,
- struct binding_scope **,
- struct universe *);
- void (*store_tag) PROTO ((unsigned char *, u_int32_t));
- void (*store_length) PROTO ((unsigned char *, u_int32_t));
- int tag_size, length_size;
- option_hash_t *hash;
- struct option *options [256];
- struct option *enc_opt;
- int index;
-};
-
-struct option {
- const char *name;
- const char *format;
- struct universe *universe;
- unsigned code;
-};
diff --git a/contrib/isc-dhcp/includes/version.h b/contrib/isc-dhcp/includes/version.h
deleted file mode 100644
index ad359ab..0000000
--- a/contrib/isc-dhcp/includes/version.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* Current version of ISC DHCP Distribution. */
-
-#define DHCP_VERSION "V3.0.1"
OpenPOWER on IntegriCloud