diff options
author | ume <ume@FreeBSD.org> | 2007-06-03 17:20:27 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2007-06-03 17:20:27 +0000 |
commit | 1f0b78cb3e02e3e161fed2e61d1cf1d0fb386365 (patch) | |
tree | 4c177bc1c465cdceae9dd1ea93c01fa64b220b93 /lib/libc/inet | |
parent | 09efba1c33e3e58c865d7f628c4f48e47d74bcd0 (diff) | |
download | FreeBSD-src-1f0b78cb3e02e3e161fed2e61d1cf1d0fb386365.zip FreeBSD-src-1f0b78cb3e02e3e161fed2e61d1cf1d0fb386365.tar.gz |
Merge BIND 9.4.1 into main chunk.
MFC after: 2 weeks
Diffstat (limited to 'lib/libc/inet')
-rw-r--r-- | lib/libc/inet/inet_addr.c | 16 | ||||
-rw-r--r-- | lib/libc/inet/inet_cidr_pton.c | 16 | ||||
-rw-r--r-- | lib/libc/inet/inet_lnaof.c | 4 | ||||
-rw-r--r-- | lib/libc/inet/inet_makeaddr.c | 4 | ||||
-rw-r--r-- | lib/libc/inet/inet_net_ntop.c | 10 | ||||
-rw-r--r-- | lib/libc/inet/inet_net_pton.c | 38 | ||||
-rw-r--r-- | lib/libc/inet/inet_neta.c | 6 | ||||
-rw-r--r-- | lib/libc/inet/inet_netof.c | 4 | ||||
-rw-r--r-- | lib/libc/inet/inet_network.c | 4 | ||||
-rw-r--r-- | lib/libc/inet/inet_ntoa.c | 6 | ||||
-rw-r--r-- | lib/libc/inet/inet_ntop.c | 6 | ||||
-rw-r--r-- | lib/libc/inet/inet_pton.c | 8 | ||||
-rw-r--r-- | lib/libc/inet/nsap_addr.c | 4 |
13 files changed, 76 insertions, 50 deletions
diff --git a/lib/libc/inet/inet_addr.c b/lib/libc/inet/inet_addr.c index 4a8b80f..e606d34 100644 --- a/lib/libc/inet/inet_addr.c +++ b/lib/libc/inet/inet_addr.c @@ -66,7 +66,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93"; -static const char rcsid[] = "$Id: inet_addr.c,v 1.2.206.2 2004/03/17 00:29:45 marka Exp $"; +static const char rcsid[] = "$Id: inet_addr.c,v 1.4.18.1 2005/04/27 05:00:52 sra Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -83,7 +83,7 @@ __FBSDID("$FreeBSD$"); #include "port_after.h" -/* +/*% * Ascii internet address interpretation routine. * The value returned is in network order. */ @@ -96,7 +96,7 @@ inet_addr(const char *cp) { return (INADDR_NONE); } -/* +/*% * Check whether "cp" is a valid ascii representation * of an Internet address and convert to a binary address. * Returns 1 if the address is valid, 0 if not. @@ -177,22 +177,22 @@ inet_aton(const char *cp, struct in_addr *addr) { */ n = pp - parts + 1; switch (n) { - case 1: /* a -- 32 bits */ + case 1: /*%< a -- 32 bits */ break; - case 2: /* a.b -- 8.24 bits */ + case 2: /*%< a.b -- 8.24 bits */ if (val > 0xffffffU) return (0); val |= parts[0] << 24; break; - case 3: /* a.b.c -- 8.8.16 bits */ + case 3: /*%< a.b.c -- 8.8.16 bits */ if (val > 0xffffU) return (0); val |= (parts[0] << 24) | (parts[1] << 16); break; - case 4: /* a.b.c.d -- 8.8.8.8 bits */ + case 4: /*%< a.b.c.d -- 8.8.8.8 bits */ if (val > 0xffU) return (0); val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); @@ -211,3 +211,5 @@ inet_aton(const char *cp, struct in_addr *addr) { __weak_reference(__inet_addr, inet_addr); #undef inet_aton __weak_reference(__inet_aton, inet_aton); + +/*! \file */ diff --git a/lib/libc/inet/inet_cidr_pton.c b/lib/libc/inet/inet_cidr_pton.c index 3089eb9..b0586ff 100644 --- a/lib/libc/inet/inet_cidr_pton.c +++ b/lib/libc/inet/inet_cidr_pton.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_cidr_pton.c,v 1.2.2.1.8.2 2004/03/17 00:29:46 marka Exp $"; +static const char rcsid[] = "$Id: inet_cidr_pton.c,v 1.5.18.1 2005/04/27 05:00:53 sra Exp $"; #endif #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -51,7 +51,7 @@ static int inet_cidr_pton_ipv6 __P((const char *src, u_char *dst, static int getbits(const char *, int ipv6); -/* +/*% * int * inet_cidr_pton(af, src, dst, *bits) * convert network address from presentation to network format. @@ -206,7 +206,7 @@ inet_cidr_pton_ipv6(const char *src, u_char *dst, int *pbits) { inet_cidr_pton_ipv4(curtok, tp, &bits, 1) == 0) { tp += NS_INADDRSZ; saw_xdigit = 0; - break; /* '\0' was seen by inet_pton4(). */ + break; /*%< '\\0' was seen by inet_pton4(). */ } if (ch == '/') { bits = getbits(src, 1); @@ -258,20 +258,22 @@ getbits(const char *src, int ipv6) { int bits = 0; char *cp, ch; - if (*src == '\0') /* syntax */ + if (*src == '\0') /*%< syntax */ return (-2); do { ch = *src++; cp = strchr(digits, ch); - if (cp == NULL) /* syntax */ + if (cp == NULL) /*%< syntax */ return (-2); bits *= 10; bits += cp - digits; - if (bits == 0 && *src != '\0') /* no leading zeros */ + if (bits == 0 && *src != '\0') /*%< no leading zeros */ return (-2); - if (bits > (ipv6 ? 128 : 32)) /* range error */ + if (bits > (ipv6 ? 128 : 32)) /*%< range error */ return (-2); } while (*src != '\0'); return (bits); } + +/*! \file */ diff --git a/lib/libc/inet/inet_lnaof.c b/lib/libc/inet/inet_lnaof.c index 9e419f7..7cab894 100644 --- a/lib/libc/inet/inet_lnaof.c +++ b/lib/libc/inet/inet_lnaof.c @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #include "port_after.h" -/* +/*% * Return the local network address portion of an * internet address; handles class a/b/c network * number formats. @@ -66,3 +66,5 @@ inet_lnaof(in) */ #undef inet_lnaof __weak_reference(__inet_lnaof, inet_lnaof); + +/*! \file */ diff --git a/lib/libc/inet/inet_makeaddr.c b/lib/libc/inet/inet_makeaddr.c index 2f6998d..04a37a0 100644 --- a/lib/libc/inet/inet_makeaddr.c +++ b/lib/libc/inet/inet_makeaddr.c @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #include "port_after.h" -/* +/*% * Formulate an Internet address from network + host. Used in * building addresses stored in the ifnet structure. */ @@ -69,3 +69,5 @@ inet_makeaddr(net, host) */ #undef inet_makeaddr __weak_reference(__inet_makeaddr, inet_makeaddr); + +/*! \file */ diff --git a/lib/libc/inet/inet_net_ntop.c b/lib/libc/inet/inet_net_ntop.c index 1c95df5..867f441 100644 --- a/lib/libc/inet/inet_net_ntop.c +++ b/lib/libc/inet/inet_net_ntop.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_net_ntop.c,v 1.1.2.1.8.2 2006/06/20 02:53:07 marka Exp $"; +static const char rcsid[] = "$Id: inet_net_ntop.c,v 1.3.18.2 2006/06/20 02:51:32 marka Exp $"; #endif #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -46,7 +46,7 @@ static char * inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, static char * inet_net_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size); -/* +/*% * char * * inet_net_ntop(af, src, bits, dst, size) * convert network number from network to presentation format. @@ -75,7 +75,7 @@ inet_net_ntop(af, src, bits, dst, size) } } -/* +/*% * static char * * inet_net_ntop_ipv4(src, bits, dst, size) * convert IPv4 network number from network to presentation format. @@ -150,7 +150,7 @@ inet_net_ntop_ipv4(src, bits, dst, size) return (NULL); } -/* +/*% * static char * * inet_net_ntop_ipv6(src, bits, fakebits, dst, size) * convert IPv6 network number from network to presentation format. @@ -284,3 +284,5 @@ emsgsize: */ #undef inet_net_ntop __weak_reference(__inet_net_ntop, inet_net_ntop); + +/*! \file */ diff --git a/lib/libc/inet/inet_net_pton.c b/lib/libc/inet/inet_net_pton.c index 3d9650c..06d1da9 100644 --- a/lib/libc/inet/inet_net_pton.c +++ b/lib/libc/inet/inet_net_pton.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_net_pton.c,v 1.4.2.1.8.2 2004/03/17 00:29:47 marka Exp $"; +static const char rcsid[] = "$Id: inet_net_pton.c,v 1.7.18.1 2005/04/27 05:00:53 sra Exp $"; #endif #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); # define SPRINTF(x) ((size_t)sprintf x) #endif -/* +/*% * static int * inet_net_pton_ipv4(src, dst, size) * convert IPv4 network number from presentation to network format. @@ -75,7 +75,7 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { if (size <= 0U) goto emsgsize; dirty = 0; - src++; /* skip x or X. */ + src++; /*%< skip x or X. */ while ((ch = *src++) != '\0' && isascii(ch) && isxdigit(ch)) { if (isupper(ch)) ch = tolower(ch); @@ -92,7 +92,7 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { dirty = 0; } } - if (dirty) { /* Odd trailing nybble? */ + if (dirty) { /*%< Odd trailing nybble? */ if (size-- <= 0U) goto emsgsize; *dst++ = (u_char) (tmp << 4); @@ -128,7 +128,7 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { if (ch == '/' && isascii((unsigned char)(src[0])) && isdigit((unsigned char)(src[0])) && dst > odst) { /* CIDR width specifier. Nothing can follow it. */ - ch = *src++; /* Skip over the /. */ + ch = *src++; /*%< Skip over the /. */ bits = 0; do { n = strchr(digits, ch) - digits; @@ -151,15 +151,15 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) { goto enoent; /* If no CIDR spec was given, infer width from net class. */ if (bits == -1) { - if (*odst >= 240) /* Class E */ + if (*odst >= 240) /*%< Class E */ bits = 32; - else if (*odst >= 224) /* Class D */ + else if (*odst >= 224) /*%< Class D */ bits = 8; - else if (*odst >= 192) /* Class C */ + else if (*odst >= 192) /*%< Class C */ bits = 24; - else if (*odst >= 128) /* Class B */ + else if (*odst >= 128) /*%< Class B */ bits = 16; - else /* Class A */ + else /*%< Class A */ bits = 8; /* If imputed mask is narrower than specified octets, widen. */ if (bits < ((dst - odst) * 8)) @@ -202,11 +202,11 @@ getbits(const char *src, int *bitsp) { pch = strchr(digits, ch); if (pch != NULL) { - if (n++ != 0 && val == 0) /* no leading zeros */ + if (n++ != 0 && val == 0) /*%< no leading zeros */ return (0); val *= 10; val += (pch - digits); - if (val > 128) /* range */ + if (val > 128) /*%< range */ return (0); continue; } @@ -233,16 +233,16 @@ getv4(const char *src, u_char *dst, int *bitsp) { pch = strchr(digits, ch); if (pch != NULL) { - if (n++ != 0 && val == 0) /* no leading zeros */ + if (n++ != 0 && val == 0) /*%< no leading zeros */ return (0); val *= 10; val += (pch - digits); - if (val > 255) /* range */ + if (val > 255) /*%< range */ return (0); continue; } if (ch == '.' || ch == '/') { - if (dst - odst > 3) /* too many octets? */ + if (dst - odst > 3) /*%< too many octets? */ return (0); *dst++ = val; if (ch == '/') @@ -255,7 +255,7 @@ getv4(const char *src, u_char *dst, int *bitsp) { } if (n == 0) return (0); - if (dst - odst > 3) /* too many octets? */ + if (dst - odst > 3) /*%< too many octets? */ return (0); *dst++ = val; return (1); @@ -324,7 +324,7 @@ inet_net_pton_ipv6(const char *src, u_char *dst, size_t size) { tp += NS_INADDRSZ; saw_xdigit = 0; ipv4 = 1; - break; /* '\0' was seen by inet_pton4(). */ + break; /*%< '\\0' was seen by inet_pton4(). */ } if (ch == '/' && getbits(src, &bits) > 0) break; @@ -380,7 +380,7 @@ inet_net_pton_ipv6(const char *src, u_char *dst, size_t size) { return (-1); } -/* +/*% * int * inet_net_pton(af, src, dst, size) * convert network number from presentation to network format. @@ -412,3 +412,5 @@ inet_net_pton(int af, const char *src, void *dst, size_t size) { */ #undef inet_net_pton __weak_reference(__inet_net_pton, inet_net_pton); + +/*! \file */ diff --git a/lib/libc/inet/inet_neta.c b/lib/libc/inet/inet_neta.c index 872ad48..72ac549 100644 --- a/lib/libc/inet/inet_neta.c +++ b/lib/libc/inet/inet_neta.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_neta.c,v 1.1.206.1 2004/03/09 08:33:33 marka Exp $"; +static const char rcsid[] = "$Id: inet_neta.c,v 1.2.18.1 2005/04/27 05:00:53 sra Exp $"; #endif #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); # define SPRINTF(x) ((size_t)sprintf x) #endif -/* +/*% * char * * inet_neta(src, dst, size) * format an in_addr_t network number into presentation format. @@ -94,3 +94,5 @@ inet_neta(src, dst, size) */ #undef inet_neta __weak_reference(__inet_neta, inet_neta); + +/*! \file */ diff --git a/lib/libc/inet/inet_netof.c b/lib/libc/inet/inet_netof.c index 8f3ff63..8931c30 100644 --- a/lib/libc/inet/inet_netof.c +++ b/lib/libc/inet/inet_netof.c @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #include "port_after.h" -/* +/*% * Return the network number from an internet * address; handles class a/b/c network #'s. */ @@ -65,3 +65,5 @@ inet_netof(in) */ #undef inet_netof __weak_reference(__inet_netof, inet_netof); + +/*! \file */ diff --git a/lib/libc/inet/inet_network.c b/lib/libc/inet/inet_network.c index 2194411..b464656 100644 --- a/lib/libc/inet/inet_network.c +++ b/lib/libc/inet/inet_network.c @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include "port_after.h" -/* +/*% * Internet network address interpretation routine. * The library routines call this routine to interpret * network numbers. @@ -107,3 +107,5 @@ again: */ #undef inet_network __weak_reference(__inet_network, inet_network); + +/*! \file */ diff --git a/lib/libc/inet/inet_ntoa.c b/lib/libc/inet/inet_ntoa.c index 1b3ec0f..7e29145 100644 --- a/lib/libc/inet/inet_ntoa.c +++ b/lib/libc/inet/inet_ntoa.c @@ -29,7 +29,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)inet_ntoa.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: inet_ntoa.c,v 1.1 2001/03/29 06:31:38 marka Exp $"; +static const char rcsid[] = "$Id: inet_ntoa.c,v 1.1.352.1 2005/04/27 05:00:54 sra Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include "port_after.h" -/* +/*% * Convert network-format internet address * to base 256 d.d.d.d representation. */ @@ -65,3 +65,5 @@ inet_ntoa(struct in_addr in) { */ #undef inet_ntoa __weak_reference(__inet_ntoa, inet_ntoa); + +/*! \file */ diff --git a/lib/libc/inet/inet_ntop.c b/lib/libc/inet/inet_ntop.c index 48c2efe..6d21027 100644 --- a/lib/libc/inet/inet_ntop.c +++ b/lib/libc/inet/inet_ntop.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_ntop.c,v 1.1.2.1.8.2 2005/11/03 23:08:40 marka Exp $"; +static const char rcsid[] = "$Id: inet_ntop.c,v 1.3.18.2 2005/11/03 23:02:22 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include "port_after.h" -/* +/*% * WARNING: Don't even consider trying to compile this on a system where * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. */ @@ -199,3 +199,5 @@ inet_ntop6(const u_char *src, char *dst, socklen_t size) */ #undef inet_ntop __weak_reference(__inet_ntop, inet_ntop); + +/*! \file */ diff --git a/lib/libc/inet/inet_pton.c b/lib/libc/inet/inet_pton.c index 44d9c61..ae65099 100644 --- a/lib/libc/inet/inet_pton.c +++ b/lib/libc/inet/inet_pton.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_pton.c,v 1.2.206.2 2005/07/28 07:43:18 marka Exp $"; +static const char rcsid[] = "$Id: inet_pton.c,v 1.3.18.2 2005/07/28 07:38:07 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$"); #include <errno.h> #include "port_after.h" -/* +/*% * WARNING: Don't even consider trying to compile this on a system where * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. */ @@ -183,7 +183,7 @@ inet_pton6(const char *src, u_char *dst) inet_pton4(curtok, tp) > 0) { tp += NS_INADDRSZ; seen_xdigits = 0; - break; /* '\0' was seen by inet_pton4(). */ + break; /*%< '\\0' was seen by inet_pton4(). */ } return (0); } @@ -221,3 +221,5 @@ inet_pton6(const char *src, u_char *dst) */ #undef inet_pton __weak_reference(__inet_pton, inet_pton); + +/*! \file */ diff --git a/lib/libc/inet/nsap_addr.c b/lib/libc/inet/nsap_addr.c index 27d44ba..2947472 100644 --- a/lib/libc/inet/nsap_addr.c +++ b/lib/libc/inet/nsap_addr.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: nsap_addr.c,v 1.2.206.2 2005/07/28 07:43:18 marka Exp $"; +static const char rcsid[] = "$Id: nsap_addr.c,v 1.3.18.2 2005/07/28 07:38:08 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -118,3 +118,5 @@ inet_nsap_ntoa(int binlen, const u_char *binary, char *ascii) { __weak_reference(__inet_nsap_addr, inet_nsap_addr); #undef inet_nsap_ntoa __weak_reference(__inet_nsap_ntoa, inet_nsap_ntoa); + +/*! \file */ |