xref: /freebsd/contrib/tcpdump/ipproto.h (revision ee67461e56828dd1f8de165947ba83f6d9148a87)
15b0fe478SBruce M Simpson /*
25b0fe478SBruce M Simpson  * Copyright (c) 1982, 1986, 1990, 1993
35b0fe478SBruce M Simpson  *	The Regents of the University of California.  All rights reserved.
45b0fe478SBruce M Simpson  *
55b0fe478SBruce M Simpson  * Redistribution and use in source and binary forms, with or without
65b0fe478SBruce M Simpson  * modification, are permitted provided that the following conditions
75b0fe478SBruce M Simpson  * are met:
85b0fe478SBruce M Simpson  * 1. Redistributions of source code must retain the above copyright
95b0fe478SBruce M Simpson  *    notice, this list of conditions and the following disclaimer.
105b0fe478SBruce M Simpson  * 2. Redistributions in binary form must reproduce the above copyright
115b0fe478SBruce M Simpson  *    notice, this list of conditions and the following disclaimer in the
125b0fe478SBruce M Simpson  *    documentation and/or other materials provided with the distribution.
135b0fe478SBruce M Simpson  * 3. All advertising materials mentioning features or use of this software
145b0fe478SBruce M Simpson  *    must display the following acknowledgement:
155b0fe478SBruce M Simpson  *	This product includes software developed by the University of
165b0fe478SBruce M Simpson  *	California, Berkeley and its contributors.
175b0fe478SBruce M Simpson  * 4. Neither the name of the University nor the names of its contributors
185b0fe478SBruce M Simpson  *    may be used to endorse or promote products derived from this software
195b0fe478SBruce M Simpson  *    without specific prior written permission.
205b0fe478SBruce M Simpson  *
215b0fe478SBruce M Simpson  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
225b0fe478SBruce M Simpson  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
235b0fe478SBruce M Simpson  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
245b0fe478SBruce M Simpson  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
255b0fe478SBruce M Simpson  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
265b0fe478SBruce M Simpson  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
275b0fe478SBruce M Simpson  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
285b0fe478SBruce M Simpson  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
295b0fe478SBruce M Simpson  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
305b0fe478SBruce M Simpson  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
315b0fe478SBruce M Simpson  * SUCH DAMAGE.
325b0fe478SBruce M Simpson  *
335b0fe478SBruce M Simpson  * From:
345b0fe478SBruce M Simpson  *	@(#)in.h	8.3 (Berkeley) 1/3/94
3571fe94fdSDimitry Andric  * $FreeBSD: projects/clang400-import/contrib/tcpdump/ipproto.h 276788 2015-01-07 19:55:18Z delphij $
365b0fe478SBruce M Simpson  */
375b0fe478SBruce M Simpson 
3827df3f5dSRui Paulo extern const struct tok ipproto_values[];
39*ee67461eSJoseph Mingrone extern const char *netdb_protoname (const uint8_t);
401de50e9fSSam Leffler 
415b0fe478SBruce M Simpson #ifndef IPPROTO_IP
425b0fe478SBruce M Simpson #define	IPPROTO_IP		0		/* dummy for IP */
435b0fe478SBruce M Simpson #endif
445b0fe478SBruce M Simpson #ifndef IPPROTO_HOPOPTS
455b0fe478SBruce M Simpson #define IPPROTO_HOPOPTS		0		/* IPv6 hop-by-hop options */
465b0fe478SBruce M Simpson #endif
475b0fe478SBruce M Simpson #ifndef IPPROTO_ICMP
485b0fe478SBruce M Simpson #define	IPPROTO_ICMP		1		/* control message protocol */
495b0fe478SBruce M Simpson #endif
505b0fe478SBruce M Simpson #ifndef IPPROTO_IGMP
515b0fe478SBruce M Simpson #define	IPPROTO_IGMP		2		/* group mgmt protocol */
525b0fe478SBruce M Simpson #endif
535b0fe478SBruce M Simpson #ifndef IPPROTO_IPV4
545b0fe478SBruce M Simpson #define IPPROTO_IPV4		4
555b0fe478SBruce M Simpson #endif
565b0fe478SBruce M Simpson #ifndef IPPROTO_TCP
575b0fe478SBruce M Simpson #define	IPPROTO_TCP		6		/* tcp */
585b0fe478SBruce M Simpson #endif
595b0fe478SBruce M Simpson #ifndef IPPROTO_EGP
605b0fe478SBruce M Simpson #define	IPPROTO_EGP		8		/* exterior gateway protocol */
615b0fe478SBruce M Simpson #endif
621de50e9fSSam Leffler #ifndef IPPROTO_PIGP
631de50e9fSSam Leffler #define IPPROTO_PIGP		9
645b0fe478SBruce M Simpson #endif
655b0fe478SBruce M Simpson #ifndef IPPROTO_UDP
665b0fe478SBruce M Simpson #define	IPPROTO_UDP		17		/* user datagram protocol */
675b0fe478SBruce M Simpson #endif
682ebc47dbSSam Leffler #ifndef IPPROTO_DCCP
692ebc47dbSSam Leffler #define	IPPROTO_DCCP		33		/* datagram congestion control protocol */
702ebc47dbSSam Leffler #endif
715b0fe478SBruce M Simpson #ifndef IPPROTO_IPV6
725b0fe478SBruce M Simpson #define IPPROTO_IPV6		41
735b0fe478SBruce M Simpson #endif
745b0fe478SBruce M Simpson #ifndef IPPROTO_ROUTING
755b0fe478SBruce M Simpson #define IPPROTO_ROUTING		43		/* IPv6 routing header */
765b0fe478SBruce M Simpson #endif
775b0fe478SBruce M Simpson #ifndef IPPROTO_FRAGMENT
785b0fe478SBruce M Simpson #define IPPROTO_FRAGMENT	44		/* IPv6 fragmentation header */
795b0fe478SBruce M Simpson #endif
805b0fe478SBruce M Simpson #ifndef IPPROTO_RSVP
815b0fe478SBruce M Simpson #define IPPROTO_RSVP		46		/* resource reservation */
825b0fe478SBruce M Simpson #endif
835b0fe478SBruce M Simpson #ifndef IPPROTO_GRE
845b0fe478SBruce M Simpson #define	IPPROTO_GRE		47		/* General Routing Encap. */
855b0fe478SBruce M Simpson #endif
865b0fe478SBruce M Simpson #ifndef IPPROTO_ESP
875b0fe478SBruce M Simpson #define	IPPROTO_ESP		50		/* SIPP Encap Sec. Payload */
885b0fe478SBruce M Simpson #endif
895b0fe478SBruce M Simpson #ifndef IPPROTO_AH
905b0fe478SBruce M Simpson #define	IPPROTO_AH		51		/* SIPP Auth Header */
915b0fe478SBruce M Simpson #endif
925b0fe478SBruce M Simpson #ifndef IPPROTO_MOBILE
935b0fe478SBruce M Simpson #define IPPROTO_MOBILE		55
945b0fe478SBruce M Simpson #endif
955b0fe478SBruce M Simpson #ifndef IPPROTO_ICMPV6
965b0fe478SBruce M Simpson #define IPPROTO_ICMPV6		58		/* ICMPv6 */
975b0fe478SBruce M Simpson #endif
985b0fe478SBruce M Simpson #ifndef IPPROTO_NONE
995b0fe478SBruce M Simpson #define IPPROTO_NONE		59		/* IPv6 no next header */
1005b0fe478SBruce M Simpson #endif
1015b0fe478SBruce M Simpson #ifndef IPPROTO_DSTOPTS
1025b0fe478SBruce M Simpson #define IPPROTO_DSTOPTS		60		/* IPv6 destination options */
1035b0fe478SBruce M Simpson #endif
1045b0fe478SBruce M Simpson #ifndef IPPROTO_MOBILITY_OLD
1055b0fe478SBruce M Simpson /*
1065b0fe478SBruce M Simpson  * The current Protocol Numbers list says that the IP protocol number for
107*ee67461eSJoseph Mingrone  * mobility headers is 135; it cites RFC 6275 (obsoletes RFC 3775).
1085b0fe478SBruce M Simpson  *
1095b0fe478SBruce M Simpson  * It appears that 62 used to be used, even though that's assigned to
1105b0fe478SBruce M Simpson  * a protocol called CFTP; however, the only reference for CFTP is a
1115b0fe478SBruce M Simpson  * Network Message from BBN back in 1982, so, for now, we support 62,
1120bff6a5aSEd Maste  * as well as 135, as a protocol number for mobility headers.
1135b0fe478SBruce M Simpson  */
1145b0fe478SBruce M Simpson #define IPPROTO_MOBILITY_OLD	62
1155b0fe478SBruce M Simpson #endif
1165b0fe478SBruce M Simpson #ifndef IPPROTO_ND
1175b0fe478SBruce M Simpson #define	IPPROTO_ND		77		/* Sun net disk proto (temp.) */
1185b0fe478SBruce M Simpson #endif
1191de50e9fSSam Leffler #ifndef IPPROTO_EIGRP
1201de50e9fSSam Leffler #define	IPPROTO_EIGRP		88		/* Cisco/GXS IGRP */
1215b0fe478SBruce M Simpson #endif
1225b0fe478SBruce M Simpson #ifndef IPPROTO_OSPF
1235b0fe478SBruce M Simpson #define IPPROTO_OSPF		89
1245b0fe478SBruce M Simpson #endif
1255b0fe478SBruce M Simpson #ifndef IPPROTO_PIM
1265b0fe478SBruce M Simpson #define IPPROTO_PIM		103
1275b0fe478SBruce M Simpson #endif
1285b0fe478SBruce M Simpson #ifndef IPPROTO_IPCOMP
1295b0fe478SBruce M Simpson #define IPPROTO_IPCOMP		108
1305b0fe478SBruce M Simpson #endif
1315b0fe478SBruce M Simpson #ifndef IPPROTO_VRRP
132*ee67461eSJoseph Mingrone #define IPPROTO_VRRP		112 /* See also CARP. */
133cac3dcd5SXin LI #endif
134f4d0c64aSSam Leffler #ifndef IPPROTO_PGM
135f4d0c64aSSam Leffler #define IPPROTO_PGM             113
136f4d0c64aSSam Leffler #endif
1375b0fe478SBruce M Simpson #ifndef IPPROTO_SCTP
1385b0fe478SBruce M Simpson #define IPPROTO_SCTP		132
1395b0fe478SBruce M Simpson #endif
1405b0fe478SBruce M Simpson #ifndef IPPROTO_MOBILITY
1415b0fe478SBruce M Simpson #define IPPROTO_MOBILITY	135
1425b0fe478SBruce M Simpson #endif
143*ee67461eSJoseph Mingrone #ifndef IPPROTO_ETHERNET
144*ee67461eSJoseph Mingrone #define IPPROTO_ETHERNET	143 /* TEMPORARY - registered 2020-01-31, expires 2021-01-31 */
145*ee67461eSJoseph Mingrone #endif
146