diff options
author | Michael Mann <mmann78@netscape.net> | 2015-01-05 19:26:28 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-01-07 04:25:07 +0000 |
commit | 47d670d3d7d17df1e29a55d05413a2fd3d0f8e6a (patch) | |
tree | c417040f8d8172f3cc9646bfae75ae282e15be43 /epan/dissectors/packet-icmpv6.c | |
parent | 0f426d6f0133d3a31dc7d56e9d0a79aa9b55255e (diff) |
Add tvb_address_to_str.
This is intended to handle ALL address types retrieved from a tvbuff.
One of the (good) side effects of this function is that it can replace a lot of the "hidden" ep_alloc calls used to allocate memory for the address string.
A few existing "popular" helper tvb_ functions were turned into pure macros calling tvb_address_to_str. Some of the "less used" helper tvb_ functions were just directly replaced with tvb_address_to_str.
Change-Id: I361d991c4ad90142173e63eae02a94d68af3ec43
Reviewed-on: https://code.wireshark.org/review/6333
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-icmpv6.c')
-rw-r--r-- | epan/dissectors/packet-icmpv6.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-icmpv6.c b/epan/dissectors/packet-icmpv6.c index 7d82f0d8d7..54260766b9 100644 --- a/epan/dissectors/packet-icmpv6.c +++ b/epan/dissectors/packet-icmpv6.c @@ -1372,7 +1372,7 @@ dissect_icmpv6_nd_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree /* Padding: 6 bytes */ proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_padding, tvb, opt_offset + 8, 6, ENC_NA); - link_str = tvb_eui64_to_str(tvb, opt_offset, ENC_BIG_ENDIAN); + link_str = tvb_eui64_to_str(tvb, opt_offset); col_append_fstr(pinfo->cinfo, COL_INFO, " from %s", link_str); proto_item_append_text(ti, " : %s", link_str); }else{ @@ -1406,7 +1406,7 @@ dissect_icmpv6_nd_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree /* Padding: 6 bytes */ proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_padding, tvb, opt_offset + 8, 6, ENC_NA); - link_str = tvb_eui64_to_str(tvb, opt_offset, ENC_BIG_ENDIAN); + link_str = tvb_eui64_to_str(tvb, opt_offset); col_append_fstr(pinfo->cinfo, COL_INFO, " from %s", link_str); proto_item_append_text(ti, " : %s", link_str); }else{ @@ -2126,7 +2126,7 @@ dissect_icmpv6_nd_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree /* EUI-64 */ proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_aro_eui64, tvb, opt_offset, 8, ENC_BIG_ENDIAN); - proto_item_append_text(ti, " : Register %s %s", tvb_eui64_to_str(tvb, opt_offset, FALSE), val_to_str(status, nd_opt_6lowpannd_status_val, "Unknown %d")); + proto_item_append_text(ti, " : Register %s %s", tvb_eui64_to_str(tvb, opt_offset), val_to_str(status, nd_opt_6lowpannd_status_val, "Unknown %d")); opt_offset += 8; } |