diff options
-rw-r--r-- | packet-eth.c | 8 | ||||
-rw-r--r-- | packet-fr.c | 15 | ||||
-rw-r--r-- | packet-gre.c | 8 | ||||
-rw-r--r-- | packet-ipx.c | 6 | ||||
-rw-r--r-- | packet-ipx.h | 3 | ||||
-rw-r--r-- | packet-sll.c | 8 | ||||
-rw-r--r-- | packet-vlan.c | 8 |
7 files changed, 37 insertions, 19 deletions
diff --git a/packet-eth.c b/packet-eth.c index 653b55ef69..0370982d27 100644 --- a/packet-eth.c +++ b/packet-eth.c @@ -1,7 +1,7 @@ /* packet-eth.c * Routines for ethernet packet disassembly * - * $Id: packet-eth.c,v 1.54 2001/01/09 06:31:35 guy Exp $ + * $Id: packet-eth.c,v 1.55 2001/01/09 09:59:28 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -55,6 +55,7 @@ static gint ett_ieee8023 = -1; static gint ett_ether2 = -1; static dissector_handle_t isl_handle; +static dissector_handle_t ipx_handle; static dissector_handle_t llc_handle; #define ETH_HEADER_SIZE 14 @@ -302,7 +303,7 @@ dissect_eth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) switch (ethhdr_type) { case ETHERNET_802_3: - dissect_ipx(next_tvb, pinfo, tree); + call_dissector(ipx_handle, next_tvb, pinfo, tree); break; case ETHERNET_802_2: call_dissector(llc_handle, next_tvb, pinfo, tree); @@ -387,9 +388,10 @@ void proto_reg_handoff_eth(void) { /* - * Get handles for the ISL and LLC dissectors. + * Get handles for the ISL, IPX, and LLC dissectors. */ isl_handle = find_dissector("isl"); + ipx_handle = find_dissector("ipx"); llc_handle = find_dissector("llc"); dissector_add("wtap_encap", WTAP_ENCAP_ETHERNET, dissect_eth, 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); } diff --git a/packet-gre.c b/packet-gre.c index 3162db06c9..fc79ce9405 100644 --- a/packet-gre.c +++ b/packet-gre.c @@ -2,7 +2,7 @@ * Routines for the Generic Routing Encapsulation (GRE) protocol * Brad Robel-Forrest <brad.robel-forrest@watchguard.com> * - * $Id: packet-gre.c,v 1.36 2001/01/09 06:31:36 guy Exp $ + * $Id: packet-gre.c,v 1.37 2001/01/09 09:59:28 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -80,6 +80,7 @@ static const value_string typevals[] = { }; static dissector_handle_t ip_handle; +static dissector_handle_t ipx_handle; static dissector_handle_t ppp_handle; static dissector_handle_t fr_handle; @@ -273,7 +274,7 @@ dissect_gre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) call_dissector(ip_handle, next_tvb, pinfo, tree); break; case GRE_IPX: - dissect_ipx(next_tvb, pinfo, tree); + call_dissector(ipx_handle, next_tvb, pinfo, tree); break; case GRE_FR: call_dissector(fr_handle, next_tvb, pinfo, tree); @@ -387,9 +388,10 @@ proto_reg_handoff_gre(void) dissector_add("ip.proto", IP_PROTO_GRE, dissect_gre, proto_gre); /* - * Get handles for the IP, PPP, and Frame Relay dissectors. + * Get handles for the IP, IPX, PPP, and Frame Relay dissectors. */ ip_handle = find_dissector("ip"); + ipx_handle = find_dissector("ipx"); ppp_handle = find_dissector("ppp"); fr_handle = find_dissector("fr"); } diff --git a/packet-ipx.c b/packet-ipx.c index dd07c34d4d..b96bbf70c8 100644 --- a/packet-ipx.c +++ b/packet-ipx.c @@ -2,7 +2,7 @@ * Routines for NetWare's IPX * Gilbert Ramirez <gram@xiexie.org> * - * $Id: packet-ipx.c,v 1.73 2001/01/09 06:31:37 guy Exp $ + * $Id: packet-ipx.c,v 1.74 2001/01/09 09:59:28 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -273,7 +273,7 @@ capture_ipx(const u_char *pd, int offset, packet_counts *ld) ld->ipx++; } -void +static void dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvbuff_t *next_tvb; @@ -882,6 +882,8 @@ proto_register_ipx(void) "IPX", "ipx"); proto_register_field_array(proto_ipx, hf_ipx, array_length(hf_ipx)); + register_dissector("ipx", dissect_ipx, proto_ipx); + proto_spx = proto_register_protocol("Sequenced Packet eXchange", "SPX", "spx"); proto_register_field_array(proto_spx, hf_spx, array_length(hf_spx)); diff --git a/packet-ipx.h b/packet-ipx.h index ae7a0f312b..94ec947297 100644 --- a/packet-ipx.h +++ b/packet-ipx.h @@ -2,7 +2,7 @@ * Routines for NetWare's IPX * Gilbert Ramirez <gram@xiexie.org> * - * $Id: packet-ipx.h,v 1.10 2000/08/11 13:34:11 deniel Exp $ + * $Id: packet-ipx.h,v 1.11 2001/01/09 09:59:28 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -145,6 +145,5 @@ gchar* ipxnet_to_string(const guint8 *ad); gchar* ipxnet_to_str_punct(const guint32 ad, char punct); void capture_ipx(const u_char *, int, packet_counts *); -void dissect_ipx(tvbuff_t *, packet_info *, proto_tree *); #endif diff --git a/packet-sll.c b/packet-sll.c index 7f053e3f83..2e82af1d62 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.4 2001/01/09 06:31:43 guy Exp $ + * $Id: packet-sll.c,v 1.5 2001/01/09 09:59:28 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -87,6 +87,7 @@ static const value_string ltype_vals[] = { { 0, NULL } }; +static dissector_handle_t ipx_handle; static dissector_handle_t llc_handle; void @@ -215,7 +216,7 @@ dissect_sll(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * Novell IPX inside 802.3 with no 802.2 LLC * header. */ - dissect_ipx(next_tvb, pinfo, tree); + call_dissector(ipx_handle, next_tvb, pinfo, tree); break; default: @@ -316,9 +317,10 @@ void proto_reg_handoff_sll(void) { /* - * Get a handle for the LLC dissector. + * Get handles for the IPX and LLC dissectors. */ llc_handle = find_dissector("llc"); + ipx_handle = find_dissector("ipx"); dissector_add("wtap_encap", WTAP_ENCAP_SLL, dissect_sll, proto_sll); } diff --git a/packet-vlan.c b/packet-vlan.c index d0f77af024..173f14bfd4 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.28 2001/01/09 06:31:44 guy Exp $ + * $Id: packet-vlan.c,v 1.29 2001/01/09 09:59:28 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -51,6 +51,7 @@ static int hf_vlan_trailer = -1; static gint ett_vlan = -1; +static dissector_handle_t ipx_handle; static dissector_handle_t llc_handle; void @@ -161,7 +162,7 @@ dissect_vlan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* 802.2 LLC */ call_dissector(llc_handle, next_tvb, pinfo, tree); } else { - dissect_ipx(next_tvb, pinfo, tree); + call_dissector(ipx_handle, next_tvb, pinfo, tree); } } else { length_before = tvb_reported_length(tvb); @@ -236,9 +237,10 @@ void proto_reg_handoff_vlan(void) { /* - * Get a handle for the LLC dissector. + * Get handles for the IPX and LLC dissectors. */ llc_handle = find_dissector("llc"); + ipx_handle = find_dissector("ipx"); dissector_add("ethertype", ETHERTYPE_VLAN, dissect_vlan, proto_vlan); } |