diff options
author | aaron <> | 1999-07-05 04:41:00 +0000 |
---|---|---|
committer | aaron <> | 1999-07-05 04:41:00 +0000 |
commit | c47037b066169c61c5eefad3368f2da73ca4be54 (patch) | |
tree | fa80157fecd0fbb57811f82d8f3ce1366b44a203 /src/lib | |
parent | 5f78a44df1a8e524a82445f2fedb382128869a2a (diff) | |
download | openbsd-c47037b066169c61c5eefad3368f2da73ca4be54.tar.gz openbsd-c47037b066169c61c5eefad3368f2da73ca4be54.tar.bz2 openbsd-c47037b066169c61c5eefad3368f2da73ca4be54.zip |
repairs; better English, formatting, etc.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libc/net/byteorder.3 | 107 | ||||
-rw-r--r-- | src/lib/libc/net/ethers.3 | 34 | ||||
-rw-r--r-- | src/lib/libc/net/getaddrinfo.3 | 97 | ||||
-rw-r--r-- | src/lib/libc/net/gethostbyname.3 | 34 | ||||
-rw-r--r-- | src/lib/libc/net/getnameinfo.3 | 33 | ||||
-rw-r--r-- | src/lib/libc/net/getnetent.3 | 11 | ||||
-rw-r--r-- | src/lib/libc/net/getprotoent.3 | 11 | ||||
-rw-r--r-- | src/lib/libc/net/getservent.3 | 14 | ||||
-rw-r--r-- | src/lib/libc/net/if_indextoname.3 | 37 | ||||
-rw-r--r-- | src/lib/libc/net/inet.3 | 38 | ||||
-rw-r--r-- | src/lib/libc/net/inet_net.3 | 24 | ||||
-rw-r--r-- | src/lib/libc/net/ipx.3 | 18 | ||||
-rw-r--r-- | src/lib/libc/net/iso_addr.3 | 8 | ||||
-rw-r--r-- | src/lib/libc/net/link_addr.3 | 15 | ||||
-rw-r--r-- | src/lib/libc/net/ns.3 | 18 | ||||
-rw-r--r-- | src/lib/libc/net/rcmd.3 | 38 | ||||
-rw-r--r-- | src/lib/libc/net/rcmdsh.3 | 11 | ||||
-rw-r--r-- | src/lib/libc/net/resolver.3 | 17 |
18 files changed, 299 insertions, 266 deletions
diff --git a/src/lib/libc/net/byteorder.3 b/src/lib/libc/net/byteorder.3 index aa11b22664..64a13d47ba 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.6 1999/05/23 14:11:01 aaron Exp $ | 1 | .\" $OpenBSD: byteorder.3,v 1.7 1999/07/05 04:40:59 aaron 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. |
@@ -82,56 +82,86 @@ | |||
82 | .Ft u_int16_t | 82 | .Ft u_int16_t |
83 | .Fn swap16 "u_int16_t val16" | 83 | .Fn swap16 "u_int16_t val16" |
84 | .Sh DESCRIPTION | 84 | .Sh DESCRIPTION |
85 | These routines convert 16 and 32 bit quantities between different | 85 | These routines convert 16- and 32-bit quantities between different |
86 | byte orderings. The "swap" functions reverse the byte ordering of | 86 | byte orderings. The |
87 | .Dq swap | ||
88 | functions reverse the byte ordering of | ||
87 | the given quantity, the others converts either from/to the native | 89 | the given quantity, the others converts either from/to the native |
88 | byte order used by the host to/from either little- or big-endian (a.k.a | 90 | byte order used by the host to/from either little- or big-endian (a.k.a |
89 | network) order. | 91 | network) order. |
90 | .Pp | 92 | .Pp |
91 | Apart from the "swap" functions, the names can be described by this form: | 93 | Apart from the swap functions, the names can be described by this form: |
92 | {src-order}to{dst-order}{size}. | 94 | {src-order}to{dst-order}{size}. |
93 | Both {src-order} and {dst-order} can take the following forms: | 95 | Both {src-order} and {dst-order} can take the following forms: |
94 | .Bl -tag -width "be " | 96 | .Pp |
95 | .It Em h | 97 | .Bl -tag -width "be " -offset indent -compact |
96 | host order | 98 | .It h |
97 | .It Em n | 99 | Host order. |
98 | network order (big-endian) | 100 | .It n |
99 | .It Em be | 101 | Network order (big-endian). |
100 | big-endian (Most significant byte first) | 102 | .It be |
101 | .It Em le | 103 | Big-endian (most significant byte first). |
102 | little-endian (Least significant byte first) | 104 | .It le |
105 | Little-endian (least significant byte first). | ||
103 | .El | 106 | .El |
104 | .Pp | 107 | .Pp |
105 | One of the specified orderings must be "h". | 108 | One of the specified orderings must be |
106 | {Size} will take these forms: | 109 | .Sq h . |
107 | .Bl -tag -width "32 " | 110 | {size} will take these forms: |
108 | .It Em l | 111 | .Pp |
109 | long (32-bit, used in conjunction with forms involving "n") | 112 | .Bl -tag -width "32 " -offset indent -compact |
110 | .It Em s | 113 | .It l |
111 | short (16-bit, used in conjunction with forms involving "n") | 114 | Long (32-bit, used in conjunction with forms involving |
112 | .It Em 16 | 115 | .Sq n ) . |
113 | 16-bit | 116 | .It s |
114 | .It Em 32 | 117 | Short (16-bit, used in conjunction with forms involving |
115 | 32-bit | 118 | .Sq n ) . |
119 | .It 16 | ||
120 | 16-bit. | ||
121 | .It 32 | ||
122 | 32-bit. | ||
116 | .El | 123 | .El |
117 | .Pp | 124 | .Pp |
118 | The "swap" functions are of the form: swap{size}. | 125 | The swap functions are of the form: swap{size}. |
119 | .Pp | 126 | .Pp |
120 | Names involving "n" convert quantities between network | 127 | Names involving |
121 | byte order and host byte order. The last letter (s/l) is a mnemonic | 128 | .Sq n |
122 | for the traditional names for such quantities, short and long, | 129 | convert quantities between network |
123 | respectively. Today, the C concept of "short"/"long" integers | 130 | byte order and host byte order. The last letter |
124 | need not coincide with this traditional misunderstanding. | 131 | .Pf ( Sq s |
132 | or | ||
133 | .Sq l ) | ||
134 | is a mnemonic | ||
135 | for the traditional names for such quantities, | ||
136 | .Li short | ||
137 | and | ||
138 | .Li long , | ||
139 | respectively. Today, the C concept of | ||
140 | .Li short | ||
141 | and | ||
142 | .Li long | ||
143 | integers need not coincide with this traditional misunderstanding. | ||
125 | On machines which have a byte order which is the same as the network | 144 | On machines which have a byte order which is the same as the network |
126 | order, routines are defined as null macros. | 145 | order, routines are defined as null macros. |
127 | .Pp | 146 | .Pp |
128 | The functions involving either "be", "le" or "swap" use the numbers | 147 | The functions involving either |
129 | (16/32) for specifying the bitwidth of the quantities they operate on. | 148 | .Dq be , |
149 | .Dq le , | ||
150 | or | ||
151 | .Dq swap | ||
152 | use the numbers | ||
153 | 16 and 32 for specifying the bitwidth of the quantities they operate on. | ||
130 | Currently all supported architectures are either big- or little-endian | 154 | Currently all supported architectures are either big- or little-endian |
131 | so either the "be" or the "le" variants are implemented as null macros. | 155 | so either the |
156 | .Dq be | ||
157 | or | ||
158 | .Dq le | ||
159 | variants are implemented as null macros. | ||
132 | .Pp | 160 | .Pp |
133 | The routines mentioned above which have either {src-order} or {dst-order} | 161 | The routines mentioned above which have either {src-order} or {dst-order} |
134 | set to "n" are most often used in | 162 | set to |
163 | .Sq n | ||
164 | are most often used in | ||
135 | conjunction with Internet addresses and ports as returned by | 165 | conjunction with Internet addresses and ports as returned by |
136 | .Xr gethostbyname 3 | 166 | .Xr gethostbyname 3 |
137 | and | 167 | and |
@@ -142,14 +172,9 @@ and | |||
142 | .Sh HISTORY | 172 | .Sh HISTORY |
143 | The | 173 | The |
144 | .Nm byteorder | 174 | .Nm byteorder |
145 | functions appeared in | 175 | functions appeared in |
146 | .Bx 4.2 . | 176 | .Bx 4.2 . |
147 | .Sh BUGS | 177 | .Sh BUGS |
148 | On the | 178 | On the vax, alpha, i386, and so far mips, |
149 | .Tn vax , | ||
150 | .Tn alpha , | ||
151 | .Tn i386 , | ||
152 | and so far | ||
153 | .Tn mips | ||
154 | bytes are handled backwards from most everyone else in | 179 | bytes are handled backwards from most everyone else in |
155 | the world. This is not expected to be fixed in the near future. | 180 | the world. This is not expected to be fixed in the near future. |
diff --git a/src/lib/libc/net/ethers.3 b/src/lib/libc/net/ethers.3 index 74d153fce6..39968f3e65 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.10 1999/03/18 11:09:15 aaron Exp $ | 1 | .\" $OpenBSD: ethers.3,v 1.11 1999/07/05 04:40:59 aaron Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Written by roland@frob.com. Public domain. | 3 | .\" Written by roland@frob.com. Public domain. |
4 | .\" | 4 | .\" |
@@ -26,7 +26,7 @@ | |||
26 | .Ft int | 26 | .Ft int |
27 | .Fn ether_line "char *l" "struct ether_addr *e" "char *hostname" | 27 | .Fn ether_line "char *l" "struct ether_addr *e" "char *hostname" |
28 | .Sh DESCRIPTION | 28 | .Sh DESCRIPTION |
29 | Ethernet addresses are represented by the | 29 | Ethernet addresses are represented by the |
30 | following structure: | 30 | following structure: |
31 | .Bd -literal -offset indent | 31 | .Bd -literal -offset indent |
32 | struct ether_addr { | 32 | struct ether_addr { |
@@ -36,13 +36,18 @@ struct ether_addr { | |||
36 | .Pp | 36 | .Pp |
37 | The | 37 | The |
38 | .Fn ether_ntoa | 38 | .Fn ether_ntoa |
39 | function converts this structure into an ASCII string of the form | 39 | function converts this structure into an |
40 | ``xx:xx:xx:xx:xx:xx'', consisting of 6 hexadecimal numbers separated | 40 | .Tn ASCII |
41 | string of the form | ||
42 | .Dq xx:xx:xx:xx:xx:xx , | ||
43 | consisting of 6 hexadecimal numbers separated | ||
41 | by colons. It returns a pointer to a static buffer that is reused for | 44 | by colons. It returns a pointer to a static buffer that is reused for |
42 | each call. | 45 | each call. |
43 | The | 46 | The |
44 | .Fn ether_aton | 47 | .Fn ether_aton |
45 | converts an ASCII string of the same form and to a structure | 48 | converts an |
49 | .Tn ASCII | ||
50 | string of the same form and to a structure | ||
46 | containing the 6 octets of the address. It returns a pointer to a | 51 | containing the 6 octets of the address. It returns a pointer to a |
47 | static structure that is reused for each call. | 52 | static structure that is reused for each call. |
48 | .Pp | 53 | .Pp |
@@ -57,17 +62,19 @@ The | |||
57 | .Fn ether_ntohost | 62 | .Fn ether_ntohost |
58 | function looks up the given Ethernet address and writes the associated | 63 | function looks up the given Ethernet address and writes the associated |
59 | host name into the character buffer passed. This buffer should be | 64 | host name into the character buffer passed. This buffer should be |
60 | .Ev MAXHOSTNAMELEN | 65 | .Dv MAXHOSTNAMELEN |
61 | characters in size. | 66 | characters in size. |
62 | The | 67 | The |
63 | .Fn ether_hostton | 68 | .Fn ether_hostton |
64 | function looks up the given host name and writes the associated | 69 | function looks up the given host name and writes the associated |
65 | Ethernet address into the structure passed. Both functions return | 70 | Ethernet address into the structure passed. Both functions return |
66 | zero if they find the requested host name or address, and -1 if not. | 71 | zero if they find the requested host name or address, and \-1 if not. |
67 | .Pp | 72 | .Pp |
68 | Each call reads | 73 | Each call reads |
69 | .Pa /etc/ethers | 74 | .Pa /etc/ethers |
70 | from the beginning; if a + appears alone on a line in the file, then | 75 | from the beginning; if a |
76 | .Ql + | ||
77 | appears alone on a line in the file, then | ||
71 | .Fn ether_hostton | 78 | .Fn ether_hostton |
72 | will consult the | 79 | will consult the |
73 | .Pa ethers.byname | 80 | .Pa ethers.byname |
@@ -81,11 +88,12 @@ The | |||
81 | .Fn ether_line | 88 | .Fn ether_line |
82 | function parses a line from the | 89 | function parses a line from the |
83 | .Pa /etc/ethers | 90 | .Pa /etc/ethers |
84 | file and fills in the passed ``struct ether_addr'' and character | 91 | file and fills in the passed |
85 | buffer with the Ethernet address and host name on the line. It | 92 | .Li struct ether_addr |
86 | returns zero if the line was successfully parsed and -1 if not. | 93 | and character buffer with the Ethernet address and host name on the line. It |
94 | returns zero if the line was successfully parsed and \-1 if not. | ||
87 | The character buffer should be | 95 | The character buffer should be |
88 | .Ev MAXHOSTNAMELEN | 96 | .Dv MAXHOSTNAMELEN |
89 | characters in size. | 97 | characters in size. |
90 | .Sh FILES | 98 | .Sh FILES |
91 | .Bl -tag -width /etc/ethers -compact | 99 | .Bl -tag -width /etc/ethers -compact |
diff --git a/src/lib/libc/net/getaddrinfo.3 b/src/lib/libc/net/getaddrinfo.3 index 5d644ba549..6bf86d48cf 100644 --- a/src/lib/libc/net/getaddrinfo.3 +++ b/src/lib/libc/net/getaddrinfo.3 | |||
@@ -1,3 +1,4 @@ | |||
1 | .\" $OpenBSD: getaddrinfo.3,v 1.3 1999/07/05 04:40:59 aaron Exp $ | ||
1 | .\" Copyright (c) 1983, 1987, 1991, 1993 | 2 | .\" Copyright (c) 1983, 1987, 1991, 1993 |
2 | .\" The Regents of the University of California. All rights reserved. | 3 | .\" The Regents of the University of California. All rights reserved. |
3 | .\" | 4 | .\" |
@@ -30,13 +31,13 @@ | |||
30 | .\" SUCH DAMAGE. | 31 | .\" SUCH DAMAGE. |
31 | .\" | 32 | .\" |
32 | .\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95 | 33 | .\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95 |
33 | .\" $Id: getaddrinfo.3,v 1.2 1999/07/03 20:26:55 deraadt Exp $ | 34 | .\" $Id: getaddrinfo.3,v 1.3 1999/07/05 04:40:59 aaron Exp $ |
34 | .\" | 35 | .\" |
35 | .Dd May 25, 1995 | 36 | .Dd May 25, 1995 |
36 | .Dt GETADDRINFO 3 | 37 | .Dt GETADDRINFO 3 |
37 | .Os KAME | 38 | .Os |
38 | .Sh NAME | 39 | .Sh NAME |
39 | .Nm getaddrinfo | 40 | .Nm getaddrinfo , |
40 | .Nm freeaddrinfo , | 41 | .Nm freeaddrinfo , |
41 | .Nm gai_strerror | 42 | .Nm gai_strerror |
42 | .Nd nodename-to-address translation in protocol-independent manner | 43 | .Nd nodename-to-address translation in protocol-independent manner |
@@ -60,8 +61,10 @@ and | |||
60 | .Xr getservbyname 3 , | 61 | .Xr getservbyname 3 , |
61 | but in a more sophisticated manner. | 62 | but in a more sophisticated manner. |
62 | .Pp | 63 | .Pp |
63 | The addrinfo structure is defined as a result of including the | 64 | The |
64 | .Li <netdb.h> | 65 | .Li addrinfo |
66 | structure is defined as a result of including the | ||
67 | .Aq Pa netdb.h | ||
65 | header: | 68 | header: |
66 | .Bd -literal -offset | 69 | .Bd -literal -offset |
67 | struct addrinfo { * | 70 | struct addrinfo { * |
@@ -82,9 +85,7 @@ and | |||
82 | .Fa servname | 85 | .Fa servname |
83 | arguments are pointers to null-terminated strings or | 86 | arguments are pointers to null-terminated strings or |
84 | .Dv NULL . | 87 | .Dv NULL . |
85 | One or both of these two arguments must be a | 88 | One or both of these two arguments must be a non-null pointer. |
86 | .Pf non Dv -NULL | ||
87 | pointer. | ||
88 | In the normal client scenario, both the | 89 | In the normal client scenario, both the |
89 | .Fa nodename | 90 | .Fa nodename |
90 | and | 91 | and |
@@ -93,15 +94,11 @@ are specified. | |||
93 | In the normal server scenario, only the | 94 | In the normal server scenario, only the |
94 | .Fa servname | 95 | .Fa servname |
95 | is specified. | 96 | is specified. |
96 | A | 97 | A non-null |
97 | .Pf non Dv -NULL | ||
98 | .Fa nodename | 98 | .Fa nodename |
99 | string can be either a node name or a numeric host address string | 99 | string can be either a node name or a numeric host address string |
100 | .Po | 100 | (i.e., a dotted-decimal IPv4 address or an IPv6 hex address) |
101 | i.e., a dotted-decimal IPv4 address or an IPv6 hex address | 101 | A non-null |
102 | .Pc . | ||
103 | A | ||
104 | .Pf non Dv -NULL | ||
105 | .Fa servname | 102 | .Fa servname |
106 | string can be either a service name or a decimal port number. | 103 | string can be either a service name or a decimal port number. |
107 | .Pp | 104 | .Pp |
@@ -117,9 +114,7 @@ structure all members other than | |||
117 | .Fa ai_socktype , | 114 | .Fa ai_socktype , |
118 | and | 115 | and |
119 | .Fa ai_protocol | 116 | .Fa ai_protocol |
120 | must be zero or a | 117 | must be zero or a null pointer. |
121 | .Dv NULL | ||
122 | pointer. | ||
123 | A value of | 118 | A value of |
124 | .Dv PF_UNSPEC | 119 | .Dv PF_UNSPEC |
125 | for | 120 | for |
@@ -149,13 +144,12 @@ when | |||
149 | is called. | 144 | is called. |
150 | If the third argument to | 145 | If the third argument to |
151 | .Fn getaddrinfo | 146 | .Fn getaddrinfo |
152 | is a | 147 | is a null pointer, this is the same as if the caller had filled in an |
153 | .Dv NULL | ||
154 | pointer, this is the same as if the caller had filled in an | ||
155 | .Li addrinfo | 148 | .Li addrinfo |
156 | structure initialized to zero with | 149 | structure initialized to zero with |
157 | .Fa ai_family | 150 | .Fa ai_family |
158 | set to PF_UNSPEC. | 151 | set to |
152 | .Dv PF_UNSPEC . | ||
159 | .Pp | 153 | .Pp |
160 | Upon successful return a pointer to a linked list of one or more | 154 | Upon successful return a pointer to a linked list of one or more |
161 | .Li addrinfo | 155 | .Li addrinfo |
@@ -164,9 +158,7 @@ The caller can process each | |||
164 | .Li addrinfo | 158 | .Li addrinfo |
165 | structure in this list by following the | 159 | structure in this list by following the |
166 | .Fa ai_next | 160 | .Fa ai_next |
167 | pointer, until a | 161 | pointer, until a null pointer is encountered. |
168 | .Dv NULL | ||
169 | pointer is encountered. | ||
170 | In each returned | 162 | In each returned |
171 | .Li addrinfo | 163 | .Li addrinfo |
172 | structure the three members | 164 | structure the three members |
@@ -197,9 +189,7 @@ structure in a call to | |||
197 | .Fn bind . | 189 | .Fn bind . |
198 | In this case, if the | 190 | In this case, if the |
199 | .Fa nodename | 191 | .Fa nodename |
200 | argument is a | 192 | argument is a null pointer, then the IP address portion of the socket |
201 | .Dv NULL | ||
202 | pointer, then the IP address portion of the socket | ||
203 | address structure will be set to | 193 | address structure will be set to |
204 | .Dv INADDR_ANY | 194 | .Dv INADDR_ANY |
205 | for an IPv4 address or | 195 | for an IPv4 address or |
@@ -218,14 +208,13 @@ call to | |||
218 | .Pq for a connection-oriented protocol | 208 | .Pq for a connection-oriented protocol |
219 | or either | 209 | or either |
220 | .Fn connect , | 210 | .Fn connect , |
221 | .Fn sendto , or | 211 | .Fn sendto , |
212 | or | ||
222 | .Fn sendmsg | 213 | .Fn sendmsg |
223 | .Pq for a connectionless protocol . | 214 | .Pq for a connectionless protocol . |
224 | In this case, if the | 215 | In this case, if the |
225 | .Fa nodename | 216 | .Fa nodename |
226 | argument is a | 217 | argument is a null pointer, then the IP address portion of the |
227 | .Dv NULL | ||
228 | pointer, then the IP address portion of the | ||
229 | socket address structure will be set to the loopback address. | 218 | socket address structure will be set to the loopback address. |
230 | .Pp | 219 | .Pp |
231 | If the | 220 | If the |
@@ -248,8 +237,7 @@ bit is set in the | |||
248 | .Fa ai_flags | 237 | .Fa ai_flags |
249 | member of the | 238 | member of the |
250 | .Fa hints | 239 | .Fa hints |
251 | structure, then a | 240 | structure, then a non-null |
252 | .Pf non Dv -NULL | ||
253 | .Fa nodename | 241 | .Fa nodename |
254 | string must be a numeric host address string. | 242 | string must be a numeric host address string. |
255 | Otherwise an error of | 243 | Otherwise an error of |
@@ -263,7 +251,7 @@ All of the information returned by | |||
263 | is dynamically allocated: | 251 | is dynamically allocated: |
264 | the | 252 | the |
265 | .Li addrinfo | 253 | .Li addrinfo |
266 | structures, and the socket address structures and canonical node name | 254 | structures, the socket address structures, and canonical node name |
267 | strings pointed to by the addrinfo structures. | 255 | strings pointed to by the addrinfo structures. |
268 | To return this information to the system the function | 256 | To return this information to the system the function |
269 | .Fn freeaddrinfo | 257 | .Fn freeaddrinfo |
@@ -303,32 +291,44 @@ Error return status from | |||
303 | .Fn getaddrinfo | 291 | .Fn getaddrinfo |
304 | is zero on success and non-zero on errors. | 292 | is zero on success and non-zero on errors. |
305 | Non-zero error codes are defined in | 293 | Non-zero error codes are defined in |
306 | .Li <netdb.h> , | 294 | .Aq Pa netdb.h , |
307 | and as follows: | 295 | and as follows: |
308 | .Pp | 296 | .Pp |
309 | .Bl -tag -width EAI_ADDRFAMILY -compact | 297 | .Bl -tag -width EAI_ADDRFAMILY -compact |
310 | .It Dv EAI_ADDRFAMILY | 298 | .It Dv EAI_ADDRFAMILY |
311 | address family for nodename not supported | 299 | Address family for |
300 | .Fa nodename | ||
301 | not supported. | ||
312 | .It Dv EAI_AGAIN | 302 | .It Dv EAI_AGAIN |
313 | temporary failure in name resolution | 303 | Temporary failure in name resolution. |
314 | .It Dv EAI_BADFLAGS | 304 | .It Dv EAI_BADFLAGS |
315 | invalid value for ai_flags | 305 | Invalid value for |
306 | .Fa ai_flags . | ||
316 | .It Dv EAI_FAIL | 307 | .It Dv EAI_FAIL |
317 | non-recoverable failure in name resolution | 308 | Non-recoverable failure in name resolution. |
318 | .It Dv EAI_FAMILY | 309 | .It Dv EAI_FAMILY |
319 | ai_family not supported | 310 | .Fa ai_family |
311 | not supported. | ||
320 | .It Dv EAI_MEMORY | 312 | .It Dv EAI_MEMORY |
321 | memory allocation failure | 313 | Memory allocation failure. |
322 | .It Dv EAI_NODATA | 314 | .It Dv EAI_NODATA |
323 | no address associated with nodename | 315 | No address associated with |
316 | .Fa nodename . | ||
324 | .It Dv EAI_NONAME | 317 | .It Dv EAI_NONAME |
325 | nodename nor servname provided, or not known | 318 | .Fa nodename |
319 | nor | ||
320 | .Fa servname | ||
321 | provided, or not known. | ||
326 | .It Dv EAI_SERVICE | 322 | .It Dv EAI_SERVICE |
327 | servname not supported for ai_socktype | 323 | .Fa servname |
324 | not supported for | ||
325 | .Fa ai_socktype . | ||
328 | .It Dv EAI_SOCKTYPE | 326 | .It Dv EAI_SOCKTYPE |
329 | ai_socktype not supported | 327 | .Fa ai_socktype |
328 | not supported. | ||
330 | .It Dv EAI_SYSTEM | 329 | .It Dv EAI_SYSTEM |
331 | system error returned in errno | 330 | System error returned in |
331 | .Va errno . | ||
332 | .El | 332 | .El |
333 | .Pp | 333 | .Pp |
334 | If called with proper argument, | 334 | If called with proper argument, |
@@ -353,7 +353,8 @@ R. Gilligan, S. Thomson, J. Bound, and W. Stevens, | |||
353 | The | 353 | The |
354 | .Fn getaddrinfo | 354 | .Fn getaddrinfo |
355 | function is defined IEEE POSIX 1003.1g draft specification, | 355 | function is defined IEEE POSIX 1003.1g draft specification, |
356 | and documented in ``Basic Socket Interface Extensions for IPv6'' | 356 | and documented in |
357 | .Dq Basic Socket Interface Extensions for IPv6 | ||
357 | .Pq RFC2533 . | 358 | .Pq RFC2533 . |
358 | .Sh BUGS | 359 | .Sh BUGS |
359 | The text was shamelessly copied from RFC2553. | 360 | The text was shamelessly copied from RFC2553. |
diff --git a/src/lib/libc/net/gethostbyname.3 b/src/lib/libc/net/gethostbyname.3 index a71048779b..4465fa5734 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.11 1999/05/21 18:18:09 deraadt Exp $ | 1 | .\" $OpenBSD: gethostbyname.3,v 1.12 1999/07/05 04:40:59 aaron 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. |
@@ -72,11 +72,11 @@ functions | |||
72 | each return a pointer to an object with the | 72 | each return a pointer to an object with the |
73 | following structure describing an internet host | 73 | following structure describing an internet host |
74 | referenced by name or by address, respectively. | 74 | referenced by name or by address, respectively. |
75 | This structure contains either information obtained from the name server (ie. | 75 | This structure contains either information obtained from the name server (i.e., |
76 | .Xr resolver 3 | 76 | .Xr resolver 3 |
77 | and | 77 | and |
78 | .Xr named 8 ), Ns | 78 | .Xr named 8 ), |
79 | broken-out fields from a line in | 79 | broken-out fields from a line in |
80 | .Pa /etc/hosts , | 80 | .Pa /etc/hosts , |
81 | or database entries supplied by the | 81 | or database entries supplied by the |
82 | .Xr yp 8 | 82 | .Xr yp 8 |
@@ -99,13 +99,13 @@ The members of this structure are: | |||
99 | .It Fa h_name | 99 | .It Fa h_name |
100 | Official name of the host. | 100 | Official name of the host. |
101 | .It Fa h_aliases | 101 | .It Fa h_aliases |
102 | A zero terminated array of alternate names for the host. | 102 | A zero-terminated array of alternate names for the host. |
103 | .It Fa h_addrtype | 103 | .It Fa h_addrtype |
104 | The type of address being returned. | 104 | The type of address being returned. |
105 | .It Fa h_length | 105 | .It Fa h_length |
106 | The length, in bytes, of the address. | 106 | The length, in bytes, of the address. |
107 | .It Fa h_addr_list | 107 | .It Fa h_addr_list |
108 | A zero terminated array of network addresses for the host. | 108 | A zero-terminated array of network addresses for the host. |
109 | Host addresses are returned in network byte order. | 109 | Host addresses are returned in network byte order. |
110 | .It Fa h_addr | 110 | .It Fa h_addr |
111 | The first address in | 111 | The first address in |
@@ -132,9 +132,9 @@ for example | |||
132 | The | 132 | The |
133 | .Fn gethostbyaddr | 133 | .Fn gethostbyaddr |
134 | function will search for the specified address of length | 134 | function will search for the specified address of length |
135 | .Dv len | 135 | .Fa len |
136 | in the address family | 136 | in the address family |
137 | .Dv af . | 137 | .Fa af . |
138 | The only address family currently supported is | 138 | The only address family currently supported is |
139 | .Dv AF_INET . | 139 | .Dv AF_INET . |
140 | .Pp | 140 | .Pp |
@@ -149,7 +149,7 @@ If the | |||
149 | flag is non-zero, | 149 | flag is non-zero, |
150 | this sets the option to send all queries to the name server using | 150 | this sets the option to send all queries to the name server using |
151 | .Tn TCP | 151 | .Tn TCP |
152 | and to retain the connection after each call to | 152 | and to retain the connection after each call to |
153 | .Fn gethostbyname | 153 | .Fn gethostbyname |
154 | or | 154 | or |
155 | .Fn gethostbyaddr . | 155 | .Fn gethostbyaddr . |
@@ -168,11 +168,11 @@ The | |||
168 | .Fn herror | 168 | .Fn herror |
169 | function prints an error message describing the failure. If its argument | 169 | function prints an error message describing the failure. If its argument |
170 | .Fa string | 170 | .Fa string |
171 | is | 171 | is non-null, |
172 | .Pf non Dv -NULL , | ||
173 | it is prepended to the message string and separated from it by a colon | 172 | it is prepended to the message string and separated from it by a colon |
173 | .Pq Ql \&: | ||
174 | and a space. The error message is printed with a trailing newline. | 174 | and a space. The error message is printed with a trailing newline. |
175 | The contents of the error message is the same as that returned by | 175 | The contents of the error message is the same as that returned by |
176 | .Fn hstrerror | 176 | .Fn hstrerror |
177 | with argument | 177 | with argument |
178 | .Fa h_errno . | 178 | .Fa h_errno . |
@@ -182,7 +182,7 @@ with argument | |||
182 | .It Pa /etc/resolv.conf | 182 | .It Pa /etc/resolv.conf |
183 | .El | 183 | .El |
184 | .Sh DIAGNOSTICS | 184 | .Sh DIAGNOSTICS |
185 | Error return status from | 185 | Error return status from |
186 | .Fn gethostbyname , | 186 | .Fn gethostbyname , |
187 | .Fn gethostbyname2 , | 187 | .Fn gethostbyname2 , |
188 | and | 188 | and |
@@ -208,8 +208,8 @@ A retry at some later time may succeed. | |||
208 | Some unexpected server failure was encountered. | 208 | Some unexpected server failure was encountered. |
209 | This is a non-recoverable error. | 209 | This is a non-recoverable error. |
210 | .It Dv NO_DATA | 210 | .It Dv NO_DATA |
211 | The requested name is valid but does not have an IP address; | 211 | The requested name is valid but does not have an IP address; |
212 | this is not a temporary error. | 212 | this is not a temporary error. |
213 | This means that the name is known to the name server but there is no address | 213 | This means that the name is known to the name server but there is no address |
214 | associated with this name. | 214 | associated with this name. |
215 | Another type of request to the name server using this domain name | 215 | Another type of request to the name server using this domain name |
@@ -254,7 +254,7 @@ closes the file. | |||
254 | .Sh HISTORY | 254 | .Sh HISTORY |
255 | The | 255 | The |
256 | .Fn herror | 256 | .Fn herror |
257 | function appeared in | 257 | function appeared in |
258 | .Bx 4.3 . | 258 | .Bx 4.3 . |
259 | The | 259 | The |
260 | .Fn endhostent , | 260 | .Fn endhostent , |
@@ -272,7 +272,7 @@ copied before any subsequent calls overwrite it. | |||
272 | Only the Internet | 272 | Only the Internet |
273 | address formats are currently understood. | 273 | address formats are currently understood. |
274 | .Pp | 274 | .Pp |
275 | YP does not support any address families other than | 275 | YP does not support any address families other than |
276 | .Dv AF_INET | 276 | .Dv AF_INET |
277 | and uses | 277 | and uses |
278 | the traditional database format. | 278 | the traditional database format. |
diff --git a/src/lib/libc/net/getnameinfo.3 b/src/lib/libc/net/getnameinfo.3 index a1b3bdabb6..dd1ff6b947 100644 --- a/src/lib/libc/net/getnameinfo.3 +++ b/src/lib/libc/net/getnameinfo.3 | |||
@@ -30,11 +30,11 @@ | |||
30 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
31 | .\" | 31 | .\" |
32 | .\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95 | 32 | .\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95 |
33 | .\" $Id: getnameinfo.3,v 1.1 1999/07/03 20:26:55 deraadt Exp $ | 33 | .\" $Id: getnameinfo.3,v 1.2 1999/07/05 04:40:59 aaron Exp $ |
34 | .\" | 34 | .\" |
35 | .Dd May 25, 1995 | 35 | .Dd May 25, 1995 |
36 | .Dt GETNAMEINFO 3 | 36 | .Dt GETNAMEINFO 3 |
37 | .Os KAME | 37 | .Os |
38 | .Sh NAME | 38 | .Sh NAME |
39 | .Nm getnameinfo | 39 | .Nm getnameinfo |
40 | .Nd address-to-nodename translation in protocol-independent manner | 40 | .Nd address-to-nodename translation in protocol-independent manner |
@@ -64,16 +64,16 @@ a non-zero return value indicates failure. | |||
64 | The first argument, | 64 | The first argument, |
65 | .Fa sa , | 65 | .Fa sa , |
66 | points to either a | 66 | points to either a |
67 | .Fa sockaddr_in | 67 | .Li sockaddr_in |
68 | structure (for IPv4) or a | 68 | structure (for IPv4) or a |
69 | .Fa sockaddr_in6 | 69 | .Li sockaddr_in6 |
70 | structure (for IPv6) that holds the IP address and port number. | 70 | structure (for IPv6) that holds the IP address and port number. |
71 | The | 71 | The |
72 | .Fa salen | 72 | .Fa salen |
73 | argument gives the length of the | 73 | argument gives the length of the |
74 | .Fa sockaddr_in | 74 | .Li sockaddr_in |
75 | or | 75 | or |
76 | .Fa sockaddr_in6 | 76 | .Li sockaddr_in6 |
77 | structure. | 77 | structure. |
78 | .Pp | 78 | .Pp |
79 | The function returns the nodename associated with the IP address in | 79 | The function returns the nodename associated with the IP address in |
@@ -102,7 +102,7 @@ Unfortunately most systems do not provide constants that specify the | |||
102 | maximum size of either a fully-qualified domain name or a service name. | 102 | maximum size of either a fully-qualified domain name or a service name. |
103 | Therefore to aid the application in allocating buffers for these two | 103 | Therefore to aid the application in allocating buffers for these two |
104 | returned strings the following constants are defined in | 104 | returned strings the following constants are defined in |
105 | .Li <netdb.h> : | 105 | .Aq Pa netdb.h : |
106 | .Bd -literal -offset | 106 | .Bd -literal -offset |
107 | #define NI_MAXHOST 1025 | 107 | #define NI_MAXHOST 1025 |
108 | #define NI_MAXSERV 32 | 108 | #define NI_MAXSERV 32 |
@@ -111,11 +111,8 @@ returned strings the following constants are defined in | |||
111 | The first value is actually defined as the constant | 111 | The first value is actually defined as the constant |
112 | .Dv MAXDNAME | 112 | .Dv MAXDNAME |
113 | in recent versions of BIND's | 113 | in recent versions of BIND's |
114 | .Li <arpa/nameser.h> | 114 | .Aq Pa arpa/nameser.h |
115 | header | 115 | header (older versions of BIND define this constant to be 256) |
116 | .Po | ||
117 | older versions of BIND define this constant to be 256 | ||
118 | .Pc | ||
119 | and the second is a guess based on the services listed in the current | 116 | and the second is a guess based on the services listed in the current |
120 | Assigned Numbers RFC. | 117 | Assigned Numbers RFC. |
121 | .Pp | 118 | .Pp |
@@ -154,21 +151,24 @@ instead of its name. | |||
154 | The two | 151 | The two |
155 | .Dv NI_NUMERICxxx | 152 | .Dv NI_NUMERICxxx |
156 | flags are required to support the | 153 | flags are required to support the |
157 | .Li "-n" | 154 | .Fl n |
158 | flag that many commands provide. | 155 | flag that many commands provide. |
159 | .Pp | 156 | .Pp |
160 | A fifth flag bit, | 157 | A fifth flag bit, |
161 | .Dv NI_DGRAM , | 158 | .Dv NI_DGRAM , |
162 | specifies that the service is a datagram service, and causes | 159 | specifies that the service is a datagram service, and causes |
163 | .Fn getservbyport | 160 | .Fn getservbyport |
164 | to be called with a second argument of "udp" instead of its default of "tcp". | 161 | to be called with a second argument of |
162 | .Qq udp | ||
163 | instead of its default of | ||
164 | .Qq tcp . | ||
165 | This is required for the few ports (512-514) | 165 | This is required for the few ports (512-514) |
166 | that have different services for UDP and TCP. | 166 | that have different services for UDP and TCP. |
167 | .Pp | 167 | .Pp |
168 | These | 168 | These |
169 | .Dv NI_xxx | 169 | .Dv NI_xxx |
170 | flags are defined in | 170 | flags are defined in |
171 | .Li <netdb.h> . | 171 | .Aq Pa netdb.h . |
172 | .Sh FILES | 172 | .Sh FILES |
173 | .Bl -tag -width /etc/resolv.conf -compact | 173 | .Bl -tag -width /etc/resolv.conf -compact |
174 | .It Pa /etc/hosts | 174 | .It Pa /etc/hosts |
@@ -193,7 +193,8 @@ R. Gilligan, S. Thomson, J. Bound, and W. Stevens, | |||
193 | The | 193 | The |
194 | .Fn getaddrinfo | 194 | .Fn getaddrinfo |
195 | function is defined IEEE POSIX 1003.1g draft specification, | 195 | function is defined IEEE POSIX 1003.1g draft specification, |
196 | and documented in ``Basic Socket Interface Extensions for IPv6'' | 196 | and documented in |
197 | .Dq Basic Socket Interface Extensions for IPv6 | ||
197 | .Pq RFC2533 . | 198 | .Pq RFC2533 . |
198 | .Sh BUGS | 199 | .Sh BUGS |
199 | The text was shamelessly copied from RFC2553. | 200 | The text was shamelessly copied from RFC2553. |
diff --git a/src/lib/libc/net/getnetent.3 b/src/lib/libc/net/getnetent.3 index ddc9a8513b..05478afdfb 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.7 1999/05/25 01:50:58 aaron Exp $ | 1 | .\" $OpenBSD: getnetent.3,v 1.8 1999/07/05 04:40:59 aaron 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. |
@@ -79,9 +79,10 @@ The members of this structure are: | |||
79 | .It Fa n_name | 79 | .It Fa n_name |
80 | The official name of the network. | 80 | The official name of the network. |
81 | .It Fa n_aliases | 81 | .It Fa n_aliases |
82 | A zero terminated list of alternate names for the network. | 82 | A zero-terminated list of alternate names for the network. |
83 | .It Fa n_addrtype | 83 | .It Fa n_addrtype |
84 | The type of the network number returned; currently only AF_INET. | 84 | The type of the network number returned; currently only |
85 | .Dv AF_INET . | ||
85 | .It Fa n_net | 86 | .It Fa n_net |
86 | The network number. Network numbers are returned in machine byte | 87 | The network number. Network numbers are returned in machine byte |
87 | order. | 88 | order. |
@@ -98,7 +99,7 @@ function | |||
98 | opens and rewinds the file. If the | 99 | opens and rewinds the file. If the |
99 | .Fa stayopen | 100 | .Fa stayopen |
100 | flag is non-zero, | 101 | flag is non-zero, |
101 | the net data base will not be closed after each call to | 102 | the net data base will not be closed after each call to |
102 | .Fn getnetbyname | 103 | .Fn getnetbyname |
103 | or | 104 | or |
104 | .Fn getnetbyaddr . | 105 | .Fn getnetbyaddr . |
@@ -140,7 +141,7 @@ The | |||
140 | .Fn setnetent , | 141 | .Fn setnetent , |
141 | and | 142 | and |
142 | .Fn endnetent | 143 | .Fn endnetent |
143 | functions appeared in | 144 | functions appeared in |
144 | .Bx 4.2 . | 145 | .Bx 4.2 . |
145 | .Sh BUGS | 146 | .Sh BUGS |
146 | The data space used by these functions is static; if future use | 147 | The data space used by these functions is static; if future use |
diff --git a/src/lib/libc/net/getprotoent.3 b/src/lib/libc/net/getprotoent.3 index 46ab239c50..01f752ad5f 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.4 1999/05/25 01:50:58 aaron Exp $ | 1 | .\" $OpenBSD: getprotoent.3,v 1.5 1999/07/05 04:40:59 aaron 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. |
@@ -79,7 +79,7 @@ The members of this structure are: | |||
79 | .It Fa p_name | 79 | .It Fa p_name |
80 | The official name of the protocol. | 80 | The official name of the protocol. |
81 | .It Fa p_aliases | 81 | .It Fa p_aliases |
82 | A zero terminated list of alternate names for the protocol. | 82 | A zero-terminated list of alternate names for the protocol. |
83 | .It Fa p_proto | 83 | .It Fa p_proto |
84 | The protocol number. | 84 | The protocol number. |
85 | .El | 85 | .El |
@@ -95,7 +95,7 @@ function | |||
95 | opens and rewinds the file. If the | 95 | opens and rewinds the file. If the |
96 | .Fa stayopen | 96 | .Fa stayopen |
97 | flag is non-zero, | 97 | flag is non-zero, |
98 | the net data base will not be closed after each call to | 98 | the net data base will not be closed after each call to |
99 | .Fn getprotobyname | 99 | .Fn getprotobyname |
100 | or | 100 | or |
101 | .Fn getprotobynumber . | 101 | .Fn getprotobynumber . |
@@ -136,11 +136,10 @@ The | |||
136 | .Fn setprotoent , | 136 | .Fn setprotoent , |
137 | and | 137 | and |
138 | .Fn endprotoent | 138 | .Fn endprotoent |
139 | functions appeared in | 139 | functions appeared in |
140 | .Bx 4.2 . | 140 | .Bx 4.2 . |
141 | .Sh BUGS | 141 | .Sh BUGS |
142 | These functions use a static data space; | 142 | These functions use a static data space; |
143 | if the data is needed for future use, it should be | 143 | if the data is needed for future use, it should be |
144 | copied before any subsequent calls overwrite it. | 144 | copied before any subsequent calls overwrite it. |
145 | Only the Internet | 145 | Only the Internet protocols are currently understood. |
146 | protocols are currently understood. | ||
diff --git a/src/lib/libc/net/getservent.3 b/src/lib/libc/net/getservent.3 index 477d34249d..3ef95fb817 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.7 1999/07/04 18:59:43 aaron Exp $ | 1 | .\" $OpenBSD: getservent.3,v 1.8 1999/07/05 04:40:59 aaron 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. |
@@ -79,7 +79,7 @@ The members of this structure are: | |||
79 | .It Fa s_name | 79 | .It Fa s_name |
80 | The official name of the service. | 80 | The official name of the service. |
81 | .It Fa s_aliases | 81 | .It Fa s_aliases |
82 | A zero terminated list of alternate names for the service. | 82 | A zero-terminated list of alternate names for the service. |
83 | .It Fa s_port | 83 | .It Fa s_port |
84 | The port number at which the service resides. | 84 | The port number at which the service resides. |
85 | Port numbers are returned in network byte order. | 85 | Port numbers are returned in network byte order. |
@@ -99,7 +99,7 @@ function | |||
99 | opens and rewinds the file. If the | 99 | opens and rewinds the file. If the |
100 | .Fa stayopen | 100 | .Fa stayopen |
101 | flag is non-zero, | 101 | flag is non-zero, |
102 | the net data base will not be closed after each call to | 102 | the net data base will not be closed after each call to |
103 | .Fn getservbyname | 103 | .Fn getservbyname |
104 | or | 104 | or |
105 | .Fn getservbyport . | 105 | .Fn getservbyport . |
@@ -121,8 +121,7 @@ port number (specified in network byte order) is found, | |||
121 | or until | 121 | or until |
122 | .Dv EOF | 122 | .Dv EOF |
123 | is encountered. | 123 | is encountered. |
124 | If a protocol name is also supplied (non- | 124 | If a protocol name is also supplied (non-null), |
125 | .Dv NULL ) , | ||
126 | searches must also match the protocol. | 125 | searches must also match the protocol. |
127 | .Sh FILES | 126 | .Sh FILES |
128 | .Bl -tag -width /etc/services -compact | 127 | .Bl -tag -width /etc/services -compact |
@@ -144,11 +143,10 @@ The | |||
144 | .Fn setservent , | 143 | .Fn setservent , |
145 | and | 144 | and |
146 | .Fn endservent | 145 | .Fn endservent |
147 | functions appeared in | 146 | functions appeared in |
148 | .Bx 4.2 . | 147 | .Bx 4.2 . |
149 | .Sh BUGS | 148 | .Sh BUGS |
150 | These functions use static data storage; | 149 | These functions use static data storage; |
151 | if the data is needed for future use, it should be | 150 | if the data is needed for future use, it should be |
152 | copied before any subsequent calls overwrite it. | 151 | copied before any subsequent calls overwrite it. |
153 | Expecting port numbers to fit in a 32 bit | 152 | Expecting port numbers to fit in a 32-bit quantity is probably naive. |
154 | quantity is probably naive. | ||
diff --git a/src/lib/libc/net/if_indextoname.3 b/src/lib/libc/net/if_indextoname.3 index eb33c94254..604ac7412f 100644 --- a/src/lib/libc/net/if_indextoname.3 +++ b/src/lib/libc/net/if_indextoname.3 | |||
@@ -30,11 +30,11 @@ | |||
30 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
31 | .\" | 31 | .\" |
32 | .\" From: @(#)rcmd.3 8.1 (Berkeley) 6/4/93 | 32 | .\" From: @(#)rcmd.3 8.1 (Berkeley) 6/4/93 |
33 | .\" $Id: if_indextoname.3,v 1.2 1999/07/03 21:43:12 deraadt Exp $ | 33 | .\" $Id: if_indextoname.3,v 1.3 1999/07/05 04:40:59 aaron Exp $ |
34 | .\" | 34 | .\" |
35 | .Dd May 21, 1998 | 35 | .Dd May 21, 1998 |
36 | .Dt IF_NAMETOINDEX 3 | 36 | .Dt IF_NAMETOINDEX 3 |
37 | .Os KAME | 37 | .Os |
38 | .Sh NAME | 38 | .Sh NAME |
39 | .Nm if_nametoindex , | 39 | .Nm if_nametoindex , |
40 | .Nm if_indextoname , | 40 | .Nm if_indextoname , |
@@ -52,33 +52,32 @@ | |||
52 | .Ft "void" | 52 | .Ft "void" |
53 | .Fn if_freenameindex "struct if_nameindex *ptr" | 53 | .Fn if_freenameindex "struct if_nameindex *ptr" |
54 | .Sh DESCRIPTION | 54 | .Sh DESCRIPTION |
55 | The functions map interface index to readable interface name | 55 | These functions map interface indexes to interface names (such as |
56 | .Po | 56 | .Dq lo0 ) , |
57 | such as | 57 | and vice versa. |
58 | .Li ``lo0'' | ||
59 | .Pc | ||
60 | , and vice versa. | ||
61 | .Pp | 58 | .Pp |
59 | The | ||
62 | .Fn if_nametoindex | 60 | .Fn if_nametoindex |
63 | converts readable interface name to interface index | 61 | function converts an interface name specified by the |
64 | .Pp positive integer value . | 62 | .Fa ifname |
63 | argument to an interface index (positive integer value). | ||
65 | If the specified interface does not exist, 0 will be returned. | 64 | If the specified interface does not exist, 0 will be returned. |
66 | .Pp | 65 | .Pp |
67 | .Fn if_indextoname | 66 | .Fn if_indextoname |
68 | converts interface index to readable interface name. | 67 | converts an interface index specified by the |
68 | .Fa ifindex | ||
69 | argument to an interface name. | ||
69 | The | 70 | The |
70 | .Fa ifname | 71 | .Fa ifname |
71 | argument must point to a buffer of at least | 72 | argument must point to a buffer of at least |
72 | .Dv IF_NAMESIZE | 73 | .Dv IF_NAMESIZE |
73 | bytes into which the interface name corresponding to the specified index is | 74 | bytes into which the interface name corresponding to the specified index is |
74 | returned. | 75 | returned. |
75 | .Po | 76 | .Pf ( Dv IF_NAMESIZE |
76 | .Dv IF_NAMESIZE | ||
77 | is also defined in | 77 | is also defined in |
78 | .Li <net/if.h> | 78 | .Aq Pa net/if.h |
79 | and its value includes a terminating null byte at the end of the | 79 | and its value includes a terminating null byte at the end of the |
80 | interface name. | 80 | interface name.) |
81 | .Pc | ||
82 | This pointer is also the return value of the function. | 81 | This pointer is also the return value of the function. |
83 | If there is no interface corresponding to the specified index, | 82 | If there is no interface corresponding to the specified index, |
84 | .Dv NULL | 83 | .Dv NULL |
@@ -90,7 +89,7 @@ returns an array of | |||
90 | structures. | 89 | structures. |
91 | .Fa if_nametoindex | 90 | .Fa if_nametoindex |
92 | is also defined in | 91 | is also defined in |
93 | .Li <net/if.h> , | 92 | .Aq Pa net/if.h , |
94 | and is as follows: | 93 | and is as follows: |
95 | .Bd -literal -offset | 94 | .Bd -literal -offset |
96 | struct if_nameindex { | 95 | struct if_nameindex { |
@@ -106,9 +105,7 @@ of 0 and an | |||
106 | .Fa if_name | 105 | .Fa if_name |
107 | of | 106 | of |
108 | .Dv NULL . | 107 | .Dv NULL . |
109 | The function returns a | 108 | The function returns a null pointer on error. |
110 | .Dv NULL | ||
111 | pointer upon an error. | ||
112 | The memory used for this array of structures along with the interface | 109 | The memory used for this array of structures along with the interface |
113 | names pointed to by the | 110 | names pointed to by the |
114 | .Fa if_name | 111 | .Fa if_name |
diff --git a/src/lib/libc/net/inet.3 b/src/lib/libc/net/inet.3 index d29f3160aa..1e38bdc056 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.7 1999/06/05 19:29:43 deraadt Exp $ | 1 | .\" $OpenBSD: inet.3,v 1.8 1999/07/05 04:40:59 aaron 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 |
@@ -84,14 +84,17 @@ The | |||
84 | .Fn inet_pton | 84 | .Fn inet_pton |
85 | function converts a presentation format address (that is, printable form | 85 | function converts a presentation format address (that is, printable form |
86 | as held in a character string) to network format (usually a | 86 | as held in a character string) to network format (usually a |
87 | .Ft struct in_addr | 87 | .Li struct in_addr |
88 | or some other internal binary representation, in network byte order). It | 88 | or some other internal binary representation, in network byte order). It |
89 | returns 1 if the address was valid for the specified address family, or | 89 | returns 1 if the address was valid for the specified address family, or |
90 | 0 if the address wasn't parseable in the specified address family, or -1 | 90 | 0 if the address wasn't parseable in the specified address family, or \-1 |
91 | if some system error occurred (in which case | 91 | if some system error occurred (in which case |
92 | .Va errno | 92 | .Va errno |
93 | will have been set). This function is presently valid for AF_INET and | 93 | will have been set). This function is presently valid for |
94 | AF_INET6. The | 94 | .Dv AF_INET |
95 | and | ||
96 | .Dv AF_INET6 . | ||
97 | The | ||
95 | .Fn inet_aton | 98 | .Fn inet_aton |
96 | routine interprets the specified character string as an Internet address, | 99 | routine interprets the specified character string as an Internet address, |
97 | placing the address into the structure provided. | 100 | placing the address into the structure provided. |
@@ -108,9 +111,11 @@ numbers, respectively. | |||
108 | The function | 111 | The function |
109 | .Fn inet_ntop | 112 | .Fn inet_ntop |
110 | converts an address from network format (usually a | 113 | converts an address from network format (usually a |
111 | .Ft struct in_addr | 114 | .Li struct in_addr |
112 | or some other binary form, in network byte order) to presentation format | 115 | or some other binary form, in network byte order) to presentation format |
113 | (suitable for external display purposes). It returns NULL if a system | 116 | (suitable for external display purposes). It returns |
117 | .Dv NULL | ||
118 | if a system | ||
114 | error occurs (in which case, | 119 | error occurs (in which case, |
115 | .Va errno | 120 | .Va errno |
116 | will have been set), or it returns a pointer to the destination string. | 121 | will have been set), or it returns a pointer to the destination string. |
@@ -153,7 +158,7 @@ as a byte of data and assigned, from left to right, | |||
153 | to the four bytes of an Internet address. Note | 158 | to the four bytes of an Internet address. Note |
154 | that when an Internet address is viewed as a 32-bit | 159 | that when an Internet address is viewed as a 32-bit |
155 | integer quantity on a system that uses little-endian | 160 | integer quantity on a system that uses little-endian |
156 | byte order (such as the | 161 | byte order (such as the |
157 | .Tn Intel 386, 486 | 162 | .Tn Intel 386, 486 |
158 | and | 163 | and |
159 | .Tn Pentium | 164 | .Tn Pentium |
@@ -212,10 +217,15 @@ addresses, it will be common for addresses to contain long | |||
212 | strings of zero bits. In order to make writing addresses | 217 | strings of zero bits. In order to make writing addresses |
213 | .Pp | 218 | .Pp |
214 | containing zero bits easier a special syntax is available to | 219 | containing zero bits easier a special syntax is available to |
215 | compress the zeros. The use of ``::'' indicates multiple groups | 220 | compress the zeros. The use of |
216 | of 16-bits of zeros. The ``::'' can only appear once in an | 221 | .Dq \&:\&: |
217 | address. The ``::'' can also be used to compress the leading | 222 | indicates multiple groups |
218 | and/or trailing zeros in an address. | 223 | of 16 bits of zeros. The |
224 | .Dq \&:\&: | ||
225 | can only appear once in an | ||
226 | address. The | ||
227 | .Dq \&:\&: | ||
228 | can also be used to compress the leading and/or trailing zeros in an address. | ||
219 | .Pp | 229 | .Pp |
220 | For example the following addresses: | 230 | For example the following addresses: |
221 | .Bd -literal -offset indent | 231 | .Bd -literal -offset indent |
@@ -277,7 +287,7 @@ does not accept 1-, 2-, or 3-part dotted addresses; all four parts | |||
277 | must be specified. This is a narrower input set than that accepted by | 287 | must be specified. This is a narrower input set than that accepted by |
278 | .Nm inet_aton . | 288 | .Nm inet_aton . |
279 | .Sh HISTORY | 289 | .Sh HISTORY |
280 | The | 290 | The |
281 | .Nm inet_addr , | 291 | .Nm inet_addr , |
282 | .Nm inet_network , | 292 | .Nm inet_network , |
283 | .Nm inet_makeaddr , | 293 | .Nm inet_makeaddr , |
@@ -306,7 +316,7 @@ cannot return that value without indicating failure. | |||
306 | Also, | 316 | Also, |
307 | .Fn inet_addr | 317 | .Fn inet_addr |
308 | should have been designed to return a | 318 | should have been designed to return a |
309 | .Fa "struct in_addr" . | 319 | .Li struct in_addr . |
310 | The newer | 320 | The newer |
311 | .Fn inet_aton | 321 | .Fn inet_aton |
312 | function does not share these problems, and almost all existing code | 322 | function does not share these problems, and almost all existing code |
diff --git a/src/lib/libc/net/inet_net.3 b/src/lib/libc/net/inet_net.3 index 1b55411a28..1eb157c429 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.3 1999/07/02 20:58:00 aaron Exp $ | 1 | .\" $OpenBSD: inet_net.3,v 1.4 1999/07/05 04:40:59 aaron 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. |
@@ -54,14 +54,16 @@ | |||
54 | The | 54 | The |
55 | .Fn inet_net_ntop | 55 | .Fn inet_net_ntop |
56 | function converts an Internet network number from network format (usually a | 56 | function converts an Internet network number from network format (usually a |
57 | .Ft struct in_addr | 57 | .Li struct in_addr |
58 | or some other binary form, in network byte order) to CIDR presentation format | 58 | or some other binary form, in network byte order) to CIDR presentation format |
59 | (suitable for external display purposes). | 59 | (suitable for external display purposes). |
60 | .Fa bits | 60 | .Fa bits |
61 | is the number of bits in | 61 | is the number of bits in |
62 | .Fa src | 62 | .Fa src |
63 | that are the network number. | 63 | that are the network number. |
64 | It returns NULL if a system error occurs (in which case, | 64 | It returns |
65 | .Dv NULL | ||
66 | if a system error occurs (in which case, | ||
65 | .Va errno | 67 | .Va errno |
66 | will have been set), or it returns a pointer to the destination string. | 68 | will have been set), or it returns a pointer to the destination string. |
67 | .Pp | 69 | .Pp |
@@ -69,10 +71,10 @@ The | |||
69 | .Fn inet_net_pton | 71 | .Fn inet_net_pton |
70 | function converts a presentation format Internet network number (that is, | 72 | function converts a presentation format Internet network number (that is, |
71 | printable form as held in a character string) to network format (usually a | 73 | printable form as held in a character string) to network format (usually a |
72 | .Ft struct in_addr | 74 | .Li struct in_addr |
73 | or some other internal binary representation, in network byte order). | 75 | or some other internal binary representation, in network byte order). |
74 | It returns the number of bits (either computed based on the class, or | 76 | It returns the number of bits (either computed based on the class, or |
75 | specified with /CIDR), or -1 if a failure occurred | 77 | specified with /CIDR), or \-1 if a failure occurred |
76 | (in which case | 78 | (in which case |
77 | .Va errno | 79 | .Va errno |
78 | will have been set. | 80 | will have been set. |
@@ -80,9 +82,10 @@ It will be set to | |||
80 | .Er ENOENT | 82 | .Er ENOENT |
81 | if the Internet network number was not valid). | 83 | if the Internet network number was not valid). |
82 | .Pp | 84 | .Pp |
83 | The currently supported value for | 85 | The only value for |
84 | .Fa af | 86 | .Fa af |
85 | is: AF_INET. | 87 | currently supported is |
88 | .Dv AF_INET . | ||
86 | .Fa size | 89 | .Fa size |
87 | is the size of the result buffer | 90 | is the size of the result buffer |
88 | .Fa dst . | 91 | .Fa dst . |
@@ -101,11 +104,8 @@ as a byte of data and assigned, from left to right, | |||
101 | to the four bytes of an Internet network number. Note | 104 | to the four bytes of an Internet network number. Note |
102 | that when an Internet network number is viewed as a 32-bit | 105 | that when an Internet network number is viewed as a 32-bit |
103 | integer quantity on a system that uses little-endian | 106 | integer quantity on a system that uses little-endian |
104 | byte order (such as the | 107 | byte order (such as the Intel 386, 486, and Pentium processors) |
105 | .Tn Intel 386, 486 | 108 | the bytes referred to above appear as |
106 | and | ||
107 | .Tn Pentium | ||
108 | processors) the bytes referred to above appear as | ||
109 | .Dq Li d.c.b.a . | 109 | .Dq Li d.c.b.a . |
110 | That is, little-endian bytes are ordered from right to left. | 110 | That is, little-endian bytes are ordered from right to left. |
111 | .Pp | 111 | .Pp |
diff --git a/src/lib/libc/net/ipx.3 b/src/lib/libc/net/ipx.3 index 28113d705e..8cc36f0814 100644 --- a/src/lib/libc/net/ipx.3 +++ b/src/lib/libc/net/ipx.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: ipx.3,v 1.4 1999/05/23 14:11:01 aaron Exp $ | 1 | .\" $OpenBSD: ipx.3,v 1.5 1999/07/05 04:40:59 aaron Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1986, 1991, 1993 | 3 | .\" Copyright (c) 1986, 1991, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | 4 | .\" The Regents of the University of California. All rights reserved. |
@@ -41,7 +41,7 @@ | |||
41 | .Sh SYNOPSIS | 41 | .Sh SYNOPSIS |
42 | .Fd #include <sys/types.h> | 42 | .Fd #include <sys/types.h> |
43 | .Fd #include <netipx/ipx.h> | 43 | .Fd #include <netipx/ipx.h> |
44 | .Ft struct ipx_addr | 44 | .Ft struct ipx_addr |
45 | .Fn ipx_addr "char *cp" | 45 | .Fn ipx_addr "char *cp" |
46 | .Ft char * | 46 | .Ft char * |
47 | .Fn ipx_ntoa "struct ipx_addr ipx" | 47 | .Fn ipx_ntoa "struct ipx_addr ipx" |
@@ -65,11 +65,11 @@ notation in common use: | |||
65 | .Ed | 65 | .Ed |
66 | .Pp | 66 | .Pp |
67 | Trailing zero fields are suppressed, and each number is printed in hexadecimal, | 67 | Trailing zero fields are suppressed, and each number is printed in hexadecimal, |
68 | in a format suitable for input to | 68 | in a format suitable for input to |
69 | .Fn ipx_addr . | 69 | .Fn ipx_addr . |
70 | Any fields lacking super-decimal digits will have a | 70 | Any fields lacking super-decimal digits will have a |
71 | trailing | 71 | trailing |
72 | .Ql H | 72 | .Sq H |
73 | appended. | 73 | appended. |
74 | .Pp | 74 | .Pp |
75 | An effort has been made to insure that | 75 | An effort has been made to insure that |
@@ -78,11 +78,11 @@ be compatible with most formats in common use. | |||
78 | It will first separate an address into 1 to 3 fields using a single delimiter | 78 | It will first separate an address into 1 to 3 fields using a single delimiter |
79 | chosen from | 79 | chosen from |
80 | period | 80 | period |
81 | .Ql \&. , | 81 | .Pq Ql \&. , |
82 | colon | 82 | colon |
83 | .Ql \&: | 83 | .Pq Ql \&: , |
84 | or pound-sign | 84 | or pound-sign |
85 | .Ql \&# . | 85 | .Pq Ql # . |
86 | Each field is then examined for byte separators (colon or period). | 86 | Each field is then examined for byte separators (colon or period). |
87 | If there are byte separators, each subfield separated is taken to be | 87 | If there are byte separators, each subfield separated is taken to be |
88 | a small hexadecimal number, and the entirety is taken as a network-byte-ordered | 88 | a small hexadecimal number, and the entirety is taken as a network-byte-ordered |
@@ -96,7 +96,7 @@ as hexadecimal if there is a leading | |||
96 | .Ql 0x | 96 | .Ql 0x |
97 | (as in C), | 97 | (as in C), |
98 | a trailing | 98 | a trailing |
99 | .Ql H | 99 | .Sq H |
100 | (as in Mesa), or there are any super-decimal digits present. | 100 | (as in Mesa), or there are any super-decimal digits present. |
101 | It is interpreted as octal is there is a leading | 101 | It is interpreted as octal is there is a leading |
102 | .Ql 0 | 102 | .Ql 0 |
@@ -114,7 +114,7 @@ The precursor | |||
114 | .Fn ns_addr | 114 | .Fn ns_addr |
115 | and | 115 | and |
116 | .Fn ns_ntoa | 116 | .Fn ns_ntoa |
117 | functions appeared in | 117 | functions appeared in |
118 | .Bx 4.3 . | 118 | .Bx 4.3 . |
119 | .Sh BUGS | 119 | .Sh BUGS |
120 | The string returned by | 120 | The string returned by |
diff --git a/src/lib/libc/net/iso_addr.3 b/src/lib/libc/net/iso_addr.3 index d9bf9086be..e5b3f0fbdf 100644 --- a/src/lib/libc/net/iso_addr.3 +++ b/src/lib/libc/net/iso_addr.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: iso_addr.3,v 1.2 1996/08/19 08:29:22 tholo Exp $ | 1 | .\" $OpenBSD: iso_addr.3,v 1.3 1999/07/05 04:40:59 aaron 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. |
@@ -37,7 +37,7 @@ | |||
37 | .Sh NAME | 37 | .Sh NAME |
38 | .Nm iso_addr , | 38 | .Nm iso_addr , |
39 | .Nm iso_ntoa | 39 | .Nm iso_ntoa |
40 | .Nd "elementary network address conversion routines for Open System Interconnection | 40 | .Nd "network address conversion routines for Open System Interconnection" |
41 | .Sh SYNOPSIS | 41 | .Sh SYNOPSIS |
42 | .Fd #include <sys/types.h> | 42 | .Fd #include <sys/types.h> |
43 | .Fd #include <netiso/iso.h> | 43 | .Fd #include <netiso/iso.h> |
@@ -60,7 +60,7 @@ addresses and returns | |||
60 | .Tn ASCII | 60 | .Tn ASCII |
61 | strings representing NSAPs (network service | 61 | strings representing NSAPs (network service |
62 | access points) in a | 62 | access points) in a |
63 | notation inverse to that accepted by | 63 | notation inverse to that accepted by |
64 | .Fn iso_addr . | 64 | .Fn iso_addr . |
65 | .Pp | 65 | .Pp |
66 | Unfortunately, no universal standard exists for representing | 66 | Unfortunately, no universal standard exists for representing |
@@ -98,7 +98,7 @@ The | |||
98 | .Fn iso_addr | 98 | .Fn iso_addr |
99 | and | 99 | and |
100 | .Fn iso_ntoa | 100 | .Fn iso_ntoa |
101 | functions appeared in | 101 | functions appeared in |
102 | .Bx 4.3 Reno . | 102 | .Bx 4.3 Reno . |
103 | .Sh BUGS | 103 | .Sh BUGS |
104 | The returned values | 104 | The returned values |
diff --git a/src/lib/libc/net/link_addr.3 b/src/lib/libc/net/link_addr.3 index c96e24f441..b7ada81997 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.5 1999/05/23 14:11:02 aaron Exp $ | 1 | .\" $OpenBSD: link_addr.3,v 1.6 1999/07/05 04:40:59 aaron 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. |
@@ -50,12 +50,11 @@ | |||
50 | .Ft char * | 50 | .Ft char * |
51 | .Fn link_ntoa "const struct sockaddr_dl *sdl" | 51 | .Fn link_ntoa "const struct sockaddr_dl *sdl" |
52 | .Sh DESCRIPTION | 52 | .Sh DESCRIPTION |
53 | The routine | 53 | The |
54 | .Fn link_addr | 54 | .Fn link_addr |
55 | interprets character strings representing | 55 | function interprets character strings representing |
56 | link-level addresses, returning binary information suitable | 56 | link-level addresses, returning binary information suitable |
57 | for use in system calls. | 57 | for use in system calls. |
58 | The routine | ||
59 | .Fn link_ntoa | 58 | .Fn link_ntoa |
60 | takes | 59 | takes |
61 | a link-level | 60 | a link-level |
@@ -73,7 +72,7 @@ the string | |||
73 | .Fa addr | 72 | .Fa addr |
74 | may contain | 73 | may contain |
75 | an optional network interface identifier of the form | 74 | an optional network interface identifier of the form |
76 | .Dq "name unit-number" , | 75 | .Dq name unit-number , |
77 | suitable for the first argument to | 76 | suitable for the first argument to |
78 | .Xr ifconfig 8 , | 77 | .Xr ifconfig 8 , |
79 | followed in all cases by a colon and | 78 | followed in all cases by a colon and |
@@ -95,7 +94,7 @@ represents an Ethernet address | |||
95 | to be transmitted on the first Lance Ethernet interface. | 94 | to be transmitted on the first Lance Ethernet interface. |
96 | .Sh RETURN VALUES | 95 | .Sh RETURN VALUES |
97 | .Fn link_ntoa | 96 | .Fn link_ntoa |
98 | always returns a null terminated string. | 97 | always returns a null-terminated string. |
99 | .Fn link_addr | 98 | .Fn link_addr |
100 | has no return value. | 99 | has no return value. |
101 | (See | 100 | (See |
@@ -108,7 +107,7 @@ The | |||
108 | .Fn link_addr | 107 | .Fn link_addr |
109 | and | 108 | and |
110 | .Fn link_ntoa | 109 | .Fn link_ntoa |
111 | functions appeared in | 110 | functions appeared in |
112 | .Bx 4.3 Reno . | 111 | .Bx 4.3 Reno . |
113 | .Sh BUGS | 112 | .Sh BUGS |
114 | The returned values for link_ntoa | 113 | The returned values for link_ntoa |
@@ -120,7 +119,7 @@ should diagnose improperly formed input, and there should be an unambiguous | |||
120 | way to recognize this. | 119 | way to recognize this. |
121 | .Pp | 120 | .Pp |
122 | If the | 121 | If the |
123 | .Va sdl_len | 122 | .Fa sdl_len |
124 | field of the link socket address | 123 | field of the link socket address |
125 | .Fa sdl | 124 | .Fa sdl |
126 | is 0, | 125 | is 0, |
diff --git a/src/lib/libc/net/ns.3 b/src/lib/libc/net/ns.3 index ee49237a24..24e69c8388 100644 --- a/src/lib/libc/net/ns.3 +++ b/src/lib/libc/net/ns.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: ns.3,v 1.4 1999/05/23 14:11:02 aaron Exp $ | 1 | .\" $OpenBSD: ns.3,v 1.5 1999/07/05 04:41:00 aaron Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1986, 1991, 1993 | 3 | .\" Copyright (c) 1986, 1991, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | 4 | .\" The Regents of the University of California. All rights reserved. |
@@ -43,7 +43,7 @@ address conversion routines | |||
43 | .Sh SYNOPSIS | 43 | .Sh SYNOPSIS |
44 | .Fd #include <sys/types.h> | 44 | .Fd #include <sys/types.h> |
45 | .Fd #include <netns/ns.h> | 45 | .Fd #include <netns/ns.h> |
46 | .Ft struct ns_addr | 46 | .Ft struct ns_addr |
47 | .Fn ns_addr "char *cp" | 47 | .Fn ns_addr "char *cp" |
48 | .Ft char * | 48 | .Ft char * |
49 | .Fn ns_ntoa "struct ns_addr ns" | 49 | .Fn ns_ntoa "struct ns_addr ns" |
@@ -67,11 +67,11 @@ notation in common use in the Xerox Development Environment: | |||
67 | .Ed | 67 | .Ed |
68 | .Pp | 68 | .Pp |
69 | Trailing zero fields are suppressed, and each number is printed in hexadecimal, | 69 | Trailing zero fields are suppressed, and each number is printed in hexadecimal, |
70 | in a format suitable for input to | 70 | in a format suitable for input to |
71 | .Fn ns_addr . | 71 | .Fn ns_addr . |
72 | Any fields lacking super-decimal digits will have a | 72 | Any fields lacking super-decimal digits will have a |
73 | trailing | 73 | trailing |
74 | .Ql H | 74 | .Sq H |
75 | appended. | 75 | appended. |
76 | .Pp | 76 | .Pp |
77 | Unfortunately, no universal standard exists for representing | 77 | Unfortunately, no universal standard exists for representing |
@@ -83,11 +83,11 @@ be compatible with most formats in common use. | |||
83 | It will first separate an address into 1 to 3 fields using a single delimiter | 83 | It will first separate an address into 1 to 3 fields using a single delimiter |
84 | chosen from | 84 | chosen from |
85 | period | 85 | period |
86 | .Ql \&. , | 86 | .Pq Ql \&. , |
87 | colon | 87 | colon |
88 | .Ql \&: | 88 | .Pq Ql \&: , |
89 | or pound-sign | 89 | or pound-sign |
90 | .Ql \&# . | 90 | .Ql # . |
91 | Each field is then examined for byte separators (colon or period). | 91 | Each field is then examined for byte separators (colon or period). |
92 | If there are byte separators, each subfield separated is taken to be | 92 | If there are byte separators, each subfield separated is taken to be |
93 | a small hexadecimal number, and the entirety is taken as a network-byte-ordered | 93 | a small hexadecimal number, and the entirety is taken as a network-byte-ordered |
@@ -101,7 +101,7 @@ as hexadecimal if there is a leading | |||
101 | .Ql 0x | 101 | .Ql 0x |
102 | (as in C), | 102 | (as in C), |
103 | a trailing | 103 | a trailing |
104 | .Ql H | 104 | .Sq H |
105 | (as in Mesa), or there are any super-decimal digits present. | 105 | (as in Mesa), or there are any super-decimal digits present. |
106 | It is interpreted as octal is there is a leading | 106 | It is interpreted as octal is there is a leading |
107 | .Ql 0 | 107 | .Ql 0 |
@@ -118,7 +118,7 @@ The | |||
118 | .Fn ns_addr | 118 | .Fn ns_addr |
119 | and | 119 | and |
120 | .Fn ns_toa | 120 | .Fn ns_toa |
121 | functions appeared in | 121 | functions appeared in |
122 | .Bx 4.3 . | 122 | .Bx 4.3 . |
123 | .Sh BUGS | 123 | .Sh BUGS |
124 | The string returned by | 124 | The string returned by |
diff --git a/src/lib/libc/net/rcmd.3 b/src/lib/libc/net/rcmd.3 index c68a3338a0..d086e875bf 100644 --- a/src/lib/libc/net/rcmd.3 +++ b/src/lib/libc/net/rcmd.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: rcmd.3,v 1.12 1999/05/23 14:11:02 aaron Exp $ | 1 | .\" $OpenBSD: rcmd.3,v 1.13 1999/07/05 04:41:00 aaron 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. |
@@ -56,15 +56,15 @@ The | |||
56 | function | 56 | function |
57 | is used by the super-user to execute a command on a remote | 57 | is used by the super-user to execute a command on a remote |
58 | machine using an authentication scheme based on reserved | 58 | machine using an authentication scheme based on reserved |
59 | port numbers. If the calling process is not setuid and the | 59 | port numbers. If the calling process is not setuid, the |
60 | .Li RSH | 60 | .Ev RSH |
61 | environment variable is set and | 61 | environment variable is set, and |
62 | .Fa inport | 62 | .Fa inport |
63 | is | 63 | is |
64 | .Li shell/tcp , | 64 | .Dq shell/tcp , |
65 | .Xr rcmdsh 3 | 65 | .Xr rcmdsh 3 |
66 | is called instead with the value of | 66 | is called instead with the value of |
67 | .Li RSH . | 67 | .Ev RSH . |
68 | Alternately, if the user is not the super-user, | 68 | Alternately, if the user is not the super-user, |
69 | .Fn rcmd | 69 | .Fn rcmd |
70 | will invoke | 70 | will invoke |
@@ -103,17 +103,14 @@ and a connection is established to a server | |||
103 | residing at the well-known Internet port | 103 | residing at the well-known Internet port |
104 | .Fa inport . | 104 | .Fa inport . |
105 | If the user is not the super-user, the only valid port is | 105 | If the user is not the super-user, the only valid port is |
106 | .Li shell/tcp , | 106 | .Dq shell/tcp |
107 | (usually port 514). | 107 | (usually port 514). |
108 | .Pp | 108 | .Pp |
109 | If the connection succeeds, | 109 | If the connection succeeds, |
110 | a socket in the Internet domain of type | 110 | a socket in the Internet domain of type |
111 | .Dv SOCK_STREAM | 111 | .Dv SOCK_STREAM |
112 | is returned to the caller, and given to the remote | 112 | is returned to the caller, and given to the remote |
113 | command as | 113 | command as stdin and stdout. |
114 | .Em stdin | ||
115 | and | ||
116 | .Em stdout . | ||
117 | If | 114 | If |
118 | .Fa fd2p | 115 | .Fa fd2p |
119 | is non-zero, then an auxiliary channel to a control | 116 | is non-zero, then an auxiliary channel to a control |
@@ -128,10 +125,10 @@ signal numbers, to be | |||
128 | forwarded to the process group of the command. | 125 | forwarded to the process group of the command. |
129 | If | 126 | If |
130 | .Fa fd2p | 127 | .Fa fd2p |
131 | is 0, then the | 128 | is 0, then the |
132 | .Em stderr | 129 | .Em stderr |
133 | (unit 2 of the remote | 130 | (unit 2 of the remote |
134 | command) will be made the same as the | 131 | command) will be made the same as the |
135 | .Em stdout | 132 | .Em stdout |
136 | and no | 133 | and no |
137 | provision is made for sending arbitrary signals to the remote process, | 134 | provision is made for sending arbitrary signals to the remote process, |
@@ -147,7 +144,7 @@ The | |||
147 | .Fn rresvport | 144 | .Fn rresvport |
148 | function is used to obtain a socket with a privileged | 145 | function is used to obtain a socket with a privileged |
149 | address bound to it. This socket is suitable for use | 146 | address bound to it. This socket is suitable for use |
150 | by | 147 | by |
151 | .Fn rcmd | 148 | .Fn rcmd |
152 | and several other functions. Privileged Internet ports are those | 149 | and several other functions. Privileged Internet ports are those |
153 | in the range 0 to 1023. Only the super-user | 150 | in the range 0 to 1023. Only the super-user |
@@ -164,7 +161,7 @@ functions take a remote host's IP address or name, respectively, | |||
164 | two user names and a flag indicating whether the local user's | 161 | two user names and a flag indicating whether the local user's |
165 | name is that of the super-user. | 162 | name is that of the super-user. |
166 | Then, if the user is | 163 | Then, if the user is |
167 | .Em NOT | 164 | .Em not |
168 | the super-user, it checks the | 165 | the super-user, it checks the |
169 | .Pa /etc/hosts.equiv | 166 | .Pa /etc/hosts.equiv |
170 | file. | 167 | file. |
@@ -177,9 +174,9 @@ If this file does not exist, is not a regular file, is owned by anyone | |||
177 | other than the user or the super-user, or is writeable by anyone other | 174 | other than the user or the super-user, or is writeable by anyone other |
178 | than the owner, the check automatically fails. | 175 | than the owner, the check automatically fails. |
179 | Zero is returned if the machine name is listed in the | 176 | Zero is returned if the machine name is listed in the |
180 | .Dq Pa hosts.equiv | 177 | .Pa hosts.equiv |
181 | file, or the host and remote user name are found in the | 178 | file, or the host and remote user name are found in the |
182 | .Dq Pa .rhosts | 179 | .Pa .rhosts |
183 | file; otherwise | 180 | file; otherwise |
184 | .Fn iruserok | 181 | .Fn iruserok |
185 | and | 182 | and |
@@ -209,8 +206,9 @@ It returns \-1 on error with the global value | |||
209 | .Va errno | 206 | .Va errno |
210 | set according to the reason for failure. | 207 | set according to the reason for failure. |
211 | The error code | 208 | The error code |
212 | .Dv EAGAIN | 209 | .Er EAGAIN |
213 | is overloaded to mean ``All network ports in use.'' | 210 | is overloaded to mean |
211 | .Dq all network ports in use . | ||
214 | .Sh SEE ALSO | 212 | .Sh SEE ALSO |
215 | .Xr rlogin 1 , | 213 | .Xr rlogin 1 , |
216 | .Xr rsh 1 , | 214 | .Xr rsh 1 , |
@@ -223,5 +221,5 @@ is overloaded to mean ``All network ports in use.'' | |||
223 | .Xr rshd 8 | 221 | .Xr rshd 8 |
224 | .Sh HISTORY | 222 | .Sh HISTORY |
225 | These | 223 | These |
226 | functions appeared in | 224 | functions appeared in |
227 | .Bx 4.2 . | 225 | .Bx 4.2 . |
diff --git a/src/lib/libc/net/rcmdsh.3 b/src/lib/libc/net/rcmdsh.3 index f5fbe1e891..2498f4c708 100644 --- a/src/lib/libc/net/rcmdsh.3 +++ b/src/lib/libc/net/rcmdsh.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: rcmdsh.3,v 1.5 1999/07/02 17:04:16 aaron Exp $ | 1 | .\" $OpenBSD: rcmdsh.3,v 1.6 1999/07/05 04:41:00 aaron 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. |
@@ -51,7 +51,7 @@ on reserved port numbers using | |||
51 | .Xr rshd 8 | 51 | .Xr rshd 8 |
52 | or the value of | 52 | or the value of |
53 | .Fa rshprog | 53 | .Fa rshprog |
54 | (if non-NULL). | 54 | (if non-null). |
55 | .Pp | 55 | .Pp |
56 | The | 56 | The |
57 | .Fn rcmdsh | 57 | .Fn rcmdsh |
@@ -80,12 +80,7 @@ a socket in the | |||
80 | domain of type | 80 | domain of type |
81 | .Dv SOCK_STREAM | 81 | .Dv SOCK_STREAM |
82 | is returned to the caller, and given to the remote | 82 | is returned to the caller, and given to the remote |
83 | command as | 83 | command as stdin and stdout, and stderr. |
84 | .Em stdin | ||
85 | and | ||
86 | .Em stdout , | ||
87 | and | ||
88 | .Em stderr . | ||
89 | .Sh DIAGNOSTICS | 84 | .Sh DIAGNOSTICS |
90 | The | 85 | The |
91 | .Fn rcmdsh | 86 | .Fn rcmdsh |
diff --git a/src/lib/libc/net/resolver.3 b/src/lib/libc/net/resolver.3 index 7c60ea4dcb..27d393193d 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.11 1999/05/25 13:06:45 aaron Exp $ | 1 | .\" $OpenBSD: resolver.3,v 1.12 1999/07/05 04:41:00 aaron 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. |
@@ -101,20 +101,21 @@ | |||
101 | .Fa "int length" | 101 | .Fa "int length" |
102 | .Fc | 102 | .Fc |
103 | .Sh DESCRIPTION | 103 | .Sh DESCRIPTION |
104 | These routines are used for making, sending and interpreting | 104 | These routines are used for making, sending, and interpreting |
105 | query and reply messages with Internet domain name servers. | 105 | query and reply messages with Internet domain name servers. |
106 | .Pp | 106 | .Pp |
107 | Global configuration and state information that is used by the | 107 | Global configuration and state information that is used by the |
108 | resolver routines is kept in the structure | 108 | resolver routines is kept in the structure |
109 | .Em _res . | 109 | .Li _res . |
110 | Most of the values have reasonable defaults and can be ignored. | 110 | Most of the values have reasonable defaults and can be ignored. |
111 | Options | 111 | Options |
112 | stored in | 112 | stored in |
113 | .Em _res.options | 113 | .Li _res.options |
114 | are defined in | 114 | are defined in |
115 | .Pa resolv.h | 115 | .Aq Pa resolv.h |
116 | and are as follows. | 116 | and are as follows. |
117 | Options are stored as a simple bit mask containing the bitwise ``or'' | 117 | Options are stored as a simple bit mask containing the bitwise |
118 | .Tn OR | ||
118 | of the options enabled. | 119 | of the options enabled. |
119 | .Bl -tag -width RES_USE_INET6 | 120 | .Bl -tag -width RES_USE_INET6 |
120 | .It Dv RES_INIT | 121 | .It Dv RES_INIT |
@@ -326,7 +327,7 @@ The size of compressed name is returned or \-1 if there was an error. | |||
326 | .Sh FILES | 327 | .Sh FILES |
327 | .Bl -tag -width Pa | 328 | .Bl -tag -width Pa |
328 | /etc/resolv.conf | 329 | /etc/resolv.conf |
329 | The configuration file | 330 | configuration file |
330 | see | 331 | see |
331 | .Xr resolv.conf 5 . | 332 | .Xr resolv.conf 5 . |
332 | .El | 333 | .El |
@@ -348,5 +349,5 @@ see | |||
348 | .Sh HISTORY | 349 | .Sh HISTORY |
349 | The | 350 | The |
350 | .Nm | 351 | .Nm |
351 | function appeared in | 352 | function appeared in |
352 | .Bx 4.3 . | 353 | .Bx 4.3 . |