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 (c) 1995 Martin Schulze <joey@infodrom.north.de>
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.
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.
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
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
26 .\" This manpage was made by merging two independently written manpages,
27 .\" one written by Martin Schulze (18 Oct 95), the other written by
28 .\" Austin Donnelly, (9 Jan 96).
30 .\" Thu Jan 11 12:14:41 1996 Austin Donnelly <and1000@cam.ac.uk>
31 .\" * Merged two services(5) manpages
33 .TH SERVICES 5 1996-01-11 "Linux" "Linux Programmer's Manual"
35 services \- Internet network services list
38 is a plain ASCII file providing a mapping between friendly textual
39 names for internet services, and their underlying assigned port
40 numbers and protocol types. Every networking program should look into
41 this file to get the port number (and protocol) for its service.
42 The C library routines
44 .BR getservbyname (3),
45 .BR getservbyport (3),
49 support querying this file from programs.
51 Port numbers are assigned by the IANA (Internet Assigned Numbers
52 Authority), and their current policy is to assign both TCP and UDP
53 protocols when assigning a port number. Therefore, most entries will
54 have two entries, even for TCP only services.
56 Port numbers below 1024 (so-called 'low numbered' ports) can only be
62 This is so clients connecting to low numbered ports can trust
63 that the service running on the port is the standard implementation,
64 and not a rogue service run by a user of the machine. Well-known port
65 numbers specified by the IANA are normally located in this root-only
68 The presence of an entry for a service in the
70 file does not necessarily mean that the service is currently running
73 for the configuration of Internet services offered. Note that not all
74 networking services are started by
76 and so won't appear in
78 In particular, news (NNTP) and mail (SMTP) servers are often
79 initialized from the system boot scripts.
86 .IR /usr/include/netdb.h "."
87 This is usually set to
90 Each line describes one service, and is of the form:
92 \f2service-name\ \ \ port\f3/\f2protocol\ \ \ \f1[\f2aliases ...\f1]
97 is the friendly name the service is known by and looked up under. It
98 is case sensitive. Often, the client program is named after the
102 is the port number (in decimal) to use for this service.
105 is the type of protocol to be used. This field should match an entry
108 file. Typical values include
114 is an optional space or tab separated list of other names for this
115 service (but see the BUGS section below). Again, the names are case
119 Either spaces or tabs may be used to separate the fields.
121 Comments are started by the hash sign (#) and continue until the end
122 of the line. Blank lines are skipped.
126 should begin in the first column of the file, since leading spaces are
129 can be any printable characters excluding space and tab. However,
130 a conservative choice of characters should be used to minimize
131 inter-operability problems. E.g., a-z, 0-9, and hyphen (\-) would seem a
134 Lines not matching this format should not be present in the
135 file. (Currently, they are silently skipped by
137 .BR getservbyname (3),
139 .BR getservbyport (3).
140 However, this behaviour should not be relied on.)
142 As a backwards compatibility feature, the slash (/) between the
146 name can in fact be either a slash or a comma (,). Use of the comma in
147 modern installations is depreciated.
149 This file might be distributed over a network using a network-wide
150 naming service like Yellow Pages/NIS or BIND/Hesiod.
154 file might look like this:
161 msp 18/tcp # message send protocol
162 msp 18/udp # message send protocol
163 chargen 19/tcp ttytst source
164 chargen 19/udp ttytst source
172 There is a maximum of 35 aliases, due to the way the
178 (currently 1024) characters will be ignored by
180 .BR getservbyname (3),
182 .BR getservbyport (3).
183 However, this will also cause the next line to be mis-parsed.
187 The Internet network services list
189 .I /usr/include/netdb.h
195 .BR getservbyname (3),
196 .BR getservbyport (3),
203 Assigned Numbers RFC, most recently RFC 1700, (AKA STD0002)
205 Guide to Yellow Pages Service
207 Guide to BIND/Hesiod Service