]>
The Tcpdump Group git mirrors - tcpdump/blob - ethertype.h
2 * Copyright (c) 1993, 1994, 1996
3 * The Regents of the University of California. All rights reserved.
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
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.
21 * @(#) $Header: /tcpdump/master/tcpdump/ethertype.h,v 1.19 2003-05-28 08:59:14 hannes Exp $ (LBL)
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
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.
37 #define ETHERTYPE_PUP 0x0200 /* PUP protocol */
40 #define ETHERTYPE_IP 0x0800 /* IP protocol */
43 #define ETHERTYPE_ARP 0x0806 /* Addr. resolution protocol */
45 #ifndef ETHERTYPE_REVARP
46 #define ETHERTYPE_REVARP 0x8035 /* reverse Addr. resolution protocol */
49 #define ETHERTYPE_NS 0x0600
51 #ifndef ETHERTYPE_SPRITE
52 #define ETHERTYPE_SPRITE 0x0500
54 #ifndef ETHERTYPE_TRAIL
55 #define ETHERTYPE_TRAIL 0x1000
57 #ifndef ETHERTYPE_MOPDL
58 #define ETHERTYPE_MOPDL 0x6001
60 #ifndef ETHERTYPE_MOPRC
61 #define ETHERTYPE_MOPRC 0x6002
64 #define ETHERTYPE_DN 0x6003
67 #define ETHERTYPE_LAT 0x6004
70 #define ETHERTYPE_SCA 0x6007
72 #ifndef ETHERTYPE_LANBRIDGE
73 #define ETHERTYPE_LANBRIDGE 0x8038
75 #ifndef ETHERTYPE_DECDNS
76 #define ETHERTYPE_DECDNS 0x803c
78 #ifndef ETHERTYPE_DECDTS
79 #define ETHERTYPE_DECDTS 0x803e
81 #ifndef ETHERTYPE_VEXP
82 #define ETHERTYPE_VEXP 0x805b
84 #ifndef ETHERTYPE_VPROD
85 #define ETHERTYPE_VPROD 0x805c
87 #ifndef ETHERTYPE_ATALK
88 #define ETHERTYPE_ATALK 0x809b
90 #ifndef ETHERTYPE_AARP
91 #define ETHERTYPE_AARP 0x80f3
93 #ifndef ETHERTYPE_8021Q
94 #define ETHERTYPE_8021Q 0x8100
97 #define ETHERTYPE_IPX 0x8137
99 #ifndef ETHERTYPE_IPV6
100 #define ETHERTYPE_IPV6 0x86dd
102 #ifndef ETHERTYPE_PPP
103 #define ETHERTYPE_PPP 0x880b
105 #ifndef ETHERTYPE_MPLS
106 #define ETHERTYPE_MPLS 0x8847
108 #ifndef ETHERTYPE_MPLS_MULTI
109 #define ETHERTYPE_MPLS_MULTI 0x8848
111 #ifndef ETHERTYPE_PPPOED
112 #define ETHERTYPE_PPPOED 0x8863
114 #ifndef ETHERTYPE_PPPOES
115 #define ETHERTYPE_PPPOES 0x8864
117 #ifndef ETHERTYPE_LOOPBACK
118 #define ETHERTYPE_LOOPBACK 0x9000
120 #ifndef ETHERTYPE_VMAN
121 #define ETHERTYPE_VMAN 0x9100 /* Extreme VMAN Protocol */
123 #ifndef ETHERTYPE_ISO
124 #define ETHERTYPE_ISO 0xfefe /* nonstandard - used in Cisco HDLC encapsulation */
127 static const struct tok ethertype_values
[] = {
128 { ETHERTYPE_IP
, "IPv4" },
129 { ETHERTYPE_MPLS
, "MPLS unicast" },
130 { ETHERTYPE_MPLS_MULTI
, "MPLS multicast" },
131 { ETHERTYPE_IPV6
, "IPv6" },
132 { ETHERTYPE_8021Q
, "802.1Q" },
133 { ETHERTYPE_VMAN
, "VMAN" },
134 { ETHERTYPE_PUP
, "PUP" },
135 { ETHERTYPE_ARP
, "ARP"},
136 { ETHERTYPE_REVARP
, "Reverse ARP"},
137 { ETHERTYPE_NS
, "NS" },
138 { ETHERTYPE_SPRITE
, "Sprite" },
139 { ETHERTYPE_TRAIL
, "Trail" },
140 { ETHERTYPE_MOPDL
, "MOP DL" },
141 { ETHERTYPE_MOPRC
, "MOP RC" },
142 { ETHERTYPE_DN
, "DN" },
143 { ETHERTYPE_LAT
, "LAT" },
144 { ETHERTYPE_SCA
, "SCA" },
145 { ETHERTYPE_LANBRIDGE
, "Lanbridge" },
146 { ETHERTYPE_DECDNS
, "DEC DNS" },
147 { ETHERTYPE_DECDTS
, "DEC DTS" },
148 { ETHERTYPE_VEXP
, "VEXP" },
149 { ETHERTYPE_VPROD
, "VPROD" },
150 { ETHERTYPE_ATALK
, "Appletalk" },
151 { ETHERTYPE_AARP
, "Appletalk ARP" },
152 { ETHERTYPE_IPX
, "IPX" },
153 { ETHERTYPE_PPP
, "PPP" },
154 { ETHERTYPE_PPPOED
, "PPPoE D" },
155 { ETHERTYPE_PPPOES
, "PPPoE S" },
156 { ETHERTYPE_LOOPBACK
, "Loopback" },