]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man3/getrpcent.3
fuse.4: ffix
[thirdparty/man-pages.git] / man3 / getrpcent.3
index 562fb61ed61170b1268ae47d507cfef8ba52b0eb..191e31c7d0742bf15483aee4b6d9d5bdffbd81f4 100644 (file)
 .\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
 .\"
+.\" %%%LICENSE_START(BSD_ONELINE_CDROM)
+.\" This page was taken from the 4.4BSD-Lite CDROM (BSD license)
+.\" %%%LICENSE_END
+.\"
 .\" @(#)getrpcent.3n   2.2 88/08/02 4.0 RPCSRC; from 1.11 88/03/14 SMI
-.TH GETRPCENT 3 2007-05-18 "" "Linux Programmer's Manual"
+.TH GETRPCENT 3 2017-09-15 "" "Linux Programmer's Manual"
 .SH NAME
-getrpcent, getrpcbyname, getrpcbynumber \- get RPC entry
+getrpcent, getrpcbyname, getrpcbynumber, setrpcent, endrpcent \- get
+RPC entry
 .SH SYNOPSIS
 .nf
-.ft B
-#include <netdb.h>
-.LP
-.ft B
-struct rpcent *getrpcent()
-.LP
-.ft B
-struct rpcent *getrpcbyname(name)
-char *name;
-.LP
-.ft B
-struct rpcent *getrpcbynumber(number)
-int number;
-.LP
-.ft B
-setrpcent(stayopen)
-int stayopen;
-.LP
-.ft B
-endrpcent()
+.B #include <netdb.h>
+.PP
+.BI "struct rpcent *getrpcent(void);"
+.PP
+.BI "struct rpcent *getrpcbyname(const char *" name );
+.PP
+.BI "struct rpcent *getrpcbynumber(int " number );
+.PP
+.BI "void setrpcent(int " stayopen );
+.PP
+.BI "void endrpcent(void);"
 .fi
 .SH DESCRIPTION
-.LP
+.PP
+The
 .BR getrpcent (),
 .BR getrpcbyname (),
 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 .
-.RS
-.LP
-.nf
-.ft B
-struct rpcent {
-       char    *r_name;        /* name of server for this rpc program */
-       char    **r_aliases;    /* alias list */
-       long    r_number;       /* rpc program number */
+functions each return a pointer to an object with the
+following structure containing the broken-out
+fields of an entry in the RPC program number data base.
+.PP
+.in +4n
+.EX
+struct rpcent {
+    char  *r_name;     /* name of server for this RPC program */
+    char **r_aliases;  /* alias list */
+    long   r_number;   /* RPC program number */
 };
-.ft R
-.fi
-.RE
-.LP
+.EE
+.in
+.PP
 The members of this structure are:
-.RS
-.PD 0
-.TP 20
-.B r_name
-The name of the server for this rpc program.
-.TP 20
-.B r_aliases
-A zero terminated list of alternate names for the rpc program.
-.TP  20
-.B r_number
-The rpc program number for this service.
-.PD
+.RS 4
+.TP 12
+.I r_name
+The name of the server for this RPC program.
+.TP
+.I r_aliases
+A NULL-terminated list of alternate names for the RPC program.
+.TP
+.I r_number
+The RPC program number for this service.
 .RE
-.LP
+.PP
+The
 .BR getrpcent ()
-reads the next line of the file, opening the file if necessary.
-.LP
+function reads the next entry from the database.
+A connection is opened to the database if necessary.
+.PP
+The
 .BR setrpcent ()
-opens and rewinds the file.
-If the
+function opens a connection to the database,
+and sets the next entry to the first entry.
+If
 .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).
-.LP
+is nonzero,
+then the connection to the database
+will not be closed between calls to one of the
+.BR getrpc* ()
+functions.
+.PP
+The
 .BR endrpcent ()
-closes the file.
-.LP
+function closes the connection to the database.
+.PP
+The
 .BR getrpcbyname ()
 and
 .BR getrpcbynumber ()
-sequentially search from the beginning
-of the file until a matching rpc program name or
+functions sequentially search from the beginning
+of the file until a matching RPC program name or
 program number is found, or until end-of-file is encountered.
+.SH RETURN VALUE
+On success,
+.BR getrpcent (),
+.BR getrpcbyname (),
+and
+.BR getrpcbynumber ()
+return a pointer to a statically allocated
+.I rpcent
+structure.
+NULL is returned on EOF or error.
 .SH FILES
-.PD 0
-.TP 20
+.TP
 .I /etc/rpc
-.PD
-.SH "CONFORMING TO"
-Not in POSIX.1-2001.
+RPC program number database.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbw28 lb lb
+l l l.
+Interface      Attribute       Value
+T{
+.BR getrpcent (),
+.BR getrpcbyname (),
+.br
+.BR getrpcbynumber ()
+T}     Thread safety   MT-Unsafe
+T{
+.BR setrpcent (),
+.BR endrpcent ()
+T}     Thread safety   MT-Safe locale
+.TE
+.sp 1
+.SH CONFORMING TO
+Not in POSIX.1.
 Present on the BSDs, Solaris, and many other systems.
-.SH RETURN VALUE
-.LP
-A
-.SM NULL
-pointer is returned on
-.SM EOF
-or error.
 .SH BUGS
-.LP
 All information
 is contained in a static area
 so it must be copied if it is
 to be saved.
-.SH "SEE ALSO"
+.SH SEE ALSO
+.BR getrpcent_r (3),
 .BR rpc (5),
 .BR rpcinfo (8),
 .BR ypserv (8)