OSDN Git Service

b4524621f988cb77c2fb42258e8bf70d65c87514
[linuxjm/LDP_man-pages.git] / draft / man7 / ddp.7
1 .\" This man page is Copyright (C) 1998 Alan Cox.
2 .\" Permission is granted to distribute possibly modified copies
3 .\" of this page provided the header is included verbatim,
4 .\" and in case of nontrivial modification author and date
5 .\" of the modification is added to the header.
6 .\" $Id: ddp.7,v 1.6 1999/12/06 00:13:56 nakano Exp $
7 .\"
8 .\" Japanese Version Copyright (c) 1999 NAKANO Takeo all rights reserved.
9 .\" Translated Mon 6 Dec 1999 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
10 .\"
11 .TH DDP  7 2008-11-20 "Linux" "Linux Programmer's Manual"
12 .\"O .SH NAME
13 .SH 名前
14 .\"O ddp \- Linux AppleTalk protocol implementation
15 ddp \- Linux での AppleTalk プロトコルの実装
16 .\"O .SH SYNOPSIS
17 .SH 書式
18 .B #include <sys/socket.h>
19 .br
20 .B #include <netatalk/at.h>
21 .sp
22 .IB ddp_socket " = socket(AF_APPLETALK, SOCK_DGRAM, 0);"
23 .br
24 .IB raw_socket " = socket(AF_APPLETALK, SOCK_RAW, " protocol ");"
25 .\"O .SH DESCRIPTION
26 .SH 説明
27 .\"O Linux implements the Appletalk protocols described in
28 .\"O .IR "Inside Appletalk" .
29 .\"O Only the DDP layer and AARP are present in
30 .\"O the kernel.
31 .\"O They are designed to be used via the
32 .\"O .B netatalk
33 .\"O protocol
34 .\"O libraries.
35 .\"O This page documents the interface for those who wish or need to
36 .\"O use the DDP layer directly.
37 Linux は
38 .I "Inside Appletalk"
39 に記述されている Appletalk プロトコルを実装している。
40 カーネルにあるのは DDP 層と AARP だけである。これらは
41 .B netatalk
42 プロトコルライブラリを通して利用されるように設計されている。
43 このページは DDP 層を直接利用したいユーザーのために、
44 インターフェースを記述したものである。
45 .PP
46 .\"O The communication between Appletalk and the user program works using a
47 .\"O BSD-compatible socket interface.
48 .\"O For more information on sockets, see
49 .\"O .BR socket (7).
50 Appletalk とユーザープログラムとの通信には、
51 BSD 互換のソケットインターフェースを利用する。
52 ソケットに関するより詳しい情報は
53 .BR socket (7)
54 を見よ。
55 .PP
56 .\"O An AppleTalk socket is created by calling the
57 .\"O .BR socket (2)
58 .\"O function with a
59 .\"O .B AF_APPLETALK
60 .\"O socket family argument.
61 .\"O Valid socket types are
62 .\"O .B SOCK_DGRAM
63 .\"O to open a
64 .\"O .B ddp
65 .\"O socket or
66 .\"O .B SOCK_RAW
67 .\"O to open a
68 .\"O .B raw
69 .\"O socket.
70 .\"O .I protocol
71 .\"O is the Appletalk protocol to be received or sent.
72 .\"O For
73 .\"O .B SOCK_RAW
74 .\"O you must specify
75 .\"O .BR ATPROTO_DDP .
76 Appletalk ソケットは、
77 ソケットファミリーの引数に
78 .B AF_APPLETALK
79 を指定して
80 .BR socket (2)
81 関数を呼び出すことによって生成される。指定できるソケットタイプは、
82 .B ddp
83 ソケットをオープンする場合には
84 .BR SOCK_DGRAM 、
85 .B raw
86 ソケットをオープンする場合には
87 .B SOCK_RAW
88 である。
89 .I protocol
90 は送受信される Appletalk プロトコルである。
91 ソケットタイプに
92 .B SOCK_RAW
93 を指定した場合は、プロトコルに
94 .B ATPROTO_DDP
95 を指定しなければならない。
96 .PP
97 .\"O Raw sockets may be only opened by a process with effective user ID 0
98 .\"O or when the process has the
99 .\"O .B CAP_NET_RAW
100 .\"O capability.
101 raw ソケットは実効ユーザー ID が 0 のプロセスか、
102 .B CAT_NEW_RAW
103 権限を持ったプロセスでないとオープンできない。
104 .\"O .SS "Address Format"
105 .SS アドレスのフォーマット
106 .\"O An Appletalk socket address is defined as a combination of a network number,
107 .\"O a node number, and a port number.
108 Appletalk ソケットアドレスはネットワーク番号・ノード番号・ポート番号の
109 組み合わせで定義される。
110 .PP
111 .in +4n
112 .nf
113 struct at_addr {
114     unsigned short s_net;
115     unsigned char  s_node;
116 };
117
118 struct sockaddr_atalk {
119     sa_family_t    sat_family;    /* address family */
120     unsigned char  sat_port;      /* port */
121     struct at_addr sat_addr;      /* net/node */
122 };
123 .fi
124 .in
125 .PP
126 .\"O .I sat_family
127 .\"O is always set to
128 .\"O .BR AF_APPLETALK .
129 .I sat_family
130 は常に
131 .B AF_APPLETALK
132 に設定する。
133 .\"O .I sat_port
134 .\"O contains the port.
135 .\"O The port numbers below 129 are known as
136 .\"O .IR reserved ports .
137 .\"O Only processes with the effective user ID 0 or the
138 .\"O .B CAP_NET_BIND_SERVICE
139 .\"O capability may
140 .\"O .BR bind (2)
141 .\"O to these sockets.
142 .I sat_port
143 はポートを与える。ポート番号が 129 以下のポートは
144 「予約ポート (reserved port)」 と呼ばれる。実効ユーザー ID が 0 のプロセスか、
145 .B CAP_NET_BIND_SERVICE
146 権限を持つプロセスだけが、このようなソケットを
147 .BR bind (2)
148 できる。
149 .\"O .I sat_addr
150 .\"O is the host address.
151 .\"O The
152 .\"O .I net
153 .\"O member of
154 .\"O .I struct at_addr
155 .\"O contains the host network in network byte order.
156 .\"O The value of
157 .\"O .B AT_ANYNET
158 .\"O is a
159 .\"O wildcard and also implies \(lqthis network.\(rq
160 .I sat_addr
161 はホストアドレスである。
162 .I struct at_addr
163 のメンバー
164 .I s_net
165 にはホストのネットワークをネットワークバイトオーダーで与える。値
166 .B AT_ANYNET
167 はワイルドカードで、「このネットワーク」も暗黙のうちに含まれる。
168 .\"O The
169 .\"O .I node
170 .\"O member of
171 .\"O .I struct at_addr
172 .\"O contains the host node number.
173 .\"O The value of
174 .\"O .B AT_ANYNODE
175 .\"O is a
176 .\"O wildcard and also implies \(lqthis node.\(rq The value of
177 .\"O .B ATADDR_BCAST
178 .\"O is a link
179 .\"O local broadcast address.
180 .I struct at_addr
181 のメンバー
182 .I s_node
183 にはホストのノード番号を与える。値
184 .B AT_ANYNODE
185 はワイルドカードで、「このノード」も暗黙のうちに含まれる。値
186 .B ATADDR_BCAST
187 はローカルなブロードキャストアドレスである。
188 .\" FIXME this doesn't make sense [johnl]
189 .\"O .SS "Socket Options"
190 .SS ソケットオプション
191 .\"O No protocol-specific socket options are supported.
192 プロトコル固有のソケットオプションはない。
193 .\"O .SS /proc interfaces
194 .SS /proc インタフェース
195 .\"O IP supports a set of
196 .\"O .I /proc
197 .\"O interfaces to configure some global AppleTalk parameters.
198 .\"O The parameters can be accessed by reading or writing files in the directory
199 .\"O .IR /proc/sys/net/atalk/ .
200 Appletalk のグローバルパラメータのいくつかは、
201 .I /proc
202 インタフェースを通して設定することができる。
203 これらのパラメータには、
204 .I /proc/sys/net/atalk/
205 ディレクトリ内のファイルの読み書きでアクセスできる。
206 .TP
207 .I aarp-expiry-time
208 .\"O The time interval (in seconds) before an AARP cache entry expires.
209 AARP キャッシュエントリを破棄するまでのタイムインターバル (秒単位)。
210 .TP
211 .I aarp-resolve-time
212 .\"O The time interval (in seconds) before an AARP cache entry is resolved.
213 AARP キャッシュエントリが解決されるまでのタイムインターバル (秒単位)。
214 .TP
215 .I aarp-retransmit-limit
216 .\"O The number of retransmissions of an AARP query before the node is declared
217 .\"O dead.
218 AARP クエリーの最大再送信回数。この回数を越えると、
219 そのノードは dead であるとみなされる。
220 .TP
221 .I aarp-tick-time
222 .\"O The timer rate (in seconds) for the timer driving AARP.
223 タイマー動作する AARP のタイマーレート (秒単位)
224 .PP
225 .\"O The default values match the specification and should never need to be
226 .\"O changed.
227 デフォルトの値で仕様にマッチしているので、
228 変更する必要は全くないはずである。
229 .\"O .SS Ioctls
230 .SS ioctl
231 .\"O All ioctls described in
232 .\"O .BR socket (7)
233 .\"O apply to DDP.
234 .BR socket (7)
235 に記述されているすべての ioctl が
236 DDP にも適用される。
237 .\" FIXME Add a section about multicasting
238 .\"O .SH ERRORS
239 .SH エラー
240 .\" FIXME document all errors. We should really fix the kernels to
241 .\" give more uniform error returns (ENOMEM vs ENOBUFS, EPERM vs
242 .\" EACCES etc.)
243 .TP
244 .B EACCES
245 .\"O The user tried to execute an operation without the necessary permissions.
246 .\"O These include sending to a broadcast address without
247 .\"O having the broadcast flag set,
248 .\"O and trying to bind to a reserved port without effective user ID 0 or
249 .\"O .BR CAP_NET_BIND_SERVICE .
250 ユーザが行おうとした操作に必要な権限を持っていない。
251 broadcast フラグをセットせずにブロードキャストアドレスへ送信を行おうとした、
252 実効ユーザー ID が 0 でなく、
253 .B CAP_NET_BIND_SERVICE
254 権限のないプロセスで特権ポートをバインドしようとした、などが考えられる。
255 .TP
256 .B EADDRINUSE
257 .\"O Tried to bind to an address already in use.
258 既に使用されているアドレスにバインドしようとした。
259 .TP
260 .B EADDRNOTAVAIL
261 .\"O A nonexistent interface was requested or the requested source address was
262 .\"O not local.
263 存在しないインターフェースが要求された。または
264 要求されたソースアドレスがローカルなものでない。
265 .TP
266 .B EAGAIN
267 .\"O Operation on a nonblocking socket would block.
268 非ブロッキングソケットに対してブロックする操作を行った。
269 .TP
270 .B EALREADY
271 .\"O A connection operation on a nonblocking socket is already in progress.
272 非ブロッキングソケットに対する接続操作が既に実行中である。
273 .TP
274 .B ECONNABORTED
275 .\"O A connection was closed during an
276 .\"O .BR accept (2).
277 .BR accept (2)
278 の途中で接続がクローズされた。
279 .TP
280 .B EHOSTUNREACH
281 .\"O No routing table entry matches the destination address.
282 行き先アドレスにマッチするエントリがルーティングテーブルにない。
283 .TP
284 .B EINVAL
285 .\"O Invalid argument passed.
286 渡した引数が不正。
287 .TP
288 .B EISCONN
289 .\"O .BR connect (2)
290 .\"O was called on an already connected socket.
291 接続済みのソケットに対して
292 .BR connect (2)
293 が呼ばれた。
294 .TP
295 .B EMSGSIZE
296 .\"O Datagram is bigger than the DDP MTU.
297 データグラムが DDP MTU より大きい。
298 .TP
299 .B ENODEV
300 .\"O Network device not available or not capable of sending IP.
301 ネットワークデバイスがない。あるいは IP を送ることができない。
302 .TP
303 .B ENOENT
304 .\"O .B SIOCGSTAMP
305 .\"O was called on a socket where no packet arrived.
306 パケットが到着していないソケットに対して
307 .B SIOCGSTAMP
308 が呼ばれた。
309 .TP
310 .\"O .BR ENOMEM " and " ENOBUFS
311 .BR ENOMEM " と " ENOBUFS
312 .\"O Not enough memory available.
313 メモリが足りない。
314 .TP
315 .B ENOPKG
316 .\"O A kernel subsystem was not configured.
317 カーネルのサブシステムが設定されていない。
318 .TP
319 .\"O .BR ENOPROTOOPT " and " EOPNOTSUPP
320 .BR ENOPROTOOPT " と " EOPNOTSUPP
321 .\"O Invalid socket option passed.
322 渡したソケットオプションが不正。
323 .TP
324 .B ENOTCONN
325 .\"O The operation is only defined on a connected socket, but the socket wasn't
326 .\"O connected.
327 行おうとした操作は接続済みのソケットに対してのみ定義されているものだが、
328 そのソケットは接続されていなかった。
329 .TP
330 .B EPERM
331 .\"O User doesn't have permission to set high priority,
332 .\"O make a configuration change,
333 .\"O or send signals to the requested process or group,
334 高い優先度に設定したり、設定を変更したり、
335 指定したプロセスやグループにシグナルを送るのに必要な権限を
336 ユーザが持っていない。
337 .TP
338 .B EPIPE
339 .\"O The connection was unexpectedly closed or shut down by the other end.
340 接続が先方によって、通常以外のやり方でクローズまたはシャットダウンされた。
341 .TP
342 .B ESOCKTNOSUPPORT
343 .\"O The socket was unconfigured, or an unknown socket type was requested.
344 ソケットが設定されていない。または未知のソケットタイプが要求された。
345 .\"O .SH VERSIONS
346 .SH バージョン
347 .\"O Appletalk is supported by Linux 2.0 or higher.
348 .\"O The
349 .\"O .I /proc
350 .\"O interfaces exist since Linux 2.2.
351 Appletalk は Linux 2.0 以降でサポートされている。
352 .I /proc
353 インタフェースは Linux 2.2 以降に存在する。
354 .\"O .SH NOTES
355 .SH 注意
356 .\"O Be very careful with the
357 .\"O .B SO_BROADCAST
358 .\"O option \- it is not privileged in Linux.
359 .\"O It is easy to overload the network
360 .\"O with careless sending to broadcast addresses.
361 .B SO_BROADCAST
362 オプションを用いる時には慎重の上にも慎重になってほしい。
363 Linux ではこれに特権を必要としない。
364 不注意にブロードキャストアドレスに送信を行うと、
365 ネットワークの状態が簡単に変更されてしまう。
366 .\"O .SS Compatibility
367 .SS 移植性
368 .\"O The basic AppleTalk socket interface is compatible with
369 .\"O .B netatalk
370 .\"O on BSD-derived systems.
371 .\"O Many BSD systems fail to check
372 .\"O .B SO_BROADCAST
373 .\"O when sending broadcast frames; this can lead to compatibility problems.
374 基本的な Appletalk ソケットインターフェースは
375 BSD 由来のシステムにおける
376 .B netatalk
377 と互換性がある。多くの BSD システムでは、
378 ブロードキャストフレームを送信しようとしたときの
379 .B SO_BROADCAST
380 のチェックに失敗する。これは互換性の問題となるかもしれない。
381 .PP
382 .\"O The
383 .\"O raw
384 .\"O socket mode is unique to Linux and exists to support the alternative CAP
385 .\"O package and AppleTalk monitoring tools more easily.
386 raw ソケットモードは Linux 独特のもので、もう一方の実装である CAP
387 パッケージや、 Appletalk モニタツールをより簡単に実装できるようになる。
388 .\"O .SH BUGS
389 .SH バグ
390 .\"O There are too many inconsistent error values.
391 エラーの値がまったく首尾一貫していない。
392 .PP
393 .\"O The ioctls used to configure routing tables, devices,
394 .\"O AARP tables and other devices are not yet described.
395 ルーティングテーブル・デバイス・ AARP テーブル・その他のデバイスを
396 設定するために用いられる ioctl がまだ記述されていない。
397 .\"O .SH SEE ALSO
398 .SH 関連項目
399 .BR recvmsg (2),
400 .BR sendmsg (2),
401 .BR capabilities (7),
402 .BR socket (7)