成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

services 中文man頁面

系統
services 是一個普通的 ASCII 碼文件, 它在 internet 服務的友好原文名以及這些服務預先分配的端口和協議類型之間提供了映射. 每個聯網程序必須查找該文件以獲取其服務的端口號(和協議). C 庫例程 getservent(3), getservbyname(3), getservbyport(3), setservent(3), 和 endservent(3) 支持由程序查詢該文件.

NAME(名稱)

services - Internet 網絡服務列表  

DESCRIPTION(描述)

services 是一個普通的 ASCII 碼文件, 它在 internet 服務的友好原文名以及這些服務預先分配的端口和協議類型之間提供了映射. 每個聯網程序必須查找該文件以獲取其服務的端口號(和協議). C 庫例程 getservent(3), getservbyname(3), getservbyport(3), setservent(3), 和 endservent(3) 支持由程序查詢該文件.

端口號由 IANA(Internet Assigned Numbers Authority) 分配, 他們當前的工作是分配端口號時, 指定 TCP 和 UDP 協議. 這樣, 大多數記錄會包括兩條子記錄, 即使只是 TCP 的服務也是如此

端口號在 1024 之下的(也稱作'低編碼'端口)只能由 root (參見 bind(2),tcp(7),udp(7).) 綁定. 這樣連接到低編碼端口的客戶可信任運行在該端口上的服務是標準的實現, 而不是由某臺機器的用戶運行的無聊的服務.由 IANA 確定的眾所周知的端口號通常只在 root 的控制范圍之內

services 文件中出現的一條服務記錄并不表示該服務當前在機器上運行.參見 inetd.conf(5) 以獲知提供的Internet服務的配置.注意不是所有聯網服務都由 inetd(8) 啟動,因而也不會出現在 inetd.conf(5) 之中. 特別地,news (NNTP)和mail (SMTP)服務程序通常由系統引導腳本初始化.

services 文件所存放的位置由 /usr/include/netdb.h 中的 _PATH_SERVICES 定義. 它通常設為 /etc/services.

每行描述了一個服務,其格式如下:

服務名   端口/協議   [別名 ...] 這里的
服務名
是給服務所起的可供查找的友好的名字.它是區分大小寫的.通常,客戶端程序都以 服務名 命名.
端口
為該服務所用的端口號(十進制格式).
協議
為所使用的協議類型.該字段應與 protocols(5) 文件中的一條記錄相匹配.典型的值包括 tcpudp.
別名
可以空缺,或者是以tab分隔的該服務的其他名字的列表(不過請查看下面的BUGS章節).同樣, 這些名字也是區分大小寫的.

可以使用空格或者tab分隔這些字段.

