xref: /openbsd-src/usr.sbin/tcpdump/ethertype.h (revision 855d0349dd9d40b5255645b89e2b51e4e58b856d)
1 /*	$OpenBSD: ethertype.h,v 1.14 2008/12/05 01:25:24 sthen Exp $	*/
2 
3 /*
4  * Copyright (c) 1993, 1994, 1996
5  *	The Regents of the University of California.  All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that: (1) source code distributions
9  * retain the above copyright notice and this paragraph in its entirety, (2)
10  * distributions including binary code include the above copyright notice and
11  * this paragraph in its entirety in the documentation or other materials
12  * provided with the distribution, and (3) all advertising materials mentioning
13  * features or use of this software display the following acknowledgement:
14  * ``This product includes software developed by the University of California,
15  * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
16  * the University nor the names of its contributors may be used to endorse
17  * or promote products derived from this software without specific prior
18  * written permission.
19  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
20  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
21  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22  *
23  * @(#) $Id: ethertype.h,v 1.14 2008/12/05 01:25:24 sthen Exp $ (LBL)
24  */
25 
26 /*
27  * Ethernet types.
28  *
29  * We wrap the declarations with #ifdef, so that if a file includes
30  * <netinet/if_ether.h>, which may declare some of these, we don't
31  * get a bunch of complaints from the C compiler about redefinitions
32  * of these values.
33  *
34  * We declare all of them here so that no file has to include
35  * <netinet/if_ether.h> if all it needs are ETHERTYPE_ values.
36  */
37 
38 #ifndef ETHERTYPE_LEN
39 #define ETHERTYPE_LEN		2
40 #endif
41 
42 #ifndef ETHERTYPE_GRE_ISO
43 #define ETHERTYPE_GRE_ISO	0x00FE	/* not really an ethertype only used in GRE */
44 #endif
45 #ifndef ETHERTYPE_PUP
46 #define ETHERTYPE_PUP		0x0200	/* PUP protocol */
47 #endif
48 #ifndef ETHERTYPE_IP
49 #define ETHERTYPE_IP		0x0800	/* IP protocol */
50 #endif
51 #ifndef ETHERTYPE_ARP
52 #define ETHERTYPE_ARP		0x0806	/* Addr. resolution protocol */
53 #endif
54 #ifndef ETHERTYPE_REVARP
55 #define ETHERTYPE_REVARP	0x8035	/* reverse Addr. resolution protocol */
56 #endif
57 #ifndef ETHERTYPE_NS
58 #define ETHERTYPE_NS		0x0600
59 #endif
60 #ifndef ETHERTYPE_SPRITE
61 #define ETHERTYPE_SPRITE	0x0500
62 #endif
63 #ifndef ETHERTYPE_TRAIL
64 #define ETHERTYPE_TRAIL		0x1000
65 #endif
66 #ifndef ETHERTYPE_MOPDL
67 #define ETHERTYPE_MOPDL		0x6001
68 #endif
69 #ifndef ETHERTYPE_MOPRC
70 #define ETHERTYPE_MOPRC		0x6002
71 #endif
72 #ifndef ETHERTYPE_DN
73 #define ETHERTYPE_DN		0x6003
74 #endif
75 #ifndef ETHERTYPE_LAT
76 #define ETHERTYPE_LAT		0x6004
77 #endif
78 #ifndef ETHERTYPE_SCA
79 #define ETHERTYPE_SCA		0x6007
80 #endif
81 #ifndef ETHERTYPE_LANBRIDGE
82 #define ETHERTYPE_LANBRIDGE	0x8038
83 #endif
84 #ifndef ETHERTYPE_DECDNS
85 #define ETHERTYPE_DECDNS	0x803c
86 #endif
87 #ifndef ETHERTYPE_DECDTS
88 #define ETHERTYPE_DECDTS	0x803e
89 #endif
90 #ifndef ETHERTYPE_VEXP
91 #define ETHERTYPE_VEXP		0x805b
92 #endif
93 #ifndef ETHERTYPE_VPROD
94 #define ETHERTYPE_VPROD		0x805c
95 #endif
96 #ifndef ETHERTYPE_ATALK
97 #define ETHERTYPE_ATALK		0x809b
98 #endif
99 #ifndef ETHERTYPE_AARP
100 #define ETHERTYPE_AARP		0x80f3
101 #endif
102 #ifndef ETHERTYPE_8021Q
103 #define ETHERTYPE_8021Q		0x8100
104 #endif
105 #ifndef ETHERTYPE_QINQ
106 #define ETHERTYPE_QINQ		0x88a8
107 #endif
108 #ifndef ETHERTYPE_IPX
109 #define ETHERTYPE_IPX		0x8137
110 #endif
111 #ifndef ETHERTYPE_IPV6
112 #define ETHERTYPE_IPV6		0x86dd
113 #endif
114 #ifndef ETHERTYPE_PPP
115 #define ETHERTYPE_PPP		0x880b
116 #endif
117 #ifndef ETHERTYPE_MPLS
118 #define ETHERTYPE_MPLS		0x8847
119 #endif
120 #ifndef ETHERTYPE_MPLS_MULTI
121 #define ETHERTYPE_MPLS_MULTI	0x8848
122 #endif
123 #ifndef ETHERTYPE_PPPOED
124 #define ETHERTYPE_PPPOED	0x8863
125 #endif
126 #ifndef ETHERTYPE_PPPOES
127 #define ETHERTYPE_PPPOES	0x8864
128 #endif
129 #ifndef ETHERTYPE_JUMBO
130 #define ETHERTYPE_JUMBO		0x8870
131 #endif
132 #ifndef ETHERTYPE_PAE
133 #define ETHERTYPE_PAE	  	0x888e
134 #endif
135 #ifndef ETHERTYPE_LLDP
136 #define ETHERTYPE_LLDP		0x88cc
137 #endif
138 #ifndef ETHERTYPE_LOOPBACK
139 #define ETHERTYPE_LOOPBACK	0x9000
140 #endif
141 #ifndef ETHERTYPE_VMAN
142 #define ETHERTYPE_VMAN		0x9100	/* Extreme VMAN Protocol */
143 #endif
144 #ifndef ETHERTYPE_ISO
145 #define ETHERTYPE_ISO		0xfefe	/* nonstandard - used in Cisco HDLC encapsulation */
146 #endif
147