summaryrefslogtreecommitdiff
path: root/lib/libc/net
diff options
context:
space:
mode:
authorJared Yanovich <jaredy@cvs.openbsd.org>2005-07-22 04:50:52 +0000
committerJared Yanovich <jaredy@cvs.openbsd.org>2005-07-22 04:50:52 +0000
commit9dbfa9210fb28e0d7ea66b0370c444812c3cb175 (patch)
treee718191694bf5b7d87ae86f3abe3863f19e6ec56 /lib/libc/net
parent49c2a2c537a025e7fb6e202bd12345fa1e773a9c (diff)
- sync prototypes and header file excerpts
- typos/spelling, punctuation, rewording, macro, and layout fixes. help & ok jmc
Diffstat (limited to 'lib/libc/net')
-rw-r--r--lib/libc/net/byteorder.36
-rw-r--r--lib/libc/net/ethers.35
-rw-r--r--lib/libc/net/gethostbyname.321
-rw-r--r--lib/libc/net/getifaddrs.38
-rw-r--r--lib/libc/net/getnetent.34
-rw-r--r--lib/libc/net/getprotoent.314
-rw-r--r--lib/libc/net/getrrsetbyname.353
-rw-r--r--lib/libc/net/getservent.310
-rw-r--r--lib/libc/net/if_indextoname.325
-rw-r--r--lib/libc/net/inet.312
-rw-r--r--lib/libc/net/inet_net.323
-rw-r--r--lib/libc/net/link_addr.35
-rw-r--r--lib/libc/net/resolver.332
13 files changed, 116 insertions, 102 deletions
diff --git a/lib/libc/net/byteorder.3 b/lib/libc/net/byteorder.3
index 54123455c6d..e5489586171 100644
--- a/lib/libc/net/byteorder.3
+++ b/lib/libc/net/byteorder.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: byteorder.3,v 1.13 2003/09/26 17:06:50 fgsch Exp $
+.\" $OpenBSD: byteorder.3,v 1.14 2005/07/22 04:50:51 jaredy Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -97,7 +97,7 @@ byte orderings.
The
.Dq swap
functions reverse the byte ordering of
-the given quantity, the others converts either from/to the native
+the given quantity; the others convert either from/to the native
byte order used by the host to/from either little- or big-endian (a.k.a
network) order.
.Pp
@@ -165,7 +165,7 @@ The functions involving either
or
.Dq swap
use the numbers
-16, 32 and 64 for specifying the bitwidth of the quantities they operate on.
+16, 32, or 64 for specifying the bitwidth of the quantities they operate on.
Currently all supported architectures are either big- or little-endian
so either the
.Dq be
diff --git a/lib/libc/net/ethers.3 b/lib/libc/net/ethers.3
index 72ea79bb2c9..febd62392e5 100644
--- a/lib/libc/net/ethers.3
+++ b/lib/libc/net/ethers.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ethers.3,v 1.15 2005/03/28 06:21:48 tedu Exp $
+.\" $OpenBSD: ethers.3,v 1.16 2005/07/22 04:50:51 jaredy Exp $
.\"
.\" Written by roland@frob.com. Public domain.
.\"
@@ -14,6 +14,9 @@
.Nm ether_line
.Nd get ethers entry
.Sh SYNOPSIS
+.Fd #include <sys/socket.h>
+.Fd #include <net/if.h>
+.Fd #include <netinet/in.h>
.Fd #include <netinet/if_ether.h>
.Ft char *
.Fn ether_ntoa "struct ether_addr *e"
diff --git a/lib/libc/net/gethostbyname.3 b/lib/libc/net/gethostbyname.3
index c2db100c9bf..f3f3ea580f8 100644
--- a/lib/libc/net/gethostbyname.3
+++ b/lib/libc/net/gethostbyname.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: gethostbyname.3,v 1.23 2005/06/08 18:32:34 millert Exp $
+.\" $OpenBSD: gethostbyname.3,v 1.24 2005/07/22 04:50:51 jaredy Exp $
.\"
.\" Copyright (c) 1983, 1987, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -42,7 +42,7 @@
.Nd get network host entry
.Sh SYNOPSIS
.Fd #include <netdb.h>
-.Fd extern int h_errno;
+.Vt extern int h_errno ;
.Ft struct hostent *
.Fn gethostbyname "const char *name"
.Ft struct hostent *
@@ -62,11 +62,11 @@
.Sh DESCRIPTION
The
.Fn gethostbyname ,
-.Fn gethostbyname2
+.Fn gethostbyname2 ,
and
.Fn gethostbyaddr
functions each return a pointer to an object with the following structure
-describing an internet host referenced by name or by address, respectively.
+describing an Internet host referenced by name or by address, respectively.
This structure contains either information obtained from the name server (i.e.,
.Xr resolver 3
and
@@ -78,15 +78,15 @@ or database entries supplied by the
system.
.Xr resolv.conf 5
describes how the particular database is chosen.
-.Bd -literal
+.Bd -literal -offset indent
struct hostent {
char *h_name; /* official name of host */
char **h_aliases; /* alias list */
int h_addrtype; /* host address type */
int h_length; /* length of address */
- char **h_addr_list; /* list of addresses from name server */
+ char **h_addr_list; /* list of returned addresses */
};
-#define h_addr h_addr_list[0] /* address, for backward compatibility */
+#define h_addr h_addr_list[0] /* address, for backward compat */
.Ed
.Pp
The members of this structure are:
@@ -94,13 +94,13 @@ The members of this structure are:
.It Fa h_name
Official name of the host.
.It Fa h_aliases
-A NULL-terminated array of alternate names for the host.
+A null-terminated array of alternate names for the host.
.It Fa h_addrtype
The type of address being returned.
.It Fa h_length
The length, in bytes, of the address.
.It Fa h_addr_list
-A zero-terminated array of network addresses for the host.
+A null-terminated array of network addresses for the host.
Host addresses are returned in network byte order.
.It Fa h_addr
The first address in
@@ -227,7 +227,7 @@ will result in an answer;
for example, a mail-forwarder may be registered for this domain.
.It Dv NETDB_INTERNAL
An internal error occurred.
-This may occurs when an address family other than
+This may occur when an address family other than
.Dv AF_INET
or
.Dv AF_INET6
@@ -287,6 +287,7 @@ function closes the file.
These functions use static data storage;
if the data is needed for future use, it should be
copied before any subsequent calls overwrite it.
+.Pp
Only the Internet
address formats are currently understood.
.Pp
diff --git a/lib/libc/net/getifaddrs.3 b/lib/libc/net/getifaddrs.3
index ffbdf4da417..e6380be4b77 100644
--- a/lib/libc/net/getifaddrs.3
+++ b/lib/libc/net/getifaddrs.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getifaddrs.3,v 1.11 2004/04/16 10:48:39 jmc Exp $
+.\" $OpenBSD: getifaddrs.3,v 1.12 2005/07/22 04:50:51 jaredy Exp $
.\" BSDI getifaddrs.3,v 2.5 2000/02/23 14:51:59 dab Exp
.\"
.\" Copyright (c) 1995, 1999
@@ -58,12 +58,12 @@ structure contains at least the following entries:
struct sockaddr *ifa_dstaddr; /* P2P interface destination */
void *ifa_data; /* Address specific data */
.Ed
-.Bl -tag -width Ds
+.Bl -tag -width ifa_broadaddr
.It Fa ifa_next
Contains a pointer to the next structure on the list.
This field is set to
.Dv NULL
-in last structure on the list.
+in the last structure on the list.
.It Fa ifa_name
Contains the interface name.
.It Fa ifa_flags
@@ -142,7 +142,7 @@ or
The
.Fn getifaddrs
function first appeared in BSDI BSD/OS.
-The function is supplied on
+The function has been available on
.Ox
since
.Ox 2.7 .
diff --git a/lib/libc/net/getnetent.3 b/lib/libc/net/getnetent.3
index 40b50a8c3f6..b337c8c02d8 100644
--- a/lib/libc/net/getnetent.3
+++ b/lib/libc/net/getnetent.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getnetent.3,v 1.13 2004/02/01 19:45:00 nordin Exp $
+.\" $OpenBSD: getnetent.3,v 1.14 2005/07/22 04:50:51 jaredy Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -72,7 +72,7 @@ The members of this structure are:
.It Fa n_name
The official name of the network.
.It Fa n_aliases
-A zero-terminated list of alternate names for the network.
+A null-terminated list of alternate names for the network.
.It Fa n_addrtype
The type of the network number returned; currently only
.Dv AF_INET .
diff --git a/lib/libc/net/getprotoent.3 b/lib/libc/net/getprotoent.3
index 7b509523627..ea3644f6c99 100644
--- a/lib/libc/net/getprotoent.3
+++ b/lib/libc/net/getprotoent.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getprotoent.3,v 1.15 2005/06/05 19:40:21 jmc Exp $
+.\" $OpenBSD: getprotoent.3,v 1.16 2005/07/22 04:50:51 jaredy Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -87,7 +87,7 @@ The members of this structure are:
.It Fa p_name
The official name of the protocol.
.It Fa p_aliases
-A zero-terminated list of alternate names for the protocol.
+A null-terminated list of alternate names for the protocol.
.It Fa p_proto
The protocol number.
.El
@@ -102,7 +102,7 @@ function opens and rewinds the file.
If the
.Fa stayopen
flag is non-zero,
-the net database will not be closed after each call to
+the protocol database will not be closed after each call to
.Fn getprotobyname
or
.Fn getprotobynumber .
@@ -129,7 +129,7 @@ and
.Fn endprotoent_r
functions are reentrant versions of the above functions that take a
pointer to a
-.Fa protoent_data
+.Vt protoent_data
structure which is used to store state information.
The structure must be zero-filled before it is used
and should be considered opaque for the sake of portability.
@@ -141,7 +141,7 @@ and
.Fn getprotobyname_r
functions
also take a pointer to a
-.Fa protoent
+.Vt protoent
structure which is used to store the results of the database lookup.
.Sh RETURN VALUES
The
@@ -150,7 +150,7 @@ The
and
.Fn getprotobyname
functions return a pointer to a
-.Fa servent
+.Vt protoent
structure on success or a null pointer if end-of-file
is reached or an error occurs.
.Pp
@@ -186,7 +186,7 @@ The
and
.Fn endprotoent_r
functions are not currently standardized.
-This implementation follows the API used by HP, IBM and Digital.
+This implementation follows the API used by HP, IBM, and Digital.
.Sh HISTORY
The
.Fn getprotoent ,
diff --git a/lib/libc/net/getrrsetbyname.3 b/lib/libc/net/getrrsetbyname.3
index 621ff31b815..c951f905ab8 100644
--- a/lib/libc/net/getrrsetbyname.3
+++ b/lib/libc/net/getrrsetbyname.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getrrsetbyname.3,v 1.13 2005/02/25 03:12:43 cloder Exp $
+.\" $OpenBSD: getrrsetbyname.3,v 1.14 2005/07/22 04:50:51 jaredy Exp $
.\"
.\" Copyright (C) 2000, 2001 Internet Software Consortium.
.\"
@@ -19,6 +19,7 @@
.Dt GETRRSETBYNAME 3
.Os
.Sh NAME
+.Nm freerrset ,
.Nm getrrsetbyname
.Nd retrieve DNS records
.Sh SYNOPSIS
@@ -32,7 +33,7 @@
.Fn getrrsetbyname
gets a set of resource records associated with a
.Fa hostname ,
-.Fa rdclass
+.Fa rdclass ,
and
.Fa rdtype .
.Fa hostname
@@ -74,22 +75,22 @@ bit is set, the data has been DNSSEC
validated and the signatures verified.
.Pp
The following structures are used:
-.Bd -literal -offset
+.Bd -literal -offset indent
struct rdatainfo {
- unsigned int rdi_length; /* length of data */
- unsigned char *rdi_data; /* record data */
+ unsigned int rdi_length; /* length of data */
+ unsigned char *rdi_data; /* record data */
};
struct rrsetinfo {
- unsigned int rri_flags; /* RRSET_VALIDATED ... */
- unsigned int rri_rdclass; /* class number */
- unsigned int rri_rdtype; /* RR type number */
- unsigned int rri_ttl; /* time to live */
- unsigned int rri_nrdatas; /* size of rdatas array */
- unsigned int rri_nsigs; /* size of sigs array */
- char *rri_name; /* canonical name */
- struct rdatainfo *rri_rdatas; /* individual records */
- struct rdatainfo *rri_sigs; /* individual signatures */
+ unsigned int rri_flags; /* RRSET_VALIDATED ... */
+ unsigned int rri_rdclass; /* class number */
+ unsigned int rri_rdtype; /* RR type number */
+ unsigned int rri_ttl; /* time to live */
+ unsigned int rri_nrdatas; /* size of rdatas array */
+ unsigned int rri_nsigs; /* size of sigs array */
+ char *rri_name; /* canonical name */
+ struct rdatainfo *rri_rdatas; /* individual records */
+ struct rdatainfo *rri_sigs; /* individual signatures */
};
.Ed
.Pp
@@ -110,7 +111,7 @@ is released by
.Fn freerrset .
.Li rrset
is a pointer to a
-.Li struct rrset
+.Li struct rrsetinfo
created by a call to
.Fn getrrsetbyname .
.Pp
@@ -123,17 +124,17 @@ will request DNSSEC authentication using the EDNS0 DNSSEC OK (DO) bit.
returns zero on success, and one of the following error
codes if an error occurred:
.Pp
-.Bl -tag -width ERRSET_NOMEMORY -compact
-.It Dv ERRSET_NONAME
-the name does not exist
-.It Dv ERRSET_NODATA
-the name exists, but does not have data of the desired type
-.It Dv ERRSET_NOMEMORY
-memory could not be allocated
-.It Dv ERRSET_INVAL
-a parameter is invalid
-.It Dv ERRSET_FAIL
-other failure
+.Bl -tag -width ERRSET_NOMEMORY
+.It Bq Er ERRSET_NONAME
+The name does not exist.
+.It Bq Er ERRSET_NODATA
+The name exists, but does not have data of the desired type.
+.It Bq Er ERRSET_NOMEMORY
+Memory could not be allocated.
+.It Bq Er ERRSET_INVAL
+A parameter is invalid.
+.It Bq Er ERRSET_FAIL
+Other failure.
.El
.Sh SEE ALSO
.Xr resolver 3 ,
diff --git a/lib/libc/net/getservent.3 b/lib/libc/net/getservent.3
index aa24aab13ac..839d89de6c7 100644
--- a/lib/libc/net/getservent.3
+++ b/lib/libc/net/getservent.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getservent.3,v 1.18 2005/06/05 19:44:16 jmc Exp $
+.\" $OpenBSD: getservent.3,v 1.19 2005/07/22 04:50:51 jaredy Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -87,7 +87,7 @@ The members of this structure are:
.It Fa s_name
The official name of the service.
.It Fa s_aliases
-A zero-terminated list of alternate names for the service.
+A null-terminated list of alternate names for the service.
.It Fa s_port
The port number at which the service resides.
Port numbers are returned in network byte order.
@@ -105,7 +105,7 @@ function opens and rewinds the file.
If the
.Fa stayopen
flag is non-zero,
-the net database will not be closed after each call to
+the services database will not be closed after each call to
.Fn getservbyname
or
.Fn getservbyport .
@@ -193,7 +193,7 @@ The
and
.Fn endservent_r
functions are not currently standardized.
-This implementation follows the API used by HP, IBM and Digital.
+This implementation follows the API used by HP, IBM, and Digital.
.Sh HISTORY
The
.Fn getservent ,
@@ -203,8 +203,8 @@ The
and
.Fn endservent
functions appeared in
-.Pp
.Bx 4.2 .
+.Pp
The
.Fn getservent_r ,
.Fn getservbyport_r ,
diff --git a/lib/libc/net/if_indextoname.3 b/lib/libc/net/if_indextoname.3
index e7bfde4900f..b0545a5060b 100644
--- a/lib/libc/net/if_indextoname.3
+++ b/lib/libc/net/if_indextoname.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: if_indextoname.3,v 1.8 2005/02/25 03:12:43 cloder Exp $
+.\" $OpenBSD: if_indextoname.3,v 1.9 2005/07/22 04:50:51 jaredy Exp $
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -38,6 +38,7 @@
.Nm if_freenameindex
.Nd convert interface index to name, and vice versa
.Sh SYNOPSIS
+.Fd #include <sys/socket.h>
.Fd #include <net/if.h>
.Ft "unsigned int"
.Fn if_nametoindex "const char *ifname"
@@ -81,16 +82,16 @@ is returned.
.Pp
.Fn if_nameindex
returns an array of
-.Fa if_nameindex
+.Vt if_nameindex
structures.
-.Fa if_nametoindex
+.Vt if_nameindex
is also defined in
.Aq Pa net/if.h ,
and is as follows:
-.Bd -literal -offset
+.Bd -literal -offset indent
struct if_nameindex {
- unsigned int if_index; /* 1, 2, ... */
- char *if_name; /* NUL-terminated name: "le0", ... */
+ unsigned int if_index; /* 1, 2, ... */
+ char *if_name; /* NUL-terminated name */
};
.Ed
.Pp
@@ -128,9 +129,15 @@ on errors.
.Sh SEE ALSO
.Xr getifaddrs 3 ,
.Xr networking 4
-.Pp
-R. Gilligan, S. Thomson, J. Bound, and W. Stevens,
-``Basic Socket Interface Extensions for IPv6,'' RFC 2553, March 1999.
+.Rs
+.%A R. Gilligan
+.%A S. Thomson
+.%A J. Bound
+.%A W. Stevens
+.%T Basic Socket Interface Extensions for IPv6
+.%R RFC 2553
+.%D March 1999
+.Re
.Sh STANDARDS
These functions are defined in ``Basic Socket Interface Extensions for IPv6''
.Pq RFC 2533 .
diff --git a/lib/libc/net/inet.3 b/lib/libc/net/inet.3
index 43cb5bafd75..f22e4b7d6f1 100644
--- a/lib/libc/net/inet.3
+++ b/lib/libc/net/inet.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: inet.3,v 1.18 2003/09/09 12:00:39 jmc Exp $
+.\" $OpenBSD: inet.3,v 1.19 2005/07/22 04:50:51 jaredy Exp $
.\" $NetBSD: inet.3,v 1.7 1997/06/18 02:25:24 lukem Exp $
.\"
.\" Copyright (c) 1983, 1990, 1991, 1993
@@ -70,7 +70,7 @@
.Sh DESCRIPTION
The routines
.Fn inet_aton ,
-.Fn inet_addr
+.Fn inet_addr ,
and
.Fn inet_network
interpret character strings representing
@@ -83,8 +83,8 @@ function converts a presentation format address (that is, printable form
as held in a character string) to network format (usually a
.Li struct in_addr
or some other internal binary representation, in network byte order).
-It returns 1 if the address was valid for the specified address family, or
-0 if the address wasn't parseable in the specified address family, or \-1
+It returns 1 if the address was valid for the specified address family;
+0 if the address wasn't parseable in the specified address family; or \-1
if some system error occurred (in which case
.Va errno
will have been set).
@@ -192,7 +192,7 @@ in a
notation
may be decimal, octal, or hexadecimal, as specified
in the C language (i.e., a leading 0x or 0X implies
-hexadecimal; otherwise, a leading 0 implies octal;
+hexadecimal; a leading 0 implies octal;
otherwise, the number is interpreted as decimal).
.Sh INTERNET ADDRESSES (IP VERSION 6)
In order to support scoped IPv6 addresses,
@@ -314,7 +314,7 @@ The
.Nm inet_addr ,
.Nm inet_network ,
.Nm inet_makeaddr ,
-.Nm inet_lnaof
+.Nm inet_lnaof ,
and
.Nm inet_netof
functions appeared in
diff --git a/lib/libc/net/inet_net.3 b/lib/libc/net/inet_net.3
index c14fa52e386..569ddfc5c63 100644
--- a/lib/libc/net/inet_net.3
+++ b/lib/libc/net/inet_net.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: inet_net.3,v 1.10 2003/05/01 19:17:37 jmc Exp $
+.\" $OpenBSD: inet_net.3,v 1.11 2005/07/22 04:50:51 jaredy Exp $
.\" $NetBSD: inet_net.3,v 1.1 1997/06/18 02:25:27 lukem Exp $
.\"
.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -120,35 +120,36 @@ is not specified the number of bits in the network address is calculated
as the larger of the number of bits in the class to which the address
belongs and the number of bits provided rounded up modulo 8.
Examples:
-.Bl -tag -width 10.1.2.3/24
+.Pp
+.Bl -tag -width 10.1.2.3/24 -offset indent -compact
.It Li 10
-an 8 bit network number (class A), value
+an 8-bit network number (class A), value
.Li 10.0.0.0 .
.It Li 192
-a 24 bit network number (class C), value
+a 24-bit network number (class C), value
.Li 192.0.0.0 .
.It Li 10.10
-a 16 bit network number, value
+a 16-bit network number, value
.Li 10.10.0.0 .
.It Li 10.1.2
-a 24 bit network number, value
+a 24-bit network number, value
.Li 10.1.2.0 .
.It Li 10.1.2.3
-a 32 bit network number, value
+a 32-bit network number, value
.Li 10.1.2.3 .
.It Li 10.1.2.3/24
-a 24 bit network number (explicit), value
+a 24-bit network number (explicit), value
.Li 10.1.2.3 .
.El
.Pp
Note that when the number of bits is specified using
.Dq Li /bits
-notation, the value of the address still includes all bits suplied
+notation, the value of the address still includes all bits supplied
in the external representation, even those bits which are the host
-part of an internet address.
+part of an Internet address.
Also, unlike
.Xr inet_pton 3
-where the external representation is assumed to be an internet address, the
+where the external representation is assumed to be a host address, the
external representation for
.Fn inet_net_pton
is assumed to be a network address.
diff --git a/lib/libc/net/link_addr.3 b/lib/libc/net/link_addr.3
index 0f8787e1914..fc1fd852571 100644
--- a/lib/libc/net/link_addr.3
+++ b/lib/libc/net/link_addr.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: link_addr.3,v 1.10 2005/02/25 03:12:43 cloder Exp $
+.\" $OpenBSD: link_addr.3,v 1.11 2005/07/22 04:50:51 jaredy Exp $
.\"
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@@ -105,7 +105,8 @@ and
functions appeared in
.Bx 4.3 Reno .
.Sh BUGS
-The returned values for link_ntoa
+The returned values for
+.Fn link_ntoa
reside in a static memory area.
.Pp
The function
diff --git a/lib/libc/net/resolver.3 b/lib/libc/net/resolver.3
index d1eb2298ae9..c9532e9c945 100644
--- a/lib/libc/net/resolver.3
+++ b/lib/libc/net/resolver.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: resolver.3,v 1.19 2005/04/05 22:14:20 fgsch Exp $
+.\" $OpenBSD: resolver.3,v 1.20 2005/07/22 04:50:51 jaredy Exp $
.\"
.\" Copyright (c) 1985, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -49,7 +49,7 @@
.Fa "const char *dname"
.Fa "int class"
.Fa "int type"
-.Fa "u_char *answer"
+.Fa "unsigned char *answer"
.Fa "int anslen"
.Fc
.Ft int
@@ -57,7 +57,7 @@
.Fa "const char *dname"
.Fa "int class"
.Fa "int type"
-.Fa "u_char *answer"
+.Fa "unsigned char *answer"
.Fa "int anslen"
.Fc
.Ft int
@@ -66,17 +66,17 @@
.Fa "const char *dname"
.Fa "int class"
.Fa "int type"
-.Fa "const u_char *data"
+.Fa "const unsigned char *data"
.Fa "int datalen"
-.Fa "const u_char *newrr"
-.Fa "u_char *buf"
+.Fa "const unsigned char *newrr"
+.Fa "unsigned char *buf"
.Fa "int buflen"
.Fc
.Ft int
.Fo res_send
-.Fa "const u_char *msg"
+.Fa "const unsigned char *msg"
.Fa "int msglen"
-.Fa "u_char *answer"
+.Fa "unsigned char *answer"
.Fa "int anslen"
.Fc
.Ft int
@@ -84,16 +84,16 @@
.Ft int
.Fo dn_comp
.Fa "const char *exp_dn"
-.Fa "u_char *comp_dn"
+.Fa "unsigned char *comp_dn"
.Fa "int length"
-.Fa "u_char **dnptrs"
-.Fa "u_char **lastdnptr"
+.Fa "unsigned char **dnptrs"
+.Fa "unsigned char **lastdnptr"
.Fc
.Ft int
.Fo dn_expand
-.Fa "const u_char *msg"
-.Fa "const u_char *eomorig"
-.Fa "const u_char *comp_dn"
+.Fa "const unsigned char *msg"
+.Fa "const unsigned char *eomorig"
+.Fa "const unsigned char *comp_dn"
.Fa "char *exp_dn"
.Fa "int length"
.Fc
@@ -237,7 +237,7 @@ and
.Fa type
fields
are defined in
-.Aq Pa arpa/nameserv.h .
+.Aq Pa arpa/nameser.h .
.Pp
The
.Fn res_search
@@ -304,7 +304,7 @@ A side effect of
is to update the list of pointers for labels inserted into the message
as the name is compressed.
If
-.Em dnptr
+.Fa dnptrs
is
.Dv NULL ,
names are not compressed.