An Ethernet type of 0x6558 is "Transparent Ethernet Bridging" which,

apparently, means an Ethernet packet is stuffed into the payload; add
support for it as an Ethernet, Cisco HDLC, and GRE packet type.

Sort the Ethernet types in "etypes.h" by value.

svn path=/trunk/; revision=3250
This commit is contained in:
Guy Harris 2001-04-03 05:42:11 +00:00
parent a817e97015
commit 6617c40dd7
5 changed files with 85 additions and 70 deletions

110
etypes.h
View File

@ -1,7 +1,7 @@
/* etypes.h
* Defines ethernet packet types, similar to tcpdump's ethertype.h
*
* $Id: etypes.h,v 1.16 2001/03/29 08:05:06 guy Exp $
* $Id: etypes.h,v 1.17 2001/04/03 05:42:11 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -45,10 +45,33 @@
* http://www.cavebear.com/CaveBear/Ethernet/
*/
#ifndef ETHERTYPE_VINES
#define ETHERTYPE_VINES 0x0bad
#endif
#ifndef ETHERTYPE_TRAIN
/*
* Created by Microsoft Network Monitor as a summary packet.
*/
#define ETHERTYPE_TRAIN 0x1984
#endif
#ifndef ETHERTYPE_3C_NBP_DGRAM
#define ETHERTYPE_3C_NBP_DGRAM 0x3c07
#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
#ifndef ETHERTYPE_DEC
#define ETHERTYPE_DEC 0x6000
#endif
@ -81,85 +104,68 @@
#define ETHERTYPE_DEC_SCA 0x6007
#endif
#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_X25L3
#define ETHERTYPE_X25L3 0x0805
#ifndef ETHERTYPE_ETHBRIDGE
#define ETHERTYPE_ETHBRIDGE 0x6558 /* transparent Ethernet bridging */
#endif
#ifndef ETHERTYPE_REVARP
#define ETHERTYPE_REVARP 0x8035
#define ETHERTYPE_REVARP 0x8035
#endif
#ifndef ETHERTYPE_DEC_LB
#define ETHERTYPE_DEC_LB 0x8038
#define ETHERTYPE_DEC_LB 0x8038
#endif
#ifndef ETHERTYPE_ATALK
#define ETHERTYPE_ATALK 0x809b
#define ETHERTYPE_ATALK 0x809b
#endif
#ifndef ETHERTYPE_AARP
#define ETHERTYPE_AARP 0x80f3
#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_WCP
#define ETHERTYPE_WCP 0x80ff /* Wellfleet Compression 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 */
#define ETHERTYPE_IPX 0x8137
#endif
#ifndef ETHERTYPE_VLAN
#define ETHERTYPE_VLAN 0x8100 /* 802.1Q Virtual LAN */
#define ETHERTYPE_VLAN 0x8100 /* 802.1Q Virtual LAN */
#endif
#ifndef ETHERTYPE_SNMP
#define ETHERTYPE_SNMP 0x814c /* SNMP over Ethernet, RFC 1089 */
#define ETHERTYPE_SNMP 0x814c /* SNMP over Ethernet, RFC 1089 */
#endif
#ifndef ETHERTYPE_MPLS
#define ETHERTYPE_MPLS 0x8847 /* MPLS unicast packet */
#ifndef ETHERTYPE_WCP
#define ETHERTYPE_WCP 0x80ff /* Wellfleet Compression Protocol */
#endif
#ifndef ETHERTYPE_MPLS_MULTI
#define ETHERTYPE_MPLS_MULTI 0x8848 /* MPLS multicast packet */
#ifndef ETHERTYPE_IPv6
#define ETHERTYPE_IPv6 0x86dd
#endif
#ifndef ETHERTYPE_PPP
#define ETHERTYPE_PPP 0x880b /* no, this is not PPPoE */
#define ETHERTYPE_PPP 0x880b /* no, this is not PPPoE */
#endif
#ifndef ETHERTYPE_MPLS
#define ETHERTYPE_MPLS 0x8847 /* MPLS unicast packet */
#endif
#ifndef ETHERTYPE_MPLS_MULTI
#define ETHERTYPE_MPLS_MULTI 0x8848 /* MPLS multicast packet */
#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_LOOP
#define ETHERTYPE_LOOP 0x9000 /* used for layer 2 testing (do i see my own frames on the wire) */
#endif
#endif /* etypes.h */

