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       struct rpcent *getrpcbynumber(int number);
16
17       void setrpcent(int stayopen);
18       void endrpcent(void);
19

DESCRIPTION

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

RETURN VALUE

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

FILES

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

ATTRIBUTES

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

CONFORMING TO

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

BUGS

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

SEE ALSO

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

COLOPHON

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