diff options
author | ume <ume@FreeBSD.org> | 2006-05-21 11:19:36 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2006-05-21 11:19:36 +0000 |
commit | 2103e7a60f93b5663802fad9b458412411640d7c (patch) | |
tree | c1044e7b7cb8c4f2ee0140e9bd313cfdfe850d2a /include | |
parent | 0cedd121cc954b5d6234228b0747f25f402fb62e (diff) | |
download | FreeBSD-src-2103e7a60f93b5663802fad9b458412411640d7c.zip FreeBSD-src-2103e7a60f93b5663802fad9b458412411640d7c.tar.gz |
Upgrade res_update(3) and the friends to BIND9's one excluding TSIG
support.
X-MFC after: never
Diffstat (limited to 'include')
-rw-r--r-- | include/arpa/nameser.h | 4 | ||||
-rw-r--r-- | include/res_update.h | 98 | ||||
-rw-r--r-- | include/resolv.h | 4 |
3 files changed, 51 insertions, 55 deletions
diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h index f0d4ff9..26d2404 100644 --- a/include/arpa/nameser.h +++ b/include/arpa/nameser.h @@ -507,7 +507,9 @@ typedef enum __ns_cert_types { #define ns_verify __ns_verify #define ns_verify_tcp __ns_verify_tcp #define ns_verify_tcp_init __ns_verify_tcp_init +#endif #define ns_samedomain __ns_samedomain +#if 0 #define ns_subdomain __ns_subdomain #endif #define ns_makecanon __ns_makecanon @@ -567,7 +569,9 @@ int ns_verify(u_char *, int *, void *, int ns_verify_tcp(u_char *, int *, ns_tcp_tsig_state *, int); int ns_verify_tcp_init(void *, const u_char *, int, ns_tcp_tsig_state *); +#endif int ns_samedomain(const char *, const char *); +#if 0 int ns_subdomain(const char *, const char *); #endif int ns_makecanon(const char *, char *, size_t); diff --git a/include/res_update.h b/include/res_update.h index b6675b2..9a0cc94 100644 --- a/include/res_update.h +++ b/include/res_update.h @@ -1,79 +1,71 @@ -/*- - * Copyright (c) 1983, 1987, 1989, 1993 - * The Regents of the University of California. All rights reserved. +/* + * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1999 by Internet Software Consortium, Inc. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * 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. * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * $Id: res_update.h,v 1.1.206.1 2004/03/09 08:33:29 marka Exp $ + * $FreeBSD$ */ -/* $FreeBSD$ */ +#ifndef __RES_UPDATE_H +#define __RES_UPDATE_H -#ifndef _RES_UPDATE_H_ -#define _RES_UPDATE_H_ +#include <sys/types.h> +#include <arpa/nameser.h> +#include <resolv.h> /* * This RR-like structure is particular to UPDATE. */ 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 */ + struct { + struct ns_updrec *prev; + struct ns_updrec *next; + } r_link, r_glink; + ns_sect 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 */ + 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_int16_t r_size; /* size of r_data field */ + 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 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 */ + u_int r_zone; /* zone number on server */ }; typedef struct ns_updrec ns_updrec; +typedef struct { + ns_updrec *head; + ns_updrec *tail; +} ns_updque; -#define res_freeupdrec __res_freeupdrec -#define res_mkupdate __res_mkupdate -#define res_mkupdrec __res_mkupdrec -#define res_nmkupdate __res_nmkupdate -#define res_nupdate __res_nupdate -#if 0 -#define res_update __res_update -#endif +#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 -__BEGIN_DECLS -void res_freeupdrec(ns_updrec *); int res_mkupdate(ns_updrec *, u_char *, int); +int res_update(ns_updrec *); ns_updrec * res_mkupdrec(int, const char *, u_int, u_int, u_long); +void res_freeupdrec(ns_updrec *); int res_nmkupdate(res_state, ns_updrec *, u_char *, int); int res_nupdate(res_state, ns_updrec *, ns_tsig_key *); -int res_update(ns_updrec *); -__END_DECLS -#endif /* _RES_UPDATE_H_ */ +#endif /*__RES_UPDATE_H*/ diff --git a/include/resolv.h b/include/resolv.h index 564a769..c60d497 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -363,8 +363,8 @@ extern const struct res_sym __p_rcode_syms[]; #define res_dnok __res_dnok #if 0 #define res_findzonecut __res_findzonecut -#define res_findzonecut2 __res_findzonecut2 #endif +#define res_findzonecut2 __res_findzonecut2 #define res_hnok __res_hnok #define res_hostalias __res_hostalias #define res_mailok __res_mailok @@ -470,10 +470,10 @@ int res_nsendsigned(res_state, const u_char *, int, ns_tsig_key *, u_char *, int); int res_findzonecut(res_state, const char *, ns_class, int, char *, size_t, struct in_addr *, int); +#endif int res_findzonecut2(res_state, const char *, ns_class, int, char *, size_t, union res_sockaddr_union *, int); -#endif void res_nclose(res_state); int res_nopt(res_state, int, u_char *, int, int); void res_send_setqhook(res_send_qhook); |