aboutsummaryrefslogtreecommitdiffstats
path: root/etypes.h
blob: 395eacfc5ddc81eb8a6e0ec6a55aee41454d381c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/* etypes.h
 * Defines ethernet packet types, similar to tcpdump's ethertype.h
 *
 * $Id: etypes.h,v 1.10 1999/11/26 04:52:36 gram Exp $
 *
 * Ethereal - Network traffic analyzer
 * By Gerald Combs <gerald@zing.org>
 * Copyright 1998 Gerald Combs
 *
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

#ifndef __ETYPES_H__
#define __ETYPES_H__

/*
 * Maximum length of an IEEE 802.3 frame; Ethernet type/length values
 * greater than it are types, Ethernet type/length values less than or
 * equal to it are lengths.
 */
#define IEEE_802_3_MAX_LEN 1500

#ifndef ETHERTYPE_UNK
#define ETHERTYP_UNK 0x0000
#endif

/* Sources:
 * http://www.isi.edu/in-notes/iana/assignments/ethernet-numbers
 * TCP/IP Illustrated, Volume 1
 * RFCs 894, 1042, 826
 * tcpdump's ethertype.h
 * http://www.cavebear.com/CaveBear/Ethernet/
 */

#ifndef ETHERTYPE_IP
#define ETHERTYPE_IP 0x0800
#endif

#ifndef ETHERTYPE_IPv6
#define ETHERTYPE_IPv6 0x086dd
#endif

#ifndef ETHERTYPE_ARP
#define ETHERTYPE_ARP 0x0806
#endif

#ifndef ETHERTYPE_REVARP
#define ETHERTYPE_REVARP 0x8035
#endif

#ifndef ETHERTYPE_ATALK
#define ETHERTYPE_ATALK 0x809b
#endif

#ifndef ETHERTYPE_AARP
#define ETHERTYPE_AARP 0x80f3
#endif

#ifndef ETHERTYPE_IPX
#define ETHERTYPE_IPX 0x8137
#endif

#ifndef ETHERTYPE_VINES
#define ETHERTYPE_VINES 0xbad
#endif

#ifndef ETHERTYPE_TRAIN
#define ETHERTYPE_TRAIN 0x1984
/* Created by Netmon as a summary packet */
#endif

#ifndef ETHERTYPE_CDP
#define ETHERTYPE_CDP 0x2000	/* Cisco Discovery Protocol */
#endif

#ifndef ETHERTYPE_LOOP
#define ETHERTYPE_LOOP 0x9000 	/* used for layer 2 testing (do i see my own frames on the wire) */
#endif

#ifndef ETHERTYPE_PPPOED
#define ETHERTYPE_PPPOED 0x8863 /* PPPoE Discovery Protocol */
#endif

#ifndef ETHERTYPE_PPPOES
#define ETHERTYPE_PPPOES 0x8864 /* PPPoE Session Protocol */
#endif

#ifndef ETHERTYPE_VLAN
#define ETHERTYPE_VLAN 0x8100 /* 802.1Q Virtual LAN */
#endif

#ifndef ETHERTYPE_SNMP
#define ETHERTYPE_SNMP 0x814c /* SNMP over Ethernet, RFC 1089 */
#endif

#endif /* etypes.h */