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(const 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.  NULL  is  returned
59       on EOF or error.
60

FILES

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

ATTRIBUTES

66       For   an   explanation   of   the  terms  used  in  this  section,  see
67       attributes(7).
68
69       ┌─────────────────────────────┬───────────────┬────────────────┐
70Interface                    Attribute     Value          
71       ├─────────────────────────────┼───────────────┼────────────────┤
72getrpcent(), getrpcbyname(), │ Thread safety │ MT-Unsafe      │
73getrpcbynumber()             │               │                │
74       ├─────────────────────────────┼───────────────┼────────────────┤
75setrpcent(), endrpcent()     │ Thread safety │ MT-Safe locale │
76       └─────────────────────────────┴───────────────┴────────────────┘
77

CONFORMING TO

79       Not in POSIX.1.  Present on the BSDs, Solaris, and many other systems.
80

BUGS

82       All information is contained in a static area so it must be  copied  if
83       it is to be saved.
84

SEE ALSO

86       getrpcent_r(3), rpc(5), rpcinfo(8), ypserv(8)
87

COLOPHON

89       This  page  is  part of release 5.04 of the Linux man-pages project.  A
90       description of the project, information about reporting bugs,  and  the
91       latest     version     of     this    page,    can    be    found    at
92       https://www.kernel.org/doc/man-pages/.
93
94
95
96                                  2017-09-15                      GETRPCENT(3)
Impressum