aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/packet.c4
-rw-r--r--epan/packet_info.h3
-rw-r--r--epan/proto.c11
-rw-r--r--epan/proto.h5
-rw-r--r--epan/tvbuff.h7
-rw-r--r--packet-clnp.c3
-rw-r--r--packet-gtp.c3
-rw-r--r--packet-ip.c3
-rw-r--r--packet-ipv6.c3
-rw-r--r--packet-tcp.c3
-rw-r--r--packet-wcp.c3
11 files changed, 13 insertions, 35 deletions
diff --git a/epan/packet.c b/epan/packet.c
index 2dcf91a339..e3190a2fa4 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -1,7 +1,7 @@
/* packet.c
* Routines for packet disassembly
*
- * $Id: packet.c,v 1.37 2001/10/31 05:59:19 guy Exp $
+ * $Id: packet.c,v 1.38 2001/11/15 10:58:50 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -189,8 +189,6 @@ dissect_packet(tvbuff_t **p_tvb, union wtap_pseudo_header *pseudo_header,
*p_tvb = tvb_new_real_data(pd, fd->cap_len, fd->pkt_len, "Frame");
/* Add this tvbuffer into the data_src list */
fd->data_src = g_slist_append( fd->data_src, *p_tvb);
-
- pi.compat_top_tvb = *p_tvb;
}
CATCH(BoundsError) {
g_assert_not_reached();
diff --git a/epan/packet_info.h b/epan/packet_info.h
index 6b603117ee..a9f49dccae 100644
--- a/epan/packet_info.h
+++ b/epan/packet_info.h
@@ -1,7 +1,7 @@
/* packet_info.h
* Definitions for packet info structures and routines
*
- * $Id: packet_info.h,v 1.8 2001/11/03 00:58:52 guy Exp $
+ * $Id: packet_info.h,v 1.9 2001/11/15 10:58:51 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -90,7 +90,6 @@ typedef enum {
typedef struct _packet_info {
const char *current_proto; /* name of protocol currently being dissected */
frame_data *fd;
- tvbuff_t *compat_top_tvb; /* only needed while converting Ethereal to use tvbuffs */
union wtap_pseudo_header *pseudo_header;
int len;
int captured_len;
diff --git a/epan/proto.c b/epan/proto.c
index 2955e54ee7..3406253cf4 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -1,7 +1,7 @@
/* proto.c
* Routines for protocol tree
*
- * $Id: proto.c,v 1.41 2001/11/03 11:42:50 guy Exp $
+ * $Id: proto.c,v 1.42 2001/11/15 10:58:51 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1013,8 +1013,6 @@ proto_tree_set_uint64(field_info *fi, const guint8 *value_ptr, gboolean little_e
static void
proto_tree_set_uint64_tvb(field_info *fi, tvbuff_t *tvb, gint start, gboolean little_endian)
{
- /* XXX remove all this when last non-tvbuff dissector is removed*/
- NullTVB;
proto_tree_set_uint64(fi, tvb_get_ptr(tvb, start, 8), little_endian);
}
@@ -1520,12 +1518,7 @@ alloc_field_info(int hfindex, tvbuff_t *tvb, gint start, gint length)
fi->value = fvalue_new(fi->hfinfo->type);
/* add the data source name */
- /* This has the hack to return a default name for NullTVB. This */
- /* hack can be removed when all dissectors use tvbuffs */
- if ( tvb)
- fi->ds_name = tvb_get_name(tvb);
- else
- fi->ds_name = tvb_get_name(pi.compat_top_tvb);
+ fi->ds_name = tvb_get_name(tvb);
return fi;
}
diff --git a/epan/proto.h b/epan/proto.h
index 5153e0695e..9721ba1cc0 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -1,7 +1,7 @@
/* proto.h
* Definitions for protocol display
*
- * $Id: proto.h,v 1.19 2001/10/31 07:47:26 guy Exp $
+ * $Id: proto.h,v 1.20 2001/11/15 10:58:51 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -118,9 +118,6 @@ typedef struct field_info {
} field_info;
-/* For use while converting dissectors to use tvbuff's */
-#define NullTVB NULL
-
/* Sets up memory used by proto routines. Called at program startup */
extern void proto_init(const char *plugin_dir,
void (register_all_protocols)(void), void (register_all_handoffs)(void));
diff --git a/epan/tvbuff.h b/epan/tvbuff.h
index 59a8eb099e..4c9f95284a 100644
--- a/epan/tvbuff.h
+++ b/epan/tvbuff.h
@@ -9,7 +9,7 @@
* the data of a backing tvbuff, or can be a composite of
* other tvbuffs.
*
- * $Id: tvbuff.h,v 1.18 2001/11/13 23:55:37 gram Exp $
+ * $Id: tvbuff.h,v 1.19 2001/11/15 10:58:51 guy Exp $
*
* Copyright (c) 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
*
@@ -384,10 +384,7 @@ extern gchar *tvb_get_name(tvbuff_t *tvb);
/* Sets pd and offset so that tvbuff's can be used with code
* that only understands pd/offset and not tvbuffs.
* This is the "compatibility" function */
+/* XXX - we need to get rid of the last uses of this */
void tvb_compat(tvbuff_t*, const guint8 **pd, int *offset);
-#define tvb_create_from_top(offset) \
- tvb_new_subset(pi.compat_top_tvb, (offset), \
- pi.captured_len - (offset), pi.len - (offset))
-
#endif /* __TVBUFF_H__ */
diff --git a/packet-clnp.c b/packet-clnp.c
index 28857acf99..25c7a8ced6 100644
--- a/packet-clnp.c
+++ b/packet-clnp.c
@@ -1,7 +1,7 @@
/* packet-clnp.c
* Routines for ISO/OSI network and transport protocol packet disassembly
*
- * $Id: packet-clnp.c,v 1.36 2001/11/09 02:04:35 guy Exp $
+ * $Id: packet-clnp.c,v 1.37 2001/11/15 10:58:48 guy Exp $
* Laurent Deniel <deniel@worldnet.fr>
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
@@ -1936,7 +1936,6 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Save the current value of "pi", and adjust certain fields to
reflect the new tvbuff. */
save_pi = pi;
- pi.compat_top_tvb = next_tvb;
pi.len = tvb_reported_length(next_tvb);
pi.captured_len = tvb_length(next_tvb);
must_restore_pi = TRUE;
diff --git a/packet-gtp.c b/packet-gtp.c
index 3fffd2a9e9..e1c4f9d59d 100644
--- a/packet-gtp.c
+++ b/packet-gtp.c
@@ -4,7 +4,7 @@
* Copyright 2001, Michal Melerowicz <michal.melerowicz@nokia.com>
* Nicolas Balkota <balkota@mac.com>
*
- * $Id: packet-gtp.c,v 1.13 2001/10/30 21:31:15 guy Exp $
+ * $Id: packet-gtp.c,v 1.14 2001/11/15 10:58:48 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -3688,7 +3688,6 @@ decode_gtp_proto_conf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
certain fields to reflect the new top-level
tvbuff. */
save_pi = pi;
- pi.compat_top_tvb = next_tvb;
pi.len = tvb_reported_length(next_tvb);
pi.captured_len = tvb_length(next_tvb);
diff --git a/packet-ip.c b/packet-ip.c
index ee4e530a44..1c7c48db15 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.143 2001/10/31 22:03:53 guy Exp $
+ * $Id: packet-ip.c,v 1.144 2001/11/15 10:58:48 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1074,7 +1074,6 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Save the current value of "pi", and adjust certain fields to
reflect the new tvbuff. */
save_pi = pi;
- pi.compat_top_tvb = next_tvb;
pi.len = tvb_reported_length(next_tvb);
pi.captured_len = tvb_length(next_tvb);
must_restore_pi = TRUE;
diff --git a/packet-ipv6.c b/packet-ipv6.c
index cd2c310d4a..103d3ff646 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.64 2001/10/26 18:28:16 gram Exp $
+ * $Id: packet-ipv6.c,v 1.65 2001/11/15 10:58:48 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -912,7 +912,6 @@ again:
/* Save the current value of "pi", and adjust certain fields to
reflect the new tvbuff. */
save_pi = pi;
- pi.compat_top_tvb = next_tvb;
pi.len = tvb_reported_length(next_tvb);
pi.captured_len = tvb_length(next_tvb);
must_restore_pi = TRUE;
diff --git a/packet-tcp.c b/packet-tcp.c
index 03255ca1a5..6bcfd9b7e4 100644
--- a/packet-tcp.c
+++ b/packet-tcp.c
@@ -1,7 +1,7 @@
/* packet-tcp.c
* Routines for TCP packet disassembly
*
- * $Id: packet-tcp.c,v 1.113 2001/11/03 00:58:50 guy Exp $
+ * $Id: packet-tcp.c,v 1.114 2001/11/15 10:58:48 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -395,7 +395,6 @@ desegment_tcp(tvbuff_t *tvb, packet_info *pinfo, int offset,
/* save current value of *pinfo across call to
dissector */
save_pi = *pinfo;
- pinfo->compat_top_tvb = next_tvb;
pinfo->len = tvb_reported_length(next_tvb);
pinfo->captured_len = tvb_length(next_tvb);
diff --git a/packet-wcp.c b/packet-wcp.c
index 3f8bcd4d6e..f2a5bcef01 100644
--- a/packet-wcp.c
+++ b/packet-wcp.c
@@ -2,7 +2,7 @@
* Routines for Wellfleet Compression frame disassembly
* Copyright 2001, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-wcp.c,v 1.11 2001/09/03 10:33:07 guy Exp $
+ * $Id: packet-wcp.c,v 1.12 2001/11/15 10:58:49 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -399,7 +399,6 @@ void dissect_wcp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
/* Save the current value of "pi", and adjust certain fields to
reflect the new tvbuff. */
save_pi = pi;
- pi.compat_top_tvb = next_tvb;
pi.len = tvb_reported_length(next_tvb);
pi.captured_len = tvb_length(next_tvb);
must_restore_pi = TRUE;