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
38              A NULL-terminated list of alternate names for the RPC program.
39
40       r_number
41              The RPC program number for this service.
42
43       The getrpcent() function reads the next entry  from  the  database.   A
44       connection is opened to the database if necessary.
45
46       The  setrpcent()  function opens a connection to the database, and sets
47       the next entry to the first entry.  If stayopen is  nonzero,  then  the
48       connection  to  the database will not be closed between calls to one of
49       the getrpc*() functions.
50
51       The endrpcent() function closes the connection to the database.
52
53       The getrpcbyname() and getrpcbynumber() functions  sequentially  search
54       from  the  beginning  of  the file until a matching RPC program name or
55       program number is found, or until end-of-file is encountered.
56

RETURN VALUE

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

FILES

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

ATTRIBUTES

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

CONFORMING TO

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

BUGS

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

SEE ALSO

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

COLOPHON

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