blob: a74c3a8f0cfdc7056cdcc17935dbb11ea31379c9 [file] [log] [blame]
The Android Open Source Project2949f582009-03-03 19:30:46 -08001/*
2 * Copyright (c) 1993, 1994, 1996
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: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and
9 * this paragraph in its entirety in the documentation or other materials
10 * provided with the distribution, and (3) all advertising materials mentioning
11 * features or use of this software display the following acknowledgement:
12 * ``This product includes software developed by the University of California,
13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14 * the University nor the names of its contributors may be used to endorse
15 * or promote products derived from this software without specific prior
16 * written permission.
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 *
JP Abgrall53f17a92014-02-12 14:02:41 -080021 * @(#) $Header: /tcpdump/master/tcpdump/ethertype.h,v 1.30 2008-02-06 10:47:53 guy Exp $ (LBL)
The Android Open Source Project2949f582009-03-03 19:30:46 -080022 */
23
24/*
25 * Ethernet types.
26 *
27 * We wrap the declarations with #ifdef, so that if a file includes
28 * <netinet/if_ether.h>, which may declare some of these, we don't
29 * get a bunch of complaints from the C compiler about redefinitions
30 * of these values.
31 *
32 * We declare all of them here so that no file has to include
33 * <netinet/if_ether.h> if all it needs are ETHERTYPE_ values.
34 */
35
36#ifndef ETHERTYPE_LEN
37#define ETHERTYPE_LEN 2
38#endif
39
40#ifndef ETHERTYPE_GRE_ISO
41#define ETHERTYPE_GRE_ISO 0x00FE /* not really an ethertype only used in GRE */
42#endif
43#ifndef ETHERTYPE_PUP
44#define ETHERTYPE_PUP 0x0200 /* PUP protocol */
45#endif
46#ifndef ETHERTYPE_IP
47#define ETHERTYPE_IP 0x0800 /* IP protocol */
48#endif
49#ifndef ETHERTYPE_ARP
50#define ETHERTYPE_ARP 0x0806 /* Addr. resolution protocol */
51#endif
52#ifndef ETHERTYPE_REVARP
53#define ETHERTYPE_REVARP 0x8035 /* reverse Addr. resolution protocol */
54#endif
55#ifndef ETHERTYPE_NS
56#define ETHERTYPE_NS 0x0600
57#endif
58#ifndef ETHERTYPE_SPRITE
59#define ETHERTYPE_SPRITE 0x0500
60#endif
61#ifndef ETHERTYPE_TRAIL
62#define ETHERTYPE_TRAIL 0x1000
63#endif
64#ifndef ETHERTYPE_MOPDL
65#define ETHERTYPE_MOPDL 0x6001
66#endif
67#ifndef ETHERTYPE_MOPRC
68#define ETHERTYPE_MOPRC 0x6002
69#endif
70#ifndef ETHERTYPE_DN
71#define ETHERTYPE_DN 0x6003
72#endif
73#ifndef ETHERTYPE_LAT
74#define ETHERTYPE_LAT 0x6004
75#endif
76#ifndef ETHERTYPE_SCA
77#define ETHERTYPE_SCA 0x6007
78#endif
JP Abgrall53f17a92014-02-12 14:02:41 -080079#ifndef ETHERTYPE_TEB
80#define ETHERTYPE_TEB 0x6558
81#endif
The Android Open Source Project2949f582009-03-03 19:30:46 -080082#ifndef ETHERTYPE_LANBRIDGE
83#define ETHERTYPE_LANBRIDGE 0x8038
84#endif
85#ifndef ETHERTYPE_DECDNS
86#define ETHERTYPE_DECDNS 0x803c
87#endif
88#ifndef ETHERTYPE_DECDTS
89#define ETHERTYPE_DECDTS 0x803e
90#endif
91#ifndef ETHERTYPE_VEXP
92#define ETHERTYPE_VEXP 0x805b
93#endif
94#ifndef ETHERTYPE_VPROD
95#define ETHERTYPE_VPROD 0x805c
96#endif
97#ifndef ETHERTYPE_ATALK
98#define ETHERTYPE_ATALK 0x809b
99#endif
100#ifndef ETHERTYPE_AARP
101#define ETHERTYPE_AARP 0x80f3
102#endif
JP Abgrall53f17a92014-02-12 14:02:41 -0800103#ifndef ETHERTYPE_TIPC
104#define ETHERTYPE_TIPC 0x88ca
105#endif
The Android Open Source Project2949f582009-03-03 19:30:46 -0800106#ifndef ETHERTYPE_8021Q
107#define ETHERTYPE_8021Q 0x8100
108#endif
JP Abgrall53f17a92014-02-12 14:02:41 -0800109
110/* see:
111 http://en.wikipedia.org/wiki/IEEE_802.1Q
112 and http://en.wikipedia.org/wiki/QinQ
113*/
114#ifndef ETHERTYPE_8021Q9100
115#define ETHERTYPE_8021Q9100 0x9100
116#endif
117#ifndef ETHERTYPE_8021Q9200
118#define ETHERTYPE_8021Q9200 0x9200
119#endif
120#ifndef ETHERTYPE_8021QinQ
121#define ETHERTYPE_8021QinQ 0x88a8
122#endif
The Android Open Source Project2949f582009-03-03 19:30:46 -0800123#ifndef ETHERTYPE_IPX
124#define ETHERTYPE_IPX 0x8137
125#endif
126#ifndef ETHERTYPE_IPV6
127#define ETHERTYPE_IPV6 0x86dd
128#endif
129#ifndef ETHERTYPE_PPP
130#define ETHERTYPE_PPP 0x880b
131#endif
JP Abgrall53f17a92014-02-12 14:02:41 -0800132#ifndef ETHERTYPE_MPCP
133#define ETHERTYPE_MPCP 0x8808
134#endif
The Android Open Source Project2949f582009-03-03 19:30:46 -0800135#ifndef ETHERTYPE_SLOW
136#define ETHERTYPE_SLOW 0x8809
137#endif
138#ifndef ETHERTYPE_MPLS
139#define ETHERTYPE_MPLS 0x8847
140#endif
141#ifndef ETHERTYPE_MPLS_MULTI
142#define ETHERTYPE_MPLS_MULTI 0x8848
143#endif
144#ifndef ETHERTYPE_PPPOED
145#define ETHERTYPE_PPPOED 0x8863
146#endif
147#ifndef ETHERTYPE_PPPOES
148#define ETHERTYPE_PPPOES 0x8864
149#endif
JP Abgrall53f17a92014-02-12 14:02:41 -0800150#ifndef ETHERTYPE_PPPOED2
151#define ETHERTYPE_PPPOED2 0x3c12
152#endif
153#ifndef ETHERTYPE_PPPOES2
154#define ETHERTYPE_PPPOES2 0x3c13
155#endif
156#ifndef ETHERTYPE_MS_NLB_HB
157#define ETHERTYPE_MS_NLB_HB 0x886f /* MS Network Load Balancing Heartbeat */
158#endif
The Android Open Source Project2949f582009-03-03 19:30:46 -0800159#ifndef ETHERTYPE_JUMBO
160#define ETHERTYPE_JUMBO 0x8870
161#endif
JP Abgrall53f17a92014-02-12 14:02:41 -0800162#ifndef ETHERTYPE_LLDP
163#define ETHERTYPE_LLDP 0x88cc
164#endif
The Android Open Source Project2949f582009-03-03 19:30:46 -0800165#ifndef ETHERTYPE_EAPOL
166#define ETHERTYPE_EAPOL 0x888e
167#endif
JP Abgrall53f17a92014-02-12 14:02:41 -0800168#ifndef ETHERTYPE_RRCP
169#define ETHERTYPE_RRCP 0x8899
170#endif
The Android Open Source Project2949f582009-03-03 19:30:46 -0800171#ifndef ETHERTYPE_LOOPBACK
172#define ETHERTYPE_LOOPBACK 0x9000
173#endif
174#ifndef ETHERTYPE_VMAN
175#define ETHERTYPE_VMAN 0x9100 /* Extreme VMAN Protocol */
176#endif
JP Abgrall53f17a92014-02-12 14:02:41 -0800177#ifndef ETHERTYPE_CFM_OLD
178#define ETHERTYPE_CFM_OLD 0xabcd /* 802.1ag depreciated */
179#endif
180#ifndef ETHERTYPE_CFM
181#define ETHERTYPE_CFM 0x8902 /* 802.1ag */
182#endif
The Android Open Source Project2949f582009-03-03 19:30:46 -0800183#ifndef ETHERTYPE_ISO
184#define ETHERTYPE_ISO 0xfefe /* nonstandard - used in Cisco HDLC encapsulation */
185#endif
JP Abgrall53f17a92014-02-12 14:02:41 -0800186#ifndef ETHERTYPE_CALM_FAST
187#define ETHERTYPE_CALM_FAST 0x1111 /* ISO CALM FAST */
188#endif
189#ifndef ETHERTYPE_GEONET_OLD
190#define ETHERTYPE_GEONET_OLD 0x0707 /* ETSI GeoNetworking (before Jan 2013) */
191#endif
192#ifndef ETHERTYPE_GEONET
193#define ETHERTYPE_GEONET 0x8947 /* ETSI GeoNetworking (Official IEEE registration from Jan 2013) */
194#endif
The Android Open Source Project2949f582009-03-03 19:30:46 -0800195
196extern const struct tok ethertype_values[];