OSDN Git Service

(split) LDP: draft snapshot from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / getnetent_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 GETNETENT_R 3 2010\-09\-10 GNU "Linux Programmer's Manual"
30 .SH 名前
31 getnetent_r, getnetbyname_r, getnetbyaddr_r \- ネットワークエントリを
32 取得する (リエントラント版)
33 .SH 書式
34 .nf
35 \fB#include <netdb.h>\fP
36 .sp
37 \fBint getnetent_r(struct netent *\fP\fIresult_buf\fP\fB, char *\fP\fIbuf\fP\fB,\fP
38 \fB                size_t \fP\fIbuflen\fP\fB, struct netent **\fP\fIresult\fP\fB,\fP
39 \fB                int *\fP\fIh_errnop\fP\fB);\fP
40 .sp
41 \fBint getnetbyname_r(const char *\fP\fIname\fP\fB,\fP
42 \fB                struct netent *\fP\fIresult_buf\fP\fB, char *\fP\fIbuf\fP\fB,\fP
43 \fB                size_t \fP\fIbuflen\fP\fB, struct netent **\fP\fIresult\fP\fB,\fP
44 \fB                int *\fP\fIh_errnop\fP\fB);\fP
45 .sp
46 \fBint getnetbyaddr_r(uint32_t \fP\fInet\fP\fB, int \fP\fItype\fP\fB,\fP
47 \fB                struct netent *\fP\fIresult_buf\fP\fB, char *\fP\fIbuf\fP\fB,\fP
48 \fB                size_t \fP\fIbuflen\fP\fB, struct netent **\fP\fIresult\fP\fB,\fP
49 \fB                int *\fP\fIh_errnop\fP\fB);\fP
50 .sp
51 .fi
52 .in -4n
53 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
54 .ad l
55 .in
56 .sp
57 \fBgetnetent_r\fP(), \fBgetnetbyname_r\fP(), \fBgetnetbyaddr_r\fP():
58 .RS 4
59 _BSD_SOURCE || _SVID_SOURCE
60 .RE
61 .ad b
62 .SH 説明
63 関数 \fBgetnetent_r\fP(), \fBgetnetbyname_r\fP(), \fBgetnetbyaddr_r\fP() は、
64 それぞれ \fBgetnetent\fP(3), \fBgetnetbyname\fP(3), \fBgetnetbynumber\fP(3) の
65 リエントラント版である。
66 \fInetent\fP 構造体の返し方と、関数呼び出し時の引き数と返り値が異なる。
67 このマニュアルページでは、リエントラントでない関数との違いだけを
68 説明する。
69
70 これらの関数は、関数の結果として静的に割り当てられた \fInetent\fP 構造体
71 へのポインタを返すのではなく、 \fInetent\fP 構造体を \fIresult_buf\fP が
72 指す場所にコピーする。
73
74 .\" I can find no information on the required/recommended buffer size;
75 .\" the nonreentrant functions use a 1024 byte buffer -- mtk.
76 配列 \fIbuf\fP は、返される \fInetent\fP 構造体が指す文字列フィールドを格納
77 するのに使用される (リエントラントでない関数の場合は、
78 これらの文字列は静的な領域に格納される)。
79 この配列の大きさは \fIbuflen\fP で指定される。
80 \fIbuf\fP が小さすぎる場合、関数呼び出しはエラー \fBERANGE\fP で失敗し、
81 呼び出し側ではもっと大きなバッファで再度呼び出す必要がある (ほとんどの
82 アプリケーションでは、長さ 1024 バイトのバッファで十分なはずである)。
83
84 関数呼び出しでネットワークレコードの取得に成功すると、
85 \fI*result\fP は \fIresult_buf\fP を指すように設定される。
86 それ以外の場合は \fI*result\fP に NULL が設定される。
87
88 .\" getnetent.3 doesn't document any use of h_errno, but nevertheless
89 .\" the nonreentrant functions no seem to set h_errno.
90 \fIh_errnop\fP が指すバッファは、リエントラントでない関数では
91 グローバル変数 \fIh_errno\fP に格納されていた値を返すのに使用される。
92 .SH 返り値
93 成功すると、これらの関数は 0 を返す。エラーの場合、「エラー」の節の
94 リストにある正のエラー番号のいずれかを返す。
95
96 エラーの場合、レコードが見つからなかった場合 (\fBgetnetbyname_r\fP(),
97 \fBgetnetbyaddr_r\fP()) やこれ以上レコードがない場合 (\fBgetnetent_r\fP())、
98 \fIresult\fP には NULL が設定される。
99 .SH エラー
100 .TP 
101 \fBENOENT\fP
102 (\fBgetnetent_r\fP())  データベースにこれ以上レコードがない。
103 .TP 
104 \fBERANGE\fP
105 \fIbuf\fP が小さすぎる。もっと大きなバッファにして
106 (または \fIbuflen\fP を増やして) 再度呼び出すこと。
107 .SH 準拠
108 これらの関数は GNU による拡張である。
109 他のシステムにも同様の名前の関数が存在する場合があるが、
110 通常は関数の引き数が異なる。
111 .SH 関連項目
112 \fBgetnetent\fP(3), \fBnetworks\fP(5)
113 .SH この文書について
114 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.40 の一部
115 である。プロジェクトの説明とバグ報告に関する情報は
116 http://www.kernel.org/doc/man\-pages/ に書かれている。