From: etxrab Date: Tue, 7 Jul 2009 09:42:09 +0000 (+0000) Subject: Introduce se_address_to_str() X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=80abee7c17a1bccac99c820df0013773a85242cf;p=obnox%2Fwireshark%2Fwip.git Introduce se_address_to_str() git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28973 f5534014-38df-0310-8fa8-9805f1628bb7 --- diff --git a/epan/to_str.c b/epan/to_str.c index 22075e33d6..a39621507c 100644 --- a/epan/to_str.c +++ b/epan/to_str.c @@ -947,6 +947,7 @@ decode_numeric_bitfield(guint32 val, guint32 mask, int width, that "col_set_addr()" need know nothing whatsoever about particular address types */ /* convert an address struct into a printable string */ + gchar* address_to_str(const address *addr) { @@ -957,6 +958,16 @@ address_to_str(const address *addr) return str; } +/* The called routines use ep_alloc:ed memory */ +gchar* +se_address_to_str(const address *addr) +{ + gchar *str; + + str = address_to_str(addr); + return se_strdup(str); +} + void address_to_str_buf(const address *addr, gchar *buf, int buf_len) { diff --git a/epan/to_str.h b/epan/to_str.h index f2727ad771..9b054c801d 100644 --- a/epan/to_str.h +++ b/epan/to_str.h @@ -54,6 +54,7 @@ typedef enum { struct e_in6_addr; extern gchar* address_to_str(const address *); +extern gchar* se_address_to_str(const address *); extern void address_to_str_buf(const address *addr, gchar *buf, int buf_len); extern gchar* bytestring_to_str(const guint8 *, guint32, char); extern gchar* ether_to_str(const guint8 *);