1 .\" Copyright 2008, Linux Foundation, written by Michael Kerrisk
2 .\" <mtk.manpages@gmail.com>
4 .\" %%%LICENSE_START(VERBATIM)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
26 .\"*******************************************************************
28 .\" This file was generated with po4a. Translate the source file.
30 .\"*******************************************************************
31 .TH GETRPCENT_R 3 2010\-09\-10 GNU "Linux Programmer's Manual"
33 getrpcent_r, getrpcbyname_r, getrpcbynumber_r \- RPC エントリを
37 \fB#include <netdb.h>\fP
39 \fBint getrpcent_r(struct rpcent *\fP\fIresult_buf\fP\fB, char *\fP\fIbuf\fP\fB,\fP
40 \fB size_t \fP\fIbuflen\fP\fB, struct rpcent **\fP\fIresult\fP\fB);\fP
42 \fBint getrpcbyname_r(const char *\fP\fIname\fP\fB,\fP
43 \fB struct rpcent *\fP\fIresult_buf\fP\fB, char *\fP\fIbuf\fP\fB,\fP
44 \fB size_t \fP\fIbuflen\fP\fB, struct rpcent **\fP\fIresult\fP\fB);\fP
46 \fBint getrpcbynumber_r(int \fP\fInumber\fP\fB,\fP
47 \fB struct rpcent *\fP\fIresult_buf\fP\fB, char *\fP\fIbuf\fP\fB,\fP
48 \fB size_t \fP\fIbuflen\fP\fB, struct rpcent **\fP\fIresult\fP\fB);\fP
52 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照):
56 \fBgetrpcent_r\fP(), \fBgetrpcbyname_r\fP(), \fBgetrpcbynumber_r\fP():
58 _BSD_SOURCE || _SVID_SOURCE
62 関数 \fBgetrpcent_r\fP(), \fBgetrpcbyname_r\fP(), \fBgetrpcbynumber_r\fP() は、
63 それぞれ \fBgetrpcent\fP(3), \fBgetrpcbyname\fP(3), \fBgetrpcbynumber\fP(3) の
65 \fIrpcent\fP 構造体の返し方と、関数呼び出し時の引き数と返り値が異なる。
66 このマニュアルページでは、リエントラントでない関数との違いだけを
69 これらの関数は、関数の結果として静的に割り当てられた \fIrpcent\fP 構造体
70 へのポインタを返すのではなく、 \fIrpcent\fP 構造体を \fIresult_buf\fP が
73 .\" I can find no information on the required/recommended buffer size;
74 .\" the nonreentrant functions use a 1024 byte buffer -- mtk.
75 配列 \fIbuf\fP は、返される \fIrpcent\fP 構造体が指す文字列フィールドを
76 格納するのに使用される (リエントラントでない関数の場合は、
78 この配列の大きさは \fIbuflen\fP で指定される。
79 \fIbuf\fP が小さすぎる場合、関数呼び出しはエラー \fBERANGE\fP で失敗し、
80 呼び出し側ではもっと大きなバッファで再度呼び出す必要がある (ほとんどの
81 アプリケーションでは、長さ 1024 バイトのバッファで十分なはずである)。
83 関数呼び出しで RPC レコードの取得に成功すると、
84 \fI*result\fP は \fIresult_buf\fP を指すように設定される。
85 それ以外の場合は \fI*result\fP に NULL が設定される。
87 成功すると、これらの関数は 0 を返す。エラーの場合、「エラー」の節の
88 リストにある正のエラー番号のいずれかを返す。
90 エラーの場合、レコードが見つからなかった場合 (\fBgetrpcbyname_r\fP(),
91 \fBgetrpcbyaddr_r\fP()) やこれ以上レコードがない場合 (\fBgetrpcent_r\fP())、
92 \fIresult\fP には NULL が設定される。
96 (\fBgetrpcent_r\fP()) データベースにこれ以上レコードがない。
99 \fIbuf\fP が小さすぎる。もっと大きなバッファにして
100 (または \fIbuflen\fP を増やして) 再度呼び出すこと。
102 これらの関数は GNU による拡張である。
103 他のシステムにも同様の名前の関数が存在する場合があるが、
106 \fBgetrpcent\fP(3), \fBrpc\fP(5)
108 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
109 である。プロジェクトの説明とバグ報告に関する情報は
110 http://www.kernel.org/doc/man\-pages/ に書かれている。