Add in some heuristics to try to detect AIX libpcap format. (This works
[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.21 2001/06/14 20:37:07 guy 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 ETHERTYPE_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_VINES
49 #define ETHERTYPE_VINES         0x0bad
50 #endif
51
52 #ifndef ETHERTYPE_TRAIN
53 /*
54  * Created by Microsoft Network Monitor as a summary packet.
55  */
56 #define ETHERTYPE_TRAIN         0x1984
57 #endif
58
59 #ifndef ETHERTYPE_3C_NBP_DGRAM
60 #define ETHERTYPE_3C_NBP_DGRAM  0x3c07
61 #endif
62
63 #ifndef ETHERTYPE_IP
64 #define ETHERTYPE_IP            0x0800
65 #endif
66
67 #ifndef ETHERTYPE_X25L3
68 #define ETHERTYPE_X25L3         0x0805
69 #endif
70
71 #ifndef ETHERTYPE_ARP
72 #define ETHERTYPE_ARP           0x0806
73 #endif
74
75 #ifndef ETHERTYPE_DEC
76 #define ETHERTYPE_DEC           0x6000
77 #endif
78
79 #ifndef ETHERTYPE_DNA_DL
80 #define ETHERTYPE_DNA_DL        0x6001
81 #endif
82
83 #ifndef ETHERTYPE_DNA_RC
84 #define ETHERTYPE_DNA_RC        0x6002
85 #endif
86
87 #ifndef ETHERTYPE_DNA_RT
88 #define ETHERTYPE_DNA_RT        0x6003
89 #endif
90
91 #ifndef ETHERTYPE_LAT
92 #define ETHERTYPE_LAT           0x6004
93 #endif
94
95 #ifndef ETHERTYPE_DEC_DIAG
96 #define ETHERTYPE_DEC_DIAG      0x6005
97 #endif
98
99 #ifndef ETHERTYPE_DEC_CUST
100 #define ETHERTYPE_DEC_CUST      0x6006
101 #endif
102
103 #ifndef ETHERTYPE_DEC_SCA
104 #define ETHERTYPE_DEC_SCA       0x6007
105 #endif
106
107 #ifndef ETHERTYPE_ETHBRIDGE
108 #define ETHERTYPE_ETHBRIDGE     0x6558  /* transparent Ethernet bridging */
109 #endif
110
111 #ifndef ETHERTYPE_REVARP
112 #define ETHERTYPE_REVARP        0x8035
113 #endif
114
115 #ifndef ETHERTYPE_DEC_LB
116 #define ETHERTYPE_DEC_LB        0x8038
117 #endif
118
119 #ifndef ETHERTYPE_ATALK
120 #define ETHERTYPE_ATALK         0x809b
121 #endif
122
123 #ifndef ETHERTYPE_AARP
124 #define ETHERTYPE_AARP          0x80f3
125 #endif
126
127 #ifndef ETHERTYPE_IPX
128 #define ETHERTYPE_IPX           0x8137
129 #endif
130
131 #ifndef ETHERTYPE_VLAN
132 #define ETHERTYPE_VLAN          0x8100  /* 802.1Q Virtual LAN */
133 #endif
134
135 #ifndef ETHERTYPE_SNMP
136 #define ETHERTYPE_SNMP          0x814c  /* SNMP over Ethernet, RFC 1089 */
137 #endif
138
139 #ifndef ETHERTYPE_WCP
140 #define ETHERTYPE_WCP           0x80ff  /* Wellfleet Compression Protocol */
141 #endif
142
143 #ifndef ETHERTYPE_IPv6
144 #define ETHERTYPE_IPv6          0x86dd
145 #endif
146
147 #ifndef ETHERTYPE_PPP
148 #define ETHERTYPE_PPP           0x880b  /* no, this is not PPPoE */
149 #endif
150
151 #ifndef ETHERTYPE_MPLS
152 #define ETHERTYPE_MPLS          0x8847  /* MPLS unicast packet */
153 #endif
154
155 #ifndef ETHERTYPE_MPLS_MULTI
156 #define ETHERTYPE_MPLS_MULTI    0x8848  /* MPLS multicast packet */
157 #endif
158
159 #ifndef ETHERTYPE_PPPOED
160 #define ETHERTYPE_PPPOED        0x8863  /* PPPoE Discovery Protocol */
161 #endif
162
163 #ifndef ETHERTYPE_PPPOES
164 #define ETHERTYPE_PPPOES        0x8864  /* PPPoE Session Protocol */
165 #endif
166
167 #ifndef ETHERTYPE_LOOP
168 #define ETHERTYPE_LOOP          0x9000  /* used for layer 2 testing (do i see my own frames on the wire) */
169 #endif
170
171 extern const value_string etype_vals[];
172
173 #endif /* etypes.h */