aboutsummaryrefslogtreecommitdiffstats
path: root/packet-sll.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-01-03 10:34:42 +0000
committerGuy Harris <guy@alum.mit.edu>2001-01-03 10:34:42 +0000
commitb151ddecbb6800271e1cc2b8b0d2bb355dadbe89 (patch)
treeb9e74ab80383b0add3d88c281308f9fb06f0b32e /packet-sll.c
parentb92ebd4a23fb75f3972527609abd4f8360489805 (diff)
Have the TR MAC and LLC dissectors register themselves, make them
static, and have other dissectors call them through handles. svn path=/trunk/; revision=2816
Diffstat (limited to 'packet-sll.c')
-rw-r--r--packet-sll.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/packet-sll.c b/packet-sll.c
index 3cdf97b0c5..25e3794620 100644
--- a/packet-sll.c
+++ b/packet-sll.c
@@ -1,7 +1,7 @@
/* packet-sll.c
* Routines for disassembly of packets from Linux "cooked mode" captures
*
- * $Id: packet-sll.c,v 1.2 2001/01/03 06:55:32 guy Exp $
+ * $Id: packet-sll.c,v 1.3 2001/01/03 10:34:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -87,6 +87,8 @@ static const value_string ltype_vals[] = {
{ 0, NULL }
};
+static dissector_handle_t llc_handle;
+
void
capture_sll(const u_char *pd, packet_counts *ld)
{
@@ -205,7 +207,7 @@ dissect_sll(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/*
* 802.2 LLC.
*/
- dissect_llc(next_tvb, pinfo, tree);
+ call_dissector(llc_handle, next_tvb, pinfo, tree);
break;
case LINUX_SLL_P_802_3:
@@ -313,5 +315,10 @@ proto_register_sll(void)
void
proto_reg_handoff_sll(void)
{
+ /*
+ * Get a handle for the LLC dissector.
+ */
+ llc_handle = find_dissector("llc");
+
dissector_add("wtap_encap", WTAP_ENCAP_SLL, dissect_sll);
}