From 0d385f730fd973a7e5087f457507dd2b445de58c Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sun, 24 Jul 2005 01:56:01 +0000 Subject: add ep_tvb_get_string that acts the same as tvb_get_string but the buffer returned need not be freed. svn path=/trunk/; revision=15024 --- epan/tvbuff.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'epan/tvbuff.h') diff --git a/epan/tvbuff.h b/epan/tvbuff.h index 2a038926d2..82c76a569d 100644 --- a/epan/tvbuff.h +++ b/epan/tvbuff.h @@ -410,6 +410,11 @@ extern gchar *tvb_format_stringzpad(tvbuff_t *tvb, gint offset, gint size); * Throws an exception if the tvbuff ends before the string does. */ extern guint8 *tvb_get_string(tvbuff_t *tvb, gint offset, gint length); +/* Same as above but the buffer returned from this function does not have to + * be freed. It will be automatically freed after the packet is dissected. + * Buffers allocated by this function are NOT persistent. + */ +extern guint8 *ep_tvb_get_string(tvbuff_t *tvb, gint offset, gint length); /** * Given a tvbuff and an offset, with the offset assumed to refer to -- cgit v1.2.1