Current File : //usr/man/man4/protocols.4
'\" te
.\"  Copyright 1989 AT&T  
.\" Copyright (C) 2002, Sun Microsystems, Inc. All Rights Reserved
.TH protocols 4 "10 Dec 2009" "SunOS 5.11" "File Formats"
.SH NAME
protocols \- protocol name database
.SH SYNOPSIS
.LP
.nf
\fB/etc/inet/protocols\fR
.fi

.LP
.nf
\fB/etc/protocols\fR
.fi

.SH DESCRIPTION
.sp
.LP
The \fBprotocols\fR file  is a local source of information regarding the known protocols used in the \fBDARPA\fR Internet. The protocols file can be used in conjunction with or instead of other protocols sources, including the \fBNIS\fR maps ``protcols.byname'' and "protocols.bynumber". Programs use the \fBgetprotobyname\fR(3SOCKET) routine to access this information.
.sp
.LP
The \fBprotocols\fR file has one line for each protocol. The line has the following format:
.sp
.in +2
.nf
\fIofficial-protocol-name\fR \fIprotocol-number\fR \fIaliases\fR
.fi
.in -2

.sp
.LP
Items are separated by any number of blanks and/or TAB characters. A `\fB#\fR' indicates the beginning of a comment; characters up to the end of the line are not interpreted by routines which search the file. Protocol names may contain any printable character other than a field delimiter, NEWLINE, or comment character.
.SH EXAMPLES
.LP
\fBExample 1 \fRA Sample Database
.sp
.LP
The following is a sample database:

.sp
.in +2
.nf
#
# Internet (IP) protocols
#
ip          0   IP          # internet protocol, pseudo protocol number
icmp        1   ICMP        # internet control message protocol
ggp         3   GGP         # gateway-gateway protocol
tcp         6   TCP         # transmission control protocol
egp         8   EGP         # exterior gateway protocol
pup         12  PUP         # PARC universal packet protocol
udp         17  UDP         # user datagram protocol

#
# Internet (IPv6) extension headers
#
hopopt      0   HOPOPT      # Hop-by-hop options for IPv6
ipv6        41  IPv6        # IPv6 in IP encapsulation
ipv6-route  43  IPv6-Route  # Routing header for IPv6
ipv6-frag   44  IPv6-Frag   # Fragment header for IPv6
esp         50  ESP         # Encap Security Payload for IPv6
ah          51  AH          # Authentication Header for IPv6
ipv6-icmp   58  IPv6-ICMP   # IPv6 internet control message protocol
ipv6-nonxt  59  IPv6-NoNxt  # No next header extension header for IPv6
ipv6-opts   60  IPv6-Opts   # Destination Options for IPv6
.fi
.in -2
.sp

.SH FILES
.sp
.ne 2
.mk
.na
\fB\fB/etc/nsswitch.conf\fR\fR
.ad
.RS 22n
.rt  
configuration file for name-service switch
.RE

.SH SEE ALSO
.sp
.LP
\fBgetprotobyname\fR(3SOCKET), \fBnsswitch.conf\fR(4)
.SH NOTES
.sp
.LP
\fB/etc/inet/protocols\fR is the official SVR4 name of the \fBprotocols\fR file.  The symbolic link \fB/etc/protocols\fR exists for \fBBSD\fR compatibility.