diff options
Diffstat (limited to 'lib/libc/resolv/res_findzonecut.c')
-rw-r--r-- | lib/libc/resolv/res_findzonecut.c | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/lib/libc/resolv/res_findzonecut.c b/lib/libc/resolv/res_findzonecut.c index 207d66c..c6213b3 100644 --- a/lib/libc/resolv/res_findzonecut.c +++ b/lib/libc/resolv/res_findzonecut.c @@ -1,5 +1,5 @@ #if !defined(lint) && !defined(SABER) -static const char rcsid[] = "$Id: res_findzonecut.c,v 1.7.18.3 2005/10/11 00:25:11 marka Exp $"; +static const char rcsid[] = "$Id: res_findzonecut.c,v 1.2.2.3.4.4 2005/10/11 00:48:16 marka Exp $"; #endif /* not lint */ /* @@ -19,6 +19,9 @@ static const char rcsid[] = "$Id: res_findzonecut.c,v 1.7.18.3 2005/10/11 00:25: * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + /* Import. */ #include "port_before.h" @@ -96,60 +99,60 @@ static void res_dprintf(const char *, ...) ISC_FORMAT_PRINTF(1, 2); /* Public. */ -/*% +/* + * int + * res_findzonecut(res, dname, class, zname, zsize, addrs, naddrs) * find enclosing zone for a <dname,class>, and some server addresses - * * parameters: - *\li res - resolver context to work within (is modified) - *\li dname - domain name whose enclosing zone is desired - *\li class - class of dname (and its enclosing zone) - *\li zname - found zone name - *\li zsize - allocated size of zname - *\li addrs - found server addresses - *\li naddrs - max number of addrs - * + * res - resolver context to work within (is modified) + * dname - domain name whose enclosing zone is desired + * class - class of dname (and its enclosing zone) + * zname - found zone name + * zsize - allocated size of zname + * addrs - found server addresses + * naddrs - max number of addrs * return values: - *\li < 0 - an error occurred (check errno) - *\li = 0 - zname is now valid, but addrs[] wasn't changed - *\li > 0 - zname is now valid, and return value is number of addrs[] found - * + * < 0 - an error occurred (check errno) + * = 0 - zname is now valid, but addrs[] wasn't changed + * > 0 - zname is now valid, and return value is number of addrs[] found * notes: - *\li this function calls res_nsend() which means it depends on correctly + * this function calls res_nsend() which means it depends on correctly * functioning recursive nameservers (usually defined in /etc/resolv.conf * or its local equivilent). * - *\li we start by asking for an SOA<dname,class>. if we get one as an + * we start by asking for an SOA<dname,class>. if we get one as an * answer, that just means <dname,class> is a zone top, which is fine. * more than likely we'll be told to go pound sand, in the form of a * negative answer. * - *\li note that we are not prepared to deal with referrals since that would + * note that we are not prepared to deal with referrals since that would * only come from authority servers and our correctly functioning local * recursive server would have followed the referral and got us something * more definite. * - *\li if the authority section contains an SOA, this SOA should also be the + * if the authority section contains an SOA, this SOA should also be the * closest enclosing zone, since any intermediary zone cuts would've been * returned as referrals and dealt with by our correctly functioning local * recursive name server. but an SOA in the authority section should NOT * match our dname (since that would have been returned in the answer * section). an authority section SOA has to be "above" our dname. * - *\li however, since authority section SOA's were once optional, it's + * however, since authority section SOA's were once optional, it's * possible that we'll have to go hunting for the enclosing SOA by * ripping labels off the front of our dname -- this is known as "doing * it the hard way." * - *\li ultimately we want some server addresses, which are ideally the ones + * ultimately we want some server addresses, which are ideally the ones * pertaining to the SOA.MNAME, but only if there is a matching NS RR. * so the second phase (after we find an SOA) is to go looking for the * NS RRset for that SOA's zone. * - *\li no answer section processed by this code is allowed to contain CNAME + * no answer section processed by this code is allowed to contain CNAME * or DNAME RR's. for the SOA query this means we strip a label and * 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) @@ -174,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, @@ -718,5 +722,3 @@ res_dprintf(const char *fmt, ...) { fputc('\n', stderr); va_end(ap); } - -/*! \file */ |