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-atm.c | |
parent | 23e7ce209ac1e84e58529de43263f671b0cd753e (diff) |
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-atm.c')
-rw-r--r-- | packet-atm.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/packet-atm.c b/packet-atm.c index fe7dec01bb..4df151c7f2 100644 --- a/packet-atm.c +++ b/packet-atm.c @@ -1,7 +1,7 @@ /* packet-atm.c * Routines for ATM packet disassembly * - * $Id: packet-atm.c,v 1.31 2001/01/09 06:31:33 guy Exp $ + * $Id: packet-atm.c,v 1.32 2001/01/21 20:16:01 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -37,11 +37,8 @@ #include "oui.h" #include "resolv.h" -#include "packet-eth.h" -#include "packet-llc.h" #include "packet-snmp.h" #include "packet-sscop.h" -#include "packet-tr.h" static int proto_atm = -1; static int hf_atm_vpi = -1; @@ -57,6 +54,10 @@ static gint ett_atm_lane_lc_flags = -1; static gint ett_atm_lane_lc_tlv = -1; static gint ett_ilmi = -1; +static dissector_handle_t eth_handle; +static dissector_handle_t tr_handle; +static dissector_handle_t llc_handle; + /* * See * @@ -399,7 +400,7 @@ dissect_lane(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Dissect as Ethernet */ next_tvb_le_client = tvb_new_subset(tvb, 2, -1, -1); - dissect_eth(next_tvb_le_client, pinfo, tree); + call_dissector(eth_handle, next_tvb_le_client, pinfo, tree); break; case AHLT_LANE_802_5: @@ -408,7 +409,7 @@ dissect_lane(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Dissect as Token-Ring */ next_tvb_le_client = tvb_new_subset(tvb, 2, -1, -1); - dissect_tr(next_tvb_le_client, pinfo, tree); + call_dissector(tr_handle, next_tvb_le_client, pinfo, tree); break; default: @@ -482,8 +483,6 @@ static const value_string ipsilon_type_vals[] = { { 0, NULL } }; -static dissector_handle_t llc_handle; - /* * We don't know what kind of traffic this is; try to guess. * We at least know it's AAL5.... @@ -797,8 +796,10 @@ void proto_reg_handoff_atm(void) { /* - * Get a handle for the LLC dissector. + * Get handles for the Ethernet, Token Ring, and LLC dissectors. */ + eth_handle = find_dissector("eth"); + tr_handle = find_dissector("tr"); llc_handle = find_dissector("llc"); dissector_add("wtap_encap", WTAP_ENCAP_ATM_SNIFFER, dissect_atm, |