summaryrefslogtreecommitdiffstats
path: root/contrib/bind/include
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-11-30 02:43:11 +0000
committerpeter <peter@FreeBSD.org>1999-11-30 02:43:11 +0000
commit4ef23ce6957fc75fc005885496d605fed48213e1 (patch)
tree7828b08c74ef918938b1b853c98f0cb41edac52c /contrib/bind/include
parent67e0f3ce71726dc4058c2f80a813341a59244dbd (diff)
downloadFreeBSD-src-4ef23ce6957fc75fc005885496d605fed48213e1.zip
FreeBSD-src-4ef23ce6957fc75fc005885496d605fed48213e1.tar.gz
Import bind v8.2.2.p5, minus the crypto for the time being. The bind
package does have BXA export approval, but the licensing strings on the dnssafe code are a bit unpleasant. The crypto is easy to restore and bind will run without it - just without full dnssec support. Obtained from: The Internet Software Consortium (www.isc.org)
Diffstat (limited to 'contrib/bind/include')
-rw-r--r--contrib/bind/include/Makefile9
-rw-r--r--contrib/bind/include/arpa/Makefile4
-rw-r--r--contrib/bind/include/arpa/inet.h8
-rw-r--r--contrib/bind/include/arpa/nameser.h218
-rw-r--r--contrib/bind/include/arpa/nameser_compat.h7
-rw-r--r--contrib/bind/include/hesiod.h7
-rw-r--r--contrib/bind/include/irp.h99
-rw-r--r--contrib/bind/include/irs.h144
-rw-r--r--contrib/bind/include/isc/Makefile6
-rw-r--r--contrib/bind/include/isc/assertions.h4
-rw-r--r--contrib/bind/include/isc/ctl.h104
-rw-r--r--contrib/bind/include/isc/dst.h141
-rw-r--r--contrib/bind/include/isc/eventlib.h9
-rw-r--r--contrib/bind/include/isc/heap.h2
-rw-r--r--contrib/bind/include/isc/irpmarshall.h115
-rw-r--r--contrib/bind/include/isc/list.h3
-rw-r--r--contrib/bind/include/isc/logging.h2
-rw-r--r--contrib/bind/include/isc/memcluster.h13
-rw-r--r--contrib/bind/include/isc/misc.h4
-rw-r--r--contrib/bind/include/netdb.h306
-rw-r--r--contrib/bind/include/res_update.h65
-rw-r--r--contrib/bind/include/resolv.h278
22 files changed, 1367 insertions, 181 deletions
diff --git a/contrib/bind/include/Makefile b/contrib/bind/include/Makefile
index d0a13a8..168c0d2 100644
--- a/contrib/bind/include/Makefile
+++ b/contrib/bind/include/Makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 1996 by Internet Software Consortium
+# Copyright (c) 1996,1999 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
@@ -14,14 +14,15 @@
# SOFTWARE.
SUBDIRS = arpa isc
-HFILES = netdb.h resolv.h irs.h hesiod.h
+HFILES = netdb.h resolv.h res_update.h irs.h irp.h hesiod.h
DESTDIR=
DESTINC= /usr/local/bind/include
INSTALL= install
+INSTALL_INC=
MARGS= DESTDIR="${DESTDIR}" DESTINC="${DESTINC}" INSTALL="${INSTALL}" \
- MAKE="${MAKE}"
+ MAKE="${MAKE}" INSTALL_INC=${INSTALL_INC}
all depend clean distclean install::
@for x in ${SUBDIRS}; do \
@@ -35,7 +36,7 @@ clean:: FRC
install:: ${DESTDIR}${DESTINC}
@set -x; for x in ${HFILES}; do \
- ${INSTALL} -c -m 444 $$x ${DESTDIR}${DESTINC}/$$x; \
+ ${INSTALL} -c ${INSTALL_INC} -m 444 $$x ${DESTDIR}${DESTINC}/$$x; \
done
${DESTDIR}${DESTINC}:
diff --git a/contrib/bind/include/arpa/Makefile b/contrib/bind/include/arpa/Makefile
index 279c569..1aa6bd6 100644
--- a/contrib/bind/include/arpa/Makefile
+++ b/contrib/bind/include/arpa/Makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 1996 by Internet Software Consortium
+# Copyright (c) 1996,1999 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
@@ -27,7 +27,7 @@ clean: FRC
install: ${DESTDIR}${DESTINC}/arpa
set -x; for x in ${HFILES}; do \
- ${INSTALL} -c -m 444 $$x ${DESTDIR}${DESTINC}/arpa/$$x; \
+ ${INSTALL} -c ${INSTALL_INC} -m 444 $$x ${DESTDIR}${DESTINC}/arpa/$$x; \
done
${DESTDIR}${DESTINC}/arpa:
diff --git a/contrib/bind/include/arpa/inet.h b/contrib/bind/include/arpa/inet.h
index 6065980..58a6f9a 100644
--- a/contrib/bind/include/arpa/inet.h
+++ b/contrib/bind/include/arpa/inet.h
@@ -55,7 +55,7 @@
/*
* @(#)inet.h 8.1 (Berkeley) 6/2/93
- * $Id: inet.h,v 8.5 1997/01/29 08:48:09 vixie Exp $
+ * $Id: inet.h,v 8.8 1999/05/14 18:16:54 vixie Exp $
*/
#ifndef _INET_H_
@@ -80,6 +80,8 @@
#define inet_network __inet_network
#define inet_net_ntop __inet_net_ntop
#define inet_net_pton __inet_net_pton
+#define inet_cidr_ntop __inet_cidr_ntop
+#define inet_cidr_pton __inet_cidr_pton
#define inet_ntoa __inet_ntoa
#define inet_pton __inet_pton
#define inet_ntop __inet_ntop
@@ -96,7 +98,9 @@ unsigned long inet_netof __P((struct in_addr));
unsigned long inet_network __P((const char *));
char *inet_net_ntop __P((int, const void *, int, char *, size_t));
int inet_net_pton __P((int, const char *, void *, size_t));
-char *inet_ntoa __P((struct in_addr));
+char *inet_cidr_ntop __P((int, const void *, int, char *, size_t));
+int inet_cidr_pton __P((int, const char *, void *, int *));
+/*const*/ char *inet_ntoa __P((struct in_addr));
int inet_pton __P((int, const char *, void *));
const char *inet_ntop __P((int, const void *, char *, size_t));
u_int inet_nsap_addr __P((const char *, u_char *, int));
diff --git a/contrib/bind/include/arpa/nameser.h b/contrib/bind/include/arpa/nameser.h
index 8d0faf5..c61f8b7 100644
--- a/contrib/bind/include/arpa/nameser.h
+++ b/contrib/bind/include/arpa/nameser.h
@@ -32,7 +32,7 @@
*/
/*
- * Copyright (c) 1996 by Internet Software Consortium.
+ * Copyright (c) 1996-1999 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
@@ -49,7 +49,7 @@
*/
/*
- * $Id: nameser.h,v 8.16 1998/02/06 00:35:58 halley Exp $
+ * $Id: nameser.h,v 8.36 1999/10/15 19:49:08 vixie Exp $
*/
#ifndef _ARPA_NAMESER_H_
@@ -66,15 +66,14 @@
#include <sys/cdefs.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 libnameser.a
- * is new enough to contain a certain feature.
+ * 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.
*/
-/* XXXRTH I made this bigger than __BIND in 4.9.5 T6B */
-#define __NAMESER 19961001 /* New interface version stamp. */
+#define __NAMESER 19991006 /* New interface version stamp. */
/*
* Define constants based on RFC 883, RFC 1034, RFC 1035
@@ -142,18 +141,18 @@ extern struct _ns_flagdata _ns_flagdata[];
* This is a parsed record. It is caller allocated and has no dynamic data.
*/
typedef struct __ns_rr {
- char name[NS_MAXDNAME]; /* XXX need to malloc */
+ char name[NS_MAXDNAME];
u_int16_t type;
- u_int16_t class;
+ u_int16_t rr_class;
u_int32_t ttl;
u_int16_t rdlength;
- const u_char *rdata;
+ const u_char * 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) ((rr).type + 0)
-#define ns_rr_class(rr) ((rr).class + 0)
+#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)
@@ -206,7 +205,11 @@ typedef enum __ns_rcode {
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
+ 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 */
@@ -217,31 +220,40 @@ typedef enum __ns_update_operation {
} ns_update_operation;
/*
- * This RR-like structure is particular to UPDATE.
+ * This structure is used for TSIG authenticated messages
*/
-struct ns_updrec {
- struct ns_updrec *r_prev; /* prev record */
- struct ns_updrec *r_next; /* next record */
- u_int8_t r_section; /* ZONE/PREREQUISITE/UPDATE */
- char * r_dname; /* owner of the RR */
- u_int16_t r_class; /* class number */
- u_int16_t r_type; /* type number */
- u_int32_t r_ttl; /* time to live */
- u_char * r_data; /* rdata fields as text string */
- u_int16_t r_size; /* size of r_data field */
- int r_opcode; /* type of operation */
- /* following fields for private use by the resolver/server routines */
- struct ns_updrec *r_grpnext; /* next record when grouped */
- struct databuf *r_dp; /* databuf to process */
- struct databuf *r_deldp; /* databuf's deleted/overwritten */
- u_int16_t r_zone; /* zone number on server */
+struct ns_tsig_key {
+ char name[NS_MAXDNAME], alg[NS_MAXDNAME];
+ unsigned char *data;
+ int len;
};
-typedef struct ns_updrec ns_updrec;
+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];
+ int 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. */
@@ -277,21 +289,40 @@ typedef enum __ns_type {
ns_t_srv = 33, /* Server Selection. */
ns_t_atma = 34, /* ATM Address */
ns_t_naptr = 35, /* Naming Authority PoinTeR */
- /* Query type values which do not appear in resource records. */
+ 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. */
- /* Class 2 unallocated/unsupported. */
+ 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 */
@@ -300,9 +331,24 @@ typedef enum __ns_class {
ns_c_max = 65536
} ns_class;
-/*
- * Flags field of the KEY RR rdata
- */
+/* 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 */
@@ -311,28 +357,45 @@ typedef enum __ns_class {
/* 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_EXPERIMENTAL 0x2000 /* Security is *mandatory* if bit=0 */
-#define NS_KEY_RESERVED3 0x1000 /* reserved - must be zero */
+#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_USERACCOUNT 0x0400 /* key is assoc. with a user acct */
-#define NS_KEY_ENTITY 0x0200 /* key is assoc. with entity eg host */
-#define NS_KEY_ZONEKEY 0x0100 /* key is zone key */
-#define NS_KEY_IPSEC 0x0080 /* key is for IPSEC (host or user)*/
-#define NS_KEY_EMAIL 0x0040 /* key is for email (MIME security) */
+#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_RESERVED3 | \
+#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
@@ -340,6 +403,12 @@ typedef enum __ns_class {
#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 */
@@ -356,20 +425,20 @@ typedef enum __ns_class {
#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) { \
+#define NS_GET16(s, cp) do { \
register u_char *t_cp = (u_char *)(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) { \
+#define NS_GET32(l, cp) do { \
register u_char *t_cp = (u_char *)(cp); \
(l) = ((u_int32_t)t_cp[0] << 24) \
| ((u_int32_t)t_cp[1] << 16) \
@@ -377,17 +446,17 @@ typedef enum __ns_class {
| ((u_int32_t)t_cp[3]) \
; \
(cp) += NS_INT32SZ; \
-}
+} while (0)
-#define NS_PUT16(s, cp) { \
+#define NS_PUT16(s, cp) do { \
register u_int16_t t_s = (u_int16_t)(s); \
register u_char *t_cp = (u_char *)(cp); \
*t_cp++ = t_s >> 8; \
*t_cp = t_s; \
(cp) += NS_INT16SZ; \
-}
+} while (0)
-#define NS_PUT32(l, cp) { \
+#define NS_PUT32(l, cp) do { \
register u_int32_t t_l = (u_int32_t)(l); \
register u_char *t_cp = (u_char *)(cp); \
*t_cp++ = t_l >> 24; \
@@ -395,27 +464,42 @@ typedef enum __ns_class {
*t_cp++ = t_l >> 8; \
*t_cp = t_l; \
(cp) += NS_INT32SZ; \
-}
+} while (0)
/*
- * ANSI C identifier hiding.
+ * ANSI C identifier hiding for bind's lib/nameser.
*/
#define ns_get16 __ns_get16
#define ns_get32 __ns_get32
#define ns_put16 __ns_put16
#define ns_put32 __ns_put32
#define ns_initparse __ns_initparse
+#define ns_skiprr __ns_skiprr
#define ns_parserr __ns_parserr
#define ns_sprintrr __ns_sprintrr
#define ns_sprintrrf __ns_sprintrrf
#define ns_format_ttl __ns_format_ttl
#define ns_parse_ttl __ns_parse_ttl
+#define ns_datetosecs __ns_datetosecs
+#define ns_name_ntol __ns_name_ntol
#define ns_name_ntop __ns_name_ntop
#define ns_name_pton __ns_name_pton
#define ns_name_unpack __ns_name_unpack
#define ns_name_pack __ns_name_pack
#define ns_name_compress __ns_name_compress
#define ns_name_uncompress __ns_name_uncompress
+#define ns_name_skip __ns_name_skip
+#define ns_sign __ns_sign
+#define ns_sign_tcp __ns_sign_tcp
+#define ns_sign_tcp_init __ns_sign_tcp_init
+#define ns_find_tsig __ns_find_tsig
+#define ns_verify __ns_verify
+#define ns_verify_tcp __ns_verify_tcp
+#define ns_verify_tcp_init __ns_verify_tcp_init
+#define ns_samedomain __ns_samedomain
+#define ns_subdomain __ns_subdomain
+#define ns_makecanon __ns_makecanon
+#define ns_samename __ns_samename
__BEGIN_DECLS
u_int ns_get16 __P((const u_char *));
@@ -423,6 +507,7 @@ u_long ns_get32 __P((const u_char *));
void ns_put16 __P((u_int, u_char *));
void ns_put32 __P((u_long, u_char *));
int ns_initparse __P((const u_char *, int, ns_msg *));
+int ns_skiprr __P((const u_char *, const u_char *, ns_sect, int));
int ns_parserr __P((ns_msg *, ns_sect, int, ns_rr *));
int ns_sprintrr __P((const ns_msg *, const ns_rr *,
const char *, const char *, char *, size_t));
@@ -432,6 +517,8 @@ int ns_sprintrrf __P((const u_char *, size_t, const char *,
char *, size_t));
int ns_format_ttl __P((u_long, char *, size_t));
int ns_parse_ttl __P((const char *, u_long *));
+u_int32_t ns_datetosecs __P((const char *cp, int *errp));
+int ns_name_ntol __P((const u_char *, u_char *, size_t));
int ns_name_ntop __P((const u_char *, char *, size_t));
int ns_name_pton __P((const char *, u_char *, size_t));
int ns_name_unpack __P((const u_char *, const u_char *,
@@ -443,6 +530,23 @@ int ns_name_uncompress __P((const u_char *, const u_char *,
int ns_name_compress __P((const char *, u_char *, size_t,
const u_char **, const u_char **));
int ns_name_skip __P((const u_char **, const u_char *));
+int ns_sign __P((u_char *, int *, int, int, void *,
+ const u_char *, int, u_char *, int *, time_t));
+int ns_sign_tcp __P((u_char *, int *, int, int,
+ ns_tcp_tsig_state *, int));
+int ns_sign_tcp_init __P((void *, const u_char *, int,
+ ns_tcp_tsig_state *));
+u_char *ns_find_tsig __P((u_char *, u_char *));
+int ns_verify __P((u_char *, int *, void *,
+ const u_char *, int, u_char *, int *,
+ time_t *, int));
+int ns_verify_tcp __P((u_char *, int *, ns_tcp_tsig_state *, int));
+int ns_verify_tcp_init __P((void *, const u_char *, int,
+ ns_tcp_tsig_state *));
+int ns_samedomain __P((const char *, const char *));
+int ns_subdomain __P((const char *, const char *));
+int ns_makecanon __P((const char *, char *, size_t));
+int ns_samename __P((const char *, const char *));
__END_DECLS
#ifdef BIND_4_COMPAT
diff --git a/contrib/bind/include/arpa/nameser_compat.h b/contrib/bind/include/arpa/nameser_compat.h
index 82b4c4d..292669d 100644
--- a/contrib/bind/include/arpa/nameser_compat.h
+++ b/contrib/bind/include/arpa/nameser_compat.h
@@ -32,7 +32,7 @@
/*
* from nameser.h 8.1 (Berkeley) 6/2/93
- * $Id: nameser_compat.h,v 8.9 1998/03/20 23:25:10 halley Exp $
+ * $Id: nameser_compat.h,v 8.11 1999/01/02 08:00:58 vixie Exp $
*/
#ifndef _ARPA_NAMESER_COMPAT_
@@ -164,6 +164,10 @@ typedef struct {
#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
@@ -203,6 +207,7 @@ typedef struct {
#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
diff --git a/contrib/bind/include/hesiod.h b/contrib/bind/include/hesiod.h
index b0a3e45..a110bd0 100644
--- a/contrib/bind/include/hesiod.h
+++ b/contrib/bind/include/hesiod.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996 by Internet Software Consortium.
+ * Copyright (c) 1996,1999 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
@@ -20,7 +20,7 @@
*/
/*
- * $Id: hesiod.h,v 1.5 1996/12/04 09:39:00 vixie Exp $
+ * $Id: hesiod.h,v 1.7 1999/01/08 19:22:45 vixie Exp $
*/
#ifndef _HESIOD_H_INCLUDED
@@ -33,5 +33,8 @@ char * hesiod_to_bind __P((void *context, const char *name,
char ** hesiod_resolve __P((void *context, const char *name,
const char *type));
void hesiod_free_list __P((void *context, char **list));
+struct __res_state * __hesiod_res_get __P((void *context));
+void __hesiod_res_set __P((void *context, struct __res_state *,
+ void (*)(void *)));
#endif /*_HESIOD_H_INCLUDED*/
diff --git a/contrib/bind/include/irp.h b/contrib/bind/include/irp.h
new file mode 100644
index 0000000..2402383
--- /dev/null
+++ b/contrib/bind/include/irp.h
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 1999 by Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+
+/*
+ * $Id: irp.h,v 8.1 1999/01/18 07:46:46 vixie Exp $
+ */
+
+#ifndef _IRP_H_INCLUDED
+#define _IRP_H_INCLUDED
+
+#define IRPD_TIMEOUT 30 /* seconds */
+#define IRPD_MAXSESS 50 /* number of simultaneous sessions. */
+#define IRPD_PORT 6660 /* 10 times the number of the beast. */
+#define IRPD_PATH "/var/run/irpd" /* af_unix socket path */
+
+/* If sets the environment variable IRPDSERVER to an IP address
+ (e.g. "192.5.5.1"), then that's the host the client expects irpd to be
+ running on. */
+#define IRPD_HOST_ENV "IRPDSERVER"
+
+/* Protocol response codes. */
+#define IRPD_WELCOME_CODE 200
+#define IRPD_NOT_WELCOME_CODE 500
+
+#define IRPD_GETHOST_ERROR 510
+#define IRPD_GETHOST_NONE 210
+#define IRPD_GETHOST_OK 211
+#define IRPD_GETHOST_SETOK 212
+
+#define IRPD_GETNET_ERROR 520
+#define IRPD_GETNET_NONE 220
+#define IRPD_GETNET_OK 221
+#define IRPD_GETNET_SETOK 222
+
+#define IRPD_GETUSER_ERROR 530
+#define IRPD_GETUSER_NONE 230
+#define IRPD_GETUSER_OK 231
+#define IRPD_GETUSER_SETOK 232
+
+#define IRPD_GETGROUP_ERROR 540
+#define IRPD_GETGROUP_NONE 240
+#define IRPD_GETGROUP_OK 241
+#define IRPD_GETGROUP_SETOK 242
+
+#define IRPD_GETSERVICE_ERROR 550
+#define IRPD_GETSERVICE_NONE 250
+#define IRPD_GETSERVICE_OK 251
+#define IRPD_GETSERVICE_SETOK 252
+
+#define IRPD_GETPROTO_ERROR 560
+#define IRPD_GETPROTO_NONE 260
+#define IRPD_GETPROTO_OK 261
+#define IRPD_GETPROTO_SETOK 262
+
+#define IRPD_GETNETGR_ERROR 570
+#define IRPD_GETNETGR_NONE 270
+#define IRPD_GETNETGR_OK 271
+#define IRPD_GETNETGR_NOMORE 272
+#define IRPD_GETNETGR_MATCHES 273
+#define IRPD_GETNETGR_NOMATCH 274
+#define IRPD_GETNETGR_SETOK 275
+#define IRPD_GETNETGR_SETERR 276
+
+#define irs_irp_read_body __irs_irp_read_body
+#define irs_irp_read_response __irs_irp_read_response
+#define irs_irp_disconnect __irs_irp_disconnect
+#define irs_irp_connect __irs_irp_connect
+#define irs_irp_connection_setup __irs_irp_connection_setup
+#define irs_irp_send_command __irs_irp_send_command
+
+struct irp_p;
+
+char *irs_irp_read_body(struct irp_p *pvt, size_t *size);
+int irs_irp_read_response(struct irp_p *pvt, char *text, size_t len);
+void irs_irp_disconnect(struct irp_p *pvt);
+int irs_irp_connect(struct irp_p *pvt);
+int irs_irp_is_connected(struct irp_p *pvt);
+int irs_irp_connection_setup(struct irp_p *cxndata, int *warned);
+int irs_irp_send_command(struct irp_p *pvt, const char *fmt, ...);
+int irs_irp_get_full_response(struct irp_p *pvt, int *code, char *text,
+ size_t textlen, char **body,
+ size_t *bodylen);
+int irs_irp_read_line(struct irp_p *pvt, char *buffer, int len);
+
+#endif
diff --git a/contrib/bind/include/irs.h b/contrib/bind/include/irs.h
index 0606e01..17d3f20 100644
--- a/contrib/bind/include/irs.h
+++ b/contrib/bind/include/irs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996 by Internet Software Consortium.
+ * Copyright (c) 1996,1999 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
@@ -16,7 +16,7 @@
*/
/*
- * $Id: irs.h,v 8.1 1997/12/04 04:55:19 halley Exp $
+ * $Id: irs.h,v 8.4 1999/01/18 07:46:46 vixie Exp $
*/
#ifndef _IRS_H_INCLUDED
@@ -24,8 +24,11 @@
#include <sys/types.h>
-#include <netdb.h>
+#include <arpa/nameser.h>
+
#include <grp.h>
+#include <netdb.h>
+#include <resolv.h>
#include <pwd.h>
/*
@@ -41,6 +44,9 @@ struct irs_gr {
gid_t, gid_t *, int *));
void (*rewind) __P((struct irs_gr *));
void (*minimize) __P((struct irs_gr *));
+ struct __res_state * (*res_get) __P((struct irs_gr *));
+ void (*res_set) __P((struct irs_gr *, res_state,
+ void (*)(void *)));
};
/*
@@ -54,6 +60,9 @@ struct irs_pw {
struct passwd * (*byuid) __P((struct irs_pw *, uid_t));
void (*rewind) __P((struct irs_pw *));
void (*minimize) __P((struct irs_pw *));
+ struct __res_state * (*res_get) __P((struct irs_pw *));
+ void (*res_set) __P((struct irs_pw *, res_state,
+ void (*)(void *)));
};
/*
@@ -68,6 +77,9 @@ struct irs_sv {
struct servent *(*next) __P((struct irs_sv *));
void (*rewind) __P((struct irs_sv *));
void (*minimize) __P((struct irs_sv *));
+ struct __res_state * (*res_get) __P((struct irs_sv *));
+ void (*res_set) __P((struct irs_sv *, res_state,
+ void (*)(void *)));
};
/*
@@ -81,6 +93,9 @@ struct irs_pr {
struct protoent *(*next) __P((struct irs_pr *));
void (*rewind) __P((struct irs_pr *));
void (*minimize) __P((struct irs_pr *));
+ struct __res_state * (*res_get) __P((struct irs_pr *));
+ void (*res_set) __P((struct irs_pr *, res_state,
+ void (*)(void *)));
};
/*
@@ -96,6 +111,9 @@ struct irs_ho {
struct hostent *(*next) __P((struct irs_ho *));
void (*rewind) __P((struct irs_ho *));
void (*minimize) __P((struct irs_ho *));
+ struct __res_state * (*res_get) __P((struct irs_ho *));
+ void (*res_set) __P((struct irs_ho *, res_state,
+ void (*)(void *)));
};
/*
@@ -109,6 +127,9 @@ struct irs_nw {
struct nwent * (*next) __P((struct irs_nw *));
void (*rewind) __P((struct irs_nw *));
void (*minimize) __P((struct irs_nw *));
+ struct __res_state * (*res_get) __P((struct irs_nw *));
+ void (*res_set) __P((struct irs_nw *, res_state,
+ void (*)(void *)));
};
/*
@@ -148,6 +169,9 @@ struct irs_acc {
struct irs_ho * (*ho_map) __P((struct irs_acc *));
struct irs_nw * (*nw_map) __P((struct irs_acc *));
struct irs_ng * (*ng_map) __P((struct irs_acc *));
+ struct __res_state * (*res_get) __P((struct irs_acc *));
+ void (*res_set) __P((struct irs_acc *, res_state,
+ void (*)(void *)));
};
/*
@@ -171,13 +195,125 @@ struct nwent {
#define irs_lcl_acc __irs_lcl_acc
#define irs_dns_acc __irs_dns_acc
#define irs_nis_acc __irs_nis_acc
+#define irs_irp_acc __irs_irp_acc
/*
* Externs.
*/
-extern struct irs_acc * irs_gen_acc __P((const char *options));
+extern struct irs_acc * irs_gen_acc __P((const char *options,
+ const char *conf_file));
extern struct irs_acc * irs_lcl_acc __P((const char *options));
extern struct irs_acc * irs_dns_acc __P((const char *options));
extern struct irs_acc * irs_nis_acc __P((const char *options));
+extern struct irs_acc * irs_irp_acc __P((const char *options));
+
+/*
+ * These forward declarations are for the semi-private functions in
+ * the get*.c files. Each of these funcs implements the real get*
+ * functionality and the standard versions are just wrappers that
+ * call these. Apart from the wrappers, only irpd is expected to
+ * call these directly, hence these decls are put here and not in
+ * the /usr/include replacements.
+ */
+
+struct net_data; /* forward */
+
+/*
+ * net_data_create gets a singleton net_data object. net_data_init
+ * creates as many net_data objects as times it is called. Clients using
+ * the default interface will use net_data_create by default. Servers will
+ * probably want net_data_init (one call per client)
+ */
+struct net_data *net_data_create(const char *conf_file);
+struct net_data *net_data_init(const char *conf_file);
+void net_data_destroy(void *p);
+
+extern struct group *getgrent_p __P((struct net_data *net_data));
+extern struct group *getgrnam_p __P((const char *name,
+ struct net_data *net_data));
+extern struct group *getgrgid_p __P((gid_t gid,
+ struct net_data *net_data));
+extern int setgroupent_p __P((int stayopen,
+ struct net_data *net_data));
+extern void endgrent_p __P((struct net_data *net_data));
+extern int getgrouplist_p __P((const char *name,
+ gid_t basegid,
+ gid_t *groups,
+ int *ngroups,
+ struct net_data *net_data));
+
+#ifdef SETGRENT_VOID
+extern void setgrent_p __P((struct net_data *net_data));
+#else
+extern int setgrent_p __P((struct net_data *net_data));
+#endif
+
+extern struct hostent *gethostbyname_p __P((const char *name,
+ struct net_data *net_data));
+extern struct hostent *gethostbyname2_p __P((const char *name, int af,
+ struct net_data *net_data));
+extern struct hostent *gethostbyaddr_p __P((const char *addr, int len,
+ int af,
+ struct net_data *net_data));
+extern struct hostent *gethostent_p __P((struct net_data *net_data));
+extern void sethostent_p __P((int stayopen,
+ struct net_data *net_data));
+extern void endhostent_p __P((struct net_data *net_data));
+
+extern struct netent *getnetent_p __P((struct net_data *net_data));
+extern struct netent *getnetbyname_p __P((const char *name,
+ struct net_data *net_data));
+extern struct netent *getnetbyaddr_p __P((unsigned long net, int type,
+ struct net_data *net_data));
+extern void setnetent_p __P((int stayopen,
+ struct net_data *net_data));
+extern void endnetent_p __P((struct net_data *net_data));
+
+extern void setnetgrent_p __P((const char *netgroup,
+ struct net_data *net_data));
+extern void endnetgrent_p __P((struct net_data *net_data));
+extern int innetgr_p __P((const char *netgroup,
+ const char *host,
+ const char *user,
+ const char *domain,
+ struct net_data *net_data));
+extern int getnetgrent_p __P((char **host, char **user,
+ char **domain,
+ struct net_data *net_data));
+
+extern struct protoent *getprotoent_p __P((struct net_data *net_data));
+extern struct protoent *getprotobyname_p __P((const char *name,
+ struct net_data *net_data));
+extern struct protoent *getprotobynumber_p __P((int proto,
+ struct net_data *net_data));
+extern void setprotoent_p __P((int stayopen,
+ struct net_data *net_data));
+extern void endprotoent_p __P((struct net_data *net_data));
+
+
+extern struct passwd *getpwent_p __P((struct net_data *net_data));
+extern struct passwd *getpwnam_p __P((const char *name,
+ struct net_data *net_data));
+extern struct passwd *getpwuid_p __P((uid_t uid,
+ struct net_data *net_data));
+extern int setpassent_p __P((int stayopen,
+ struct net_data *net_data));
+extern void endpwent_p __P((struct net_data *net_data));
+
+#ifdef SETPWENT_VOID
+extern void setpwent_p __P((struct net_data *net_data));
+#else
+extern int setpwent_p __P((struct net_data *net_data));
+#endif
+
+extern struct servent *getservent_p __P((struct net_data *net_data));
+extern struct servent *getservbyname_p __P((const char *name,
+ const char *proto,
+ struct net_data *net_data));
+extern struct servent *getservbyport_p __P((int port, const char *proto,
+ struct net_data *net_data));
+extern void setservent_p __P((int stayopen,
+ struct net_data *net_data));
+extern void endservent_p __P((struct net_data *net_data));
#endif /*_IRS_H_INCLUDED*/
diff --git a/contrib/bind/include/isc/Makefile b/contrib/bind/include/isc/Makefile
index 4e8fc8c..b0184fc 100644
--- a/contrib/bind/include/isc/Makefile
+++ b/contrib/bind/include/isc/Makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 1996 by Internet Software Consortium
+# Copyright (c) 1996,1999 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
@@ -14,7 +14,7 @@
# SOFTWARE.
HFILES = eventlib.h misc.h tree.h logging.h heap.h memcluster.h \
- assertions.h list.h
+ assertions.h list.h dst.h irpmarshall.h
DESTDIR =
DESTINC = /usr/local/bind/include
@@ -28,7 +28,7 @@ clean: FRC
install: ${DESTDIR}${DESTINC}/isc
set -x; for x in ${HFILES}; do \
- ${INSTALL} -c -m 444 $$x ${DESTDIR}${DESTINC}/isc/$$x; \
+ ${INSTALL} -c ${INSTALL_INC} -m 444 $$x ${DESTDIR}${DESTINC}/isc/$$x; \
done
${DESTDIR}${DESTINC}/isc:
diff --git a/contrib/bind/include/isc/assertions.h b/contrib/bind/include/isc/assertions.h
index 95a9556..44089d1 100644
--- a/contrib/bind/include/isc/assertions.h
+++ b/contrib/bind/include/isc/assertions.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997 by Internet Software Consortium.
+ * Copyright (c) 1997-1999 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
@@ -16,7 +16,7 @@
*/
/*
- * $Id: assertions.h,v 8.1 1997/12/03 22:34:50 halley Exp $
+ * $Id: assertions.h,v 8.2 1999/01/08 19:23:01 vixie Exp $
*/
#ifndef ASSERTIONS_H
diff --git a/contrib/bind/include/isc/ctl.h b/contrib/bind/include/isc/ctl.h
new file mode 100644
index 0000000..3c6e565
--- /dev/null
+++ b/contrib/bind/include/isc/ctl.h
@@ -0,0 +1,104 @@
+#ifndef ISC_CTL_H
+#define ISC_CTL_H
+
+/*
+ * Copyright (c) 1998,1999 by Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+
+/*
+ * $Id: ctl.h,v 8.9 1999/08/08 20:16:45 vixie Exp $
+ */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <isc/eventlib.h>
+
+/* Macros. */
+
+#define CTL_MORE 0x0001 /* More will be / should be sent. */
+#define CTL_EXIT 0x0002 /* Close connection after this. */
+#define CTL_DATA 0x0004 /* Go into / this is DATA mode. */
+
+/* Types. */
+
+struct ctl_cctx;
+struct ctl_sctx;
+struct ctl_sess;
+struct ctl_verb;
+
+enum ctl_severity { ctl_debug, ctl_warning, ctl_error };
+
+typedef void (*ctl_logfunc)(enum ctl_severity, const char *fmt, ...);
+
+typedef void (*ctl_verbfunc)(struct ctl_sctx *, struct ctl_sess *,
+ const struct ctl_verb *, const char *rest,
+ u_int respflags, void *respctx, void *uctx);
+
+typedef void (*ctl_srvrdone)(struct ctl_sctx *, struct ctl_sess *, void *);
+
+typedef void (*ctl_clntdone)(struct ctl_cctx *, void *, const char *, u_int);
+
+struct ctl_verb {
+ const char * name;
+ ctl_verbfunc func;
+ const char * help;
+};
+
+/* General symbols. */
+
+#define ctl_logger __ctl_logger
+
+void ctl_logger(enum ctl_severity, const char *, ...);
+
+/* Client symbols. */
+
+#define ctl_client __ctl_client
+#define ctl_endclient __ctl_endclient
+#define ctl_command __ctl_command
+
+struct ctl_cctx * ctl_client(evContext, const struct sockaddr *, size_t,
+ const struct sockaddr *, size_t,
+ ctl_clntdone, void *,
+ u_int, ctl_logfunc);
+void ctl_endclient(struct ctl_cctx *);
+int ctl_command(struct ctl_cctx *, const char *, size_t,
+ ctl_clntdone, void *);
+
+/* Server symbols. */
+
+#define ctl_server __ctl_server
+#define ctl_endserver __ctl_endserver
+#define ctl_response __ctl_response
+#define ctl_sendhelp __ctl_sendhelp
+#define ctl_getcsctx __ctl_getcsctx
+#define ctl_setcsctx __ctl_setcsctx
+
+struct ctl_sctx * ctl_server(evContext, const struct sockaddr *, size_t,
+ const struct ctl_verb *,
+ u_int, u_int,
+ u_int, int, int,
+ ctl_logfunc, void *);
+void ctl_endserver(struct ctl_sctx *);
+void ctl_response(struct ctl_sess *, u_int,
+ const char *, u_int, void *,
+ ctl_srvrdone, void *,
+ const char *, size_t);
+void ctl_sendhelp(struct ctl_sess *, u_int);
+void * ctl_getcsctx(struct ctl_sess *);
+void * ctl_setcsctx(struct ctl_sess *, void *);
+
+#endif /*ISC_CTL_H*/
diff --git a/contrib/bind/include/isc/dst.h b/contrib/bind/include/isc/dst.h
new file mode 100644
index 0000000..9e68a10
--- /dev/null
+++ b/contrib/bind/include/isc/dst.h
@@ -0,0 +1,141 @@
+#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 */
+ u_int32_t dk_flags; /* and the flags of the public key */
+ u_int16_t 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 int len, /* length of input data */
+ u_char *signature, /* buffer to write signature to */
+ const int 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 int len, /* length of input data */
+ const u_char *signature,/* buffer containing signature */
+ const int sig_len); /* length of signature */
+
+
+DST_KEY *dst_read_key(const char *in_name, /* name of key */
+ const u_int16_t 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 int len); /* size of input buffer*/
+
+
+int dst_key_to_dnskey(const DST_KEY *key, /* key to translate */
+ u_char *out_storage, /* output buffer */
+ const int 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 int flags, /* dns flags */
+ const int protocol, /* dns protocol */
+ const u_char *key_buf, /* key in dns wire fmt */
+ const int key_len); /* size of key */
+
+
+int dst_key_to_buffer(DST_KEY *key, u_char *out_buff, int buf_len);
+
+DST_KEY *dst_generate_key(const char *name, /* name of new key */
+ const int alg, /* key algorithm to generate */
+ const int bits, /* size of new key */
+ const int exp, /* alg dependent parameter*/
+ const int flags, /* key DNS flags */
+ const int protocol); /* key DNS protocol */
+
+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, int 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 int rdata_len);
+u_int16_t dst_s_id_calc(const u_char *key_data, const int 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/bind/include/isc/eventlib.h b/contrib/bind/include/isc/eventlib.h
index 98a0f46..6b9b077 100644
--- a/contrib/bind/include/isc/eventlib.h
+++ b/contrib/bind/include/isc/eventlib.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 1996, 1997, 1998 by Internet Software Consortium
+ * Copyright (c) 1995-1999 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
@@ -18,7 +18,7 @@
/* eventlib.h - exported interfaces for eventlib
* vix 09sep95 [initial]
*
- * $Id: eventlib.h,v 1.19 1998/02/06 01:55:51 halley Exp $
+ * $Id: eventlib.h,v 1.22 1999/08/18 22:09:04 vixie Exp $
*/
#ifndef _EVENTLIB_H
@@ -47,6 +47,9 @@ typedef struct { void *opaque; } evWaitID;
typedef struct { void *opaque; } evContext;
typedef struct { void *opaque; } evEvent;
+#define evInitID(id) ((id)->opaque = NULL)
+#define evTestID(id) ((id).opaque != NULL)
+
typedef void (*evConnFunc)__P((evContext ctx, void *uap, int fd,
const void *la, int lalen,
const void *ra, int ralen));
@@ -82,6 +85,7 @@ typedef struct { unsigned char mask[256/8]; } evByteMask;
#define evDispatch __evDispatch
#define evDrop __evDrop
#define evMainLoop __evMainLoop
+#define evHighestFD __evHighestFD
int evCreate __P((evContext *ctx));
void evSetDebug __P((evContext ctx, int lev, FILE *out));
@@ -90,6 +94,7 @@ int evGetNext __P((evContext ctx, evEvent *ev, int options));
int evDispatch __P((evContext ctx, evEvent ev));
void evDrop __P((evContext ctx, evEvent ev));
int evMainLoop __P((evContext ctx));
+int evHighestFD __P((evContext ctx));
/* ev_connects.c */
#define evListen __evListen
diff --git a/contrib/bind/include/isc/heap.h b/contrib/bind/include/isc/heap.h
index 5df73e8..45c867c 100644
--- a/contrib/bind/include/isc/heap.h
+++ b/contrib/bind/include/isc/heap.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997 by Internet Software Consortium.
+ * Copyright (c) 1997,1999 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
diff --git a/contrib/bind/include/isc/irpmarshall.h b/contrib/bind/include/isc/irpmarshall.h
new file mode 100644
index 0000000..d8afe32
--- /dev/null
+++ b/contrib/bind/include/isc/irpmarshall.h
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 1999 by Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+
+/*
+ * $Id: irpmarshall.h,v 8.1 1999/01/18 07:46:47 vixie Exp $
+ */
+
+#ifndef _IRPMARSHALL_H_INCLUDED
+#define _IRPMARSHALL_H_INCLUDED
+
+/* Hide function names */
+#define irp_marshall_gr __irp_marshall_gr
+#define irp_marshall_ho __irp_marshall_ho
+#define irp_marshall_ne __irp_marshall_ne
+#define irp_marshall_ng __irp_marshall_ng
+#define irp_marshall_nw __irp_marshall_nw
+#define irp_marshall_pr __irp_marshall_pr
+#define irp_marshall_pw __irp_marshall_pw
+#define irp_marshall_sv __irp_marshall_sv
+#define irp_unmarshall_gr __irp_unmarshall_gr
+#define irp_unmarshall_ho __irp_unmarshall_ho
+#define irp_unmarshall_ne __irp_unmarshall_ne
+#define irp_unmarshall_ng __irp_unmarshall_ng
+#define irp_unmarshall_nw __irp_unmarshall_nw
+#define irp_unmarshall_pr __irp_unmarshall_pr
+#define irp_unmarshall_pw __irp_unmarshall_pw
+#define irp_unmarshall_sv __irp_unmarshall_sv
+
+#define MAXPADDRSIZE (sizeof "255.255.255.255" + 1)
+#define ADDR_T_STR(x) (x == AF_INET ? "AF_INET" :\
+ (x == AF_INET6 ? "AF_INET6" : "UNKNOWN"))
+
+/* See comment below on usage */
+int irp_marshall_pw(const struct passwd *pw, char **buffer, size_t *len);
+int irp_unmarshall_pw(struct passwd *pw, char *buffer);
+int irp_marshall_gr(const struct group *gr, char **buffer, size_t *len);
+int irp_unmarshall_gr(struct group *gr, char *buffer);
+int irp_marshall_sv(const struct servent *sv, char **buffer, size_t *len);
+int irp_unmarshall_sv(struct servent *sv, char *buffer);
+int irp_marshall_pr(struct protoent *pr, char **buffer, size_t *len);
+int irp_unmarshall_pr(struct protoent *pr, char *buffer);
+int irp_marshall_ho(struct hostent *ho, char **buffer, size_t *len);
+int irp_unmarshall_ho(struct hostent *ho, char *buffer);
+int irp_marshall_ng(const char *host, const char *user, const char *domain,
+ char **buffer, size_t *len);
+int irp_unmarshall_ng(char **host, char **user, char **domain, char *buffer);
+int irp_marshall_nw(struct nwent *ne, char **buffer, size_t *len);
+int irp_unmarshall_nw(struct nwent *ne, char *buffer);
+int irp_marshall_ne(struct netent *ne, char **buffer, size_t *len);
+int irp_unmarshall_ne(struct netent *ne, char *buffer);
+
+/*
+ * Functions to marshall and unmarshall various system data structures. We
+ * use a printable ascii format that is as close to various system config
+ * files as reasonable (e.g. /etc/passwd format).
+ *
+ * We are not forgiving with unmarhsalling misformatted buffers. In
+ * particular whitespace in fields is not ignored. So a formatted password
+ * entry "brister :1364:100:...." will yield a username of "brister "
+ *
+ * We potentially do a lot of mallocs to fill fields that are of type
+ * (char **) like a hostent h_addr field. Building (for example) the
+ * h_addr field and its associated addresses all in one buffer is
+ * certainly possible, but not done here.
+ *
+ * The following description is true for all the marshalling functions:
+ *
+ */
+
+/* int irp_marshall_XX(struct yyyy *XX, char **buffer, size_t *len);
+ *
+ * The argument XX (of type struct passwd for example) is marshalled in the
+ * buffer pointed at by *BUFFER, which is of length *LEN. Returns 0
+ * on success and -1 on failure. Failure will occur if *LEN is
+ * smaller than needed.
+ *
+ * If BUFFER is NULL, then *LEN is set to the size of the buffer
+ * needed to marshall the data and no marshalling is actually done.
+ *
+ * If *BUFFER is NULL, then a buffer large enough will be allocated
+ * with memget() and the size allocated will be stored in *LEN. An extra 2
+ * bytes will be allocated for the client to append CRLF if wanted. The
+ * value of *LEN will include these two bytes.
+ *
+ * All the marshalling functions produce a buffer with the fields
+ * separated by colons (except for the hostent marshalling, which uses '@'
+ * to separate fields). Fields that have multiple subfields (like the
+ * gr_mem field in struct group) have their subparts separated by
+ * commas.
+ */
+
+/*
+ * int irp_unmarshall_XX(struct YYYYY *XX, char *buffer);
+ *
+ * The unmashalling functions break apart the buffer and store the
+ * values in the struct pointed to by XX. All pointer values inside
+ * XX are allocated with malloc. All arrays of pointers have a NULL
+ * as the last element.
+ */
+
+#endif
diff --git a/contrib/bind/include/isc/list.h b/contrib/bind/include/isc/list.h
index b78ba4f..febfbf8 100644
--- a/contrib/bind/include/isc/list.h
+++ b/contrib/bind/include/isc/list.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997 by Internet Software Consortium.
+ * Copyright (c) 1997,1999 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
@@ -66,6 +66,7 @@
(elt)->link.prev->link.next = (elt)->link.next; \
else \
(list).head = (elt)->link.next; \
+ INIT_LINK(elt, link); \
} while (0)
#define PREV(elt, link) ((elt)->link.prev)
diff --git a/contrib/bind/include/isc/logging.h b/contrib/bind/include/isc/logging.h
index 5b11906..720e2a31 100644
--- a/contrib/bind/include/isc/logging.h
+++ b/contrib/bind/include/isc/logging.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 1997, 1998 by Internet Software Consortium.
+ * Copyright (c) 1996-1999 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
diff --git a/contrib/bind/include/isc/memcluster.h b/contrib/bind/include/isc/memcluster.h
index e5f0c75..b6f4191 100644
--- a/contrib/bind/include/isc/memcluster.h
+++ b/contrib/bind/include/isc/memcluster.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997 by Internet Software Consortium.
+ * Copyright (c) 1997,1999 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
@@ -24,10 +24,15 @@
#ifdef MEMCLUSTER_DEBUG
#define memget(s) __memget_debug(s, __FILE__, __LINE__)
#define memput(p, s) __memput_debug(p, s, __FILE__, __LINE__)
-#else
+#else /*MEMCLUSTER_DEBUG*/
+#ifdef MEMCLUSTER_RECORD
+#define memget(s) __memget_record(s, __FILE__, __LINE__)
+#define memput(p, s) __memput_record(p, s, __FILE__, __LINE__)
+#else /*MEMCLUSTER_RECORD*/
#define memget __memget
#define memput __memput
-#endif
+#endif /*MEMCLUSTER_RECORD*/
+#endif /*MEMCLUSTER_DEBUG*/
#define memstats __memstats
int meminit(size_t, size_t);
@@ -35,6 +40,8 @@ void * __memget(size_t);
void __memput(void *, size_t);
void * __memget_debug(size_t, const char *, int);
void __memput_debug(void *, size_t, const char *, int);
+void * __memget_record(size_t, const char *, int);
+void __memput_record(void *, size_t, const char *, int);
void memstats(FILE *);
#endif /* MEMCLUSTER_H */
diff --git a/contrib/bind/include/isc/misc.h b/contrib/bind/include/isc/misc.h
index 09b593f..d13e1d3 100644
--- a/contrib/bind/include/isc/misc.h
+++ b/contrib/bind/include/isc/misc.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 1996 by Internet Software Consortium
+ * Copyright (c) 1995-1999 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
@@ -16,7 +16,7 @@
*/
/*
- * $Id: misc.h,v 8.1 1996/11/12 03:19:13 vixie Exp $
+ * $Id: misc.h,v 8.2 1999/01/08 19:23:10 vixie Exp $
*/
#ifndef _ISC_MISC_H
diff --git a/contrib/bind/include/netdb.h b/contrib/bind/include/netdb.h
index 7527cc9..4ffefad 100644
--- a/contrib/bind/include/netdb.h
+++ b/contrib/bind/include/netdb.h
@@ -50,12 +50,43 @@
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
* -
+ * Portions Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * 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 WIDE Project and
+ * its contributors.
+ * 4. Neither the name of the project 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 PROJECT 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 PROJECT 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--
*/
/*
* @(#)netdb.h 8.1 (Berkeley) 6/2/93
- * $Id: netdb.h,v 8.9 1996/11/19 08:39:29 vixie Exp $
+ * $Id: netdb.h,v 8.15 1999/09/18 06:23:46 vixie Exp $
*/
#ifndef _NETDB_H_
@@ -66,16 +97,33 @@
# include <sys/bitypes.h>
#endif
#include <sys/cdefs.h>
+#include <netinet/in.h>
+#include <stdio.h>
#ifndef _PATH_HEQUIV
-# define _PATH_HEQUIV "/etc/hosts.equiv"
+#define _PATH_HEQUIV "/etc/hosts.equiv"
#endif
+#ifndef _PATH_HOSTS
#define _PATH_HOSTS "/etc/hosts"
+#endif
+#ifndef _PATH_NETWORKS
#define _PATH_NETWORKS "/etc/networks"
+#endif
+#ifndef _PATH_PROTOCOLS
#define _PATH_PROTOCOLS "/etc/protocols"
+#endif
+#ifndef _PATH_SERVICES
#define _PATH_SERVICES "/etc/services"
+#endif
+#ifdef _REENTRANT
+__BEGIN_DECLS
+extern int * __h_errno __P((void));
+__END_DECLS
+#define h_errno (*__h_errno())
+#else
extern int h_errno;
+#endif
/*
* Structures returned by network data base library. All addresses are
@@ -115,6 +163,17 @@ struct protoent {
int p_proto; /* protocol # */
};
+struct addrinfo {
+ int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
+ int ai_family; /* PF_xxx */
+ int ai_socktype; /* SOCK_xxx */
+ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
+ size_t ai_addrlen; /* length of ai_addr */
+ char *ai_canonname; /* canonical name for hostname */
+ struct sockaddr *ai_addr; /* binary address */
+ struct addrinfo *ai_next; /* next structure in linked list */
+};
+
/*
* Error return codes from gethostbyname() and gethostbyaddr()
* (left in extern int h_errno).
@@ -128,6 +187,148 @@ struct protoent {
#define NO_DATA 4 /* Valid name, no data record of requested type */
#define NO_ADDRESS NO_DATA /* no address, look for MX record */
+/*
+ * Error return codes from getaddrinfo()
+ */
+
+#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */
+#define EAI_AGAIN 2 /* temporary failure in name resolution */
+#define EAI_BADFLAGS 3 /* invalid value for ai_flags */
+#define EAI_FAIL 4 /* non-recoverable failure in name resolution */
+#define EAI_FAMILY 5 /* ai_family not supported */
+#define EAI_MEMORY 6 /* memory allocation failure */
+#define EAI_NODATA 7 /* no address associated with hostname */
+#define EAI_NONAME 8 /* hostname nor servname provided, or not known */
+#define EAI_SERVICE 9 /* servname not supported for ai_socktype */
+#define EAI_SOCKTYPE 10 /* ai_socktype not supported */
+#define EAI_SYSTEM 11 /* system error returned in errno */
+#define EAI_BADHINTS 12
+#define EAI_PROTOCOL 13
+#define EAI_MAX 14
+
+/*
+ * Flag values for getaddrinfo()
+ */
+#define AI_PASSIVE 0x00000001
+#define AI_CANONNAME 0x00000002
+#define AI_NUMERICHOST 0x00000004
+#define AI_MASK 0x00000007
+
+/*
+ * Flag values for getipnodebyname()
+ */
+#define AI_V4MAPPED 0x00000008
+#define AI_ALL 0x00000010
+#define AI_ADDRCONFIG 0x00000020
+#define AI_DEFAULT (AI_V4MAPPED|AI_ADDRCONFIG)
+
+/*
+ * Constants for getnameinfo()
+ */
+#define NI_MAXHOST 1025
+#define NI_MAXSERV 32
+
+/*
+ * Flag values for getnameinfo()
+ */
+#define NI_NOFQDN 0x00000001
+#define NI_NUMERICHOST 0x00000002
+#define NI_NAMEREQD 0x00000004
+#define NI_NUMERICSERV 0x00000008
+#define NI_DGRAM 0x00000010
+
+
+#ifdef _REENTRANT
+#if defined (__hpux) || defined(__osf__)
+#define _MAXALIASES 35
+#define _MAXLINELEN 1024
+#define _MAXADDRS 35
+#define _HOSTBUFSIZE (BUFSIZ + 1)
+
+struct hostent_data {
+ struct in_addr host_addr;
+ char *h_addr_ptrs[_MAXADDRS + 1];
+ char hostaddr[_MAXADDRS];
+ char hostbuf[_HOSTBUFSIZE];
+ char *host_aliases[_MAXALIASES];
+ char *host_addrs[2];
+ FILE *hostf;
+#ifdef __osf__
+ int svc_gethostflag;
+ int svc_gethostbind;
+#endif
+#ifdef __hpux
+ short _nsw_src;
+ short _flags;
+ char *current;
+ int currentlen;
+#endif
+};
+
+struct netent_data {
+ FILE *net_fp;
+#ifdef __osf__
+ char line[_MAXLINELEN];
+#endif
+#ifdef __hpux
+ char line[_MAXLINELEN+1];
+#endif
+ char *net_aliases[_MAXALIASES];
+#ifdef __osf__
+ int _net_stayopen;
+ int svc_getnetflag;
+#endif
+#ifdef __hpux
+ short _nsw_src;
+ short _flags;
+ char *current;
+ int currentlen;
+#endif
+};
+
+struct protoent_data {
+ FILE *proto_fp;
+#ifdef __osf__
+ char line[1024];
+#endif
+#ifdef __hpux
+ char line[_MAXLINELEN+1];
+#endif
+ char *proto_aliases[_MAXALIASES];
+#ifdef __osf__
+ int _proto_stayopen;
+ int svc_getprotoflag;
+#endif
+#ifdef __hpux
+ short _nsw_src;
+ short _flags;
+ char *current;
+ int currentlen;
+#endif
+};
+
+struct servent_data {
+ FILE *serv_fp;
+#ifdef __osf__
+ char line[_MAXLINELEN];
+#endif
+#ifdef __hpux
+ char line[_MAXLINELEN+1];
+#endif
+ char *serv_aliases[_MAXALIASES];
+#ifdef __osf__
+ int _serv_stayopen;
+ int svc_getservflag;
+#endif
+#ifdef __hpux
+ short _nsw_src;
+ short _flags;
+ char *current;
+ int currentlen;
+#endif
+};
+#endif
+#endif
__BEGIN_DECLS
void endhostent __P((void));
void endnetent __P((void));
@@ -153,6 +354,107 @@ void sethostent __P((int));
void setnetent __P((int));
void setprotoent __P((int));
void setservent __P((int));
+int getaddrinfo __P((const char *, const char *,
+ const struct addrinfo *, struct addrinfo **));
+int getnameinfo __P((const struct sockaddr *, size_t, char *,
+ size_t, char *, size_t, int));
+void freeaddrinfo __P((struct addrinfo *));
+char *gai_strerror __P((int));
+struct hostent *getipnodebyname __P((const char *, int, int, int *));
+struct hostent *getipnodebyaddr __P((const void *, size_t, int, int *));
+void freehostent __P((struct hostent *));
+
+
+#ifdef _REENTRANT
+#if defined(__hpux) || defined(__osf__)
+int gethostbyaddr_r __P((const char *, int, int, struct hostent *,
+ struct hostent_data *));
+int gethostbyname_r __P((const char *, struct hostent *,
+ struct hostent_data *));
+int gethostent_r __P((struct hostent *, struct hostent_data *));
+int sethostent_r __P((int, struct hostent_data *));
+#if defined(__hpux)
+int endhostent_r __P((struct hostent_data *));
+#else
+void endhostent_r __P((struct hostent_data *));
+#endif
+
+#ifdef __hpux
+int getnetbyaddr_r __P((int, int,
+ struct netent *, struct netent_data *));
+#else
+int getnetbyaddr_r __P((long, int,
+ struct netent *, struct netent_data *));
+#endif
+int getnetbyname_r __P((const char *,
+ struct netent *, struct netent_data *));
+int getnetent_r __P((struct netent *, struct netent_data *));
+int setnetent_r __P((int, struct netent_data *));
+#ifdef __hpux
+int endnetent_r __P((struct netent_data *buffer));
+#else
+void endnetent_r __P((struct netent_data *buffer));
+#endif
+
+int getprotobyname_r __P((const char *,
+ struct protoent *, struct protoent_data *));
+int getprotobynumber_r __P((int,
+ struct protoent *, struct protoent_data *));
+int getprotoent_r __P((struct protoent *, struct protoent_data *));
+int setprotoent_r __P((int, struct protoent_data *));
+#ifdef __hpux
+int endprotoent_r __P((struct protoent_data *));
+#else
+void endprotoent_r __P((struct protoent_data *));
+#endif
+
+int getservbyname_r __P((const char *, const char *,
+ struct servent *, struct servent_data *));
+int getservbyport_r __P((int, const char *,
+ struct servent *, struct servent_data *));
+int getservent_r __P((struct servent *, struct servent_data *));
+int setservent_r __P((int, struct servent_data *));
+#ifdef __hpux
+int endservent_r __P((struct servent_data *));
+#else
+void endservent_r __P((struct servent_data *));
+#endif
+#endif
+#if defined(sun) || defined(bsdi)
+struct hostent *gethostbyaddr_r __P((const char *, int, int, struct hostent *,
+ char *, int, int *));
+struct hostent *gethostbyname_r __P((const char *, struct hostent *,
+ char *, int, int *));
+struct hostent *gethostent_r __P((struct hostent *, char *, int, int *));
+void sethostent_r __P((int));
+void endhostent_r __P((void));
+
+struct netent *getnetbyname_r __P((const char *, struct netent *,
+ char *, int));
+struct netent *getnetbyaddr_r __P((long, int, struct netent *,
+ char *, int));
+struct netent *getnetent_r __P((struct netent *, char *, int));
+void setnetent_r __P((int));
+void endnetent_r __P((void));
+
+struct protoent *getprotobyname_r __P((const char *,
+ struct protoent *, char *, int));
+struct protoent *getprotobynumber_r __P((int,
+ struct protoent *, char *, int));
+struct protoent *getprotoent_r __P((struct protoent *, char *, int));
+void setprotoent_r __P((int));
+void endprotoent_r __P((void));
+
+struct servent *getservbyname_r __P((const char *name, const char *,
+ struct servent *, char *, int));
+struct servent *getservbyport_r __P((int port, const char *,
+ struct servent *, char *, int));
+struct servent *getservent_r __P((struct servent *, char *, int));
+void setservent_r __P((int));
+void endservent_r __P((void));
+
+#endif
+#endif
__END_DECLS
/* This is nec'y to make this include file properly replace the sun version. */
diff --git a/contrib/bind/include/res_update.h b/contrib/bind/include/res_update.h
new file mode 100644
index 0000000..cbbf9b8
--- /dev/null
+++ b/contrib/bind/include/res_update.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 1999 by Internet Software Consortium, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+
+/*
+ * $Id: res_update.h,v 8.1 1999/10/07 08:24:13 vixie Exp $
+ */
+
+#ifndef __RES_UPDATE_H
+#define __RES_UPDATE_H
+
+#include <sys/types.h>
+#include <arpa/nameser.h>
+#include <isc/list.h>
+#include <resolv.h>
+
+/*
+ * This RR-like structure is particular to UPDATE.
+ */
+struct ns_updrec {
+ 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 */
+ u_char * r_data; /* rdata fields as text string */
+ u_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 */
+ u_int r_zone; /* zone number on server */
+};
+typedef struct ns_updrec ns_updrec;
+typedef LIST(ns_updrec) ns_updque;
+
+#define res_mkupdate __res_mkupdate
+#define res_update __res_update
+#define res_mkupdrec __res_mkupdrec
+#define res_freeupdrec __res_freeupdrec
+#define res_nmkupdate __res_nmkupdate
+#define res_nupdate __res_nupdate
+
+int res_mkupdate __P((ns_updrec *, u_char *, int));
+int res_update __P((ns_updrec *));
+ns_updrec * res_mkupdrec __P((int, const char *, u_int, u_int, u_long));
+void res_freeupdrec __P((ns_updrec *));
+int res_nmkupdate __P((res_state, ns_updrec *, u_char *, int));
+int res_nupdate __P((res_state, ns_updrec *, ns_tsig_key *));
+
+#endif /*__RES_UPDATE_H*/
diff --git a/contrib/bind/include/resolv.h b/contrib/bind/include/resolv.h
index 3bfd6bb..3065313 100644
--- a/contrib/bind/include/resolv.h
+++ b/contrib/bind/include/resolv.h
@@ -32,7 +32,7 @@
*/
/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
+ * Portions Copyright (c) 1996-1999 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
@@ -50,7 +50,7 @@
/*
* @(#)resolv.h 8.1 (Berkeley) 6/2/93
- * $Id: resolv.h,v 8.12 1998/04/28 19:36:46 halley Exp $
+ * $Id: resolv.h,v 8.29 1999/10/07 08:24:14 vixie Exp $
*/
#ifndef _RESOLV_H_
@@ -73,16 +73,30 @@
* is new enough to contain a certain feature.
*/
-#define __RES 19960801
+#define __RES 19991006
/*
- * This used to be defined in res_query.c, now it's in herror.c. It was
- * never extern'd by any *.h file before it was placed here. herror.c is
- * part of libresolv.a even though it might make more sense in libnetdb.a
- * or even libnet.a.
+ * 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
*/
-extern int h_errno;
+#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.
@@ -94,6 +108,29 @@ extern int h_errno;
#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)__P((struct sockaddr_in * const *ns,
+ const u_char **query,
+ int *querylen,
+ u_char *ans,
+ int anssiz,
+ int *resplen));
+
+typedef res_sendhookact (*res_send_rhook)__P((const struct sockaddr_in *ns,
+ const u_char *query,
+ int querylen,
+ u_char *ans,
+ int 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.
*/
@@ -105,6 +142,9 @@ extern int h_errno;
#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 */
@@ -125,9 +165,25 @@ struct __res_state {
struct in_addr addr;
u_int32_t mask;
} sort_list[MAXRESOLVSORT];
- char pad[72]; /* On an i386 this means 512b total. */
+ 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)
*/
@@ -145,6 +201,9 @@ struct __res_state {
#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)
@@ -168,81 +227,110 @@ struct __res_state {
#define RES_PRF_INIT 0x00004000
/* 0x00008000 */
-typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
- res_sendhookact;
-
-typedef res_sendhookact (*res_send_qhook)__P((struct sockaddr_in * const *ns,
- const u_char **query,
- int *querylen,
- u_char *ans,
- int anssiz,
- int *resplen));
+/* 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
-typedef res_sendhookact (*res_send_rhook)__P((const struct sockaddr_in *ns,
- const u_char *query,
- int querylen,
- u_char *ans,
- int anssiz,
- int *resplen));
+#ifndef __BIND_NOSTATIC
+#define fp_nquery __fp_nquery
+#define fp_query __fp_query
+#define hostalias __hostalias
+#define p_query __p_query
+#define res_close __res_close
+#define res_init __res_init
+#define res_isourserver __res_isourserver
+#define res_mkquery __res_mkquery
+#define res_query __res_query
+#define res_querydomain __res_querydomain
+#define res_search __res_search
+#define res_send __res_send
+#define res_sendsigned __res_sendsigned
-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" */
-};
+__BEGIN_DECLS
+void fp_nquery __P((const u_char *, int, FILE *));
+void fp_query __P((const u_char *, FILE *));
+const char * hostalias __P((const char *));
+void p_query __P((const u_char *));
+void res_close __P((void));
+int res_init __P((void));
+int res_isourserver __P((const struct sockaddr_in *));
+int res_mkquery __P((int, const char *, int, int, const u_char *,
+ int, const u_char *, u_char *, int));
+int res_query __P((const char *, int, int, u_char *, int));
+int res_querydomain __P((const char *, const char *, int, int,
+ u_char *, int));
+int res_search __P((const char *, int, int, u_char *, int));
+int res_send __P((const u_char *, int, u_char *, int));
+int res_sendsigned __P((const u_char *, int, ns_tsig_key *,
+ u_char *, int));
+__END_DECLS
+#endif
-extern struct __res_state _res;
+#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 */
-#define res_hnok __res_hnok
-#define res_ownok __res_ownok
-#define res_mailok __res_mailok
-#define res_dnok __res_dnok
-#define sym_ston __sym_ston
-#define sym_ntos __sym_ntos
-#define sym_ntop __sym_ntop
#define b64_ntop __b64_ntop
-#define b64_pton __b64_pton
-#define loc_ntoa __loc_ntoa
+#define b64_pton __b64_pton
+#define dn_comp __dn_comp
+#define dn_count_labels __dn_count_labels
+#define dn_expand __dn_expand
+#define dn_skipname __dn_skipname
+#define fp_resstat __fp_resstat
#define loc_aton __loc_aton
-#define fp_resstat __fp_resstat
-#define p_query __p_query
-#define dn_skipname __dn_skipname
-#define fp_resstat __fp_resstat
-#define fp_query __fp_query
-#define fp_nquery __fp_nquery
-#define hostalias __hostalias
-#define putlong __putlong
-#define putshort __putshort
+#define loc_ntoa __loc_ntoa
+#define p_cdname __p_cdname
+#define p_cdnname __p_cdnname
#define p_class __p_class
+#define p_fqname __p_fqname
+#define p_fqnname __p_fqnname
+#define p_option __p_option
+#define p_secstodate __p_secstodate
+#define p_section __p_section
#define p_time __p_time
#define p_type __p_type
-#define p_query __p_query
-#define p_cdnname __p_cdnname
-#define p_section __p_section
-#define p_cdname __p_cdname
-#define p_fqnname __p_fqnname
-#define p_fqname __p_fqname
-#define p_option __p_option
-#define p_secstodate __p_secstodate
-#define dn_count_labels __dn_count_labels
-#define dn_comp __dn_comp
-#define dn_expand __dn_expand
-#define res_init __res_init
-#define res_randomid __res_randomid
-#define res_query __res_query
-#define res_search __res_search
-#define res_querydomain __res_querydomain
-#define res_mkquery __res_mkquery
-#define res_send __res_send
-#define res_isourserver __res_isourserver
-#define res_nameinquery __res_nameinquery
-#define res_queriesmatch __res_queriesmatch
-#define res_close __res_close
-#define res_mkupdate __res_mkupdate
-#define res_mkupdrec __res_mkupdrec
-#define res_freeupdrec __res_freeupdrec
+#define p_rcode __p_rcode
+#define putlong __putlong
+#define putshort __putshort
+#define res_dnok __res_dnok
+#define res_findzonecut __res_findzonecut
+#define res_hnok __res_hnok
+#define res_hostalias __res_hostalias
+#define res_mailok __res_mailok
+#define res_nameinquery __res_nameinquery
+#define res_nclose __res_nclose
+#define res_ninit __res_ninit
+#define res_nmkquery __res_nmkquery
+#define res_npquery __res_npquery
+#define res_nquery __res_nquery
+#define res_nquerydomain __res_nquerydomain
+#define res_nsearch __res_nsearch
+#define res_nsend __res_nsend
+#define res_nsendsigned __res_nsendsigned
+#define res_nisourserver __res_nisourserver
+#define res_ownok __res_ownok
+#define res_queriesmatch __res_queriesmatch
+#define res_randomid __res_randomid
+#define sym_ntop __sym_ntop
+#define sym_ntos __sym_ntos
+#define sym_ston __sym_ston
__BEGIN_DECLS
int res_hnok __P((const char *));
int res_ownok __P((const char *));
@@ -256,16 +344,12 @@ int b64_pton __P((char const *, u_char *, size_t));
int loc_aton __P((const char *ascii, u_char *binary));
const char * loc_ntoa __P((const u_char *binary, char *ascii));
int dn_skipname __P((const u_char *, const u_char *));
-void fp_resstat __P((struct __res_state *, FILE *));
-void fp_query __P((const u_char *, FILE *));
-void fp_nquery __P((const u_char *, int, FILE *));
-const char * hostalias __P((const char *));
void putlong __P((u_int32_t, u_char *));
void putshort __P((u_int16_t, u_char *));
const char * p_class __P((int));
const char * p_time __P((u_int32_t));
const char * p_type __P((int));
-void p_query __P((const u_char *));
+const char * p_rcode __P((int));
const u_char * p_cdnname __P((const u_char *, const u_char *, int, FILE *));
const u_char * p_cdname __P((const u_char *, const u_char *, FILE *));
const u_char * p_fqnname __P((const u_char *cp, const u_char *msg,
@@ -278,26 +362,36 @@ int dn_comp __P((const char *, u_char *, int,
u_char **, u_char **));
int dn_expand __P((const u_char *, const u_char *, const u_char *,
char *, int));
-int res_init __P((void));
u_int res_randomid __P((void));
-int res_query __P((const char *, int, int, u_char *, int));
-int res_search __P((const char *, int, int, u_char *, int));
-int res_querydomain __P((const char *, const char *, int, int,
- u_char *, int));
-int res_mkquery __P((int, const char *, int, int, const u_char *,
- int, const u_char *, u_char *, int));
-int res_send __P((const u_char *, int, u_char *, int));
-int res_isourserver __P((const struct sockaddr_in *));
int res_nameinquery __P((const char *, int, int,
const u_char *, const u_char *));
int res_queriesmatch __P((const u_char *, const u_char *,
const u_char *, const u_char *));
-void res_close __P((void));
const char * p_section __P((int section, int opcode));
-int res_update __P((ns_updrec *));
-int res_mkupdate __P((ns_updrec *, u_char *, int));
-ns_updrec * res_mkupdrec __P((int, const char *, u_int, u_int, u_long));
-void res_freeupdrec __P((ns_updrec *));
+/* Things involving a resolver context. */
+int res_ninit __P((res_state));
+int res_nisourserver __P((const res_state,
+ const struct sockaddr_in *));
+void fp_resstat __P((const res_state, FILE *));
+void res_npquery __P((const res_state, const u_char *, int, FILE *));
+const char * res_hostalias __P((const res_state, const char *,
+ char *, size_t));
+int res_nquery __P((res_state,
+ const char *, int, int, u_char *, int));
+int res_nsearch __P((res_state, const char *, int,
+ int, u_char *, int));
+int res_nquerydomain __P((res_state,
+ const char *, const char *, int, int,
+ u_char *, int));
+int res_nmkquery __P((res_state,
+ int, const char *, int, int, const u_char *,
+ int, const u_char *, u_char *, int));
+int res_nsend __P((res_state, const u_char *, int, u_char *, int));
+int res_nsendsigned __P((res_state, const u_char *, int,
+ ns_tsig_key *, u_char *, int));
+int res_findzonecut __P((res_state, const char *, ns_class, int,
+ char *, size_t, struct in_addr *, int));
+void res_nclose __P((res_state));
__END_DECLS
#endif /* !_RESOLV_H_ */
OpenPOWER on IntegriCloud