diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2016-06-01 22:22:46 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-06-06 22:00:41 +0000 |
commit | f1ff3208a055f462e69c9ac7479271aecf784d79 (patch) | |
tree | 51809fa94142090dd57fbd7d006c60d1016da4b2 /epan/ftypes | |
parent | 528edba87ae6a6ffd951bdd137421910ea88d964 (diff) | |
download | wireshark-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/ftypes')
-rw-r--r-- | epan/ftypes/ftype-ipv6.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/epan/ftypes/ftype-ipv6.c b/epan/ftypes/ftype-ipv6.c index 39b45578fc..432f3f0f41 100644 --- a/epan/ftypes/ftype-ipv6.c +++ b/epan/ftypes/ftype-ipv6.c @@ -25,6 +25,7 @@ #include <ftypes-int.h> #include <epan/ipv6.h> #include <epan/addr_resolv.h> +#include <epan/to_str.h> static void ipv6_fvalue_set(fvalue_t *fv, const guint8 *value) @@ -93,16 +94,13 @@ ipv6_from_unparsed(fvalue_t *fv, const char *s, gboolean allow_partial_value _U_ static int ipv6_repr_len(fvalue_t *fv _U_, ftrepr_t rtype _U_, int field_display _U_) { - /* - * 39 characters for "XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX". - */ - return 39; + return MAX_IP6_STR_LEN; } static void -ipv6_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, int field_display _U_, char *buf, unsigned int size _U_) +ipv6_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, int field_display _U_, char *buf, unsigned int size) { - ip6_to_str_buf(&(fv->value.ipv6.addr), buf); + ip6_to_str_buf(&(fv->value.ipv6.addr), buf, size); } static gpointer |