OSDN Git Service

64b9f5a2191bb5f68cb5b7cb00b57bebb6539109
[linuxjm/LDP_man-pages.git] / draft / man5 / services.5
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" This manpage is Copyright (C) 1996 Austin Donnelly <and1000@cam.ac.uk>,
4 .\" with additional material Copyright (c) 1995 Martin Schulze
5 .\"     <joey@infodrom.north.de>
6 .\"
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 .\"
27 .\"   This manpage was made by merging two independently written manpages,
28 .\"   one written by Martin Schulze (18 Oct 95), the other written by
29 .\"   Austin Donnelly, (9 Jan 96).
30 .\"
31 .\" Thu Jan 11 12:14:41 1996 Austin Donnelly  <and1000@cam.ac.uk>
32 .\"   * Merged two services(5) manpages
33 .\"
34 .\" Japanese Version Copyright (c) 1997 MOTOKI Akihiro
35 .\"       all rights reserved.
36 .\" Translated Wed Aug 20 08:32:26 JST 1997
37 .\"       by MOTOKI Akihiro <motoki@hal.t.u-tokyo.ac.jp>
38 .\"
39 .TH SERVICES 5 2010-05-22 "Linux" "Linux Programmer's Manual"
40 .\"O .SH NAME
41 .SH 名前
42 .\"O services \- Internet network services list
43 services \- インターネット ネットワークサービス リスト
44 .\"O .SH DESCRIPTION
45 .SH 説明
46 .\"O .B services
47 .\"O is a plain ASCII file providing a mapping between human-friendly textual
48 .\"O names for internet services, and their underlying assigned port
49 .\"O numbers and protocol types.
50 .\"O Every networking program should look into
51 .\"O this file to get the port number (and protocol) for its service.
52 .B services
53 は、人が分かりやすい形のインターネットサービスの名前と、
54 それらのサービスに割り当てられたポート番号や
55 プロトコル種別の対応関係が書かれているテキストファイルである。
56 ネットワーク上で動作するプログラムはすべて、
57 そのサービスに対応するポート番号 (とプロトコル) を得るために、
58 このファイルを調べる必要がある。
59 .\"O The C library routines
60 .\"O .BR getservent (3),
61 .\"O .BR getservbyname (3),
62 .\"O .BR getservbyport (3),
63 .\"O .BR setservent (3),
64 .\"O and 
65 .\"O .BR endservent (3)
66 .\"O support querying this file from programs.
67 C ライブラリ関数である
68 .BR getservent (3),
69 .BR getservbyname (3),
70 .BR getservbyport (3),
71 .BR setservent (3),
72 .BR endservent (3)
73 を利用することで、プログラムはこのファイルを調べることができる。
74
75 .\"O Port numbers are assigned by the IANA (Internet Assigned Numbers
76 .\"O Authority), and their current policy is to assign both TCP and UDP
77 .\"O protocols when assigning a port number.
78 .\"O Therefore, most entries will
79 .\"O have two entries, even for TCP-only services.
80 ポート番号は、IANA (Internet Assigned Numbers Authority) によって
81 割り当てられており、現在はポート番号を割り当てる際に
82 TCP と UDP の両方のプロトコルを割り当てることになっている。
83 そのため、ほとんどのサービスに対して、
84 たとえ TCP だけのサービスの場合であっても、対応する項目が二つあることになる。
85
86 .\"O Port numbers below 1024 (so-called "low numbered" ports) can only be
87 .\"O bound to by root (see
88 .\"O .BR bind (2),
89 .\"O .BR tcp (7),
90 .\"O and 
91 .\"O .BR udp (7)).
92 .\"O This is so clients connecting to low numbered ports can trust
93 .\"O that the service running on the port is the standard implementation,
94 .\"O and not a rogue service run by a user of the machine.
95 .\"O Well-known port numbers specified by the IANA are normally
96 .\"O located in this root-only space.
97 1024 より小さいポート番号 (いわゆる "low numbered" ポート) は
98 管理者 (root) 権限によってのみ使用することができる
99 .RB ( bind (2), 
100 .BR tcp (7),
101 .BR udp (7)
102 参照)。
103 これは、これらのポートに接続するクライアントに対して、
104 そのポートで動いているサービスが標準的な実装であり、
105 その計算機のユーザーが動かしている
106 不正なサービスではないことを保証するためである。
107 IANA に明記されているよく使用されるポート番号は、
108 通常このような管理者だけが使用できる範囲に配置される。
109
110 .\"O The presence of an entry for a service in the 
111 .\"O .B services
112 .\"O file does not necessarily mean that the service is currently running
113 .\"O on the machine.
114 .\"O See
115 .\"O .BR inetd.conf (5)
116 .\"O for the configuration of Internet services offered.
117 .\"O Note that not all
118 .\"O networking services are started by
119 .\"O .BR inetd (8),
120 .\"O and so won't appear in
121 .\"O .BR inetd.conf (5).
122 .B services
123 ファイルにあるサービスに対する項目があっても、必ずしもそのサービスが現
124 在その計算機で動いている訳ではない。利用可能なインターネットサービスの設定に
125 ついては
126 .BR inetd.conf (5)
127 に記述されている。ただし、すべてのサービスが
128 .BR inetd (8)
129 によって起動されるわけではないので、
130 .BR inetd.conf (5)
131 には書かれていないサービスもあることに注意する必要がある。
132 .\"O In particular, news (NNTP) and mail (SMTP) servers are often
133 .\"O initialized from the system boot scripts.
134 特に、ネットニュース (NNTP) や メール (SMTP) のサーバーは、システム起動時の
135 スクリプトから起動されることが多い。
136
137 .\"O The location of the
138 .\"O .B services
139 .\"O file is defined by
140 .\"O .B _PATH_SERVICES
141 .\"O in
142 .\"O .IR <netdb.h> "."
143 .\"O This is usually set to
144 .\"O .IR /etc/services "."
145 .B services
146 ファイルの場所は、
147 .I <netdb.h>
148 中の
149 .B _PATH_SERVICES
150 によって定義されている。
151 この値は通常
152 .I /etc/services
153 に設定されている。
154
155 .\"O Each line describes one service, and is of the form:
156  1 行につき 1 サービスが記述されており、その形式は以下の通りである。
157 .IP
158 \f2service-name\ \ \ port\f3/\f2protocol\ \ \ \f1[\f2aliases ...\f1]
159 .TP
160 .\"O where:
161 .TP 10
162 .I service-name
163 .\"O is the friendly name the service is known by and looked up under.
164 .\"O It is case sensitive.
165 .\"O Often, the client program is named after the
166 .\"O .IR service-name "."
167 サービスを表す分かりやすい名前であり、検索の際にも使用される。
168 大文字と小文字は区別される。
169 クライアントプログラムは
170 .I service-name
171 にちなんで名付けられることが多い。
172 .TP
173 .I port
174 .\"O is the port number (in decimal) to use for this service.
175 サービスに対して使用されるポート番号。10 進数で指定する。
176 .TP
177 .I protocol
178 .\"O is the type of protocol to be used.
179 .\"O This field should match an entry
180 .\"O in the
181 .\"O .BR protocols (5)
182 .\"O file.
183 .\"O Typical values include
184 .\"O .B tcp
185 .\"O and
186 .\"O .BR udp .
187 使用されるプロトコルの種類。この欄は、
188 .BR protocols (5)
189 ファイルの中の項目と一致している必要がある。
190 通常使用される値は、
191 .B tcp
192
193 .B udp 
194 である。
195 .TP
196 .I aliases
197 .\"O is an optional space or tab separated list of other names for this
198 .\"O service.
199 .\"O Again, the names are case
200 .\"O sensitive.
201 サービスに対する別名のリスト (区切はスペースまたはタブ) で、この欄は
202 必要にならば書くことができる。
203 また、別名は大文字と小文字は区別される。
204 .PP
205 .\"O Either spaces or tabs may be used to separate the fields.
206 それぞれの欄の区切りには、スペースまたはタブが使用される。
207
208 .\"O Comments are started by the hash sign (#) and continue until the end
209 .\"O of the line.
210 .\"O Blank lines are skipped.
211 コメントはシャープ (#) で始まり、その行の終わりまでがコメントとみなされる。
212 空行は飛ばされる。
213
214 .\"O The
215 .\"O .I service-name
216 .\"O should begin in the first column of the file, since leading spaces are
217 .\"O not stripped.
218 行の始めのスペースは無視されないので、
219 .I service-name
220 は、行頭から書かなければならない。
221 .\"O .I service-names
222 .\"O can be any printable characters excluding space and tab.
223 .\"O However, a conservative choice of characters should be used to minimize
224 .\"O compatibility problems.
225 .\"O E.g., a\-z, 0\-9, and hyphen (\-) would seem a
226 .\"O sensible choice.
227 .I service-names
228 は、スペースとタブ以外の印字可能な文字なら何でもよいが、しかしながら
229 互換性の問題を少なくするような文字を選択すべきである。
230 例えば、a\-z 、0\-9 、ハイフォン (\-) を使用するのが無難と思われる。
231
232 .\"O Lines not matching this format should not be present in the
233 .\"O file.
234 .\"O (Currently, they are silently skipped by
235 .\"O .BR getservent (3),
236 .\"O .BR getservbyname (3),
237 .\"O and
238 .\"O .BR getservbyport (3).
239 .\"O However, this behavior should not be relied on.)
240 指定された形式に合わない行はあってはならない (現在は、そのような行は
241 .BR getservent (3),
242 .BR getservbyname (3),
243 .BR getservbyport (3)
244 によって無視される。しかし、その場合の挙動は信頼できない)。
245
246 .\" The following is not true as at glibc 2.8 (a line with a comma is
247 .\" ignored by getservent()); it's not clear if/when it was ever true.
248 .\"O .\"   As a backward compatibility feature, the slash (/) between the
249 .\"O .\"   .I port
250 .\"O .\"   number and
251 .\"O .\"   .I protocol
252 .\"O .\"   name can in fact be either a slash or a comma (,).
253 .\"O .\"   Use of the comma in
254 .\"O .\"   modern installations is deprecated.
255 .\"   古いバージョンとの整合性の問題から、実際には
256 .\"   .I port
257 .\"   番号と
258 .\"   .I protocol
259 .\"   の間のスラッシュ (/) は、スラッシュかコンマ (,) のどちらでも構わない。
260 .\"   しかしながら、今なおコンマを使用するのは望ましいことではない。
261 .\"   
262 .\"O This file might be distributed over a network using a network-wide
263 .\"O naming service like Yellow Pages/NIS or BIND/Hesiod.
264 このファイルは、Yellow Pages/NIS や BIND/Hesiod のようなネットワーク上の名前
265 サービスを用いて、ネットワークを通じて配布される可能性もある。
266
267 .\"O A sample
268 .\"O .B services
269 .\"O file might look like this:
270 .B services
271 ファイルの見本を以下に示す。
272 .RS
273 .nf
274 .sp
275 .ta 3i
276 netstat         15/tcp
277 qotd            17/tcp          quote
278 msp             18/tcp          # message send protocol
279 msp             18/udp          # message send protocol
280 chargen         19/tcp          ttytst source
281 chargen         19/udp          ttytst source
282 ftp             21/tcp
283 # 22 \- unassigned
284 telnet          23/tcp
285 .fi
286 .RE
287 .\"O .SH FILES
288 .SH ファイル
289 .TP
290 .I /etc/services
291 .\"O The Internet network services list
292 インターネット ネットワークサービスのリスト
293 .TP
294 .I <netdb.h>
295 .\"O Definition of
296 .\"O .B _PATH_SERVICES
297 .B _PATH_SERVICES
298 の定義
299 .\"O .\" .SH BUGS
300 .\" .SH バグ
301 .\" It's not clear when/if the following was ever true;
302 .\" it isn't true for glibc 2.8:
303 .\"O .\"    There is a maximum of 35 aliases, due to the way the
304 .\"O .\"    .BR getservent (3)
305 .\"O .\"    code is written.
306 .\"O .\"
307 .\"    .BR getservent (3)
308 .\"    のコードの書き方の問題で、35 個までしか別名を付けることができない。
309 .\"
310 .\" It's not clear when/if the following was ever true;
311 .\" it isn't true for glibc 2.8:
312 .\"O .\"   Lines longer than
313 .\"O .\"   .B BUFSIZ
314 .\"O .\"   (currently 1024) characters will be ignored by
315 .\"O .\"   .BR getservent (3),
316 .\"O .\"   .BR getservbyname (3),
317 .\"O .\"   and
318 .\"O .\"   .BR getservbyport (3).
319 .\"O .\"   However, this will also cause the next line to be mis-parsed.
320 .\"   .B BUFSIZ
321 .\"   (現在は 1024) 文字より長い行は、
322 .\"   .BR getservent (3),
323 .\"   .BR getservbyname (3),
324 .\"   .BR getservbyport (3)
325 .\"   により無視される。さらに、このことは次の行が正しく解釈されない原因となる。
326 .\"O .SH "SEE ALSO"
327 .SH 関連項目
328 .BR listen (2),
329 .BR endservent (3),
330 .BR getservbyname (3),
331 .BR getservbyport (3),
332 .BR getservent (3),
333 .BR setservent (3),
334 .BR inetd.conf (5),
335 .BR protocols (5),
336 .BR inetd (8)
337
338 .\"O Assigned Numbers RFC, most recently RFC\ 1700, (AKA STD0002)
339 ポート番号の割り当てを定めている RFC (最新版は RFC\ 1700、別名 STD0002)