NAME 名称
protocols - 协议定义文件
描述
该文件为普通 ASCII 文件,它描述了 TCP/IP 子系统中各类 DARPA internet 协议族.你应该参考这个文件, 而不是使用 ARPA 的 include 文件中的号码, 更不必去猜测它们. 这些号码将出现在任何 ip 包头的协议字段中.
你应该保持这个文件不变, 因为修改会导致不正确的 ip 包. 协议号码和名字由 DDN 网络信息中心指定.
每行的格式如下:
- 协议 号码 别名 ...
这里的字段以空格或者 tab 键分隔. 空行和以散列符 (#) 开头的行将忽略. 从散列符起始的行的剩余部分也将忽略.
字段描述如下:
- 协议
- 协议的本名.例如 :ip, tcp 或者 udp.
- 号码
- 协议的正式号码, 它将出现在 ip 包头中.
- 别名
- 协议的可选别名.
该文件也可以使用网络范围中的名字服务,如黄页/NIS 或 BIND/Hesoid,在网络分发.
文件
- /etc/protocols
- 协议定义文件.
参见
getprotoent(3)
#p#
NAME
protocols - the protocols definition file
DESCRIPTION
This file is a plain ASCII file, describing the various DARPA internet protocols that are available from the TCP/IP subsystem. It should be consulted instead of using the numbers in the ARPA include files, or, even worse, just guessing them. These numbers will occur in the protocol field of any ip header.
Keep this file untouched since changes would result in incorrect ip packages. Protocol numbers and names are specified by the IANA (Internet Assigned Numbers Authority).
Each line is of the following format:
- protocol number aliases ...
where the fields are delimited by spaces or tabs. Empty lines are ignored. If a line contains a hash mark (#), the hash mark and the part of the line following it are ignored.
The field descriptions are:
- protocol
- the native name for the protocol. For example ip, tcp, or udp.
- number
- the official number for this protocol as it will appear within the ip header.
- aliases
- optional aliases for the protocol.
This file might be distributed over a network using a networkwide naming service like Yellow Pages/NIS or BIND/Hesiod.
FILES
- /etc/protocols
- The protocols definition file.
SEE ALSO
getprotoent(3)