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