aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ppp.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2021-07-16 11:36:34 -0400
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-07-21 05:38:29 +0000
commitd6d7dd1e5664810b368231d03d56465112e3d82e (patch)
tree4f95a8b408e58b8edc0b4a2c17831b58049beaf3 /epan/dissectors/packet-ppp.c
parentef542759d0c7003a495436f2194d5821bfc30bd4 (diff)
First pass pinfo->pool conversion
Automated find/replace of wmem_packet_scope() with pinfo->pool in all files where it didn't cause a build failure. I also tweaked a few of the docs which got caught up.
Diffstat (limited to 'epan/dissectors/packet-ppp.c')
-rw-r--r--epan/dissectors/packet-ppp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c
index ff8bb88aa4..c3d10f5584 100644
--- a/epan/dissectors/packet-ppp.c
+++ b/epan/dissectors/packet-ppp.c
@@ -1256,12 +1256,12 @@ ppp_dissect_options(tvbuff_t *tvb, int offset, guint length, dissector_table_t c
if (option_dissectors != NULL) {
option_dissector = dissector_get_uint_handle(option_dissectors, opt);
if (option_dissector == NULL) {
- name = wmem_strdup_printf(wmem_packet_scope(), "Unknown (0x%02x)", opt);
+ name = wmem_strdup_printf(pinfo->pool, "Unknown (0x%02x)", opt);
} else {
name = dissector_handle_get_short_name(option_dissector);
}
} else {
- name = wmem_strdup_printf(wmem_packet_scope(), "Unknown (0x%02x)", opt);
+ name = wmem_strdup_printf(pinfo->pool, "Unknown (0x%02x)", opt);
}
/* Option has a length. Is it in the packet? */
@@ -4403,27 +4403,27 @@ dissect_vsncp_pdnaddress_opt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
case 2:
{
- ws_in6_addr *ad = wmem_new0(wmem_packet_scope(),ws_in6_addr);
+ ws_in6_addr *ad = wmem_new0(pinfo->pool,ws_in6_addr);
address addr;
tvb_memcpy(tvb, &ad->bytes[8], offset + 3, 8);
set_address(&addr, AT_IPv6, 16, ad->bytes);
proto_tree_add_ipv6_format(field_tree, hf_vsncp_pdn_ipv6, tvb, offset + 3, length - 3, ad,
"%s: %s", val_to_str_const(pdnaddtype, vsncp_pdntype_vals, "Unknown"),
- address_to_str(wmem_packet_scope(), &addr));
+ address_to_str(pinfo->pool, &addr));
break;
}
case 3:
{
- ws_in6_addr *ad = wmem_new0(wmem_packet_scope(), ws_in6_addr);
+ ws_in6_addr *ad = wmem_new0(pinfo->pool, ws_in6_addr);
address addr;
tvb_memcpy(tvb, &ad->bytes[8], offset + 3, 8);
set_address(&addr, AT_IPv6, 16, ad->bytes);
proto_tree_add_ipv6_format(field_tree, hf_vsncp_pdn_ipv6, tvb, offset + 3, length - 3, ad,
"%s: %s", val_to_str_const(pdnaddtype, vsncp_pdntype_vals, "Unknown"),
- address_to_str(wmem_packet_scope(), &addr));
+ address_to_str(pinfo->pool, &addr));
proto_tree_add_ipv4_format(field_tree, hf_vsncp_pdn_ipv4, tvb, offset + 11, length - 11,
tvb_get_ntohl(tvb, offset + 11), "%s: %s", val_to_str_const(pdnaddtype, vsncp_pdntype_vals, "Unknown"),
tvb_ip_to_str(tvb, offset + 11));
@@ -4475,7 +4475,7 @@ dissect_vsncp_apname_opt(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
while (i < (length - 2)) {
lengthofapn = tvb_get_guint8(tvb, off++);
proto_tree_add_string_format(field_tree, hf_vsncp_access_point_name, tvb, off, lengthofapn,
- tvb_get_string_enc(wmem_packet_scope(), tvb, off, lengthofapn, ENC_ASCII),
+ tvb_get_string_enc(pinfo->pool, tvb, off, lengthofapn, ENC_ASCII),
"Label%d (%d byte%s): %s", j++, lengthofapn,
plurality(lengthofapn, "", "s"),
tvb_format_text(tvb, off, lengthofapn));
@@ -4659,7 +4659,7 @@ dissect_cp(tvbuff_t *tvb, int proto_id, int proto_subtree_index,
proto_tree_add_bytes_format(fh_tree, hf_ppp_data, tvb, offset,
length, NULL, "Rejected Packet (%d byte%s): %s", length,
plurality(length, "", "s"),
- tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, length));
+ tvb_bytes_to_str(pinfo->pool, tvb, offset, length));
}
break;
@@ -6292,7 +6292,7 @@ dissect_chap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
tvb_format_text(tvb, name_offset,
(name_size > 20) ? 20 : name_size),
(name_size > 20) ? "..." : "",
- tvb_bytes_to_str(wmem_packet_scope(), tvb, value_offset, value_size));
+ tvb_bytes_to_str(pinfo->pool, tvb, value_offset, value_size));
}
}
break;