summaryrefslogtreecommitdiff
path: root/lib/libc/net/getprotoent.3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/net/getprotoent.3')
-rw-r--r--lib/libc/net/getprotoent.334
1 files changed, 11 insertions, 23 deletions
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.