1GETRPCENT(3)               Library Functions Manual               GETRPCENT(3)
2
3
4

NAME

6       getrpcent, getrpcbyname, getrpcbynumber - get RPC entry
7

SYNOPSIS

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

DESCRIPTION

25       getrpcent(), getrpcbyname(), and getrpcbynumber() each return a pointer
26       to an object with the following  structure  containing  the  broken-out
27       fields of a line in the rpc program number data base, /etc/rpc.
28
29              struct    rpcent {
30                   char *r_name;  /* name of server for this rpc program */
31                   char **r_aliases;   /* alias list */
32                   long r_number; /* rpc program number */
33              };
34
35       The members of this structure are:
36              r_name              The name of the server for this rpc program.
37              r_aliases           A  zero  terminated  list of alternate names
38                                  for the rpc program.
39              r_number            The rpc program number for this service.
40
41       getrpcent() reads the next line of the file, opening the file if neces‐
42       sary.
43
44       setrpcent()  opens  and rewinds the file.  If the stayopen flag is non-
45       zero, the net data base will not be closed after each  call  to  getrp‐
46       cent()  (either  directly,  or  indirectly  through  one  of  the other
47       “getrpc” calls).
48
49       endrpcent() closes the file.
50
51       getrpcbyname() and getrpcbynumber() sequentially search from the begin‐
52       ning of the file until a matching rpc program name or program number is
53       found, or until end-of-file is encountered.
54

FILES

56       /etc/rpc
57

CONFORMING TO

59       Not in POSIX.1-2001.  Present on the BSDs, Solaris, and many other sys‐
60       tems.
61

SEE ALSO

63       rpc(5), rpcinfo(8), ypserv(8)
64

DIAGNOSTICS

66       A NULL pointer is returned on EOF or error.
67

BUGS

69       All  information  is contained in a static area so it must be copied if
70       it is to be saved.
71
72
73
74                                  1987-12-14                      GETRPCENT(3)
Impressum