xref: /aosp_15_r20/external/tcpdump/ipproto.h (revision 05b00f6010a2396e3db2409989fc67270046269f)
1*05b00f60SXin Li /*
2*05b00f60SXin Li  * Copyright (c) 1982, 1986, 1990, 1993
3*05b00f60SXin Li  *	The Regents of the University of California.  All rights reserved.
4*05b00f60SXin Li  *
5*05b00f60SXin Li  * Redistribution and use in source and binary forms, with or without
6*05b00f60SXin Li  * modification, are permitted provided that the following conditions
7*05b00f60SXin Li  * are met:
8*05b00f60SXin Li  * 1. Redistributions of source code must retain the above copyright
9*05b00f60SXin Li  *    notice, this list of conditions and the following disclaimer.
10*05b00f60SXin Li  * 2. Redistributions in binary form must reproduce the above copyright
11*05b00f60SXin Li  *    notice, this list of conditions and the following disclaimer in the
12*05b00f60SXin Li  *    documentation and/or other materials provided with the distribution.
13*05b00f60SXin Li  * 3. All advertising materials mentioning features or use of this software
14*05b00f60SXin Li  *    must display the following acknowledgement:
15*05b00f60SXin Li  *	This product includes software developed by the University of
16*05b00f60SXin Li  *	California, Berkeley and its contributors.
17*05b00f60SXin Li  * 4. Neither the name of the University nor the names of its contributors
18*05b00f60SXin Li  *    may be used to endorse or promote products derived from this software
19*05b00f60SXin Li  *    without specific prior written permission.
20*05b00f60SXin Li  *
21*05b00f60SXin Li  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22*05b00f60SXin Li  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23*05b00f60SXin Li  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24*05b00f60SXin Li  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25*05b00f60SXin Li  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26*05b00f60SXin Li  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27*05b00f60SXin Li  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28*05b00f60SXin Li  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29*05b00f60SXin Li  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30*05b00f60SXin Li  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31*05b00f60SXin Li  * SUCH DAMAGE.
32*05b00f60SXin Li  *
33*05b00f60SXin Li  * From:
34*05b00f60SXin Li  *	@(#)in.h	8.3 (Berkeley) 1/3/94
35*05b00f60SXin Li  * $FreeBSD: src/sys/netinet/in.h,v 1.38.2.3 1999/08/29 16:29:34 peter Exp $
36*05b00f60SXin Li  */
37*05b00f60SXin Li 
38*05b00f60SXin Li extern const struct tok ipproto_values[];
39*05b00f60SXin Li extern const char *netdb_protoname (const uint8_t);
40*05b00f60SXin Li 
41*05b00f60SXin Li #ifndef IPPROTO_IP
42*05b00f60SXin Li #define	IPPROTO_IP		0		/* dummy for IP */
43*05b00f60SXin Li #endif
44*05b00f60SXin Li #ifndef IPPROTO_HOPOPTS
45*05b00f60SXin Li #define IPPROTO_HOPOPTS		0		/* IPv6 hop-by-hop options */
46*05b00f60SXin Li #endif
47*05b00f60SXin Li #ifndef IPPROTO_ICMP
48*05b00f60SXin Li #define	IPPROTO_ICMP		1		/* control message protocol */
49*05b00f60SXin Li #endif
50*05b00f60SXin Li #ifndef IPPROTO_IGMP
51*05b00f60SXin Li #define	IPPROTO_IGMP		2		/* group mgmt protocol */
52*05b00f60SXin Li #endif
53*05b00f60SXin Li #ifndef IPPROTO_IPV4
54*05b00f60SXin Li #define IPPROTO_IPV4		4
55*05b00f60SXin Li #endif
56*05b00f60SXin Li #ifndef IPPROTO_TCP
57*05b00f60SXin Li #define	IPPROTO_TCP		6		/* tcp */
58*05b00f60SXin Li #endif
59*05b00f60SXin Li #ifndef IPPROTO_EGP
60*05b00f60SXin Li #define	IPPROTO_EGP		8		/* exterior gateway protocol */
61*05b00f60SXin Li #endif
62*05b00f60SXin Li #ifndef IPPROTO_PIGP
63*05b00f60SXin Li #define IPPROTO_PIGP		9
64*05b00f60SXin Li #endif
65*05b00f60SXin Li #ifndef IPPROTO_UDP
66*05b00f60SXin Li #define	IPPROTO_UDP		17		/* user datagram protocol */
67*05b00f60SXin Li #endif
68*05b00f60SXin Li #ifndef IPPROTO_DCCP
69*05b00f60SXin Li #define	IPPROTO_DCCP		33		/* datagram congestion control protocol */
70*05b00f60SXin Li #endif
71*05b00f60SXin Li #ifndef IPPROTO_IPV6
72*05b00f60SXin Li #define IPPROTO_IPV6		41
73*05b00f60SXin Li #endif
74*05b00f60SXin Li #ifndef IPPROTO_ROUTING
75*05b00f60SXin Li #define IPPROTO_ROUTING		43		/* IPv6 routing header */
76*05b00f60SXin Li #endif
77*05b00f60SXin Li #ifndef IPPROTO_FRAGMENT
78*05b00f60SXin Li #define IPPROTO_FRAGMENT	44		/* IPv6 fragmentation header */
79*05b00f60SXin Li #endif
80*05b00f60SXin Li #ifndef IPPROTO_RSVP
81*05b00f60SXin Li #define IPPROTO_RSVP		46		/* resource reservation */
82*05b00f60SXin Li #endif
83*05b00f60SXin Li #ifndef IPPROTO_GRE
84*05b00f60SXin Li #define	IPPROTO_GRE		47		/* General Routing Encap. */
85*05b00f60SXin Li #endif
86*05b00f60SXin Li #ifndef IPPROTO_ESP
87*05b00f60SXin Li #define	IPPROTO_ESP		50		/* SIPP Encap Sec. Payload */
88*05b00f60SXin Li #endif
89*05b00f60SXin Li #ifndef IPPROTO_AH
90*05b00f60SXin Li #define	IPPROTO_AH		51		/* SIPP Auth Header */
91*05b00f60SXin Li #endif
92*05b00f60SXin Li #ifndef IPPROTO_MOBILE
93*05b00f60SXin Li #define IPPROTO_MOBILE		55
94*05b00f60SXin Li #endif
95*05b00f60SXin Li #ifndef IPPROTO_ICMPV6
96*05b00f60SXin Li #define IPPROTO_ICMPV6		58		/* ICMPv6 */
97*05b00f60SXin Li #endif
98*05b00f60SXin Li #ifndef IPPROTO_NONE
99*05b00f60SXin Li #define IPPROTO_NONE		59		/* IPv6 no next header */
100*05b00f60SXin Li #endif
101*05b00f60SXin Li #ifndef IPPROTO_DSTOPTS
102*05b00f60SXin Li #define IPPROTO_DSTOPTS		60		/* IPv6 destination options */
103*05b00f60SXin Li #endif
104*05b00f60SXin Li #ifndef IPPROTO_MOBILITY_OLD
105*05b00f60SXin Li /*
106*05b00f60SXin Li  * The current Protocol Numbers list says that the IP protocol number for
107*05b00f60SXin Li  * mobility headers is 135; it cites RFC 6275 (obsoletes RFC 3775).
108*05b00f60SXin Li  *
109*05b00f60SXin Li  * It appears that 62 used to be used, even though that's assigned to
110*05b00f60SXin Li  * a protocol called CFTP; however, the only reference for CFTP is a
111*05b00f60SXin Li  * Network Message from BBN back in 1982, so, for now, we support 62,
112*05b00f60SXin Li  * as well as 135, as a protocol number for mobility headers.
113*05b00f60SXin Li  */
114*05b00f60SXin Li #define IPPROTO_MOBILITY_OLD	62
115*05b00f60SXin Li #endif
116*05b00f60SXin Li #ifndef IPPROTO_ND
117*05b00f60SXin Li #define	IPPROTO_ND		77		/* Sun net disk proto (temp.) */
118*05b00f60SXin Li #endif
119*05b00f60SXin Li #ifndef IPPROTO_EIGRP
120*05b00f60SXin Li #define	IPPROTO_EIGRP		88		/* Cisco/GXS IGRP */
121*05b00f60SXin Li #endif
122*05b00f60SXin Li #ifndef IPPROTO_OSPF
123*05b00f60SXin Li #define IPPROTO_OSPF		89
124*05b00f60SXin Li #endif
125*05b00f60SXin Li #ifndef IPPROTO_PIM
126*05b00f60SXin Li #define IPPROTO_PIM		103
127*05b00f60SXin Li #endif
128*05b00f60SXin Li #ifndef IPPROTO_IPCOMP
129*05b00f60SXin Li #define IPPROTO_IPCOMP		108
130*05b00f60SXin Li #endif
131*05b00f60SXin Li #ifndef IPPROTO_VRRP
132*05b00f60SXin Li #define IPPROTO_VRRP		112 /* See also CARP. */
133*05b00f60SXin Li #endif
134*05b00f60SXin Li #ifndef IPPROTO_PGM
135*05b00f60SXin Li #define IPPROTO_PGM             113
136*05b00f60SXin Li #endif
137*05b00f60SXin Li #ifndef IPPROTO_SCTP
138*05b00f60SXin Li #define IPPROTO_SCTP		132
139*05b00f60SXin Li #endif
140*05b00f60SXin Li #ifndef IPPROTO_MOBILITY
141*05b00f60SXin Li #define IPPROTO_MOBILITY	135
142*05b00f60SXin Li #endif
143*05b00f60SXin Li #ifndef IPPROTO_ETHERNET
144*05b00f60SXin Li #define IPPROTO_ETHERNET	143 /* TEMPORARY - registered 2020-01-31, expires 2021-01-31 */
145*05b00f60SXin Li #endif
146