aboutsummaryrefslogtreecommitdiffstats
path: root/epan/packet.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-12-04 06:37:46 +0000
committerGuy Harris <guy@alum.mit.edu>2000-12-04 06:37:46 +0000
commita3fa5541a8d6ba69e1cd2ddf3116caeede8ea9b8 (patch)
treead3872d55456285223445a507a512713230c4c65 /epan/packet.h
parent35bf0b2abc3c00a68752f3982f950184147160e4 (diff)
Add a "col_clear()" routine, to clear a column; it appears (and it
doesn't just seem to be a profiling artifact) that, at least on FreeBSD 3.4, it's significantly more efficient to clear out a column by stuffing a '\0' into the first byte of the column data than to do so by copying a null string (I guess when copying one byte, the fixed overhead of the procedure call and of "strcpy()" is significant). Have the TCP dissector set the Protocol column, and clear the Info column, before doing anything that might cause an exception to be thrown, so that if we *do* get an exception thrown, the frame at least shows up as TCP. Instead of, in the TCP dissector, constructing a string and then stuffing it into the Info column, just append to the Info column, which avoids one string copy. Pass a "frame_data" pointer to dissectors for TCP and IP (and PPP) options, so they can use it to append to the Info column. svn path=/trunk/; revision=2744
Diffstat (limited to 'epan/packet.h')
-rw-r--r--epan/packet.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/packet.h b/epan/packet.h
index 679bfdc65b..745b4a3cdf 100644
--- a/epan/packet.h
+++ b/epan/packet.h
@@ -1,7 +1,7 @@
/* packet.h
* Definitions for packet disassembly structures and routines
*
- * $Id: packet.h,v 1.13 2000/12/03 22:53:09 guy Exp $
+ * $Id: packet.h,v 1.14 2000/12/04 06:37:46 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -291,6 +291,7 @@ const char *decode_numeric_bitfield(guint32 val, guint32 mask, int width,
void col_set_writable(frame_data *fd, gboolean writable);
gint check_col(frame_data *, gint);
+void col_clear(frame_data *, gint);
void col_set_str(frame_data *, gint, gchar *);
#if __GNUC__ == 2
void col_add_fstr(frame_data *, gint, gchar *, ...)