to_str: scope tvb_ip6_to_str

pespin/rlcmac
Evan Huus 2021-10-07 13:31:23 -04:00
parent 086feb2f09
commit 0eda51a646
53 changed files with 151 additions and 151 deletions

View File

@ -401,7 +401,7 @@ wrong answer on the PC on which you're doing development, and try
answer on big-endian machines.
gchar *tvb_ip_to_str(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset)
gchar *tvb_ip6_to_str(tvbuff_t *tvb, const gint offset)
gchar *tvb_ip6_to_str(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset)
Returns a null-terminated buffer containing a string with IPv4 or IPv6 Address
from the specified tvbuff, starting at the specified offset.

View File

@ -299,7 +299,7 @@ KrbFastArmorTypes PROT_PREFIX UPPER_CASE
break;
case KERBEROS_ADDR_TYPE_IPV6:
it=proto_tree_add_item(tree, hf_krb_address_ipv6, tvb, offset, INET6_ADDRLEN, ENC_NA);
address_str = tvb_ip6_to_str(tvb, offset);
address_str = tvb_ip6_to_str(actx->pinfo->pool, tvb, offset);
break;
default:
proto_tree_add_expert(tree, actx->pinfo, &ei_kerberos_address, tvb, offset, len);

View File

@ -5039,13 +5039,13 @@ dissect_afp_server_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
}
break;
case 6: /* IP6 */
sub_tree = proto_tree_add_subtree_format(adr_tree, tvb, offset, len, ett_afp_server_addr_line, NULL, "IPv6: %s", tvb_ip6_to_str(tvb, offset+2));
sub_tree = proto_tree_add_subtree_format(adr_tree, tvb, offset, len, ett_afp_server_addr_line, NULL, "IPv6: %s", tvb_ip6_to_str(pinfo->pool, tvb, offset+2));
break;
case 7: /* IP6 + 2bytes port */
port = tvb_get_ntohs(tvb, offset+ 2+INET6_ADDRLEN);
sub_tree = proto_tree_add_subtree_format(adr_tree, tvb, offset, len,
ett_afp_server_addr_line, NULL,
"IPv6: %s:%d", tvb_ip6_to_str(tvb, offset+2), port);
"IPv6: %s:%d", tvb_ip6_to_str(pinfo->pool, tvb, offset+2), port);
break;
default:
sub_tree = proto_tree_add_subtree_format(adr_tree, tvb, offset, len, ett_afp_server_addr_line, NULL, "Unknown type: %u", type);

View File

