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():
26           Since glibc 2.19:
27               _DEFAULT_SOURCE
28           Glibc 2.19 and earlier:
29               _BSD_SOURCE || _SVID_SOURCE
30

DESCRIPTION

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

RETURN VALUE

54       On success, these functions return 0.  On error, they return one of the
55       positive error numbers listed in ERRORS.
56
57       On error, record not found (getrpcbyname_r(),  getrpcbynumber_r()),  or
58       end of input (getrpcent_r()) result is set to NULL.
59

ERRORS

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

ATTRIBUTES

67       For  an  explanation  of  the  terms  used   in   this   section,   see
68       attributes(7).
69
70       ┌────────────────────┬───────────────┬────────────────┐
71Interface           Attribute     Value          
72       ├────────────────────┼───────────────┼────────────────┤
73getrpcent_r(),      │ Thread safety │ MT-Safe locale │
74getrpcbyname_r(),   │               │                │
75getrpcbynumber_r()  │               │                │
76       └────────────────────┴───────────────┴────────────────┘

CONFORMING TO

78       These functions are GNU extensions.  Functions with similar names exist
79       on some other systems, though typically with different  calling  signa‐
80       tures.
81

SEE ALSO

83       getrpcent(3), rpc(5)
84

COLOPHON

86       This  page  is  part of release 5.07 of the Linux man-pages project.  A
87       description of the project, information about reporting bugs,  and  the
88       latest     version     of     this    page,    can    be    found    at
89       https://www.kernel.org/doc/man-pages/.
90
91
92
93GNU                               2017-09-15                    GETRPCENT_R(3)
Impressum