diff options
Diffstat (limited to 'lib/libc/resolv')
-rw-r--r-- | lib/libc/resolv/Makefile.inc | 3 | ||||
-rw-r--r-- | lib/libc/resolv/Symbol.map | 10 | ||||
-rw-r--r-- | lib/libc/resolv/res_findzonecut.c | 5 | ||||
-rw-r--r-- | lib/libc/resolv/res_mkupdate.c | 36 | ||||
-rw-r--r-- | lib/libc/resolv/res_update.c | 13 |
5 files changed, 60 insertions, 7 deletions
diff --git a/lib/libc/resolv/Makefile.inc b/lib/libc/resolv/Makefile.inc index c185b47..cd023cf 100644 --- a/lib/libc/resolv/Makefile.inc +++ b/lib/libc/resolv/Makefile.inc @@ -4,6 +4,7 @@ .PATH: ${.CURDIR}/resolv SRCS+= herror.c h_errno.c mtctxres.c res_comp.c res_data.c res_debug.c \ - res_init.c res_mkquery.c res_query.c res_send.c res_state.c + res_findzonecut.c res_init.c res_mkquery.c res_mkupdate.c \ + res_query.c res_send.c res_state.c res_update.c SYM_MAPS+= ${.CURDIR}/resolv/Symbol.map diff --git a/lib/libc/resolv/Symbol.map b/lib/libc/resolv/Symbol.map index 7aa2256..7fcd0d9 100644 --- a/lib/libc/resolv/Symbol.map +++ b/lib/libc/resolv/Symbol.map @@ -61,10 +61,13 @@ FBSD_1.0 { __h_error; h_errno; res_init; + __res_findzonecut2; + __res_freeupdrec; __res_mkquery; res_mkquery; + __res_mkupdrec; + __res_mkupdate; __res_opt; - __res_freeupdrec; #__res_get_nibblesuffix; # Excluded #__res_get_nibblesuffix2; # Excluded __res_getservers; @@ -75,11 +78,13 @@ FBSD_1.0 { __res_ndestroy; __res_ninit; __res_nmkquery; + __res_nmkupdate; __res_nopt; __res_nquery; __res_nquerydomain; __res_nsearch; __res_nsend; + __res_nupdate; __res_ourserver_p; __res_pquery; __res_query; @@ -100,6 +105,5 @@ FBSD_1.0 { __res_close; _res_close; res_send; - __res_mkupdate; - res_update; # Why is this not __res_update? + __res_update; }; diff --git a/lib/libc/resolv/res_findzonecut.c b/lib/libc/resolv/res_findzonecut.c index 804beb6..c6213b3 100644 --- a/lib/libc/resolv/res_findzonecut.c +++ b/lib/libc/resolv/res_findzonecut.c @@ -19,6 +19,9 @@ static const char rcsid[] = "$Id: res_findzonecut.c,v 1.2.2.3.4.4 2005/10/11 00: * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + /* Import. */ #include "port_before.h" @@ -149,6 +152,7 @@ static void res_dprintf(const char *, ...) ISC_FORMAT_PRINTF(1, 2); * keep going. for the NS and A queries this means we just give up. */ +#ifndef _LIBC int res_findzonecut(res_state statp, const char *dname, ns_class class, int opts, char *zname, size_t zsize, struct in_addr *addrs, int naddrs) @@ -173,6 +177,7 @@ res_findzonecut(res_state statp, const char *dname, ns_class class, int opts, free(u); return (result); } +#endif int res_findzonecut2(res_state statp, const char *dname, ns_class class, int opts, diff --git a/lib/libc/resolv/res_mkupdate.c b/lib/libc/resolv/res_mkupdate.c index 01078f1..0e800e3 100644 --- a/lib/libc/resolv/res_mkupdate.c +++ b/lib/libc/resolv/res_mkupdate.c @@ -23,6 +23,8 @@ #if !defined(lint) && !defined(SABER) static const char rcsid[] = "$Id: res_mkupdate.c,v 1.1.2.1.4.5 2005/10/14 05:43:47 marka Exp $"; #endif /* not lint */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include "port_before.h" @@ -44,6 +46,10 @@ static const char rcsid[] = "$Id: res_mkupdate.c,v 1.1.2.1.4.5 2005/10/14 05:43: #include <unistd.h> #include <ctype.h> +#ifdef _LIBC +#include <isc/list.h> +#endif + #include "port_after.h" /* Options. Leave them on. */ @@ -59,7 +65,13 @@ static int getstr_str(char *, int, u_char **, u_char *); /* Forward. */ +#ifdef _LIBC +static +#endif int res_protocolnumber(const char *); +#ifdef _LIBC +static +#endif int res_servicenumber(const char *); /* @@ -89,7 +101,10 @@ res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) { u_int16_t rtype, rclass; u_int32_t n1, rttl; u_char *dnptrs[20], **dpp, **lastdnptr; - int siglen, keylen, certlen; +#ifndef _LIBC + int siglen; +#endif + int keylen, certlen; /* * Initialize header fields. @@ -445,6 +460,9 @@ res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) { return (-1); break; case ns_t_sig: +#ifdef _LIBC + return (-1); +#else { int sig_type, success, dateerror; u_int32_t exptime, timesigned; @@ -535,6 +553,7 @@ res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) { cp += siglen; break; } +#endif case ns_t_key: /* flags */ n = gethexnum_str(&startp, endp); @@ -980,6 +999,7 @@ res_buildservicelist() { endservent(); } +#ifndef _LIBC void res_destroyservicelist() { struct valuelist *slp, *slp_next; @@ -992,7 +1012,11 @@ res_destroyservicelist() { } servicelist = (struct valuelist *)0; } +#endif +#ifdef _LIBC +static +#endif void res_buildprotolist(void) { struct protoent *pp; @@ -1022,6 +1046,7 @@ res_buildprotolist(void) { endprotoent(); } +#ifndef _LIBC void res_destroyprotolist(void) { struct valuelist *plp, *plp_next; @@ -1033,6 +1058,7 @@ res_destroyprotolist(void) { } protolist = (struct valuelist *)0; } +#endif static int findservice(const char *s, struct valuelist **list) { @@ -1059,6 +1085,9 @@ findservice(const char *s, struct valuelist **list) { /* * Convert service name or (ascii) number to int. */ +#ifdef _LIBC +static +#endif int res_servicenumber(const char *p) { if (servicelist == (struct valuelist *)0) @@ -1069,6 +1098,9 @@ res_servicenumber(const char *p) { /* * Convert protocol name or (ascii) number to int. */ +#ifdef _LIBC +static +#endif int res_protocolnumber(const char *p) { if (protolist == (struct valuelist *)0) @@ -1076,6 +1108,7 @@ res_protocolnumber(const char *p) { return (findservice(p, &protolist)); } +#ifndef _LIBC static struct servent * cgetservbyport(u_int16_t port, const char *proto) { /* Host byte order. */ struct valuelist **list = &servicelist; @@ -1156,3 +1189,4 @@ res_servicename(u_int16_t port, const char *proto) { /* Host byte order. */ } return (ss->s_name); } +#endif diff --git a/lib/libc/resolv/res_update.c b/lib/libc/resolv/res_update.c index 8783d8a..174cdac 100644 --- a/lib/libc/resolv/res_update.c +++ b/lib/libc/resolv/res_update.c @@ -24,6 +24,9 @@ static const char rcsid[] = "$Id: res_update.c,v 1.6.2.4.4.2 2004/03/16 12:34:20 * <viraj_bais@ccm.fm.intel.com> */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + #include "port_before.h" #include <sys/param.h> @@ -166,10 +169,16 @@ res_nupdate(res_state statp, ns_updrec *rrecp_in, ns_tsig_key *key) { res_setservers(statp, zptr->z_nsaddrs, zptr->z_nscount); /* Send the update and remember the result. */ - if (key != NULL) + if (key != NULL) { +#ifdef _LIBC + DPRINTF(("TSIG is not supported\n")); + RES_SET_H_ERRNO(statp, NO_RECOVERY); + goto done; +#else n = res_nsendsigned(statp, packet, n, key, answer, sizeof answer); - else +#endif + } else n = res_nsend(statp, packet, n, answer, sizeof answer); if (n < 0) { DPRINTF(("res_nsend: send error, n=%d (%s)\n", |