SERVICES(5) Linux Programmer’s Manual SERVICES(5)
名前
services - インターネット ネットワークサービス リスト
説明
services は、人が分かりやすい形のインターネットサービスの名前と、それら
のサービスに割り当てられたポート番号やプロトコル種別の対応関係が書か れ
て いるテキストファイルである。ネットワーク上で動作するプログラムはすべ
て、そのサービスに対応するポート番号 (とプロトコル) を得るために、こ の
ファイルを調べる必要がある。 C ライブラリ関数である getservent(3), get-
servbyname(3), getservbyport(3), setservent(3), endservent(3) を利用 す
ることで、プログラムはこのファイルを調べることができる。
ポート番号は、IANA (Internet Assigned Numbers Authority) によって割り当
てられており、現在はポート番号を割り当てる際に TCP と UDP の両方のプ ロ
ト コルを割り当てることになっている。そのため、ほとんどのサービスに対し
て、たとえ TCP だけのサービスの場合であっても、対応する項目が二つあるこ
とになる。
1024 よ り 小さいポート番号 (いわゆる "low numbered" ポート) は管理者
(root) 権限によってのみ使用することができる (bind(2), tcp(7), udp(7) 参
照)。これは、これらのポートに接続するクライアントに対して、そのポートで
動いているサービスが標準的な実装であり、その計算機のユーザーが動かし て
い る不正なサービスではないことを保証するためである。 IANA に明記されて
いるよく使用されるポート番号は、通常このような管理者だけが使用できる 範
囲に配置される。
services ファイルにあるサービスに対する項目があっても、必ずしもそのサー
ビスが現在その計算機で動いている訳ではない。利用可能なインターネット サ
ービスの設定については inetd.conf(5) に記述されている。ただし、すべての
サービスが inetd(8) によって起動されるわけではないので、 inetd.conf(5)
に は書かれていないサービスもあることに注意する必要がある。特に、ネット
ニュース (NNTP) や メール (SMTP) のサーバーは、システム起動時のスクリプ
トから起動されることが多い。
services ファイルの場所は、
SERVICES(5) Linux Programmer’s Manual SERVICES(5)
NAME
services - Internet network services list
DESCRIPTION
services is a plain ASCII file providing a mapping between human-
friendly textual names for internet services, and their underlying
assigned port numbers and protocol types. Every networking program
should look into this file to get the port number (and protocol) for
its service. The C library routines getservent(3), getservbyname(3),
getservbyport(3), setservent(3), and endservent(3) support querying
this file from programs.
Port numbers are assigned by the IANA (Internet Assigned Numbers
Authority), and their current policy is to assign both TCP and UDP pro-
tocols when assigning a port number. Therefore, most entries will have
two entries, even for TCP-only services.
Port numbers below 1024 (so-called "low numbered" ports) can only be
bound to by root (see bind(2), tcp(7), and udp(7)). This is so clients
connecting to low numbered ports can trust that the service running on
the port is the standard implementation, and not a rogue service run by
a user of the machine. Well-known port numbers specified by the IANA
are normally located in this root-only space.
The presence of an entry for a service in the services file does not
necessarily mean that the service is currently running on the machine.
See inetd.conf(5) for the configuration of Internet services offered.
Note that not all networking services are started by inetd(8), and so
won’t appear in inetd.conf(5). In particular, news (NNTP) and mail
(SMTP) servers are often initialized from the system boot scripts.
The location of the services file is defined by _PATH_SERVICES in
コロナウイルスの日ごとの感染者数・死者数をグラフ化してみました。どの国が増加傾向にあり、どの国が終息に向かっているかを視覚化しています。
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa