OSDN Git Service

4986252892cc6a3f7b42013bdbfc323dbf44214a
[linuxjm/LDP_man-pages.git] / draft / man3 / getrpcent_r.3
1 .\" Copyright 2008, Linux Foundation, written by Michael Kerrisk
2 .\"     <mtk.manpages@gmail.com>
3 .\"
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\"
24 .\"*******************************************************************
25 .\"
26 .\" This file was generated with po4a. Translate the source file.
27 .\"
28 .\"*******************************************************************
29 .TH GETRPCENT_R 3 2010\-09\-10 GNU "Linux Programmer's Manual"
30 .SH 名前
31 getrpcent_r, getrpcbyname_r, getrpcbynumber_r \- get RPC entry (reentrant)
32 .SH 書式
33 .nf
34 \fB#include <netdb.h>\fP
35 .sp
36 \fBint getrpcent_r(struct rpcent *\fP\fIresult_buf\fP\fB, char *\fP\fIbuf\fP\fB,\fP
37 \fB                size_t \fP\fIbuflen\fP\fB, struct rpcent **\fP\fIresult\fP\fB);\fP
38 .sp
39 \fBint getrpcbyname_r(const char *\fP\fIname\fP\fB,\fP
40 \fB                struct rpcent *\fP\fIresult_buf\fP\fB, char *\fP\fIbuf\fP\fB,\fP
41 \fB                size_t \fP\fIbuflen\fP\fB, struct rpcent **\fP\fIresult\fP\fB);\fP
42 .sp
43 \fBint getrpcbynumber_r(int \fP\fInumber\fP\fB,\fP
44 \fB                struct rpcent *\fP\fIresult_buf\fP\fB, char *\fP\fIbuf\fP\fB,\fP
45 \fB                size_t \fP\fIbuflen\fP\fB, struct rpcent **\fP\fIresult\fP\fB);\fP
46 .sp
47 .fi
48 .in -4n
49 Feature Test Macro Requirements for glibc (see \fBfeature_test_macros\fP(7)):
50 .ad l
51 .in
52 .sp
53 \fBgetrpcent_r\fP(), \fBgetrpcbyname_r\fP(), \fBgetrpcbynumber_r\fP():
54 .RS 4
55 _BSD_SOURCE || _SVID_SOURCE
56 .RE
57 .ad b
58 .SH 説明
59 The \fBgetrpcent_r\fP(), \fBgetrpcbyname_r\fP(), and \fBgetrpcbynumber_r\fP()
60 functions are the reentrant equivalents of, respectively, \fBgetrpcent\fP(3),
61 \fBgetrpcbyname\fP(3), and \fBgetrpcbynumber\fP(3).  They differ in the way that
62 the \fIrpcent\fP structure is returned, and in the function calling signature
63 and return value.  This manual page describes just the differences from the
64 nonreentrant functions.
65
66 Instead of returning a pointer to a statically allocated \fIrpcent\fP structure
67 as the function result, these functions copy the structure into the location
68 pointed to by \fIresult_buf\fP.
69
70 .\" I can find no information on the required/recommended buffer size;
71 .\" the nonreentrant functions use a 1024 byte buffer -- mtk.
72 The \fIbuf\fP array is used to store the string fields pointed to by the
73 returned \fIrpcent\fP structure.  (The nonreentrant functions allocate these
74 strings in static storage.)  The size of this array is specified in
75 \fIbuflen\fP.  If \fIbuf\fP is too small, the call fails with the error \fBERANGE\fP,
76 and the caller must try again with a larger buffer.  (A buffer of length
77 1024 bytes should be sufficient for most applications.)
78
79 If the function call successfully obtains an RPC record, then \fI*result\fP is
80 set pointing to \fIresult_buf\fP; otherwise, \fI*result\fP is set to NULL.
81 .SH 返り値
82 On success, these functions return 0.  On error, they return one of the
83 positive error numbers listed in ERRORS.
84
85 On error, record not found (\fBgetrpcbyname_r\fP(), \fBgetrpcbynumber_r\fP()), or
86 end of input (\fBgetrpcent_r\fP())  \fIresult\fP is set to NULL.
87 .SH エラー
88 .TP 
89 \fBENOENT\fP
90 (\fBgetrpcent_r\fP())  No more records in database.
91 .TP 
92 \fBERANGE\fP
93 \fIbuf\fP is too small.  Try again with a larger buffer (and increased
94 \fIbuflen\fP).
95 .SH 準拠
96 These functions are GNU extensions.  Functions with similar names exist on
97 some other systems, though typically with different calling signatures.
98 .SH 関連項目
99 \fBgetrpcent\fP(3), \fBrpc\fP(5)