aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-04-29 17:24:35 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-04-29 17:24:35 +0000
commit496118707608e82c42c5218cb2a930138d2645c3 (patch)
tree0c2f3ff67f160a69377a1c12a71b7b1956cbc81d
parent27a4254cc5c21493bb52d77bde1020d507d4fdac (diff)
Don't export "ip_dissector_table" explicitly; now that we have
"find_dissector_table()", have the IPv6 and IPSEC dissectors fetch the IP dissector table by name. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7600 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--packet-ip.c5
-rw-r--r--packet-ip.h5
-rw-r--r--packet-ipsec.c7
-rw-r--r--packet-ipv6.c7
4 files changed, 13 insertions, 11 deletions
diff --git a/packet-ip.c b/packet-ip.c
index 46f59b944a..fa780c1fb3 100644
--- a/packet-ip.c
+++ b/packet-ip.c
@@ -1,7 +1,7 @@
/* packet-ip.c
* Routines for IP and miscellaneous IP protocol packet disassembly
*
- * $Id: packet-ip.c,v 1.190 2003/04/20 11:36:13 guy Exp $
+ * $Id: packet-ip.c,v 1.191 2003/04/29 17:24:35 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -124,8 +124,7 @@ static const fragment_items ip_frag_items = {
"fragments"
};
-/* Used by IPv6 as well, so not static */
-dissector_table_t ip_dissector_table;
+static dissector_table_t ip_dissector_table;
static dissector_handle_t ip_handle;
static dissector_handle_t data_handle;
diff --git a/packet-ip.h b/packet-ip.h
index 39aacbbb9e..c192724ce5 100644
--- a/packet-ip.h
+++ b/packet-ip.h
@@ -1,7 +1,7 @@
/* packet-ip.h
* Definitions for IP packet disassembly structures and routines
*
- * $Id: packet-ip.h,v 1.26 2003/01/22 01:16:33 sahlberg Exp $
+ * $Id: packet-ip.h,v 1.27 2003/04/29 17:24:35 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -64,9 +64,6 @@ typedef struct ip_tcp_opt {
void dissect_ip_tcp_options(tvbuff_t *, int, guint,
const ip_tcp_opt *, int, int, packet_info *, proto_tree *);
-/* Dissector table for "ip.proto"; used by IPv6 as well as IPv4 */
-extern dissector_table_t ip_dissector_table;
-
/* Export the DSCP value-string table for other protocols */
extern const value_string dscp_vals[];
diff --git a/packet-ipsec.c b/packet-ipsec.c
index 9b4b76071d..5cbce1ca97 100644
--- a/packet-ipsec.c
+++ b/packet-ipsec.c
@@ -1,7 +1,7 @@
/* packet-ipsec.c
* Routines for IPsec/IPComp packet disassembly
*
- * $Id: packet-ipsec.c,v 1.42 2002/08/28 21:00:17 jmayer Exp $
+ * $Id: packet-ipsec.c,v 1.43 2003/04/29 17:24:35 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -32,7 +32,6 @@
#include <glib.h>
#include <epan/packet.h>
#include "packet-ipsec.h"
-#include "packet-ip.h"
#include <epan/resolv.h>
#include "ipproto.h"
#include "prefs.h"
@@ -56,6 +55,8 @@ static gint ett_ipcomp = -1;
static dissector_handle_t data_handle;
+static dissector_table_t ip_dissector_table;
+
struct newah {
guint8 ah_nxt; /* Next Header */
guint8 ah_len; /* Length of data + 1, in 32bit */
@@ -353,4 +354,6 @@ proto_reg_handoff_ipsec(void)
dissector_add("ip.proto", IP_PROTO_ESP, esp_handle);
ipcomp_handle = create_dissector_handle(dissect_ipcomp, proto_ipcomp);
dissector_add("ip.proto", IP_PROTO_IPCOMP, ipcomp_handle);
+
+ ip_dissector_table = find_dissector_table("ip.proto");
}
diff --git a/packet-ipv6.c b/packet-ipv6.c
index 6ef5d2ebf0..bf678741a2 100644
--- a/packet-ipv6.c
+++ b/packet-ipv6.c
@@ -1,7 +1,7 @@
/* packet-ipv6.c
* Routines for IPv6 packet disassembly
*
- * $Id: packet-ipv6.c,v 1.97 2003/04/20 11:36:14 guy Exp $
+ * $Id: packet-ipv6.c,v 1.98 2003/04/29 17:24:35 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -32,7 +32,6 @@
#include <stdio.h>
#include <glib.h>
#include <epan/packet.h>
-#include "packet-ip.h"
#include "packet-ipsec.h"
#include "packet-ipv6.h"
#include <epan/resolv.h>
@@ -97,6 +96,8 @@ static const fragment_items ipv6_frag_items = {
static dissector_handle_t data_handle;
+static dissector_table_t ip_dissector_table;
+
/* Reassemble fragmented datagrams */
static gboolean ipv6_reassemble = FALSE;
@@ -864,4 +865,6 @@ proto_reg_handoff_ipv6(void)
dissector_add("fr.ietf", NLPID_IP6, ipv6_handle);
dissector_add("x.25.spi", NLPID_IP6, ipv6_handle);
dissector_add("arcnet.protocol_id", ARCNET_PROTO_IPv6, ipv6_handle);
+
+ ip_dissector_table = find_dissector_table("ip.proto");
}