1 .\" Hey Emacs! This file is -*- nroff -*- source.
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>
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.
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.
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
24 .\" Formatted or processed versions of this manual, if unaccompanied by
25 .\" the source, must acknowledge the copyright and authors of this work.
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).
31 .\" Thu Jan 11 12:14:41 1996 Austin Donnelly <and1000@cam.ac.uk>
32 .\" * Merged two services(5) manpages
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>
39 .TH SERVICES 5 2008-09-23 "Linux" "Linux Programmer's Manual"
42 .\"O services \- Internet network services list
43 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.
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),
65 .\"O .BR endservent (3)
66 .\"O support querying this file from programs.
67 C ¥é¥¤¥Ö¥é¥ê´Ø¿ô¤Ç¤¢¤ë
69 .BR getservbyname (3),
70 .BR getservbyport (3),
73 ¤òÍøÍѤ¹¤ë¤³¤È¤Ç¡¢¥×¥í¥°¥é¥à¤Ï¤³¤Î¥Õ¥¡¥¤¥ë¤òÄ´¤Ù¤ë¤³¤È¤¬¤Ç¤¤ë¡£
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 ¤À¤±¤Î¥µ¡¼¥Ó¥¹¤Î¾ì¹ç¤Ç¤¢¤Ã¤Æ¤â¡¢Âбþ¤¹¤ë¹àÌܤ¬Æó¤Ä¤¢¤ë¤³¤È¤Ë¤Ê¤ë¡£
86 .\"O Port numbers below 1024 (so-called "low numbered" ports) can only be
87 .\"O bound to by root (see
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) ¸¢¸Â¤Ë¤è¤Ã¤Æ¤Î¤ß»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤¤ë
103 ¤³¤ì¤Ï¡¢¤³¤ì¤é¤Î¥Ý¡¼¥È¤ËÀܳ¤¹¤ë¥¯¥é¥¤¥¢¥ó¥È¤ËÂФ·¤Æ¡¢
104 ¤½¤Î¥Ý¡¼¥È¤ÇÆ°¤¤¤Æ¤¤¤ë¥µ¡¼¥Ó¥¹¤¬É¸½àŪ¤Ê¼ÂÁõ¤Ç¤¢¤ê¡¢
105 ¤½¤Î·×»»µ¡¤Î¥æ¡¼¥¶¡¼¤¬Æ°¤«¤·¤Æ¤¤¤ë
106 ÉÔÀµ¤Ê¥µ¡¼¥Ó¥¹¤Ç¤Ï¤Ê¤¤¤³¤È¤òÊݾڤ¹¤ë¤¿¤á¤Ç¤¢¤ë¡£
107 IANA ¤ËÌÀµ¤µ¤ì¤Æ¤¤¤ë¤è¤¯»ÈÍѤµ¤ì¤ë¥Ý¡¼¥ÈÈÖ¹æ¤Ï¡¢
108 Ä̾盧¤Î¤è¤¦¤Ê´ÉÍý¼Ô¤À¤±¤¬»ÈÍѤǤ¤ëÈϰϤËÇÛÃÖ¤µ¤ì¤ë¡£
110 .\"O The presence of an entry for a service in the
112 .\"O file does not necessarily mean that the service is currently running
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
120 .\"O and so won't appear in
121 .\"O .BR inetd.conf (5).
123 ¥Õ¥¡¥¤¥ë¤Ë¤¢¤ë¥µ¡¼¥Ó¥¹¤ËÂФ¹¤ë¹àÌܤ¬¤¢¤Ã¤Æ¤â¡¢É¬¤º¤·¤â¤½¤Î¥µ¡¼¥Ó¥¹¤¬¸½
124 ºß¤½¤Î·×»»µ¡¤ÇÆ°¤¤¤Æ¤¤¤ëÌõ¤Ç¤Ï¤Ê¤¤¡£ÍøÍѲÄǽ¤Ê¥¤¥ó¥¿¡¼¥Í¥Ã¥È¥µ¡¼¥Ó¥¹¤ÎÀßÄê¤Ë
127 ¤Ëµ½Ò¤µ¤ì¤Æ¤¤¤ë¡£¤¿¤À¤·¡¢¤¹¤Ù¤Æ¤Î¥µ¡¼¥Ó¥¹¤¬
129 ¤Ë¤è¤Ã¤Æµ¯Æ°¤µ¤ì¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤¤Î¤Ç¡¢
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 ¥¹¥¯¥ê¥×¥È¤«¤éµ¯Æ°¤µ¤ì¤ë¤³¤È¤¬Â¿¤¤¡£
137 .\"O The location of the
139 .\"O file is defined by
140 .\"O .B _PATH_SERVICES
142 .\"O .IR <netdb.h> "."
143 .\"O This is usually set to
144 .\"O .IR /etc/services "."
150 ¤Ë¤è¤Ã¤ÆÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
155 .\"O Each line describes one service, and is of the form:
156 1 ¹Ô¤Ë¤Ä¤ 1 ¥µ¡¼¥Ó¥¹¤¬µ½Ò¤µ¤ì¤Æ¤ª¤ê¡¢¤½¤Î·Á¼°¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡£
158 \f2service-name\ \ \ port\f3/\f2protocol\ \ \ \f1[\f2aliases ...\f1]
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 ¥¯¥é¥¤¥¢¥ó¥È¥×¥í¥°¥é¥à¤Ï
171 ¤Ë¤Á¤Ê¤ó¤Ç̾ÉÕ¤±¤é¤ì¤ë¤³¤È¤¬Â¿¤¤¡£
174 .\"O is the port number (in decimal) to use for this service.
175 ¥µ¡¼¥Ó¥¹¤ËÂФ·¤Æ»ÈÍѤµ¤ì¤ë¥Ý¡¼¥ÈÈֹ档10 ¿Ê¿ô¤Ç»ØÄꤹ¤ë¡£
178 .\"O is the type of protocol to be used.
179 .\"O This field should match an entry
181 .\"O .BR protocols (5)
183 .\"O Typical values include
187 »ÈÍѤµ¤ì¤ë¥×¥í¥È¥³¥ë¤Î¼ïÎà¡£¤³¤ÎÍó¤Ï¡¢
189 ¥Õ¥¡¥¤¥ë¤ÎÃæ¤Î¹àÌܤȰìÃפ·¤Æ¤¤¤ëɬÍפ¬¤¢¤ë¡£
197 .\"O is an optional space or tab separated list of other names for this
198 .\"O service (but see the BUGS section below).
199 .\"O Again, the names are case
201 ¥µ¡¼¥Ó¥¹¤ËÂФ¹¤ëÊÌ̾¤Î¥ê¥¹¥È (¶èÀڤϥ¹¥Ú¡¼¥¹¤Þ¤¿¤Ï¥¿¥Ö) ¤Ç¡¢¤³¤ÎÍó¤Ï
202 ɬÍפˤʤé¤Ð½ñ¤¯¤³¤È¤¬¤Ç¤¤ë
203 (⤷¡¢²¼µ¤Î¥Ð¥°¤Î¥»¥¯¥·¥ç¥ó¤ò»²¾È¤Î¤³¤È)¡£¤Þ¤¿¡¢ÊÌ̾¤Ï
204 Âçʸ»ú¤È¾®Ê¸»ú¤Ï¶èÊ̤µ¤ì¤ë¡£
206 .\"O Either spaces or tabs may be used to separate the fields.
207 ¤½¤ì¤¾¤ì¤ÎÍó¤Î¶èÀÚ¤ê¤Ë¤Ï¡¢¥¹¥Ú¡¼¥¹¤Þ¤¿¤Ï¥¿¥Ö¤¬»ÈÍѤµ¤ì¤ë¡£
209 .\"O Comments are started by the hash sign (#) and continue until the end
211 .\"O Blank lines are skipped.
212 ¥³¥á¥ó¥È¤Ï¥·¥ã¡¼¥× (#) ¤Ç»Ï¤Þ¤ê¡¢¤½¤Î¹Ô¤Î½ª¤ï¤ê¤Þ¤Ç¤¬¥³¥á¥ó¥È¤È¤ß¤Ê¤µ¤ì¤ë¡£
217 .\"O should begin in the first column of the file, since leading spaces are
219 ¹Ô¤Î»Ï¤á¤Î¥¹¥Ú¡¼¥¹¤Ï̵»ë¤µ¤ì¤Ê¤¤¤Î¤Ç¡¢
221 ¤Ï¡¢¹ÔƬ¤«¤é½ñ¤«¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
222 .\"O .I service-names
223 .\"O can be any printable characters excluding space and tab.
224 .\"O However, a conservative choice of characters should be used to minimize
225 .\"O compatibility problems.
226 .\"O E.g., a\-z, 0\-9, and hyphen (\-) would seem a
227 .\"O sensible choice.
229 ¤Ï¡¢¥¹¥Ú¡¼¥¹¤È¥¿¥Ö°Ê³°¤Î°õ»ú²Äǽ¤Êʸ»ú¤Ê¤é²¿¤Ç¤â¤è¤¤¤¬¡¢¤·¤«¤·¤Ê¤¬¤é
230 ¸ß´¹À¤ÎÌäÂê¤ò¾¯¤Ê¤¯¤¹¤ë¤è¤¦¤Êʸ»ú¤òÁªÂò¤¹¤Ù¤¤Ç¤¢¤ë¡£
231 Î㤨¤Ð¡¢a\-z ¡¢0\-9 ¡¢¥Ï¥¤¥Õ¥©¥ó (\-) ¤ò»ÈÍѤ¹¤ë¤Î¤¬ÌµÆñ¤È»×¤ï¤ì¤ë¡£
233 .\"O Lines not matching this format should not be present in the
235 .\"O (Currently, they are silently skipped by
236 .\"O .BR getservent (3),
237 .\"O .BR getservbyname (3),
239 .\"O .BR getservbyport (3).
240 .\"O However, this behavior should not be relied on.)
241 »ØÄꤵ¤ì¤¿·Á¼°¤Ë¹ç¤ï¤Ê¤¤¹Ô¤Ï¤¢¤Ã¤Æ¤Ï¤Ê¤é¤Ê¤¤ (¸½ºß¤Ï¡¢¤½¤Î¤è¤¦¤Ê¹Ô¤Ï
243 .BR getservbyname (3),
244 .BR getservbyport (3)
245 ¤Ë¤è¤Ã¤Æ̵»ë¤µ¤ì¤ë¡£¤·¤«¤·¡¢¤½¤Î¾ì¹ç¤ÎµóÆ°¤Ï¿®Íê¤Ç¤¤Ê¤¤)¡£
247 .\" The following is not true as at glibc 2.8 (a line with a comma is
248 .\" ignored by getservent()); it's not clear if/when it was ever true.
249 .\"O .\" As a backwards compatibility feature, the slash (/) between the
253 .\"O .\" name can in fact be either a slash or a comma (,).
254 .\"O .\" Use of the comma in
255 .\"O .\" modern installations is deprecated.
256 .\" ¸Å¤¤¥Ð¡¼¥¸¥ç¥ó¤È¤ÎÀ°¹çÀ¤ÎÌäÂ꤫¤é¡¢¼ÂºÝ¤Ë¤Ï
260 .\" ¤Î´Ö¤Î¥¹¥é¥Ã¥·¥å (/) ¤Ï¡¢¥¹¥é¥Ã¥·¥å¤«¥³¥ó¥Þ (,) ¤Î¤É¤Á¤é¤Ç¤â¹½¤ï¤Ê¤¤¡£
261 .\" ¤·¤«¤·¤Ê¤¬¤é¡¢º£¤Ê¤ª¥³¥ó¥Þ¤ò»ÈÍѤ¹¤ë¤Î¤Ï˾¤Þ¤·¤¤¤³¤È¤Ç¤Ï¤Ê¤¤¡£
263 .\"O This file might be distributed over a network using a network-wide
264 .\"O naming service like Yellow Pages/NIS or BIND/Hesiod.
265 ¤³¤Î¥Õ¥¡¥¤¥ë¤Ï¡¢Yellow Pages/NIS ¤ä BIND/Hesiod ¤Î¤è¤¦¤Ê¥Í¥Ã¥È¥ï¡¼¥¯¾å¤Î̾Á°
266 ¥µ¡¼¥Ó¥¹¤òÍѤ¤¤Æ¡¢¥Í¥Ã¥È¥ï¡¼¥¯¤òÄ̤¸¤ÆÇÛÉÛ¤µ¤ì¤ë²ÄǽÀ¤â¤¢¤ë¡£
270 .\"O file might look like this:
272 ¥Õ¥¡¥¤¥ë¤Î¸«Ëܤò°Ê²¼¤Ë¼¨¤¹¡£
279 msp 18/tcp # message send protocol
280 msp 18/udp # message send protocol
281 chargen 19/tcp ttytst source
282 chargen 19/udp ttytst source
292 .\"O The Internet network services list
293 ¥¤¥ó¥¿¡¼¥Í¥Ã¥È ¥Í¥Ã¥È¥ï¡¼¥¯¥µ¡¼¥Ó¥¹¤Î¥ê¥¹¥È
297 .\"O .B _PATH_SERVICES
302 .\" It's not clear when/if the following was ever true;
303 .\" it isn't true for glibc 2.8:
304 .\"O .\" There is a maximum of 35 aliases, due to the way the
305 .\"O .\" .BR getservent (3)
306 .\"O .\" code is written.
308 .\" .BR getservent (3)
309 .\" ¤Î¥³¡¼¥É¤Î½ñ¤Êý¤ÎÌäÂê¤Ç¡¢35 ¸Ä¤Þ¤Ç¤·¤«ÊÌ̾¤òÉÕ¤±¤ë¤³¤È¤¬¤Ç¤¤Ê¤¤¡£
311 .\" It's not clear when/if the following was ever true;
312 .\" it isn't true for glibc 2.8:
313 .\"O .\" Lines longer than
315 .\"O .\" (currently 1024) characters will be ignored by
316 .\"O .\" .BR getservent (3),
317 .\"O .\" .BR getservbyname (3),
319 .\"O .\" .BR getservbyport (3).
320 .\"O .\" However, this will also cause the next line to be mis-parsed.
322 .\" (¸½ºß¤Ï 1024) ʸ»ú¤è¤êŤ¤¹Ô¤Ï¡¢
323 .\" .BR getservent (3),
324 .\" .BR getservbyname (3),
325 .\" .BR getservbyport (3)
326 .\" ¤Ë¤è¤ê̵»ë¤µ¤ì¤ë¡£¤µ¤é¤Ë¡¢¤³¤Î¤³¤È¤Ï¼¡¤Î¹Ô¤¬Àµ¤·¤¯²ò¼á¤µ¤ì¤Ê¤¤¸¶°ø¤È¤Ê¤ë¡£
331 .BR getservbyname (3),
332 .BR getservbyport (3),
339 .\"O Assigned Numbers RFC, most recently RFC\ 1700, (AKA STD0002)
340 ¥Ý¡¼¥ÈÈÖ¹æ¤Î³ä¤êÅö¤Æ¤òÄê¤á¤Æ¤¤¤ë RFC (ºÇ¿·ÈÇ¤Ï RFC\ 1700¡¢ÊÌ̾ STD0002)