aboutsummaryrefslogtreecommitdiffstats
path: root/packet-vlan.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-01-03 10:34:42 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-01-03 10:34:42 +0000
commit0442a789c10c208756b38971f752eaf44ff37e03 (patch)
treeb9e74ab80383b0add3d88c281308f9fb06f0b32e /packet-vlan.c
parente2534b5ffb50ad4151b53180d94ef6036a3de560 (diff)
Have the TR MAC and LLC dissectors register themselves, make them
static, and have other dissectors call them through handles. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2816 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-vlan.c')
-rw-r--r--packet-vlan.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/packet-vlan.c b/packet-vlan.c
index b94e71fcda..c97e1f24e6 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.26 2001/01/03 06:55:34 guy Exp $
+ * $Id: packet-vlan.c,v 1.27 2001/01/03 10:34:42 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -51,6 +51,8 @@ static int hf_vlan_trailer = -1;
static gint ett_vlan = -1;
+static dissector_handle_t llc_handle;
+
void
capture_vlan(const u_char *pd, int offset, packet_counts *ld ) {
guint32 encap_proto;
@@ -157,7 +159,7 @@ dissect_vlan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ENDTRY;
if (is_802_2 ) {
/* 802.2 LLC */
- dissect_llc(next_tvb, pinfo, tree);
+ call_dissector(llc_handle, next_tvb, pinfo, tree);
} else {
dissect_ipx(next_tvb, pinfo, tree);
}
@@ -233,5 +235,10 @@ proto_register_vlan(void)
void
proto_reg_handoff_vlan(void)
{
+ /*
+ * Get a handle for the LLC dissector.
+ */
+ llc_handle = find_dissector("llc");
+
dissector_add("ethertype", ETHERTYPE_VLAN, dissect_vlan);
}