diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-12-24 00:31:01 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-12-24 00:31:01 +0000 |
commit | b1044a070b87b20a73f593b1087fae3a062d5920 (patch) | |
tree | daa375c4c5a8cf9fabd0f0657b2141fbb899ef71 /lib/libc/net | |
parent | 89891a551cfa28139f6165de0c822d75e1035761 (diff) |
Various repairs, mostly to get rid of short lines.
Diffstat (limited to 'lib/libc/net')
-rw-r--r-- | lib/libc/net/getaddrinfo.3 | 4 | ||||
-rw-r--r-- | lib/libc/net/gethostbyname.3 | 23 | ||||
-rw-r--r-- | lib/libc/net/getnetent.3 | 24 | ||||
-rw-r--r-- | lib/libc/net/getprotoent.3 | 34 | ||||
-rw-r--r-- | lib/libc/net/getservent.3 | 38 | ||||
-rw-r--r-- | lib/libc/net/rcmd.3 | 17 | ||||
-rw-r--r-- | lib/libc/net/rcmdsh.3 | 22 | ||||
-rw-r--r-- | lib/libc/net/resolver.3 | 43 |
8 files changed, 71 insertions, 134 deletions
diff --git a/lib/libc/net/getaddrinfo.3 b/lib/libc/net/getaddrinfo.3 index 747f62b33b9..01bfb3cef88 100644 --- a/lib/libc/net/getaddrinfo.3 +++ b/lib/libc/net/getaddrinfo.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getaddrinfo.3,v 1.12 2000/08/13 07:23:48 deraadt Exp $ +.\" $OpenBSD: getaddrinfo.3,v 1.13 2000/12/24 00:30:54 aaron Exp $ .\" $KAME: getaddrinfo.3,v 1.22 2000/08/09 21:16:17 itojun Exp $ .\" .\" Copyright (c) 1983, 1987, 1991, 1993 @@ -258,7 +258,7 @@ Here are pitfall cases you may encounter: .Bl -bullet .It .Fn getaddrinfo -will raise error if members in +will raise error if members in .Fa hints structure is not consistent. For example, for internet address families, diff --git a/lib/libc/net/gethostbyname.3 b/lib/libc/net/gethostbyname.3 index f1353288c51..94a848eecc8 100644 --- a/lib/libc/net/gethostbyname.3 +++ b/lib/libc/net/gethostbyname.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: gethostbyname.3,v 1.15 2000/04/18 03:01:31 aaron Exp $ +.\" $OpenBSD: gethostbyname.3,v 1.16 2000/12/24 00:30:56 aaron Exp $ .\" .\" Copyright (c) 1983, 1987, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -68,10 +68,8 @@ The .Fn gethostbyname and .Fn gethostbyaddr -functions -each return a pointer to an object with the -following structure describing an internet host -referenced by name or by address, respectively. +functions each return a pointer to an object with the following structure +describing an internet host referenced by name or by address, respectively. This structure contains either information obtained from the name server (i.e., .Xr resolver 3 and @@ -140,8 +138,7 @@ The only address family currently supported is .Pp The .Fn sethostent -function -may be used to request the use of a connected +function may be used to request the use of a connected .Tn TCP socket for queries. If the @@ -159,8 +156,7 @@ datagrams. .Pp The .Fn endhostent -function -closes the +function closes the .Tn TCP connection. .Pp @@ -239,13 +235,11 @@ re-opening the file if necessary. .Pp The .Fn sethostent -function -opens and/or rewinds the file +function opens and/or rewinds the file .Pa /etc/hosts . If the .Fa stayopen -argument is non-zero, -the file will not be closed after each call to +argument is non-zero, the file will not be closed after each call to .Fn gethostbyname , .Fn gethostbyname2 , or @@ -253,8 +247,7 @@ or .Pp The .Fn endhostent -function -closes the file. +function closes the file. .Sh HISTORY The .Fn herror diff --git a/lib/libc/net/getnetent.3 b/lib/libc/net/getnetent.3 index 3227f39b064..0c401c74ffe 100644 --- a/lib/libc/net/getnetent.3 +++ b/lib/libc/net/getnetent.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getnetent.3,v 1.10 2000/12/17 21:30:38 millert Exp $ +.\" $OpenBSD: getnetent.3,v 1.11 2000/12/24 00:30:56 aaron Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -59,11 +59,8 @@ The .Fn getnetbyname , and .Fn getnetbyaddr -functions -each return a pointer to an object with the -following structure -containing the broken-out -fields of a line in the network database, +functions each return a pointer to an object with the following structure +containing the broken-out fields of a line in the network database, .Pa /etc/networks . .Bd -literal -offset indent struct netent { @@ -90,13 +87,11 @@ Network numbers are returned in machine byte order. .Pp The .Fn getnetent -function -reads the next line of the file, opening the file if necessary. +function reads the next line of the file, opening the file if necessary. .Pp The .Fn setnetent -function -opens and rewinds the file. +function opens and rewinds the file. If the .Fa stayopen flag is non-zero, @@ -107,15 +102,13 @@ or .Pp The .Fn endnetent -function -closes the file. +function closes the file. .Pp The .Fn getnetbyname -function and .Fn getnetbyaddr -search the domain name server if the system is configured to use one. +functions search the domain name server if the system is configured to use one. If the search fails, or no name server is configured, they sequentially search from the beginning of the file until a matching net name or net address and type is found, or until @@ -127,8 +120,7 @@ Network numbers are supplied in host order. .It Pa /etc/networks .El .Sh DIAGNOSTICS -Null pointer -(0) returned on +Null pointer (0) returned on .Dv EOF or error. .Sh SEE ALSO diff --git a/lib/libc/net/getprotoent.3 b/lib/libc/net/getprotoent.3 index 4d1e96e6150..1f955295320 100644 --- a/lib/libc/net/getprotoent.3 +++ b/lib/libc/net/getprotoent.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getprotoent.3,v 1.7 2000/12/17 21:30:38 millert Exp $ +.\" $OpenBSD: getprotoent.3,v 1.8 2000/12/24 00:30:56 aaron Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -59,11 +59,8 @@ The .Fn getprotobyname , and .Fn getprotobynumber -functions -each return a pointer to an object with the -following structure -containing the broken-out -fields of a line in the network protocol database, +functions each return a pointer to an object with the following structure +containing the broken-out fields of a line in the network protocol database, .Pa /etc/protocols . .Bd -literal -offset indent .Pp @@ -86,13 +83,11 @@ The protocol number. .Pp The .Fn getprotoent -function -reads the next line of the file, opening the file if necessary. +function reads the next line of the file, opening the file if necessary. .Pp The .Fn setprotoent -function -opens and rewinds the file. +function opens and rewinds the file. If the .Fa stayopen flag is non-zero, @@ -103,24 +98,18 @@ or .Pp The .Fn endprotoent -function -closes the file. +function closes the file. .Pp The .Fn getprotobyname -function and .Fn getprotobynumber -sequentially search from the beginning -of the file until a matching -protocol name or -protocol number is found, -or until +functions sequentially search from the beginning of the file until a +matching protocol name or protocol number is found, or until .Dv EOF is encountered. .Sh RETURN VALUES -Null pointer -(0) returned on +Null pointer (0) returned on .Dv EOF or error. .Sh FILES @@ -140,7 +129,6 @@ and functions appeared in .Bx 4.2 . .Sh BUGS -These functions use a static data space; -if the data is needed for future use, it should be -copied before any subsequent calls overwrite it. +These functions use a static data space; if the data is needed for future use, +it should be copied before any subsequent calls overwrite it. Only the Internet protocols are currently understood. diff --git a/lib/libc/net/getservent.3 b/lib/libc/net/getservent.3 index 81ebc40cad3..85e0d65352d 100644 --- a/lib/libc/net/getservent.3 +++ b/lib/libc/net/getservent.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getservent.3,v 1.10 2000/12/17 21:30:38 millert Exp $ +.\" $OpenBSD: getservent.3,v 1.11 2000/12/24 00:30:56 aaron Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -59,11 +59,8 @@ The .Fn getservbyname , and .Fn getservbyport -functions -each return a pointer to an object with the -following structure -containing the broken-out -fields of a line in the network services database, +functions each return a pointer to an object with the following structure +containing the broken-out fields of a line in the network services database, .Pa /etc/services . .Bd -literal -offset indent struct servent { @@ -84,19 +81,16 @@ A zero-terminated list of alternate names for the service. The port number at which the service resides. Port numbers are returned in network byte order. .It Fa s_proto -The name of the protocol to use when contacting the -service. +The name of the protocol to use when contacting the service. .El .Pp The .Fn getservent -function -reads the next line of the file, opening the file if necessary. +function reads the next line of the file, opening the file if necessary. .Pp The .Fn setservent -function -opens and rewinds the file. +function opens and rewinds the file. If the .Fa stayopen flag is non-zero, @@ -107,19 +101,15 @@ or .Pp The .Fn endservent -function -closes the file. +function closes the file. .Pp The .Fn getservbyname and .Fn getservbyport -functions -sequentially search from the beginning -of the file until a matching -protocol name or -port number (specified in network byte order) is found, -or until +functions sequentially search from the beginning of the file until a +matching protocol name or port number (specified in network byte order) +is found, or until .Dv EOF is encountered. If a protocol name is also supplied (non-null), @@ -129,8 +119,7 @@ searches must also match the protocol. .It Pa /etc/services .El .Sh DIAGNOSTICS -Null pointer -(0) returned on +Null pointer (0) returned on .Dv EOF or error. .Sh SEE ALSO @@ -147,7 +136,6 @@ and functions appeared in .Bx 4.2 . .Sh BUGS -These functions use static data storage; -if the data is needed for future use, it should be -copied before any subsequent calls overwrite it. +These functions use static data storage; if the data is needed for future use, +it should be copied before any subsequent calls overwrite it. Expecting port numbers to fit in a 32-bit quantity is probably naive. diff --git a/lib/libc/net/rcmd.3 b/lib/libc/net/rcmd.3 index 89457ab8592..683f27a4af6 100644 --- a/lib/libc/net/rcmd.3 +++ b/lib/libc/net/rcmd.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: rcmd.3,v 1.22 2000/12/21 22:59:53 deraadt Exp $ +.\" $OpenBSD: rcmd.3,v 1.23 2000/12/24 00:30:56 aaron Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -62,8 +62,7 @@ .Sh DESCRIPTION The .Fn rcmd -function -is used by the superuser to execute a command on a remote +function is used by the superuser to execute a command on a remote machine using an authentication scheme based on reserved port numbers. If the calling process is not setuid, the @@ -92,8 +91,7 @@ The .Fn rresvport and .Fn rresvport_af -functions -return a descriptor to a socket +functions return a descriptor to a socket with an address in the privileged port space. The .Fn iruserok @@ -112,8 +110,7 @@ is an address family independent variant of .Pp The .Fn rcmd -function -looks up the host +function looks up the host .Fa *ahost using .Xr gethostbyname 3 , @@ -245,16 +242,14 @@ and .Sh DIAGNOSTICS The .Fn rcmd -function -returns a valid socket descriptor on success. +function returns a valid socket descriptor on success. It returns \-1 on error and prints a diagnostic message on the standard error. .Pp The .Fn rresvport and .Fn rresvport_af -functions -return a valid, bound socket descriptor on success. +functions return a valid, bound socket descriptor on success. It returns \-1 on error with the global value .Va errno set according to the reason for failure. diff --git a/lib/libc/net/rcmdsh.3 b/lib/libc/net/rcmdsh.3 index 29a1e4cf63d..e0c59efb852 100644 --- a/lib/libc/net/rcmdsh.3 +++ b/lib/libc/net/rcmdsh.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: rcmdsh.3,v 1.7 2000/02/23 17:28:25 aaron Exp $ +.\" $OpenBSD: rcmdsh.3,v 1.8 2000/12/24 00:30:56 aaron Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -44,10 +44,8 @@ .Sh DESCRIPTION The .Fn rcmdsh -function -is used by normal users to execute a command on -a remote machine using an authentication scheme based -on reserved port numbers using +function is used by normal users to execute a command on a remote machine +using an authentication scheme based on reserved port numbers using .Xr rshd 8 or the value of .Fa rshprog @@ -55,17 +53,15 @@ or the value of .Pp The .Fn rcmdsh -function -looks up the host +function looks up the host .Fa *ahost using .Xr gethostbyname 3 , returning \-1 if the host does not exist. Otherwise .Fa *ahost -is set to the standard name of the host -and a connection is established to a server -residing at the well-known Internet port +is set to the standard name of the host and a connection is established to +a server residing at the well-known Internet port .Li shell/tcp (or whatever port is used by .Fa rshprog ) . @@ -74,8 +70,7 @@ The parameter is ignored; it is only included to provide an interface similar to .Xr rcmd 3 . .Pp -If the connection succeeds, -a socket in the +If the connection succeeds, a socket in the .Tn UNIX domain of type .Dv SOCK_STREAM @@ -84,8 +79,7 @@ command as stdin and stdout, and stderr. .Sh DIAGNOSTICS The .Fn rcmdsh -function -returns a valid socket descriptor on success. +function returns a valid socket descriptor on success. It returns \-1 on error and prints a diagnostic message on the standard error. .Sh SEE ALSO .Xr rsh 1 , diff --git a/lib/libc/net/resolver.3 b/lib/libc/net/resolver.3 index 9b2471d823f..a5f956f90da 100644 --- a/lib/libc/net/resolver.3 +++ b/lib/libc/net/resolver.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: resolver.3,v 1.13 2000/01/03 11:51:08 itojun Exp $ +.\" $OpenBSD: resolver.3,v 1.14 2000/12/24 00:30:57 aaron Exp $ .\" .\" Copyright (c) 1985, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -108,8 +108,7 @@ Global configuration and state information that is used by the resolver routines is kept in the structure .Li _res . Most of the values have reasonable defaults and can be ignored. -Options -stored in +Options stored in .Li _res.options are defined in .Aq Pa resolv.h @@ -142,8 +141,7 @@ Used with .Dv RES_USEVC to keep the .Tn TCP -connection open between -queries. +connection open between queries. This is useful only in programs that regularly do many queries. .Tn UDP should be the normal mode used. @@ -180,12 +178,10 @@ The option is not meaningful on .Pp The .Fn res_init -routine -reads the configuration file (if any; see +routine reads the configuration file (if any; see .Xr resolv.conf 5 ) -to get the default domain name, -search list and -the Internet address of the local name server(s). +to get the default domain name, search list, and the Internet address +of the local name server(s). If no server is configured, the host running the resolver is tried. The current domain name is defined by the hostname @@ -235,8 +231,7 @@ The .Fn res_search routine makes a query and awaits a response like .Fn res_query , -but in addition, it implements the default and search rules -controlled by the +but in addition, it implements the default and search rules controlled by the .Dv RES_DEFNAMES and .Dv RES_DNSRCH @@ -247,11 +242,9 @@ The remaining routines are lower-level routines used by .Fn res_query . The .Fn res_mkquery -function -constructs a standard query message and places it in +function constructs a standard query message and places it in .Fa buf . -It returns the size of the query, or \-1 if the query is -larger than +It returns the size of the query, or \-1 if the query is larger than .Fa buflen . The query type .Fa op @@ -266,21 +259,18 @@ is currently unused but is intended for making update messages. .Pp The .Fn res_send -routine -sends a pre-formatted query and returns an answer. +routine sends a pre-formatted query and returns an answer. It will call .Fn res_init if .Dv RES_INIT is not set, send the query to the local name server, and handle timeouts and retries. -The length of the reply message is returned, or -\-1 if there were errors. +The length of the reply message is returned, or \-1 if there were errors. .Pp The .Fn dn_comp -function -compresses the domain name +function compresses the domain name .Fa exp_dn and stores it in .Fa comp_dn . @@ -289,8 +279,7 @@ The size of the array pointed to by .Fa comp_dn is given by .Fa length . -The compression uses -an array of pointers +The compression uses an array of pointers .Fa dnptrs to previously compressed names in the current message. The first pointer points @@ -300,8 +289,7 @@ The limit to the array is specified by .Fa lastdnptr . A side effect of .Fn dn_comp -is to update the list of pointers for -labels inserted into the message +is to update the list of pointers for labels inserted into the message as the name is compressed. If .Em dnptr @@ -316,8 +304,7 @@ the list of labels is not updated. .Pp The .Fn dn_expand -entry -expands the compressed domain name +entry expands the compressed domain name .Fa comp_dn to a full domain name The compressed name is contained in a query or reply message; |