aboutsummaryrefslogtreecommitdiffstats
path: root/packet-data.c
diff options
context:
space:
mode:
authorEd Warnicke <hagbard@physics.rutgers.edu>2001-11-26 05:41:15 +0000
committerEd Warnicke <hagbard@physics.rutgers.edu>2001-11-26 05:41:15 +0000
commit89babba2232f716fce7e3f0080d0c60525350e82 (patch)
tree3518f3e52998c1626afade0ce58338dda8f43882 /packet-data.c
parent4877553530fc356888edb95332b24eaeaadeee80 (diff)
downloadwireshark-89babba2232f716fce7e3f0080d0c60525350e82.tar.gz
wireshark-89babba2232f716fce7e3f0080d0c60525350e82.tar.bz2
wireshark-89babba2232f716fce7e3f0080d0c60525350e82.zip
This should be the final bit of removing the dissect_data symbol
from being required by anyone other than packet-data.c. It can now be accessed with call_dissector() with the name "data". dissect_data is now also of dissect_t. svn path=/trunk/; revision=4271
Diffstat (limited to 'packet-data.c')
-rw-r--r--packet-data.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/packet-data.c b/packet-data.c
index 376aa9c975..967e96993c 100644
--- a/packet-data.c
+++ b/packet-data.c
@@ -2,7 +2,7 @@
* Routines for raw data (default case)
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: packet-data.c,v 1.24 2001/11/25 21:44:57 hagbard Exp $
+ * $Id: packet-data.c,v 1.25 2001/11/26 05:41:11 hagbard Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -40,27 +40,21 @@
int proto_data = -1;
void
-dissect_data(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
+dissect_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
int bytes;
if (tree) {
- bytes = tvb_length_remaining(tvb, offset);
+ bytes = tvb_length_remaining(tvb, 0);
if (bytes > 0) {
proto_tree_add_protocol_format(tree, proto_data, tvb,
- offset,
+ 0,
bytes, "Data (%d byte%s)", bytes,
plurality(bytes, "", "s"));
}
}
}
-void
-dissect_data_wrapper(tvbuff_t *tvb,packet_info *pinfo, proto_tree *tree)
-{
- dissect_data(tvb,0,pinfo,tree);
-}
-
void
proto_register_data(void)
{
@@ -70,7 +64,7 @@ proto_register_data(void)
"data" /* abbrev */
);
- register_dissector("data",dissect_data_wrapper,proto_data);
+ register_dissector("data",dissect_data,proto_data);
/*
* "Data" is used to dissect something whose normal dissector