Introduce se_address_to_str()
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 7 Jul 2009 09:42:09 +0000 (09:42 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 7 Jul 2009 09:42:09 +0000 (09:42 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28973 f5534014-38df-0310-8fa8-9805f1628bb7

epan/to_str.c
epan/to_str.h

index 22075e33d62aece830d4fc0bfdaf3a583d5c37b5..a39621507c734dbf669f219877c4ee7ebe55ea84 100644 (file)
@@ -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)
 {
index f2727ad7712a9f2afc7a5d2768164afb6421985f..9b054c801d24cc9f224fe4faf9cdd3715410ecde 100644 (file)
@@ -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 *);