aboutsummaryrefslogtreecommitdiffstats
path: root/epan/tvbuff.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-03-23 18:06:29 +0000
committerGuy Harris <guy@alum.mit.edu>2004-03-23 18:06:29 +0000
commit834543d7c779bdcd0a49536e91c0021c17264477 (patch)
treed7565f7f24de6a30f596a9161fd39b9374e4d195 /epan/tvbuff.h
parent80f45c411f320c2f3e19e14d51a7ca77fc78c0f2 (diff)
Use "tvb_format_text()" to display strings, so we handle non-printable
characters. Some strings appear to be null-padded; add a "tvb_format_stringzpad()" routine to handle them, so that we don't show the padding characters as "\000". svn path=/trunk/; revision=10461
Diffstat (limited to 'epan/tvbuff.h')
-rw-r--r--epan/tvbuff.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/epan/tvbuff.h b/epan/tvbuff.h
index c1a77481ce..bf9715dc32 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.40 2004/02/19 05:19:10 guy Exp $
+ * $Id: tvbuff.h,v 1.41 2004/03/23 18:06:29 guy Exp $
*
* Copyright (c) 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
*
@@ -383,6 +383,12 @@ extern char *tvb_fake_unicode(tvbuff_t *tvb, int offset, int len,
extern gchar * tvb_format_text(tvbuff_t *tvb, gint offset, gint size);
/*
+ * Like "tvb_format_text()", but for null-padded strings; don't show
+ * the null padding characters as "\000".
+ */
+extern gchar *tvb_format_stringzpad(tvbuff_t *tvb, gint offset, gint size);
+
+/*
* Given a tvbuff, an offset, and a length, allocate a buffer big enough
* to hold a non-null-terminated string of that length at that offset,
* plus a trailing '\0', copy the string into it, and return a pointer