diff options
author | jaredy <> | 2005-07-22 04:50:51 +0000 |
---|---|---|
committer | jaredy <> | 2005-07-22 04:50:51 +0000 |
commit | 3553ae132550867ea92f1c819130713a94c9aa57 (patch) | |
tree | 0fcccaffb7fe67c8d9c1f46e9831c994ceadc81a | |
parent | fca3e187a867f51bfd0b46cc4d3f49175ffddef6 (diff) | |
download | openbsd-3553ae132550867ea92f1c819130713a94c9aa57.tar.gz openbsd-3553ae132550867ea92f1c819130713a94c9aa57.tar.bz2 openbsd-3553ae132550867ea92f1c819130713a94c9aa57.zip |
- sync prototypes and header file excerpts
- typos/spelling, punctuation, rewording, macro, and layout fixes.
help & ok jmc
-rw-r--r-- | src/lib/libc/net/byteorder.3 | 6 | ||||
-rw-r--r-- | src/lib/libc/net/ethers.3 | 5 | ||||
-rw-r--r-- | src/lib/libc/net/gethostbyname.3 | 21 | ||||
-rw-r--r-- | src/lib/libc/net/getifaddrs.3 | 8 | ||||
-rw-r--r-- | src/lib/libc/net/getnetent.3 | 4 | ||||
-rw-r--r-- | src/lib/libc/net/getprotoent.3 | 14 | ||||
-rw-r--r-- | src/lib/libc/net/getrrsetbyname.3 | 53 | ||||
-rw-r--r-- | src/lib/libc/net/getservent.3 | 10 | ||||
-rw-r--r-- | src/lib/libc/net/if_indextoname.3 | 25 | ||||
-rw-r--r-- | src/lib/libc/net/inet.3 | 12 | ||||
-rw-r--r-- | src/lib/libc/net/inet_net.3 | 23 | ||||
-rw-r--r-- | src/lib/libc/net/link_addr.3 | 5 | ||||
-rw-r--r-- | src/lib/libc/net/resolver.3 | 32 |
13 files changed, 116 insertions, 102 deletions
diff --git a/src/lib/libc/net/byteorder.3 b/src/lib/libc/net/byteorder.3 index 54123455c6..e548958617 100644 --- a/src/lib/libc/net/byteorder.3 +++ b/src/lib/libc/net/byteorder.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: byteorder.3,v 1.13 2003/09/26 17:06:50 fgsch Exp $ | 1 | .\" $OpenBSD: byteorder.3,v 1.14 2005/07/22 04:50:51 jaredy Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1983, 1991, 1993 | 3 | .\" Copyright (c) 1983, 1991, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | 4 | .\" The Regents of the University of California. All rights reserved. |
@@ -97,7 +97,7 @@ byte orderings. | |||
97 | The | 97 | The |
98 | .Dq swap | 98 | .Dq swap |
99 | functions reverse the byte ordering of | 99 | functions reverse the byte ordering of |
100 | the given quantity, the others converts either from/to the native | 100 | the given quantity; the others convert either from/to the native |
101 | byte order used by the host to/from either little- or big-endian (a.k.a | 101 | byte order used by the host to/from either little- or big-endian (a.k.a |
102 | network) order. | 102 | network) order. |
103 | .Pp | 103 | .Pp |
@@ -165,7 +165,7 @@ The functions involving either | |||
165 | or | 165 | or |
166 | .Dq swap | 166 | .Dq swap |
167 | use the numbers | 167 | use the numbers |
168 | 16, 32 and 64 for specifying the bitwidth of the quantities they operate on. | 168 | 16, 32, or 64 for specifying the bitwidth of the quantities they operate on. |
169 | Currently all supported architectures are either big- or little-endian | 169 | Currently all supported architectures are either big- or little-endian |
170 | so either the | 170 | so either the |
171 | .Dq be | 171 | .Dq be |
diff --git a/src/lib/libc/net/ethers.3 b/src/lib/libc/net/ethers.3 index 72ea79bb2c..febd62392e 100644 --- a/src/lib/libc/net/ethers.3 +++ b/src/lib/libc/net/ethers.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: ethers.3,v 1.15 2005/03/28 06:21:48 tedu Exp $ | 1 | .\" $OpenBSD: ethers.3,v 1.16 2005/07/22 04:50:51 jaredy Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Written by roland@frob.com. Public domain. | 3 | .\" Written by roland@frob.com. Public domain. |
4 | .\" | 4 | .\" |
@@ -14,6 +14,9 @@ | |||
14 | .Nm ether_line | 14 | .Nm ether_line |
15 | .Nd get ethers entry | 15 | .Nd get ethers entry |
16 | .Sh SYNOPSIS | 16 | .Sh SYNOPSIS |
17 | .Fd #include <sys/socket.h> | ||
18 | .Fd #include <net/if.h> | ||
19 | .Fd #include <netinet/in.h> | ||
17 | .Fd #include <netinet/if_ether.h> | 20 | .Fd #include <netinet/if_ether.h> |
18 | .Ft char * | 21 | .Ft char * |
19 | .Fn ether_ntoa "struct ether_addr *e" | 22 | .Fn ether_ntoa "struct ether_addr *e" |
diff --git a/src/lib/libc/net/gethostbyname.3 b/src/lib/libc/net/gethostbyname.3 index c2db100c9b..f3f3ea580f 100644 --- a/src/lib/libc/net/gethostbyname.3 +++ b/src/lib/libc/net/gethostbyname.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: gethostbyname.3,v 1.23 2005/06/08 18:32:34 millert Exp $ | 1 | .\" $OpenBSD: gethostbyname.3,v 1.24 2005/07/22 04:50:51 jaredy Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1983, 1987, 1991, 1993 | 3 | .\" Copyright (c) 1983, 1987, 1991, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | 4 | .\" The Regents of the University of California. All rights reserved. |
@@ -42,7 +42,7 @@ | |||
42 | .Nd get network host entry | 42 | .Nd get network host entry |
43 | .Sh SYNOPSIS | 43 | .Sh SYNOPSIS |
44 | .Fd #include <netdb.h> | 44 | .Fd #include <netdb.h> |
45 | .Fd extern int h_errno; | 45 | .Vt extern int h_errno ; |
46 | .Ft struct hostent * | 46 | .Ft struct hostent * |
47 | .Fn gethostbyname "const char *name" | 47 | .Fn gethostbyname "const char *name" |
48 | .Ft struct hostent * | 48 | .Ft struct hostent * |
@@ -62,11 +62,11 @@ | |||
62 | .Sh DESCRIPTION | 62 | .Sh DESCRIPTION |
63 | The | 63 | The |
64 | .Fn gethostbyname , | 64 | .Fn gethostbyname , |
65 | .Fn gethostbyname2 | 65 | .Fn gethostbyname2 , |
66 | and | 66 | and |
67 | .Fn gethostbyaddr | 67 | .Fn gethostbyaddr |
68 | functions each return a pointer to an object with the following structure | 68 | functions each return a pointer to an object with the following structure |
69 | describing an internet host referenced by name or by address, respectively. | 69 | describing an Internet host referenced by name or by address, respectively. |
70 | This structure contains either information obtained from the name server (i.e., | 70 | This structure contains either information obtained from the name server (i.e., |
71 | .Xr resolver 3 | 71 | .Xr resolver 3 |
72 | and | 72 | and |
@@ -78,15 +78,15 @@ or database entries supplied by the | |||
78 | system. | 78 | system. |
79 | .Xr resolv.conf 5 | 79 | .Xr resolv.conf 5 |
80 | describes how the particular database is chosen. | 80 | describes how the particular database is chosen. |
81 | .Bd -literal | 81 | .Bd -literal -offset indent |
82 | struct hostent { | 82 | struct hostent { |
83 | char *h_name; /* official name of host */ | 83 | char *h_name; /* official name of host */ |
84 | char **h_aliases; /* alias list */ | 84 | char **h_aliases; /* alias list */ |
85 | int h_addrtype; /* host address type */ | 85 | int h_addrtype; /* host address type */ |
86 | int h_length; /* length of address */ | 86 | int h_length; /* length of address */ |
87 | char **h_addr_list; /* list of addresses from name server */ | 87 | char **h_addr_list; /* list of returned addresses */ |
88 | }; | 88 | }; |
89 | #define h_addr h_addr_list[0] /* address, for backward compatibility */ | 89 | #define h_addr h_addr_list[0] /* address, for backward compat */ |
90 | .Ed | 90 | .Ed |
91 | .Pp | 91 | .Pp |
92 | The members of this structure are: | 92 | The members of this structure are: |
@@ -94,13 +94,13 @@ The members of this structure are: | |||
94 | .It Fa h_name | 94 | .It Fa h_name |
95 | Official name of the host. | 95 | Official name of the host. |
96 | .It Fa h_aliases | 96 | .It Fa h_aliases |
97 | A NULL-terminated array of alternate names for the host. | 97 | A null-terminated array of alternate names for the host. |
98 | .It Fa h_addrtype | 98 | .It Fa h_addrtype |
99 | The type of address being returned. | 99 | The type of address being returned. |
100 | .It Fa h_length | 100 | .It Fa h_length |
101 | The length, in bytes, of the address. | 101 | The length, in bytes, of the address. |
102 | .It Fa h_addr_list | 102 | .It Fa h_addr_list |
103 | A zero-terminated array of network addresses for the host. | 103 | A null-terminated array of network addresses for the host. |
104 | Host addresses are returned in network byte order. | 104 | Host addresses are returned in network byte order. |
105 | .It Fa h_addr | 105 | .It Fa h_addr |
106 | The first address in | 106 | The first address in |
@@ -227,7 +227,7 @@ will result in an answer; | |||
227 | for example, a mail-forwarder may be registered for this domain. | 227 | for example, a mail-forwarder may be registered for this domain. |
228 | .It Dv NETDB_INTERNAL | 228 | .It Dv NETDB_INTERNAL |
229 | An internal error occurred. | 229 | An internal error occurred. |
230 | This may occurs when an address family other than | 230 | This may occur when an address family other than |
231 | .Dv AF_INET | 231 | .Dv AF_INET |
232 | or | 232 | or |
233 | .Dv AF_INET6 | 233 | .Dv AF_INET6 |
@@ -287,6 +287,7 @@ function closes the file. | |||
287 | These functions use static data storage; | 287 | These functions use static data storage; |
288 | if the data is needed for future use, it should be | 288 | if the data is needed for future use, it should be |
289 | copied before any subsequent calls overwrite it. | 289 | copied before any subsequent calls overwrite it. |
290 | .Pp | ||
290 | Only the Internet | 291 | Only the Internet |
291 | address formats are currently understood. | 292 | address formats are currently understood. |
292 | .Pp | 293 | .Pp |
diff --git a/src/lib/libc/net/getifaddrs.3 b/src/lib/libc/net/getifaddrs.3 index ffbdf4da41..e6380be4b7 100644 --- a/src/lib/libc/net/getifaddrs.3 +++ b/src/lib/libc/net/getifaddrs.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: getifaddrs.3,v 1.11 2004/04/16 10:48:39 jmc Exp $ | 1 | .\" $OpenBSD: getifaddrs.3,v 1.12 2005/07/22 04:50:51 jaredy Exp $ |
2 | .\" BSDI getifaddrs.3,v 2.5 2000/02/23 14:51:59 dab Exp | 2 | .\" BSDI getifaddrs.3,v 2.5 2000/02/23 14:51:59 dab Exp |
3 | .\" | 3 | .\" |
4 | .\" Copyright (c) 1995, 1999 | 4 | .\" Copyright (c) 1995, 1999 |
@@ -58,12 +58,12 @@ structure contains at least the following entries: | |||
58 | struct sockaddr *ifa_dstaddr; /* P2P interface destination */ | 58 | struct sockaddr *ifa_dstaddr; /* P2P interface destination */ |
59 | void *ifa_data; /* Address specific data */ | 59 | void *ifa_data; /* Address specific data */ |
60 | .Ed | 60 | .Ed |
61 | .Bl -tag -width Ds | 61 | .Bl -tag -width ifa_broadaddr |
62 | .It Fa ifa_next | 62 | .It Fa ifa_next |
63 | Contains a pointer to the next structure on the list. | 63 | Contains a pointer to the next structure on the list. |
64 | This field is set to | 64 | This field is set to |
65 | .Dv NULL | 65 | .Dv NULL |
66 | in last structure on the list. | 66 | in the last structure on the list. |
67 | .It Fa ifa_name | 67 | .It Fa ifa_name |
68 | Contains the interface name. | 68 | Contains the interface name. |
69 | .It Fa ifa_flags | 69 | .It Fa ifa_flags |
@@ -142,7 +142,7 @@ or | |||
142 | The | 142 | The |
143 | .Fn getifaddrs | 143 | .Fn getifaddrs |
144 | function first appeared in BSDI BSD/OS. | 144 | function first appeared in BSDI BSD/OS. |
145 | The function is supplied on | 145 | The function has been available on |
146 | .Ox | 146 | .Ox |
147 | since | 147 | since |
148 | .Ox 2.7 . | 148 | .Ox 2.7 . |
diff --git a/src/lib/libc/net/getnetent.3 b/src/lib/libc/net/getnetent.3 index 40b50a8c3f..b337c8c02d 100644 --- a/src/lib/libc/net/getnetent.3 +++ b/src/lib/libc/net/getnetent.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: getnetent.3,v 1.13 2004/02/01 19:45:00 nordin Exp $ | 1 | .\" $OpenBSD: getnetent.3,v 1.14 2005/07/22 04:50:51 jaredy Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1983, 1991, 1993 | 3 | .\" Copyright (c) 1983, 1991, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | 4 | .\" The Regents of the University of California. All rights reserved. |
@@ -72,7 +72,7 @@ The members of this structure are: | |||
72 | .It Fa n_name | 72 | .It Fa n_name |
73 | The official name of the network. | 73 | The official name of the network. |
74 | .It Fa n_aliases | 74 | .It Fa n_aliases |
75 | A zero-terminated list of alternate names for the network. | 75 | A null-terminated list of alternate names for the network. |
76 | .It Fa n_addrtype | 76 | .It Fa n_addrtype |
77 | The type of the network number returned; currently only | 77 | The type of the network number returned; currently only |
78 | .Dv AF_INET . | 78 | .Dv AF_INET . |
diff --git a/src/lib/libc/net/getprotoent.3 b/src/lib/libc/net/getprotoent.3 index 7b50952362..ea3644f6c9 100644 --- a/src/lib/libc/net/getprotoent.3 +++ b/src/lib/libc/net/getprotoent.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: getprotoent.3,v 1.15 2005/06/05 19:40:21 jmc Exp $ | 1 | .\" $OpenBSD: getprotoent.3,v 1.16 2005/07/22 04:50:51 jaredy Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1983, 1991, 1993 | 3 | .\" Copyright (c) 1983, 1991, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | 4 | .\" The Regents of the University of California. All rights reserved. |
@@ -87,7 +87,7 @@ The members of this structure are: | |||
87 | .It Fa p_name | 87 | .It Fa p_name |
88 | The official name of the protocol. | 88 | The official name of the protocol. |
89 | .It Fa p_aliases | 89 | .It Fa p_aliases |
90 | A zero-terminated list of alternate names for the protocol. | 90 | A null-terminated list of alternate names for the protocol. |
91 | .It Fa p_proto | 91 | .It Fa p_proto |
92 | The protocol number. | 92 | The protocol number. |
93 | .El | 93 | .El |
@@ -102,7 +102,7 @@ function opens and rewinds the file. | |||
102 | If the | 102 | If the |
103 | .Fa stayopen | 103 | .Fa stayopen |
104 | flag is non-zero, | 104 | flag is non-zero, |
105 | the net database will not be closed after each call to | 105 | the protocol database will not be closed after each call to |
106 | .Fn getprotobyname | 106 | .Fn getprotobyname |
107 | or | 107 | or |
108 | .Fn getprotobynumber . | 108 | .Fn getprotobynumber . |
@@ -129,7 +129,7 @@ and | |||
129 | .Fn endprotoent_r | 129 | .Fn endprotoent_r |
130 | functions are reentrant versions of the above functions that take a | 130 | functions are reentrant versions of the above functions that take a |
131 | pointer to a | 131 | pointer to a |
132 | .Fa protoent_data | 132 | .Vt protoent_data |
133 | structure which is used to store state information. | 133 | structure which is used to store state information. |
134 | The structure must be zero-filled before it is used | 134 | The structure must be zero-filled before it is used |
135 | and should be considered opaque for the sake of portability. | 135 | and should be considered opaque for the sake of portability. |
@@ -141,7 +141,7 @@ and | |||
141 | .Fn getprotobyname_r | 141 | .Fn getprotobyname_r |
142 | functions | 142 | functions |
143 | also take a pointer to a | 143 | also take a pointer to a |
144 | .Fa protoent | 144 | .Vt protoent |
145 | structure which is used to store the results of the database lookup. | 145 | structure which is used to store the results of the database lookup. |
146 | .Sh RETURN VALUES | 146 | .Sh RETURN VALUES |
147 | The | 147 | The |
@@ -150,7 +150,7 @@ The | |||
150 | and | 150 | and |
151 | .Fn getprotobyname | 151 | .Fn getprotobyname |
152 | functions return a pointer to a | 152 | functions return a pointer to a |
153 | .Fa servent | 153 | .Vt protoent |
154 | structure on success or a null pointer if end-of-file | 154 | structure on success or a null pointer if end-of-file |
155 | is reached or an error occurs. | 155 | is reached or an error occurs. |
156 | .Pp | 156 | .Pp |
@@ -186,7 +186,7 @@ The | |||
186 | and | 186 | and |
187 | .Fn endprotoent_r | 187 | .Fn endprotoent_r |
188 | functions are not currently standardized. | 188 | functions are not currently standardized. |
189 | This implementation follows the API used by HP, IBM and Digital. | 189 | This implementation follows the API used by HP, IBM, and Digital. |
190 | .Sh HISTORY | 190 | .Sh HISTORY |
191 | The | 191 | The |
192 | .Fn getprotoent , | 192 | .Fn getprotoent , |
diff --git a/src/lib/libc/net/getrrsetbyname.3 b/src/lib/libc/net/getrrsetbyname.3 index 621ff31b81..c951f905ab 100644 --- a/src/lib/libc/net/getrrsetbyname.3 +++ b/src/lib/libc/net/getrrsetbyname.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: getrrsetbyname.3,v 1.13 2005/02/25 03:12:43 cloder Exp $ | 1 | .\" $OpenBSD: getrrsetbyname.3,v 1.14 2005/07/22 04:50:51 jaredy Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (C) 2000, 2001 Internet Software Consortium. | 3 | .\" Copyright (C) 2000, 2001 Internet Software Consortium. |
4 | .\" | 4 | .\" |
@@ -19,6 +19,7 @@ | |||
19 | .Dt GETRRSETBYNAME 3 | 19 | .Dt GETRRSETBYNAME 3 |
20 | .Os | 20 | .Os |
21 | .Sh NAME | 21 | .Sh NAME |
22 | .Nm freerrset , | ||
22 | .Nm getrrsetbyname | 23 | .Nm getrrsetbyname |
23 | .Nd retrieve DNS records | 24 | .Nd retrieve DNS records |
24 | .Sh SYNOPSIS | 25 | .Sh SYNOPSIS |
@@ -32,7 +33,7 @@ | |||
32 | .Fn getrrsetbyname | 33 | .Fn getrrsetbyname |
33 | gets a set of resource records associated with a | 34 | gets a set of resource records associated with a |
34 | .Fa hostname , | 35 | .Fa hostname , |
35 | .Fa rdclass | 36 | .Fa rdclass , |
36 | and | 37 | and |
37 | .Fa rdtype . | 38 | .Fa rdtype . |
38 | .Fa hostname | 39 | .Fa hostname |
@@ -74,22 +75,22 @@ bit is set, the data has been DNSSEC | |||
74 | validated and the signatures verified. | 75 | validated and the signatures verified. |
75 | .Pp | 76 | .Pp |
76 | The following structures are used: | 77 | The following structures are used: |
77 | .Bd -literal -offset | 78 | .Bd -literal -offset indent |
78 | struct rdatainfo { | 79 | struct rdatainfo { |
79 | unsigned int rdi_length; /* length of data */ | 80 | unsigned int rdi_length; /* length of data */ |
80 | unsigned char *rdi_data; /* record data */ | 81 | unsigned char *rdi_data; /* record data */ |
81 | }; | 82 | }; |
82 | 83 | ||
83 | struct rrsetinfo { | 84 | struct rrsetinfo { |
84 | unsigned int rri_flags; /* RRSET_VALIDATED ... */ | 85 | unsigned int rri_flags; /* RRSET_VALIDATED ... */ |
85 | unsigned int rri_rdclass; /* class number */ | 86 | unsigned int rri_rdclass; /* class number */ |
86 | unsigned int rri_rdtype; /* RR type number */ | 87 | unsigned int rri_rdtype; /* RR type number */ |
87 | unsigned int rri_ttl; /* time to live */ | 88 | unsigned int rri_ttl; /* time to live */ |
88 | unsigned int rri_nrdatas; /* size of rdatas array */ | 89 | unsigned int rri_nrdatas; /* size of rdatas array */ |
89 | unsigned int rri_nsigs; /* size of sigs array */ | 90 | unsigned int rri_nsigs; /* size of sigs array */ |
90 | char *rri_name; /* canonical name */ | 91 | char *rri_name; /* canonical name */ |
91 | struct rdatainfo *rri_rdatas; /* individual records */ | 92 | struct rdatainfo *rri_rdatas; /* individual records */ |
92 | struct rdatainfo *rri_sigs; /* individual signatures */ | 93 | struct rdatainfo *rri_sigs; /* individual signatures */ |
93 | }; | 94 | }; |
94 | .Ed | 95 | .Ed |
95 | .Pp | 96 | .Pp |
@@ -110,7 +111,7 @@ is released by | |||
110 | .Fn freerrset . | 111 | .Fn freerrset . |
111 | .Li rrset | 112 | .Li rrset |
112 | is a pointer to a | 113 | is a pointer to a |
113 | .Li struct rrset | 114 | .Li struct rrsetinfo |
114 | created by a call to | 115 | created by a call to |
115 | .Fn getrrsetbyname . | 116 | .Fn getrrsetbyname . |
116 | .Pp | 117 | .Pp |
@@ -123,17 +124,17 @@ will request DNSSEC authentication using the EDNS0 DNSSEC OK (DO) bit. | |||
123 | returns zero on success, and one of the following error | 124 | returns zero on success, and one of the following error |
124 | codes if an error occurred: | 125 | codes if an error occurred: |
125 | .Pp | 126 | .Pp |
126 | .Bl -tag -width ERRSET_NOMEMORY -compact | 127 | .Bl -tag -width ERRSET_NOMEMORY |
127 | .It Dv ERRSET_NONAME | 128 | .It Bq Er ERRSET_NONAME |
128 | the name does not exist | 129 | The name does not exist. |
129 | .It Dv ERRSET_NODATA | 130 | .It Bq Er ERRSET_NODATA |
130 | the name exists, but does not have data of the desired type | 131 | The name exists, but does not have data of the desired type. |
131 | .It Dv ERRSET_NOMEMORY | 132 | .It Bq Er ERRSET_NOMEMORY |
132 | memory could not be allocated | 133 | Memory could not be allocated. |
133 | .It Dv ERRSET_INVAL | 134 | .It Bq Er ERRSET_INVAL |
134 | a parameter is invalid | 135 | A parameter is invalid. |
135 | .It Dv ERRSET_FAIL | 136 | .It Bq Er ERRSET_FAIL |
136 | other failure | 137 | Other failure. |
137 | .El | 138 | .El |
138 | .Sh SEE ALSO | 139 | .Sh SEE ALSO |
139 | .Xr resolver 3 , | 140 | .Xr resolver 3 , |
diff --git a/src/lib/libc/net/getservent.3 b/src/lib/libc/net/getservent.3 index aa24aab13a..839d89de6c 100644 --- a/src/lib/libc/net/getservent.3 +++ b/src/lib/libc/net/getservent.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: getservent.3,v 1.18 2005/06/05 19:44:16 jmc Exp $ | 1 | .\" $OpenBSD: getservent.3,v 1.19 2005/07/22 04:50:51 jaredy Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1983, 1991, 1993 | 3 | .\" Copyright (c) 1983, 1991, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | 4 | .\" The Regents of the University of California. All rights reserved. |
@@ -87,7 +87,7 @@ The members of this structure are: | |||
87 | .It Fa s_name | 87 | .It Fa s_name |
88 | The official name of the service. | 88 | The official name of the service. |
89 | .It Fa s_aliases | 89 | .It Fa s_aliases |
90 | A zero-terminated list of alternate names for the service. | 90 | A null-terminated list of alternate names for the service. |
91 | .It Fa s_port | 91 | .It Fa s_port |
92 | The port number at which the service resides. | 92 | The port number at which the service resides. |
93 | Port numbers are returned in network byte order. | 93 | Port numbers are returned in network byte order. |
@@ -105,7 +105,7 @@ function opens and rewinds the file. | |||
105 | If the | 105 | If the |
106 | .Fa stayopen | 106 | .Fa stayopen |
107 | flag is non-zero, | 107 | flag is non-zero, |
108 | the net database will not be closed after each call to | 108 | the services database will not be closed after each call to |
109 | .Fn getservbyname | 109 | .Fn getservbyname |
110 | or | 110 | or |
111 | .Fn getservbyport . | 111 | .Fn getservbyport . |
@@ -193,7 +193,7 @@ The | |||
193 | and | 193 | and |
194 | .Fn endservent_r | 194 | .Fn endservent_r |
195 | functions are not currently standardized. | 195 | functions are not currently standardized. |
196 | This implementation follows the API used by HP, IBM and Digital. | 196 | This implementation follows the API used by HP, IBM, and Digital. |
197 | .Sh HISTORY | 197 | .Sh HISTORY |
198 | The | 198 | The |
199 | .Fn getservent , | 199 | .Fn getservent , |
@@ -203,8 +203,8 @@ The | |||
203 | and | 203 | and |
204 | .Fn endservent | 204 | .Fn endservent |
205 | functions appeared in | 205 | functions appeared in |
206 | .Pp | ||
207 | .Bx 4.2 . | 206 | .Bx 4.2 . |
207 | .Pp | ||
208 | The | 208 | The |
209 | .Fn getservent_r , | 209 | .Fn getservent_r , |
210 | .Fn getservbyport_r , | 210 | .Fn getservbyport_r , |
diff --git a/src/lib/libc/net/if_indextoname.3 b/src/lib/libc/net/if_indextoname.3 index e7bfde4900..b0545a5060 100644 --- a/src/lib/libc/net/if_indextoname.3 +++ b/src/lib/libc/net/if_indextoname.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: if_indextoname.3,v 1.8 2005/02/25 03:12:43 cloder Exp $ | 1 | .\" $OpenBSD: if_indextoname.3,v 1.9 2005/07/22 04:50:51 jaredy Exp $ |
2 | .\" Copyright (c) 1983, 1991, 1993 | 2 | .\" Copyright (c) 1983, 1991, 1993 |
3 | .\" The Regents of the University of California. All rights reserved. | 3 | .\" The Regents of the University of California. All rights reserved. |
4 | .\" | 4 | .\" |
@@ -38,6 +38,7 @@ | |||
38 | .Nm if_freenameindex | 38 | .Nm if_freenameindex |
39 | .Nd convert interface index to name, and vice versa | 39 | .Nd convert interface index to name, and vice versa |
40 | .Sh SYNOPSIS | 40 | .Sh SYNOPSIS |
41 | .Fd #include <sys/socket.h> | ||
41 | .Fd #include <net/if.h> | 42 | .Fd #include <net/if.h> |
42 | .Ft "unsigned int" | 43 | .Ft "unsigned int" |
43 | .Fn if_nametoindex "const char *ifname" | 44 | .Fn if_nametoindex "const char *ifname" |
@@ -81,16 +82,16 @@ is returned. | |||
81 | .Pp | 82 | .Pp |
82 | .Fn if_nameindex | 83 | .Fn if_nameindex |
83 | returns an array of | 84 | returns an array of |
84 | .Fa if_nameindex | 85 | .Vt if_nameindex |
85 | structures. | 86 | structures. |
86 | .Fa if_nametoindex | 87 | .Vt if_nameindex |
87 | is also defined in | 88 | is also defined in |
88 | .Aq Pa net/if.h , | 89 | .Aq Pa net/if.h , |
89 | and is as follows: | 90 | and is as follows: |
90 | .Bd -literal -offset | 91 | .Bd -literal -offset indent |
91 | struct if_nameindex { | 92 | struct if_nameindex { |
92 | unsigned int if_index; /* 1, 2, ... */ | 93 | unsigned int if_index; /* 1, 2, ... */ |
93 | char *if_name; /* NUL-terminated name: "le0", ... */ | 94 | char *if_name; /* NUL-terminated name */ |
94 | }; | 95 | }; |
95 | .Ed | 96 | .Ed |
96 | .Pp | 97 | .Pp |
@@ -128,9 +129,15 @@ on errors. | |||
128 | .Sh SEE ALSO | 129 | .Sh SEE ALSO |
129 | .Xr getifaddrs 3 , | 130 | .Xr getifaddrs 3 , |
130 | .Xr networking 4 | 131 | .Xr networking 4 |
131 | .Pp | 132 | .Rs |
132 | R. Gilligan, S. Thomson, J. Bound, and W. Stevens, | 133 | .%A R. Gilligan |
133 | ``Basic Socket Interface Extensions for IPv6,'' RFC 2553, March 1999. | 134 | .%A S. Thomson |
135 | .%A J. Bound | ||
136 | .%A W. Stevens | ||
137 | .%T Basic Socket Interface Extensions for IPv6 | ||
138 | .%R RFC 2553 | ||
139 | .%D March 1999 | ||
140 | .Re | ||
134 | .Sh STANDARDS | 141 | .Sh STANDARDS |
135 | These functions are defined in ``Basic Socket Interface Extensions for IPv6'' | 142 | These functions are defined in ``Basic Socket Interface Extensions for IPv6'' |
136 | .Pq RFC 2533 . | 143 | .Pq RFC 2533 . |
diff --git a/src/lib/libc/net/inet.3 b/src/lib/libc/net/inet.3 index 43cb5bafd7..f22e4b7d6f 100644 --- a/src/lib/libc/net/inet.3 +++ b/src/lib/libc/net/inet.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: inet.3,v 1.18 2003/09/09 12:00:39 jmc Exp $ | 1 | .\" $OpenBSD: inet.3,v 1.19 2005/07/22 04:50:51 jaredy Exp $ |
2 | .\" $NetBSD: inet.3,v 1.7 1997/06/18 02:25:24 lukem Exp $ | 2 | .\" $NetBSD: inet.3,v 1.7 1997/06/18 02:25:24 lukem Exp $ |
3 | .\" | 3 | .\" |
4 | .\" Copyright (c) 1983, 1990, 1991, 1993 | 4 | .\" Copyright (c) 1983, 1990, 1991, 1993 |
@@ -70,7 +70,7 @@ | |||
70 | .Sh DESCRIPTION | 70 | .Sh DESCRIPTION |
71 | The routines | 71 | The routines |
72 | .Fn inet_aton , | 72 | .Fn inet_aton , |
73 | .Fn inet_addr | 73 | .Fn inet_addr , |
74 | and | 74 | and |
75 | .Fn inet_network | 75 | .Fn inet_network |
76 | interpret character strings representing | 76 | interpret character strings representing |
@@ -83,8 +83,8 @@ function converts a presentation format address (that is, printable form | |||
83 | as held in a character string) to network format (usually a | 83 | as held in a character string) to network format (usually a |
84 | .Li struct in_addr | 84 | .Li struct in_addr |
85 | or some other internal binary representation, in network byte order). | 85 | or some other internal binary representation, in network byte order). |
86 | It returns 1 if the address was valid for the specified address family, or | 86 | It returns 1 if the address was valid for the specified address family; |
87 | 0 if the address wasn't parseable in the specified address family, or \-1 | 87 | 0 if the address wasn't parseable in the specified address family; or \-1 |
88 | if some system error occurred (in which case | 88 | if some system error occurred (in which case |
89 | .Va errno | 89 | .Va errno |
90 | will have been set). | 90 | will have been set). |
@@ -192,7 +192,7 @@ in a | |||
192 | notation | 192 | notation |
193 | may be decimal, octal, or hexadecimal, as specified | 193 | may be decimal, octal, or hexadecimal, as specified |
194 | in the C language (i.e., a leading 0x or 0X implies | 194 | in the C language (i.e., a leading 0x or 0X implies |
195 | hexadecimal; otherwise, a leading 0 implies octal; | 195 | hexadecimal; a leading 0 implies octal; |
196 | otherwise, the number is interpreted as decimal). | 196 | otherwise, the number is interpreted as decimal). |
197 | .Sh INTERNET ADDRESSES (IP VERSION 6) | 197 | .Sh INTERNET ADDRESSES (IP VERSION 6) |
198 | In order to support scoped IPv6 addresses, | 198 | In order to support scoped IPv6 addresses, |
@@ -314,7 +314,7 @@ The | |||
314 | .Nm inet_addr , | 314 | .Nm inet_addr , |
315 | .Nm inet_network , | 315 | .Nm inet_network , |
316 | .Nm inet_makeaddr , | 316 | .Nm inet_makeaddr , |
317 | .Nm inet_lnaof | 317 | .Nm inet_lnaof , |
318 | and | 318 | and |
319 | .Nm inet_netof | 319 | .Nm inet_netof |
320 | functions appeared in | 320 | functions appeared in |
diff --git a/src/lib/libc/net/inet_net.3 b/src/lib/libc/net/inet_net.3 index c14fa52e38..569ddfc5c6 100644 --- a/src/lib/libc/net/inet_net.3 +++ b/src/lib/libc/net/inet_net.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: inet_net.3,v 1.10 2003/05/01 19:17:37 jmc Exp $ | 1 | .\" $OpenBSD: inet_net.3,v 1.11 2005/07/22 04:50:51 jaredy Exp $ |
2 | .\" $NetBSD: inet_net.3,v 1.1 1997/06/18 02:25:27 lukem Exp $ | 2 | .\" $NetBSD: inet_net.3,v 1.1 1997/06/18 02:25:27 lukem Exp $ |
3 | .\" | 3 | .\" |
4 | .\" Copyright (c) 1997 The NetBSD Foundation, Inc. | 4 | .\" Copyright (c) 1997 The NetBSD Foundation, Inc. |
@@ -120,35 +120,36 @@ is not specified the number of bits in the network address is calculated | |||
120 | as the larger of the number of bits in the class to which the address | 120 | as the larger of the number of bits in the class to which the address |
121 | belongs and the number of bits provided rounded up modulo 8. | 121 | belongs and the number of bits provided rounded up modulo 8. |
122 | Examples: | 122 | Examples: |
123 | .Bl -tag -width 10.1.2.3/24 | 123 | .Pp |
124 | .Bl -tag -width 10.1.2.3/24 -offset indent -compact | ||
124 | .It Li 10 | 125 | .It Li 10 |
125 | an 8 bit network number (class A), value | 126 | an 8-bit network number (class A), value |
126 | .Li 10.0.0.0 . | 127 | .Li 10.0.0.0 . |
127 | .It Li 192 | 128 | .It Li 192 |
128 | a 24 bit network number (class C), value | 129 | a 24-bit network number (class C), value |
129 | .Li 192.0.0.0 . | 130 | .Li 192.0.0.0 . |
130 | .It Li 10.10 | 131 | .It Li 10.10 |
131 | a 16 bit network number, value | 132 | a 16-bit network number, value |
132 | .Li 10.10.0.0 . | 133 | .Li 10.10.0.0 . |
133 | .It Li 10.1.2 | 134 | .It Li 10.1.2 |
134 | a 24 bit network number, value | 135 | a 24-bit network number, value |
135 | .Li 10.1.2.0 . | 136 | .Li 10.1.2.0 . |
136 | .It Li 10.1.2.3 | 137 | .It Li 10.1.2.3 |
137 | a 32 bit network number, value | 138 | a 32-bit network number, value |
138 | .Li 10.1.2.3 . | 139 | .Li 10.1.2.3 . |
139 | .It Li 10.1.2.3/24 | 140 | .It Li 10.1.2.3/24 |
140 | a 24 bit network number (explicit), value | 141 | a 24-bit network number (explicit), value |
141 | .Li 10.1.2.3 . | 142 | .Li 10.1.2.3 . |
142 | .El | 143 | .El |
143 | .Pp | 144 | .Pp |
144 | Note that when the number of bits is specified using | 145 | Note that when the number of bits is specified using |
145 | .Dq Li /bits | 146 | .Dq Li /bits |
146 | notation, the value of the address still includes all bits suplied | 147 | notation, the value of the address still includes all bits supplied |
147 | in the external representation, even those bits which are the host | 148 | in the external representation, even those bits which are the host |
148 | part of an internet address. | 149 | part of an Internet address. |
149 | Also, unlike | 150 | Also, unlike |
150 | .Xr inet_pton 3 | 151 | .Xr inet_pton 3 |
151 | where the external representation is assumed to be an internet address, the | 152 | where the external representation is assumed to be a host address, the |
152 | external representation for | 153 | external representation for |
153 | .Fn inet_net_pton | 154 | .Fn inet_net_pton |
154 | is assumed to be a network address. | 155 | is assumed to be a network address. |
diff --git a/src/lib/libc/net/link_addr.3 b/src/lib/libc/net/link_addr.3 index 0f8787e191..fc1fd85257 100644 --- a/src/lib/libc/net/link_addr.3 +++ b/src/lib/libc/net/link_addr.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: link_addr.3,v 1.10 2005/02/25 03:12:43 cloder Exp $ | 1 | .\" $OpenBSD: link_addr.3,v 1.11 2005/07/22 04:50:51 jaredy Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1993 | 3 | .\" Copyright (c) 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | 4 | .\" The Regents of the University of California. All rights reserved. |
@@ -105,7 +105,8 @@ and | |||
105 | functions appeared in | 105 | functions appeared in |
106 | .Bx 4.3 Reno . | 106 | .Bx 4.3 Reno . |
107 | .Sh BUGS | 107 | .Sh BUGS |
108 | The returned values for link_ntoa | 108 | The returned values for |
109 | .Fn link_ntoa | ||
109 | reside in a static memory area. | 110 | reside in a static memory area. |
110 | .Pp | 111 | .Pp |
111 | The function | 112 | The function |
diff --git a/src/lib/libc/net/resolver.3 b/src/lib/libc/net/resolver.3 index d1eb2298ae..c9532e9c94 100644 --- a/src/lib/libc/net/resolver.3 +++ b/src/lib/libc/net/resolver.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: resolver.3,v 1.19 2005/04/05 22:14:20 fgsch Exp $ | 1 | .\" $OpenBSD: resolver.3,v 1.20 2005/07/22 04:50:51 jaredy Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1985, 1991, 1993 | 3 | .\" Copyright (c) 1985, 1991, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | 4 | .\" The Regents of the University of California. All rights reserved. |
@@ -49,7 +49,7 @@ | |||
49 | .Fa "const char *dname" | 49 | .Fa "const char *dname" |
50 | .Fa "int class" | 50 | .Fa "int class" |
51 | .Fa "int type" | 51 | .Fa "int type" |
52 | .Fa "u_char *answer" | 52 | .Fa "unsigned char *answer" |
53 | .Fa "int anslen" | 53 | .Fa "int anslen" |
54 | .Fc | 54 | .Fc |
55 | .Ft int | 55 | .Ft int |
@@ -57,7 +57,7 @@ | |||
57 | .Fa "const char *dname" | 57 | .Fa "const char *dname" |
58 | .Fa "int class" | 58 | .Fa "int class" |
59 | .Fa "int type" | 59 | .Fa "int type" |
60 | .Fa "u_char *answer" | 60 | .Fa "unsigned char *answer" |
61 | .Fa "int anslen" | 61 | .Fa "int anslen" |
62 | .Fc | 62 | .Fc |
63 | .Ft int | 63 | .Ft int |
@@ -66,17 +66,17 @@ | |||
66 | .Fa "const char *dname" | 66 | .Fa "const char *dname" |
67 | .Fa "int class" | 67 | .Fa "int class" |
68 | .Fa "int type" | 68 | .Fa "int type" |
69 | .Fa "const u_char *data" | 69 | .Fa "const unsigned char *data" |
70 | .Fa "int datalen" | 70 | .Fa "int datalen" |
71 | .Fa "const u_char *newrr" | 71 | .Fa "const unsigned char *newrr" |
72 | .Fa "u_char *buf" | 72 | .Fa "unsigned char *buf" |
73 | .Fa "int buflen" | 73 | .Fa "int buflen" |
74 | .Fc | 74 | .Fc |
75 | .Ft int | 75 | .Ft int |
76 | .Fo res_send | 76 | .Fo res_send |
77 | .Fa "const u_char *msg" | 77 | .Fa "const unsigned char *msg" |
78 | .Fa "int msglen" | 78 | .Fa "int msglen" |
79 | .Fa "u_char *answer" | 79 | .Fa "unsigned char *answer" |
80 | .Fa "int anslen" | 80 | .Fa "int anslen" |
81 | .Fc | 81 | .Fc |
82 | .Ft int | 82 | .Ft int |
@@ -84,16 +84,16 @@ | |||
84 | .Ft int | 84 | .Ft int |
85 | .Fo dn_comp | 85 | .Fo dn_comp |
86 | .Fa "const char *exp_dn" | 86 | .Fa "const char *exp_dn" |
87 | .Fa "u_char *comp_dn" | 87 | .Fa "unsigned char *comp_dn" |
88 | .Fa "int length" | 88 | .Fa "int length" |
89 | .Fa "u_char **dnptrs" | 89 | .Fa "unsigned char **dnptrs" |
90 | .Fa "u_char **lastdnptr" | 90 | .Fa "unsigned char **lastdnptr" |
91 | .Fc | 91 | .Fc |
92 | .Ft int | 92 | .Ft int |
93 | .Fo dn_expand | 93 | .Fo dn_expand |
94 | .Fa "const u_char *msg" | 94 | .Fa "const unsigned char *msg" |
95 | .Fa "const u_char *eomorig" | 95 | .Fa "const unsigned char *eomorig" |
96 | .Fa "const u_char *comp_dn" | 96 | .Fa "const unsigned char *comp_dn" |
97 | .Fa "char *exp_dn" | 97 | .Fa "char *exp_dn" |
98 | .Fa "int length" | 98 | .Fa "int length" |
99 | .Fc | 99 | .Fc |
@@ -237,7 +237,7 @@ and | |||
237 | .Fa type | 237 | .Fa type |
238 | fields | 238 | fields |
239 | are defined in | 239 | are defined in |
240 | .Aq Pa arpa/nameserv.h . | 240 | .Aq Pa arpa/nameser.h . |
241 | .Pp | 241 | .Pp |
242 | The | 242 | The |
243 | .Fn res_search | 243 | .Fn res_search |
@@ -304,7 +304,7 @@ A side effect of | |||
304 | is to update the list of pointers for labels inserted into the message | 304 | is to update the list of pointers for labels inserted into the message |
305 | as the name is compressed. | 305 | as the name is compressed. |
306 | If | 306 | If |
307 | .Em dnptr | 307 | .Fa dnptrs |
308 | is | 308 | is |
309 | .Dv NULL , | 309 | .Dv NULL , |
310 | names are not compressed. | 310 | names are not compressed. |