OSDN Git Service

Update README
[linuxjm/LDP_man-pages.git] / draft / man5 / services.5
1 .\" This manpage is Copyright (C) 1996 Austin Donnelly <and1000@cam.ac.uk>,
2 .\" with additional material Copyright (c) 1995 Martin Schulze
3 .\"     <joey@infodrom.north.de>
4 .\"
5 .\" %%%LICENSE_START(VERBATIM)
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
9 .\"
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
14 .\"
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein.  The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" %%%LICENSE_END
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 .\"*******************************************************************
35 .\"
36 .\" This file was generated with po4a. Translate the source file.
37 .\"
38 .\"*******************************************************************
39 .\"
40 .\" Japanese Version Copyright (c) 1997 MOTOKI Akihiro
41 .\"       all rights reserved.
42 .\" Translated Wed Aug 20 08:32:26 JST 1997
43 .\"       by MOTOKI Akihiro <motoki@hal.t.u-tokyo.ac.jp>
44 .\"
45 .TH SERVICES 5 2010\-05\-22 Linux "Linux Programmer's Manual"
46 .SH 名前
47 services \- インターネット ネットワークサービス リスト
48 .SH 説明
49 \fBservices\fP は、人が分かりやすい形のインターネットサービスの名前と、 それらのサービスに割り当てられたポート番号や
50 プロトコル種別の対応関係が書かれているテキストファイルである。 ネットワーク上で動作するプログラムはすべて、 そのサービスに対応するポート番号
51 (とプロトコル) を得るために、 このファイルを調べる必要がある。 C ライブラリ関数である \fBgetservent\fP(3),
52 \fBgetservbyname\fP(3), \fBgetservbyport\fP(3), \fBsetservent\fP(3), \fBendservent\fP(3)
53 を利用することで、プログラムはこのファイルを調べることができる。
54
55 ポート番号は、IANA (Internet Assigned Numbers Authority) によって
56 割り当てられており、現在はポート番号を割り当てる際に TCP と UDP の両方のプロトコルを割り当てることになっている。
57 そのため、ほとんどのサービスに対して、 たとえ TCP だけのサービスの場合であっても、対応する項目が二つあることになる。
58
59 1024 より小さいポート番号 (いわゆる "low numbered" ポート) は 管理者 (root) 権限によってのみ使用することができる
60 (\fBbind\fP(2), \fBtcp\fP(7), \fBudp\fP(7)  参照)。 これは、これらのポートに接続するクライアントに対して、
61 そのポートで動いているサービスが標準的な実装であり、 その計算機のユーザーが動かしている 不正なサービスではないことを保証するためである。 IANA
62 に明記されているよく使用されるポート番号は、 通常このような管理者だけが使用できる範囲に配置される。
63
64 \fBservices\fP ファイルにあるサービスに対する項目があっても、必ずしもそのサービスが現
65 在その計算機で動いている訳ではない。利用可能なインターネットサービスの設定に ついては \fBinetd.conf\fP(5)
66 に記述されている。ただし、すべてのサービスが \fBinetd\fP(8)  によって起動されるわけではないので、 \fBinetd.conf\fP(5)
67 には書かれていないサービスもあることに注意する必要がある。 特に、ネットニュース (NNTP) や メール (SMTP) のサーバーは、システム起動時の
68 スクリプトから起動されることが多い。
69
70 \fBservices\fP ファイルの場所は、 \fI<netdb.h>\fP 中の \fB_PATH_SERVICES\fP によって定義されている。
71 この値は通常 \fI/etc/services\fP に設定されている。
72
73 1 行につき 1 サービスが記述されており、以下の形式である。
74 .IP
75 \fIservice\-name\ \ \ port\fP\fB/\fP\fIprotocol\ \ \ \fP[\fIaliases ...\fP]
76 .TP 
77 各項目は以下の通り。
78 .TP  10
79 \fIservice\-name\fP
80 サービスを表す分かりやすい名前であり、検索の際にも使用される。 大文字と小文字は区別される。 クライアントプログラムは \fIservice\-name\fP
81 にちなんで名付けられることが多い。
82 .TP 
83 \fIport\fP
84 サービスに対して使用されるポート番号。10 進数で指定する。
85 .TP 
86 \fIprotocol\fP
87 使用されるプロトコルの種類。この欄は、 \fBprotocols\fP(5)  ファイルの中の項目と一致している必要がある。 通常使用される値は、
88 \fBtcp\fP と \fBudp\fP である。
89 .TP 
90 \fIaliases\fP
91 サービスに対する別名のリスト (区切はスペースまたはタブ) で、この欄は 必要にならば書くことができる。 また、別名は大文字と小文字は区別される。
92 .PP
93 それぞれの欄の区切りには、スペースまたはタブが使用される。
94
95 コメントはシャープ (#) で始まり、その行の終わりまでがコメントとみなされる。 空行は飛ばされる。
96
97 行の始めのスペースは無視されないので、 \fIservice\-name\fP は、行頭から書かなければならない。 \fIservice\-names\fP
98 は、スペースとタブ以外の印字可能な文字なら何でもよいが、しかしながら 互換性の問題を少なくするような文字を選択すべきである。 例えば、a\-z 、0\-9
99 、ハイフォン (\-) を使用するのが無難と思われる。
100
101 指定された形式に合わない行はあってはならない (現在は、そのような行は \fBgetservent\fP(3), \fBgetservbyname\fP(3),
102 \fBgetservbyport\fP(3)  によって無視される。しかし、その場合の挙動は信頼できない)。
103
104 .\" The following is not true as at glibc 2.8 (a line with a comma is
105 .\" ignored by getservent()); it's not clear if/when it was ever true.
106 .\"   As a backward compatibility feature, the slash (/) between the
107 .\"   .I port
108 .\"   number and
109 .\"   .I protocol
110 .\"   name can in fact be either a slash or a comma (,).
111 .\"   Use of the comma in
112 .\"   modern installations is deprecated.
113 .\"
114 このファイルは Yellow Pages/NIS や BIND/Hesiod
115 のようなネットワーク上の名前サービスを用いて、ネットワークを通じて配布される可能性もある。
116
117 \fBservices\fP ファイルの見本を以下に示す。
118 .RS
119 .nf
120 .sp
121 \f(CWnetstat         15/tcp
122 qotd            17/tcp          quote
123 msp             18/tcp          # message send protocol
124 msp             18/udp          # message send protocol
125 chargen         19/tcp          ttytst source
126 chargen         19/udp          ttytst source
127 ftp             21/tcp
128 # 22 \- unassigned
129 telnet          23/tcp\fP
130 .fi
131 .RE
132 .SH ファイル
133 .TP 
134 \fI/etc/services\fP
135 インターネット ネットワークサービスのリスト
136 .TP 
137 \fI<netdb.h>\fP
138 .\" .SH BUGS
139 .\" It's not clear when/if the following was ever true;
140 .\" it isn't true for glibc 2.8:
141 .\"    There is a maximum of 35 aliases, due to the way the
142 .\"    .BR getservent (3)
143 .\"    code is written.
144 .\"
145 .\" It's not clear when/if the following was ever true;
146 .\" it isn't true for glibc 2.8:
147 .\"    Lines longer than
148 .\"    .B BUFSIZ
149 .\"    (currently 1024) characters will be ignored by
150 .\"    .BR getservent (3),
151 .\"    .BR getservbyname (3),
152 .\"    and
153 .\"    .BR getservbyport (3).
154 .\"    However, this will also cause the next line to be mis-parsed.
155 \fB_PATH_SERVICES\fP の定義
156 .SH 関連項目
157 \fBlisten\fP(2), \fBendservent\fP(3), \fBgetservbyname\fP(3), \fBgetservbyport\fP(3),
158 \fBgetservent\fP(3), \fBsetservent\fP(3), \fBinetd.conf\fP(5), \fBprotocols\fP(5),
159 \fBinetd\fP(8)
160
161 ポート番号の割り当てを定めている RFC (最新版は RFC\ 1700、別名 STD0002)
162 .SH この文書について
163 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
164 である。プロジェクトの説明とバグ報告に関する情報は
165 http://www.kernel.org/doc/man\-pages/ に書かれている。