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.6 (requested by me...
details: https://anonhg.NetBSD.org/src/rev/f0ac13f2366f
branches: netbsd-1-5
changeset: 491092:f0ac13f2366f
user: he <he%NetBSD.org@localhost>
date: Wed Apr 04 20:55:32 2001 +0000
description:
Pull up revision 1.1.1.6 (requested by mellon):
Update DHCP software to ISC version 3, Beta 2, Patchlevel 23.
diffstat:
usr.sbin/dhcp/client/dhclient.conf.5 | 45 +++++--
usr.sbin/dhcp/includes/minires/minires.h | 74 +++++++-----
usr.sbin/dhcp/includes/omapip/omapip.h | 79 +++++++++++++-
usr.sbin/dhcp/minires/res_findzonecut.c | 174 ++++++++++++++++--------------
usr.sbin/dhcp/minires/res_update.c | 37 +++---
usr.sbin/dhcp/omapip/support.c | 9 +-
usr.sbin/dhcp/server/stables.c | 101 ++++++++++++++++-
7 files changed, 363 insertions(+), 156 deletions(-)
diffs (truncated from 991 to 300 lines):
diff -r 3d62de5b8bfa -r f0ac13f2366f usr.sbin/dhcp/client/dhclient.conf.5
--- a/usr.sbin/dhcp/client/dhclient.conf.5 Wed Apr 04 20:55:28 2001 +0000
+++ b/usr.sbin/dhcp/client/dhclient.conf.5 Wed Apr 04 20:55:32 2001 +0000
@@ -1,20 +1,39 @@
.\" dhclient.conf.5
.\"
-.\" Copyright (c) 1996-1999 Internet Software Consortium.
-.\" Use is subject to license terms which appear in the file named
-.\" ISC-LICENSE that should have accompanied this file when you
-.\" received it. If a file named ISC-LICENSE did not accompany this
-.\" file, or you are not sure the one you have is correct, you may
-.\" obtain an applicable copy of the license at:
+.\" Copyright (c) 1996-2001 Internet Software Consortium.
+.\" 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. Neither the name of The Internet Software Consortium nor the names
+.\" of its contributors may be used to endorse or promote products derived
+.\" from this software without specific prior written permission.
.\"
-.\" http://www.isc.org/isc-license-1.0.html.
+.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
.\"
-.\" This file is part of the ISC DHCP distribution. The documentation
-.\" associated with this file is listed in the file DOCUMENTATION,
-.\" included in the top-level directory of this release.
-.\"
-.\" Support and other services are available for ISC products - see
-.\" http://www.isc.org for more information.
+.\" This software has been written for the Internet Software Consortium
+.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
+.\" To learn more about the Internet Software 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''.
.TH dhclient.conf 5
.SH NAME
dhclient.conf - DHCP client configuration file
diff -r 3d62de5b8bfa -r f0ac13f2366f usr.sbin/dhcp/includes/minires/minires.h
--- a/usr.sbin/dhcp/includes/minires/minires.h Wed Apr 04 20:55:28 2001 +0000
+++ b/usr.sbin/dhcp/includes/minires/minires.h Wed Apr 04 20:55:32 2001 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000 by Internet Software Consortium.
+ * Copyright (c) 2001 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,6 +20,7 @@
#include "minires/resolv.h"
#include "minires/res_update.h"
+#include "isc/result.h"
/*
* Based on the Dynamic DNS reference implementation by Viraj Bais
@@ -32,8 +33,9 @@
unsigned int, unsigned long);
void minires_freeupdrec (ns_updrec *);
int minires_nmkupdate (res_state, ns_updrec *, double *, unsigned *);
-ns_rcode minires_nupdate (res_state, ns_updrec *);
+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
@@ -118,12 +120,12 @@
u_int32_t ns_datetosecs (const char *cp, int *errp);
int b64_pton (char const *, unsigned char *, size_t);
unsigned int res_randomid (void);
-ns_rcode res_findzonecut (res_state, const char *, ns_class, int, char *,
- size_t, struct in_addr *, int, int *, void *);
-int res_nsend (res_state,
- double *, unsigned, double *, unsigned);
-int res_nsendsigned (res_state, double *,
- unsigned, ns_tsig_key *, double *, unsigned);
+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 *);
@@ -135,27 +137,29 @@
void res_close (void);
void res_nclose (res_state);
int res_ourserver_p (const res_state, const struct sockaddr_in *);
-int ns_sign (unsigned char *, unsigned *,
- unsigned, int, void *, const unsigned char *,
- unsigned, unsigned char *, unsigned *, time_t);
+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);
-int ns_makecanon (const char *, char *, size_t);
-int ns_parserr (ns_msg *, ns_sect, int, ns_rr *);
+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);
-int res_nmkquery (res_state, int,
- const char *, ns_class, ns_type, const unsigned char *,
- unsigned, const unsigned char *, double *, unsigned);
+isc_result_t res_nmkquery (res_state, int, const char *, ns_class, ns_type,
+ const unsigned char *, unsigned,
+ const unsigned char *, double *,
+ unsigned, unsigned *);
int ns_initparse (const unsigned char *, unsigned, ns_msg *);
-int res_nquery(res_state, const char *,
- ns_class, ns_type, double *, unsigned anslen);
-int res_nsearch(res_state, const char *,
- ns_class, ns_type, double *, unsigned);
+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);
-int res_nquerydomain(res_state, const char *, const char *,
- ns_class class, ns_type type, double *, unsigned);
+isc_result_t res_nquerydomain(res_state, const char *, const char *,
+ ns_class class, ns_type type,
+ double *, unsigned, unsigned *);
int ns_skiprr(const unsigned char *, const unsigned char *, ns_sect, int);
int dn_skipname (const unsigned char *, const unsigned char *);
@@ -170,10 +174,10 @@
void putShort (unsigned char *, int32_t);
void putUChar (unsigned char *, u_int32_t);
int ns_name_ntol (const unsigned char *, unsigned char *, size_t);
-int ns_sign_tcp_init (void *,
- const unsigned char *, unsigned, ns_tcp_tsig_state *);
-int ns_sign_tcp (unsigned char *,
- unsigned *, unsigned, int, ns_tcp_tsig_state *, int);
+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 *,
@@ -185,11 +189,13 @@
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 *);
-int ns_verify (unsigned char *, unsigned *, void *, const unsigned char *,
- unsigned, unsigned char *, unsigned *, time_t *, int);
-int ns_verify_tcp_init (void *,
- const unsigned char *, unsigned, ns_tcp_tsig_state *);
-int ns_verify_tcp (unsigned char *, unsigned *, ns_tcp_tsig_state *, int);
+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 *,
@@ -198,6 +204,8 @@
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)
@@ -207,3 +215,7 @@
#define USE_MD5
#endif
+
+#if defined (TRACING)
+void trace_mr_statp_setup (res_state);
+#endif
diff -r 3d62de5b8bfa -r f0ac13f2366f usr.sbin/dhcp/includes/omapip/omapip.h
--- a/usr.sbin/dhcp/includes/omapip/omapip.h Wed Apr 04 20:55:28 2001 +0000
+++ b/usr.sbin/dhcp/includes/omapip/omapip.h Wed Apr 04 20:55:32 2001 +0000
@@ -3,7 +3,7 @@
Definitions for the object management API and protocol... */
/*
- * Copyright (c) 1996-1999 Internet Software Consortium.
+ * Copyright (c) 1996-2001 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -192,6 +192,75 @@
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_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_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; \
+ 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 *,
@@ -520,4 +589,12 @@
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_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_ */
Home |
Main Index |
Thread Index |
Old Index