View File

@ -1,7 +1,7 @@
/* packet-chdlc.c
* Routines for Cisco HDLC packet disassembly
*
* $Id: packet-chdlc.c,v 1.1 2001/03/15 09:11:00 guy Exp $
* $Id: packet-chdlc.c,v 1.2 2001/04/03 05:42:11 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -87,14 +87,15 @@ static const value_string chdlc_address_vals[] = {
};
const value_string chdlc_vals[] = {
{0x2000, "Cisco Discovery Protocol"},
{ETHERTYPE_IP, "IP"},
{CISCO_SLARP, "SLARP"},
{ETHERTYPE_DEC_LB, "DEC LanBridge"},
{ETHERTYPE_ATALK, "Appletalk"},
{ETHERTYPE_AARP, "AARP"},
{ETHERTYPE_IPX, "Netware IPX/SPX"},
{0, NULL}
{0x2000, "Cisco Discovery Protocol"},
{ETHERTYPE_IP, "IP"},
{CISCO_SLARP, "SLARP"},
{ETHERTYPE_DEC_LB, "DEC LanBridge"},
{ETHERTYPE_ATALK, "Appletalk"},
{ETHERTYPE_AARP, "AARP"},
{ETHERTYPE_IPX, "Netware IPX/SPX"},
{ETHERTYPE_ETHBRIDGE, "Transparent Ethernet bridging" },
{0, NULL}
};
void

View File

@ -1,7 +1,7 @@
/* packet-eth.c
* Routines for ethernet packet disassembly
*
* $Id: packet-eth.c,v 1.62 2001/03/22 23:22:23 gram Exp $
* $Id: packet-eth.c,v 1.63 2001/04/03 05:42:11 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -313,4 +313,10 @@ proto_reg_handoff_eth(void)
dissector_add("wtap_encap", WTAP_ENCAP_ETHERNET, dissect_eth,
proto_eth);
dissector_add("ethertype", ETHERTYPE_ETHBRIDGE, dissect_eth,
proto_eth);
dissector_add("chdlctype", ETHERTYPE_ETHBRIDGE, dissect_eth,
proto_eth);
dissector_add("gre.proto", ETHERTYPE_ETHBRIDGE, dissect_eth,
proto_eth);
}

View File

@ -1,7 +1,7 @@
/* ethertype.c
* Routines for calling the right protocol for the ethertype.
*
* $Id: packet-ethertype.c,v 1.13 2001/03/29 08:05:06 guy Exp $
* $Id: packet-ethertype.c,v 1.14 2001/04/03 05:42:11 guy Exp $
*
* Gilbert Ramirez <gram@xiexie.org>
*
@ -71,6 +71,7 @@ const value_string etype_vals[] = {
{ETHERTYPE_DEC_DIAG, "DEC Diagnostics" },
{ETHERTYPE_DEC_CUST, "DEC Customer use" },
{ETHERTYPE_DEC_SCA, "DEC LAVC/SCA" },
{ETHERTYPE_ETHBRIDGE, "Transparent Ethernet bridging" },
{0, NULL } };
static void add_trailer(proto_tree *fh_tree, int trailer_id, tvbuff_t *tvb,

View File

@ -2,7 +2,7 @@
* Routines for the Generic Routing Encapsulation (GRE) protocol
* Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
*
* $Id: packet-gre.c,v 1.39 2001/01/22 00:20:29 guy Exp $
* $Id: packet-gre.c,v 1.40 2001/04/03 05:42:11 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -69,12 +69,13 @@ static void add_flags_and_ver(proto_tree *, guint16, tvbuff_t *, int, int);
static void dissect_gre_wccp2_redirect_header(tvbuff_t *, int, proto_tree *);
static const value_string typevals[] = {
{ ETHERTYPE_PPP, "PPP" },
{ ETHERTYPE_IP, "IP" },
{ GRE_WCCP, "WCCP"},
{ ETHERTYPE_IPX, "IPX"},
{ GRE_FR, "FR"},
{ 0, NULL }
{ ETHERTYPE_PPP, "PPP" },
{ ETHERTYPE_IP, "IP" },
{ GRE_WCCP, "WCCP"},
{ ETHERTYPE_IPX, "IPX"},
{ ETHERTYPE_ETHBRIDGE, "Transparent Ethernet bridging" },
{ GRE_FR, "Frame Relay"},
{ 0, NULL }
};
static void