diff options
author | aaron <> | 2000-12-24 00:31:00 +0000 |
---|---|---|
committer | aaron <> | 2000-12-24 00:31:00 +0000 |
commit | b11608439e707f8c7601b090028e530ea5a1e067 (patch) | |
tree | 966934b4f9368fd14deca5be22b83ff9fb439cbd | |
parent | 71213d0b131a3545184a31aa671f269eceacad1e (diff) | |
download | openbsd-b11608439e707f8c7601b090028e530ea5a1e067.tar.gz openbsd-b11608439e707f8c7601b090028e530ea5a1e067.tar.bz2 openbsd-b11608439e707f8c7601b090028e530ea5a1e067.zip |
Various repairs, mostly to get rid of short lines.
-rw-r--r-- | src/lib/libc/net/getaddrinfo.3 | 4 | ||||
-rw-r--r-- | src/lib/libc/net/gethostbyname.3 | 23 | ||||
-rw-r--r-- | src/lib/libc/net/getnetent.3 | 24 | ||||
-rw-r--r-- | src/lib/libc/net/getprotoent.3 | 34 | ||||
-rw-r--r-- | src/lib/libc/net/getservent.3 | 38 | ||||
-rw-r--r-- | src/lib/libc/net/rcmd.3 | 17 | ||||
-rw-r--r-- | src/lib/libc/net/rcmdsh.3 | 22 | ||||
-rw-r--r-- | src/lib/libc/net/resolver.3 | 43 | ||||
-rw-r--r-- | src/lib/libc/stdlib/qdiv.3 | 5 |
9 files changed, 73 insertions, 137 deletions
diff --git a/src/lib/libc/net/getaddrinfo.3 b/src/lib/libc/net/getaddrinfo.3 index 747f62b33b..01bfb3cef8 100644 --- a/src/lib/libc/net/getaddrinfo.3 +++ b/src/lib/libc/net/getaddrinfo.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: getaddrinfo.3,v 1.12 2000/08/13 07:23:48 deraadt Exp $ | 1 | .\" $OpenBSD: getaddrinfo.3,v 1.13 2000/12/24 00:30:54 aaron Exp $ |
2 | .\" $KAME: getaddrinfo.3,v 1.22 2000/08/09 21:16:17 itojun Exp $ | 2 | .\" $KAME: getaddrinfo.3,v 1.22 2000/08/09 21:16:17 itojun Exp $ |
3 | .\" | 3 | .\" |
4 | .\" Copyright (c) 1983, 1987, 1991, 1993 | 4 | .\" Copyright (c) 1983, 1987, 1991, 1993 |
@@ -258,7 +258,7 @@ Here are pitfall cases you may encounter: | |||
258 | .Bl -bullet | 258 | .Bl -bullet |
259 | .It | 259 | .It |
260 | .Fn getaddrinfo | 260 | .Fn getaddrinfo |
261 | will raise error if members in | 261 | will raise error if members in |
262 | .Fa hints | 262 | .Fa hints |
263 | structure is not consistent. | 263 | structure is not consistent. |
264 | For example, for internet address families, | 264 | For example, for internet address families, |
diff --git a/src/lib/libc/net/gethostbyname.3 b/src/lib/libc/net/gethostbyname.3 index f1353288c5..94a848eecc 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.15 2000/04/18 03:01:31 aaron Exp $ | 1 | .\" $OpenBSD: gethostbyname.3,v 1.16 2000/12/24 00:30:56 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. |
@@ -68,10 +68,8 @@ The | |||
68 | .Fn gethostbyname | 68 | .Fn gethostbyname |
69 | and | 69 | and |
70 | .Fn gethostbyaddr | 70 | .Fn gethostbyaddr |
71 | functions | 71 | functions each return a pointer to an object with the following structure |
72 | each return a pointer to an object with the | 72 | describing an internet host referenced by name or by address, respectively. |
73 | following structure describing an internet host | ||
74 | referenced by name or by address, respectively. | ||
75 | This structure contains either information obtained from the name server (i.e., | 73 | This structure contains either information obtained from the name server (i.e., |
76 | .Xr resolver 3 | 74 | .Xr resolver 3 |
77 | and | 75 | and |
@@ -140,8 +138,7 @@ The only address family currently supported is | |||
140 | .Pp | 138 | .Pp |
141 | The | 139 | The |
142 | .Fn sethostent | 140 | .Fn sethostent |
143 | function | 141 | function may be used to request the use of a connected |
144 | may be used to request the use of a connected | ||
145 | .Tn TCP | 142 | .Tn TCP |
146 | socket for queries. | 143 | socket for queries. |
147 | If the | 144 | If the |
@@ -159,8 +156,7 @@ datagrams. | |||
159 | .Pp | 156 | .Pp |
160 | The | 157 | The |
161 | .Fn endhostent | 158 | .Fn endhostent |
162 | function | 159 | function closes the |
163 | closes the | ||
164 | .Tn TCP | 160 | .Tn TCP |
165 | connection. | 161 | connection. |
166 | .Pp | 162 | .Pp |
@@ -239,13 +235,11 @@ re-opening the file if necessary. | |||
239 | .Pp | 235 | .Pp |
240 | The | 236 | The |
241 | .Fn sethostent | 237 | .Fn sethostent |
242 | function | 238 | function opens and/or rewinds the file |
243 | opens and/or rewinds the file | ||
244 | .Pa /etc/hosts . | 239 | .Pa /etc/hosts . |
245 | If the | 240 | If the |
246 | .Fa stayopen | 241 | .Fa stayopen |
247 | argument is non-zero, | 242 | argument is non-zero, the file will not be closed after each call to |
248 | the file will not be closed after each call to | ||
249 | .Fn gethostbyname , | 243 | .Fn gethostbyname , |
250 | .Fn gethostbyname2 , | 244 | .Fn gethostbyname2 , |
251 | or | 245 | or |
@@ -253,8 +247,7 @@ or | |||
253 | .Pp | 247 | .Pp |
254 | The | 248 | The |
255 | .Fn endhostent | 249 | .Fn endhostent |
256 | function | 250 | function closes the file. |
257 | closes the file. | ||
258 | .Sh HISTORY | 251 | .Sh HISTORY |
259 | The | 252 | The |
260 | .Fn herror | 253 | .Fn herror |
diff --git a/src/lib/libc/net/getnetent.3 b/src/lib/libc/net/getnetent.3 index 3227f39b06..0c401c74ff 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.10 2000/12/17 21:30:38 millert Exp $ | 1 | .\" $OpenBSD: getnetent.3,v 1.11 2000/12/24 00:30:56 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. |
@@ -59,11 +59,8 @@ The | |||
59 | .Fn getnetbyname , | 59 | .Fn getnetbyname , |
60 | and | 60 | and |
61 | .Fn getnetbyaddr | 61 | .Fn getnetbyaddr |
62 | functions | 62 | functions each return a pointer to an object with the following structure |
63 | each return a pointer to an object with the | 63 | containing the broken-out fields of a line in the network database, |
64 | following structure | ||
65 | containing the broken-out | ||
66 | fields of a line in the network database, | ||
67 | .Pa /etc/networks . | 64 | .Pa /etc/networks . |
68 | .Bd -literal -offset indent | 65 | .Bd -literal -offset indent |
69 | struct netent { | 66 | struct netent { |
@@ -90,13 +87,11 @@ Network numbers are returned in machine byte order. | |||
90 | .Pp | 87 | .Pp |
91 | The | 88 | The |
92 | .Fn getnetent | 89 | .Fn getnetent |
93 | function | 90 | function reads the next line of the file, opening the file if necessary. |
94 | reads the next line of the file, opening the file if necessary. | ||
95 | .Pp | 91 | .Pp |
96 | The | 92 | The |
97 | .Fn setnetent | 93 | .Fn setnetent |
98 | function | 94 | function opens and rewinds the file. |
99 | opens and rewinds the file. | ||
100 | If the | 95 | If the |
101 | .Fa stayopen | 96 | .Fa stayopen |
102 | flag is non-zero, | 97 | flag is non-zero, |
@@ -107,15 +102,13 @@ or | |||
107 | .Pp | 102 | .Pp |
108 | The | 103 | The |
109 | .Fn endnetent | 104 | .Fn endnetent |
110 | function | 105 | function closes the file. |
111 | closes the file. | ||
112 | .Pp | 106 | .Pp |
113 | The | 107 | The |
114 | .Fn getnetbyname | 108 | .Fn getnetbyname |
115 | function | ||
116 | and | 109 | and |
117 | .Fn getnetbyaddr | 110 | .Fn getnetbyaddr |
118 | search the domain name server if the system is configured to use one. | 111 | functions search the domain name server if the system is configured to use one. |
119 | If the search fails, or no name server is configured, they sequentially | 112 | If the search fails, or no name server is configured, they sequentially |
120 | search from the beginning of the file until a matching net name or | 113 | search from the beginning of the file until a matching net name or |
121 | net address and type is found, or until | 114 | net address and type is found, or until |
@@ -127,8 +120,7 @@ Network numbers are supplied in host order. | |||
127 | .It Pa /etc/networks | 120 | .It Pa /etc/networks |
128 | .El | 121 | .El |
129 | .Sh DIAGNOSTICS | 122 | .Sh DIAGNOSTICS |
130 | Null pointer | 123 | Null pointer (0) returned on |
131 | (0) returned on | ||
132 | .Dv EOF | 124 | .Dv EOF |
133 | or error. | 125 | or error. |
134 | .Sh SEE ALSO | 126 | .Sh SEE ALSO |
diff --git a/src/lib/libc/net/getprotoent.3 b/src/lib/libc/net/getprotoent.3 index 4d1e96e615..1f95529532 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.7 2000/12/17 21:30:38 millert Exp $ | 1 | .\" $OpenBSD: getprotoent.3,v 1.8 2000/12/24 00:30:56 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. |
@@ -59,11 +59,8 @@ The | |||
59 | .Fn getprotobyname , | 59 | .Fn getprotobyname , |
60 | and | 60 | and |
61 | .Fn getprotobynumber | 61 | .Fn getprotobynumber |
62 | functions | 62 | functions each return a pointer to an object with the following structure |
63 | each return a pointer to an object with the | 63 | containing the broken-out fields of a line in the network protocol database, |
64 | following structure | ||
65 | containing the broken-out | ||
66 | fields of a line in the network protocol database, | ||
67 | .Pa /etc/protocols . | 64 | .Pa /etc/protocols . |
68 | .Bd -literal -offset indent | 65 | .Bd -literal -offset indent |
69 | .Pp | 66 | .Pp |
@@ -86,13 +83,11 @@ The protocol number. | |||
86 | .Pp | 83 | .Pp |
87 | The | 84 | The |
88 | .Fn getprotoent | 85 | .Fn getprotoent |
89 | function | 86 | function reads the next line of the file, opening the file if necessary. |
90 | reads the next line of the file, opening the file if necessary. | ||
91 | .Pp | 87 | .Pp |
92 | The | 88 | The |
93 | .Fn setprotoent | 89 | .Fn setprotoent |
94 | function | 90 | function opens and rewinds the file. |
95 | opens and rewinds the file. | ||
96 | If the | 91 | If the |
97 | .Fa stayopen | 92 | .Fa stayopen |
98 | flag is non-zero, | 93 | flag is non-zero, |
@@ -103,24 +98,18 @@ or | |||
103 | .Pp | 98 | .Pp |
104 | The | 99 | The |
105 | .Fn endprotoent | 100 | .Fn endprotoent |
106 | function | 101 | function closes the file. |
107 | closes the file. | ||
108 | .Pp | 102 | .Pp |
109 | The | 103 | The |
110 | .Fn getprotobyname | 104 | .Fn getprotobyname |
111 | function | ||
112 | and | 105 | and |
113 | .Fn getprotobynumber | 106 | .Fn getprotobynumber |
114 | sequentially search from the beginning | 107 | functions sequentially search from the beginning of the file until a |
115 | of the file until a matching | 108 | matching protocol name or protocol number is found, or until |
116 | protocol name or | ||
117 | protocol number is found, | ||
118 | or until | ||
119 | .Dv EOF | 109 | .Dv EOF |
120 | is encountered. | 110 | is encountered. |
121 | .Sh RETURN VALUES | 111 | .Sh RETURN VALUES |
122 | Null pointer | 112 | Null pointer (0) returned on |
123 | (0) returned on | ||
124 | .Dv EOF | 113 | .Dv EOF |
125 | or error. | 114 | or error. |
126 | .Sh FILES | 115 | .Sh FILES |
@@ -140,7 +129,6 @@ and | |||
140 | functions appeared in | 129 | functions appeared in |
141 | .Bx 4.2 . | 130 | .Bx 4.2 . |
142 | .Sh BUGS | 131 | .Sh BUGS |
143 | These functions use a static data space; | 132 | These functions use a static data space; if the data is needed for future use, |
144 | if the data is needed for future use, it should be | 133 | it should be copied before any subsequent calls overwrite it. |
145 | copied before any subsequent calls overwrite it. | ||
146 | Only the Internet protocols are currently understood. | 134 | Only the Internet protocols are currently understood. |
diff --git a/src/lib/libc/net/getservent.3 b/src/lib/libc/net/getservent.3 index 81ebc40cad..85e0d65352 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.10 2000/12/17 21:30:38 millert Exp $ | 1 | .\" $OpenBSD: getservent.3,v 1.11 2000/12/24 00:30:56 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. |
@@ -59,11 +59,8 @@ The | |||
59 | .Fn getservbyname , | 59 | .Fn getservbyname , |
60 | and | 60 | and |
61 | .Fn getservbyport | 61 | .Fn getservbyport |
62 | functions | 62 | functions each return a pointer to an object with the following structure |
63 | each return a pointer to an object with the | 63 | containing the broken-out fields of a line in the network services database, |
64 | following structure | ||
65 | containing the broken-out | ||
66 | fields of a line in the network services database, | ||
67 | .Pa /etc/services . | 64 | .Pa /etc/services . |
68 | .Bd -literal -offset indent | 65 | .Bd -literal -offset indent |
69 | struct servent { | 66 | struct servent { |
@@ -84,19 +81,16 @@ A zero-terminated list of alternate names for the service. | |||
84 | The port number at which the service resides. | 81 | The port number at which the service resides. |
85 | Port numbers are returned in network byte order. | 82 | Port numbers are returned in network byte order. |
86 | .It Fa s_proto | 83 | .It Fa s_proto |
87 | The name of the protocol to use when contacting the | 84 | The name of the protocol to use when contacting the service. |
88 | service. | ||
89 | .El | 85 | .El |
90 | .Pp | 86 | .Pp |
91 | The | 87 | The |
92 | .Fn getservent | 88 | .Fn getservent |
93 | function | 89 | function reads the next line of the file, opening the file if necessary. |
94 | reads the next line of the file, opening the file if necessary. | ||
95 | .Pp | 90 | .Pp |
96 | The | 91 | The |
97 | .Fn setservent | 92 | .Fn setservent |
98 | function | 93 | function opens and rewinds the file. |
99 | opens and rewinds the file. | ||
100 | If the | 94 | If the |
101 | .Fa stayopen | 95 | .Fa stayopen |
102 | flag is non-zero, | 96 | flag is non-zero, |
@@ -107,19 +101,15 @@ or | |||
107 | .Pp | 101 | .Pp |
108 | The | 102 | The |
109 | .Fn endservent | 103 | .Fn endservent |
110 | function | 104 | function closes the file. |
111 | closes the file. | ||
112 | .Pp | 105 | .Pp |
113 | The | 106 | The |
114 | .Fn getservbyname | 107 | .Fn getservbyname |
115 | and | 108 | and |
116 | .Fn getservbyport | 109 | .Fn getservbyport |
117 | functions | 110 | functions sequentially search from the beginning of the file until a |
118 | sequentially search from the beginning | 111 | matching protocol name or port number (specified in network byte order) |
119 | of the file until a matching | 112 | is found, or until |
120 | protocol name or | ||
121 | port number (specified in network byte order) is found, | ||
122 | or until | ||
123 | .Dv EOF | 113 | .Dv EOF |
124 | is encountered. | 114 | is encountered. |
125 | If a protocol name is also supplied (non-null), | 115 | If a protocol name is also supplied (non-null), |
@@ -129,8 +119,7 @@ searches must also match the protocol. | |||
129 | .It Pa /etc/services | 119 | .It Pa /etc/services |
130 | .El | 120 | .El |
131 | .Sh DIAGNOSTICS | 121 | .Sh DIAGNOSTICS |
132 | Null pointer | 122 | Null pointer (0) returned on |
133 | (0) returned on | ||
134 | .Dv EOF | 123 | .Dv EOF |
135 | or error. | 124 | or error. |
136 | .Sh SEE ALSO | 125 | .Sh SEE ALSO |
@@ -147,7 +136,6 @@ and | |||
147 | functions appeared in | 136 | functions appeared in |
148 | .Bx 4.2 . | 137 | .Bx 4.2 . |
149 | .Sh BUGS | 138 | .Sh BUGS |
150 | These functions use static data storage; | 139 | These functions use static data storage; if the data is needed for future use, |
151 | if the data is needed for future use, it should be | 140 | it should be copied before any subsequent calls overwrite it. |
152 | copied before any subsequent calls overwrite it. | ||
153 | Expecting port numbers to fit in a 32-bit quantity is probably naive. | 141 | Expecting port numbers to fit in a 32-bit quantity is probably naive. |
diff --git a/src/lib/libc/net/rcmd.3 b/src/lib/libc/net/rcmd.3 index 89457ab859..683f27a4af 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.22 2000/12/21 22:59:53 deraadt Exp $ | 1 | .\" $OpenBSD: rcmd.3,v 1.23 2000/12/24 00:30:56 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. |
@@ -62,8 +62,7 @@ | |||
62 | .Sh DESCRIPTION | 62 | .Sh DESCRIPTION |
63 | The | 63 | The |
64 | .Fn rcmd | 64 | .Fn rcmd |
65 | function | 65 | function is used by the superuser to execute a command on a remote |
66 | is used by the superuser to execute a command on a remote | ||
67 | machine using an authentication scheme based on reserved | 66 | machine using an authentication scheme based on reserved |
68 | port numbers. | 67 | port numbers. |
69 | If the calling process is not setuid, the | 68 | If the calling process is not setuid, the |
@@ -92,8 +91,7 @@ The | |||
92 | .Fn rresvport | 91 | .Fn rresvport |
93 | and | 92 | and |
94 | .Fn rresvport_af | 93 | .Fn rresvport_af |
95 | functions | 94 | functions return a descriptor to a socket |
96 | return a descriptor to a socket | ||
97 | with an address in the privileged port space. | 95 | with an address in the privileged port space. |
98 | The | 96 | The |
99 | .Fn iruserok | 97 | .Fn iruserok |
@@ -112,8 +110,7 @@ is an address family independent variant of | |||
112 | .Pp | 110 | .Pp |
113 | The | 111 | The |
114 | .Fn rcmd | 112 | .Fn rcmd |
115 | function | 113 | function looks up the host |
116 | looks up the host | ||
117 | .Fa *ahost | 114 | .Fa *ahost |
118 | using | 115 | using |
119 | .Xr gethostbyname 3 , | 116 | .Xr gethostbyname 3 , |
@@ -245,16 +242,14 @@ and | |||
245 | .Sh DIAGNOSTICS | 242 | .Sh DIAGNOSTICS |
246 | The | 243 | The |
247 | .Fn rcmd | 244 | .Fn rcmd |
248 | function | 245 | function returns a valid socket descriptor on success. |
249 | returns a valid socket descriptor on success. | ||
250 | It returns \-1 on error and prints a diagnostic message on the standard error. | 246 | It returns \-1 on error and prints a diagnostic message on the standard error. |
251 | .Pp | 247 | .Pp |
252 | The | 248 | The |
253 | .Fn rresvport | 249 | .Fn rresvport |
254 | and | 250 | and |
255 | .Fn rresvport_af | 251 | .Fn rresvport_af |
256 | functions | 252 | functions return a valid, bound socket descriptor on success. |
257 | return a valid, bound socket descriptor on success. | ||
258 | It returns \-1 on error with the global value | 253 | It returns \-1 on error with the global value |
259 | .Va errno | 254 | .Va errno |
260 | set according to the reason for failure. | 255 | set according to the reason for failure. |
diff --git a/src/lib/libc/net/rcmdsh.3 b/src/lib/libc/net/rcmdsh.3 index 29a1e4cf63..e0c59efb85 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.7 2000/02/23 17:28:25 aaron Exp $ | 1 | .\" $OpenBSD: rcmdsh.3,v 1.8 2000/12/24 00:30:56 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. |
@@ -44,10 +44,8 @@ | |||
44 | .Sh DESCRIPTION | 44 | .Sh DESCRIPTION |
45 | The | 45 | The |
46 | .Fn rcmdsh | 46 | .Fn rcmdsh |
47 | function | 47 | function is used by normal users to execute a command on a remote machine |
48 | is used by normal users to execute a command on | 48 | using an authentication scheme based on reserved port numbers using |
49 | a remote machine using an authentication scheme based | ||
50 | on reserved port numbers using | ||
51 | .Xr rshd 8 | 49 | .Xr rshd 8 |
52 | or the value of | 50 | or the value of |
53 | .Fa rshprog | 51 | .Fa rshprog |
@@ -55,17 +53,15 @@ or the value of | |||
55 | .Pp | 53 | .Pp |
56 | The | 54 | The |
57 | .Fn rcmdsh | 55 | .Fn rcmdsh |
58 | function | 56 | function looks up the host |
59 | looks up the host | ||
60 | .Fa *ahost | 57 | .Fa *ahost |
61 | using | 58 | using |
62 | .Xr gethostbyname 3 , | 59 | .Xr gethostbyname 3 , |
63 | returning \-1 if the host does not exist. | 60 | returning \-1 if the host does not exist. |
64 | Otherwise | 61 | Otherwise |
65 | .Fa *ahost | 62 | .Fa *ahost |
66 | is set to the standard name of the host | 63 | is set to the standard name of the host and a connection is established to |
67 | and a connection is established to a server | 64 | a server residing at the well-known Internet port |
68 | residing at the well-known Internet port | ||
69 | .Li shell/tcp | 65 | .Li shell/tcp |
70 | (or whatever port is used by | 66 | (or whatever port is used by |
71 | .Fa rshprog ) . | 67 | .Fa rshprog ) . |
@@ -74,8 +70,7 @@ The parameter | |||
74 | is ignored; it is only included to provide an interface similar to | 70 | is ignored; it is only included to provide an interface similar to |
75 | .Xr rcmd 3 . | 71 | .Xr rcmd 3 . |
76 | .Pp | 72 | .Pp |
77 | If the connection succeeds, | 73 | If the connection succeeds, a socket in the |
78 | a socket in the | ||
79 | .Tn UNIX | 74 | .Tn UNIX |
80 | domain of type | 75 | domain of type |
81 | .Dv SOCK_STREAM | 76 | .Dv SOCK_STREAM |
@@ -84,8 +79,7 @@ command as stdin and stdout, and stderr. | |||
84 | .Sh DIAGNOSTICS | 79 | .Sh DIAGNOSTICS |
85 | The | 80 | The |
86 | .Fn rcmdsh | 81 | .Fn rcmdsh |
87 | function | 82 | function returns a valid socket descriptor on success. |
88 | returns a valid socket descriptor on success. | ||
89 | It returns \-1 on error and prints a diagnostic message on the standard error. | 83 | It returns \-1 on error and prints a diagnostic message on the standard error. |
90 | .Sh SEE ALSO | 84 | .Sh SEE ALSO |
91 | .Xr rsh 1 , | 85 | .Xr rsh 1 , |
diff --git a/src/lib/libc/net/resolver.3 b/src/lib/libc/net/resolver.3 index 9b2471d823..a5f956f90d 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.13 2000/01/03 11:51:08 itojun Exp $ | 1 | .\" $OpenBSD: resolver.3,v 1.14 2000/12/24 00:30:57 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. |
@@ -108,8 +108,7 @@ 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 | .Li _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 stored in |
112 | stored in | ||
113 | .Li _res.options | 112 | .Li _res.options |
114 | are defined in | 113 | are defined in |
115 | .Aq Pa resolv.h | 114 | .Aq Pa resolv.h |
@@ -142,8 +141,7 @@ Used with | |||
142 | .Dv RES_USEVC | 141 | .Dv RES_USEVC |
143 | to keep the | 142 | to keep the |
144 | .Tn TCP | 143 | .Tn TCP |
145 | connection open between | 144 | connection open between queries. |
146 | queries. | ||
147 | This is useful only in programs that regularly do many queries. | 145 | This is useful only in programs that regularly do many queries. |
148 | .Tn UDP | 146 | .Tn UDP |
149 | should be the normal mode used. | 147 | should be the normal mode used. |
@@ -180,12 +178,10 @@ The option is not meaningful on | |||
180 | .Pp | 178 | .Pp |
181 | The | 179 | The |
182 | .Fn res_init | 180 | .Fn res_init |
183 | routine | 181 | routine reads the configuration file (if any; see |
184 | reads the configuration file (if any; see | ||
185 | .Xr resolv.conf 5 ) | 182 | .Xr resolv.conf 5 ) |
186 | to get the default domain name, | 183 | to get the default domain name, search list, and the Internet address |
187 | search list and | 184 | of the local name server(s). |
188 | the Internet address of the local name server(s). | ||
189 | If no server is configured, the host running | 185 | If no server is configured, the host running |
190 | the resolver is tried. | 186 | the resolver is tried. |
191 | The current domain name is defined by the hostname | 187 | The current domain name is defined by the hostname |
@@ -235,8 +231,7 @@ The | |||
235 | .Fn res_search | 231 | .Fn res_search |
236 | routine makes a query and awaits a response like | 232 | routine makes a query and awaits a response like |
237 | .Fn res_query , | 233 | .Fn res_query , |
238 | but in addition, it implements the default and search rules | 234 | but in addition, it implements the default and search rules controlled by the |
239 | controlled by the | ||
240 | .Dv RES_DEFNAMES | 235 | .Dv RES_DEFNAMES |
241 | and | 236 | and |
242 | .Dv RES_DNSRCH | 237 | .Dv RES_DNSRCH |
@@ -247,11 +242,9 @@ The remaining routines are lower-level routines used by | |||
247 | .Fn res_query . | 242 | .Fn res_query . |
248 | The | 243 | The |
249 | .Fn res_mkquery | 244 | .Fn res_mkquery |
250 | function | 245 | function constructs a standard query message and places it in |
251 | constructs a standard query message and places it in | ||
252 | .Fa buf . | 246 | .Fa buf . |
253 | It returns the size of the query, or \-1 if the query is | 247 | It returns the size of the query, or \-1 if the query is larger than |
254 | larger than | ||
255 | .Fa buflen . | 248 | .Fa buflen . |
256 | The query type | 249 | The query type |
257 | .Fa op | 250 | .Fa op |
@@ -266,21 +259,18 @@ is currently unused but is intended for making update messages. | |||
266 | .Pp | 259 | .Pp |
267 | The | 260 | The |
268 | .Fn res_send | 261 | .Fn res_send |
269 | routine | 262 | routine sends a pre-formatted query and returns an answer. |
270 | sends a pre-formatted query and returns an answer. | ||
271 | It will call | 263 | It will call |
272 | .Fn res_init | 264 | .Fn res_init |
273 | if | 265 | if |
274 | .Dv RES_INIT | 266 | .Dv RES_INIT |
275 | is not set, send the query to the local name server, and | 267 | is not set, send the query to the local name server, and |
276 | handle timeouts and retries. | 268 | handle timeouts and retries. |
277 | The length of the reply message is returned, or | 269 | The length of the reply message is returned, or \-1 if there were errors. |
278 | \-1 if there were errors. | ||
279 | .Pp | 270 | .Pp |
280 | The | 271 | The |
281 | .Fn dn_comp | 272 | .Fn dn_comp |
282 | function | 273 | function compresses the domain name |
283 | compresses the domain name | ||
284 | .Fa exp_dn | 274 | .Fa exp_dn |
285 | and stores it in | 275 | and stores it in |
286 | .Fa comp_dn . | 276 | .Fa comp_dn . |
@@ -289,8 +279,7 @@ The size of the array pointed to by | |||
289 | .Fa comp_dn | 279 | .Fa comp_dn |
290 | is given by | 280 | is given by |
291 | .Fa length . | 281 | .Fa length . |
292 | The compression uses | 282 | The compression uses an array of pointers |
293 | an array of pointers | ||
294 | .Fa dnptrs | 283 | .Fa dnptrs |
295 | to previously compressed names in the current message. | 284 | to previously compressed names in the current message. |
296 | The first pointer points | 285 | The first pointer points |
@@ -300,8 +289,7 @@ The limit to the array is specified by | |||
300 | .Fa lastdnptr . | 289 | .Fa lastdnptr . |
301 | A side effect of | 290 | A side effect of |
302 | .Fn dn_comp | 291 | .Fn dn_comp |
303 | is to update the list of pointers for | 292 | is to update the list of pointers for labels inserted into the message |
304 | labels inserted into the message | ||
305 | as the name is compressed. | 293 | as the name is compressed. |
306 | If | 294 | If |
307 | .Em dnptr | 295 | .Em dnptr |
@@ -316,8 +304,7 @@ the list of labels is not updated. | |||
316 | .Pp | 304 | .Pp |
317 | The | 305 | The |
318 | .Fn dn_expand | 306 | .Fn dn_expand |
319 | entry | 307 | entry expands the compressed domain name |
320 | expands the compressed domain name | ||
321 | .Fa comp_dn | 308 | .Fa comp_dn |
322 | to a full domain name | 309 | to a full domain name |
323 | The compressed name is contained in a query or reply message; | 310 | The compressed name is contained in a query or reply message; |
diff --git a/src/lib/libc/stdlib/qdiv.3 b/src/lib/libc/stdlib/qdiv.3 index 127c581250..4db47d9b4a 100644 --- a/src/lib/libc/stdlib/qdiv.3 +++ b/src/lib/libc/stdlib/qdiv.3 | |||
@@ -33,7 +33,7 @@ | |||
33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
34 | .\" SUCH DAMAGE. | 34 | .\" SUCH DAMAGE. |
35 | .\" | 35 | .\" |
36 | .\" $OpenBSD: qdiv.3,v 1.3 1999/06/29 18:36:21 aaron Exp $ | 36 | .\" $OpenBSD: qdiv.3,v 1.4 2000/12/24 00:31:00 aaron Exp $ |
37 | .\" | 37 | .\" |
38 | .Dd June 29, 1991 | 38 | .Dd June 29, 1991 |
39 | .Dt QDIV 3 | 39 | .Dt QDIV 3 |
@@ -48,8 +48,7 @@ | |||
48 | .Sh DESCRIPTION | 48 | .Sh DESCRIPTION |
49 | The | 49 | The |
50 | .Fn qdiv | 50 | .Fn qdiv |
51 | function | 51 | function computes the value |
52 | computes the value | ||
53 | .Fa num Ns No / Ns Fa denom | 52 | .Fa num Ns No / Ns Fa denom |
54 | and returns the quotient and remainder in a structure named | 53 | and returns the quotient and remainder in a structure named |
55 | .Li qdiv_t | 54 | .Li qdiv_t |