#include <epan/dissectors/packet-mtp3.h>
#include <stdio.h>
#include "emem.h"
+#include "wmem/wmem.h"
/*
* If a user _does_ pass in a too-small buffer, this is probably
address types */
/* convert an address struct into a printable string */
+gchar*
+address_to_str(wmem_allocator_t *scope, const address *addr)
+{
+ gchar *str;
+
+ str=(gchar *)wmem_alloc(scope, MAX_ADDR_STR_LEN);
+ address_to_str_buf(addr, str, MAX_ADDR_STR_LEN);
+ return str;
+}
+
gchar*
ep_address_to_str(const address *addr)
{
#include "time_fmt.h"
#include <epan/packet_info.h>
#include "ws_symbol_export.h"
+#include "wmem/wmem.h"
#define GUID_STR_LEN 37
#define MAX_IP_STR_LEN 16
struct e_in6_addr;
-WS_DLL_PUBLIC gchar* ep_address_to_str(const address *);
+WS_DLL_PUBLIC gchar* address_to_str(wmem_allocator_t *scope, const address *addr);
+WS_DLL_PUBLIC gchar* ep_address_to_str(const address *);
extern gchar* se_address_to_str(const address *);
WS_DLL_PUBLIC void address_to_str_buf(const address *addr, gchar *buf, int buf_len);
WS_DLL_PUBLIC const gchar* ether_to_str(const guint8 *);
### Deprecated emem functions (use wmem instead!)
# These will become errors once they've been removed from all the
- # existing dissectors
+ # existing code
'emem' => { 'count_errors' => 0, 'functions' => [
'ep_alloc',
'ep_new',
'ep_stack_push',
'ep_stack_pop',
'ep_stack_peek',
+ 'ep_address_to_str',
'se_alloc',
'se_new',
'se_alloc0',
'se_strdup_vprintf',
'se_strdup_printf',
'se_alloc_array',
+ 'se_address_to_str',
'se_tree_create',
'se_tree_insert32',
'se_tree_lookup32',