1998-09-16 02:39:15 +00:00
/* etypes.h
* Defines ethernet packet types , similar to tcpdump ' s ethertype . h
*
2004-07-18 00:24:25 +00:00
* $ Id $
1998-09-16 03:22:19 +00:00
*
2006-05-21 05:12:17 +00:00
* Wireshark - Network traffic analyzer
* By Gerald Combs < gerald @ wireshark . org >
1998-09-16 02:39:15 +00:00
* Copyright 1998 Gerald Combs
2002-08-28 21:04:11 +00:00
*
1998-09-16 02:39:15 +00:00
* 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 .
2002-08-28 21:04:11 +00:00
*
1998-09-16 02:39:15 +00:00
* 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 .
2002-08-28 21:04:11 +00:00
*
1998-09-16 02:39:15 +00:00
* 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__
1999-08-22 01:35:34 +00:00
/*
* 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 .
*/
DLT_NULL, from "libpcap", means different things on different platforms
and in different capture files; throw in some heuristics to try to
figure out whether the 4-byte header is:
1) PPP-over-HDLC (some version of ISDN4BSD?);
2) big-endian AF_ value (BSD on big-endian platforms);
3) little-endian AF_ value (BSD on little-endian platforms);
4) two octets of 0 followed by an Ethernet type (Linux, at least
on little-endian platforms, as mutated by "libpcap").
Make a separate Wiretap encapsulation type, WTAP_ENCAP_NULL,
corresponding to DLT_NULL.
Have the PPP code dissect the frame if it's PPP-over-HDLC, and have
"ethertype()" dissect the Ethernet type and the rest of the packet if
it's a Linux-style header; dissect it ourselves only if it's an AF_
value.
Have Wiretap impose a maximum packet size of 65535 bytes, so that it
fails more gracefully when handed a corrupt "libpcap" capture file
(other capture file formats with more than a 16-bit capture length
field, if any, will have that check added later), and put that size in
"wtap.h" and have Ethereal use it as its notion of a maximum packet
size.
Have Ethereal put up a "this file appears to be damaged or corrupt"
message box if Wiretap returns a WTAP_ERR_BAD_RECORD error when opening
or reading a capture file.
Include loopback interfaces in the list of interfaces offered by the
"Capture" dialog box, but put them at the end of the list so that it
doesn't default to a loopback interface unless there are no other
interfaces. Also, don't require that an interface in the list have an
IP address associated with it, and only put one entry in the list for a
given interface (SIOCGIFCONF returns one entry per interface *address*,
not per *interface* - and even if you were to use only IP addresses, an
interface could conceivably have more than one IP address).
Exclusively use Wiretap encapsulation types internally, even when
capturing; don't use DLT_ types.
svn path=/trunk/; revision=540
1999-08-22 00:47:56 +00:00
# define IEEE_802_3_MAX_LEN 1500
1998-09-16 02:39:15 +00:00
# ifndef ETHERTYPE_UNK
2001-05-28 20:18:08 +00:00
# define ETHERTYPE_UNK 0x0000
1998-09-16 02:39:15 +00:00
# endif
/* Sources:
2004-02-28 22:56:36 +00:00
* http : //www.iana.org/assignments/ethernet-numbers
1998-09-16 02:39:15 +00:00
* TCP / IP Illustrated , Volume 1
* RFCs 894 , 1042 , 826
* tcpdump ' s ethertype . h
* http : //www.cavebear.com/CaveBear/Ethernet/
2003-11-17 18:23:34 +00:00
* http : //standards.ieee.org/regauth/ethertype/type-pub.html
2004-12-01 20:57:27 +00:00
* http : //standards.ieee.org/regauth/ethertype/eth.txt
2004-12-01 21:11:48 +00:00
* ( The first of the two IEEE URLs is the one that the " EtherType Field
* Public Assignments " link on the page at
*
* http : //standards.ieee.org/regauth/ethertype/index.shtml
*
* goes to , but it is redirected to the second of those - i . e . , both
* of the IEEE URLs ultimately go to the same page . )
1998-09-16 02:39:15 +00:00
*/
2006-10-31 14:36:32 +00:00
/* Order these values by number */
# ifndef ETHERTYPE_XNS_IDP
# define ETHERTYPE_XNS_IDP 0x0600
# endif
# ifndef ETHERTYPE_IP
# define ETHERTYPE_IP 0x0800
# endif
# ifndef ETHERTYPE_X25L3
# define ETHERTYPE_X25L3 0x0805
# endif
# ifndef ETHERTYPE_ARP
# define ETHERTYPE_ARP 0x0806
# endif
2007-11-06 05:30:04 +00:00
# ifndef ETHERTYPE_WOL
# define ETHERTYPE_WOL 0x0842 /* Wake on LAN. Not offically registered. */
# endif
2007-08-01 17:42:43 +00:00
# ifndef ETHERTYPE_WMX_M2M
# define ETHERTYPE_WMX_M2M 0x08f0
# endif
2003-04-22 08:50:07 +00:00
# ifndef ETHERTYPE_VINES_IP
# define ETHERTYPE_VINES_IP 0x0bad
# endif
# ifndef ETHERTYPE_VINES_ECHO
# define ETHERTYPE_VINES_ECHO 0x0baf
2001-04-03 05:42:11 +00:00
# endif
# ifndef ETHERTYPE_TRAIN
/*
* Created by Microsoft Network Monitor as a summary packet .
*/
# define ETHERTYPE_TRAIN 0x1984
# endif
2002-03-23 22:02:20 +00:00
# ifndef ETHERTYPE_CGMP
# define ETHERTYPE_CGMP 0x2001
# endif
2004-07-21 05:44:03 +00:00
# ifndef ETHERTYPE_CENTRINO_PROMISC
# define ETHERTYPE_CENTRINO_PROMISC 0x2452 /* Intel Centrino promiscuous packets */
# endif
2000-08-09 22:10:23 +00:00
# ifndef ETHERTYPE_3C_NBP_DGRAM
# define ETHERTYPE_3C_NBP_DGRAM 0x3c07
# endif
2006-09-02 23:18:38 +00:00
# ifndef ETHERTYPE_EPL_V1
# define ETHERTYPE_EPL_V1 0x3E3F
# endif
2000-08-09 22:10:23 +00:00
# ifndef ETHERTYPE_DEC
# define ETHERTYPE_DEC 0x6000
# endif
# ifndef ETHERTYPE_DNA_DL
# define ETHERTYPE_DNA_DL 0x6001
# endif
# ifndef ETHERTYPE_DNA_RC
# define ETHERTYPE_DNA_RC 0x6002
# endif
# ifndef ETHERTYPE_DNA_RT
# define ETHERTYPE_DNA_RT 0x6003
# endif
# ifndef ETHERTYPE_LAT
# define ETHERTYPE_LAT 0x6004
# endif
# ifndef ETHERTYPE_DEC_DIAG
# define ETHERTYPE_DEC_DIAG 0x6005
# endif
# ifndef ETHERTYPE_DEC_CUST
# define ETHERTYPE_DEC_CUST 0x6006
# endif
# ifndef ETHERTYPE_DEC_SCA
# define ETHERTYPE_DEC_SCA 0x6007
# endif
2001-04-03 05:42:11 +00:00
# ifndef ETHERTYPE_ETHBRIDGE
2004-12-01 21:13:39 +00:00
# define ETHERTYPE_ETHBRIDGE 0x6558 /* transparent Ethernet bridging [RFC1701]*/
2004-12-01 20:57:27 +00:00
# endif
# ifndef ETHERTYPE_RAW_FR
# define ETHERTYPE_RAW_FR 0x6559 /* Raw Frame Relay [RFC1701] */
2000-01-13 04:49:54 +00:00
# endif
1998-09-16 02:39:15 +00:00
# ifndef ETHERTYPE_REVARP
2001-04-03 05:42:11 +00:00
# define ETHERTYPE_REVARP 0x8035
1998-09-16 02:39:15 +00:00
# endif
2000-08-09 22:10:23 +00:00
# ifndef ETHERTYPE_DEC_LB
2001-04-03 05:42:11 +00:00
# define ETHERTYPE_DEC_LB 0x8038
2000-08-09 22:10:23 +00:00
# endif
2004-12-29 00:44:45 +00:00
# ifndef ETHERTYPE_DEC_LAST
# define ETHERTYPE_DEC_LAST 0x8041 /* DEC Local Area Systems Transport */
# endif
1998-09-16 02:39:15 +00:00
# ifndef ETHERTYPE_ATALK
2001-04-03 05:42:11 +00:00
# define ETHERTYPE_ATALK 0x809b
1998-09-16 02:39:15 +00:00
# endif
2002-02-17 00:16:19 +00:00
# ifndef ETHERTYPE_SNA
# define ETHERTYPE_SNA 0x80d5
# endif
1998-09-16 02:39:15 +00:00
# ifndef ETHERTYPE_AARP
2001-04-03 05:42:11 +00:00
# define ETHERTYPE_AARP 0x80f3
1998-09-16 02:39:15 +00:00
# endif
2001-04-03 05:42:11 +00:00
# ifndef ETHERTYPE_VLAN
# define ETHERTYPE_VLAN 0x8100 /* 802.1Q Virtual LAN */
1998-09-17 02:37:47 +00:00
# endif
1998-12-19 00:12:23 +00:00
2007-04-27 06:34:31 +00:00
# ifndef ETHERTYPE_NSRP
# define ETHERTYPE_NSRP 0x8133
# endif
2006-10-31 14:36:32 +00:00
# ifndef ETHERTYPE_IPX
# define ETHERTYPE_IPX 0x8137
# endif
2001-04-03 05:42:11 +00:00
# ifndef ETHERTYPE_SNMP
# define ETHERTYPE_SNMP 0x814c /* SNMP over Ethernet, RFC 1089 */
1999-06-22 22:02:39 +00:00
# endif
2001-03-29 08:05:07 +00:00
# ifndef ETHERTYPE_WCP
2001-04-03 05:42:11 +00:00
# define ETHERTYPE_WCP 0x80ff /* Wellfleet Compression Protocol */
1998-12-19 00:12:23 +00:00
# endif
2006-09-12 12:58:16 +00:00
# ifndef ETHERTYPE_STP
# define ETHERTYPE_STP 0x8181 /* STP, HIPPI-ST */
# endif
2003-10-08 06:44:15 +00:00
# ifndef ETHERTYPE_ISMP
# define ETHERTYPE_ISMP 0x81fd /* Cabletron Interswitch Message Protocol */
# endif
# ifndef ETHERTYPE_ISMP_TBFLOOD
# define ETHERTYPE_ISMP_TBFLOOD 0x81ff /* Cabletron Interswitch Message Protocol */
# endif
2001-04-03 05:42:11 +00:00
# ifndef ETHERTYPE_IPv6
# define ETHERTYPE_IPv6 0x86dd
1999-06-11 15:30:55 +00:00
# endif
2006-10-07 14:48:04 +00:00
# ifndef ETHERTYPE_WLCCP
# define ETHERTYPE_WLCCP 0x872d /* Cisco Wireless Lan Context Control Protocol */
2005-08-27 05:17:35 +00:00
# endif
2004-07-27 06:05:20 +00:00
# ifndef ETHERTYPE_MAC_CONTROL
# define ETHERTYPE_MAC_CONTROL 0x8808
# endif
2002-06-13 07:18:49 +00:00
# ifndef ETHERTYPE_SLOW_PROTOCOLS
2004-07-27 06:05:20 +00:00
# define ETHERTYPE_SLOW_PROTOCOLS 0x8809
2002-06-13 07:18:49 +00:00
# endif
2001-04-03 05:42:11 +00:00
# ifndef ETHERTYPE_PPP
# define ETHERTYPE_PPP 0x880b /* no, this is not PPPoE */
1999-06-11 15:30:55 +00:00
# endif
2006-11-25 12:04:21 +00:00
# ifndef ETHERTYPE_COBRANET
# define ETHERTYPE_COBRANET 0x8819 /* Cirrus cobranet */
# endif
2001-04-03 05:42:11 +00:00
# ifndef ETHERTYPE_MPLS
# define ETHERTYPE_MPLS 0x8847 /* MPLS unicast packet */
1999-10-20 22:41:12 +00:00
# endif
2001-04-03 05:42:11 +00:00
# ifndef ETHERTYPE_MPLS_MULTI
# define ETHERTYPE_MPLS_MULTI 0x8848 /* MPLS multicast packet */
1999-11-26 04:52:36 +00:00
# endif
1999-06-11 15:30:55 +00:00
2005-09-28 17:16:30 +00:00
# ifndef ETHERTYPE_FOUNDRY
# define ETHERTYPE_FOUNDRY 0x885a /* Some Foundry proprietary protocol */
# endif
2006-10-31 14:36:32 +00:00
# ifndef ETHERTYPE_PPPOED
# define ETHERTYPE_PPPOED 0x8863 /* PPPoE Discovery Protocol */
# endif
2001-04-03 05:42:11 +00:00
# ifndef ETHERTYPE_PPPOES
# define ETHERTYPE_PPPOES 0x8864 /* PPPoE Session Protocol */
2000-03-09 18:31:51 +00:00
# endif
2003-03-02 15:50:55 +00:00
# ifndef ETHERTYPE_INTEL_ANS
# define ETHERTYPE_INTEL_ANS 0x886d /* Intel ANS (NIC teaming) http://www.intel.com/support/network/adapter/ans/probes.htm */
# endif
# ifndef ETHERTYPE_MS_NLB_HEARTBEAT
# define ETHERTYPE_MS_NLB_HEARTBEAT 0x886f /* MS Network Load Balancing heartbeat http://www.microsoft.com/technet/treeview/default.asp?url=/TechNet/prodtechnol/windows2000serv/deploy/confeat/nlbovw.asp */
# endif
2007-01-17 16:34:11 +00:00
# ifndef ETHERTYPE_HOMEPLUG
# define ETHERTYPE_HOMEPLUG 0x887B /* IEEE assigned Ethertype */
# endif
2004-12-01 20:57:27 +00:00
# ifndef ETHERTYPE_CDMA2000_A10_UBS
2004-12-01 21:11:48 +00:00
# define ETHERTYPE_CDMA2000_A10_UBS 0x8881 /* the byte stream protocol that is used for IP based micro-mobility bearer interfaces (A10) in CDMA2000(R)-based wireless networks */
2004-12-01 20:57:27 +00:00
# endif
2001-11-06 20:30:40 +00:00
# ifndef ETHERTYPE_EAPOL
# define ETHERTYPE_EAPOL 0x888e /* 802.1x Authentication */
# endif
2003-11-17 18:23:34 +00:00
# ifndef ETHERTYPE_PROFINET
2006-05-04 19:48:33 +00:00
# define ETHERTYPE_PROFINET 0x8892 /* PROFIBUS PROFINET protocol */
2003-11-17 18:23:34 +00:00
# endif
2002-11-16 08:25:35 +00:00
# ifndef ETHERTYPE_HYPERSCSI
# define ETHERTYPE_HYPERSCSI 0x889A /* HyperSCSI */
# endif
2005-06-07 20:56:54 +00:00
# ifndef ETHERTYPE_CSM_ENCAPS
# define ETHERTYPE_CSM_ENCAPS 0x889B /* Mindspeed Technologies www.mindspeed.com */
# endif
2006-06-04 13:07:13 +00:00
# ifndef ETHERTYPE_TELKONET
# define ETHERTYPE_TELKONET 0x88A1 /* Telkonet powerline ethernet */
# endif
2004-12-07 03:16:34 +00:00
# ifndef ETHERTYPE_AOE
# define ETHERTYPE_AOE 0x88A2
# endif
2007-10-14 15:45:24 +00:00
# ifndef ETHERTYPE_ECATF
# define ETHERTYPE_ECATF 0x88A4 /* Ethernet type for EtherCAT frames */
# endif
2007-08-17 21:21:18 +00:00
# ifndef ETHERTYPE_IEEE_802_1AD
# define ETHERTYPE_IEEE_802_1AD 0x88A8 /* IEEE 802.1ad Provider Bridge, Q-in-Q */
# endif
2006-08-22 19:55:31 +00:00
# ifndef ETHERTYPE_EPL_V2
# define ETHERTYPE_EPL_V2 0x88AB
# endif
2003-01-14 01:17:44 +00:00
# ifndef ETHERTYPE_BRDWALK
# define ETHERTYPE_BRDWALK 0x88AE
# endif
2005-01-06 08:37:43 +00:00
# ifndef ETHERTYPE_IEEE802_OUI_EXTENDED
# define ETHERTYPE_IEEE802_OUI_EXTENDED 0x88B7 /* IEEE 802a OUI Extended Ethertype */
# endif
2006-01-17 21:50:43 +00:00
# ifndef ETHERTYPE_IEC61850_GOOSE
# define ETHERTYPE_IEC61850_GOOSE 0x88b8 /* IEC 61850 is a global standard for the use in utility communication,*/
2008-02-27 21:52:17 +00:00
# endif /* in particular for the information exchange between IED's in a power */
/* transmission or distribution substation. */
/* There are three types of application services
that use a specific EtherType . GOOSE uses
EtherType field 88 b8 , GSE management services
uses EtherType field 88 b9 . These two protocols
are defined in IEC 61850 - 8 - 1. SV ( Sampled
Value Transmission ) uses EtherType field
88 ba ; the protocol is defined in IEC 61850 - 9 - 1
and IEC 61850 - 9 - 2. */
2006-01-17 21:50:43 +00:00
# ifndef ETHERTYPE_IEC61850_GSE
# define ETHERTYPE_IEC61850_GSE 0x88b9 /* IEC 61850 is a global standard for the use in utility communication,*/
2008-02-27 21:52:17 +00:00
# endif /* in particular for the information exchange between IED's in a power */
2006-01-17 21:50:43 +00:00
# ifndef ETHERTYPE_IEC61850_SV
# define ETHERTYPE_IEC61850_SV 0x88ba /* IEC 61850 is a global standard for the use in utility communication,*/
2008-02-27 21:52:17 +00:00
# endif /* in particular for the information exchange between IED's in a power */
2006-01-17 21:50:43 +00:00
2005-11-21 19:01:07 +00:00
# ifndef ETHERTYPE_TIPC
# define ETHERTYPE_TIPC 0x88ca /* TIPC (Transparent Inter Process Communication, */
2008-02-27 21:52:17 +00:00
# endif /* http://tipc.sourceforge.net/) Ericsson Research Canada Inc */
2005-11-21 19:01:07 +00:00
2006-10-31 14:36:32 +00:00
# ifndef ETHERTYPE_RSN_PREAUTH
# define ETHERTYPE_RSN_PREAUTH 0x88c7 /* 802.11i Pre-Authentication */
# endif
2005-02-21 20:19:15 +00:00
# ifndef ETHERTYPE_LLDP
2006-06-13 18:26:49 +00:00
# define ETHERTYPE_LLDP 0x88cc /* IEEE 802.1AB Link Layer Discovery Protocol (LLDP) */
2005-02-21 20:19:15 +00:00
# endif
2008-02-13 17:34:05 +00:00
# ifndef ETHERTYPE_SERCOS
# define ETHERTYPE_SERCOS 0x88cd /* SERCOS interface real-time protocol for motion control */
# endif
2005-06-07 20:56:54 +00:00
# ifndef ETHERTYPE_3GPP2
# define ETHERTYPE_3GPP2 0x88d2 /* This will be used in a revision of the Interoperabi */
2008-02-27 21:52:17 +00:00
# endif /* Specification (IOS) for cdma2000 Access Network Interfaces (document numbers A.S0011-B */
/* through A.S0017-B v1.0). This document already uses the Ether type 8881 */
2005-06-07 20:56:54 +00:00
2007-03-21 16:14:23 +00:00
# ifndef ETHERTYPE_LLTD
2008-08-14 17:03:30 +00:00
# define ETHERTYPE_LLTD 0x88d9 /* Link Layer Topology Discovery (LLTD) */
2007-03-21 16:14:23 +00:00
# endif
2008-08-14 17:03:30 +00:00
# ifndef ETHERTYPE_WSMP /* Wireless Access in a Vehicle Environment */
# define ETHERTYPE_WSMP 0x88dc /*(WAVE) Short Message Protocol (WSM) as defined */
# endif /* in IEEE P1609.3. */
2006-06-13 18:26:49 +00:00
# ifndef ETHERTYPE_MRP
# define ETHERTYPE_MRP 0x88e3 /* IEC 61158-6-10 Media Redundancy Protocol (MRP) */
# endif
2007-08-17 21:21:18 +00:00
# ifndef ETHERTYPE_IEEE_802_1AH
2008-06-11 18:20:02 +00:00
# define ETHERTYPE_IEEE_802_1AH 0x88E7 /* IEEE 802.1ah Provider Backbone Bridge Mac-in-Mac */
2007-08-17 21:21:18 +00:00
# endif
2007-07-06 10:03:19 +00:00
# ifndef ETHERTYPE_PTP
# define ETHERTYPE_PTP 0x88F7 /* IEEE1588v2 (PTPv2) over Ethernet */
2008-02-27 21:52:17 +00:00
# endif /* in particular for the information exchange between IED's in a power */
/* transmission or distribution substation. */
/* There are three types of application services */
# ifndef ETHERTYPE_PRP
# define ETHERTYPE_PRP 0x88FB /* Parallel Redundancy Protocol (IEC62439 Chapter 6) */
# endif
2007-07-06 10:03:19 +00:00
2007-10-07 15:14:27 +00:00
# ifndef ETHERTYPE_CFM
# define ETHERTYPE_CFM 0x8902 /* IEEE 802.1ag Connectivity Fault Management */
# endif /* (CFM) protocol. */
2007-05-28 06:38:30 +00:00
# ifndef ETHERTYPE_FCOE
# define ETHERTYPE_FCOE 0x8906 /* Fibre Channel over Ethernet */
# endif
2008-07-15 20:56:22 +00:00
# ifndef ETHERTYPE_FIP
# define ETHERTYPE_FIP 0x8914 /* FCoE Initialization Protocol */
# endif
2008-12-10 07:00:26 +00:00
# ifndef ETHERTYPE_TTE_PCF
# define ETHERTYPE_TTE_PCF 0x891d /* TTEthernet Protocol Control Frame */
# endif
2003-03-02 15:50:55 +00:00
# ifndef ETHERTYPE_LOOP
# define ETHERTYPE_LOOP 0x9000 /* used for layer 2 testing (do i see my own frames on the wire) */
# endif
2004-11-24 02:36:14 +00:00
# ifndef ETHERTYPE_RTMAC
# define ETHERTYPE_RTMAC 0x9021 /* RTnet: Real-Time Media Access Control */
2003-06-11 09:17:03 +00:00
# endif
2003-11-27 21:09:43 +00:00
# ifndef ETHERTYPE_RTCFG
2004-11-24 02:36:14 +00:00
# define ETHERTYPE_RTCFG 0x9022 /* RTnet: Real-Time Configuration Protocol */
2003-11-27 21:09:43 +00:00
# endif
2006-08-18 08:46:31 +00:00
# ifndef ETHERTYPE_LLT
# define ETHERTYPE_LLT 0xCAFE /* Veritas Low Latency Transport (not officially registered) */
# endif
2003-03-05 07:41:24 +00:00
# ifndef ETHERTYPE_FCFT
/* type used to transport FC frames+MDS hdr internal to Cisco's MDS switch */
# define ETHERTYPE_FCFT 0xFCFC
# endif
2001-04-17 06:43:21 +00:00
extern const value_string etype_vals [ ] ;
1999-06-22 22:02:39 +00:00
2001-04-17 06:43:21 +00:00
# endif /* etypes.h */