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
*
1998-09-16 02:39:15 +00:00
* Ethereal - Network traffic analyzer
2002-06-13 07:18:49 +00:00
* By Gerald Combs < gerald @ ethereal . com >
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
*/
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
2005-03-03 08:34:48 +00:00
# ifndef ETHERTYPE_XNS_IDP
# define ETHERTYPE_XNS_IDP 0x0600
# endif
2001-04-03 05:42:11 +00:00
# ifndef ETHERTYPE_IP
# define ETHERTYPE_IP 0x0800
# endif
# ifndef ETHERTYPE_X25L3
# define ETHERTYPE_X25L3 0x0805
# endif
# ifndef ETHERTYPE_ARP
# define ETHERTYPE_ARP 0x0806
# 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
# ifndef ETHERTYPE_IPX
2001-04-03 05:42:11 +00:00
# define ETHERTYPE_IPX 0x8137
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
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
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
2005-08-27 05:17:35 +00:00
# ifndef ETHERTYPE_CISCOWL
# define ETHERTYPE_CISCOWL 0x872d /* Cisco Wireless (Aironet) */
# 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
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
2001-04-03 05:42:11 +00:00
# ifndef ETHERTYPE_PPPOED
# define ETHERTYPE_PPPOED 0x8863 /* PPPoE Discovery Protocol */
2000-03-09 18:31:51 +00:00
# endif
2005-09-28 17:16:30 +00:00
# ifndef ETHERTYPE_FOUNDRY
# define ETHERTYPE_FOUNDRY 0x885a /* Some Foundry proprietary 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
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
# define ETHERTYPE_PROFINET 0x8892 /* PROFIBUS PROFInet protocol */
# 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
2004-12-07 03:16:34 +00:00
# ifndef ETHERTYPE_AOE
# define ETHERTYPE_AOE 0x88A2
# 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
2004-04-07 06:04:22 +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
# define ETHERTYPE_LLDP 0x88cc /* IEEE 802.1 Link Layer Discovery Protocol (LLDP) */
# 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 */
# 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 */
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
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 */