summaryrefslogtreecommitdiff
path: root/epan/to_str.h
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-06-01 22:22:46 +0100
committerMichael Mann <mmann78@netscape.net>2016-06-06 22:00:41 +0000
commitf1ff3208a055f462e69c9ac7479271aecf784d79 (patch)
tree51809fa94142090dd57fbd7d006c60d1016da4b2 /epan/to_str.h
parent528edba87ae6a6ffd951bdd137421910ea88d964 (diff)
downloadwireshark-f1ff3208a055f462e69c9ac7479271aecf784d79.tar.gz
Move ip6_to_str_buf() to to_str.c and make it take the buffer length.
Also make it use ws_inet_ntop6() (rather than implementing the string conversion ourselves). Remove ip6_to_str_buf_len(). Change-Id: I1eff3a8941e00987c2ff0c4dcfda13476af86191 Reviewed-on: https://code.wireshark.org/review/15692 Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/to_str.h')
-rw-r--r--epan/to_str.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/to_str.h b/epan/to_str.h
index 36849e0b84..2377dde425 100644
--- a/epan/to_str.h
+++ b/epan/to_str.h
@@ -26,6 +26,7 @@
#include <glib.h>
#include "wsutil/nstime.h"
+#include <wsutil/inet_addr.h>
#include "time_fmt.h"
#include <epan/packet_info.h>
#include <epan/ipv6.h>
@@ -34,7 +35,7 @@
#define GUID_STR_LEN 37
#define MAX_IP_STR_LEN 16
-#define MAX_IP6_STR_LEN 40
+#define MAX_IP6_STR_LEN WS_INET6_ADDRSTRLEN
#define MAX_ADDR_STR_LEN 256
#define VINES_ADDR_LEN 6
#define EUI64_STR_LEN 24
@@ -91,8 +92,8 @@ WS_DLL_PUBLIC void address_to_str_buf(const address *addr, gchar *buf, int b
#define tvb_eui64_to_str(tvb, offset) tvb_address_to_str(wmem_packet_scope(), tvb, AT_EUI64, offset)
void ip_to_str_buf(const guint8 *ad, gchar *buf, const int buf_len);
+void ip6_to_str_buf(const struct e_in6_addr *, gchar *, int buf_len);
-void ip6_to_str_buf(const struct e_in6_addr *, gchar *);
extern gchar* ipxnet_to_str_punct(wmem_allocator_t *scope, const guint32 ad, const char punct);
WS_DLL_PUBLIC gchar* eui64_to_str(wmem_allocator_t *scope, const guint64 ad);