]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
Rephrase description in terms of a database, rather than a file.
authorMichael Kerrisk <mtk.manpages@gmail.com>
Wed, 13 Aug 2008 05:17:08 +0000 (05:17 +0000)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Wed, 13 Aug 2008 05:17:08 +0000 (05:17 +0000)
Note that each of the get*() functions opens a connection to
the database if necessary.
The database connection is held opend between get*() calls if
'stayopen' is non-zero (not necessarily 1).
s/zero terminated list/NULL-terminated list/

man3/getnetent.3
man3/getprotoent.3
man3/getrpcent.3

index 1d48774d6db02cacb1db09f9ca89c8efa7f51deb..37ca8fedbe9626831b350a92ffdc078b5201017d 100644 (file)
@@ -25,7 +25,7 @@
 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
 .\"     386BSD man pages
 .\" Modified Sat Jul 24 21:48:06 1993 by Rik Faith (faith@cs.unc.edu)
-.TH GETNETENT 3  1993-05-15 "GNU" "Linux Programmer's Manual"
+.TH GETNETENT 3  2008-08-13 "GNU" "Linux Programmer's Manual"
 .SH NAME
 getnetent, getnetbyname, getnetbyaddr, setnetent, endnetent \-
 get network entry
@@ -46,37 +46,37 @@ get network entry
 .SH DESCRIPTION
 The
 .BR getnetent ()
-function reads the next line from the file
-\fI/etc/networks\fP and returns a structure \fInetent\fP containing
-the broken out fields from the line.
-The \fI/etc/networks\fP file
-is opened if necessary.
+function reads the next entry from the networks database
+and returns a \fInetent\fP structure containing
+the broken-out fields from the entry.
+A connection is opened to the database if necessary.
 .PP
 The
 .BR getnetbyname ()
 function returns a \fInetent\fP structure
-for the line from \fI/etc/networks\fP that matches the network
-\fIname\fP.
+for the entry from the database
+that matches the network \fIname\fP.
 .PP
 The
 .BR getnetbyaddr ()
 function returns a \fInetent\fP structure
-for the line that matches the network number \fInet\fP of type
+for the entry from the database
+that matches the network number \fInet\fP of type
 \fItype\fP.
 .PP
 The
 .BR setnetent ()
-function opens and rewinds the
-\fI/etc/networks\fP file.
-If \fIstayopen\fP is true (1), then the
-file will not be closed between calls to
-.BR getnetbyname ()
-and
-.BR getnetbyaddr ().
+function opens a connection to the database,
+and sets the next entry to the first entry.
+If \fIstayopen\fP is non-zero,
+then the connection to the database
+will not be closed between calls to one of the
+.BR getnet* ()
+functions.
 .PP
 The
 .BR endnetent ()
-function closes \fI/etc/networks\fP.
+function closes the connection to the database.
 .PP
 The \fInetent\fP structure is defined in \fI<netdb.h>\fP as follows:
 .sp
@@ -97,7 +97,7 @@ The members of the \fInetent\fP structure are:
 The official name of the network.
 .TP
 .I n_aliases
-A zero terminated list of alternative names for the network.
+A NULL-terminated list of alternative names for the network.
 .TP
 .I n_addrtype
 The type of the network number; always
@@ -121,7 +121,7 @@ networks database file
 4.3BSD, POSIX.1-2001.
 .SH "SEE ALSO"
 .BR getprotoent (3),
-.BR getservent (3),
-.BR networks (5)
+.BR getservent (3)
+.\" .BR networks (5)
 .br
 RFC\ 1101
index 0c6912911fdbe9b5dc50a893cf44323616f746fe..5b86e9384457a567f08dcc2ed95f6f5dfd34e060 100644 (file)
@@ -25,7 +25,7 @@
 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
 .\"     386BSD man pages
 .\" Modified Sat Jul 24 19:26:03 1993 by Rik Faith (faith@cs.unc.edu)
-.TH GETPROTOENT 3  1993-04-24 "GNU" "Linux Programmer's Manual"
+.TH GETPROTOENT 3  2008-08-13 "GNU" "Linux Programmer's Manual"
 .SH NAME
 getprotoent, getprotobyname, getprotobynumber, setprotoent,
 endprotoent \- get protocol entry
@@ -46,35 +46,39 @@ endprotoent \- get protocol entry
 .SH DESCRIPTION
 The
 .BR getprotoent ()
-function reads the next line from the file
-\fI/etc/protocols\fP and returns a structure \fIprotoent\fP
-containing the broken out fields from the line.
-The \fI/etc/protocols\fP file is opened if necessary.
+function reads the next entry from the protocols database (see
+.BR protocols (5))
+and returns a \fIprotoent\fP structure
+containing the broken-out fields from the entry.
+A connection is opened to the database if necessary.
 .PP
 The
 .BR getprotobyname ()
