aboutsummaryrefslogtreecommitdiffstats
path: root/packet-fr.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-01-09 09:59:28 +0000
committerGuy Harris <guy@alum.mit.edu>2001-01-09 09:59:28 +0000
commit0998433430070846a7b7f16975bae136dc7cb489 (patch)
treeb4f19995d9968d6add3313338ba37fb7eb8b7b1e /packet-fr.c
parent0ae122c3a9da2ffb83cfb5d0744cd4e48f1c451c (diff)
Register the IPX dissector, make it static, and call it through a
handle. Call the IP dissector through a handle in the Frame Relay dissector. svn path=/trunk/; revision=2851
Diffstat (limited to 'packet-fr.c')
-rw-r--r--packet-fr.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/packet-fr.c b/packet-fr.c
index 4ef1c96b5e..53f2d21a3d 100644
--- a/packet-fr.c
+++ b/packet-fr.c
@@ -3,7 +3,7 @@
*
* Copyright 2001, Paul Ionescu <paul@acorp.ro>
*
- * $Id: packet-fr.c,v 1.4 2001/01/09 06:31:35 guy Exp $
+ * $Id: packet-fr.c,v 1.5 2001/01/09 09:59:28 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -50,6 +50,9 @@ static gint hf_fr_fecn = -1;
static gint hf_fr_de = -1;
static gint hf_fr_proto = -1;
+static dissector_handle_t ip_handle;
+static dissector_handle_t ipx_handle;
+
static void dissect_fr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_item *ti;
@@ -95,10 +98,10 @@ static void dissect_fr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
this is not yet implemented
*/
case 0x0800:
- dissect_ip(next_tvb,pinfo,tree);
+ call_dissector(ip_handle,next_tvb,pinfo,tree);
break;
case 0x8137:
- dissect_ipx(next_tvb,pinfo,tree);
+ call_dissector(ipx_handle,next_tvb,pinfo,tree);
break;
default:
dissect_data(next_tvb,0,pinfo,tree);
@@ -146,5 +149,11 @@ void proto_register_fr(void)
void proto_reg_handoff_fr(void)
{
+ /*
+ * Get handles for the IP and IPX dissectors.
+ */
+ ip_handle = find_dissector("ip");
+ ipx_handle = find_dissector("ipx");
+
dissector_add("wtap_encap", WTAP_ENCAP_FRELAY, dissect_fr, proto_fr);
}