ea7fc621ce
- Update the resolver in libc to BIND9's one. - make reentrant version of netdb functions glibc style API, and expose them to outside of libc. - make netdb functions NSS friendly. include/Makefile 1.261 include/arpa/inet.h 1.26 include/arpa/nameser.h 1.18 include/arpa/nameser_compat.h 1.5 include/netdb.h 1.40-1.42 include/res_update.h 1.1 include/resolv.h 1.29-1.30 lib/libc/Makefile 1.64 lib/libc/include/isc/eventlib.h 1.1.1.1 lib/libc/include/port_after.h 1.1-1.2 lib/libc/include/port_before.h 1.1 lib/libc/include/resolv_mt.h 1.1.1.1 lib/libc/inet/Makefile.inc 1.1 lib/libc/inet/inet_addr.c 1.1.1.1, 1.2 lib/libc/inet/inet_cidr_ntop.c 1.1.1.1 lib/libc/inet/inet_cidr_pton.c 1.1.1.1, 1.2 lib/libc/inet/inet_lnaof.c 1.1.1.1, 1.2 lib/libc/inet/inet_makeaddr.c 1.1.1.1, 1.2 lib/libc/inet/inet_net_ntop.c 1.1.1.1, 1.2 lib/libc/inet/inet_net_pton.c 1.1.1.1, 1.2 lib/libc/inet/inet_neta.c 1.1.1.1, 1.2 lib/libc/inet/inet_netof.c 1.1.1.1, 1.2 lib/libc/inet/inet_network.c 1.1.1.1, 1.2 lib/libc/inet/inet_ntoa.c 1.1.1.1, 1.2 lib/libc/inet/inet_ntop.c 1.1.1.1, 1.2 lib/libc/inet/inet_pton.c 1.1.1.1, 1.2 lib/libc/inet/nsap_addr.c 1.1.1.1, 1.2 lib/libc/isc/Makefile.inc 1.1 lib/libc/isc/ev_streams.c 1.1.1.1, 1.2 lib/libc/isc/ev_timers.c 1.1.1.1, 1.2 lib/libc/isc/eventlib_p.h 1.1.1.1, 1.2 lib/libc/nameser/Makefile.inc 1.1 lib/libc/nameser/ns_name.c 1.1.1.1 lib/libc/nameser/ns_netint.c 1.1.1.1 lib/libc/nameser/ns_parse.c 1.1.1.1 lib/libc/nameser/ns_print.c 1.1.1.1, 1.2 lib/libc/nameser/ns_samedomain.c 1.1.1.1, 1.2 lib/libc/nameser/ns_ttl.c 1.1.1.1 lib/libc/net/Makefile.inc 1.58 lib/libc/net/getaddrinfo.c 1.74, 1.77-1.78 lib/libc/net/gethostbydns.c 1.55-1.57 lib/libc/net/gethostbyht.c 1.24-1.26 lib/libc/net/gethostbyname.3 1.35 lib/libc/net/gethostbynis.c 1.26-1.28 lib/libc/net/gethostnamadr.c 1.29-1.30, 1.32 lib/libc/net/getnameinfo.c 1.18 lib/libc/net/getnetbydns.c 1.32-1.33 lib/libc/net/getnetbyht.c 1.17-1.18 lib/libc/net/getnetbynis.c 1.20-1.21 lib/libc/net/getnetnamadr.c 1.22 lib/libc/net/getproto.c 1.5 lib/libc/net/getprotoent.c 1.7 lib/libc/net/getprotoname.c 1.5 lib/libc/net/getservbyname.c 1.8 lib/libc/net/getservbyport.c 1.8 lib/libc/net/getservent.c 1.21 lib/libc/net/name6.c 1.56-1.57 lib/libc/net/netdb_private.h 1.10-1.11, 1.13 lib/libc/net/res_config.h 1.9 lib/libc/net/res_mkupdate.c 1.7-1.8 lib/libc/net/res_update.c 1.8-1.9 lib/libc/resolv/Makefile.inc 1.1 lib/libc/resolv/h_errno.c 1.1 lib/libc/resolv/herror.c 1.1.1.1, 1.2 lib/libc/resolv/mtctxres.c 1.1.1.1, 1.2 lib/libc/resolv/res_comp.c 1.1.1.1, 1.2 lib/libc/resolv/res_data.c 1.1.1.1, 1.2-1.3 lib/libc/resolv/res_debug.c 1.1.1.1, 1.2 lib/libc/resolv/res_debug.h 1.1.1.1 lib/libc/resolv/res_init.c 1.1.1.1, 1.2 lib/libc/resolv/res_mkquery.c 1.1.1.1, 1.2 lib/libc/resolv/res_private.h 1.1.1.1 lib/libc/resolv/res_query.c 1.1.1.1, 1.2-1.3 lib/libc/resolv/res_send.c 1.1.1.1, 1.2 lib/libc/resolv/res_state.c 1.1-1.2 Tested by: nork
80 lines
3.3 KiB
C
80 lines
3.3 KiB
C
/*-
|
|
* Copyright (c) 1983, 1987, 1989, 1993
|
|
* The Regents of the University of California. All rights reserved.
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without
|
|
* modification, are permitted provided that the following conditions
|
|
* are met:
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
* notice, this list of conditions and the following disclaimer.
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
* documentation and/or other materials provided with the distribution.
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
* must display the following acknowledgement:
|
|
* This product includes software developed by the University of
|
|
* California, Berkeley and its contributors.
|
|
* 4. Neither the name of the University nor the names of its contributors
|
|
* may be used to endorse or promote products derived from this software
|
|
* without specific prior written permission.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
* SUCH DAMAGE.
|
|
*/
|
|
|
|
/* $FreeBSD$ */
|
|
|
|
#ifndef _RES_UPDATE_H_
|
|
#define _RES_UPDATE_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 */
|
|
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 */
|
|
};
|
|
typedef struct ns_updrec ns_updrec;
|
|
|
|
#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
|
|
|
|
__BEGIN_DECLS
|
|
void res_freeupdrec(ns_updrec *);
|
|
int res_mkupdate(ns_updrec *, u_char *, int);
|
|
ns_updrec * res_mkupdrec(int, const char *, u_int, u_int, u_long);
|
|
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_ */
|