-function returns a \fIprotoent\fP
-structure for the line from \fI/etc/protocols\fP that matches
-the protocol name \fIname\fP.
+function returns a \fIprotoent\fP structure
+for the entry from the database
+that matches the protocol name \fIname\fP.
+A connection is opened to the database if necessary.
 .PP
 The
 .BR getprotobynumber ()
-function returns a \fIprotoent\fP
-structure for the line that matches the protocol number \fInumber\fP.
+function returns a \fIprotoent\fP structure
+for the entry from the database
+that matches the protocol number \fInumber\fP.
+A connection is opened to the database if necessary.
 .PP
 The
 .BR setprotoent ()
-function opens and rewinds the
-\fI/etc/protocols\fP file.
-If \fIstayopen\fP is true (1), then
-the file will not be closed between calls to
-.BR getprotobyname ()
-or
-.BR getprotobynumber ().
+function opens a connection to the database,
+and sets the next entry to the first entry.
+If \fIstayopen\fP is non-zero,
+then the connection to the database
+will not be closed between calls to one of the
+.BR getproto* ()
+functions.
 .PP
 The
 .BR endprotoent ()
-function closes \fI/etc/protocols\fP.
+function closes the connection to the database.
 .PP
 The \fIprotoent\fP structure is defined in \fI<netdb.h>\fP as follows:
 .sp
@@ -94,7 +98,7 @@ The members of the \fIprotoent\fP structure are:
 The official name of the protocol.
 .TP
 .I p_aliases
-A zero terminated list of alternative names for the protocol.
+A NULL-terminated list of alternative names for the protocol.
 .TP
 .I p_proto
 The protocol number.
index 0b208cf4baaae95caec010403828fb2e81b29b06..4b0e8031915a05a46af40194b738f2fc0f314768 100644 (file)
@@ -1,7 +1,7 @@
 .\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
 .\"
 .\" @(#)getrpcent.3n   2.2 88/08/02 4.0 RPCSRC; from 1.11 88/03/14 SMI
-.TH GETRPCENT 3 2007-12-23 "" "Linux Programmer's Manual"
+.TH GETRPCENT 3 2008-08-13 "" "Linux Programmer's Manual"
 .SH NAME
 getrpcent, getrpcbyname, getrpcbynumber, setrpcent, endrpcent \- get
 RPC entry
@@ -27,15 +27,14 @@ and
 .BR getrpcbynumber ()
 each return a pointer to an object with the
 following structure containing the broken-out
-fields of a line in the rpc program number data base,
-.IR /etc/rpc .
+fields of an entry in the RPC program number data base.
 .in +4n
 .nf
 
 struct rpcent {
-    char  *r_name;     /* name of server for this rpc program */
+    char  *r_name;     /* name of server for this RPC program */
     char **r_aliases;  /* alias list */
-    long   r_number;   /* rpc program number */
+    long   r_number;   /* RPC program number */
 };
 .fi
 .in
@@ -44,42 +43,45 @@ The members of this structure are:
 .RS 4
 .TP 12
 .I r_name
-The name of the server for this rpc program.
+The name of the server for this RPC program.
 .TP
 .I r_aliases
-A zero terminated list of alternate names for the rpc program.
+A NULL-terminated list of alternate names for the RPC program.
 .TP
 .I r_number
-The rpc program number for this service.
+The RPC program number for this service.
 .RE
 .LP
 .BR getrpcent ()
-reads the next line of the file, opening the file if necessary.
+reads the next entry from the database.
+A connection is opened to the database if necessary.
 .LP
 .BR setrpcent ()
-opens and rewinds the file.
-If the
-.I stayopen
-flag is non-zero,
-the net data base will not be closed after each call to
-.BR getrpcent ()
-(either directly, or indirectly through one of
-the other \*(lqgetrpc\*(rq calls).
+function opens a connection to the database,
+and sets the next entry to the first entry.
+If \fIstayopen\fP is non-zero,
+then the connection to the database
+will not be closed between calls to one of the
+.BR getrpc* ()
+functions.
 .LP
+The
 .BR endrpcent ()
-closes the file.
+function closes the connection to the database.
 .LP
 .BR getrpcbyname ()
 and
 .BR getrpcbynumber ()
 sequentially search from the beginning
-of the file until a matching rpc program name or
+of the file until a matching RPC program name or
 program number is found, or until end-of-file is encountered.
 .SH RETURN VALUE
 .LP
 A NULL pointer is returned on EOF or error.
 .SH FILES
+.TP
 .I /etc/rpc
+RPC program number database.
 .SH "CONFORMING TO"
 Not in POSIX.1-2001.
 Present on the BSDs, Solaris, and many other systems.