@ -212,7 +212,7 @@ dissect_aodv_rreq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *aodv_tree,
offset += 4;
if (is_ipv6) {
dest_addr_v6 = tvb_ip6_to_str(tvb, offset);
dest_addr_v6 = tvb_ip6_to_str(pinfo->pool, tvb, offset);
if (aodv_tree) {
proto_tree_add_item(aodv_tree, hf_aodv_dest_ipv6, tvb, offset,
INET6_ADDRLEN, ENC_NA);
@ -237,7 +237,7 @@ dissect_aodv_rreq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *aodv_tree,
offset += 4;
if (is_ipv6) {
orig_addr_v6 = tvb_ip6_to_str(tvb, offset);
orig_addr_v6 = tvb_ip6_to_str(pinfo->pool, tvb, offset);
if (aodv_tree) {
proto_tree_add_item(aodv_tree, hf_aodv_orig_ipv6, tvb, offset,
INET6_ADDRLEN, ENC_NA);
@ -310,7 +310,7 @@ dissect_aodv_rrep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *aodv_tree,
offset += 1;
if (is_ipv6) {
dest_addr_v6 = tvb_ip6_to_str(tvb, offset);
dest_addr_v6 = tvb_ip6_to_str(pinfo->pool, tvb, offset);
if (aodv_tree) {
proto_tree_add_item(aodv_tree, hf_aodv_dest_ipv6, tvb, offset,
INET6_ADDRLEN, ENC_NA);
@ -337,7 +337,7 @@ dissect_aodv_rrep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *aodv_tree,
offset += 4;
if (is_ipv6) {
orig_addr_v6 = tvb_ip6_to_str(tvb, offset);
orig_addr_v6 = tvb_ip6_to_str(pinfo->pool, tvb, offset);
if (aodv_tree) {
proto_tree_add_item(aodv_tree, hf_aodv_orig_ipv6, tvb, offset,
INET6_ADDRLEN, ENC_NA);
@ -471,7 +471,7 @@ dissect_aodv_draft_01_v6_rreq(tvbuff_t *tvb, packet_info *pinfo,
orig_seqno);
offset += 4;
dest_addr_v6 = tvb_ip6_to_str(tvb, offset);
dest_addr_v6 = tvb_ip6_to_str(pinfo->pool, tvb, offset);
if (aodv_tree) {
proto_tree_add_item(aodv_tree, hf_aodv_dest_ipv6, tvb, offset,
INET6_ADDRLEN, ENC_NA);
@ -481,7 +481,7 @@ dissect_aodv_draft_01_v6_rreq(tvbuff_t *tvb, packet_info *pinfo,
col_append_fstr(pinfo->cinfo, COL_INFO, ", D: %s", dest_addr_v6);
offset += INET6_ADDRLEN;
orig_addr_v6 = tvb_ip6_to_str(tvb, offset);
orig_addr_v6 = tvb_ip6_to_str(pinfo->pool, tvb, offset);
if (aodv_tree) {
proto_tree_add_item(aodv_tree, hf_aodv_orig_ipv6, tvb, offset,
INET6_ADDRLEN, ENC_NA);
@ -541,7 +541,7 @@ dissect_aodv_draft_01_v6_rrep(tvbuff_t *tvb, packet_info *pinfo,
dest_seqno);
offset += 4;
dest_addr_v6 = tvb_ip6_to_str(tvb, offset);
dest_addr_v6 = tvb_ip6_to_str(pinfo->pool, tvb, offset);
if (aodv_tree) {
proto_tree_add_item(aodv_tree, hf_aodv_dest_ipv6, tvb, offset,
INET6_ADDRLEN, ENC_NA);
@ -551,7 +551,7 @@ dissect_aodv_draft_01_v6_rrep(tvbuff_t *tvb, packet_info *pinfo,
col_append_fstr(pinfo->cinfo, COL_INFO, ", D: %s", dest_addr_v6);
offset += INET6_ADDRLEN;
orig_addr_v6 = tvb_ip6_to_str(tvb, offset);
orig_addr_v6 = tvb_ip6_to_str(pinfo->pool, tvb, offset);
if (aodv_tree) {
proto_tree_add_item(aodv_tree, hf_aodv_orig_ipv6, tvb, offset,
INET6_ADDRLEN, ENC_NA);

View File

@ -208,7 +208,7 @@ static void
dissect_ipv6_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
{
proto_tree_add_item(parameter_tree, hf_parameter_ipv6_address, parameter_tvb, IPV6_ADDRESS_OFFSET, IPV6_ADDRESS_LENGTH, ENC_NA);
proto_item_append_text(parameter_item, " (%s)", tvb_ip6_to_str(parameter_tvb, IPV6_ADDRESS_OFFSET));
proto_item_append_text(parameter_item, " (%s)", tvb_ip6_to_str(wmem_packet_scope(), parameter_tvb, IPV6_ADDRESS_OFFSET));
}
static void

View File

@ -144,7 +144,7 @@ dissect_ath(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
info_srcaddr = tvb_ip_to_str(pinfo->pool, tvb, offset);
} else if (hlen == 6) {
proto_tree_add_item(ath_tree, hf_ath_ipv6, tvb, offset, 6, ENC_NA);
info_srcaddr = tvb_ip6_to_str(tvb, offset);
info_srcaddr = tvb_ip6_to_str(pinfo->pool, tvb, offset);
} else {
expert_add_info(pinfo, hlen_item, &ei_ath_hlen_invalid);
}
@ -244,7 +244,7 @@ dissect_ath(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
info_srcaddr = tvb_ip_to_str(pinfo->pool, tvb, offset);
} else if (hlen == 6) {
proto_tree_add_item(ath_tree, hf_ath_ipv6, tvb, offset, 6, ENC_NA);
info_srcaddr = tvb_ip6_to_str(tvb, offset);
info_srcaddr = tvb_ip6_to_str(pinfo->pool, tvb, offset);
} else {
expert_add_info(pinfo, hlen_item, &ei_ath_hlen_invalid);
}

View File

@ -4179,12 +4179,12 @@ decode_mp_next_hop_ipv6(tvbuff_t *tvb, proto_tree *tree, gint offset, packet_inf
switch (nhlen) {
case (FT_IPv6_LEN):
proto_tree_add_item(tree, hf_bgp_update_path_attribute_mp_reach_nlri_next_hop_ipv6, tvb, offset, FT_IPv6_LEN, ENC_NA);
wmem_strbuf_append(strbuf, tvb_ip6_to_str(tvb, offset));
wmem_strbuf_append(strbuf, tvb_ip6_to_str(pinfo->pool, tvb, offset));
break;
case (2*FT_IPv6_LEN):
/* global address followed by link-local */
proto_tree_add_item(tree, hf_bgp_update_path_attribute_mp_reach_nlri_next_hop_ipv6, tvb, offset, FT_IPv6_LEN, ENC_NA);
wmem_strbuf_append_printf(strbuf, "IPv6=%s", tvb_ip6_to_str(tvb, offset));
wmem_strbuf_append_printf(strbuf, "IPv6=%s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset += FT_IPv6_LEN;
ti = proto_tree_add_item(tree, hf_bgp_update_path_attribute_mp_reach_nlri_next_hop_ipv6_link_local, tvb, offset, FT_IPv6_LEN, ENC_NA);
tvb_get_ipv6(tvb, offset, &ipv6_addr);
@ -4225,7 +4225,7 @@ decode_mp_next_hop_vpn_ipv6(tvbuff_t *tvb, proto_tree *tree, gint offset, packet
wmem_strbuf_append_printf(strbuf, " RD=%s", rd_string);
offset += BGP_ROUTE_DISTINGUISHER_SIZE;
proto_tree_add_item(tree, hf_bgp_update_path_attribute_mp_reach_nlri_next_hop_ipv6, tvb, offset, FT_IPv6_LEN, ENC_NA);
wmem_strbuf_append_printf(strbuf, " IPv6=%s", tvb_ip6_to_str(tvb, offset));
wmem_strbuf_append_printf(strbuf, " IPv6=%s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
break;
case (2*(BGP_ROUTE_DISTINGUISHER_SIZE + FT_IPv6_LEN)):
rd_string = decode_bgp_rd(pinfo->pool, tvb, offset);
@ -4236,7 +4236,7 @@ decode_mp_next_hop_vpn_ipv6(tvbuff_t *tvb, proto_tree *tree, gint offset, packet
wmem_strbuf_append_printf(strbuf, " RD=%s", rd_string);
offset += BGP_ROUTE_DISTINGUISHER_SIZE;
proto_tree_add_item(tree, hf_bgp_update_path_attribute_mp_reach_nlri_next_hop_ipv6, tvb, offset, FT_IPv6_LEN, ENC_NA);
wmem_strbuf_append_printf(strbuf, " IPv6=%s", tvb_ip6_to_str(tvb, offset));
wmem_strbuf_append_printf(strbuf, " IPv6=%s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset += FT_IPv6_LEN;
rd_string = decode_bgp_rd(pinfo->pool, tvb, offset);
ti = proto_tree_add_string(tree, hf_bgp_update_path_attribute_mp_reach_nlri_next_hop_rd, tvb, offset, BGP_ROUTE_DISTINGUISHER_SIZE, rd_string);

View File

@ -288,7 +288,7 @@ dissect_bt_dht_values(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
value_tree = proto_item_add_subtree( value_ti, ett_bt_dht_peers);
proto_tree_add_item( value_tree, hf_ip6, tvb, offset, 16, ENC_NA);
proto_item_append_text(value_ti, " (IPv6/Port: [%s]", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(value_ti, " (IPv6/Port: [%s]", tvb_ip6_to_str(pinfo->pool, tvb, offset));
proto_tree_add_item( value_tree, hf_port, tvb, offset+16, 2, ENC_BIG_ENDIAN);
proto_item_append_text(value_ti, ":%u)", tvb_get_ntohs( tvb, offset+16 ));
}
@ -354,7 +354,7 @@ dissect_bt_dht_nodes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
if ( is_ipv6 )
{
proto_tree_add_item( node_tree, hf_ip6, tvb, offset+20, 16, ENC_NA);
proto_item_append_text(node_ti, ", IPv6/Port: [%s]", tvb_ip6_to_str(tvb, offset+20));
proto_item_append_text(node_ti, ", IPv6/Port: [%s]", tvb_ip6_to_str(pinfo->pool, tvb, offset+20));
proto_tree_add_item( node_tree, hf_port, tvb, offset+36, 2, ENC_BIG_ENDIAN);
proto_item_append_text(node_ti, ":%u)", tvb_get_ntohs( tvb, offset+36 ));

View File

@ -1138,7 +1138,7 @@ dissect_address_tlv(tvbuff_t *tvb, packet_info* pinfo, int offset, int length, p
case ETHERTYPE_IPv6:
if (address_length == 16) {
/* The address is an IPv6 address. */
proto_item_set_text(ti, "IPv6 address: %s", tvb_ip6_to_str(tvb, offset));
proto_item_set_text(ti, "IPv6 address: %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
hf_addr = hf_cdp_nrgyz_ip6_address;
proto_tree_add_item(address_tree, hf_cdp_nrgyz_ip6_address, tvb, offset, address_length, ENC_NA);
}

View File

@ -1913,7 +1913,7 @@ guint c_dissect_sockaddr(proto_tree *root, c_sockaddr *out,
break;
case C_IPv6:
d.port = tvb_get_ntohs (tvb, off+2);
d.addr_str = tvb_ip6_to_str(tvb, off+8);
d.addr_str = tvb_ip6_to_str(wmem_packet_scope(), tvb, off+8);
proto_tree_add_item(tree, hf_port, tvb, off+2, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_addr_ipv6, tvb, off+8, 16, ENC_NA);

View File

@ -1358,7 +1358,7 @@ static void dissect_cops_object_data(tvbuff_t *tvb, packet_info *pinfo, guint32
ifindex = tvb_get_ntohl(tvb, offset + (int)sizeof ipv6addr);
itf_tree = proto_tree_add_subtree_format(tree, tvb, offset, 20, ett_cops_itf, NULL,
"Contents: IPv6 address %s, ifIndex: %u",
tvb_ip6_to_str(tvb, offset), ifindex);
tvb_ip6_to_str(pinfo->pool, tvb, offset), ifindex);
proto_tree_add_item(itf_tree,
(c_num == COPS_OBJ_IN_INT) ? hf_cops_in_int_ipv6 : hf_cops_out_int_ipv6,
tvb, offset, 16, ENC_NA);
@ -1493,7 +1493,7 @@ static void dissect_cops_object_data(tvbuff_t *tvb, packet_info *pinfo, guint32
tcp_port = tvb_get_ntohs(tvb, offset + (int)sizeof ipv6addr + 2);
pdp_tree = proto_tree_add_subtree_format(tree, tvb, offset, 20, ett_cops_pdp, NULL,
"Contents: IPv6 address %s, TCP Port Number: %u",
tvb_ip6_to_str(tvb, offset), tcp_port);
tvb_ip6_to_str(pinfo->pool, tvb, offset), tcp_port);
proto_tree_add_item(pdp_tree,
(c_num == COPS_OBJ_PDPREDIRADDR) ? hf_cops_pdprediraddr_ipv6 : hf_cops_lastpdpaddr_ipv6,
tvb, offset, 16, ENC_NA);

View File

@ -381,7 +381,7 @@ PIDL_dissect_ipv6address(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
}
proto_tree_add_item(tree, hfindex, tvb, offset, 16, ENC_BIG_ENDIAN);
if (param & PIDL_SET_COL_INFO) {
const char *ip = tvb_ip6_to_str(tvb, offset);
const char *ip = tvb_ip6_to_str(pinfo->pool, tvb, offset);
header_field_info *hf_info = proto_registrar_get_nth(hfindex);
proto_item_append_text(proto_tree_get_parent(tree), " %s:%s", hf_info->name, ip);
col_append_fstr(pinfo->cinfo, COL_INFO," %s:%s", hf_info->name, ip);

View File

@ -2180,7 +2180,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree,
}
proto_tree_add_item(subtree, hf_iaaddr_ip, tvb, off, 16, ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, "IAA: %s ", tvb_ip6_to_str(tvb, off));
col_append_fstr(pinfo->cinfo, COL_INFO, "IAA: %s ", tvb_ip6_to_str(pinfo->pool, tvb, off));
preferred_lifetime = tvb_get_ntohl(tvb, off + 16);
valid_lifetime = tvb_get_ntohl(tvb, off + 20);
@ -2927,7 +2927,7 @@ dissect_dhcpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
expert_add_info_format(pinfo, previous_pi, &ei_dhcpv6_error_hopcount, "hopcount is not correctly incremented by 1 (expected : %d, actual : %d)", hpi.hopcount + 1, previous_hopcount);
}
hpi.relay_message_previously_detected = TRUE;
col_append_fstr(pinfo->cinfo, COL_INFO, "L: %s ", tvb_ip6_to_str(tvb, off + 2));
col_append_fstr(pinfo->cinfo, COL_INFO, "L: %s ", tvb_ip6_to_str(pinfo->pool, tvb, off + 2));
off += 34;
} else {
/* Check the inner hopcount equals 0 */

View File

@ -449,7 +449,7 @@ decode_dataitem_v6conn(tvbuff_t *tvb, int offset, proto_item *pi, proto_tree *pt
offset+=DLEP_DIT_V6CONN_FLAGS_LEN;
proto_tree_add_item(pt, hf_dlep_dataitem_v6conn_addr, tvb, offset, FT_IPv6_LEN, ENC_NA);
proto_item_append_text(pi, ", Addr: %s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(pi, ", Addr: %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset+=FT_IPv6_LEN;
if (len == DLEP_DIT_V6CONN_WPORT_LEN) {
@ -593,7 +593,7 @@ decode_dataitem_v6addr(tvbuff_t *tvb, int offset, proto_item *pi, proto_tree *pt
offset+=DLEP_DIT_V6ADDR_FLAGS_LEN;
proto_tree_add_item(pt, hf_dlep_dataitem_v6addr_addr, tvb, offset, FT_IPv6_LEN, ENC_NA);
proto_item_append_text(pi, " %s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(pi, " %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset+=FT_IPv6_LEN;
if (len != DLEP_DIT_V6ADDR_LEN)
@ -651,7 +651,7 @@ decode_dataitem_v6subnet(tvbuff_t *tvb, int offset, proto_item *pi, proto_tree *
offset+=DLEP_DIT_V6SUBNET_FLAGS_LEN;
proto_tree_add_item(pt, hf_dlep_dataitem_v6subnet_subnet, tvb, offset, FT_IPv6_LEN, ENC_NA);
proto_item_append_text(pi, " %s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(pi, " %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset+=FT_IPv6_LEN;
proto_tree_add_item_ret_uint(pt, hf_dlep_dataitem_v6subnet_prefixlen, tvb, offset, 1, ENC_BIG_ENDIAN, &prefixlen);

View File

@ -2624,7 +2624,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
{
const char *addr6;
addr6 = tvb_ip6_to_str(tvb, cur_offset);
addr6 = tvb_ip6_to_str(pinfo->pool, tvb, cur_offset);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s", addr6);
proto_item_append_text(trr, ", addr %s", addr6);
@ -3576,7 +3576,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
case DNS_SVCB_KEY_IPV6HINT:
for (svc_param_offset = 0; svc_param_offset < svc_param_length; svc_param_offset += 16) {
proto_tree_add_item(svcb_param_tree, hf_dns_svcb_param_ipv6hint_ip, tvb, cur_offset, 16, ENC_NA);
proto_item_append_text(svcb_param_ti, "%c%s", (svc_param_offset == 0 ? '=' : ','), tvb_ip6_to_str(tvb, cur_offset));
proto_item_append_text(svcb_param_ti, "%c%s", (svc_param_offset == 0 ? '=' : ','), tvb_ip6_to_str(pinfo->pool, tvb, cur_offset));
cur_offset += 16;
}
break;

View File

@ -214,7 +214,7 @@ static void
dissect_ipv6_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
{
proto_tree_add_item(parameter_tree, hf_parameter_ipv6_address, parameter_tvb, IPV6_ADDRESS_OFFSET, IPV6_ADDRESS_LENGTH, ENC_NA);
proto_item_append_text(parameter_item, " (%s)", tvb_ip6_to_str(parameter_tvb, IPV6_ADDRESS_OFFSET));
proto_item_append_text(parameter_item, " (%s)", tvb_ip6_to_str(wmem_packet_scope(), parameter_tvb, IPV6_ADDRESS_OFFSET));
}
static void

View File

@ -4901,7 +4901,7 @@ decode_gtp_user_addr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_
break;
case 0x57:
proto_tree_add_item(ext_tree_user, hf_gtp_user_ipv6, tvb, offset + 5, 16, ENC_NA);
proto_item_append_text(te, " : %s", tvb_ip6_to_str(tvb, offset + 5));
proto_item_append_text(te, " : %s", tvb_ip6_to_str(pinfo->pool, tvb, offset + 5));
break;
case 0x8d:
if (length == 6) {
@ -4913,12 +4913,12 @@ decode_gtp_user_addr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_
} else if (length == 18) {
proto_tree_add_ipv4_format_value(ext_tree_user, hf_gtp_user_ipv6, tvb, offset + 5, 0, 0, "dynamic");
proto_tree_add_item(ext_tree_user, hf_gtp_user_ipv6, tvb, offset + 5, 16, ENC_NA);
proto_item_append_text(te, " : dynamic / %s", tvb_ip6_to_str(tvb, offset + 5));
proto_item_append_text(te, " : dynamic / %s", tvb_ip6_to_str(pinfo->pool, tvb, offset + 5));
} else if (length == 22) {
proto_tree_add_item(ext_tree_user, hf_gtp_user_ipv4, tvb, offset + 5, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(ext_tree_user, hf_gtp_user_ipv6, tvb, offset + 9, 16, ENC_NA);
proto_item_append_text(te, " : %s / %s", tvb_ip_to_str(pinfo->pool, tvb, offset + 5),
tvb_ip6_to_str(tvb, offset + 9));
tvb_ip6_to_str(pinfo->pool, tvb, offset + 9));
} else {
proto_tree_add_expert_format(ext_tree_user, pinfo, &ei_gtp_ext_length_mal, tvb, offset + 3, length, "Wrong length indicated. Expected 6, 18 or 22, got %u", length);
}
@ -6046,7 +6046,7 @@ decode_gtp_gsn_addr_common(tvbuff_t * tvb, int offset, packet_info * pinfo _U_,
proto_tree_add_item(ext_tree_gsn_addr, hf_ipv6, tvb, offset + 3, 16, ENC_NA);
if (hf_ipv6 != hf_gtp_gsn_ipv6)
proto_item_set_hidden(proto_tree_add_item(ext_tree_gsn_addr, hf_gtp_gsn_ipv6, tvb, offset + 3, 16, ENC_NA));
proto_item_append_text(te, "%s", tvb_ip6_to_str(tvb, offset + 3));
proto_item_append_text(te, "%s", tvb_ip6_to_str(pinfo->pool, tvb, offset + 3));
set_address_tvb(gsn_address, AT_IPv4, 4, tvb, offset + 3);
break;
case 17:
@ -6055,7 +6055,7 @@ decode_gtp_gsn_addr_common(tvbuff_t * tvb, int offset, packet_info * pinfo _U_,
proto_tree_add_uint(ext_tree_gsn_addr, hf_gtp_gsn_addr_type, tvb, offset + 3, 1, addr_type);
addr_len = tvb_get_guint8(tvb, offset + 3) & 0x3F;
proto_tree_add_uint(ext_tree_gsn_addr, hf_gtp_gsn_addr_len, tvb, offset + 3, 1, addr_len);
proto_item_append_text(te, "%s", tvb_ip6_to_str(tvb, offset + 4));
proto_item_append_text(te, "%s", tvb_ip6_to_str(pinfo->pool, tvb, offset + 4));
proto_tree_add_item(ext_tree_gsn_addr, hf_ipv6, tvb, offset + 4, 16, ENC_NA);
if (hf_ipv6 != hf_gtp_gsn_ipv6)
proto_item_set_hidden(proto_tree_add_item(ext_tree_gsn_addr, hf_gtp_gsn_ipv6, tvb, offset + 4, 16, ENC_NA));
@ -6451,7 +6451,7 @@ decode_gtp_chrg_addr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_
break;
case 16:
proto_tree_add_item(ext_tree_chrg_addr, hf_gtp_chrg_ipv6, tvb, offset + 3, 16, ENC_NA);
proto_item_append_text(te, "%s", tvb_ip6_to_str(tvb, offset + 3));
proto_item_append_text(te, "%s", tvb_ip6_to_str(pinfo->pool, tvb, offset + 3));
break;
default:
proto_item_append_text(te, "unknown type or wrong length");
@ -8949,7 +8949,7 @@ decode_gtp_node_addr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_
break;
case 16:
proto_tree_add_item(ext_tree_node_addr, hf_gtp_node_ipv6, tvb, offset + 3, 16, ENC_NA);
proto_item_append_text(te, "%s", tvb_ip6_to_str(tvb, offset + 3));
proto_item_append_text(te, "%s", tvb_ip6_to_str(pinfo->pool, tvb, offset + 3));
break;
default:
proto_item_append_text(te, "unknown type or wrong length");

View File

@ -2281,7 +2281,7 @@ dissect_gtpv2_ip_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
else if (length == 16)
{
proto_tree_add_item(tree, hf_gtpv2_ip_address_ipv6, tvb, offset, length, ENC_NA);
proto_item_append_text(item, "IPv6 %s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(item, "IPv6 %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
}
}
/*
@ -2613,7 +2613,7 @@ dissect_gtpv2_paa(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
proto_tree_add_item(tree, hf_gtpv2_pdn_ipv6_len, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_item(tree, hf_gtpv2_pdn_ipv6, tvb, offset, 16, ENC_NA);
proto_item_append_text(item, "IPv6 %s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(item, "IPv6 %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
break;
case 3:
/* IPv4/IPv6 */
@ -2633,7 +2633,7 @@ dissect_gtpv2_paa(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
proto_tree_add_item(tree, hf_gtpv2_pdn_ipv6_len, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_item(tree, hf_gtpv2_pdn_ipv6, tvb, offset, 16, ENC_NA);
proto_item_append_text(item, "IPv6 %s, ", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(item, "IPv6 %s, ", tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset += 16;
proto_tree_add_item(tree, hf_gtpv2_pdn_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_item_append_text(item, "IPv4 %s", tvb_ip_to_str(pinfo->pool, tvb, offset));
@ -3356,7 +3356,7 @@ dissect_gtpv2_f_teid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_
{
ipv6 = wmem_new0(pinfo->pool, address);
proto_tree_add_item(tree, hf_gtpv2_f_teid_ipv6, tvb, offset, 16, ENC_NA);
proto_item_append_text(item, ", IPv6 %s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(item, ", IPv6 %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
set_address_tvb(ipv6, AT_IPv6, 16, tvb, offset);
}
@ -6238,7 +6238,7 @@ dissect_gtpv2_mbms_ip_mc_dist(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
} else if ((tvb_get_guint8(tvb, offset) & 0x3f) == 16) {
offset += 1;
proto_tree_add_item(tree, hf_gtpv2_mbms_ip_mc_dist_addrv6, tvb, offset, 16, ENC_NA);
proto_item_append_text(item, " IPv6 Dist %s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(item, " IPv6 Dist %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset += 16;
}
@ -6253,7 +6253,7 @@ dissect_gtpv2_mbms_ip_mc_dist(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
} else if ((tvb_get_guint8(tvb, offset) & 0x3f) == 16) {
offset += 1;
proto_tree_add_item(tree, hf_gtpv2_mbms_ip_mc_src_addrv6, tvb, offset, 16, ENC_NA);
proto_item_append_text(item, " IPv6 Src %s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(item, " IPv6 Src %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset += 16;
}

View File

@ -1785,7 +1785,7 @@ dissect_icmpv6_nd_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
/* Prefix */
proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_prefix, tvb, opt_offset, 16, ENC_NA);
proto_item_append_text(ti, " : %s/%d", tvb_ip6_to_str(tvb, opt_offset), prefix_len);
proto_item_append_text(ti, " : %s/%d", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset), prefix_len);
opt_offset += 16;
break;
@ -1853,7 +1853,7 @@ dissect_icmpv6_nd_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
while(opt_offset < (offset + opt_len) ) {
proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_ipv6_address, tvb, opt_offset, 16, ENC_NA);
proto_item_append_text(ti, " %s", tvb_ip6_to_str(tvb, opt_offset));
proto_item_append_text(ti, " %s", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset));
opt_offset += 16;
}
break;
@ -2057,7 +2057,7 @@ dissect_icmpv6_nd_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
/* IPv6 Address */
proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_ipa_ipv6_address, tvb, opt_offset, 16, ENC_NA);
proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(tvb, opt_offset), prefix_len);
proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset), prefix_len);
opt_offset += 16;
break;
@ -2081,7 +2081,7 @@ dissect_icmpv6_nd_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
/* Prefix */
proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_nrpi_prefix, tvb, opt_offset, 16, ENC_NA);
proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(tvb, opt_offset), prefix_len);
proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset), prefix_len);
opt_offset += 16;
break;
@ -2193,7 +2193,7 @@ dissect_icmpv6_nd_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
break;
case 24:
proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_prefix, tvb, opt_offset, 16, ENC_NA);
proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(tvb, opt_offset), prefix_len);
proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset), prefix_len);
opt_offset += 16;
break;
default:
@ -2216,7 +2216,7 @@ dissect_icmpv6_nd_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
while(opt_offset < (offset + opt_len) ) {
proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_rdnss, tvb, opt_offset, 16, ENC_NA);
proto_item_append_text(ti, " %s", tvb_ip6_to_str(tvb, opt_offset));
proto_item_append_text(ti, " %s", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset));
opt_offset += 16;
}
@ -2474,7 +2474,7 @@ dissect_icmpv6_nd_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
case 24:
tvb_memcpy(tvb, (guint8 *)&context_prefix.bytes, opt_offset, 16);
proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_6co_context_prefix, tvb, opt_offset, 16, ENC_NA);
proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(tvb, opt_offset), context_len);
proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset), context_len);
opt_offset += 16;
break;
default:
@ -2507,7 +2507,7 @@ dissect_icmpv6_nd_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
/* 6LBR Address */
proto_tree_add_item(icmp6opt_tree, hf_icmpv6_opt_abro_6lbr_address, tvb, opt_offset, 16, ENC_NA);
proto_item_append_text(ti, " : Version %d.%d, Valid Lifetime : %d, 6LBR : %s", version_high, version_low, valid_lifetime, tvb_ip6_to_str(tvb, opt_offset));
proto_item_append_text(ti, " : Version %d.%d, Valid Lifetime : %d, 6LBR : %s", version_high, version_low, valid_lifetime, tvb_ip6_to_str(pinfo->pool, tvb, opt_offset));
opt_offset += 16;
}
@ -2869,7 +2869,7 @@ dissect_icmpv6_rpl_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
break;
case 22:
proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_route_prefix, tvb, opt_offset, 16, ENC_NA);
proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(tvb, opt_offset), prefix_len);
proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset), prefix_len);
opt_offset += 16;
break;
default:
@ -2958,7 +2958,7 @@ dissect_icmpv6_rpl_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
break;
case 18:
proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_target_prefix, tvb, opt_offset, 16, ENC_NA);
proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(tvb, opt_offset), prefix_len);
proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset), prefix_len);
opt_offset += 16;
break;
default:
@ -2995,7 +2995,7 @@ dissect_icmpv6_rpl_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
if(opt_len > 4)
{
proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_transit_parent, tvb, opt_offset, 16, ENC_NA);
proto_item_append_text(ti, " %s", tvb_ip6_to_str(tvb, opt_offset));
proto_item_append_text(ti, " %s", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset));
opt_offset += 16;
}
@ -3063,7 +3063,7 @@ dissect_icmpv6_rpl_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
/* Prefix */
proto_tree_add_item(icmp6opt_tree, hf_icmpv6_rpl_opt_prefix, tvb, opt_offset, 16, ENC_NA);
proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(tvb, opt_offset), prefix_len);
proto_item_append_text(ti, " %s/%d", tvb_ip6_to_str(pinfo->pool, tvb, opt_offset), prefix_len);
opt_offset += 16;
break;
@ -3724,7 +3724,7 @@ dissect_rrenum(tvbuff_t *tvb, int rr_offset, packet_info *pinfo _U_, proto_tree
proto_tree_add_item(mp_tree, hf_icmpv6_rr_pco_mp_matchprefix, tvb, rr_offset, 16, ENC_NA);
/* Add Info (Prefix, Length...) to Match Prefix Part label */
proto_item_append_text(ti_mp, ": %s %s/%u (%u-%u)", val_to_str(opcode, rr_pco_mp_opcode_val, "Unknown %d"), tvb_ip6_to_str(tvb, rr_offset), matchlen, minlen, maxlen);
proto_item_append_text(ti_mp, ": %s %s/%u (%u-%u)", val_to_str(opcode, rr_pco_mp_opcode_val, "Unknown %d"), tvb_ip6_to_str(pinfo->pool, tvb, rr_offset), matchlen, minlen, maxlen);
rr_offset += 16;
while ((int)tvb_reported_length(tvb) > rr_offset) {
@ -3786,7 +3786,7 @@ dissect_rrenum(tvbuff_t *tvb, int rr_offset, packet_info *pinfo _U_, proto_tree
proto_tree_add_item(up_tree, hf_icmpv6_rr_pco_up_useprefix, tvb, rr_offset, 16, ENC_NA);
/* Add Info (Prefix, Length...) to Use Prefix Part label */
proto_item_append_text(ti_up, ": %s/%u (keep %u)", tvb_ip6_to_str(tvb, rr_offset), uselen, keeplen);
proto_item_append_text(ti_up, ": %s/%u (keep %u)", tvb_ip6_to_str(pinfo->pool, tvb, rr_offset), uselen, keeplen);
rr_offset += 16;
}
@ -3830,7 +3830,7 @@ dissect_rrenum(tvbuff_t *tvb, int rr_offset, packet_info *pinfo _U_, proto_tree
proto_tree_add_item(rm_tree, hf_icmpv6_rr_rm_matchedprefix, tvb, rr_offset, 16, ENC_NA);
/* Add Info (Prefix, Length...) to Use Resultant Message label */
proto_item_append_text(ti_rm, ": %s/%u (interface %u)", tvb_ip6_to_str(tvb, rr_offset), matchlen, interfaceindex);
proto_item_append_text(ti_rm, ": %s/%u (interface %u)", tvb_ip6_to_str(pinfo->pool, tvb, rr_offset), matchlen, interfaceindex);
rr_offset +=16;
}
}
@ -3878,7 +3878,7 @@ dissect_mldrv2( tvbuff_t *tvb, guint32 offset, packet_info *pinfo _U_, proto_tre
/* Multicast Address */
proto_tree_add_item(mar_tree, hf_icmpv6_mldr_mar_multicast_address, tvb, mldr_offset, 16, ENC_NA);
proto_item_append_text(ti_mar, " %s: %s", val_to_str(record_type, mldr_record_type_val,"Unknown Record Type (%d)"), tvb_ip6_to_str(tvb, mldr_offset));
proto_item_append_text(ti_mar, " %s: %s", val_to_str(record_type, mldr_record_type_val,"Unknown Record Type (%d)"), tvb_ip6_to_str(pinfo->pool, tvb, mldr_offset));
mldr_offset += 16;
/* Source Address */
@ -3960,7 +3960,7 @@ dissect_mpl_control(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *t
seed_id = tvb_eui64_to_str(pinfo->pool, tvb, body_offset);
break;
case 3:
seed_id = tvb_ip6_to_str(tvb, body_offset);
seed_id = tvb_ip6_to_str(pinfo->pool, tvb, body_offset);
break;
default:
/* not reached */
@ -4370,7 +4370,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
/* Target Address */
proto_tree_add_item(icmp6_tree, hf_icmpv6_nd_ns_target_address, tvb, offset, 16, ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, " for %s", tvb_ip6_to_str(tvb, offset));
col_append_fstr(pinfo->cinfo, COL_INFO, " for %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset += 16;
@ -4415,7 +4415,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
wmem_strbuf_append(flags_strbuf, "none");
}
col_append_fstr(pinfo->cinfo, COL_INFO, " %s (%s)", tvb_ip6_to_str(tvb, offset), wmem_strbuf_get_str(flags_strbuf));
col_append_fstr(pinfo->cinfo, COL_INFO, " %s (%s)", tvb_ip6_to_str(pinfo->pool, tvb, offset), wmem_strbuf_get_str(flags_strbuf));
offset += 16;
/* Show options */

View File

@ -4278,17 +4278,17 @@ dissect_id_type(tvbuff_t *tvb, int offset, int length, guint8 id_type, proto_tre
break;
case IKE_ID_IPV6_ADDR:
proto_tree_add_item(idtree, hf_isakmp_id_data_ipv6_addr, tvb, offset, 16, ENC_NA);
proto_item_append_text(idit, "%s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(idit, "%s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
break;
case IKE_ID_IPV6_ADDR_SUBNET:
proto_tree_add_item(idtree, hf_isakmp_id_data_ipv6_addr, tvb, offset, 16, ENC_NA);
proto_tree_add_item(idtree, hf_isakmp_id_data_ipv6_subnet, tvb, offset+16, 16, ENC_NA);
proto_item_append_text(idit, "%s/%s", tvb_ip6_to_str(tvb, offset), tvb_ip6_to_str(tvb, offset+16));
proto_item_append_text(idit, "%s/%s", tvb_ip6_to_str(pinfo->pool, tvb, offset), tvb_ip6_to_str(pinfo->pool, tvb, offset+16));
break;
case IKE_ID_IPV6_ADDR_RANGE:
proto_tree_add_item(idtree, hf_isakmp_id_data_ipv6_range_start, tvb, offset, 16, ENC_NA);
proto_tree_add_item(idtree, hf_isakmp_id_data_ipv6_range_end, tvb, offset+16, 16, ENC_NA);
proto_item_append_text(idit, "%s/%s", tvb_ip6_to_str(tvb, offset), tvb_ip6_to_str(tvb, offset+16));
proto_item_append_text(idit, "%s/%s", tvb_ip6_to_str(pinfo->pool, tvb, offset), tvb_ip6_to_str(pinfo->pool, tvb, offset+16));
break;
case IKE_ID_KEY_ID:
proto_tree_add_item(idtree, hf_isakmp_id_data_key_id, tvb, offset, length, ENC_NA);

View File

@ -5357,7 +5357,7 @@ dissect_kerberos_T_address(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
break;
case KERBEROS_ADDR_TYPE_IPV6:
it=proto_tree_add_item(tree, hf_krb_address_ipv6, tvb, offset, INET6_ADDRLEN, ENC_NA);
address_str = tvb_ip6_to_str(tvb, offset);
address_str = tvb_ip6_to_str(actx->pinfo->pool, tvb, offset);
break;
default:
proto_tree_add_expert(tree, actx->pinfo, &ei_kerberos_address, tvb, offset, len);

View File

@ -419,8 +419,8 @@ dissect_lisp_tcp_membership_message(tvbuff_t *tvb, packet_info *pinfo, proto_tre
break;
case AFNUM_INET6:
proto_tree_add_item(message_tree, hf_lisp_tcp_message_rloc_ipv6, tvb, offset, INET6_ADDRLEN, ENC_NA);
proto_item_append_text(tim, ", RLOC: %s", tvb_ip6_to_str(tvb, offset));
col_append_fstr(pinfo->cinfo, COL_INFO, " [%u] %s", iid, tvb_ip6_to_str(tvb, offset));
proto_item_append_text(tim, ", RLOC: %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
col_append_fstr(pinfo->cinfo, COL_INFO, " [%u] %s", iid, tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset += INET6_ADDRLEN;
data_len -= INET6_ADDRLEN;
break;

View File

@ -533,7 +533,7 @@ get_addr_str(tvbuff_t *tvb, gint offset, guint16 afi, guint16 *addr_len)
return addr_str;
case AFNUM_INET6:
*addr_len = INET6_ADDRLEN;
addr_str = tvb_ip6_to_str(tvb, offset);
addr_str = tvb_ip6_to_str(wmem_packet_scope(), tvb, offset);
return addr_str;
case AFNUM_LCAF:
get_lcaf_data(tvb, offset, &lcaf_type, addr_len);
@ -788,7 +788,7 @@ dissect_lcaf_afi_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
break;
case AFNUM_INET6:
proto_tree_add_item(lisp_afi_list_tree, hf_lisp_lcaf_afi_list_ipv6, tvb, offset, INET6_ADDRLEN, ENC_NA);
proto_item_append_text(tir, " %d. IPv6 Address: %s", i, tvb_ip6_to_str(tvb, offset));
proto_item_append_text(tir, " %d. IPv6 Address: %s", i, tvb_ip6_to_str(pinfo->pool, tvb, offset));
proto_item_set_len(tir, 2 + INET6_ADDRLEN);
offset += INET6_ADDRLEN;
remaining -= INET6_ADDRLEN;
@ -2326,7 +2326,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre
break;
case AFNUM_INET6:
proto_tree_add_item(lisp_itr_tree, hf_lisp_mreq_itr_rloc_ipv6, tvb, offset, 16, ENC_NA);
proto_item_append_text(tir, " %d: %s", i + 1, tvb_ip6_to_str(tvb, offset));
proto_item_append_text(tir, " %d: %s", i + 1, tvb_ip6_to_str(pinfo->pool, tvb, offset));
proto_item_set_len(tir, 2 + INET6_ADDRLEN);
offset += INET6_ADDRLEN;
break;

View File

@ -1485,7 +1485,7 @@ dissect_lldp_chassis_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
break;
case AFNUM_INET6:
if (dataLen == 18){
strPtr = tvb_ip6_to_str(tvb, offset);
strPtr = tvb_ip6_to_str(pinfo->pool, tvb, offset);
}else{
expert_add_info_format(pinfo, lf, &ei_lldp_bad_length,
"Invalid Chassis ID Length (%u) for Type (%s, %s), expected (18)", dataLen, val_to_str_const(tlvsubType, chassis_id_subtypes, ""), val_to_str_const(addr_family, afn_vals, ""));
@ -1658,7 +1658,7 @@ dissect_lldp_port_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint3
break;
case AFNUM_INET6:
if (dataLen == 18){
strPtr = tvb_ip6_to_str(tvb, offset);
strPtr = tvb_ip6_to_str(pinfo->pool, tvb, offset);
}else{
expert_add_info_format(pinfo, lf, &ei_lldp_bad_length,
"Invalid Port ID Length (%u) for Type (%s, %s), expected (18)", dataLen, val_to_str_const(tlvsubType, port_id_subtypes, ""), val_to_str_const(addr_family, afn_vals, ""));

View File

@ -870,7 +870,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
case 4:
l = (type == 3)? LMPF_VAL_LOCAL_LINK_ID_IPV6:
LMPF_VAL_REMOTE_LINK_ID_IPV6;
proto_item_append_text(ti, ": IPv6 %s", tvb_ip6_to_str(tvb, offset2));
proto_item_append_text(ti, ": IPv6 %s", tvb_ip6_to_str(pinfo->pool, tvb, offset2));
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
offset2, 16, ENC_NA);
break;
@ -907,7 +907,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
case 4:
l = (type == 3)? LMPF_VAL_LOCAL_INTERFACE_ID_IPV6:
LMPF_VAL_REMOTE_INTERFACE_ID_IPV6;
proto_item_append_text(ti, ": IPv6 %s", tvb_ip6_to_str(tvb, offset2));
proto_item_append_text(ti, ": IPv6 %s", tvb_ip6_to_str(pinfo->pool, tvb, offset2));
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
offset2, 16, ENC_NA);
break;
@ -1097,8 +1097,8 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
case 2:
proto_item_append_text(ti, ": IPv6: Local %s, Remote %s",
tvb_ip6_to_str(tvb, offset2+4),
tvb_ip6_to_str(tvb, offset2+20));
tvb_ip6_to_str(pinfo->pool, tvb, offset2+4),
tvb_ip6_to_str(pinfo->pool, tvb, offset2+20));
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_TE_LINK_LOCAL_IPV6],
tvb, offset2+4, 16, ENC_NA);
@ -1159,8 +1159,8 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
case 2:
proto_item_append_text(ti, ": IPv6: Local %s, Remote %s",
tvb_ip6_to_str(tvb, offset2+4),
tvb_ip6_to_str(tvb, offset2+8));
tvb_ip6_to_str(pinfo->pool, tvb, offset2+4),
tvb_ip6_to_str(pinfo->pool, tvb, offset2+8));
proto_tree_add_item(lmp_object_tree, hf_lmp_data_link_local_id_ipv6, tvb, offset2+4, 16, ENC_NA);
proto_tree_add_item(lmp_object_tree, hf_lmp_data_link_remote_id_ipv6, tvb, offset2+20, 16, ENC_NA);
l = 36;
@ -1276,8 +1276,8 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
case 2:
if (j < 4)
proto_item_append_text(ti, ": [IPv6-%s", tvb_ip6_to_str(tvb, offset2+l));
proto_item_append_text(ti2, ": IPv6 %s", tvb_ip6_to_str(tvb, offset2+l));
proto_item_append_text(ti, ": [IPv6-%s", tvb_ip6_to_str(pinfo->pool, tvb, offset2+l));
proto_item_append_text(ti2, ": IPv6 %s", tvb_ip6_to_str(pinfo->pool, tvb, offset2+l));
proto_tree_add_item(lmp_subobj_tree, hf_lmp_interface_id_ipv6, tvb, offset2, 16, ENC_NA);
l += 16;
break;

View File

@ -2200,7 +2200,7 @@ dissect_mip6_network_prefix_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree
offset++;
proto_tree_add_item(field_tree, hf_mip6_nemo_mnp_mnp, tvb, offset, MIP6_NEMO_MNP_MNP_LEN, ENC_NA);
proto_item_append_text(ti, ": %s/%u", tvb_ip6_to_str(tvb, offset), prefix_len);
proto_item_append_text(ti, ": %s/%u", tvb_ip6_to_str(pinfo->pool, tvb, offset), prefix_len);
return tvb_captured_length(tvb);
}
@ -2954,7 +2954,7 @@ dissect_pmip6_opt_mhipv6ap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
offset++;
proto_tree_add_item(opt_tree, hf_mip6_opt_mhipv6ap_ipv6_address, tvb, offset, 16, ENC_NA);
ti = proto_tree_add_string(opt_tree, hf_mip6_opt_mhipv6ap_ipv6_address_prefix, tvb, offset -1, 16+1, tvb_ip6_to_str(tvb, offset));
ti = proto_tree_add_string(opt_tree, hf_mip6_opt_mhipv6ap_ipv6_address_prefix, tvb, offset -1, 16+1, tvb_ip6_to_str(pinfo->pool, tvb, offset));
proto_item_append_text(ti, "/%u", prefix_l);
proto_item_set_generated(ti);
@ -3239,7 +3239,7 @@ dissect_pmip6_opt_lmaa(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
if (opt_code == 1) {
/* Ipv6 Addr */
proto_tree_add_item(opt_tree, hf_mip6_lmaa_ipv6, tvb, offset, 16, ENC_NA);
proto_item_append_text(ti, ": %s", tvb_ip6_to_str(tvb,offset));
proto_item_append_text(ti, ": %s", tvb_ip6_to_str(pinfo->pool, tvb,offset));
}else if (opt_code == 2) {
/* IPv4 addr */
proto_tree_add_item(opt_tree, hf_mip6_lmaa_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
@ -3673,7 +3673,7 @@ dissect_mip6_opt_dmnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
proto_tree_add_item(opt_tree, hf_mip6_opt_dmnp_dmnp_ipv6, tvb,
offset, 16, ENC_NA);
proto_item_append_text(ti, ": %s/%u",
tvb_ip6_to_str(tvb, offset), prefix_len);
tvb_ip6_to_str(pinfo->pool, tvb, offset), prefix_len);
break;
default:

View File

@ -294,7 +294,7 @@ dissect_msnlb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
break;
case 0x17: /* IPv6 */
proto_tree_add_item(hb_tree, hf_msnlb_host_ipv6, tvb, offset, 16, ENC_NA);
proto_item_append_text(ti, ": %s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(ti, ": %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset += 16;
break;
default: /* Unknown */

View File

@ -1082,7 +1082,7 @@ dissect_netlink_route_ifa_attrs(tvbuff_t *tvb, void *data _U_, struct packet_net
proto_item_append_text(tree, ": %s", tvb_ip_to_str(wmem_packet_scope(), tvb, offset));
proto_tree_add_item(tree, &hfi_netlink_route_ifa_addr4, tvb, offset, len, ENC_BIG_ENDIAN);
} else {
proto_item_append_text(tree, ": %s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(tree, ": %s", tvb_ip6_to_str(wmem_packet_scope(), tvb, offset));
proto_tree_add_item(tree, &hfi_netlink_route_ifa_addr6, tvb, offset, len, ENC_NA);
}
return 1;

View File

@ -395,7 +395,7 @@ decode_ip_element(nsip_ip_element_info_t *element, build_info_t *bi, proto_tree
bi->offset, element->address_length,
ENC_NA);
proto_item_append_text(tf, ": IP address: %s",
tvb_ip6_to_str(bi->tvb, bi->offset));
tvb_ip6_to_str(wmem_packet_scope(), bi->tvb, bi->offset));
break;
default:
;

View File

@ -220,7 +220,7 @@ static int dissect_olsrorg_lq_tc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
nlq = tvb_get_guint8(tvb, offset + 17);
address_group = proto_tree_add_bytes_format_value(olsr_tree, hf_olsr_neighbor, tvb, offset, 20,
NULL, "%s (%d/%d)", tvb_ip6_to_str(tvb, offset), lq, nlq);
NULL, "%s (%d/%d)", tvb_ip6_to_str(pinfo->pool, tvb, offset), lq, nlq);
address_tree = proto_item_add_subtree(address_group, ett_olsr_message_neigh);
@ -376,7 +376,7 @@ static int handle_olsr_hello_olsrorg(tvbuff_t *tvb, packet_info *pinfo, proto_tr
nlq = tvb_get_guint8(tvb, offset + 17);
address_group = proto_tree_add_bytes_format_value(olsr_tree, hf_olsr_neighbor, tvb, offset, 20,
NULL, "%s (%d/%d)", tvb_ip6_to_str(tvb, offset), lq, nlq);
NULL, "%s (%d/%d)", tvb_ip6_to_str(pinfo->pool, tvb, offset), lq, nlq);
address_tree = proto_item_add_subtree(address_group, ett_olsr_message_neigh);

View File

@ -2783,7 +2783,7 @@ dissect_ospf_lsa_mpls(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree
case OIF_TNA_IPv6_ADDRESS:
stlv_tree = proto_tree_add_subtree_format(tlv_tree, tvb, stlv_offset, stlv_len+4,
ett_ospf_lsa_oif_tna_stlv, NULL, "%s (IPv6): %s", stlv_name,
tvb_ip6_to_str(tvb, stlv_offset + 8));
tvb_ip6_to_str(pinfo->pool, tvb, stlv_offset + 8));
proto_tree_add_uint_format_value(stlv_tree, hf_ospf_tlv_type, tvb, stlv_offset, 2,
stlv_type, "%u: %s (IPv6)", stlv_type, stlv_name);
proto_tree_add_item(stlv_tree, hf_ospf_tlv_length, tvb, stlv_offset+2, 2, ENC_BIG_ENDIAN);

View File

@ -1871,7 +1871,7 @@ dissect_subobj_ipv6(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t *
}
prefix_length = tvb_get_guint8(tvb, offset+18);
proto_item_append_text(ti, ": %s/%u", tvb_ip6_to_str(tvb, offset+2),
proto_item_append_text(ti, ": %s/%u", tvb_ip6_to_str(pinfo->pool, tvb, offset+2),
prefix_length);
switch (obj_class) {
@ -2333,7 +2333,7 @@ dissect_subobj_pksv6(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t
}
path_key = tvb_get_ntohs(tvb, offset+2);
proto_item_append_text(ti, ": %s, Path Key %u", tvb_ip6_to_str(tvb, offset+4), path_key);
proto_item_append_text(ti, ": %s, Path Key %u", tvb_ip6_to_str(pinfo->pool, tvb, offset+4), path_key);
proto_tree_add_item(pcep_subobj_pksv6, hf_pcep_subobj_pksv6_l, tvb, offset, 1, ENC_NA);
proto_tree_add_item(pcep_subobj_pksv6, hf_PCEPF_SUBOBJ_7F, tvb, offset, 1, ENC_NA);

View File

@ -2168,7 +2168,7 @@ dissect_pfcp_f_teid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_i
if ((fteid_flags_val & 0x2) == 2) {
/* p to (p+15) IPv6 address */
proto_tree_add_item(tree, hf_pfcp_f_teid_ipv6, tvb, offset, 16, ENC_NA);
proto_item_append_text(item, ", IPv6 %s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(item, ", IPv6 %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset += 16;
}
/* If the value of CH bit is set to "0", but the value of CHID bit is "1" */
@ -3433,7 +3433,7 @@ dissect_pfcp_f_seid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_i
if ((f_seid_flags & 0x1) == 1) {
ipv6 = wmem_new0(pinfo->pool, address);
proto_tree_add_item(tree, hf_pfcp_f_seid_ipv6, tvb, offset, 16, ENC_NA);
proto_item_append_text(item, ", IPv6 %s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(item, ", IPv6 %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
set_address_tvb(ipv6, AT_IPv6, 16, tvb, offset);
offset += 16;
}
@ -3532,7 +3532,7 @@ decode_pfcp_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_i
case 1:
/* IPv6 address */
proto_tree_add_item(tree, hf_pfcp_node_id_ipv6, tvb, offset, 16, ENC_NA);
proto_item_append_text(item, "%s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(item, "%s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset += 16;
break;
case 2:
@ -4939,7 +4939,7 @@ dissect_pfcp_remote_gtp_u_peer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
/* IPv6 address (if present)*/
if (flags & 0x1) {
proto_tree_add_item(tree, hf_pfcp_remote_gtp_u_peer_ipv6, tvb, offset, 16, ENC_NA);
proto_item_append_text(item, "IPv6 %s ", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(item, "IPv6 %s ", tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset += 16;
}
/* DI (if present)*/
@ -6667,7 +6667,7 @@ dissect_pfcp_alternative_smf_ip_address(tvbuff_t *tvb, packet_info *pinfo, proto
/* IPv6 address (if present) */
if (alternative_smf_ip_address_flags & 0x1) {
proto_tree_add_item(tree, hf_pfcp_alternative_smf_ip_address_ipv6, tvb, offset, 16, ENC_NA);
proto_item_append_text(item, ", IPv6 %s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(item, ", IPv6 %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset += 16;
}
@ -6808,7 +6808,7 @@ dissect_pfcp_cp_pfcp_entity_ip_address(tvbuff_t *tvb, packet_info *pinfo, proto_
/* IPv6 address (if present) */
if ((cp_pfcp_entity_ip_address_flags & 0x1)) {
proto_tree_add_item(tree, hf_pfcp_cp_pfcp_entity_ip_address_ipv6, tvb, offset, 16, ENC_NA);
proto_item_append_text(item, ", IPv6 %s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(item, ", IPv6 %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset += 16;
}
@ -6925,13 +6925,13 @@ dissect_pfcp_source_ip_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
/* IPv6 address (if present) */
if ((source_ip_address_flags & 0x1)) {
proto_tree_add_item(tree, hf_pfcp_source_ip_address_ipv6, tvb, offset, 16, ENC_NA);
proto_item_append_text(item, ", IPv6 %s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(item, ", IPv6 %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset += 16;
}
/* Mask/Prefix Length (if present) */
if ((source_ip_address_flags & 0x4)) {
proto_tree_add_item(tree, hf_pfcp_source_ip_address_mask_prefix_lengt, tvb, offset, 16, ENC_NA);
proto_item_append_text(item, ", IPv6 %s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(item, ", IPv6 %s", tvb_ip6_to_str(pinfo->pool, tvb, offset));
offset += 16;
}
@ -7392,7 +7392,7 @@ dissect_pfcp_mptcp_address_information(tvbuff_t *tvb, packet_info *pinfo, proto_
/* MPTCP Proxy IPv6 address (if present) */
if ((mptcp_address_flags & 0x2)) {
proto_tree_add_item(tree, hf_pfcp_mptcp_proxy_ip_address_ipv6, tvb, offset, 16, ENC_NA);
proto_item_append_text(item, ", IPv6 %s", tvb_ip6_to_str(tvb, offset));
proto_item_append_text(