aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-04-03 05:42:11 +0000
committerGuy Harris <guy@alum.mit.edu>2001-04-03 05:42:11 +0000
commit6617c40dd77ec224fdab6fa96ac07f6ed09ad273 (patch)
treee4ac94d232abcfeb5018b25c1e86cec4e748cf32
parenta817e9701520b38846b55b4c6d00981ad52f0ced (diff)
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
-rw-r--r--etypes.h94
-rw-r--r--packet-chdlc.c19
-rw-r--r--packet-eth.c8
-rw-r--r--packet-ethertype.c3
-rw-r--r--packet-gre.c15
5 files changed, 77 insertions, 62 deletions
diff --git a/etypes.h b/etypes.h
index 146c0e489e..f9cd79df6b 100644
--- a/etypes.h
+++ b/etypes.h
@@ -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
+#define ETHERTYPE_IPX 0x8137
#endif
-#ifndef ETHERTYPE_VINES
-#define ETHERTYPE_VINES 0xbad
+#ifndef ETHERTYPE_VLAN
+#define ETHERTYPE_VLAN 0x8100 /* 802.1Q Virtual LAN */
#endif
-#ifndef ETHERTYPE_TRAIN
-#define ETHERTYPE_TRAIN 0x1984
-/* Created by Netmon as a summary packet */
+#ifndef ETHERTYPE_SNMP
+#define ETHERTYPE_SNMP 0x814c /* SNMP over Ethernet, RFC 1089 */
#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) */
+#define ETHERTYPE_WCP 0x80ff /* Wellfleet Compression Protocol */
#endif
-#ifndef ETHERTYPE_PPPOED
-#define ETHERTYPE_PPPOED 0x8863 /* PPPoE Discovery Protocol */
+#ifndef ETHERTYPE_IPv6
+#define ETHERTYPE_IPv6 0x86dd
#endif
-#ifndef ETHERTYPE_PPPOES
-#define ETHERTYPE_PPPOES 0x8864 /* PPPoE Session Protocol */
+#ifndef ETHERTYPE_PPP
+#define ETHERTYPE_PPP 0x880b /* no, this is not PPPoE */
#endif
-#ifndef ETHERTYPE_VLAN
-#define ETHERTYPE_VLAN 0x8100 /* 802.1Q Virtual LAN */
+#ifndef ETHERTYPE_MPLS
+#define ETHERTYPE_MPLS 0x8847 /* MPLS unicast packet */
#endif
-#ifndef ETHERTYPE_SNMP
-#define ETHERTYPE_SNMP 0x814c /* SNMP over Ethernet, RFC 1089 */
+#ifndef ETHERTYPE_MPLS_MULTI
+#define ETHERTYPE_MPLS_MULTI 0x8848 /* MPLS multicast packet */
#endif
-#ifndef ETHERTYPE_MPLS
-#define ETHERTYPE_MPLS 0x8847 /* MPLS unicast packet */
+#ifndef ETHERTYPE_PPPOED
+#define ETHERTYPE_PPPOED 0x8863 /* PPPoE Discovery Protocol */
#endif
-#ifndef ETHERTYPE_MPLS_MULTI
-#define ETHERTYPE_MPLS_MULTI 0x8848 /* MPLS multicast packet */
+#ifndef ETHERTYPE_PPPOES
+#define ETHERTYPE_PPPOES 0x8864 /* PPPoE Session Protocol */
#endif
-#ifndef ETHERTYPE_PPP
-#define ETHERTYPE_PPP 0x880b /* no, this is not PPPoE */
+#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 */
diff --git a/packet-chdlc.c b/packet-chdlc.c
index 7c5d6d64aa..486388acb9 100644
--- a/packet-chdlc.c
+++ b/packet-chdlc.c
@@ -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
diff --git a/packet-eth.c b/packet-eth.c
index 17cb86bbe2..1f838836ac 100644
--- a/packet-eth.c
+++ b/packet-eth.c
@@ -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);
}
diff --git a/packet-ethertype.c b/packet-ethertype.c
index 1cc43a256c..4e561b30d3 100644
--- a/packet-ethertype.c
+++ b/packet-ethertype.c
@@ -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,
diff --git a/packet-gre.c b/packet-gre.c
index 28889464cb..d5f1a8b490 100644
--- a/packet-gre.c
+++ b/packet-gre.c
@@ -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