Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/usr.sbin/dhcp Pull up revision 1.1.1.3 (requested by me...
details: https://anonhg.NetBSD.org/src/rev/ee2528da49b8
branches: netbsd-1-5
changeset: 491107:ee2528da49b8
user: he <he%NetBSD.org@localhost>
date: Wed Apr 04 20:56:26 2001 +0000
description:
Pull up revision 1.1.1.3 (requested by mellon):
Update DHCP software to ISC version 3, Beta 2, Patchlevel 23.
diffstat:
usr.sbin/dhcp/includes/cf/rhapsody.h | 1 +
usr.sbin/dhcp/includes/isc/result.h | 123 +++++++++++++++++++-------------
usr.sbin/dhcp/includes/statement.h | 2 +
usr.sbin/dhcp/minires/Makefile.dist | 6 +-
usr.sbin/dhcp/minires/res_mkquery.c | 22 +++--
usr.sbin/dhcp/minires/res_mkupdate.c | 39 +++++----
usr.sbin/dhcp/minires/res_query.c | 95 +++++++++++++++----------
usr.sbin/dhcp/minires/res_send.c | 66 +++++++++++------
usr.sbin/dhcp/minires/res_sendsigned.c | 62 ++++++---------
usr.sbin/dhcp/omapip/result.c | 20 +++++-
10 files changed, 252 insertions(+), 184 deletions(-)
diffs (truncated from 991 to 300 lines):
diff -r b9df1e53f7a8 -r ee2528da49b8 usr.sbin/dhcp/includes/cf/rhapsody.h
--- a/usr.sbin/dhcp/includes/cf/rhapsody.h Wed Apr 04 20:56:24 2001 +0000
+++ b/usr.sbin/dhcp/includes/cf/rhapsody.h Wed Apr 04 20:56:26 2001 +0000
@@ -59,6 +59,7 @@
#include <net/if_dl.h>
#include <net/route.h>
#include <sys/sockio.h>
+#import <net/if_arp.h>
#define ifr_netmask ifr_addr
diff -r b9df1e53f7a8 -r ee2528da49b8 usr.sbin/dhcp/includes/isc/result.h
--- a/usr.sbin/dhcp/includes/isc/result.h Wed Apr 04 20:56:24 2001 +0000
+++ b/usr.sbin/dhcp/includes/isc/result.h Wed Apr 04 20:56:26 2001 +0000
@@ -25,58 +25,79 @@
ISC_LANG_BEGINDECLS
-#define ISC_R_SUCCESS 0
-#define ISC_R_NOMEMORY 1
-#define ISC_R_TIMEDOUT 2
-#define ISC_R_NOTHREADS 3
-#define ISC_R_ADDRNOTAVAIL 4
-#define ISC_R_ADDRINUSE 5
-#define ISC_R_NOPERM 6
-#define ISC_R_NOCONN 7
-#define ISC_R_NETUNREACH 8
-#define ISC_R_HOSTUNREACH 9
-#define ISC_R_NETDOWN 10
-#define ISC_R_HOSTDOWN 11
-#define ISC_R_CONNREFUSED 12
-#define ISC_R_NORESOURCES 13 /* not enough resources */
-#define ISC_R_EOF 14 /* end of file */
-#define ISC_R_BOUND 15 /* already bound */
-#define ISC_R_TASKDONE 16 /* task is done */
-#define ISC_R_LOCKBUSY 17
-#define ISC_R_EXISTS 18
-#define ISC_R_NOSPACE 19 /* ran out of space */
-#define ISC_R_CANCELED 20
-#define ISC_R_TASKNOSEND 21
-#define ISC_R_SHUTTINGDOWN 22 /* shutting down */
-#define ISC_R_NOTFOUND 23
-#define ISC_R_UNEXPECTEDEND 24 /* unexpected end of input */
-#define ISC_R_FAILURE 25 /* generic failure */
-#define ISC_R_IOERROR 26
-#define ISC_R_NOTIMPLEMENTED 27
-#define ISC_R_UNBALANCED 28
-#define ISC_R_NOMORE 29
-#define ISC_R_INVALIDFILE 30
-#define ISC_R_BADBASE64 31
-#define ISC_R_UNEXPECTEDTOKEN 32
-#define ISC_R_QUOTA 33
-#define ISC_R_UNEXPECTED 34
-#define ISC_R_ALREADYRUNNING 35
-#define ISC_R_HOSTUNKNOWN 36
-#define ISC_R_VERSIONMISMATCH 37
-#define ISC_R_PROTOCOLERROR 38
-#define ISC_R_INVALIDARG 39
-#define ISC_R_NOTCONNECTED 40
-#define ISC_R_NOTYET 41
-#define ISC_R_UNCHANGED 42
-#define ISC_R_MULTIPLE 43
-#define ISC_R_KEYCONFLICT 44
-#define ISC_R_BADPARSE 45
-#define ISC_R_NOKEYS 46
-#define ISC_R_KEY_UNKNOWN 47
-#define ISC_R_INVALIDKEY 48
-#define ISC_R_INCOMPLETE 49
+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_result_t;
-#define ISC_R_NRESULTS 50 /* Number of results */
+
+#define ISC_R_NRESULTS 68 /* Number of results */
const char * isc_result_totext(isc_result_t);
isc_result_t isc_result_register(unsigned int base,
diff -r b9df1e53f7a8 -r ee2528da49b8 usr.sbin/dhcp/includes/statement.h
--- a/usr.sbin/dhcp/includes/statement.h Wed Apr 04 20:56:24 2001 +0000
+++ b/usr.sbin/dhcp/includes/statement.h Wed Apr 04 20:56:26 2001 +0000
@@ -45,6 +45,7 @@
int refcnt;
struct executable_statement *next;
enum statement_op {
+ null_statement,
if_statement,
add_statement,
eval_statement,
@@ -84,6 +85,7 @@
# define ON_COMMIT 1
# define ON_EXPIRY 2
# define ON_RELEASE 4
+# define ON_TRANSMISSION 8
struct executable_statement *statements;
} on;
struct {
diff -r b9df1e53f7a8 -r ee2528da49b8 usr.sbin/dhcp/minires/Makefile.dist
--- a/usr.sbin/dhcp/minires/Makefile.dist Wed Apr 04 20:56:24 2001 +0000
+++ b/usr.sbin/dhcp/minires/Makefile.dist Wed Apr 04 20:56:26 2001 +0000
@@ -23,14 +23,12 @@
SRC = res_mkupdate.c res_init.c res_update.c res_send.c res_comp.c \
res_sendsigned.c res_findzonecut.c res_query.c res_mkquery.c \
ns_date.c ns_parse.c ns_sign.c ns_name.c ns_samedomain.c ns_verify.c \
- dst_api.c hmac_link.c md5_dgst.c prandom.c support.c base64.c
+ toisc.c
OBJ = res_mkupdate.o res_init.o res_update.o res_send.o res_comp.o \
res_sendsigned.o res_findzonecut.o res_query.o res_mkquery.o \
ns_date.o ns_parse.o ns_sign.o ns_name.o ns_samedomain.o ns_verify.o \
- dst_api.o hmac_link.o md5_dgst.o prandom.o support.o base64.o
-HDRS = dst_internal.h md5.h md5_locl.h
+ toisc.o
-DEBUG = -g
INCLUDES = $(BINDINC) -I$(TOP)/includes
CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS) -DHMAC_MD5 -DMINIRES_LIB
diff -r b9df1e53f7a8 -r ee2528da49b8 usr.sbin/dhcp/minires/res_mkquery.c
--- a/usr.sbin/dhcp/minires/res_mkquery.c Wed Apr 04 20:56:24 2001 +0000
+++ b/usr.sbin/dhcp/minires/res_mkquery.c Wed Apr 04 20:56:26 2001 +0000
@@ -70,7 +70,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_mkquery.c,v 1.1.1.1.4.2 2000/10/18 04:11:29 tv Exp $";
+static const char rcsid[] = "$Id: res_mkquery.c,v 1.1.1.1.4.3 2001/04/04 20:56:27 he Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -90,7 +90,7 @@
* Form all types of queries.
* Returns the size of the result or -1.
*/
-int
+isc_result_t
res_nmkquery(res_state statp,
int op, /* opcode of query */
const char *dname, /* domain name */
@@ -99,7 +99,8 @@
unsigned datalen, /* length of data */
const u_char *newrr_in, /* new rr for modify or append */
double *buf, /* buffer to put query */
- unsigned buflen) /* size of buffer */
+ unsigned buflen, /* size of buffer */
+ unsigned *rbuflen) /* returned size of buffer */
{
register HEADER *hp;
register u_char *cp;
@@ -110,7 +111,7 @@
* Initialize header fields.
*/
if ((buf == NULL) || (buflen < HFIXEDSZ))
- return (-1);
+ return ISC_R_INVALIDARG;
memset(buf, 0, HFIXEDSZ);
hp = (HEADER *) buf;
hp->id = htons(++statp->id);
@@ -130,9 +131,9 @@
case QUERY: /*FALLTHROUGH*/
case NS_NOTIFY_OP:
if ((buflen -= QFIXEDSZ) < 0)
- return (-1);
+ return ISC_R_NOSPACE;
if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
- return (-1);
+ return ISC_R_NOSPACE;
cp += n;
buflen -= n;
putUShort(cp, type);
@@ -148,7 +149,7 @@
buflen -= RRFIXEDSZ;
n = dn_comp((const char *)data, cp, buflen, dnptrs, lastdnptr);
if (n < 0)
- return (-1);
+ return ISC_R_NOSPACE;
cp += n;
buflen -= n;
putUShort(cp, T_NULL);
@@ -167,7 +168,7 @@
* Initialize answer section
*/
if (buflen < 1 + RRFIXEDSZ + datalen)
- return (-1);
+ return ISC_R_NOSPACE;
*cp++ = '\0'; /* no domain name */
putUShort(cp, type);
cp += INT16SZ;
@@ -185,7 +186,8 @@
break;
default:
- return (-1);
+ return ISC_R_NOTIMPLEMENTED;
}
- return (cp - ((u_char *)buf));
+ *rbuflen = cp - ((u_char *)buf);
+ return ISC_R_SUCCESS;
}
diff -r b9df1e53f7a8 -r ee2528da49b8 usr.sbin/dhcp/minires/res_mkupdate.c
--- a/usr.sbin/dhcp/minires/res_mkupdate.c Wed Apr 04 20:56:24 2001 +0000
+++ b/usr.sbin/dhcp/minires/res_mkupdate.c Wed Apr 04 20:56:26 2001 +0000
@@ -21,7 +21,7 @@
*/
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_mkupdate.c,v 1.1.1.1.4.2 2000/10/18 04:11:29 tv Exp $";
+static const char rcsid[] = "$Id: res_mkupdate.c,v 1.1.1.1.4.3 2001/04/04 20:56:27 he Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -47,10 +47,12 @@
#define DEBUG
#define MAXPORT 1024
-static int getnum_str(u_char **, u_char *);
-static int gethexnum_str(u_char **, u_char *);
-static int getword_str(char *, int, u_char **, u_char *);
-static int getstr_str(char *, int, u_char **, u_char *);
+static int getnum_str(const u_char **, const u_char *);
+static int gethexnum_str(const u_char **, const u_char *);
+static int getword_str(char *, int,
+ const unsigned char **,
+ const unsigned char *);
+static int getstr_str(char *, int, const u_char **, const u_char *);
struct valuelist {
struct valuelist * next;
@@ -88,9 +90,9 @@
ns_updrec *rrecp_in, double *bp, unsigned *blp) {
ns_updrec *rrecp_start = rrecp_in;
HEADER *hp;
- u_char *cp, *sp1, *sp2, *startp, *endp;
- int i, soanum, multiline;
Home |
Main Index |
Thread Index |
Old Index