diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-03-23 18:06:29 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-03-23 18:06:29 +0000 |
commit | 1e6563963dbda685c9a6dc04a9c80918f5d7c69c (patch) | |
tree | d7565f7f24de6a30f596a9161fd39b9374e4d195 /epan/tvbuff.h | |
parent | 6ea0bc82dba40f2bfe399f0c0a3b71df126cf6c2 (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".
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10461 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/tvbuff.h')
-rw-r--r-- | epan/tvbuff.h | 8 |
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 |