Check the checksum on GRE packets, if possible and if the Checksum
[obnox/wireshark/wip.git] / etypes.h
1 /* etypes.h
2  * Defines ethernet packet types, similar to tcpdump's ethertype.h
3  *
4  * $Id: etypes.h,v 1.14 2000/08/09 22:10:23 deniel Exp $
5  *
6  * Ethereal - Network traffic analyzer
7  * By Gerald Combs <gerald@zing.org>
8  * Copyright 1998 Gerald Combs
9  *
10  * 
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  * 
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  * 
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24  */
25
26 #ifndef __ETYPES_H__
27 #define __ETYPES_H__
28
29 /*
30  * Maximum length of an IEEE 802.3 frame; Ethernet type/length values
31  * greater than it are types, Ethernet type/length values less than or
32  * equal to it are lengths.
33  */
34 #define IEEE_802_3_MAX_LEN 1500
35
36 #ifndef ETHERTYPE_UNK
37 #define ETHERTYP_UNK 0x0000
38 #endif
39
40 /* Sources:
41  * http://www.isi.edu/in-notes/iana/assignments/ethernet-numbers
42  * TCP/IP Illustrated, Volume 1
43  * RFCs 894, 1042, 826
44  * tcpdump's ethertype.h
45  * http://www.cavebear.com/CaveBear/Ethernet/
46  */
47
48 #ifndef ETHERTYPE_3C_NBP_DGRAM
49 #define ETHERTYPE_3C_NBP_DGRAM  0x3c07
50 #endif
51
52 #ifndef ETHERTYPE_DEC
53 #define ETHERTYPE_DEC           0x6000
54 #endif
55
56 #ifndef ETHERTYPE_DNA_DL
57 #define ETHERTYPE_DNA_DL        0x6001
58 #endif
59
60 #ifndef ETHERTYPE_DNA_RC
61 #define ETHERTYPE_DNA_RC        0x6002
62 #endif
63
64 #ifndef ETHERTYPE_DNA_RT
65 #define ETHERTYPE_DNA_RT        0x6003
66 #endif
67
68 #ifndef ETHERTYPE_LAT
69 #define ETHERTYPE_LAT           0x6004
70 #endif
71
72 #ifndef ETHERTYPE_DEC_DIAG
73 #define ETHERTYPE_DEC_DIAG      0x6005
74 #endif
75
76 #ifndef ETHERTYPE_DEC_CUST
77 #define ETHERTYPE_DEC_CUST      0x6006
78 #endif
79
80 #ifndef ETHERTYPE_DEC_SCA
81 #define ETHERTYPE_DEC_SCA       0x6007
82 #endif
83
84 #ifndef ETHERTYPE_IP
85 #define ETHERTYPE_IP 0x0800
86 #endif
87
88 #ifndef ETHERTYPE_IPv6
89 #define ETHERTYPE_IPv6 0x086dd
90 #endif
91
92 #ifndef ETHERTYPE_ARP
93 #define ETHERTYPE_ARP 0x0806
94 #endif
95
96 #ifndef ETHERTYPE_X25L3
97 #define ETHERTYPE_X25L3 0x0805
98 #endif
99
100 #ifndef ETHERTYPE_REVARP
101 #define ETHERTYPE_REVARP 0x8035
102 #endif
103
104 #ifndef ETHERTYPE_DEC_LB
105 #define ETHERTYPE_DEC_LB 0x8038
106 #endif
107
108 #ifndef ETHERTYPE_ATALK
109 #define ETHERTYPE_ATALK 0x809b
110 #endif
111
112 #ifndef ETHERTYPE_AARP
113 #define ETHERTYPE_AARP 0x80f3
114 #endif
115
116 #ifndef ETHERTYPE_IPX
117 #define ETHERTYPE_IPX 0x8137
118 #endif
119
120 #ifndef ETHERTYPE_VINES
121 #define ETHERTYPE_VINES 0xbad
122 #endif
123
124 #ifndef ETHERTYPE_TRAIN
125 #define ETHERTYPE_TRAIN 0x1984
126 /* Created by Netmon as a summary packet */
127 #endif
128
129 #ifndef ETHERTYPE_LOOP
130 #define ETHERTYPE_LOOP 0x9000   /* used for layer 2 testing (do i see my own frames on the wire) */
131 #endif
132
133 #ifndef ETHERTYPE_PPPOED
134 #define ETHERTYPE_PPPOED 0x8863 /* PPPoE Discovery Protocol */
135 #endif
136
137 #ifndef ETHERTYPE_PPPOES
138 #define ETHERTYPE_PPPOES 0x8864 /* PPPoE Session Protocol */
139 #endif
140
141 #ifndef ETHERTYPE_VLAN
142 #define ETHERTYPE_VLAN 0x8100 /* 802.1Q Virtual LAN */
143 #endif
144
145 #ifndef ETHERTYPE_SNMP
146 #define ETHERTYPE_SNMP 0x814c /* SNMP over Ethernet, RFC 1089 */
147 #endif
148
149 #ifndef ETHERTYPE_MPLS
150 #define ETHERTYPE_MPLS 0x8847 /* MPLS unicast packet */
151 #endif
152
153 #ifndef ETHERTYPE_MPLS_MULTI
154 #define ETHERTYPE_MPLS_MULTI 0x8848 /* MPLS multicast packet */
155 #endif
156
157 #endif /* etypes.h */
158
159