diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-01-21 20:16:01 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-01-21 20:16:01 +0000 |
commit | 987c7dc2a3efd14fc7e564aeffa24980ab2aeba2 (patch) | |
tree | 69b67bb42bc27af52a358934494429ba9377e4c5 /packet-isl.c | |
parent | 23e7ce209ac1e84e58529de43263f671b0cd753e (diff) | |
download | wireshark-987c7dc2a3efd14fc7e564aeffa24980ab2aeba2.tar.gz |
Always call the Ethernet and Token Ring dissectors through a dissector
handle, and make them static.
svn path=/trunk/; revision=2925
Diffstat (limited to 'packet-isl.c')
-rw-r--r-- | packet-isl.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/packet-isl.c b/packet-isl.c index ebd6bfdcd9..2469f3c79f 100644 --- a/packet-isl.c +++ b/packet-isl.c @@ -1,7 +1,7 @@ /* packet-isl.c * Routines for Cisco ISL Ethernet header disassembly * - * $Id: packet-isl.c,v 1.21 2001/01/09 06:31:37 guy Exp $ + * $Id: packet-isl.c,v 1.22 2001/01/21 20:16:01 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -82,6 +82,9 @@ static gint ett_isl = -1; #define TYPE_FDDI 0x2 #define TYPE_ATM 0x3 +static dissector_handle_t eth_handle; +static dissector_handle_t tr_handle; + void capture_isl(const u_char *pd, int offset, packet_counts *ld) { @@ -252,7 +255,7 @@ dissect_isl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) pinfo->len = compat_offset + length; pinfo->captured_len = compat_offset + captured_length; - dissect_eth(next_tvb, pinfo, tree); + call_dissector(eth_handle, next_tvb, pinfo, tree); } } break; @@ -267,7 +270,7 @@ dissect_isl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(fh_tree, hf_isl_esize, tvb, 30, 1, FALSE); } next_tvb = tvb_new_subset(tvb, 31, -1, -1); - dissect_tr(next_tvb, pinfo, tree); + call_dissector(tr_handle, next_tvb, pinfo, tree); break; default: @@ -348,3 +351,13 @@ proto_register_isl(void) register_dissector("isl", dissect_isl, proto_isl); } + +void +proto_reg_handoff_isl(void) +{ + /* + * Get handles for the Ethernet and Token Ring dissectors. + */ + eth_handle = find_dissector("eth"); + tr_handle = find_dissector("tr"); +} |