1127668Sbms/*
2127668Sbms * Copyright (c) 1982, 1986, 1990, 1993
3127668Sbms *	The Regents of the University of California.  All rights reserved.
4127668Sbms *
5127668Sbms * Redistribution and use in source and binary forms, with or without
6127668Sbms * modification, are permitted provided that the following conditions
7127668Sbms * are met:
8127668Sbms * 1. Redistributions of source code must retain the above copyright
9127668Sbms *    notice, this list of conditions and the following disclaimer.
10127668Sbms * 2. Redistributions in binary form must reproduce the above copyright
11127668Sbms *    notice, this list of conditions and the following disclaimer in the
12127668Sbms *    documentation and/or other materials provided with the distribution.
13127668Sbms * 3. All advertising materials mentioning features or use of this software
14127668Sbms *    must display the following acknowledgement:
15127668Sbms *	This product includes software developed by the University of
16127668Sbms *	California, Berkeley and its contributors.
17127668Sbms * 4. Neither the name of the University nor the names of its contributors
18127668Sbms *    may be used to endorse or promote products derived from this software
19127668Sbms *    without specific prior written permission.
20127668Sbms *
21127668Sbms * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22127668Sbms * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23127668Sbms * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24127668Sbms * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25127668Sbms * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26127668Sbms * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27127668Sbms * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28127668Sbms * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29127668Sbms * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30127668Sbms * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31127668Sbms * SUCH DAMAGE.
32127668Sbms *
33127668Sbms * From:
34127668Sbms *	@(#)in.h	8.3 (Berkeley) 1/3/94
35313537Sglebius * $FreeBSD: stable/11/contrib/tcpdump/ipproto.h 276788 2015-01-07 19:55:18Z delphij $
36127668Sbms */
37127668Sbms
38214478Srpauloextern const struct tok ipproto_values[];
39327234Semasteextern const char *netdb_protoname (const nd_uint8_t);
40146773Ssam
41127668Sbms#ifndef IPPROTO_IP
42127668Sbms#define	IPPROTO_IP		0		/* dummy for IP */
43127668Sbms#endif
44127668Sbms#ifndef IPPROTO_HOPOPTS
45127668Sbms#define IPPROTO_HOPOPTS		0		/* IPv6 hop-by-hop options */
46127668Sbms#endif
47127668Sbms#ifndef IPPROTO_ICMP
48127668Sbms#define	IPPROTO_ICMP		1		/* control message protocol */
49127668Sbms#endif
50127668Sbms#ifndef IPPROTO_IGMP
51127668Sbms#define	IPPROTO_IGMP		2		/* group mgmt protocol */
52127668Sbms#endif
53127668Sbms#ifndef IPPROTO_IPV4
54127668Sbms#define IPPROTO_IPV4		4
55127668Sbms#endif
56127668Sbms#ifndef IPPROTO_TCP
57127668Sbms#define	IPPROTO_TCP		6		/* tcp */
58127668Sbms#endif
59127668Sbms#ifndef IPPROTO_EGP
60127668Sbms#define	IPPROTO_EGP		8		/* exterior gateway protocol */
61127668Sbms#endif
62146773Ssam#ifndef IPPROTO_PIGP
63146773Ssam#define IPPROTO_PIGP		9
64127668Sbms#endif
65127668Sbms#ifndef IPPROTO_UDP
66127668Sbms#define	IPPROTO_UDP		17		/* user datagram protocol */
67127668Sbms#endif
68162017Ssam#ifndef IPPROTO_DCCP
69162017Ssam#define	IPPROTO_DCCP		33		/* datagram congestion control protocol */
70162017Ssam#endif
71127668Sbms#ifndef IPPROTO_IPV6
72127668Sbms#define IPPROTO_IPV6		41
73127668Sbms#endif
74127668Sbms#ifndef IPPROTO_ROUTING
75127668Sbms#define IPPROTO_ROUTING		43		/* IPv6 routing header */
76127668Sbms#endif
77127668Sbms#ifndef IPPROTO_FRAGMENT
78127668Sbms#define IPPROTO_FRAGMENT	44		/* IPv6 fragmentation header */
79127668Sbms#endif
80127668Sbms#ifndef IPPROTO_RSVP
81127668Sbms#define IPPROTO_RSVP		46 		/* resource reservation */
82127668Sbms#endif
83127668Sbms#ifndef IPPROTO_GRE
84127668Sbms#define	IPPROTO_GRE		47		/* General Routing Encap. */
85127668Sbms#endif
86127668Sbms#ifndef IPPROTO_ESP
87127668Sbms#define	IPPROTO_ESP		50		/* SIPP Encap Sec. Payload */
88127668Sbms#endif
89127668Sbms#ifndef IPPROTO_AH
90127668Sbms#define	IPPROTO_AH		51		/* SIPP Auth Header */
91127668Sbms#endif
92127668Sbms#ifndef IPPROTO_MOBILE
93127668Sbms#define IPPROTO_MOBILE		55
94127668Sbms#endif
95127668Sbms#ifndef IPPROTO_ICMPV6
96127668Sbms#define IPPROTO_ICMPV6		58		/* ICMPv6 */
97127668Sbms#endif
98127668Sbms#ifndef IPPROTO_NONE
99127668Sbms#define IPPROTO_NONE		59		/* IPv6 no next header */
100127668Sbms#endif
101127668Sbms#ifndef IPPROTO_DSTOPTS
102127668Sbms#define IPPROTO_DSTOPTS		60		/* IPv6 destination options */
103127668Sbms#endif
104127668Sbms#ifndef IPPROTO_MOBILITY_OLD
105127668Sbms/*
106127668Sbms * The current Protocol Numbers list says that the IP protocol number for
107127668Sbms * mobility headers is 135; it cites draft-ietf-mobileip-ipv6-24, but
108127668Sbms * that draft doesn't actually give a number.
109127668Sbms *
110127668Sbms * It appears that 62 used to be used, even though that's assigned to
111127668Sbms * a protocol called CFTP; however, the only reference for CFTP is a
112127668Sbms * Network Message from BBN back in 1982, so, for now, we support 62,
113327234Semaste * as well as 135, as a protocol number for mobility headers.
114127668Sbms */
115127668Sbms#define IPPROTO_MOBILITY_OLD	62
116127668Sbms#endif
117127668Sbms#ifndef IPPROTO_ND
118127668Sbms#define	IPPROTO_ND		77		/* Sun net disk proto (temp.) */
119127668Sbms#endif
120146773Ssam#ifndef IPPROTO_EIGRP
121146773Ssam#define	IPPROTO_EIGRP		88		/* Cisco/GXS IGRP */
122127668Sbms#endif
123127668Sbms#ifndef IPPROTO_OSPF
124127668Sbms#define IPPROTO_OSPF		89
125127668Sbms#endif
126127668Sbms#ifndef IPPROTO_PIM
127127668Sbms#define IPPROTO_PIM		103
128127668Sbms#endif
129127668Sbms#ifndef IPPROTO_IPCOMP
130127668Sbms#define IPPROTO_IPCOMP		108
131127668Sbms#endif
132127668Sbms#ifndef IPPROTO_VRRP
133127668Sbms#define IPPROTO_VRRP		112
134127668Sbms#endif
135235530Sdelphij#ifndef IPPROTO_CARP
136235530Sdelphij#define IPPROTO_CARP		112
137235530Sdelphij#endif
138147899Ssam#ifndef IPPROTO_PGM
139147899Ssam#define IPPROTO_PGM             113
140147899Ssam#endif
141127668Sbms#ifndef IPPROTO_SCTP
142127668Sbms#define IPPROTO_SCTP		132
143127668Sbms#endif
144127668Sbms#ifndef IPPROTO_MOBILITY
145127668Sbms#define IPPROTO_MOBILITY	135
146127668Sbms#endif
147