1GETRPCENT_R(3)             Linux Programmer's Manual            GETRPCENT_R(3)
2
3
4

NAME

6       getrpcent_r,  getrpcbyname_r,  getrpcbynumber_r  - get RPC entry (reen‐
7       trant)
8

SYNOPSIS

10       #include <netdb.h>
11
12       int getrpcent_r(struct rpcent *result_buf, char *buf,
13                       size_t buflen, struct rpcent **result);
14
15       int getrpcbyname_r(const char *name,
16                       struct rpcent *result_buf, char *buf,
17                       size_t buflen, struct rpcent **result);
18
19       int getrpcbynumber_r(int number,
20                       struct rpcent *result_buf, char *buf,
21                       size_t buflen, struct rpcent **result);
22
23   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
24
25       getrpcent_r(), getrpcbyname_r(), getrpcbynumber_r(): _BSD_SOURCE ||
26       _SVID_SOURCE
27

DESCRIPTION

29       The  getrpcent_r(),  getrpcbyname_r(), and getrpcbynumber_r() functions
30       are the reentrant equivalents of, respectively, getrpcent(3), getrpcby‐
31       name(3), and getrpcbynumber(3).  They differ in the way that the rpcent
32       structure is returned, and in the function calling signature and return
33       value.   This  manual page describes just the differences from the non‐
34       reentrant functions.
35
36       Instead of returning a pointer to a statically allocated rpcent  struc‐
37       ture  as  the  function result, these functions copy the structure into
38       the location pointed to by result_buf.
39
40       The buf array is used to store the string  fields  pointed  to  by  the
41       returned  rpcent structure.  (The nonreentrant functions allocate these
42       strings in static storage.)  The size of this  array  is  specified  in
43       buflen.  If buf is too small, the call fails with the error ERANGE, and
44       the caller must try again with a larger buffer.  (A  buffer  of  length
45       1024 bytes should be sufficient for most applications.)
46
47       If  the  function call successfully obtains an RPC record, then *result
48       is set pointing to result_buf; otherwise, *result is set to NULL.
49

RETURN VALUE

51       On success, these functions return 0.  On error, a positive error  num‐
52       ber is returned.
53
54       On  error,  record not found (getrpcbyname_r(), getrpcbynumber_r()), or
55       end of input (getrpcent_r()) result is set to NULL.
56

ERRORS

58       ENOENT (getrpcent_r()) No more records in database.
59
60       ERANGE buf is too small.  Try again with a larger buffer (and increased
61              buflen).
62

CONFORMING TO

64       These functions are GNU extensions.  Functions with similar names exist
65       on some other systems, though typically with different  calling  signa‐
66       tures.
67

SEE ALSO

69       getrpcent(3), rpc(5)
70

COLOPHON

72       This  page  is  part of release 3.25 of the Linux man-pages project.  A
73       description of the project, and information about reporting  bugs,  can
74       be found at http://www.kernel.org/doc/man-pages/.
75
76
77
78GNU                               2008-08-19                    GETRPCENT_R(3)
Impressum