1GETRPCENT(3)               Linux Programmer's Manual              GETRPCENT(3)
2
3
4

NAME

6       getrpcent, getrpcbyname, getrpcbynumber, setrpcent, endrpcent - get RPC
7       entry
8

SYNOPSIS

10       #include <netdb.h>
11
12       struct rpcent *getrpcent(void);
13
14       struct rpcent *getrpcbyname(char *name);
15
16       struct rpcent *getrpcbynumber(int number);
17
18       void setrpcent(int stayopen);
19
20       void endrpcent(void);
21

DESCRIPTION

23       The getrpcent(), getrpcbyname(), and  getrpcbynumber()  functions  each
24       return  a  pointer to an object with the following structure containing
25       the broken-out fields of an entry in the RPC program number data base.
26
27           struct rpcent {
28               char  *r_name;     /* name of server for this RPC program */
29               char **r_aliases;  /* alias list */
30               long   r_number;   /* RPC program number */
31           };
32
33       The members of this structure are:
34
35           r_name      The name of the server for this RPC program.
36
37           r_aliases   A NULL-terminated list of alternate names for  the  RPC
38                       program.
39
40           r_number    The RPC program number for this service.
41
42       The  getrpcent()  function  reads  the next entry from the database.  A
43       connection is opened to the database if necessary.
44
45       The setrpcent() function opens a connection to the database,  and  sets
46       the  next  entry  to the first entry.  If stayopen is nonzero, then the
47       connection to the database will not be closed between calls to  one  of
48       the getrpc*() functions.
49
50       The endrpcent() function closes the connection to the database.
51
52       The  getrpcbyname()  and getrpcbynumber() functions sequentially search
53       from the beginning of the file until a matching  RPC  program  name  or
54       program number is found, or until end-of-file is encountered.
55

RETURN VALUE

57       On  success, getrpcent(), getrpcbyname(), and getrpcbynumber() return a
58       pointer to a statically allocated rpcent structure.  A NULL pointer  is
59       returned on EOF or error.
60

FILES

62       /etc/rpc
63              RPC program number database.
64

CONFORMING TO

66       Not in POSIX.1-2001.  Present on the BSDs, Solaris, and many other sys‐
67       tems.
68

BUGS

70       All information is contained in a static area so it must be  copied  if
71       it is to be saved.
72

SEE ALSO

74       getrpcent_r(3), rpc(5), rpcinfo(8), ypserv(8)
75

COLOPHON

77       This  page  is  part of release 3.53 of the Linux man-pages project.  A
78       description of the project, and information about reporting  bugs,  can
79       be found at http://www.kernel.org/doc/man-pages/.
80
81
82
83                                  2008-08-19                      GETRPCENT(3)
Impressum