aboutsummaryrefslogtreecommitdiffstats
path: root/packet-vlan.c
diff options
context:
space:
mode:
authornneul <nneul@f5534014-38df-0310-8fa8-9805f1628bb7>1999-12-03 21:28:11 +0000
committernneul <nneul@f5534014-38df-0310-8fa8-9805f1628bb7>1999-12-03 21:28:11 +0000
commitc363655eea4aca80a2778a4e5dd19b0c40d1c06c (patch)
treef4b766f4af00880703a8b4aef10c01fb0a98520d /packet-vlan.c
parent8eae262ff5cda924853570452898fa744d4313b9 (diff)
more handling of etype<max_802_3_len
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1189 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-vlan.c')
-rw-r--r--packet-vlan.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/packet-vlan.c b/packet-vlan.c
index d6292fcae1..f9596ab991 100644
--- a/packet-vlan.c
+++ b/packet-vlan.c
@@ -1,7 +1,7 @@
/* packet-vlan.c
* Routines for VLAN 802.1Q ethernet header disassembly
*
- * $Id: packet-vlan.c,v 1.4 1999/11/16 11:43:02 guy Exp $
+ * $Id: packet-vlan.c,v 1.5 1999/12/03 21:28:11 nneul Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -37,6 +37,7 @@
#include <glib.h>
#include "packet.h"
+#include "etypes.h"
static int proto_vlan = -1;
static int hf_vlan_etype = -1;
@@ -75,7 +76,22 @@ dissect_vlan(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
proto_tree_add_item(vlan_tree, hf_vlan_id, offset, 2, tci);
}
- ethertype(encap_proto, offset+4, pd, fd, tree, vlan_tree, hf_vlan_etype);
+ if ( encap_proto <= IEEE_802_3_MAX_LEN) {
+#if 0
+ if ( pd[offset+4] == 0xff && pd[offset+5] == 0xff ) {
+ dissect_ipx(pd,offset+4,fd,tree);
+ /* should capture_ipx */
+ } else {
+ dissect_llc(pd,offset+4,fd,tree);
+ /* should capture_llc */
+ }
+#else
+ dissect_data(pd,offset+4,fd,tree);
+ /* I don't know what to here, so am just doing as data for now */
+#endif
+ } else {
+ ethertype(encap_proto, offset+4, pd, fd, tree, vlan_tree, hf_vlan_etype);
+ }
}
void