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

NAME

4     getrpcent, getrpcbyname, getrpcbynumber, endrpcent, setrpcent — get RPC
5     entry
6

SYNOPSIS

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

DESCRIPTION

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

FILES

61     /etc/rpc
62

AVAILABILITY

64     These functions are part of libtirpc.
65

SEE ALSO

67     rpc(5), rpcinfo(8)
68

DIAGNOSTICS

70     A NULL pointer is returned on EOF or error.
71

BUGS

73     All information is contained in a static area so it must be copied if it
74     is to be saved.
75
76BSD                            December 14, 1987                           BSD
Impressum