aboutsummaryrefslogtreecommitdiffstats
path: root/packet-data.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-05-11 22:04:18 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-05-11 22:04:18 +0000
commit0c39c03bf544a6968d896818561fd591fdc659e7 (patch)
tree853ffae2bc0ebc521cbbb8167d96ef24911aea71 /packet-data.c
parenta74c39f9b1656fc7781e7b7e98f8604ec3e36524 (diff)
Convert LLC dissector to use tvbuffs.
Non-tvbuff dissectors create a tvbuff when calling dissect_llc() Changed name of current_proto to match string in COL_PROTO ("FDDI" instead of "fddi") Changed short text to be: [Short Frame: %s] where %s is current_proto. svn path=/trunk/; revision=1943
Diffstat (limited to 'packet-data.c')
-rw-r--r--packet-data.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/packet-data.c b/packet-data.c
index 924f263649..0d197ed002 100644
--- a/packet-data.c
+++ b/packet-data.c
@@ -2,7 +2,7 @@
* Routines for raw data (default case)
* Gilbert Ramirez <gram@xiexie.org>
*
- * $Id: packet-data.c,v 1.16 2000/05/11 08:15:05 gram Exp $
+ * $Id: packet-data.c,v 1.17 2000/05/11 22:04:15 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -50,6 +50,20 @@ dissect_data(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
}
}
+/* This will become dissect_data() once all dissectors are converted to use tvbuffs */
+void
+dissect_data_tvb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ int bytes;
+
+ if (tree) {
+ bytes = tvb_length(tvb);
+ proto_tree_add_protocol_format(tree, proto_data, tvb, 0,
+ bytes, "Data (%d byte%s)", bytes,
+ plurality(bytes, "", "s"));
+ }
+}
+
void
proto_register_data(void)
{