注釋以hash標識(#)開頭,一直到該行末結束.空行可跳過.

服務名 必須是該文件的第一列,因為其前面的空格不會刪去. 服務名 可以為任何可打印的字符,包括空格和tab,但是,應該使用字符的保守選擇來最低限度地減少操作中的問題.例如:a-z,0-9,和連字符(-)看上去就是一個合理的選擇.

不匹配該格式的行不應該在該文件中出現.(當前情況下, getservent(3),getservbyname(3),getservbyport(3) 可以忽略它們.不過,不應該依靠這種方法.)

為了向后兼容,在 端口 號和 協議 名之間的斜杠(/)實際可以為斜杠或者是逗號(,).在現代的安裝中使用逗號是落后的.

該文件也可以通過使用網絡級命名服務如黃頁/NIS(Yellow Pages/NIS)或BIND/Hesiod來在一個網絡中發布.

一個 services 的樣本文件看上去如下:


netstat         15/tcp
qotd            17/tcp          quote
msp             18/tcp          # message send protocol
msp             18/udp          # message send protocol
chargen         19/tcp          ttytst source
chargen         19/udp          ttytst source
ftp             21/tcp
# 22 - unassigned
telnet          23/tcp

BUGS

最大只能有35個別名,這是由 getservent(3) 代碼的寫入方式決定的.

BUFSIZ (當前為1024)個字符更長的行, getservent(3),getservbyname(3),andgetservbyport(3) 會忽略掉. 不過,這也會導致錯過下一行.  

FILES(相關文件)

/etc/services
Internet網絡服務列表
/usr/include/netdb.h
_PATH_SERVICES 的定義

SEE ALSO(另見)

getservent(3), getservbyname(3), getservbyport(3), setservent(3), endservent(3), protocols(5), listen(2), inetd.conf(5), inetd(8).

#p#

NAME

services - Internet network services list  

DESCRIPTION

services is a plain ASCII file providing a mapping between 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 protocols 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 /usr/include/netdb.h. This is usually set to /etc/services.

Each line describes one service, and is of the form:

service-name   port/protocol   [aliases ...]
where:
service-name
is the friendly name the service is known by and looked up under. It is case sensitive. Often, the client program is named after the service-name.
port
is the port number (in decimal) to use for this service.
protocol
is the type of protocol to be used. This field should match an entry in the protocols(5) file. Typical values include tcp and udp.
aliases
is an optional space or tab separated list of other names for this service (but see the BUGS section below). Again, the names are case sensitive.

Either spaces or tabs may be used to separate the fields.

Comments are started by the hash sign (#) and continue until the end of the line. Blank lines are skipped.

The service-name should begin in the first column of the file, since leading spaces are not stripped. service-names can be any printable characters excluding space and tab. However, a conservative choice of characters should be used to minimize inter-operability problems. E.g., a-z, 0-9, and hyphen (-) would seem a sensible choice.

Lines not matching this format should not be present in the file. (Currently, they are silently skipped by getservent(3), getservbyname(3), and getservbyport(3). However, this behaviour should not be relied on.)

As a backwards compatibility feature, the slash (/) between the port number and protocol name can in fact be either a slash or a comma (,). Use of the comma in modern installations is depreciated.

This file might be distributed over a network using a network-wide naming service like Yellow Pages/NIS or BIND/Hesiod.

A sample services file might look like this:


netstat         15/tcp
qotd            17/tcp          quote
msp             18/tcp          # message send protocol
msp             18/udp          # message send protocol
chargen         19/tcp          ttytst source
chargen         19/udp          ttytst source
ftp             21/tcp
# 22 - unassigned
telnet          23/tcp

BUGS

There is a maximum of 35 aliases, due to the way the getservent(3) code is written.

Lines longer than BUFSIZ (currently 1024) characters will be ignored by getservent(3), getservbyname(3), and getservbyport(3). However, this will also cause the next line to be mis-parsed.  

FILES

/etc/services
The Internet network services list
/usr/include/netdb.h
Definition of _PATH_SERVICES

SEE ALSO

getservent(3), getservbyname(3), getservbyport(3), setservent(3), endservent(3), protocols(5), listen(2), inetd.conf(5), inetd(8)

責任編輯:韓亞珊 來源: CMPP.net
相關推薦

2011-08-15 10:21:09

man中文man

2011-08-24 16:48:36

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-08-11 15:03:21

ACCESS中文man

2011-08-11 15:28:43

ali中文man

2011-08-11 16:31:49

biff中文man

2011-08-11 17:16:43

cce中文man

2011-08-11 18:05:04

chvt中文man

2011-08-11 18:13:07

clear中文man

2011-08-12 09:13:02

df中文man

2011-08-12 09:38:06

dircolors中文man

2011-08-12 09:44:37

dirname中文man

2011-08-12 10:20:02

echo中文man

2011-08-12 10:25:55

eject中文man

2011-08-12 11:07:19

git中文man

2011-08-12 13:18:19

head中文man

2011-08-12 13:49:23

hostid中文man

2011-08-12 13:54:46

hostname中文man

2011-08-12 14:53:56

kill中文man
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 91免费观看国产 | 国产伦精品一区二区三区视频金莲 | 国产成人精品综合 | av电影一区二区 | 成人精品鲁一区一区二区 | 国产精品免费一区二区三区 | 999久久久 | 精品日韩一区二区三区av动图 | 九九久久国产 | 欧美日韩精品在线一区 | 在线观看欧美一区 | 亚洲一区二区三区免费在线观看 | 午夜激情小视频 | 中文字幕亚洲视频 | 九九热精品视频在线观看 | 欧美成人精品在线观看 | 日韩在线观看中文字幕 | 久久精品国产清自在天天线 | 亚洲一区二区视频 | 亚洲精品成人av久久 | 国产激情在线观看 | 久久只有精品 | 超碰av在线 | 精品欧美一区二区三区久久久 | 久久久久久久久久性 | 色中文在线 | 国产精品高潮呻吟久久 | 精品欧美激情在线观看 | 免费看a| 欧美日韩成人影院 | 中文字幕成人av | 国产精品久久久久久久久久妞妞 | 天天干天天干 | 欧美精品三区 | 亚洲精品一区二区网址 | 久久精品国产免费 | 久久国产成人精品国产成人亚洲 | 成人福利网站 | 777毛片| 欧美精品一区二区三区在线播放 | 午夜国产羞羞视频免费网站 |