• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修订版c8cd646b41355f90107c74c55f80ec293fbff17b (tree)
时间2013-05-22 15:00:13
作者Akihiro MOTOKI <motoki@da.j...>
CommiterAkihiro MOTOKI

Log Message

(split) LDP: Translate the following pages

draft/man2/recvmmsg.2
draft/man2/sendmmsg.2
draft/man3/if_nameindex.3
draft/man3/if_nametoindex.3
draft/man7/numa.7

更改概述

差异

--- /dev/null
+++ b/draft/man2/recvmmsg.2
@@ -0,0 +1,197 @@
1+.\" Copyright (C) 2011 by Andi Kleen <andi@firstfloor.org>
2+.\" and Copyright (c) 2011 by Michael Kerrisk <mtk.manpages@gmail.com>
3+.\"
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.
8+.\"
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.
13+.\"
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
20+.\" professionally.
21+.\"
22+.\" Formatted or processed versions of this manual, if unaccompanied by
23+.\" the source, must acknowledge the copyright and authors of this work.
24+.\" %%%LICENSE_END
25+.\"
26+.\" Syscall added in following commit
27+.\" commit a2e2725541fad72416326798c2d7fa4dafb7d337
28+.\" Author: Arnaldo Carvalho de Melo <acme@redhat.com>
29+.\" Date: Mon Oct 12 23:40:10 2009 -0700
30+.\"
31+.\"*******************************************************************
32+.\"
33+.\" This file was generated with po4a. Translate the source file.
34+.\"
35+.\"*******************************************************************
36+.TH RECVMMSG 2 2012\-12\-24 Linux "Linux Programmer's Manual"
37+.SH 名前
38+recvmmsg \- 複数のメッセージをソケットから受信する
39+.SH 書式
40+.nf
41+\fB#define _GNU_SOURCE\fP
42+\fB#include <sys/socket.h>\fP
43+
44+\fBint recvmmsg(int \fP\fIsockfd\fP\fB, struct mmsghdr *\fP\fImsgvec\fP\fB, unsigned int \fP\fIvlen\fP\fB,\fP
45+.br
46+\fB unsigned int \fP\fIflags\fP\fB, struct timespec *\fP\fItimeout\fP\fB);\fP
47+.fi
48+.SH 説明
49+\fBrecvmmsg\fP() システムコールは \fBrecvmsg\fP(2) の拡張で、
50+このシステムコールを使うと一度の呼び出しでソケットから複数のメッセージを受信することができる (アプリケーションによっては性能上のメリットがある)。
51+他に \fBrecvmsg\fP(2) から拡張されている点としては、受信操作におけるタイムアウトのサポートがある。
52+
53+\fIsockfd\fP 引き数は、データを受信するソケットのファイルディスクリプタである。
54+
55+\fImsgvec\fP 引き数は \fImmsghdr\fP 構造体の配列である。 この配列の大きさは \fIvlen\fP で指定する。
56+
57+\fImmsghdr\fP 構造体は \fI<sys/socket.h>\fP で次のように定義されている。
58+
59+.in +4n
60+.nf
61+struct mmsghdr {
62+ struct msghdr msg_hdr; /* メッセージヘッダ */
63+ unsigned int msg_len; /* このヘッダで受信されたバイト数 */
64+};
65+.fi
66+.in
67+.PP
68+\fImsg_hdr\fP フィールドは、 \fBrecvmsg\fP(2) で説明されている \fImsghdr\fP 構造体である。 \fImsg_len\fP
69+フィールドは、 このエントリで返されるメッセージのバイト数で、 このヘッダに対して \fBrecvmsg\fP(2) を呼び出した場合の返り値と同じ値が入る。
70+
71+\fIflags\fP 引き数には複数のフラグを論理和 (OR) で指定できる。 フラグは、 \fBrecvmsg\fP(2)
72+で説明されているものに加えて、以下が使用できる。
73+.TP
74+\fBMSG_WAITFORONE\fP (Linux 2.6.34 以降)
75+最初のメッセージを受信後に \fBMSG_DONTWAIT\fP を有効にする。
76+.PP
77+\fItimeout\fP 引き数は \fIstruct timespec\fP (\fBclock_gettime\fP(2) 参照) へのポインタで、
78+この構造体で受信操作のタイムアウト (秒とナノ秒) を指定する
79+(待ち時間はシステムクロックの粒度に切り上げられ、カーネルのスケジューリング遅延により少しだけ長くなる可能性がある)。 \fItimeout\fPが
80+\fINULL\fP の場合、 受信操作は無期限に停止 (block) する。
81+
82+停止 (blocking) モードの \fBrecvmmsg\fP() の呼び出しは、 \fIvlen\fP
83+個のメッセージを受信するか、タイムアウトが満了するまで停止する。 非停止 (nonblocking) モードの呼び出しでは、 読み出し可能なメッセージ
84+(最大で \fIvlen\fP 個) を読み出し、 すぐに返る。
85+
86+\fBrecvmmsg\fP() が返った際には、 \fImsgvec\fP のうちデータが受信された要素には、受信したそれぞれのメッセージの情報が格納されている。
87+また、 \fImsg_len\fP には受信したメッセージの大きさが入り、 \fImsg_hdr\fP の各フィールドは \fBrecvmsg\fP(2)
88+に書かれている通りに更新される。 呼び出しの返り値は、更新された \fImsgvec\fP の要素数である。
89+.SH 返り値
90+成功すると、 \fBrecvmmsg\fP() は \fImsgvec\fP に受信されたメッセージ数を返す。 エラーの場合、 \-1 を返し、 \fIerrno\fP
91+にエラーを示す値を設定する。
92+.SH エラー
93+エラーは \fBrecvmsg\fP(2) と同じである。 これに加えて、以下のエラーが起こる場合がある。
94+.TP
95+\fBEINVAL\fP
96+\fItimeout\fP が無効である。
97+.SH バージョン
98+\fBrecvmmsg\fP() システムコールは Linux 2.6.33 で追加された。 glibc でのサポートはバージョン 2.12
99+以降で利用可能である。
100+.SH 準拠
101+\fBrecvmmsg\fP() は Linux 固有である。
102+.SH 例
103+.PP
104+以下のプログラムは、 \fBrecvmmsg\fP() を使って複数のメッセージをソケットから受信し、それらを複数のバッファに格納する。
105+呼び出しは、すべてのバッファにメッセージが格納されるか、 指定したタイムアウト時間が経過すると返る。
106+
107+以下のコマンドは、 ランダムな数字が入った UDP データグラムを定期的に生成する。
108+.in +4n
109+.nf
110+
111+$\fB while true; do echo $RANDOM > /dev/udp/127.0.0.1/1234; \fP
112+\fBsleep 0.25; done\fP
113+.fi
114+.in
115+
116+生成されたデータグラムをサンプルアプリケーションが読み出し、以下のような出力が得られる。
117+.in +4n
118+.nf
119+
120+$\fB ./a.out\fP
121+5 messages received
122+1 11782
123+2 11345
124+3 304
125+4 13514
126+5 28421
127+.fi
128+.in
129+.SS プログラムのソース
130+\&
131+.nf
132+#define _GNU_SOURCE
133+#include <netinet/ip.h>
134+#include <stdio.h>
135+#include <stdlib.h>
136+#include <string.h>
137+#include <sys/socket.h>
138+
139+int
140+main(void)
141+{
142+#define VLEN 10
143+#define BUFSIZE 200
144+#define TIMEOUT 1
145+ int sockfd, retval, i;
146+ struct sockaddr_in sa;
147+ struct mmsghdr msgs[VLEN];
148+ struct iovec iovecs[VLEN];
149+ char bufs[VLEN][BUFSIZE+1];
150+ struct timespec timeout;
151+
152+ sockfd = socket(AF_INET, SOCK_DGRAM, 0);
153+ if (sockfd == \-1) {
154+ perror("socket()");
155+ exit(EXIT_FAILURE);
156+ }
157+
158+ sa.sin_family = AF_INET;
159+ sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
160+ sa.sin_port = htons(1234);
161+ if (bind(sockfd, (struct sockaddr *) &sa, sizeof(sa)) == \-1) {
162+ perror("bind()");
163+ exit(EXIT_FAILURE);
164+ }
165+
166+ memset(msgs, 0, sizeof(msgs));
167+ for (i = 0; i < VLEN; i++) {
168+ iovecs[i].iov_base = bufs[i];
169+ iovecs[i].iov_len = BUFSIZE;
170+ msgs[i].msg_hdr.msg_iov = &iovecs[i];
171+ msgs[i].msg_hdr.msg_iovlen = 1;
172+ }
173+
174+ timeout.tv_sec = TIMEOUT;
175+ timeout.tv_nsec = 0;
176+
177+ retval = recvmmsg(sockfd, msgs, VLEN, 0, &timeout);
178+ if (retval == \-1) {
179+ perror("recvmmsg()");
180+ exit(EXIT_FAILURE);
181+ }
182+
183+ printf("%d messages received\en", retval);
184+ for (i = 0; i < retval; i++) {
185+ bufs[i][msgs[i].msg_len] = 0;
186+ printf("%d %s", i+1, bufs[i]);
187+ }
188+ exit(EXIT_SUCCESS);
189+}
190+.fi
191+.SH 関連項目
192+\fBclock_gettime\fP(2), \fBrecvmsg\fP(2), \fBsendmmsg\fP(2), \fBsendmsg\fP(2),
193+\fBsocket\fP(2), \fBsocket\fP(7)
194+.SH この文書について
195+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部
196+である。プロジェクトの説明とバグ報告に関する情報は
197+http://www.kernel.org/doc/man\-pages/ に書かれている。
--- /dev/null
+++ b/draft/man2/sendmmsg.2
@@ -0,0 +1,172 @@
1+.\" Copyright (c) 2012 by Michael Kerrisk <mtk.manpages@gmail.com>
2+.\" with some material from a draft by
3+.\" Stephan Mueller <stephan.mueller@atsec.com>
4+.\" in turn based on Andi Kleen's recvmmsg.2 page.
5+.\"
6+.\" %%%LICENSE_START(VERBATIM)
7+.\" Permission is granted to make and distribute verbatim copies of this
8+.\" manual provided the copyright notice and this permission notice are
9+.\" preserved on all copies.
10+.\"
11+.\" Permission is granted to copy and distribute modified versions of this
12+.\" manual under the conditions for verbatim copying, provided that the
13+.\" entire resulting derived work is distributed under the terms of a
14+.\" permission notice identical to this one.
15+.\"
16+.\" Since the Linux kernel and libraries are constantly changing, this
17+.\" manual page may be incorrect or out-of-date. The author(s) assume no
18+.\" responsibility for errors or omissions, or for damages resulting from
19+.\" the use of the information contained herein. The author(s) may not
20+.\" have taken the same level of care in the production of this manual,
21+.\" which is licensed free of charge, as they might when working
22+.\" professionally.
23+.\"
24+.\" Formatted or processed versions of this manual, if unaccompanied by
25+.\" the source, must acknowledge the copyright and authors of this work.
26+.\" %%%LICENSE_END
27+.\"
28+.\"*******************************************************************
29+.\"
30+.\" This file was generated with po4a. Translate the source file.
31+.\"
32+.\"*******************************************************************
33+.TH SENDMMSG 2 2012\-12\-16 Linux "Linux Programmer's Manual"
34+.SH 名前
35+sendmmsg \- 複数のメッセージをソケットへ送信する
36+.SH 書式
37+.nf
38+\fB#define _GNU_SOURCE\fP
39+\fB#include <sys/socket.h>\fP
40+
41+\fBint sendmmsg(int \fP\fIsockfd\fP\fB, struct mmsghdr *\fP\fImsgvec\fP\fB, unsigned int \fP\fIvlen\fP\fB,\fP
42+\fB unsigned int \fP\fIflags\fP\fB);\fP
43+.fi
44+.SH 説明
45+.\" See commit 228e548e602061b08ee8e8966f567c12aa079682
46+\fBsendmmsg\fP() システムコールは \fBsendmsg\fP(2) の拡張で、
47+このシステムコールを使うと一度の呼び出しでソケットに複数のメッセージを送信できる (アプリケーションによっては性能上のメリットがある)。
48+
49+\fIsockfd\fP 引き数は、 データを送信するソケットのファイルディスクリプタである。
50+
51+\fImsgvec\fP 引き数は \fImmsghdr\fP 構造体の配列である。 この配列の大きさは \fIvlen\fP で指定する。
52+
53+\fImmsghdr\fP 構造体は \fI<sys/socket.h>\fP で次のように定義されている。
54+
55+.in +4n
56+.nf
57+struct mmsghdr {
58+ struct msghdr msg_hdr; /* メッセージヘッダ */
59+ unsigned int msg_len; /* 送信されたバイト数 */
60+};
61+.fi
62+.in
63+.PP
64+\fImsg_hdr\fP フィールドは、 \fBsendmsg\fP(2) で説明されている \fImsghdr\fP 構造体である。 \fImsg_len\fP
65+フィールドは \fImsg_hdr\fP から送信されたメッセージのバイト数を返すのに使用される。 この値は \fBsendmsg\fP(2)
66+をこのヘッダに対して呼び出した場合の返り値と同じである。
67+
68+\fIflags\fP 引き数には複数のフラグを論理和 (OR) で指定できる。フラグは \fBsendmsg\fP(2) と同じである。
69+
70+停止 (blocking) モードの \fBsendmmsg\fP() の呼び出しは、 \fIvlen\fP 個のメッセージが送信されるまで停止する。 非停止
71+(nonblocking) モードの呼び出しでは、 送信できるだけのメッセージ (最大で \fIvlen\fP 個) を送信し、 すぐに返る。
72+
73+\fBsendmmsg\fP() が返った際には、 \fImsgvec\fP の送信が行われた要素の \fImsg_len\fP フィールドは、対応する
74+\fImsg_hdr\fP から送信されたバイト数が入っている。 呼び出しの返り値は、更新された \fImsgvec\fP の要素数である。
75+.SH 返り値
76+成功すると、 \fBsendmmsg\fP() は \fImsgvec\fP から送信されたメッセージ数を返す。 返り値が \fIvlen\fP よりも小さい場合、
77+呼び出した側では再度 \fBsendmmsg\fP を呼び出して残りのメッセージを送信することができる。
78+
79+エラーの場合、 \-1 を返し、 \fIerrno\fP にエラーを示す値を設定する。
80+.SH エラー
81+.\" commit 728ffb86f10873aaf4abd26dde691ee40ae731fe
82+.\" ... only return an error if no datagrams could be sent.
83+.\" If less than the requested number of messages were sent, the application
84+.\" must retry starting at the first failed one and if the problem is
85+.\" persistent the error will be returned.
86+.\"
87+.\" This matches the behaviour of other syscalls like read/write - it
88+.\" is not an error if less than the requested number of elements are sent.
89+エラーは \fBsendmsg\fP(2) と同じである。 エラーが返されるのは、 データグラムが全く送信できなかった場合のみである。
90+.SH バージョン
91+\fBsendmmsg\fP() システムコールは Linux 3.0 で追加された。 glibc でのサポートはバージョン 2.14 で追加された。
92+.SH 準拠
93+\fBsendmmsg\fP() は Linux 固有である。
94+.SH 注意
95+.\" commit 98382f419f32d2c12d021943b87dea555677144b
96+.\" net: Cap number of elements for sendmmsg
97+.\"
98+.\" To limit the amount of time we can spend in sendmmsg, cap the
99+.\" number of elements to UIO_MAXIOV (currently 1024).
100+.\"
101+.\" For error handling an application using sendmmsg needs to retry at
102+.\" the first unsent message, so capping is simpler and requires less
103+.\" application logic than returning EINVAL.
104+\fIvlen\fP に指定できる値の最大値は \fBUIO_MAXIOV\fP (1024) である。
105+.SH 例
106+以下の例では、 \fBsendmmsg\fP() を使って、 一度のシステムコールで、 \fIonetwo\fP と \fIthree\fP を二つの別々の UDP
107+データグラムで送信する。 一つ目のデータグラムの内容は、二つのバッファから取得される。
108+
109+.nf
110+#define _GNU_SOURCE
111+#include <netinet/ip.h>
112+#include <stdio.h>
113+#include <stdlib.h>
114+#include <string.h>
115+#include <sys/types.h>
116+#include <sys/socket.h>
117+
118+int
119+main(void)
120+{
121+ int sockfd;
122+ struct sockaddr_in sa;
123+ struct mmsghdr msg[2];
124+ struct iovec msg1[2], msg2;
125+ int retval;
126+
127+ sockfd = socket(AF_INET, SOCK_DGRAM, 0);
128+ if (sockfd == \-1) {
129+ perror("socket()");
130+ exit(EXIT_FAILURE);
131+ }
132+
133+ sa.sin_family = AF_INET;
134+ sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
135+ sa.sin_port = htons(1234);
136+ if (connect(sockfd, (struct sockaddr *) &sa, sizeof(sa)) == \-1) {
137+ perror("connect()");
138+ exit(EXIT_FAILURE);
139+ }
140+
141+ memset(msg1, 0, sizeof(msg1));
142+ msg1[0].iov_base = "one";
143+ msg1[0].iov_len = 3;
144+ msg1[1].iov_base = "two";
145+ msg1[1].iov_len = 3;
146+
147+ memset(&msg2, 0, sizeof(msg2));
148+ msg2.iov_base = "three";
149+ msg2.iov_len = 5;
150+
151+ memset(msg, 0, sizeof(msg));
152+ msg[0].msg_hdr.msg_iov = msg1;
153+ msg[0].msg_hdr.msg_iovlen = 2;
154+
155+ msg[1].msg_hdr.msg_iov = &msg2;
156+ msg[1].msg_hdr.msg_iovlen = 1;
157+
158+ retval = sendmmsg(sockfd, msg, 2, 0);
159+ if (retval == \-1)
160+ perror("sendmmsg()");
161+ else
162+ printf("%d messages sent\en", retval);
163+
164+ exit(0);
165+}
166+.fi
167+.SH 関連項目
168+\fBrecvmmsg\fP(2), \fBsendmsg\fP(2), \fBsocket\fP(2), \fBsocket\fP(7)
169+.SH この文書について
170+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部
171+である。プロジェクトの説明とバグ報告に関する情報は
172+http://www.kernel.org/doc/man\-pages/ に書かれている。
--- /dev/null
+++ b/draft/man3/if_nameindex.3
@@ -0,0 +1,120 @@
1+.\" Copyright (c) 2012 YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2+.\" and Copyright (c) 2012 Michael Kerrisk <mtk.manpages@gmail.com>
3+.\"
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.
8+.\"
9+.\" Permission is granted to copy and distribute modified versions of
10+.\" this manual under the conditions for verbatim copying, provided that
11+.\" the entire resulting derived work is distributed under the terms of
12+.\" a permission notice identical to this one.
13+.\"
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
16+.\" no responsibility for errors or omissions, or for damages resulting
17+.\" from the use of the information contained herein. The author(s) may
18+.\" not have taken the same level of care in the production of this
19+.\" manual, which is licensed free of charge, as they might when working
20+.\" professionally.
21+.\"
22+.\" Formatted or processed versions of this manual, if unaccompanied by
23+.\" the source, must acknowledge the copyright and authors of this work.
24+.\" %%%LICENSE_END
25+.\"
26+.\"*******************************************************************
27+.\"
28+.\" This file was generated with po4a. Translate the source file.
29+.\"
30+.\"*******************************************************************
31+.TH IF_NAMEINDEX 3 2012\-11\-21 GNU "Linux Programmer's Manual"
32+.SH 名前
33+if_nameindex, if_freenameindex \- ネットワークインターフェースの名前とインデックスを取得する
34+.SH 書式
35+.nf
36+\fB#include <net/if.h>\fP
37+.sp
38+\fBstruct if_nameindex *if_nameindex(void);\fP
39+\fBvoid if_freenameindex(struct if_nameindex *\fP\fIptr\fP\fB);\fP
40+.fi
41+.SH 説明
42+\fBif_nameindex\fP() 関数は \fIif_nameindex\fP 構造体の配列を返す。
43+各構造体にはローカルシステムのネットワークインターフェースのいずれかの情報が入る。 \fIif_nameindex\fP
44+構造体には少なくとも以下のフィールドがある。
45+.sp
46+.in +4n
47+.nf
48+ unsigned int if_index; /* インターフェースのインデックス (1, 2, ...) */
49+ char *if_name; /* NULL 終端された名前 ("eth0" など) */
50+.fi
51+.in
52+.PP
53+\fIif_index\fP フィールドにはインターフェースのインデックスが入る。 \fIifa_name\fP フィールドは NULL
54+終端されたインターフェース名を指す。 配列の最後は、 \fIif_index\fP が 0 で \fIifa_name\fP が NULL のエントリで示される。
55+.PP
56+\fBif_nameindex\fP() が返すデータ構造体は動的に確保される。 必要なくなった際には \fBif_freenameindex\fP()
57+で解放すべきである。
58+.SH 返り値
59+成功した場合には \fBif_nameindex\fP() は配列へのポインタを返す。エラー時には NULL ポインタが返され、 \fIerrno\fP
60+が適切に設定される。
61+.SH エラー
62+\fBif_nameindex\fP() が失敗した場合には以下の \fIerrno\fP が設定される。
63+.TP
64+\fBENOBUFS\fP
65+利用可能なリソースが十分にない。
66+.PP
67+\fBif_nameindex\fP() は、 \fBsocket\fP(2), \fBbind\fP(2), \fBioctl\fP(2),
68+\fBgetsockname\fP(2), \fBrecvmsg\fP(2), \fBsendto\fP(2), \fBmalloc\fP(3)
69+に対して規定されているエラーのいずれかで失敗する場合がある。
70+.SH バージョン
71+\fBif_nameindex\fP() 関数は glibc 2.1 で初めて登場したが、 glibc 2.3.4 より前のバージョンの実装では IPv4
72+アドレスを持つインターフェースのみをサポートしていた。 IPv4 アドレスを持たないインターフェースがサポートされているのは、 netlink
73+をサポートするカーネルにおいてのみである。
74+.SH 準拠
75+RFC\ 3493, POSIX.1\-2001.
76+
77+この関数は BSDi 初めて登場した。
78+.SH 例
79+以下のプログラムはこのページで説明した関数の使い方を示している。このプログラムが生成する出力は以下のようになる。
80+.in +4n
81+.nf
82+$ \fB./a.out\fP\fI
83+1: lo
84+2: wlan0
85+3: em1\fP
86+.fi
87+.in
88+.SS プログラムのソース
89+.nf
90+#include <net/if.h>
91+#include <stdio.h>
92+#include <stdlib.h>
93+#include <unistd.h>
94+
95+int
96+main(int argc, char *argv[])
97+{
98+ struct if_nameindex *if_ni, *i;
99+
100+ if_ni = if_nameindex();
101+ if (if_ni == NULL) {
102+ perror("if_nameindex");
103+ exit(EXIT_FAILURE);
104+ }
105+
106+ for (i = if_ni; ! (i\->if_index == 0 && i\->if_name == NULL); i++)
107+ printf("%u: %s\en", i\->if_index, i\->if_name);
108+
109+ if_freenameindex(if_ni);
110+
111+ exit(EXIT_SUCCESS);
112+}
113+.fi
114+.SH 関連項目
115+\fBgetsockopt\fP(2), \fBsetsockopt\fP(2), \fBgetifaddrs\fP(3), \fBif_indextoname\fP(3),
116+\fBif_nametoindex\fP(3), \fBifconfig\fP(8)
117+.SH この文書について
118+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部
119+である。プロジェクトの説明とバグ報告に関する情報は
120+http://www.kernel.org/doc/man\-pages/ に書かれている。
--- /dev/null
+++ b/draft/man3/if_nametoindex.3
@@ -0,0 +1,70 @@
1+.\" Copyright (c) 2012 YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2+.\"
3+.\" %%%LICENSE_START(VERBATIM)
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
9+.\" this manual under the conditions for verbatim copying, provided that
10+.\" the entire resulting derived work is distributed under the terms of
11+.\" a 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
15+.\" no responsibility for errors or omissions, or for damages resulting
16+.\" from the use of the information contained herein. The author(s) may
17+.\" not have taken the same level of care in the production of this
18+.\" manual, 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+.\" %%%LICENSE_END
24+.\"
25+.\"*******************************************************************
26+.\"
27+.\" This file was generated with po4a. Translate the source file.
28+.\"
29+.\"*******************************************************************
30+.TH IF_NAMETOINDEX 3 2012\-12\-14 GNU "Linux Programmer's Manual"
31+.SH 名前
32+if_nametoindex, if_indextoname \- ネットワークインターフェースの名前とインデックスのマッピングを行う
33+.SH 書式
34+.nf
35+\fB#include <net/if.h>\fP
36+.sp
37+\fBunsigned int if_nametoindex(const char *\fP\fIifname\fP\fB);\fP
38+.sp
39+\fBchar *if_indextoname(unsigned int ifindex, char *\fP\fIifname\fP\fB);\fP
40+.fi
41+.SH 説明
42+\fBif_nametoindex\fP() 関数は、 名前が \fIifname\fP のネットワークインターフェースのインデックスを返す。
43+
44+\fBif_indextoname\fP() 関数は、 インターフェースのインデックスが \fIifindex\fP
45+に対応するネットワークインターフェースの名前を返す。 名前は \fIifname\fP が指すバッファに格納される。 バッファは少なくとも
46+\fBIF_NAMESIZE\fP バイトの領域が必要である。
47+.SH 返り値
48+成功した場合、 \fBif_nametoindex\fP() はネットワークインターフェースのインデックス番号を返す。エラーの場合、 0 を返し、
49+\fIerrno\fP を適切に設定にする。
50+
51+成功した場合には \fBif_indextoname\fP() は \fIifname\fP を返す。エラー時には NULL が返され、 \fIerrno\fP
52+が適切に設定される。
53+.SH エラー
54+\fBif_indextoname\fP() は以下の \fIerrno\fP で失敗する場合がある。
55+.TP
56+\fBENXIO\fP
57+インデックスに対応するインターフェースがない。
58+.PP
59+\fBif_nametoindex\fP() と \fBif_indextoname\fP() は、 \fBsocket\fP(2) と \fBioctl\fP(2)
60+に対して規定されているエラーのいずれかで失敗する場合がある。
61+.SH 準拠
62+RFC\ 3493, POSIX.1\-2001.
63+
64+この関数は BSDi 初めて登場した。
65+.SH 関連項目
66+\fBgetifaddrs\fP(3), \fBif_nameindex\fP(3), \fBifconfig\fP(8)
67+.SH この文書について
68+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部
69+である。プロジェクトの説明とバグ報告に関する情報は
70+http://www.kernel.org/doc/man\-pages/ に書かれている。
--- /dev/null
+++ b/draft/man7/numa.7
@@ -0,0 +1,146 @@
1+.\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk
2+.\" <mtk.manpages@gmail.com>
3+.\" and Copyright 2003,2004 Andi Kleen, SuSE Labs.
4+.\" numa_maps material Copyright (c) 2005 Silicon Graphics Incorporated.
5+.\" Christoph Lameter, <cl@linux-foundation.org>.
6+.\"
7+.\" %%%LICENSE_START(VERBATIM)
8+.\" Permission is granted to make and distribute verbatim copies of this
9+.\" manual provided the copyright notice and this permission notice are
10+.\" preserved on all copies.
11+.\"
12+.\" Permission is granted to copy and distribute modified versions of this
13+.\" manual under the conditions for verbatim copying, provided that the
14+.\" entire resulting derived work is distributed under the terms of a
15+.\" permission notice identical to this one.
16+.\"
17+.\" Since the Linux kernel and libraries are constantly changing, this
18+.\" manual page may be incorrect or out-of-date. The author(s) assume no
19+.\" responsibility for errors or omissions, or for damages resulting from
20+.\" the use of the information contained herein. The author(s) may not
21+.\" have taken the same level of care in the production of this manual,
22+.\" which is licensed free of charge, as they might when working
23+.\" professionally.
24+.\"
25+.\" Formatted or processed versions of this manual, if unaccompanied by
26+.\" the source, must acknowledge the copyright and authors of this work.
27+.\" %%%LICENSE_END
28+.\"
29+.\"*******************************************************************
30+.\"
31+.\" This file was generated with po4a. Translate the source file.
32+.\"
33+.\"*******************************************************************
34+.TH NUMA 7 2012\-08\-05 Linux "Linux Programmer's Manual"
35+.SH 名前
36+numa \- 非対称型メモリアーキテクチャの概要
37+.SH 説明
38+非対称型メモリアクセス (Non\-Uniform Memory Access; NUMA) は、
39+メモリが複数のメモリノードに分割されているマルチプロセッサシステム
40+のことである。メモリノードへのアクセス時間は、アクセス元の CPU と
41+アクセス先のノードの相対的な位置関係に依存する
42+(これに対し、対称型マルチプロセッサシステムでは、どの CPU から
43+どのメモリへのアクセス時間も同じである)。
44+通常は、 NUMA システムの各 CPU にはローカルのメモリノードがあり、
45+そのメモリノードには、他の CPU のローカルノードや全ての CPU で
46+共有されるバス上のメモリよりも早くアクセスすることができる。
47+.SS "NUMA システムコール"
48+Linux カーネルには、次に示す NUMA 関連のシステムコールが実装されている:
49+\fBget_mempolicy\fP(2), \fBmbind\fP(2), \fBmigrate_pages\fP(2),
50+\fBmove_pages\fP(2), \fBset_mempolicy\fP(2).
51+ただし、アプリケーションは通常は \fIlibnuma\fP が提供するインターフェース
52+を使用すべきである。下記の「ライブラリによるサポート」を参照。
53+.SS "/proc/[number]/numa_maps (Linux 2.6.14 以降)"
54+.\" See also Changelog-2.6.14
55+このファイルは、プロセスの NUMA メモリポリシーと割り当てに関する
56+情報を表示する。
57+
58+各行に、そのプロセスが使用しているメモリ領域に関する情報が表示される。その他の情報 \(em
59+そのメモリ領域に適用されているメモリポリシーや、そのページがどのノード上に割り当てられているか、など \(em もあわせて表示される。
60+
61+\fInuma_maps\fP は読み出し専用のファイルである。 \fI/proc/<pid>/numa_maps\fP から読み出しが行われると、
62+カーネルはそのプロセスの仮想アドレス空間をスキャンし、 メモリの使用状況を報告する。
63+プロセスのメモリ領域の情報が 1 行に 1 領域で表示される。
64+
65+各行の最初のフィールドはメモリ領域の開始アドレスを示す。 このフィールドは \fI/proc/<pid>/maps\fP
66+ファイルの内容と対応している。 \fI/proc/<pid>/maps\fP
67+には、メモリ領域の末尾のアドレスや、アクセス許可や共有といった他の情報も含まれる。
68+
69+2 番目のフィールドは、 そのメモリ領域に現在適用されているメモリポリシーを示す。 適用されているポリシーは、
70+必ずしもそのプロセスがこのメモリ領域に対して設定したポリシーとは限らない点に注意すること。
71+特に、
72+プロセスがその領域に対して「デフォルト」ポリシーを設定した場合、その領域に適用されるポリシーはプロセスのポリシーとなり、それが「デフォルト」ポリシーとなる場合もあればそうでない場合もある。
73+
74+行の残りの部分には、そのメモリ領域に割り当てられたページに関する情報が入る。以下に詳細を示す。
75+.TP
76+\fIN<node>=<nr_pages>\fP
77+\fI<node>\fP に割り当てられているページ数。 \fI<nr_pages>\fP には、
78+そのプロセスが現在マッピングしているページだけが含まれる。 ページの移動やメモリの再利用により、 このメモリ領域に関連付けられているが、
79+一時的にマッピングされていないページが存在する場合がある。 プロセスがそれらのページを参照しようとした後には、 これらのページは再び現れる可能性がある。
80+メモリ領域が共有メモリやファイルマッピングの場合には、 そのメモリ領域内に別のページを他のプロセスがマッピングしている場合もある。
81+.TP
82+\fIfile=<filename>\fP
83+そのメモリ領域に関連付けられているファイル。 ファイルがプライベート (非公開) でマッピングされている場合、 書き込みアクセスがあると、
84+このメモリ領域に書き込み時コピー (Copy\-On\-Write) ページが生成されることがある。 これらのページは無名ページ (anonymous
85+page) として表示される。
86+.TP
87+\fIheap\fP
88+ヒープに使用されているメモリ範囲。
89+.TP
90+\fIstack\fP
91+スタックに使用されているメモリ範囲。
92+.TP
93+\fIhuge\fP
94+ヒュージメモリの範囲。表示されるページ数は、
95+通常の大きさのページではなく、ヒュージページの数である。
96+.TP
97+\fIanon=<pages>\fP
98+メモリ範囲内の無名ページ (anonymous page) の数。
99+.TP
100+\fIdirty=<pages>\fP
101+dirty (変更された) ページの数。
102+.TP
103+\fImapped=<pages>\fP
104+マッピングされているページ数。 \fIdirty\fP および \fIanon\fP のページ数と異なる値の場合に表示される。
105+.TP
106+\fImapmax=<count>\fP
107+スキャン中に検出した mapcount (一つのページをマッピングしているプロセス数) の最大値。 この値は、
108+そのメモリ領域でどの程度の共有が行われているかの指標として使うことができる。
109+.TP
110+\fIswapcache=<count>\fP
111+スワップデバイスに対応するエントリーが存在するページ数。
112+.TP
113+\fIactive=<pages>\fP
114+アクティブリストに入っているページ数。 このフィールドが表示されるのは、
115+値がこのメモリ領域のページ数と異なる場合だけである。このフィールドが表示されるということは、 このメモリ領域に、まもなくスワッパ (swapper)
116+によりこの領域から削除される可能性がある inactive なページが存在することを意味する。
117+.TP
118+\fIwriteback=<pages>\fP
119+現在ディスクに書き出されているページ数。
120+.SH 準拠
121+NUMA インターフェースについて規定している標準はない。
122+.SH 注意
123+Linux の NUMA システムコールと \fI/proc\fP インターフェースは、カーネルが
124+設定オプション \fBCONFIG_NUMA\fP を有効にして作成されている場合のみ、利用
125+可能である。
126+.SS ライブラリによるサポート
127+システムコールの定義を得るには \fI\-lnuma\fP でリンクすること。
128+\fIlibnuma\fP と必要なヘッダファイル \fI<numaif.h>\fP は
129+\fInumactl\fP パッケージで提供されている。
130+
131+ただし、アプリケーションはこれらのシステムコールを直接利用すべきでない。
132+推奨される方法は、\fInumactl\fP パッケージの \fBnuma\fP(3) の関数群が提供する
133+高レベルインターフェースの利用である。 \fInumactl\fP パッケージは
134+.UR ftp://oss.sgi.com\:/www\:/projects\:/libnuma\:/download/
135+.UE
136+で入手できる。
137+このパッケージが収録されている Linux ディストリビューションもある。
138+ディストリビューションによっては、開発用のライブラリとヘッダファイルは
139+別パッケージ \fInumactl\-devel\fP で提供されている。
140+.SH 関連項目
141+\fBget_mempolicy\fP(2), \fBmbind\fP(2), \fBmove_pages\fP(2), \fBset_mempolicy\fP(2),
142+\fBnuma\fP(3), \fBcpuset\fP(7), \fBnumactl\fP(8)
143+.SH この文書について
144+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部
145+である。プロジェクトの説明とバグ報告に関する情報は
146+http://www.kernel.org/doc/man\-pages/ に書かれている。
--- a/po4a/numa/po/ja.po
+++ b/po4a/numa/po/ja.po
@@ -7,7 +7,7 @@ msgid ""
77 msgstr ""
88 "Project-Id-Version: PACKAGE VERSION\n"
99 "POT-Creation-Date: 2013-04-30 20:29+0900\n"
10-"PO-Revision-Date: 2013-05-02 23:12+0900\n"
10+"PO-Revision-Date: 2013-05-17 00:09+0900\n"
1111 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1212 "Language-Team: LANGUAGE <LL@li.org>\n"
1313 "Language: \n"
@@ -1705,7 +1705,7 @@ msgid ""
17051705 "Each line contains information about a memory range used by the process, "
17061706 "displaying\\(emamong other information\\(emthe effective memory policy for "
17071707 "that memory range and on which nodes the pages have been allocated."
1708-msgstr ""
1708+msgstr "各行に、そのプロセスが使用しているメモリ領域に関する情報が表示される。その他の情報 \\(em そのメモリ領域に適用されているメモリポリシーや、そのページがどのノード上に割り当てられているか、など \\(em もあわせて表示される。"
17091709
17101710 #. type: Plain text
17111711 #: build/C/man7/numa.7:70
@@ -1715,6 +1715,8 @@ msgid ""
17151715 "report how memory is used. One line is displayed for each unique memory "
17161716 "range of the process."
17171717 msgstr ""
1718+"I<numa_maps> は読み出し専用のファイルである。 I</proc/E<lt>pidE<gt>/numa_maps> から読み出しが行われると、 カーネルはそのプロセスの仮想アドレス空間をスキャンし、 メモリの使用状況を報告する。\n"
1719+"プロセスのメモリ領域の情報が 1 行に 1 領域で表示される。"
17181720
17191721 #. type: Plain text
17201722 #: build/C/man7/numa.7:77
@@ -1723,7 +1725,7 @@ msgid ""
17231725 "range. This field allows a correlation with the contents of the I</proc/"
17241726 "E<lt>pidE<gt>/maps> file, which contains the end address of the range and "
17251727 "other information, such as the access permissions and sharing."
1726-msgstr ""
1728+msgstr "各行の最初のフィールドはメモリ領域の開始アドレスを示す。 このフィールドは I</proc/E<lt>pidE<gt>/maps> ファイルの内容と対応している。 I</proc/E<lt>pidE<gt>/maps> には、メモリ領域の末尾のアドレスや、アクセス許可や共有といった他の情報も含まれる。"
17271729
17281730 #. type: Plain text
17291731 #: build/C/man7/numa.7:85
@@ -1735,13 +1737,15 @@ msgid ""
17351737 "for that range will be the process policy, which may or may not be \"default"
17361738 "\"."
17371739 msgstr ""
1740+"2 番目のフィールドは、 そのメモリ領域に現在適用されているメモリポリシーを示す。 適用されているポリシーは、 必ずしもそのプロセスがこのメモリ領域に対して設定したポリシーとは限らない点に注意すること。\n"
1741+"特に、 プロセスがその領域に対して「デフォルト」ポリシーを設定した場合、その領域に適用されるポリシーはプロセスのポリシーとなり、それが「デフォルト」ポリシーとなる場合もあればそうでない場合もある。"
17381742
17391743 #. type: Plain text
17401744 #: build/C/man7/numa.7:88
17411745 msgid ""
17421746 "The rest of the line contains information about the pages allocated in the "
17431747 "memory range, as follows:"
1744-msgstr ""
1748+msgstr "行の残りの部分には、そのメモリ領域に割り当てられたページに関する情報が入る。以下に詳細を示す。"
17451749
17461750 #. type: TP
17471751 #: build/C/man7/numa.7:88
@@ -1759,7 +1763,7 @@ msgid ""
17591763 "attempted to reference them. If the memory range represents a shared memory "
17601764 "area or file mapping, other processes may currently have additional pages "
17611765 "mapped in a corresponding memory range."
1762-msgstr ""
1766+msgstr "I<E<lt>nodeE<gt>> に割り当てられているページ数。 I<E<lt>nr_pagesE<gt>> には、 そのプロセスが現在マッピングしているページだけが含まれる。 ページの移動やメモリの再利用により、 このメモリ領域に関連付けられているが、 一時的にマッピングされていないページが存在する場合がある。 プロセスがそれらのページを参照しようとした後には、 これらのページは再び現れる可能性がある。 メモリ領域が共有メモリやファイルマッピングの場合には、 そのメモリ領域内に別のページを他のプロセスがマッピングしている場合もある。"
17631767
17641768 #. type: TP
17651769 #: build/C/man7/numa.7:101
@@ -1773,7 +1777,7 @@ msgid ""
17731777 "The file backing the memory range. If the file is mapped as private, write "
17741778 "accesses may have generated COW (Copy-On-Write) pages in this memory range. "
17751779 "These pages are displayed as anonymous pages."
1776-msgstr ""
1780+msgstr "そのメモリ領域に関連付けられているファイル。 ファイルがプライベート (非公開) でマッピングされている場合、 書き込みアクセスがあると、 このメモリ領域に書き込み時コピー (Copy-On-Write) ページが生成されることがある。 これらのページは無名ページ (anonymous page) として表示される。"
17771781
17781782 #. type: TP
17791783 #: build/C/man7/numa.7:107
@@ -1844,7 +1848,7 @@ msgstr "I<mapped=E<lt>pagesE<gt>>"
18441848 #: build/C/man7/numa.7:130
18451849 msgid ""
18461850 "Total number of mapped pages, if different from I<dirty> and I<anon> pages."
1847-msgstr ""
1851+msgstr "マッピングされているページ数。 I<dirty> および I<anon> のページ数と異なる値の場合に表示される。"
18481852
18491853 #. type: TP
18501854 #: build/C/man7/numa.7:130
@@ -1858,7 +1862,7 @@ msgid ""
18581862 "Maximum mapcount (number of processes mapping a single page) encountered "
18591863 "during the scan. This may be used as an indicator of the degree of sharing "
18601864 "occurring in a given memory range."
1861-msgstr ""
1865+msgstr "スキャン中に検出した mapcount (一つのページをマッピングしているプロセス数) の最大値。 この値は、 そのメモリ領域でどの程度の共有が行われているかの指標として使うことができる。"
18621866
18631867 #. type: TP
18641868 #: build/C/man7/numa.7:136
@@ -1869,7 +1873,7 @@ msgstr "I<swapcache=E<lt>countE<gt>>"
18691873 #. type: Plain text
18701874 #: build/C/man7/numa.7:139
18711875 msgid "Number of pages that have an associated entry on a swap device."
1872-msgstr ""
1876+msgstr "スワップデバイスに対応するエントリーが存在するページ数。"
18731877
18741878 #. type: TP
18751879 #: build/C/man7/numa.7:139
@@ -1884,7 +1888,7 @@ msgid ""
18841888 "different from the number of pages in this range. This means that some "
18851889 "inactive pages exist in the memory range that may be removed from memory by "
18861890 "the swapper soon."
1887-msgstr ""
1891+msgstr "アクティブリストに入っているページ数。 このフィールドが表示されるのは、 値がこのメモリ領域のページ数と異なる場合だけである。このフィールドが表示されるということは、 このメモリ領域に、まもなくスワッパ (swapper) によりこの領域から削除される可能性がある inactive なページが存在することを意味する。"
18881892
18891893 #. type: TP
18901894 #: build/C/man7/numa.7:145
@@ -1895,7 +1899,7 @@ msgstr "I<writeback=E<lt>pagesE<gt>>"
18951899 #. type: Plain text
18961900 #: build/C/man7/numa.7:148
18971901 msgid "Number of pages that are currently being written out to disk."
1898-msgstr ""
1902+msgstr "現在ディスクに書き出されているページ数。"
18991903
19001904 #. type: Plain text
19011905 #: build/C/man7/numa.7:150
@@ -2247,24 +2251,3 @@ msgid ""
22472251 msgstr ""
22482252 "B<get_mempolicy>(2), B<getcpu>(2), B<mbind>(2), B<mmap>(2), B<numa>(3), "
22492253 "B<cpuset>(7), B<numa>(7), B<numactl>(8)"
2250-
2251-#~ msgid "2012-07-13"
2252-#~ msgstr "2012-07-13"
2253-
2254-#~ msgid "2010-11-01"
2255-#~ msgstr "2010-11-01"
2256-
2257-#~ msgid ""
2258-#~ "B<get_mempolicy>(2), B<mbind>(2), B<set_mempolicy>(2), B<numa>(3), "
2259-#~ "B<numa_maps>(5), B<cpuset>(7), B<numa>(7), B<migratepages>(8), "
2260-#~ "B<numa_stat>(8);"
2261-#~ msgstr ""
2262-#~ "B<get_mempolicy>(2), B<mbind>(2), B<set_mempolicy>(2), B<numa>(3), "
2263-#~ "B<numa_maps>(5), B<cpuset>(7), B<numa>(7), B<migratepages>(8), "
2264-#~ "B<numa_stat>(8);"
2265-
2266-#~ msgid "the kernel source file I<Documentation/vm/page_migration>."
2267-#~ msgstr "カーネルのソースファイル I<Documentation/vm/page_migration>。"
2268-
2269-#~ msgid "2008-06-03"
2270-#~ msgstr "2008-06-03"
--- a/po4a/socket/po/ja.po
+++ b/po4a/socket/po/ja.po
@@ -7,7 +7,7 @@ msgid ""
77 msgstr ""
88 "Project-Id-Version: PACKAGE VERSION\n"
99 "POT-Creation-Date: 2013-04-30 20:30+0900\n"
10-"PO-Revision-Date: 2013-05-06 17:25+0900\n"
10+"PO-Revision-Date: 2013-05-18 02:27+0900\n"
1111 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1212 "Language-Team: LANGUAGE <LL@li.org>\n"
1313 "Language: \n"
@@ -1791,7 +1791,7 @@ msgstr "GNU"
17911791 #. type: Plain text
17921792 #: build/C/man3/getifaddrs.3:39
17931793 msgid "getifaddrs, freeifaddrs - get interface addresses"
1794-msgstr ""
1794+msgstr "getifaddrs, freeifaddrs - インターフェースのアドレスを取得する"
17951795
17961796 #. type: Plain text
17971797 #: build/C/man3/getifaddrs.3:43
@@ -1938,7 +1938,7 @@ msgid ""
19381938 "B<getifaddrs>() may fail and set I<errno> for any of the errors specified "
19391939 "for B<socket>(2), B<bind>(2), B<getsockname>(2), B<recvmsg>(2), B<sendto>"
19401940 "(2), B<malloc>(3), or B<realloc>(3)."
1941-msgstr ""
1941+msgstr "B<getifaddrs>() may fail and set I<errno> for any of the errors specified for B<socket>(2), B<bind>(2), B<getsockname>(2), B<recvmsg>(2), B<sendto>(2), B<malloc>(3), or B<realloc>(3)."
19421942
19431943 #. type: Plain text
19441944 #: build/C/man3/getifaddrs.3:170
@@ -2018,7 +2018,7 @@ msgstr ""
20182018 #: build/C/man2/recvmmsg.2:206
20192019 #, no-wrap
20202020 msgid "Program source"
2021-msgstr ""
2021+msgstr "プログラムのソース"
20222022
20232023 #. type: Plain text
20242024 #: build/C/man3/getifaddrs.3:240
@@ -2468,7 +2468,7 @@ msgstr ""
24682468 #: build/C/man3/if_nameindex.3:26
24692469 #, no-wrap
24702470 msgid "IF_NAMEINDEX"
2471-msgstr ""
2471+msgstr "IF_NAMEINDEX"
24722472
24732473 #. type: TH
24742474 #: build/C/man3/if_nameindex.3:26
@@ -2480,7 +2480,7 @@ msgstr "2012-11-21"
24802480 #: build/C/man3/if_nameindex.3:29
24812481 msgid ""
24822482 "if_nameindex, if_freenameindex - get network interface names and indexes"
2483-msgstr ""
2483+msgstr "if_nameindex, if_freenameindex - ネットワークインターフェースの名前とインデックスを取得する"
24842484
24852485 #. type: Plain text
24862486 #: build/C/man3/if_nameindex.3:32 build/C/man3/if_nametoindex.3:32
@@ -2495,6 +2495,8 @@ msgid ""
24952495 "B<struct if_nameindex *if_nameindex(void);>\n"
24962496 "B<void if_freenameindex(struct if_nameindex *>I<ptr>B<);>\n"
24972497 msgstr ""
2498+"B<struct if_nameindex *if_nameindex(void);>\n"
2499+"B<void if_freenameindex(struct if_nameindex *>I<ptr>B<);>\n"
24982500
24992501 #. type: Plain text
25002502 #: build/C/man3/if_nameindex.3:46
@@ -2503,7 +2505,7 @@ msgid ""
25032505 "structures, each containing information about one of the network interfaces "
25042506 "on the local system. The I<if_nameindex> structure contains at least the "
25052507 "following entries:"
2506-msgstr ""
2508+msgstr "B<if_nameindex>() 関数は I<if_nameindex> 構造体の配列を返す。 各構造体にはローカルシステムのネットワークインターフェースのいずれかの情報が入る。 I<if_nameindex> 構造体には少なくとも以下のフィールドがある。"
25072509
25082510 #. type: Plain text
25092511 #: build/C/man3/if_nameindex.3:51
@@ -2512,6 +2514,8 @@ msgid ""
25122514 " unsigned int if_index; /* Index of interface (1, 2, ...) */\n"
25132515 " char *if_name; /* Null-terminated name (\"eth0\", etc.) */\n"
25142516 msgstr ""
2517+" unsigned int if_index; /* インターフェースのインデックス (1, 2, ...) */\n"
2518+" char *if_name; /* NULL 終端された名前 (\"eth0\" など) */\n"
25152519
25162520 #. type: Plain text
25172521 #: build/C/man3/if_nameindex.3:65
@@ -2519,14 +2523,14 @@ msgid ""
25192523 "The I<if_index> field contains the interface index. The I<ifa_name> field "
25202524 "points to the null-terminated interface name. The end of the array is "
25212525 "indicated by entry with I<if_index> set to zero and I<ifa_name> set to NULL."
2522-msgstr ""
2526+msgstr "I<if_index> フィールドにはインターフェースのインデックスが入る。 I<ifa_name> フィールドは NULL 終端されたインターフェース名を指す。 配列の最後は、 I<if_index> が 0 で I<ifa_name> が NULL のエントリで示される。"
25232527
25242528 #. type: Plain text
25252529 #: build/C/man3/if_nameindex.3:71
25262530 msgid ""
25272531 "The data structure returned by B<if_nameindex>() is dynamically allocated "
25282532 "and should be freed using B<if_freenameindex>() when no longer needed."
2529-msgstr ""
2533+msgstr "B<if_nameindex>() が返すデータ構造体は動的に確保される。 必要なくなった際には B<if_freenameindex>() で解放すべきである。"
25302534
25312535 #. type: Plain text
25322536 #: build/C/man3/if_nameindex.3:78
@@ -2538,7 +2542,7 @@ msgstr "成功した場合には B<if_nameindex>() は配列へのポインタ
25382542 #. type: Plain text
25392543 #: build/C/man3/if_nameindex.3:83
25402544 msgid "B<if_nameindex>() may fail and set I<errno> if:"
2541-msgstr ""
2545+msgstr "B<if_nameindex>() が失敗した場合には以下の I<errno> が設定される。"
25422546
25432547 #. type: Plain text
25442548 #: build/C/man3/if_nameindex.3:86
@@ -2551,7 +2555,7 @@ msgid ""
25512555 "B<if_nameindex>() may also fail for any of the errors specified for "
25522556 "B<socket>(2), B<bind>(2), B<ioctl>(2), B<getsockname>(2), B<recvmsg>(2), "
25532557 "B<sendto>(2), or B<malloc>(3)."
2554-msgstr ""
2558+msgstr "B<if_nameindex>() は、 B<socket>(2), B<bind>(2), B<ioctl>(2), B<getsockname>(2), B<recvmsg>(2), B<sendto>(2), B<malloc>(3) に対して規定されているエラーのいずれかで失敗する場合がある。"
25552559
25562560 #. type: Plain text
25572561 #: build/C/man3/if_nameindex.3:104
@@ -2560,7 +2564,7 @@ msgid ""
25602564 "glibc 2.3.4, the implementation supported only interfaces with IPv4 "
25612565 "addresses. Support of interfaces that don't have IPv4 addresses is "
25622566 "available only on kernels that support netlink."
2563-msgstr ""
2567+msgstr "B<if_nameindex>() 関数は glibc 2.1 で初めて登場したが、 glibc 2.3.4 より前のバージョンの実装では IPv4 アドレスを持つインターフェースのみをサポートしていた。 IPv4 アドレスを持たないインターフェースがサポートされているのは、 netlink をサポートするカーネルにおいてのみである。"
25642568
25652569 #. type: Plain text
25662570 #: build/C/man3/if_nameindex.3:106 build/C/man3/if_nametoindex.3:87
@@ -2577,7 +2581,7 @@ msgstr "この関数は BSDi 初めて登場した。"
25772581 msgid ""
25782582 "The program below demonstrates the use of the functions described on this "
25792583 "page. An example of the output this program might produce is the following:"
2580-msgstr ""
2584+msgstr "以下のプログラムはこのページで説明した関数の使い方を示している。このプログラムが生成する出力は以下のようになる。"
25812585
25822586 #. type: Plain text
25832587 #: build/C/man3/if_nameindex.3:118
@@ -2588,6 +2592,10 @@ msgid ""
25882592 "2: wlan0\n"
25892593 "3: em1>\n"
25902594 msgstr ""
2595+"$ B<./a.out>I<\n"
2596+"1: lo\n"
2597+"2: wlan0\n"
2598+"3: em1>\n"
25912599
25922600 #. type: Plain text
25932601 #: build/C/man3/if_nameindex.3:126
@@ -2640,12 +2648,14 @@ msgid ""
26402648 " for (i = if_ni; ! (i-E<gt>if_index == 0 && i-E<gt>if_name == NULL); i++)\n"
26412649 " printf(\"%u: %s\\en\", i-E<gt>if_index, i-E<gt>if_name);\n"
26422650 msgstr ""
2651+" for (i = if_ni; ! (i-E<gt>if_index == 0 && i-E<gt>if_name == NULL); i++)\n"
2652+" printf(\"%u: %s\\en\", i-E<gt>if_index, i-E<gt>if_name);\n"
26432653
26442654 #. type: Plain text
26452655 #: build/C/man3/if_nameindex.3:142
26462656 #, no-wrap
26472657 msgid " if_freenameindex(if_ni);\n"
2648-msgstr ""
2658+msgstr " if_freenameindex(if_ni);\n"
26492659
26502660 #. type: Plain text
26512661 #: build/C/man3/if_nameindex.3:145 build/C/man2/select.2:573
@@ -2683,26 +2693,26 @@ msgstr "2012-12-14"
26832693 msgid ""
26842694 "if_nametoindex, if_indextoname - mappings between network interface names "
26852695 "and indexes"
2686-msgstr ""
2696+msgstr "if_nametoindex, if_indextoname - ネットワークインターフェースの名前とインデックスのマッピングを行う"
26872697
26882698 #. type: Plain text
26892699 #: build/C/man3/if_nametoindex.3:34
26902700 #, no-wrap
26912701 msgid "B<unsigned int if_nametoindex(const char *>I<ifname>B<);>\n"
2692-msgstr ""
2702+msgstr "B<unsigned int if_nametoindex(const char *>I<ifname>B<);>\n"
26932703
26942704 #. type: Plain text
26952705 #: build/C/man3/if_nametoindex.3:36
26962706 #, no-wrap
26972707 msgid "B<char *if_indextoname(unsigned int ifindex, char *>I<ifname>B<);>\n"
2698-msgstr ""
2708+msgstr "B<char *if_indextoname(unsigned int ifindex, char *>I<ifname>B<);>\n"
26992709
27002710 #. type: Plain text
27012711 #: build/C/man3/if_nametoindex.3:43
27022712 msgid ""
27032713 "The B<if_nametoindex>() function returns the index of the network interface "
27042714 "corresponding to the name I<ifname>."
2705-msgstr ""
2715+msgstr "B<if_nametoindex>() 関数は、 名前が I<ifname> のネットワークインターフェースのインデックスを返す。"
27062716
27072717 #. type: Plain text
27082718 #: build/C/man3/if_nametoindex.3:54
@@ -2711,7 +2721,7 @@ msgid ""
27112721 "corresponding to the interface index I<ifindex>. The name is placed in the "
27122722 "buffer pointed to by I<ifname>. The buffer must allow for the storage of at "
27132723 "least B<IF_NAMESIZE> bytes."
2714-msgstr ""
2724+msgstr "B<if_indextoname>() 関数は、 インターフェースのインデックスが I<ifindex> に対応するネットワークインターフェースの名前を返す。 名前は I<ifname> が指すバッファに格納される。 バッファは少なくとも B<IF_NAMESIZE> バイトの領域が必要である。"
27152725
27162726 #. type: Plain text
27172727 #: build/C/man3/if_nametoindex.3:61
@@ -2730,7 +2740,7 @@ msgstr "成功した場合には B<if_indextoname>() は I<ifname> を返す。
27302740 #. type: Plain text
27312741 #: build/C/man3/if_nametoindex.3:74
27322742 msgid "B<if_indextoname>() may fail and set I<errno> if:"
2733-msgstr ""
2743+msgstr "B<if_indextoname>() は以下の I<errno> で失敗する場合がある。"
27342744
27352745 #. type: TP
27362746 #: build/C/man3/if_nametoindex.3:74
@@ -2741,19 +2751,19 @@ msgstr "B<ENXIO>"
27412751 #. type: Plain text
27422752 #: build/C/man3/if_nametoindex.3:77
27432753 msgid "No interface found for the index."
2744-msgstr ""
2754+msgstr "インデックスに対応するインターフェースがない。"
27452755
27462756 #. type: Plain text
27472757 #: build/C/man3/if_nametoindex.3:85
27482758 msgid ""
27492759 "B<if_nametoindex>() and B<if_indextoname>() may also fail for any of the "
27502760 "errors specified for B<socket>(2) or B<ioctl>(2)."
2751-msgstr ""
2761+msgstr "B<if_nametoindex>() と B<if_indextoname>() は、 B<socket>(2) と B<ioctl>(2) に対して規定されているエラーのいずれかで失敗する場合がある。"
27522762
27532763 #. type: Plain text
27542764 #: build/C/man3/if_nametoindex.3:93
27552765 msgid "B<getifaddrs>(3), B<if_nameindex>(3), B<ifconfig>(8)"
2756-msgstr ""
2766+msgstr "B<getifaddrs>(3), B<if_nameindex>(3), B<ifconfig>(8)"
27572767
27582768 #. type: TH
27592769 #: build/C/man2/listen.2:45
@@ -3678,7 +3688,7 @@ msgstr "2012-12-24"
36783688 #. type: Plain text
36793689 #: build/C/man2/recvmmsg.2:34
36803690 msgid "recvmmsg - receive multiple messages on a socket"
3681-msgstr ""
3691+msgstr "recvmmsg - 複数のメッセージをソケットから受信する"
36823692
36833693 #. type: Plain text
36843694 #: build/C/man2/recvmmsg.2:38 build/C/man2/sendmmsg.2:35
@@ -3710,26 +3720,26 @@ msgid ""
37103720 "call. (This has performance benefits for some applications.) A further "
37113721 "extension over B<recvmsg>(2) is support for a timeout on the receive "
37123722 "operation."
3713-msgstr ""
3723+msgstr "B<recvmmsg>() システムコールは B<recvmsg>(2) の拡張で、 このシステムコールを使うと一度の呼び出しでソケットから複数のメッセージを受信することができる (アプリケーションによっては性能上のメリットがある)。 他に B<recvmsg>(2) から拡張されている点としては、受信操作におけるタイムアウトのサポートがある。"
37143724
37153725 #. type: Plain text
37163726 #: build/C/man2/recvmmsg.2:59
37173727 msgid ""
37183728 "The I<sockfd> argument is the file descriptor of the socket to receive data "
37193729 "from."
3720-msgstr ""
3730+msgstr "I<sockfd> 引き数は、データを受信するソケットのファイルディスクリプタである。"
37213731
37223732 #. type: Plain text
37233733 #: build/C/man2/recvmmsg.2:67 build/C/man2/sendmmsg.2:62
37243734 msgid ""
37253735 "The I<msgvec> argument is a pointer to an array of I<mmsghdr> structures. "
37263736 "The size of this array is specified in I<vlen>."
3727-msgstr ""
3737+msgstr "I<msgvec> 引き数は I<mmsghdr> 構造体の配列である。 この配列の大きさは I<vlen> で指定する。"
37283738
37293739 #. type: Plain text
37303740 #: build/C/man2/recvmmsg.2:73 build/C/man2/sendmmsg.2:68
37313741 msgid "The I<mmsghdr> structure is defined in I<E<lt>sys/socket.hE<gt>> as:"
3732-msgstr ""
3742+msgstr "I<mmsghdr> 構造体は I<E<lt>sys/socket.hE<gt>> で次のように定義されている。"
37333743
37343744 #. type: Plain text
37353745 #: build/C/man2/recvmmsg.2:80
@@ -3741,8 +3751,8 @@ msgid ""
37413751 "};\n"
37423752 msgstr ""
37433753 "struct mmsghdr {\n"
3744-" struct msghdr msg_hdr; /* Message header */\n"
3745-" unsigned int msg_len; /* Number of received bytes for header */\n"
3754+" struct msghdr msg_hdr; /* メッセージヘッダ */\n"
3755+" unsigned int msg_len; /* このヘッダで受信されたバイト数 */\n"
37463756 "};\n"
37473757
37483758 #. type: Plain text
@@ -3752,14 +3762,14 @@ msgid ""
37523762 "(2). The I<msg_len> field is the number of bytes returned for the message "
37533763 "in the entry. This field has the same value as the return value of a single "
37543764 "B<recvmsg>(2) on the header."
3755-msgstr ""
3765+msgstr "I<msg_hdr> フィールドは、 B<recvmsg>(2) で説明されている I<msghdr> 構造体である。 I<msg_len> フィールドは、 このエントリで返されるメッセージのバイト数で、 このヘッダに対して B<recvmsg>(2) を呼び出した場合の返り値と同じ値が入る。"
37563766
37573767 #. type: Plain text
37583768 #: build/C/man2/recvmmsg.2:102
37593769 msgid ""
37603770 "The I<flags> argument contains flags ORed together. The flags are the same "
37613771 "as documented for B<recvmsg>(2), with the following addition:"
3762-msgstr ""
3772+msgstr "I<flags> 引き数には複数のフラグを論理和 (OR) で指定できる。 フラグは、 B<recvmsg>(2) で説明されているものに加えて、以下が使用できる。"
37633773
37643774 #. type: TP
37653775 #: build/C/man2/recvmmsg.2:102
@@ -3770,7 +3780,7 @@ msgstr "B<MSG_WAITFORONE> (Linux 2.6.34 以降)"
37703780 #. type: Plain text
37713781 #: build/C/man2/recvmmsg.2:107
37723782 msgid "Turns on B<MSG_DONTWAIT> after the first message has been received."
3773-msgstr ""
3783+msgstr "最初のメッセージを受信後に B<MSG_DONTWAIT> を有効にする。"
37743784
37753785 #. type: Plain text
37763786 #: build/C/man2/recvmmsg.2:123
@@ -3781,7 +3791,7 @@ msgid ""
37813791 "granularity, and kernel scheduling delays mean that the blocking interval "
37823792 "may overrun by a small amount.) If I<timeout> is I<NULL> then the operation "
37833793 "blocks indefinitely."
3784-msgstr ""
3794+msgstr "I<timeout> 引き数は I<struct timespec> (B<clock_gettime>(2) 参照) へのポインタで、 この構造体で受信操作のタイムアウト (秒とナノ秒) を指定する (待ち時間はシステムクロックの粒度に切り上げられ、カーネルのスケジューリング遅延により少しだけ長くなる可能性がある)。 I<timeout>が I<NULL> の場合、 受信操作は無期限に停止 (block) する。"
37853795
37863796 #. type: Plain text
37873797 #: build/C/man2/recvmmsg.2:134
@@ -3790,7 +3800,7 @@ msgid ""
37903800 "received or until the timeout expires. A nonblocking call reads as many "
37913801 "messages as are available (up to the limit specified by I<vlen>) and "
37923802 "returns immediately."
3793-msgstr ""
3803+msgstr "停止 (blocking) モードの B<recvmmsg>() の呼び出しは、 I<vlen> 個のメッセージを受信するか、タイムアウトが満了するまで停止する。 非停止 (nonblocking) モードの呼び出しでは、 読み出し可能なメッセージ (最大で I<vlen> 個) を読み出し、 すぐに返る。"
37943804
37953805 #. type: Plain text
37963806 #: build/C/man2/recvmmsg.2:149
@@ -3800,7 +3810,7 @@ msgid ""
38003810 "size of the received message; the subfields of I<msg_hdr> are updated as "
38013811 "described in B<recvmsg>(2). The return value of the call indicates the "
38023812 "number of elements of I<msgvec> that have been updated."
3803-msgstr ""
3813+msgstr "B<recvmmsg>() が返った際には、 I<msgvec> のうちデータが受信された要素には、受信したそれぞれのメッセージの情報が格納されている。 また、 I<msg_len> には受信したメッセージの大きさが入り、 I<msg_hdr> の各フィールドは B<recvmsg>(2) に書かれている通りに更新される。 呼び出しの返り値は、更新された I<msgvec> の要素数である。"
38043814
38053815 #. type: Plain text
38063816 #: build/C/man2/recvmmsg.2:157
@@ -3808,18 +3818,18 @@ msgid ""
38083818 "On success, B<recvmmsg>() returns the number of messages received in "
38093819 "I<msgvec>; on error, -1 is returned, and I<errno> is set to indicate the "
38103820 "error."
3811-msgstr ""
3821+msgstr "成功すると、 B<recvmmsg>() は I<msgvec> に受信されたメッセージ数を返す。 エラーの場合、 -1 を返し、 I<errno> にエラーを示す値を設定する。"
38123822
38133823 #. type: Plain text
38143824 #: build/C/man2/recvmmsg.2:161
38153825 msgid ""
38163826 "Errors are as for B<recvmsg>(2). In addition, the following error can occur:"
3817-msgstr ""
3827+msgstr "エラーは B<recvmsg>(2) と同じである。 これに加えて、以下のエラーが起こる場合がある。"
38183828
38193829 #. type: Plain text
38203830 #: build/C/man2/recvmmsg.2:165
38213831 msgid "I<timeout> is invalid."
3822-msgstr ""
3832+msgstr "I<timeout> が無効である。"
38233833
38243834 #. type: Plain text
38253835 #: build/C/man2/recvmmsg.2:170
@@ -3831,7 +3841,7 @@ msgstr "B<recvmmsg>() システムコールは Linux 2.6.33 で追加された
38313841 #. type: Plain text
38323842 #: build/C/man2/recvmmsg.2:173
38333843 msgid "B<recvmmsg>() is Linux-specific."
3834-msgstr ""
3844+msgstr "B<recvmmsg>() は Linux 固有である。"
38353845
38363846 #. type: Plain text
38373847 #: build/C/man2/recvmmsg.2:181
@@ -3839,14 +3849,14 @@ msgid ""
38393849 "The following program uses B<recvmmsg>() to receive multiple messages on a "
38403850 "socket and stores them in multiple buffers. The call returns if all buffers "
38413851 "are filled or if the timeout specified has expired."
3842-msgstr ""
3852+msgstr "以下のプログラムは、 B<recvmmsg>() を使って複数のメッセージをソケットから受信し、それらを複数のバッファに格納する。 呼び出しは、すべてのバッファにメッセージが格納されるか、 指定したタイムアウト時間が経過すると返る。"
38433853
38443854 #. type: Plain text
38453855 #: build/C/man2/recvmmsg.2:184
38463856 msgid ""
38473857 "The following snippet periodically generates UDP datagrams containing a "
38483858 "random number:"
3849-msgstr ""
3859+msgstr "以下のコマンドは、 ランダムな数字が入った UDP データグラムを定期的に生成する。"
38503860
38513861 #. type: Plain text
38523862 #: build/C/man2/recvmmsg.2:189
@@ -3855,13 +3865,15 @@ msgid ""
38553865 "$B< while true; do echo $RANDOM E<gt> /dev/udp/127.0.0.1/1234; >\n"
38563866 "B<sleep 0.25; done>\n"
38573867 msgstr ""
3868+"$B< while true; do echo $RANDOM E<gt> /dev/udp/127.0.0.1/1234; >\n"
3869+"B<sleep 0.25; done>\n"
38583870
38593871 #. type: Plain text
38603872 #: build/C/man2/recvmmsg.2:194
38613873 msgid ""
38623874 "These datagrams are read by the example application, which can give the "
38633875 "following output:"
3864-msgstr ""
3876+msgstr "生成されたデータグラムをサンプルアプリケーションが読み出し、以下のような出力が得られる。"
38653877
38663878 #. type: Plain text
38673879 #: build/C/man2/recvmmsg.2:204
@@ -3875,6 +3887,13 @@ msgid ""
38753887 "4 13514\n"
38763888 "5 28421\n"
38773889 msgstr ""
3890+"$B< ./a.out>\n"
3891+"5 messages received\n"
3892+"1 11782\n"
3893+"2 11345\n"
3894+"3 304\n"
3895+"4 13514\n"
3896+"5 28421\n"
38783897
38793898 #. type: Plain text
38803899 #: build/C/man2/recvmmsg.2:215
@@ -3911,6 +3930,18 @@ msgid ""
39113930 " char bufs[VLEN][BUFSIZE+1];\n"
39123931 " struct timespec timeout;\n"
39133932 msgstr ""
3933+"int\n"
3934+"main(void)\n"
3935+"{\n"
3936+"#define VLEN 10\n"
3937+"#define BUFSIZE 200\n"
3938+"#define TIMEOUT 1\n"
3939+" int sockfd, retval, i;\n"
3940+" struct sockaddr_in sa;\n"
3941+" struct mmsghdr msgs[VLEN];\n"
3942+" struct iovec iovecs[VLEN];\n"
3943+" char bufs[VLEN][BUFSIZE+1];\n"
3944+" struct timespec timeout;\n"
39143945
39153946 #. type: Plain text
39163947 #: build/C/man2/recvmmsg.2:234 build/C/man2/sendmmsg.2:201
@@ -3960,6 +3991,13 @@ msgid ""
39603991 " msgs[i].msg_hdr.msg_iovlen = 1;\n"
39613992 " }\n"
39623993 msgstr ""
3994+" memset(msgs, 0, sizeof(msgs));\n"
3995+" for (i = 0; i E<lt> VLEN; i++) {\n"
3996+" iovecs[i].iov_base = bufs[i];\n"
3997+" iovecs[i].iov_len = BUFSIZE;\n"
3998+" msgs[i].msg_hdr.msg_iov = &iovecs[i];\n"
3999+" msgs[i].msg_hdr.msg_iovlen = 1;\n"
4000+" }\n"
39634001
39644002 #. type: Plain text
39654003 #: build/C/man2/recvmmsg.2:253
@@ -3999,6 +4037,13 @@ msgid ""
39994037 " exit(EXIT_SUCCESS);\n"
40004038 "}\n"
40014039 msgstr ""
4040+" printf(\"%d messages received\\en\", retval);\n"
4041+" for (i = 0; i E<lt> retval; i++) {\n"
4042+" bufs[i][msgs[i].msg_len] = 0;\n"
4043+" printf(\"%d %s\", i+1, bufs[i]);\n"
4044+" }\n"
4045+" exit(EXIT_SUCCESS);\n"
4046+"}\n"
40024047
40034048 #. type: Plain text
40044049 #: build/C/man2/recvmmsg.2:275
@@ -6907,7 +6952,7 @@ msgstr "2012-12-16"
69076952 #. type: Plain text
69086953 #: build/C/man2/sendmmsg.2:31
69096954 msgid "sendmmsg - send multiple messages on a socket"
6910-msgstr ""
6955+msgstr "sendmmsg - 複数のメッセージをソケットへ送信する"
69116956
69126957 #. type: Plain text
69136958 #: build/C/man2/sendmmsg.2:39
@@ -6926,14 +6971,14 @@ msgid ""
69266971 "The B<sendmmsg>() system call is an extension of B<sendmsg>(2) that allows "
69276972 "the caller to transmit multiple messages on a socket using a single system "
69286973 "call. (This has performance benefits for some applications.)"
6929-msgstr ""
6974+msgstr "B<sendmmsg>() システムコールは B<sendmsg>(2) の拡張で、 このシステムコールを使うと一度の呼び出しでソケットに複数のメッセージを送信できる (アプリケーションによっては性能上のメリットがある)。"
69306975
69316976 #. type: Plain text
69326977 #: build/C/man2/sendmmsg.2:54
69336978 msgid ""
69346979 "The I<sockfd> argument is the file descriptor of the socket on which data is "
69356980 "to be transmitted."
6936-msgstr ""
6981+msgstr "I<sockfd> 引き数は、 データを送信するソケットのファイルディスクリプタである。"
69376982
69386983 #. type: Plain text
69396984 #: build/C/man2/sendmmsg.2:75
@@ -6944,6 +6989,10 @@ msgid ""
69446989 " unsigned int msg_len; /* Number of bytes transmitted */\n"
69456990 "};\n"
69466991 msgstr ""
6992+"struct mmsghdr {\n"
6993+" struct msghdr msg_hdr; /* メッセージヘッダ */\n"
6994+" unsigned int msg_len; /* 送信されたバイト数 */\n"
6995+"};\n"
69476996
69486997 #. type: Plain text
69496998 #: build/C/man2/sendmmsg.2:91
@@ -6952,14 +7001,14 @@ msgid ""
69527001 "(2). The I<msg_len> field is used to return the number of bytes sent from "
69537002 "the message in I<msg_hdr> (i.e., the same as the return value from a single "
69547003 "B<sendmsg>(2) call)."
6955-msgstr ""
7004+msgstr "I<msg_hdr> フィールドは、 B<sendmsg>(2) で説明されている I<msghdr> 構造体である。 I<msg_len> フィールドは I<msg_hdr> から送信されたメッセージのバイト数を返すのに使用される。 この値は B<sendmsg>(2) をこのヘッダに対して呼び出した場合の返り値と同じである。"
69567005
69577006 #. type: Plain text
69587007 #: build/C/man2/sendmmsg.2:97
69597008 msgid ""
69607009 "The I<flags> argument contains flags ORed together. The flags are the same "
69617010 "as for B<sendmsg>(2)."
6962-msgstr ""
7011+msgstr "I<flags> 引き数には複数のフラグを論理和 (OR) で指定できる。フラグは B<sendmsg>(2) と同じである。"
69637012
69647013 #. type: Plain text
69657014 #: build/C/man2/sendmmsg.2:107
@@ -6967,7 +7016,7 @@ msgid ""
69677016 "A blocking B<sendmmsg>() call blocks until I<vlen> messages have been "
69687017 "sent. A nonblocking call sends as many messages as possible (up to the "
69697018 "limit specified by I<vlen>) and returns immediately."
6970-msgstr ""
7019+msgstr "停止 (blocking) モードの B<sendmmsg>() の呼び出しは、 I<vlen> 個のメッセージが送信されるまで停止する。 非停止 (nonblocking) モードの呼び出しでは、 送信できるだけのメッセージ (最大で I<vlen> 個) を送信し、 すぐに返る。"
69717020
69727021 #. type: Plain text
69737022 #: build/C/man2/sendmmsg.2:119
@@ -6976,7 +7025,7 @@ msgid ""
69767025 "of I<msgvec> are updated to contain the number of bytes transmitted from the "
69777026 "corresponding I<msg_hdr>. The return value of the call indicates the number "
69787027 "of elements of I<msgvec> that have been updated."
6979-msgstr ""
7028+msgstr "B<sendmmsg>() が返った際には、 I<msgvec> の送信が行われた要素の I<msg_len> フィールドは、対応する I<msg_hdr> から送信されたバイト数が入っている。 呼び出しの返り値は、更新された I<msgvec> の要素数である。"
69807029
69817030 #. type: Plain text
69827031 #: build/C/man2/sendmmsg.2:129
@@ -6984,12 +7033,12 @@ msgid ""
69847033 "On success, B<sendmmsg>() returns the number of messages sent from "
69857034 "I<msgvec>; if this is less than I<vlen>, the caller can retry with a further "
69867035 "B<sendmmsg>() call to send the remaining messages."
6987-msgstr ""
7036+msgstr "成功すると、 B<sendmmsg>() は I<msgvec> から送信されたメッセージ数を返す。 返り値が I<vlen> よりも小さい場合、 呼び出した側では再度 B<sendmmsg> を呼び出して残りのメッセージを送信することができる。"
69887037
69897038 #. type: Plain text
69907039 #: build/C/man2/sendmmsg.2:133
69917040 msgid "On error, -1 is returned, and I<errno> is set to indicate the error."
6992-msgstr ""
7041+msgstr "エラーの場合、 -1 を返し、 I<errno> にエラーを示す値を設定する。"
69937042
69947043 #
69957044 #. commit 728ffb86f10873aaf4abd26dde691ee40ae731fe
@@ -7004,19 +7053,19 @@ msgstr ""
70047053 msgid ""
70057054 "Errors are as for B<sendmsg>(2). An error is returned only if no datagrams "
70067055 "could be sent."
7007-msgstr ""
7056+msgstr "エラーは B<sendmsg>(2) と同じである。 エラーが返されるのは、 データグラムが全く送信できなかった場合のみである。"
70087057
70097058 #. type: Plain text
70107059 #: build/C/man2/sendmmsg.2:150
70117060 msgid ""
70127061 "The B<sendmmsg>() system call was added in Linux 3.0. Support in glibc was "
70137062 "added in version 2.14."
7014-msgstr ""
7063+msgstr "B<sendmmsg>() システムコールは Linux 3.0 で追加された。 glibc でのサポートはバージョン 2.14 で追加された。"
70157064
70167065 #. type: Plain text
70177066 #: build/C/man2/sendmmsg.2:153
70187067 msgid "B<sendmmsg>() is Linux-specific."
7019-msgstr ""
7068+msgstr "B<sendmmsg>() は Linux 固有である。"
70207069
70217070 #
70227071 #
@@ -7030,7 +7079,7 @@ msgstr ""
70307079 #. type: Plain text
70317080 #: build/C/man2/sendmmsg.2:168
70327081 msgid "The value specified in I<vlen> is capped to B<UIO_MAXIOV> (1024)."
7033-msgstr ""
7082+msgstr "I<vlen> に指定できる値の最大値は B<UIO_MAXIOV> (1024) である。"
70347083
70357084 #. type: Plain text
70367085 #: build/C/man2/sendmmsg.2:177
@@ -7038,7 +7087,7 @@ msgid ""
70387087 "The example below uses B<sendmmsg>() to send I<onetwo> and I<three> in two "
70397088 "distinct UDP datagrams using one system call. The contents of the first "
70407089 "datagram originates from a pair of buffers."
7041-msgstr ""
7090+msgstr "以下の例では、 B<sendmmsg>() を使って、 一度のシステムコールで、 I<onetwo> と I<three> を二つの別々の UDP データグラムで送信する。 一つ目のデータグラムの内容は、二つのバッファから取得される。"
70427091
70437092 #. type: Plain text
70447093 #: build/C/man2/sendmmsg.2:186
--- a/stats/numa
+++ b/stats/numa
@@ -1,2 +0,0 @@
1-# pagename,#complete,#remaining,#all
2-numa.7,40,12,52
--- a/stats/socket
+++ b/stats/socket
@@ -1,6 +1,2 @@
11 # pagename,#complete,#remaining,#all
2-getifaddrs.3,33,17,50
3-if_nameindex.3,25,15,40
4-if_nametoindex.3,19,9,28
5-recvmmsg.2,28,24,52
6-sendmmsg.2,29,17,46
2+getifaddrs.3,36,14,50
--- a/translation_list
+++ b/translation_list
@@ -284,7 +284,7 @@
284284 ○:LDP man-pages:3.51:2010/10/31:reboot:2:2013/03/25::amotoki@gmail.com:Akihiro MOTOKI:
285285 ○:LDP man-pages:3.51:2012/12/21:recv:2:2013/03/26::amotoki@dd.iij4u.or.jp:Akihiro MOTOKI:
286286 @:LDP man-pages:3.51:2012/12/21:recvfrom:2:recv:2:
287-×:LDP man-pages:3.51:2012/12/24:recvmmsg:2:::::
287+○:LDP man-pages:3.51:2012/12/24:recvmmsg:2:2013/05/18::amotoki@gmail.com:Akihiro MOTOKI:
288288 @:LDP man-pages:3.51:2012/12/21:recvmsg:2:recv:2:
289289 ○:LDP man-pages:3.51:2008/04/22:remap_file_pages:2:2013/03/25::amotoki@dd.iij4u.or.jp:Akihiro MOTOKI:
290290 ○:LDP man-pages:3.51:2013/01/19:removexattr:2:2013/03/25::amotoki@dd.iij4u.or.jp:Akihiro MOTOKI:
@@ -322,7 +322,7 @@
322322 ○:LDP man-pages:3.51:2012/04/23:send:2:2013/03/26::amotoki@gmail.com:Akihiro MOTOKI:
323323 ○:LDP man-pages:3.51:2011/09/14:sendfile:2:2013/03/25::amotoki@gmail.com:Akihiro MOTOKI:
324324 @:LDP man-pages:3.51:2011/09/14:sendfile64:2:sendfile:2:
325-×:LDP man-pages:3.51:2012/12/16:sendmmsg:2:::::
325+○:LDP man-pages:3.51:2012/12/16:sendmmsg:2:2013/05/18::amotoki@gmail.com:Akihiro MOTOKI:
326326 @:LDP man-pages:3.51:2012/04/23:sendmsg:2:send:2:
327327 @:LDP man-pages:3.51:2012/04/23:sendto:2:send:2:
328328 ○:LDP man-pages:3.51:2008/08/15:set_mempolicy:2:2013/03/25::amotoki@dd.iij4u.or.jp:Akihiro MOTOKI:
@@ -1151,10 +1151,10 @@
11511151 ○:LDP man-pages:3.51:2012/05/10:iconv:3:2013/03/25::amotoki@gmail.com:Akihiro MOTOKI:
11521152 ○:LDP man-pages:3.51:2008/08/11:iconv_close:3:2013/03/25::sato@complex.eng.hokudai.ac.jp:Yuichi SATO:
11531153 ○:LDP man-pages:3.51:2008/08/11:iconv_open:3:2013/03/25::amotoki@dd.iij4u.or.jp:Akihiro MOTOKI:
1154-※:LDP man-pages:3.51:2012/11/21:if_freenameindex:3:if_nameindex:3:
1155-※:LDP man-pages:3.51:2012/12/14:if_indextoname:3:if_nametoindex:3:
1156-×:LDP man-pages:3.51:2012/11/21:if_nameindex:3:::::
1157-×:LDP man-pages:3.51:2012/12/14:if_nametoindex:3:::::
1154+@:LDP man-pages:3.51:2012/11/21:if_freenameindex:3:if_nameindex:3:
1155+@:LDP man-pages:3.51:2012/12/14:if_indextoname:3:if_nametoindex:3:
1156+○:LDP man-pages:3.51:2012/11/21:if_nameindex:3:2013/05/18::amotoki@gmail.com:Akihiro MOTOKI:
1157+○:LDP man-pages:3.51:2012/12/14:if_nametoindex:3:2013/05/18::amotoki@gmail.com:Akihiro MOTOKI:
11581158 ○:LDP man-pages:3.51:2010/09/20:ilogb:3:2013/03/25::amotoki@dd.iij4u.or.jp:Akihiro MOTOKI:
11591159 @:LDP man-pages:3.51:2010/09/20:ilogbf:3:ilogb:3:
11601160 @:LDP man-pages:3.51:2010/09/20:ilogbl:3:ilogb:3:
@@ -2007,7 +2007,7 @@
20072007 ○:LDP man-pages:3.51:2013/02/12:nscd.conf:5:2006/07/19::amotoki@dd.iij4u.or.jp:Akihiro MOTOKI:
20082008 ×:LDP man-pages:3.51:2013/02/13:nss:5:::::
20092009 ○:LDP man-pages:3.51:2013/02/12:nsswitch.conf:5:2013/03/25::amotoki@gmail.com:Akihiro MOTOKI:
2010-※:LDP man-pages:3.51:2012/08/05:numa_maps:5:numa:7:
2010+@:LDP man-pages:3.51:2012/08/05:numa_maps:5:numa:7:
20112011 ○:LDP man-pages:3.51:2012/05/03:passwd:5:2013/03/25::amotoki@gmail.com:Akihiro MOTOKI:
20122012 ☆:LDP man-pages:3.50=>3.51:2013/04/17:proc:5:2013/03/25::amotoki@gmail.com:Akihiro MOTOKI:
20132013 ○:LDP man-pages:3.51:2012/08/05:protocols:5:2013/03/25::argrath@ub32.org:Kentaro Shirakata:
@@ -2120,7 +2120,7 @@
21202120 ○:LDP man-pages:3.51:2009/09/27:mq_overview:7:2013/03/26::amotoki@dd.iij4u.or.jp:Akihiro MOTOKI:
21212121 ○:LDP man-pages:3.51:2012/04/26:netdevice:7:2013/03/26::amotoki@gmail.com:Akihiro MOTOKI:
21222122 ○:LDP man-pages:3.51:2013/03/15:netlink:7:2013/03/26::amotoki@gmail.com:Akihiro MOTOKI:
2123-×:LDP man-pages:3.51:2012/08/05:numa:7:::::
2123+○:LDP man-pages:3.51:2012/08/05:numa:7:2013/05/18::amotoki@gmail.com:Akihiro MOTOKI:
21242124 ○:LDP man-pages:3.51:2011/09/09:operator:7:2013/03/25::ysato444@yahoo.co.jp:Yuichi SATO:
21252125 ○:LDP man-pages:3.51:2012/05/10:packet:7:2013/03/26::amotoki@gmail.com:Akihiro MOTOKI:
21262126 ○:LDP man-pages:3.51:2009/12/05:path_resolution:7:2013/03/25::amotoki@dd.iij4u.or.jp:Akihiro MOTOKI:
--- a/untrans.html
+++ b/untrans.html
@@ -51,8 +51,6 @@
5151 <TR><TD>getaddrinfo_a.3</TD><TD>41/122</TD><TD>66.39</TD></TR>
5252 <TR><TD>getent.1</TD><TD>20/57</TD><TD>64.91</TD></TR>
5353 <TR><TD>nss.5</TD><TD>9/27</TD><TD>66.67</TD></TR>
54-<TR><TD ALIGN="center" COLSPAN=3 BGCOLOR="Yellow"><B>numa</B></TD></TR>
55-<TR class="over70"><TD>numa.7</TD><TD>12/52</TD><TD>76.92</TD></TR>
5654 <TR><TD ALIGN="center" COLSPAN=3 BGCOLOR="Yellow"><B>process</B></TD></TR>
5755 <TR><TD>cpuset.7</TD><TD>212/314</TD><TD>32.48</TD></TR>
5856 <TR><TD ALIGN="center" COLSPAN=3 BGCOLOR="Yellow"><B>sched</B></TD></TR>
@@ -68,11 +66,7 @@
6866 <TR><TD>timer_getoverrun.2</TD><TD>12/36</TD><TD>66.67</TD></TR>
6967 <TR><TD>timer_settime.2</TD><TD>18/44</TD><TD>59.09</TD></TR>
7068 <TR><TD ALIGN="center" COLSPAN=3 BGCOLOR="Yellow"><B>socket</B></TD></TR>
71-<TR><TD>getifaddrs.3</TD><TD>17/50</TD><TD>66.00</TD></TR>
72-<TR><TD>if_nameindex.3</TD><TD>15/40</TD><TD>62.50</TD></TR>
73-<TR><TD>if_nametoindex.3</TD><TD>9/28</TD><TD>67.86</TD></TR>
74-<TR><TD>recvmmsg.2</TD><TD>24/52</TD><TD>53.85</TD></TR>
75-<TR><TD>sendmmsg.2</TD><TD>17/46</TD><TD>63.04</TD></TR>
69+<TR class="over70"><TD>getifaddrs.3</TD><TD>14/50</TD><TD>72.00</TD></TR>
7670 <TR><TD ALIGN="center" COLSPAN=3 BGCOLOR="Yellow"><B>special</B></TD></TR>
7771 <TR><TD>cciss.4</TD><TD>44/88</TD><TD>50.00</TD></TR>
7872 <TR><TD>cpuid.4</TD><TD>13/24</TD><TD>45.83</TD></TR>
@@ -87,6 +81,6 @@
8781 <TR class="over70"><TD>clock_getcpuclockid.3</TD><TD>9/44</TD><TD>79.55</TD></TR>
8882 <TR><TD>utimensat.2</TD><TD>50/107</TD><TD>53.27</TD></TR>
8983 <TR class="over80"><TD>zdump.8</TD><TD>1/22</TD><TD>95.45</TD></TR>
90-<TR><TD COLSPAN=3>Total 58 pages</TD></TR>
84+<TR><TD COLSPAN=3>Total 53 pages</TD></TR>
9185 </TABLE>
9286 </BODY></HTML>