64,691
社区成员
发帖
与我相关
我的任务
分享
The protocol specifies a particular protocol to be used with the socket. Normally only a single protocol exists to support a particular socket type
within a given protocol family, in which case protocol can be specified as 0. However, it is possible that many protocols may exist, in which case a
particular protocol must be specified in this manner. The protocol number to use is specific to the “communication domain” in which communication is to
take place; see protocols(5). See getprotoent(3) on how to map protocol name strings to protocol numbers.
AME
protocols - 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.
FILES
/etc/protocols
The protocols definition file.
# /etc/protocols:
# $Id: protocols,v 1.9 2009/09/29 15:11:55 ovasik Exp $
#
# Internet (IP) protocols
#
# from: @(#)protocols 5.1 (Berkeley) 4/17/89
#
# Updated for NetBSD based on RFC 1340, Assigned Numbers (July 1992).
# Last IANA update included dated 2009-06-18
#
# See also http://www.iana.org/assignments/protocol-numbers
ip 0 IP # internet protocol, pseudo protocol number
hopopt 0 HOPOPT # hop-by-hop options for ipv6
icmp 1 ICMP # internet control message protocol
igmp 2 IGMP # internet group management protocol
ggp 3 GGP # gateway-gateway protocol
ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'')
st 5 ST # ST datagram mode
tcp 6 TCP # transmission control protocol
cbt 7 CBT # CBT, Tony Ballardie <A.Ballardie@cs.ucl.ac.uk>
egp 8 EGP # exterior gateway protocol
igp 9 IGP # any private interior gateway (Cisco: for IGRP)
bbn-rcc 10 BBN-RCC-MON # BBN RCC Monitoring
nvp 11 NVP-II # Network Voice Protocol
pup 12 PUP # PARC universal packet protocol
argus 13 ARGUS # ARGUS
emcon 14 EMCON # EMCON
xnet 15 XNET # Cross Net Debugger
chaos 16 CHAOS # Chaos
udp 17 UDP # user datagram protocol