aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
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
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')
-rw-r--r--epan/dissectors/file-elf.c4
-rw-r--r--epan/dissectors/file-file.c2
-rw-r--r--epan/dissectors/file-gif.c2
-rw-r--r--epan/dissectors/file-mp4.c2
-rw-r--r--epan/dissectors/file-pcapng.c52
-rw-r--r--epan/dissectors/file-png.c2
-rw-r--r--epan/dissectors/file-rbm.c22
-rw-r--r--epan/dissectors/file-rfc7468.c2
-rw-r--r--epan/dissectors/packet-3com-njack.c4
-rw-r--r--epan/dissectors/packet-3g-a11.c2
-rw-r--r--epan/dissectors/packet-6lowpan.c18
-rw-r--r--epan/dissectors/packet-9p.c20
-rw-r--r--epan/dissectors/packet-lapsat.c2
-rw-r--r--epan/dissectors/packet-lbmpdm.c8
-rw-r--r--epan/dissectors/packet-ldp.c12
-rw-r--r--epan/dissectors/packet-ldss.c2
-rw-r--r--epan/dissectors/packet-lithionics.c22
-rw-r--r--epan/dissectors/packet-lldp.c56
-rw-r--r--epan/dissectors/packet-lnpdqp.c4
-rw-r--r--epan/dissectors/packet-log3gpp.c16
-rw-r--r--epan/dissectors/packet-logcat-text.c2
-rw-r--r--epan/dissectors/packet-logcat.c2
-rw-r--r--epan/dissectors/packet-lorawan.c2
-rw-r--r--epan/dissectors/packet-lsd.c8
-rw-r--r--epan/dissectors/packet-mac-lte.c16
-rw-r--r--epan/dissectors/packet-manolito.c4
-rw-r--r--epan/dissectors/packet-mc-nmf.c2
-rw-r--r--epan/dissectors/packet-messageanalyzer.c8
-rw-r--r--epan/dissectors/packet-mikey.c4
-rw-r--r--epan/dissectors/packet-miop.c2
-rw-r--r--epan/dissectors/packet-mip6.c20
-rw-r--r--epan/dissectors/packet-mle.c6
-rw-r--r--epan/dissectors/packet-mongo.c6
-rw-r--r--epan/dissectors/packet-mount.c10
-rw-r--r--epan/dissectors/packet-mpeg-dsmcc.c2
-rw-r--r--epan/dissectors/packet-mq-pcf.c20
-rw-r--r--epan/dissectors/packet-mrcpv2.c28
-rw-r--r--epan/dissectors/packet-ms-mms.c18
-rw-r--r--epan/dissectors/packet-msn-messenger.c2
-rw-r--r--epan/dissectors/packet-msrp.c8
-rw-r--r--epan/dissectors/packet-mux27010.c2
-rw-r--r--epan/dissectors/packet-mysql.c4
-rw-r--r--epan/dissectors/packet-nas_5gs.c6
-rw-r--r--epan/dissectors/packet-nas_eps.c2
-rw-r--r--epan/dissectors/packet-nbd.c2
-rw-r--r--epan/dissectors/packet-netanalyzer.c2
-rw-r--r--epan/dissectors/packet-netmon.c102
-rw-r--r--epan/dissectors/packet-netperfmeter.c2
-rw-r--r--epan/dissectors/packet-netrom.c8
-rw-r--r--epan/dissectors/packet-nfapi.c4
-rw-r--r--epan/dissectors/packet-nhrp.c4
-rw-r--r--epan/dissectors/packet-nordic_ble.c2
-rw-r--r--epan/dissectors/packet-ns-mep.c22
-rw-r--r--epan/dissectors/packet-nt-tpcp.c4
-rw-r--r--epan/dissectors/packet-obex.c12
-rw-r--r--epan/dissectors/packet-omron-fins.c2
-rw-r--r--epan/dissectors/packet-openflow_v6.c2
-rw-r--r--epan/dissectors/packet-openwire.c2
-rw-r--r--epan/dissectors/packet-osmo_trx.c4
-rw-r--r--epan/dissectors/packet-p_mul.c6
-rw-r--r--epan/dissectors/packet-packetbb.c2
-rw-r--r--epan/dissectors/packet-packetlogger.c4
-rw-r--r--epan/dissectors/packet-pana.c2
-rw-r--r--epan/dissectors/packet-pcomtcp.c2
-rw-r--r--epan/dissectors/packet-pflog.c4
-rw-r--r--epan/dissectors/packet-pim.c8
-rw-r--r--epan/dissectors/packet-pingpongprotocol.c2
-rw-r--r--epan/dissectors/packet-pktc.c4
-rw-r--r--epan/dissectors/packet-pop.c8
-rw-r--r--epan/dissectors/packet-ppi.c2
-rw-r--r--epan/dissectors/packet-ppp.c18
-rw-r--r--epan/dissectors/packet-pppoe.c2
-rw-r--r--epan/dissectors/packet-protobuf.c14
-rw-r--r--epan/dissectors/packet-proxy.c4
-rw-r--r--epan/dissectors/packet-ptpip.c4
-rw-r--r--epan/dissectors/packet-qnet6.c2
-rw-r--r--epan/dissectors/packet-quake3.c2
-rw-r--r--epan/dissectors/packet-r09.c12
-rw-r--r--epan/dissectors/packet-raknet.c6
-rw-r--r--epan/dissectors/packet-rdp.c6
-rw-r--r--epan/dissectors/packet-reload-framing.c2
-rw-r--r--epan/dissectors/packet-reload.c4
-rw-r--r--epan/dissectors/packet-rlc-lte.c2
-rw-r--r--epan/dissectors/packet-rlogin.c2
-rw-r--r--epan/dissectors/packet-rmt-lct.c2
-rw-r--r--epan/dissectors/packet-rohc.c2
-rw-r--r--epan/dissectors/packet-rpcap.c12
-rw-r--r--epan/dissectors/packet-rsh.c8
-rw-r--r--epan/dissectors/packet-rsync.c2
-rw-r--r--epan/dissectors/packet-rtcp.c16
-rw-r--r--epan/dissectors/packet-rtitcp.c8
-rw-r--r--epan/dissectors/packet-rtp.c4
-rw-r--r--epan/dissectors/packet-rtpproxy.c48
-rw-r--r--epan/dissectors/packet-rtps-processed.c4
-rw-r--r--epan/dissectors/packet-rtps-virtual-transport.c2
-rw-r--r--epan/dissectors/packet-rx.c24
-rw-r--r--epan/dissectors/packet-s7comm.c18
-rw-r--r--epan/dissectors/packet-sametime.c2
-rw-r--r--epan/dissectors/packet-sap.c2
-rw-r--r--epan/dissectors/packet-sbus.c14
-rw-r--r--epan/dissectors/packet-sccp.c8
-rw-r--r--epan/dissectors/packet-scriptingservice.c2
-rw-r--r--epan/dissectors/packet-sflow.c4
-rw-r--r--epan/dissectors/packet-sgsap.c10
-rw-r--r--epan/dissectors/packet-simple.c2
-rw-r--r--epan/dissectors/packet-simulcrypt.c2
-rw-r--r--epan/dissectors/packet-sipfrag.c2
-rw-r--r--epan/dissectors/packet-skinny.c.in4
-rw-r--r--epan/dissectors/packet-slsk.c12
-rw-r--r--epan/dissectors/packet-smb-browse.c12
-rw-r--r--epan/dissectors/packet-smb-pipe.c20
-rw-r--r--epan/dissectors/packet-smtp.c62
-rw-r--r--epan/dissectors/packet-someip-sd.c2
-rw-r--r--epan/dissectors/packet-someip.c2
-rw-r--r--epan/dissectors/packet-soupbintcp.c6
-rw-r--r--epan/dissectors/packet-spnego.c2
-rw-r--r--epan/dissectors/packet-steam-ihs-discovery.c4
-rw-r--r--epan/dissectors/packet-stun.c12
-rw-r--r--epan/dissectors/packet-sysex_digitech.c4
-rw-r--r--epan/dissectors/packet-systemd-journal.c4
-rw-r--r--epan/dissectors/packet-tali.c2
-rw-r--r--epan/dissectors/packet-tcap.c48
-rw-r--r--epan/dissectors/packet-tcpros.c4
-rw-r--r--epan/dissectors/packet-tftp.c2
-rw-r--r--epan/dissectors/packet-thread.c6
-rw-r--r--epan/dissectors/packet-thrift.c2
-rw-r--r--epan/dissectors/packet-tibia.c8
-rw-r--r--epan/dissectors/packet-time.c2
-rw-r--r--epan/dissectors/packet-tivoconnect.c2
-rw-r--r--epan/dissectors/packet-tn3270.c2
-rw-r--r--epan/dissectors/packet-tnef.c4
-rw-r--r--epan/dissectors/packet-tsdns.c6
-rw-r--r--epan/dissectors/packet-turbocell.c4
-rw-r--r--epan/dissectors/packet-ua3g.c4
-rw-r--r--epan/dissectors/packet-ubdp.c6
-rw-r--r--epan/dissectors/packet-ubertooth.c12
-rw-r--r--epan/dissectors/packet-udp.c6
-rw-r--r--epan/dissectors/packet-uds.c18
-rw-r--r--epan/dissectors/packet-udt.c2
-rw-r--r--epan/dissectors/packet-uma.c2
-rw-r--r--epan/dissectors/packet-umts_rlc.c6
-rw-r--r--epan/dissectors/packet-usb-i1d3.c8
-rw-r--r--epan/dissectors/packet-usb.c14
-rw-r--r--epan/dissectors/packet-usbip.c2
-rw-r--r--epan/dissectors/packet-usbll.c4
-rw-r--r--epan/dissectors/packet-user_encap.c4
-rw-r--r--epan/dissectors/packet-uts.c2
-rw-r--r--epan/dissectors/packet-vines.c4
-rw-r--r--epan/dissectors/packet-vlan.c2
-rw-r--r--epan/dissectors/packet-vmlab.c4
-rw-r--r--epan/dissectors/packet-vpp.c2
-rw-r--r--epan/dissectors/packet-vtp.c2
-rw-r--r--epan/dissectors/packet-vuze-dht.c8
-rw-r--r--epan/dissectors/packet-websocket.c6
-rw-r--r--epan/dissectors/packet-wifi-nan.c2
-rw-r--r--epan/dissectors/packet-winsrepl.c2
-rw-r--r--epan/dissectors/packet-wisun.c2
-rw-r--r--epan/dissectors/packet-wol.c8
-rw-r--r--epan/dissectors/packet-wtp.c2
-rw-r--r--epan/dissectors/packet-xcsl.c2
-rw-r--r--epan/dissectors/packet-xmpp-other.c6
-rw-r--r--epan/dissectors/packet-xtp.c2
-rw-r--r--epan/dissectors/packet-zbee-nwk-gp.c10
-rw-r--r--epan/dissectors/packet-zbee-nwk.c12
-rw-r--r--epan/dissectors/packet-zbee-security.c6
-rw-r--r--epan/dissectors/packet-zbee-zdp-binding.c20
-rw-r--r--epan/dissectors/packet-zbee-zdp-discovery.c32
-rw-r--r--epan/dissectors/packet-zbee-zdp-management.c4
-rw-r--r--epan/dissectors/packet-zep.c2
-rw-r--r--epan/dissectors/packet-zvt.c12
-rw-r--r--epan/dissectors/pidl/witness/witness.cnf4
171 files changed, 709 insertions, 709 deletions
diff --git a/epan/dissectors/file-elf.c b/epan/dissectors/file-elf.c
index c83d93bbdb..2f463c2d42 100644
--- a/epan/dissectors/file-elf.c
+++ b/epan/dissectors/file-elf.c
@@ -1322,7 +1322,7 @@ dissect_elf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
file_size = ehsize + (guint32)phnum * (guint32)phentsize + (guint32)shnum * (guint32)shentsize;
/* Collect infos for blackholes */
- segment_info = (segment_info_t *) wmem_alloc(wmem_packet_scope(), sizeof(segment_info_t) * (shnum + phnum + 3));
+ segment_info = (segment_info_t *) wmem_alloc(pinfo->pool, sizeof(segment_info_t) * (shnum + phnum + 3));
segment_info[area_counter].offset = 0;
segment_info[area_counter].size = ehsize;
@@ -1436,7 +1436,7 @@ dissect_elf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
if (segment_size) {
gchar *name;
- name = wmem_strdup_printf(wmem_packet_scope(), "ProgramHeaderEntry #%u", phnum - i_16 - 1);
+ name = wmem_strdup_printf(pinfo->pool, "ProgramHeaderEntry #%u", phnum - i_16 - 1);
proto_tree_add_bytes_format(ph_entry_tree, hf_elf_segment, tvb, value_guard(p_offset), value_guard(segment_size), NULL, "Segment");
diff --git a/epan/dissectors/file-file.c b/epan/dissectors/file-file.c
index ee170c6ed0..c13101a2d8 100644
--- a/epan/dissectors/file-file.c
+++ b/epan/dissectors/file-file.c
@@ -207,7 +207,7 @@ dissect_file_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
ENDTRY;
if(proto_field_is_referenced(tree, hf_file_protocols)) {
- wmem_strbuf_t *val = wmem_strbuf_new(wmem_packet_scope(), "");
+ wmem_strbuf_t *val = wmem_strbuf_new(pinfo->pool, "");
wmem_list_frame_t *frame;
/* skip the first entry, it's always the "frame" protocol */
frame = wmem_list_frame_next(wmem_list_head(pinfo->layers));
diff --git a/epan/dissectors/file-gif.c b/epan/dissectors/file-gif.c
index d0c4724646..370bdfbe23 100644
--- a/epan/dissectors/file-gif.c
+++ b/epan/dissectors/file-gif.c
@@ -338,7 +338,7 @@ dissect_gif(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
/* GIF signature */
proto_tree_add_item_ret_string(gif_tree, &hfi_version,
- tvb, offset, 6, ENC_ASCII|ENC_NA, wmem_packet_scope(), &ver_str);
+ tvb, offset, 6, ENC_ASCII|ENC_NA, pinfo->pool, &ver_str);
proto_item_append_text(ti, ", Version: %s", ver_str);
col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", ver_str);
offset += 6;
diff --git a/epan/dissectors/file-mp4.c b/epan/dissectors/file-mp4.c
index 69a1a9eb3d..44be681632 100644
--- a/epan/dissectors/file-mp4.c
+++ b/epan/dissectors/file-mp4.c
@@ -836,7 +836,7 @@ dissect_mp4_box(guint32 parent_box_type _U_, guint depth,
return -1;
box_type = tvb_get_ntohl(tvb, offset+4);
- box_type_str = tvb_get_string_enc(wmem_packet_scope(), tvb,
+ box_type_str = tvb_get_string_enc(pinfo->pool, tvb,
offset+4, 4, ENC_ASCII|ENC_NA);
box_tree = proto_tree_add_subtree_format(tree, tvb, offset, -1, ett_mp4_box, &type_pi, "%s (%s)",
diff --git a/epan/dissectors/file-pcapng.c b/epan/dissectors/file-pcapng.c
index 4dc1c8449a..06f384db45 100644
--- a/epan/dissectors/file-pcapng.c
+++ b/epan/dissectors/file-pcapng.c
@@ -713,24 +713,24 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
proto_item_set_len(option_item, option_length + 2 * 2);
break;
} else if (option_code == 1) {
- proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_comment, tvb, offset, option_length, ENC_NA | ENC_UTF_8, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_comment, tvb, offset, option_length, ENC_NA | ENC_UTF_8, pinfo->pool, &str);
proto_item_append_text(option_item, " = %s", str);
offset += option_length;
} else switch (block_type) {
case BLOCK_SECTION_HEADER:
switch (option_code) {
case 2:
- proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_section_header_hardware, tvb, offset, option_length, ENC_NA | ENC_UTF_8, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_section_header_hardware, tvb, offset, option_length, ENC_NA | ENC_UTF_8, pinfo->pool, &str);
proto_item_append_text(option_item, " = %s", str);
offset += option_length;
break;
case 3:
- proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_section_header_os, tvb, offset, option_length, ENC_NA | ENC_UTF_8, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_section_header_os, tvb, offset, option_length, ENC_NA | ENC_UTF_8, pinfo->pool, &str);
proto_item_append_text(option_item, " = %s", str);
offset += option_length;
break;
case 4:
- proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_section_header_user_application, tvb, offset, option_length, ENC_NA | ENC_UTF_8, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_section_header_user_application, tvb, offset, option_length, ENC_NA | ENC_UTF_8, pinfo->pool, &str);
proto_item_append_text(option_item, " = %s", str);
offset += option_length;
break;
@@ -744,12 +744,12 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
switch (option_code) {
case 2:
- proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_interface_description_name, tvb, offset, option_length, ENC_NA | ENC_UTF_8, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_interface_description_name, tvb, offset, option_length, ENC_NA | ENC_UTF_8, pinfo->pool, &str);
proto_item_append_text(option_item, " = %s", str);
offset += option_length;
break;
case 3:
- proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_interface_description_description, tvb, offset, option_length, ENC_NA | ENC_UTF_8, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_interface_description_description, tvb, offset, option_length, ENC_NA | ENC_UTF_8, pinfo->pool, &str);
proto_item_append_text(option_item, " = %s", str);
offset += option_length;
break;
@@ -768,8 +768,8 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
offset += 4;
proto_item_append_text(option_item, " = %s/%s",
- address_to_display(wmem_packet_scope(), &addr),
- address_to_display(wmem_packet_scope(), &addr_mask));
+ address_to_display(pinfo->pool, &addr),
+ address_to_display(pinfo->pool, &addr_mask));
break;
case 5:
if (option_length != 17) {
@@ -786,7 +786,7 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
offset += 1;
proto_item_append_text(option_item, " = %s/%u",
- address_to_display(wmem_packet_scope(), &addr), value_u32);
+ address_to_display(pinfo->pool, &addr), value_u32);
break;;
case 6:
@@ -814,7 +814,7 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
offset += 8;
proto_item_append_text(option_item, " = %s",
- address_to_display(wmem_packet_scope(), &addr));
+ address_to_display(pinfo->pool, &addr));
break;
case 8:
@@ -833,7 +833,7 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
} else if (value_u64 == 1000000000) {
const_str = "1 Gbps";
} else {
- const_str = wmem_strdup_printf(wmem_packet_scope(), "%"G_GUINT64_FORMAT, value_u64);
+ const_str = wmem_strdup_printf(pinfo->pool, "%"G_GUINT64_FORMAT, value_u64);
}
proto_item_append_text(p_item, "%s", const_str);
proto_item_append_text(option_item, " = %s", const_str);
@@ -864,7 +864,7 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
}
exponent = value_u8 & 0x7F;
- strbuf = wmem_strbuf_new(wmem_packet_scope(), "");
+ strbuf = wmem_strbuf_new(pinfo->pool, "");
wmem_strbuf_append_printf(strbuf, "%u^-%u", base, exponent);
resolution = 1;
for (i = 0; i < exponent; i += 1)
@@ -970,7 +970,7 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
switch (if_filter_type) {
case 0:
- proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_interface_filter_string, tvb, offset, option_length - 1, ENC_NA | ENC_UTF_8, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_interface_filter_string, tvb, offset, option_length - 1, ENC_NA | ENC_UTF_8, pinfo->pool, &str);
proto_item_append_text(option_item, " = %s", str);
break;
@@ -988,7 +988,7 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
break;
case 12:
- proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_interface_os, tvb, offset, option_length, ENC_NA | ENC_UTF_8, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_interface_os, tvb, offset, option_length, ENC_NA | ENC_UTF_8, pinfo->pool, &str);
proto_item_append_text(option_item, " = %s", str);
offset += option_length;
@@ -1022,7 +1022,7 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
break;
case 15:
- proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_interface_hardware, tvb, offset, option_length, ENC_NA | ENC_UTF_8, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_interface_hardware, tvb, offset, option_length, ENC_NA | ENC_UTF_8, pinfo->pool, &str);
proto_item_append_text(option_item, " = %s", str);
offset += option_length;
@@ -1074,7 +1074,7 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
case BLOCK_NAME_RESOLUTION:
switch (option_code) {
case 2:
- proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_dns_name, tvb, offset, option_length, ENC_NA | ENC_UTF_8, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_data_dns_name, tvb, offset, option_length, ENC_NA | ENC_UTF_8, pinfo->pool, &str);
proto_item_append_text(option_item, " = %s", str);
offset += option_length;
@@ -1091,7 +1091,7 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
offset += 4;
proto_item_append_text(option_item, " = %s",
- address_to_display(wmem_packet_scope(), &addr));
+ address_to_display(pinfo->pool, &addr));
break;
case 4:
@@ -1106,7 +1106,7 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
offset += 16;
proto_item_append_text(option_item, " = %s",
- address_to_display(wmem_packet_scope(), &addr));
+ address_to_display(pinfo->pool, &addr));
break;
default:
@@ -1331,7 +1331,7 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
case BLOCK_DARWIN_PROCESS:
switch (option_code) {
case 2: /* Darwin Process Name */
- proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_darwin_process_name, tvb, offset, option_length, ENC_NA | ENC_UTF_8, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_display_string(option_tree, hf_pcapng_option_darwin_process_name, tvb, offset, option_length, ENC_NA | ENC_UTF_8, pinfo->pool, &str);
offset += option_length;
break;
@@ -1341,7 +1341,7 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
offset += option_length;
proto_item_append_text(option_item, " = %s",
- guid_to_str(wmem_packet_scope(), &uuid));
+ guid_to_str(pinfo->pool, &uuid));
break;
default:
@@ -1709,7 +1709,7 @@ dissect_nrb_data(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
}
}
- str = address_to_display(wmem_packet_scope(), &addr);
+ str = address_to_display(pinfo->pool, &addr);
break;
case 0x0002: /* IPv6 Record */
if (record_length < 17) {
@@ -1740,7 +1740,7 @@ dissect_nrb_data(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
}
}
- str = address_to_display(wmem_packet_scope(), &addr);
+ str = address_to_display(pinfo->pool, &addr);
break;
default:
@@ -1917,9 +1917,9 @@ static gint dissect_block(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
info->darwin_process_event_number = 0;
info->frame_number = 1;
if (info->interfaces != NULL) {
- wmem_free(wmem_packet_scope(), info->interfaces);
+ wmem_free(pinfo->pool, info->interfaces);
}
- info->interfaces = wmem_array_new(wmem_packet_scope(), sizeof(struct interface_description));
+ info->interfaces = wmem_array_new(pinfo->pool, sizeof(struct interface_description));
if (tvb_memeql(tvb, 8, pcapng_big_endian_magic, BYTE_ORDER_MAGIC_SIZE) == 0) {
info->encoding = ENC_BIG_ENDIAN;
@@ -2077,8 +2077,8 @@ dissect_pcapng(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
info.darwin_process_event_number = 0;
info.frame_number = 1;
info.encoding = encoding;
- info.interfaces = wmem_array_new(wmem_packet_scope(), sizeof(struct interface_description));
- info.darwin_process_events = wmem_array_new(wmem_packet_scope(), sizeof(struct darwin_process_event_description));
+ info.interfaces = wmem_array_new(pinfo->pool, sizeof(struct interface_description));
+ info.darwin_process_events = wmem_array_new(pinfo->pool, sizeof(struct darwin_process_event_description));
main_item = proto_tree_add_item(tree, proto_pcapng, tvb, offset, -1, ENC_NA);
main_tree = proto_item_add_subtree(main_item, ett_pcapng);
diff --git a/epan/dissectors/file-png.c b/epan/dissectors/file-png.c
index a21f0deec9..6ae6303e1b 100644
--- a/epan/dissectors/file-png.c
+++ b/epan/dissectors/file-png.c
@@ -456,7 +456,7 @@ dissect_png(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *da
len_field = tvb_get_ntohl(tvb, offset);
type = tvb_get_ntohl(tvb, offset+4);
- type_str = tvb_get_string_enc(wmem_packet_scope(),
+ type_str = tvb_get_string_enc(pinfo->pool,
tvb, offset+4, 4, ENC_ASCII|ENC_NA);
/* 4 byte len field, 4 byte chunk type, 4 byte CRC */
diff --git a/epan/dissectors/file-rbm.c b/epan/dissectors/file-rbm.c
index e3b76bacd8..804721879b 100644
--- a/epan/dissectors/file-rbm.c
+++ b/epan/dissectors/file-rbm.c
@@ -143,7 +143,7 @@ static void dissect_rbm_integer(tvbuff_t* tvb, packet_info* pinfo, proto_tree* t
proto_tree_add_int_format_value(tree, hf_rbm_integer, tvb, *offset, len, value, "%d", value);
*offset += len;
if (value_str)
- *value_str = wmem_strdup_printf(wmem_packet_scope(), "%d", value);
+ *value_str = wmem_strdup_printf(pinfo->pool, "%d", value);
}
static void dissect_rbm_basic(tvbuff_t* tvb _U_, packet_info* pinfo, proto_tree* tree _U_, guint* offset _U_, const guint8 subtype,
@@ -179,10 +179,10 @@ static void dissect_rbm_string_data_trailer(tvbuff_t* tvb, packet_info* pinfo, p
get_rbm_integer(tvb, *offset, &value, &len);
proto_tree_add_int_format_value(tree, hf_rbm_length, tvb, *offset, len, value, "%d", value);
*offset += len;
- s = (const char*)tvb_get_string_enc(wmem_packet_scope(), tvb, *offset, value, ENC_NA);
+ s = (const char*)tvb_get_string_enc(pinfo->pool, tvb, *offset, value, ENC_NA);
proto_tree_add_string_format_value(tree, hf_rbm_string, tvb, *offset, value, s, "%s%s%s", prefix, s, trailer);
*offset += value;
- *value_str = wmem_strdup_printf(wmem_packet_scope(), "%s%s%s", prefix, s, trailer);
+ *value_str = wmem_strdup_printf(pinfo->pool, "%s%s%s", prefix, s, trailer);
}
static void dissect_rbm_string_data(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, guint* offset, const gchar* label,
@@ -214,7 +214,7 @@ static void dissect_rbm_array(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tre
proto_item_set_len(array_tree, *offset - offset_start);
if (value_str)
- *value_str = wmem_strdup_printf(wmem_packet_scope(), "%d", value);
+ *value_str = wmem_strdup_printf(pinfo->pool, "%d", value);
}
static void dissect_rbm_hash(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, guint* offset, gchar** value_str)
@@ -248,7 +248,7 @@ static void dissect_rbm_hash(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree
proto_item_set_len(hash_tree, *offset - offset_start);
if (value_str)
- *value_str = wmem_strdup_printf(wmem_packet_scope(), "%d", value);
+ *value_str = wmem_strdup_printf(pinfo->pool, "%d", value);
}
static void dissect_rbm_link(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, guint* offset, guint8 subtype,
@@ -269,14 +269,14 @@ static void dissect_rbm_link(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree
DISSECTOR_ASSERT_NOT_REACHED();
}
- rbm_set_info(pinfo, wmem_strdup_printf(wmem_packet_scope(), "%s Link", label));
+ rbm_set_info(pinfo, wmem_strdup_printf(pinfo->pool, "%s Link", label));
get_rbm_integer(tvb, *offset, &value, &len);
proto_tree_add_int_format_value(tree, hf_rbm_link, tvb, *offset, len, value, "%d", value);
*offset += len;
if (type)
*type = label;
if (value_str)
- *value_str = wmem_strdup_printf(wmem_packet_scope(), "%d", value);
+ *value_str = wmem_strdup_printf(pinfo->pool, "%d", value);
}
static void dissect_rbm_double(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, guint* offset, gchar** value_str)
@@ -291,12 +291,12 @@ static void dissect_rbm_double(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tr
get_rbm_integer(tvb, *offset, &value, &len);
proto_tree_add_int_format_value(tree, hf_rbm_length, tvb, *offset, len, value, "%d", value);
*offset += len;
- s = (const char*)tvb_get_string_enc(wmem_packet_scope(), tvb, *offset, value, ENC_NA);
+ s = (const char*)tvb_get_string_enc(pinfo->pool, tvb, *offset, value, ENC_NA);
valued = g_ascii_strtod(s, NULL);
proto_tree_add_double(tree, hf_rbm_double, tvb, *offset, value, valued);
*offset += value;
if (value_str)
- *value_str = wmem_strdup_printf(wmem_packet_scope(), "%f", valued);
+ *value_str = wmem_strdup_printf(pinfo->pool, "%f", valued);
}
static void dissect_rbm_struct_data(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, guint* offset, gchar** value_str)
@@ -313,7 +313,7 @@ static void dissect_rbm_struct_data(tvbuff_t* tvb, packet_info* pinfo, proto_tre
proto_tree_add_item(tree, hf_rbm_struct, tvb, *offset + 1, value, ENC_ASCII|ENC_NA);
*offset += 1 + value;
if (value_str)
- *value_str = wmem_strdup_printf(wmem_packet_scope(), "%d", value);
+ *value_str = wmem_strdup_printf(pinfo->pool, "%d", value);
}
static void dissect_rbm_string(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, guint* offset, gchar** value)
@@ -518,7 +518,7 @@ static gboolean dissect_rbm_header(tvbuff_t* tvb, packet_info* pinfo, proto_tree
major = tvb_get_guint8(tvb, *offset);
minor = tvb_get_guint8(tvb, *offset + 1);
- version = wmem_strdup_printf(wmem_packet_scope(), "%u.%u", major, minor);
+ version = wmem_strdup_printf(pinfo->pool, "%u.%u", major, minor);
proto_tree_add_string_format(tree, hf_rbm_version, tvb, *offset, 2, version, "Version: %s", version);
*offset += 2;
diff --git a/epan/dissectors/file-rfc7468.c b/epan/dissectors/file-rfc7468.c
index b633dea9c4..ec01fabaf6 100644
--- a/epan/dissectors/file-rfc7468.c
+++ b/epan/dissectors/file-rfc7468.c
@@ -198,7 +198,7 @@ dissect_rfc7468(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
/*
* Extract the label, and put it in that subtree.
*/
- label = wmem_strndup(wmem_packet_scope(), labelp, labellen);
+ label = wmem_strndup(pinfo->pool, labelp, labellen);
proto_tree_add_item(preeb_tree, hf_rfc7468_preeb_label, tvb,
offset + (int)preeb_prefix_len, labellen, ENC_ASCII|ENC_NA);
diff --git a/epan/dissectors/packet-3com-njack.c b/epan/dissectors/packet-3com-njack.c
index 41006ba2ff..371b96999d 100644
--- a/epan/dissectors/packet-3com-njack.c
+++ b/epan/dissectors/packet-3com-njack.c
@@ -516,8 +516,8 @@ verify_password(tvbuff_t *tvb, const char *password)
gcry_md_hd_t md5_handle;
guint8 *digest;
- workbuffer=wmem_alloc(wmem_packet_scope(), 32);
- digest=wmem_alloc(wmem_packet_scope(), 16);
+ workbuffer=wmem_alloc(pinfo->pool, 32);
+ digest=wmem_alloc(pinfo->pool, 16);
length = tvb_get_ntohs(tvb, 6);
packetdata = tvb_get_ptr(tvb, 0, length);
diff --git a/epan/dissectors/packet-3g-a11.c b/epan/dissectors/packet-3g-a11.c
index bfe70aed40..5f4dbe0645 100644
--- a/epan/dissectors/packet-3g-a11.c
+++ b/epan/dissectors/packet-3g-a11.c
@@ -628,7 +628,7 @@ decode_sse(proto_tree *ext_tree, packet_info *pinfo, tvbuff_t *tvb, int offset,
return;
}
- msid_digits = (char *)wmem_alloc(wmem_packet_scope(), A11_MSG_MSID_LEN_MAX+2);
+ msid_digits = (char *)wmem_alloc(pinfo->pool, A11_MSG_MSID_LEN_MAX+2);
msid_start_offset = offset;
if (msid_len > A11_MSG_MSID_ELEM_LEN_MAX) {
diff --git a/epan/dissectors/packet-6lowpan.c b/epan/dissectors/packet-6lowpan.c
index 489280ae43..61d7d88884 100644
--- a/epan/dissectors/packet-6lowpan.c
+++ b/epan/dissectors/packet-6lowpan.c
@@ -1797,7 +1797,7 @@ dissect_6lowpan_hc1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint dg
/* Construct the next header for the UDP datagram. */
offset = BITS_TO_BYTE_LEN(0, bit_offset);
length = tvb_captured_length_remaining(tvb, offset);
- nhdr_list = (struct lowpan_nhdr *)wmem_alloc(wmem_packet_scope(), sizeof(struct lowpan_nhdr) + sizeof(struct udp_hdr) + length);
+ nhdr_list = (struct lowpan_nhdr *)wmem_alloc(pinfo->pool, sizeof(struct lowpan_nhdr) + sizeof(struct udp_hdr) + length);
nhdr_list->next = NULL;
nhdr_list->proto = IP_PROTO_UDP;
nhdr_list->length = length + (int)sizeof(struct udp_hdr);
@@ -1815,7 +1815,7 @@ dissect_6lowpan_hc1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint dg
gint length;
offset = BITS_TO_BYTE_LEN(0, bit_offset);
length = tvb_captured_length_remaining(tvb, offset);
- nhdr_list = (struct lowpan_nhdr *)wmem_alloc(wmem_packet_scope(), sizeof(struct lowpan_nhdr) + length);
+ nhdr_list = (struct lowpan_nhdr *)wmem_alloc(pinfo->pool, sizeof(struct lowpan_nhdr) + length);
nhdr_list->next = NULL;
nhdr_list->proto = ipv6.ip6h_nxt;
nhdr_list->length = length;
@@ -2086,7 +2086,7 @@ dissect_6lowpan_iphc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint d
}
if (ipv6_summary_in_tree) {
address src_addr = ADDRESS_INIT(AT_IPv6, sizeof(ipv6.ip6h_src), &ipv6.ip6h_src);
- proto_item_append_text(tree, ", Src: %s", address_with_resolution_to_str(wmem_packet_scope(), &src_addr));
+ proto_item_append_text(tree, ", Src: %s", address_with_resolution_to_str(pinfo->pool, &src_addr));
}
/* Add information about where the context came from. */
@@ -2218,7 +2218,7 @@ dissect_6lowpan_iphc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint d
}
if (ipv6_summary_in_tree) {
address dst_addr = ADDRESS_INIT(AT_IPv6, sizeof(ipv6.ip6h_dst), &ipv6.ip6h_dst);
- proto_item_append_text(tree, ", Dest: %s", address_with_resolution_to_str(wmem_packet_scope(), &dst_addr));
+ proto_item_append_text(tree, ", Dest: %s", address_with_resolution_to_str(pinfo->pool, &dst_addr));
}
/* Add information about where the context came from. */
@@ -2253,7 +2253,7 @@ dissect_6lowpan_iphc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint d
/* Create an extension header for the remaining payload. */
else {
length = tvb_captured_length_remaining(tvb, offset);
- nhdr_list = (struct lowpan_nhdr *)wmem_alloc(wmem_packet_scope(), sizeof(struct lowpan_nhdr) + length);
+ nhdr_list = (struct lowpan_nhdr *)wmem_alloc(pinfo->pool, sizeof(struct lowpan_nhdr) + length);
nhdr_list->next = NULL;
nhdr_list->proto = ipv6.ip6h_nxt;
nhdr_list->length = length;
@@ -2331,7 +2331,7 @@ dissect_6lowpan_iphc_nhc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gi
if (!iphc_tvb) return NULL;
/* Create the next header structure for the tunneled IPv6 header. */
- nhdr = (struct lowpan_nhdr *)wmem_alloc0(wmem_packet_scope(), sizeof(struct lowpan_nhdr) + tvb_captured_length(iphc_tvb));
+ nhdr = (struct lowpan_nhdr *)wmem_alloc0(pinfo->pool, sizeof(struct lowpan_nhdr) + tvb_captured_length(iphc_tvb));
nhdr->next = NULL;
nhdr->proto = IP_PROTO_IPV6;
nhdr->length = tvb_captured_length(iphc_tvb);
@@ -2397,7 +2397,7 @@ dissect_6lowpan_iphc_nhc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gi
}
/* Create the next header structure for the IPv6 extension header. */
- nhdr = (struct lowpan_nhdr *)wmem_alloc0(wmem_packet_scope(), sizeof(struct lowpan_nhdr) + length);
+ nhdr = (struct lowpan_nhdr *)wmem_alloc0(pinfo->pool, sizeof(struct lowpan_nhdr) + length);
nhdr->next = NULL;
nhdr->proto = ext_proto;
nhdr->length = length;
@@ -2463,7 +2463,7 @@ dissect_6lowpan_iphc_nhc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gi
else if (ipv6_ext.ip6e_nxt != IP_PROTO_NONE) {
/* Create another next header structure for the remaining payload. */
length = tvb_captured_length_remaining(tvb, offset);
- nhdr->next = (struct lowpan_nhdr *)wmem_alloc(wmem_packet_scope(), sizeof(struct lowpan_nhdr) + length);
+ nhdr->next = (struct lowpan_nhdr *)wmem_alloc(pinfo->pool, sizeof(struct lowpan_nhdr) + length);
nhdr->next->next = NULL;
nhdr->next->proto = ipv6_ext.ip6e_nxt;
nhdr->next->length = length;
@@ -2610,7 +2610,7 @@ dissect_6lowpan_iphc_nhc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gi
/* Create the next header structure for the UDP datagram. */
length = tvb_captured_length_remaining(tvb, offset);
- nhdr = (struct lowpan_nhdr *)wmem_alloc(wmem_packet_scope(), sizeof(struct lowpan_nhdr) + sizeof(struct udp_hdr) + length);
+ nhdr = (struct lowpan_nhdr *)wmem_alloc(pinfo->pool, sizeof(struct lowpan_nhdr) + sizeof(struct udp_hdr) + length);
nhdr->next = NULL;
nhdr->proto = IP_PROTO_UDP;
nhdr->length = length + (int)sizeof(struct udp_hdr);
diff --git a/epan/dissectors/packet-9p.c b/epan/dissectors/packet-9p.c
index cdede400a9..3d70bb8d41 100644
--- a/epan/dissectors/packet-9p.c
+++ b/epan/dissectors/packet-9p.c
@@ -1248,7 +1248,7 @@ static int dissect_9P_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
if (!pinfo->fd->visited) {
_9p_len = tvb_get_letohs(tvb, offset);
- tvb_s = (char *)tvb_get_string_enc(wmem_packet_scope(), tvb, offset+2, _9p_len, ENC_UTF_8|ENC_NA);
+ tvb_s = (char *)tvb_get_string_enc(pinfo->pool, tvb, offset+2, _9p_len, ENC_UTF_8|ENC_NA);
if (!strcmp(tvb_s, "9P2000.L")) {
u32 = _9P2000_L;
@@ -1318,7 +1318,7 @@ static int dissect_9P_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
if(!pinfo->fd->visited) {
_9p_len = tvb_get_letohs(tvb, offset);
- tvb_s = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset+2, _9p_len, ENC_UTF_8|ENC_NA);
+ tvb_s = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset+2, _9p_len, ENC_UTF_8|ENC_NA);
conv_set_fid(pinfo, fid, tvb_s, _9p_len+1);
}
offset += _9p_dissect_string(tvb, ninep_tree, offset, hf_9P_aname, ett_9P_aname);
@@ -1337,7 +1337,7 @@ static int dissect_9P_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
fid_path = conv_get_fid(pinfo, fid);
proto_item_append_text(ti, " (%s)", fid_path);
if (!pinfo->fd->visited) {
- tmppath = wmem_strbuf_sized_new(wmem_packet_scope(), 0, MAXPATHLEN);
+ tmppath = wmem_strbuf_sized_new(pinfo->pool, 0, MAXPATHLEN);
wmem_strbuf_append(tmppath, fid_path);
}
offset += 4;
@@ -1353,7 +1353,7 @@ static int dissect_9P_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
for(i = 0 ; i < u16; i++) {
if (!pinfo->fd->visited) {
_9p_len = tvb_get_letohs(tvb, offset);
- tvb_s = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset+2, _9p_len, ENC_UTF_8|ENC_NA);
+ tvb_s = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset+2, _9p_len, ENC_UTF_8|ENC_NA);
wmem_strbuf_append_c(tmppath, '/');
wmem_strbuf_append(tmppath, tvb_s);
}
@@ -1430,10 +1430,10 @@ static int dissect_9P_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
if (!pinfo->fd->visited) {
_9p_len = tvb_get_letohs(tvb, offset);
- tmppath = wmem_strbuf_sized_new(wmem_packet_scope(), 0, MAXPATHLEN);
+ tmppath = wmem_strbuf_sized_new(pinfo->pool, 0, MAXPATHLEN);
wmem_strbuf_append(tmppath, fid_path);
wmem_strbuf_append_c(tmppath, '/');
- tvb_s = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset+2, _9p_len, ENC_UTF_8|ENC_NA);
+ tvb_s = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset+2, _9p_len, ENC_UTF_8|ENC_NA);
wmem_strbuf_append(tmppath, tvb_s);
}
offset += _9p_dissect_string(tvb, ninep_tree, offset, hf_9P_filename, ett_9P_filename);
@@ -1463,10 +1463,10 @@ static int dissect_9P_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
if (!pinfo->fd->visited) {
_9p_len = tvb_get_letohs(tvb, offset);
- tmppath = wmem_strbuf_sized_new(wmem_packet_scope(), 0, MAXPATHLEN);
+ tmppath = wmem_strbuf_sized_new(pinfo->pool, 0, MAXPATHLEN);
wmem_strbuf_append(tmppath, fid_path);
wmem_strbuf_append_c(tmppath, '/');
- tvb_s = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset+2, _9p_len, ENC_UTF_8|ENC_NA);
+ tvb_s = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset+2, _9p_len, ENC_UTF_8|ENC_NA);
wmem_strbuf_append(tmppath, tvb_s);
}
offset += _9p_dissect_string(tvb, ninep_tree, offset, hf_9P_filename, ett_9P_filename);
@@ -1808,11 +1808,11 @@ static int dissect_9P_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
if (!pinfo->fd->visited) {
_9p_len = tvb_get_letohs(tvb, offset);
- tmppath = wmem_strbuf_sized_new(wmem_packet_scope(), 0, MAXPATHLEN);
+ tmppath = wmem_strbuf_sized_new(pinfo->pool, 0, MAXPATHLEN);
wmem_strbuf_append(tmppath, conv_get_fid(pinfo, dfid));
wmem_strbuf_append_c(tmppath, '/');
- tvb_s = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset+2, _9p_len, ENC_UTF_8|ENC_NA);
+ tvb_s = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset+2, _9p_len, ENC_UTF_8|ENC_NA);
wmem_strbuf_append(tmppath, tvb_s);
conv_set_fid(pinfo, fid, wmem_strbuf_get_str(tmppath), wmem_strbuf_get_len(tmppath)+1);
diff --git a/epan/dissectors/packet-lapsat.c b/epan/dissectors/packet-lapsat.c
index 30c09f4468..2cd68f5c7a 100644
--- a/epan/dissectors/packet-lapsat.c
+++ b/epan/dissectors/packet-lapsat.c
@@ -247,7 +247,7 @@ dissect_control(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int is_
const char *frame_type;
char *info;
- info = (char *)wmem_alloc(wmem_packet_scope(), 80);
+ info = (char *)wmem_alloc(pinfo->pool, 80);
/* Grab complete control field */
ctl = tvb_get_ntohs(tvb, 1) >> 4;
diff --git a/epan/dissectors/packet-lbmpdm.c b/epan/dissectors/packet-lbmpdm.c
index c8a33aa564..d72af1e1f4 100644
--- a/epan/dissectors/packet-lbmpdm.c
+++ b/epan/dissectors/packet-lbmpdm.c
@@ -810,8 +810,8 @@ static int dissect_segment_ofstable(tvbuff_t * tvb, int offset, packet_info * pi
proto_tree_add_item(subtree, hf_lbmpdm_segment_res, tvb, offset + O_LBMPDM_SEG_HDR_T_RES, L_LBMPDM_SEG_HDR_T_RES, encoding);
proto_tree_add_item(subtree, hf_lbmpdm_segment_len, tvb, offset + O_LBMPDM_SEG_HDR_T_LEN, L_LBMPDM_SEG_HDR_T_LEN, encoding);
field_count = datalen / L_LBMPDM_OFFSET_ENTRY_T;
- id_list = wmem_alloc_array(wmem_packet_scope(), gint32, field_count);
- ofs_list = wmem_alloc_array(wmem_packet_scope(), gint32, field_count);
+ id_list = wmem_alloc_array(pinfo->pool, gint32, field_count);
+ ofs_list = wmem_alloc_array(pinfo->pool, gint32, field_count);
for (idx = 0; idx < field_count; ++idx)
{
id_list[idx] = -1;
@@ -841,10 +841,10 @@ static int dissect_segment_ofstable(tvbuff_t * tvb, int offset, packet_info * pi
min_offset = ofs_list[idx];
}
}
- ofs_table = wmem_new(wmem_packet_scope(), lbmpdm_offset_table_t);
+ ofs_table = wmem_new(pinfo->pool, lbmpdm_offset_table_t);
ofs_table->num_flds = max_index + 1;
ofs_table->min_set_offset = NULL;
- ofs_table->offset_list = wmem_alloc_array(wmem_packet_scope(), gint32, ofs_table->num_flds);
+ ofs_table->offset_list = wmem_alloc_array(pinfo->pool, gint32, ofs_table->num_flds);
for (idx = 0; idx < (int)ofs_table->num_flds; ++idx)
{
ofs_table->offset_list[idx] = -1;
diff --git a/epan/dissectors/packet-ldp.c b/epan/dissectors/packet-ldp.c
index 3435bad1b8..0bec3be0b3 100644
--- a/epan/dissectors/packet-ldp.c
+++ b/epan/dissectors/packet-ldp.c
@@ -1209,7 +1209,7 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
break;
}
- addr=(guint8 *)wmem_alloc0(wmem_packet_scope(), addr_size);
+ addr=(guint8 *)wmem_alloc0(pinfo->pool, addr_size);
for(ax=0; ax+1 <= prefix_len_octets; ax++)
addr[ax]=tvb_get_guint8(tvb, offset+ax);
@@ -1217,7 +1217,7 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
addr[ax-1] = addr[ax-1]&(0xFF<<(8-prefix_len%8));
set_address(&addr_str, addr_type, addr_size, addr);
- str = address_to_str(wmem_packet_scope(), &addr_str);
+ str = address_to_str(pinfo->pool, &addr_str);
proto_tree_add_string_format(fec_tree, hf_ldp_tlv_fec_pfval, tvb, offset, prefix_len_octets,
str, "Prefix: %s", str);
@@ -1284,13 +1284,13 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
break;
}
- addr=(guint8 *)wmem_alloc0(wmem_packet_scope(), addr_size);
+ addr=(guint8 *)wmem_alloc0(pinfo->pool, addr_size);
for(ax=0; ax+1 <= host_len; ax++)
addr[ax]=tvb_get_guint8(tvb, offset+ax);
set_address(&addr_str, addr_type, addr_size, addr);
- str = address_to_str(wmem_packet_scope(), &addr_str);
+ str = address_to_str(pinfo->pool, &addr_str);
proto_tree_add_string_format(fec_tree, hf_ldp_tlv_fec_hoval, tvb, offset, host_len,
str, "Address: %s", str);
@@ -1680,7 +1680,7 @@ dissect_tlv_address_list(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_
offset+=2; rem-=2;
val_tree=proto_tree_add_subtree(tree, tvb, offset, rem, ett_ldp_tlv_val, NULL, "Addresses");
- addr=(guint8 *)wmem_alloc(wmem_packet_scope(), addr_size);
+ addr=(guint8 *)wmem_alloc(pinfo->pool, addr_size);
for(ix=1; rem >= addr_size; ix++, offset += addr_size,
rem -= addr_size) {
@@ -1689,7 +1689,7 @@ dissect_tlv_address_list(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_
break;
set_address(&addr_str, addr_type, addr_size, addr);
- str = address_to_str(wmem_packet_scope(), &addr_str);
+ str = address_to_str(pinfo->pool, &addr_str);
proto_tree_add_string_format(val_tree,
hf_ldp_tlv_addrl_addr, tvb, offset, addr_size, str,
"Address %u: %s", ix, str);
diff --git a/epan/dissectors/packet-ldss.c b/epan/dissectors/packet-ldss.c
index 89d6f35bb2..a5c40aa81d 100644
--- a/epan/dissectors/packet-ldss.c
+++ b/epan/dissectors/packet-ldss.c
@@ -492,7 +492,7 @@ dissect_ldss_transfer (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, FALSE);
/* Include new-line in line */
- line = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, linelen, ENC_ASCII);
+ line = tvb_get_string_enc(pinfo->pool, tvb, offset, linelen, ENC_ASCII);
line_tree = proto_tree_add_subtree(ldss_tree, tvb, offset, linelen,
ett_ldss_transfer_req, NULL,
diff --git a/epan/dissectors/packet-lithionics.c b/epan/dissectors/packet-lithionics.c
index 8fe87f17f3..29e64b3c98 100644
--- a/epan/dissectors/packet-lithionics.c
+++ b/epan/dissectors/packet-lithionics.c
@@ -118,16 +118,16 @@ dissect_lithionics(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
lithionics_tree = proto_item_add_subtree(ti, ett_lithionics);
//just put the whole packet string (minus newlines) in the Info column
- col_set_str(pinfo->cinfo, COL_INFO, (const gchar*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tvb_reported_length_remaining(tvb, offset)-2, ENC_ASCII));
+ col_set_str(pinfo->cinfo, COL_INFO, (const gchar*)tvb_get_string_enc(pinfo->pool, tvb, offset, tvb_reported_length_remaining(tvb, offset)-2, ENC_ASCII));
- str = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, 1, ENC_ASCII);
+ str = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset + 1, 1, ENC_ASCII);
if (!ws_strtou32(str, NULL, &value))
proto_tree_add_uint_format_value(lithionics_tree, hf_lithionics_battery_address, tvb, offset, 2, 0, "<Invalid value \"%s\">", str);
else
proto_tree_add_uint(lithionics_tree, hf_lithionics_battery_address, tvb, offset, 2, value);
offset += 2;
- str = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, 5, ENC_ASCII);
+ str = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset + 1, 5, ENC_ASCII);
if (!ws_strtou32(str, NULL, &value))
proto_tree_add_float_format_value(lithionics_tree, hf_lithionics_amp_hours_remain, tvb, offset, 6, 0.0, "<Invalid value \"%s\">", str);
else {
@@ -136,7 +136,7 @@ dissect_lithionics(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
}
offset += 6;
- str = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, 4, ENC_ASCII);
+ str = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset + 1, 4, ENC_ASCII);
if (!ws_strtou32(str, NULL, &value))
proto_tree_add_float_format_value(lithionics_tree, hf_lithionics_volts, tvb, offset, 5, 0.0, "<Invalid value \"%s\">", str);
else {
@@ -145,28 +145,28 @@ dissect_lithionics(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
}
offset += 5;
- str = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, 3, ENC_ASCII);
+ str = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset + 1, 3, ENC_ASCII);
if (!ws_strtou32(str, NULL, &value))
proto_tree_add_uint_format_value(lithionics_tree, hf_lithionics_bat_gauge, tvb, offset, 4, 0, "<Invalid value \"%s\">", str);
else
proto_tree_add_uint(lithionics_tree, hf_lithionics_bat_gauge, tvb, offset, 4, value);
offset += 4;
- str = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, 3, ENC_ASCII);
+ str = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset + 1, 3, ENC_ASCII);
if (!ws_strtou32(str, NULL, &value))
proto_tree_add_uint_format_value(lithionics_tree, hf_lithionics_soc, tvb, offset, 4, 0, "<Invalid value \"%s\">", str);
else
proto_tree_add_uint(lithionics_tree, hf_lithionics_soc, tvb, offset, 4, value);
offset += 4;
- str = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, 1, ENC_ASCII);
+ str = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset + 1, 1, ENC_ASCII);
if (!ws_strtou32(str, NULL, &value))
proto_tree_add_uint_format_value(lithionics_tree, hf_lithionics_direction, tvb, offset, 2, 0, "<Invalid value \"%s\">", str);
else
proto_tree_add_uint(lithionics_tree, hf_lithionics_direction, tvb, offset, 2, value);
offset += 2;
- str = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, 5, ENC_ASCII);
+ str = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset + 1, 5, ENC_ASCII);
if (!ws_strtou32(str, NULL, &value))
proto_tree_add_float_format_value(lithionics_tree, hf_lithionics_amps, tvb, offset, 6, 0.0, "<Invalid value \"%s\">", str);
else {
@@ -175,21 +175,21 @@ dissect_lithionics(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
}
offset += 6;
- str = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, 6, ENC_ASCII);
+ str = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset + 1, 6, ENC_ASCII);
if (!ws_strtou32(str, NULL, &value))
proto_tree_add_uint_format_value(lithionics_tree, hf_lithionics_watts, tvb, offset, 7, 0, "<Invalid value \"%s\">", str);
else
proto_tree_add_uint(lithionics_tree, hf_lithionics_watts, tvb, offset, 7, value);
offset += 7;
- str = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, 3, ENC_ASCII);
+ str = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset + 1, 3, ENC_ASCII);
if (!ws_strtou32(str, NULL, &value))
proto_tree_add_uint_format_value(lithionics_tree, hf_lithionics_temperature, tvb, offset, 4, 0, "<Invalid value \"%s\">", str);
else
proto_tree_add_uint(lithionics_tree, hf_lithionics_temperature, tvb, offset, 4, value);
offset += 4;
- str = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, 6, ENC_ASCII);
+ str = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset + 1, 6, ENC_ASCII);
//do this over proto_tree_add_bitmask_value to get better field highlighting
if (!ws_hexstrtou32(str, NULL, &value))
proto_tree_add_uint_format_value(lithionics_tree, hf_lithionics_system_status, tvb, offset, 7, 0, "<Invalid value \"%s\">", str);
diff --git a/epan/dissectors/packet-lldp.c b/epan/dissectors/packet-lldp.c
index 66d17ed081..bc52fe235d 100644
--- a/epan/dissectors/packet-lldp.c
+++ b/epan/dissectors/packet-lldp.c
@@ -1455,7 +1455,7 @@ dissect_lldp_chassis_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
idType="MA";
strPtr = tvb_ether_to_str(tvb, offset);
proto_tree_add_item(chassis_tree, hf_chassis_id_mac, tvb, offset, 6, ENC_NA);
- pn_lldp_column_info->chassis_id_mac = wmem_strdup(wmem_packet_scope(), strPtr);
+ pn_lldp_column_info->chassis_id_mac = wmem_strdup(pinfo->pool, strPtr);
offset += (dataLen - 1);
break;
}
@@ -1496,7 +1496,7 @@ dissect_lldp_chassis_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
break;
default:
- strPtr = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, (dataLen-2));
+ strPtr = tvb_bytes_to_str(pinfo->pool, tvb, offset, (dataLen-2));
proto_tree_add_item(chassis_tree, hf_chassis_id, tvb, offset, (dataLen-2), ENC_NA);
break;
@@ -1532,7 +1532,7 @@ dissect_lldp_chassis_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
case 7: /* Locally assigned */
idType="LA";
strPtr = tvb_format_stringzpad(tvb, offset, (dataLen-1));
- pn_lldp_column_info->chassis_id_locally_assigned = wmem_strdup(wmem_packet_scope(), strPtr);
+ pn_lldp_column_info->chassis_id_locally_assigned = wmem_strdup(pinfo->pool, strPtr);
break;
case 1: /* Chassis component */
idType="CC";
@@ -1540,7 +1540,7 @@ dissect_lldp_chassis_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
break;
case 3: /* Port component */
idType="PC";
- strPtr = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, (dataLen-1));
+ strPtr = tvb_bytes_to_str(pinfo->pool, tvb, offset, (dataLen-1));
break;
default:
@@ -1669,7 +1669,7 @@ dissect_lldp_port_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint3
break;
default:
- strPtr = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, (dataLen-2));
+ strPtr = tvb_bytes_to_str(pinfo->pool, tvb, offset, (dataLen-2));
proto_tree_add_item(port_tree, hf_port_id, tvb, offset, (dataLen-2), ENC_ASCII|ENC_NA);
break;
@@ -1698,7 +1698,7 @@ dissect_lldp_port_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint3
break;
case 2: /* Port component */
idType = "PC";
- strPtr = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, (dataLen-1));
+ strPtr = tvb_bytes_to_str(pinfo->pool, tvb, offset, (dataLen-1));
break;
case 5: /* Interface name */
idType = "IN";
@@ -1711,7 +1711,7 @@ dissect_lldp_port_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint3
case 7: /* Locally assigned */
idType = "LA";
strPtr = tvb_format_stringzpad(tvb, offset, (dataLen-1));
- pn_lldp_column_info->port_id_locally_assigned = wmem_strdup(wmem_packet_scope(), strPtr);
+ pn_lldp_column_info->port_id_locally_assigned = wmem_strdup(pinfo->pool, strPtr);
break;
default:
idType = "Rs";
@@ -3511,7 +3511,7 @@ set_name_of_station_for_profinet_specialized_column_info
{
pn_lldp_column_info->is_nos_assigned = TRUE;
pn_lldp_column_info->is_port_id_assigned = TRUE;
- lldpPortIdCombinedWithNameOfStation = wmem_strdup(wmem_packet_scope(), pn_lldp_column_info->port_id_locally_assigned);
+ lldpPortIdCombinedWithNameOfStation = wmem_strdup(pinfo->pool, pn_lldp_column_info->port_id_locally_assigned);
tokenPortId = strtok(lldpPortIdCombinedWithNameOfStation, delimForProfinetv23);
tokenNameOfStation = strtok(NULL, delimForProfinetv23);
col_append_fstr(pinfo->cinfo, COL_INFO, "NoS = %s ", tokenNameOfStation);
@@ -3717,37 +3717,37 @@ dissect_cisco_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
/* ACI */
case 0xc9: // 201 port-state, uint8
tf = proto_tree_add_item(tree, hf_cisco_aci_portstate, tvb, offset, length, ENC_NA);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset++;
length--;
break;
case 0xca: // 202 node-role, uint8
tf = proto_tree_add_item(tree, hf_cisco_aci_noderole, tvb, offset, length, ENC_NA);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset++;
length--;
break;
case 0xcb: // 203 node-id, uint32
tf = proto_tree_add_item(tree, hf_cisco_aci_nodeid, tvb, offset, length, ENC_BIG_ENDIAN);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset += 4;
length -= 4;
break;
case 0xcc: // 204 spine-level, uint8
tf = proto_tree_add_item(tree, hf_cisco_aci_spinelevel, tvb, offset, length, ENC_NA);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset++;
length--;
break;
case 0xcd: // 205 pod-id, uint16
tf = proto_tree_add_item(tree, hf_cisco_aci_podid, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset += 2;
length -= 2;
break;
case 0xce: // 206 fabric-name, string
tf = proto_tree_add_item(tree, hf_cisco_aci_fabricname, tvb, offset, length, ENC_ASCII|ENC_NA);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset += length;
length -= length;
break;
@@ -3755,7 +3755,7 @@ dissect_cisco_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
proto_tree_add_item(tree, hf_cisco_aci_apiclist, tvb, offset, length, ENC_NA);
while (length > 0) {
tf = proto_tree_add_item(tree, hf_cisco_aci_apicid, tvb, offset, 1, ENC_NA);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset++;
length--;
proto_tree_add_item(tree, hf_cisco_aci_apicipv4, tvb, offset, 4, ENC_NA);
@@ -3768,31 +3768,31 @@ dissect_cisco_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
break;
case 0xd0: // 208 node-ip, ipv4
tf = proto_tree_add_item(tree, hf_cisco_aci_nodeip, tvb, offset, length, ENC_NA);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset += 4;
length -= 4;
break;
case 0xd1: // 209 port-role, uint8
tf = proto_tree_add_item(tree, hf_cisco_aci_portrole, tvb, offset, length, ENC_NA);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset++;
length--;
break;
case 0xd2: // 210 fw-ver, string
tf = proto_tree_add_item(tree, hf_cisco_aci_version, tvb, offset, length, ENC_ASCII|ENC_NA);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset += length;
length -= length;
break;
case 0xd3: // 211 infra-vlan, uint16
tf = proto_tree_add_item(tree, hf_cisco_aci_fabricvlan, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset += 2;
length -= 2;
break;
case 0xd4: // 212 serial-number, string
tf = proto_tree_add_item(tree, hf_cisco_aci_serialno, tvb, offset, length, ENC_ASCII|ENC_NA);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset += length;
length -= length;
break;
@@ -3802,37 +3802,37 @@ dissect_cisco_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
#endif
case 0xd6: // 214 model, string
tf = proto_tree_add_item(tree, hf_cisco_aci_model, tvb, offset, length, ENC_ASCII|ENC_NA);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset += length;
length -= length;
break;
case 0xd7: // 215 name, string
tf = proto_tree_add_item(tree, hf_cisco_aci_nodename, tvb, offset, length, ENC_ASCII|ENC_NA);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset += length;
length -= length;
break;
case 0xd8: // 216 port-mode, uint16
tf = proto_tree_add_item(tree, hf_cisco_aci_portmode, tvb, offset, length, ENC_BIG_ENDIAN);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset += 2;
length -= 2;
break;
case 0xd9: // 217 authenticate-cookie, bytes
tf = proto_tree_add_item(tree, hf_cisco_aci_authcookie, tvb, offset, length, ENC_NA);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset += length;
length -= length;
break;
case 0xda: // 218 standby-apic, uint8
tf = proto_tree_add_item(tree, hf_cisco_aci_apicmode, tvb, offset, length, ENC_NA);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset++;
length--;
break;
case 0xdb: // 219 fabric-id, uint16
tf = proto_tree_add_item(tree, hf_cisco_aci_fabricid, tvb, offset, length, ENC_BIG_ENDIAN);
- proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(wmem_packet_scope(), tf));
+ proto_item_append_text(parent_item, ": %s", proto_item_get_display_repr(pinfo->pool, tf));
offset += 2;
length -= 2;
break;
@@ -4440,7 +4440,7 @@ dissect_organizational_specific_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tre
subTypeStr = val_to_str(subType, onos_subtypes, "Unknown subtype (0x%x)");
break;
default:
- subTypeStr = wmem_strdup_printf(wmem_packet_scope(), "Unknown (%d)",subType);
+ subTypeStr = wmem_strdup_printf(pinfo->pool, "Unknown (%d)",subType);
break;
}
@@ -4563,7 +4563,7 @@ dissect_lldp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
new_tvb = tvb_new_subset_length(tvb, offset, TLV_INFO_LEN(tempShort)+2);
/* allocation */
- pn_lldp_column_info = wmem_new0(wmem_packet_scope(), profinet_lldp_column_info);
+ pn_lldp_column_info = wmem_new0(pinfo->pool, profinet_lldp_column_info);
rtnValue = dissect_lldp_chassis_id(new_tvb, pinfo, lldp_tree, 0, pn_lldp_column_info);
if (rtnValue < 0)
diff --git a/epan/dissectors/packet-lnpdqp.c b/epan/dissectors/packet-lnpdqp.c
index d0c5bd3a9e..8a4f652544 100644
--- a/epan/dissectors/packet-lnpdqp.c
+++ b/epan/dissectors/packet-lnpdqp.c
@@ -219,7 +219,7 @@ dissect_lnpdqp_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
if(no_of_digits == 0)
return;
offset++;
- proto_tree_add_item_ret_display_string(subtree, hf_lnpdqp_bcd_digits, tvb, offset, -1, ENC_KEYPAD_BC_TBCD, wmem_packet_scope(), &digit_str);
+ proto_tree_add_item_ret_display_string(subtree, hf_lnpdqp_bcd_digits, tvb, offset, -1, ENC_KEYPAD_BC_TBCD, pinfo->pool, &digit_str);
proto_item_append_text(actx->created_item, " - %s", digit_str);
break;
case 2:
@@ -230,7 +230,7 @@ dissect_lnpdqp_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
return;
offset++;
proto_tree_add_item(subtree, hf_lnpdqp_ia5_digits, tvb, offset, -1, ENC_ASCII|ENC_NA);
- proto_item_append_text(actx->created_item, " - %s", tvb_get_string_enc(wmem_packet_scope(),tvb,offset,tvb_reported_length_remaining(tvb,offset), ENC_ASCII | ENC_NA));
+ proto_item_append_text(actx->created_item, " - %s", tvb_get_string_enc(pinfo->pool,tvb,offset,tvb_reported_length_remaining(tvb,offset), ENC_ASCII | ENC_NA));
break;
default:
break;
diff --git a/epan/dissectors/packet-log3gpp.c b/epan/dissectors/packet-log3gpp.c
index 8ef89f330f..214ed9d33c 100644
--- a/epan/dissectors/packet-log3gpp.c
+++ b/epan/dissectors/packet-log3gpp.c
@@ -263,7 +263,7 @@ lte_mac_pseudo_hdr(char* option_str, packet_info* pinfo, guint16 length, packet_
}
/* Allocate & zero struct */
- p_mac_lte_info = (struct mac_lte_info*) wmem_new0(wmem_packet_scope(), mac_lte_info);
+ p_mac_lte_info = (struct mac_lte_info*) wmem_new0(pinfo->pool, mac_lte_info);
/* First mandatory parameter */
par_opt_field = strtok(option, " ");
@@ -378,7 +378,7 @@ lte_rlc_pseudo_hdr(char* option_str, packet_info* pinfo, guint16 length, packet_
}
/* Allocate & zero struct */
- p_rlc_lte_info = (struct rlc_lte_info*) wmem_new0(wmem_packet_scope(), rlc_lte_info);
+ p_rlc_lte_info = (struct rlc_lte_info*) wmem_new0(pinfo->pool, rlc_lte_info);
/* First mandatory parameter */
par_opt_field = strtok(option, " ");
if (par_opt_field == NULL)
@@ -483,7 +483,7 @@ lte_pdcp_pseudo_hdr(char* option_str, packet_info* pinfo, guint16 length _U_, pa
}
/* Allocate & zero struct */
- p_pdcp_lte_info = (struct pdcp_lte_info*) wmem_new0(wmem_packet_scope(), pdcp_lte_info);
+ p_pdcp_lte_info = (struct pdcp_lte_info*) wmem_new0(pinfo->pool, pdcp_lte_info);
/* First mandatory parameter */
par_opt_field = strtok(option, " ");
if (par_opt_field == NULL)
@@ -614,7 +614,7 @@ dissect_log3gpp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data
is_hex_data = strcmp(protocol_name, "TXT");
proto_item_append_text(ti, " t=%s %c prot=%s",
- tvb_get_string_enc(wmem_packet_scope(), tvb, timestamp_start, timestamp_length, ENC_UTF_8 | ENC_NA),
+ tvb_get_string_enc(pinfo->pool, tvb, timestamp_start, timestamp_length, ENC_UTF_8 | ENC_NA),
(direction == 0) ? 'U' : 'D',
protocol_name);
@@ -624,7 +624,7 @@ dissect_log3gpp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data
pseudo_hdr_func_ptr_t func_ptr = NULL;
/* Look up for the optional information */
- protocol_option = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, protocol_option_start, protocol_option_length, ENC_UTF_8 | ENC_NA);
+ protocol_option = (char*)tvb_get_string_enc(pinfo->pool, tvb, protocol_option_start, protocol_option_length, ENC_UTF_8 | ENC_NA);
/* look up for the right dissector handle */
protocol_handle = look_for_dissector(protocol_name, direction, &func_ptr);
@@ -663,15 +663,15 @@ dissect_log3gpp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data
{
col_add_fstr(pinfo->cinfo, COL_INFO,
"%s",
- tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tvb_reported_length(tvb) - offset, ENC_UTF_8 | ENC_NA));
+ tvb_get_string_enc(pinfo->pool, tvb, offset, tvb_reported_length(tvb) - offset, ENC_UTF_8 | ENC_NA));
}
else
{
col_add_fstr(pinfo->cinfo, COL_INFO,
"Not dissected ( t=%s %c prot=%s)",
- tvb_get_string_enc(wmem_packet_scope(), tvb, timestamp_start, timestamp_length, ENC_UTF_8 | ENC_NA),
+ tvb_get_string_enc(pinfo->pool, tvb, timestamp_start, timestamp_length, ENC_UTF_8 | ENC_NA),
(direction == 0) ? 'U' : 'D',
- tvb_get_string_enc(wmem_packet_scope(), tvb, protocol_name_start, protocol_name_length, ENC_UTF_8 | ENC_NA));
+ tvb_get_string_enc(pinfo->pool, tvb, protocol_name_start, protocol_name_length, ENC_UTF_8 | ENC_NA));
}
}
else
diff --git a/epan/dissectors/packet-logcat-text.c b/epan/dissectors/packet-logcat-text.c
index de4da111cb..fb509e14d9 100644
--- a/epan/dissectors/packet-logcat-text.c
+++ b/epan/dissectors/packet-logcat-text.c
@@ -179,7 +179,7 @@ static int dissect_logcat_text(tvbuff_t *tvb, proto_tree *tree, packet_info *pin
const dissect_info_t *dinfo) {
gchar **tokens;
guint i;
- gchar *frame = tvb_get_string_enc(wmem_packet_scope(), tvb, 0, tvb_captured_length(tvb),
+ gchar *frame = tvb_get_string_enc(pinfo->pool, tvb, 0, tvb_captured_length(tvb),
ENC_UTF_8);
proto_item *mainitem = proto_tree_add_item(tree, proto_logcat_text, tvb, 0, -1, ENC_NA);
proto_tree *maintree = proto_item_add_subtree(mainitem, ett_logcat);
diff --git a/epan/dissectors/packet-logcat.c b/epan/dissectors/packet-logcat.c
index aec4421ce3..28d489b8b9 100644
--- a/epan/dissectors/packet-logcat.c
+++ b/epan/dissectors/packet-logcat.c
@@ -153,7 +153,7 @@ dissect_logcat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
check_length += string_length;
string_length = length - string_length - 1;
- log = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, string_length, ENC_UTF_8);
+ log = tvb_get_string_enc(pinfo->pool, tvb, offset, string_length, ENC_UTF_8);
/* New line characters convert to spaces to ensure column Info display one line */
if (pref_one_line_info_column) {
diff --git a/epan/dissectors/packet-lorawan.c b/epan/dissectors/packet-lorawan.c
index af0c272362..ed1c69ad7c 100644
--- a/epan/dissectors/packet-lorawan.c
+++ b/epan/dissectors/packet-lorawan.c
@@ -826,7 +826,7 @@ dissect_lorawan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *d
#if GCRYPT_VERSION_NUMBER >= 0x010600 /* 1.6.0 */
if (encryption_keys) {
gint frame_length = current_offset;
- guint8 *msg = (guint8 *)wmem_alloc0(wmem_packet_scope(), frame_length + 16);
+ guint8 *msg = (guint8 *)wmem_alloc0(pinfo->pool, frame_length + 16);
msg[0] = 0x49;
msg[5] = uplink ? 0 : 1;
memcpy(msg + 6, &dev_address, 4);
diff --git a/epan/dissectors/packet-lsd.c b/epan/dissectors/packet-lsd.c
index 63e8397f25..ce5b405e85 100644
--- a/epan/dissectors/packet-lsd.c
+++ b/epan/dissectors/packet-lsd.c
@@ -47,10 +47,10 @@ parse_string_field(proto_tree *tree, int hf, packet_info *pinfo, tvbuff_t *tvb,
if (*linelen < 0)
return FALSE;
- str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, *linelen, ENC_ASCII);
+ str = tvb_get_string_enc(pinfo->pool, tvb, offset, *linelen, ENC_ASCII);
if (g_ascii_strncasecmp(str, hf_info->name, strlen(hf_info->name)) == 0)
{
- field_and_value = wmem_strsplit(wmem_packet_scope(), str, ":", 2);
+ field_and_value = wmem_strsplit(pinfo->pool, str, ":", 2);
p = field_and_value[1];
if (p) {
while(g_ascii_isspace(*p))
@@ -97,10 +97,10 @@ dissect_lsd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, FALSE);
if (linelen < 0)
return offset+linelen;
- str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, linelen, ENC_ASCII);
+ str = tvb_get_string_enc(pinfo->pool, tvb, offset, linelen, ENC_ASCII);
if (g_ascii_strncasecmp(str, "Port", strlen("Port")) == 0)
{
- field_and_value = wmem_strsplit(wmem_packet_scope(), str, ":", 2);
+ field_and_value = wmem_strsplit(pinfo->pool, str, ":", 2);
valid = ws_strtou16(field_and_value[1], NULL, &port);
ti = proto_tree_add_uint(lsd_tree, hf_lsd_port, tvb, offset, linelen, port);
if (!valid)
diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c
index 81e1e7624d..5d69091a33 100644
--- a/epan/dissectors/packet-mac-lte.c
+++ b/epan/dissectors/packet-mac-lte.c
@@ -3210,7 +3210,7 @@ static void dissect_rar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
gint offset, mac_lte_info *p_mac_lte_info, mac_lte_tap_info *tap_info)
{
guint number_of_rars = 0; /* No of RAR bodies expected following headers */
- guint8 *rapids = (guint8 *)wmem_alloc(wmem_packet_scope(), MAX_RAR_PDUS * sizeof(guint8));
+ guint8 *rapids = (guint8 *)wmem_alloc(pinfo->pool, MAX_RAR_PDUS * sizeof(guint8));
gboolean backoff_indicator_seen = FALSE;
guint8 backoff_indicator = 0;
guint8 extension;
@@ -4778,7 +4778,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
lcid_str = val_to_str_const(initial_lcid, (p_mac_lte_info->direction == DIRECTION_UPLINK) ?
ulsch_lcid_vals : dlsch_lcid_vals, "Unknown");
} else {
- lcid_str = wmem_strdup_printf(wmem_packet_scope(), "%u", elcids[number_of_headers]);
+ lcid_str = wmem_strdup_printf(pinfo->pool, "%u", elcids[number_of_headers]);
}
/* Append summary to subheader root */
@@ -6229,12 +6229,12 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
if (!rlc_called_for_sdu) {
if (pdu_lengths[n] >= 30)
{
- proto_item_append_text(sdu_ti, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 30));
+ proto_item_append_text(sdu_ti, "%s", tvb_bytes_to_str(pinfo->pool, tvb, offset, 30));
proto_item_append_text(sdu_ti, "...");
}
else
{
- proto_item_append_text(sdu_ti, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, data_length));
+ proto_item_append_text(sdu_ti, "%s", tvb_bytes_to_str(pinfo->pool, tvb, offset, data_length));
}
}
@@ -6691,12 +6691,12 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
data_length);
if (pdu_lengths[n] >= 30)
{
- proto_item_append_text(sdu_ti, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 30));
+ proto_item_append_text(sdu_ti, "%s", tvb_bytes_to_str(pinfo->pool, tvb, offset, 30));
proto_item_append_text(sdu_ti, "...");
}
else
{
- proto_item_append_text(sdu_ti, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, data_length));
+ proto_item_append_text(sdu_ti, "%s", tvb_bytes_to_str(pinfo->pool, tvb, offset, data_length));
}
}
@@ -7050,10 +7050,10 @@ static void dissect_slsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Show bytes too, if won't be hidden (slow). There must be a nicer way of doing this! */
if (pdu_lengths[n] >= 30) {
- proto_item_append_text(sdu_ti, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 30));
+ proto_item_append_text(sdu_ti, "%s", tvb_bytes_to_str(pinfo->pool, tvb, offset, 30));
proto_item_append_text(sdu_ti, "...");
} else {
- proto_item_append_text(sdu_ti, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, data_length));
+ proto_item_append_text(sdu_ti, "%s", tvb_bytes_to_str(pinfo->pool, tvb, offset, data_length));
}
offset += data_length;
diff --git a/epan/dissectors/packet-manolito.c b/epan/dissectors/packet-manolito.c
index 54bb09447a..20c730c64b 100644
--- a/epan/dissectors/packet-manolito.c
+++ b/epan/dissectors/packet-manolito.c
@@ -125,7 +125,7 @@ dissect_manolito(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* diss
/* 2-byte field name */
field_name = tvb_get_ntohs(tvb, offset);
- field_name_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 2, ENC_ASCII);
+ field_name_str = tvb_get_string_enc(pinfo->pool, tvb, offset, 2, ENC_ASCII);
if (!packet_type) {
/* Identify the packet based on existing fields */
/* Maybe using the options fields is a better idea...*/
@@ -153,7 +153,7 @@ dissect_manolito(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* diss
if (dtype == MANOLITO_STRING) {
guint8 *str;
- str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII);
+ str = tvb_get_string_enc(pinfo->pool, tvb, offset, length, ENC_ASCII);
proto_tree_add_string_format(manolito_tree, hf_manolito_string, tvb, start,
4+length, str, "%s (%s): %s",
field_name_str,
diff --git a/epan/dissectors/packet-mc-nmf.c b/epan/dissectors/packet-mc-nmf.c
index a6ea64094e..a5279f8b93 100644
--- a/epan/dissectors/packet-mc-nmf.c
+++ b/epan/dissectors/packet-mc-nmf.c
@@ -297,7 +297,7 @@ dissect_mc_nmf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
return tvb_reported_length(tvb);
proto_tree_add_uint(rec_tree, hf_mc_nmf_upgrade_length, tvb, offset - len_length, len_length, size);
proto_tree_add_item(rec_tree, hf_mc_nmf_upgrade, tvb, offset, size, ENC_UTF_8|ENC_NA);
- upgrade_protocol = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, size, ENC_UTF_8|ENC_NA);
+ upgrade_protocol = tvb_get_string_enc(pinfo->pool, tvb, offset, size, ENC_UTF_8|ENC_NA);
offset += size;
if (strcmp((char*)upgrade_protocol, "application/negotiate") == 0) {
session_state->negotiate = TRUE;
diff --git a/epan/dissectors/packet-messageanalyzer.c b/epan/dissectors/packet-messageanalyzer.c
index f4637ab932..821f1524a9 100644
--- a/epan/dissectors/packet-messageanalyzer.c
+++ b/epan/dissectors/packet-messageanalyzer.c
@@ -204,7 +204,7 @@ add_ipv4_src_address(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int of
memcpy(&addr, pinfo->net_src.data, 4);
src_host = get_hostname(addr);
- proto_item_append_text(parent_item, ", Src: %s", address_with_resolution_to_str(wmem_packet_scope(), &pinfo->net_src));
+ proto_item_append_text(parent_item, ", Src: %s", address_with_resolution_to_str(pinfo->pool, &pinfo->net_src));
proto_tree_add_ipv4(tree, hf_ip_src, tvb, offset, 4, addr);
item = proto_tree_add_ipv4(tree, hf_ip_addr, tvb, offset, 4, addr);
@@ -234,7 +234,7 @@ add_ipv4_dst_address(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int of
memcpy(&addr, pinfo->net_dst.data, 4);
dst_host = get_hostname(addr);
- proto_item_append_text(parent_item, ", Dst: %s", address_with_resolution_to_str(wmem_packet_scope(), &pinfo->net_dst));
+ proto_item_append_text(parent_item, ", Dst: %s", address_with_resolution_to_str(pinfo->pool, &pinfo->net_dst));
proto_tree_add_ipv4(tree, hf_ip_dst, tvb, offset, 4, addr);
item = proto_tree_add_ipv4(tree, hf_ip_addr, tvb, offset, 4, addr);
@@ -261,7 +261,7 @@ add_ipv6_src_address(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int of
if (tree) {
const char *src_host;
- src_host = address_to_display(wmem_packet_scope(), &pinfo->net_src);
+ src_host = address_to_display(pinfo->pool, &pinfo->net_src);
proto_tree_add_item(tree, hf_ipv6_src, tvb, offset, IPv6_ADDR_SIZE, ENC_NA);
item = proto_tree_add_item(tree, hf_ipv6_addr, tvb, offset, IPv6_ADDR_SIZE, ENC_NA);
@@ -288,7 +288,7 @@ add_ipv6_dst_address(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int of
if (tree) {
const char *dst_host;
- dst_host = address_to_display(wmem_packet_scope(), &pinfo->net_dst);
+ dst_host = address_to_display(pinfo->pool, &pinfo->net_dst);
proto_tree_add_item(tree, hf_ipv6_dst, tvb, offset, IPv6_ADDR_SIZE, ENC_NA);
item = proto_tree_add_item(tree, hf_ipv6_addr, tvb, offset, IPv6_ADDR_SIZE, ENC_NA);
diff --git a/epan/dissectors/packet-mikey.c b/epan/dissectors/packet-mikey.c
index 5518735fe1..df573fc89e 100644
--- a/epan/dissectors/packet-mikey.c
+++ b/epan/dissectors/packet-mikey.c
@@ -897,7 +897,7 @@ dissect_payload_id(mikey_t *mikey _U_, tvbuff_t *tvb, packet_info *pinfo _U_, pr
if (tree) {
proto_item* parent;
const guint8* pos_id;
- proto_tree_add_item_ret_string(tree, hf_mikey[POS_ID], tvb, 4, length, ENC_ASCII|ENC_NA, wmem_packet_scope(), &pos_id);
+ proto_tree_add_item_ret_string(tree, hf_mikey[POS_ID], tvb, 4, length, ENC_ASCII|ENC_NA, pinfo->pool, &pos_id);
parent = proto_tree_get_parent(tree);
proto_item_append_text(parent, " %s: %s", val_to_str_const(type, id_type_vals, "Unknown"), pos_id);
@@ -924,7 +924,7 @@ dissect_payload_idr(mikey_t *mikey _U_, tvbuff_t *tvb, packet_info *pinfo _U_, p
if (tree) {
proto_item *parent;
const guint8* pos_id;
- proto_tree_add_item_ret_string(tree, hf_mikey[POS_ID], tvb, 5, length, ENC_ASCII|ENC_NA, wmem_packet_scope(), &pos_id);
+ proto_tree_add_item_ret_string(tree, hf_mikey[POS_ID], tvb, 5, length, ENC_ASCII|ENC_NA, pinfo->pool, &pos_id);
parent = proto_tree_get_parent(tree);
proto_item_append_text(parent, " %s: %s", val_to_str_const(type, id_type_vals, "Unknown"), pos_id);
diff --git a/epan/dissectors/packet-miop.c b/epan/dissectors/packet-miop.c
index 8675170c7e..50adf6fee4 100644
--- a/epan/dissectors/packet-miop.c
+++ b/epan/dissectors/packet-miop.c
@@ -120,7 +120,7 @@ static int dissect_miop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
guint32 unique_id_len;
- wmem_strbuf_t *flags_strbuf = wmem_strbuf_new_label(wmem_packet_scope());
+ wmem_strbuf_t *flags_strbuf = wmem_strbuf_new_label(pinfo->pool);
wmem_strbuf_append(flags_strbuf, "none");
if (!dissect_miop_heur_check(tvb, pinfo, tree, data))
diff --git a/epan/dissectors/packet-mip6.c b/epan/dissectors/packet-mip6.c
index 5f6f741d66..ef0e328129 100644
--- a/epan/dissectors/packet-mip6.c
+++ b/epan/dissectors/packet-mip6.c
@@ -1998,13 +1998,13 @@ dissect_mip6_opt_vsm_3gpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
break;
/* 11, Mobile Equipment Identity (MEI) */
case 11:
- proto_tree_add_item_ret_display_string(tree, hf_mip6_opt_3gpp_mei, tvb, offset, len, ENC_BCD_DIGITS_0_9, wmem_packet_scope(), &mei_str);
+ proto_tree_add_item_ret_display_string(tree, hf_mip6_opt_3gpp_mei, tvb, offset, len, ENC_BCD_DIGITS_0_9, pinfo->pool, &mei_str);
proto_item_append_text(hdr_item, " %s", mei_str);
break;
/* 12, MSISDN */
case 12:
dissect_e164_cc(tvb, tree, offset, E164_ENC_BCD);
- proto_tree_add_item_ret_display_string(tree, hf_mip6_opt_3gpp_msisdn, tvb, offset, len, ENC_BCD_DIGITS_0_9, wmem_packet_scope(), &digit_str);
+ proto_tree_add_item_ret_display_string(tree, hf_mip6_opt_3gpp_msisdn, tvb, offset, len, ENC_BCD_DIGITS_0_9, pinfo->pool, &digit_str);
proto_item_append_text(hdr_item, " %s", digit_str);
break;
/* 13, Serving Network */
@@ -2022,7 +2022,7 @@ dissect_mip6_opt_vsm_3gpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
break;
/* 16, Unauthenticated IMSI */
case 16:
- proto_tree_add_item_ret_display_string(tree, hf_mip6_opt_3gpp_imsi, tvb, offset, len, ENC_BCD_DIGITS_0_9, wmem_packet_scope(), &imsi_str);
+ proto_tree_add_item_ret_display_string(tree, hf_mip6_opt_3gpp_imsi, tvb, offset, len, ENC_BCD_DIGITS_0_9, pinfo->pool, &imsi_str);
proto_item_append_text(hdr_item," %s", imsi_str);
break;
/* 17, PDN Connection ID */
@@ -2267,7 +2267,7 @@ dissect_mip6_opt_mnid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
offset++;
if (option_len - offset > 0) {
- proto_tree_add_item_ret_string(opt_tree, hf_mip6_mnid_identifier, tvb, offset, option_len - 1, ENC_UTF_8|ENC_NA, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_string(opt_tree, hf_mip6_mnid_identifier, tvb, offset, option_len - 1, ENC_UTF_8|ENC_NA, pinfo->pool, &str);
proto_item_append_text(ti, ": %s", str);
}
@@ -2544,7 +2544,7 @@ dissect_mip6_opt_ssm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
name_len = tvb_get_guint8(tvb, offset);
if (name_len < 0x20) {
- apn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, option_len - 1, ENC_ASCII);
+ apn = tvb_get_string_enc(pinfo->pool, tvb, offset + 1, option_len - 1, ENC_ASCII);
for (;;) {
if (name_len >= option_len - 1)
break;
@@ -2554,7 +2554,7 @@ dissect_mip6_opt_ssm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
}
}
else {
- apn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, option_len, ENC_ASCII);
+ apn = tvb_get_string_enc(pinfo->pool, tvb, offset, option_len, ENC_ASCII);
}
proto_tree_add_string(opt_tree, hf_mip6_opt_ss_identifier, tvb, offset, option_len, apn);
}
@@ -2748,7 +2748,7 @@ dissect_pmip6_opt_ts(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
opt_tree = mip6_fixed_option_header(tree, pinfo, tvb, proto_mip6_option_ts, ett_pmip6_opt_ts, &ti, option_len, PMIP6_TS_LEN);
- proto_tree_add_item_ret_time_string(opt_tree, hf_pmip6_timestamp, tvb, offset, 8, ENC_TIME_MIP6|ENC_BIG_ENDIAN, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_time_string(opt_tree, hf_pmip6_timestamp, tvb, offset, 8, ENC_TIME_MIP6|ENC_BIG_ENDIAN, pinfo->pool, &str);
proto_item_append_text(ti, ": %s", str);
return tvb_captured_length(tvb);
@@ -3557,7 +3557,7 @@ dissect_pmip6_opt_acc_net_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
if(e_bit == 0x80){
const guint8* name;
- proto_tree_add_item_ret_string(subopt_tree, hf_mip6_opt_acc_net_id_sub_opt_net_name, tvb, offset, net_name_len, ENC_BIG_ENDIAN|ENC_UTF_8, wmem_packet_scope(), &name);
+ proto_tree_add_item_ret_string(subopt_tree, hf_mip6_opt_acc_net_id_sub_opt_net_name, tvb, offset, net_name_len, ENC_BIG_ENDIAN|ENC_UTF_8, pinfo->pool, &name);
proto_item_append_text(ti, " Network Name: %s", name);
}else{
proto_tree_add_item(subopt_tree, hf_mip6_opt_acc_net_id_sub_opt_net_name_data, tvb, offset, net_name_len, ENC_BIG_ENDIAN|ENC_UTF_8);
@@ -3568,7 +3568,7 @@ dissect_pmip6_opt_acc_net_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
proto_tree_add_item(subopt_tree, hf_mip6_opt_acc_net_id_sub_opt_ap_name_len, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
- proto_tree_add_item_ret_string(subopt_tree, hf_mip6_opt_acc_net_id_sub_opt_ap_name, tvb, offset, ap_name_len, ENC_BIG_ENDIAN|ENC_UTF_8, wmem_packet_scope(), &ap_name);
+ proto_tree_add_item_ret_string(subopt_tree, hf_mip6_opt_acc_net_id_sub_opt_ap_name, tvb, offset, ap_name_len, ENC_BIG_ENDIAN|ENC_UTF_8, pinfo->pool, &ap_name);
proto_item_append_text(ti, " AP Name: %s", ap_name);
offset = offset+ap_name_len;
@@ -3715,7 +3715,7 @@ dissect_mipv6_options(tvbuff_t *tvb, int offset, guint length,
} else {
option_dissector = dissector_get_uint_handle(mip6_option_table, 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);
}
diff --git a/epan/dissectors/packet-mle.c b/epan/dissectors/packet-mle.c
index a2bed71445..714b08cbba 100644
--- a/epan/dissectors/packet-mle.c
+++ b/epan/dissectors/packet-mle.c
@@ -559,7 +559,7 @@ dissect_mle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
}
original_packet = (ieee802154_packet *)ieee_hints->packet;
- packet = wmem_new0(wmem_packet_scope(), ieee802154_packet);
+ packet = wmem_new0(pinfo->pool, ieee802154_packet);
/* Copy IEEE 802.15.4 Source Address */
packet->src_addr_mode = original_packet->src_addr_mode;
@@ -782,13 +782,13 @@ dissect_mle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
case MLE_TLV_CHALLENGE:
proto_tree_add_item(tlv_tree, hf_mle_tlv_challenge, payload_tvb, offset, tlv_len, ENC_NA);
- proto_item_append_text(ti, " = %s)", tvb_bytes_to_str(wmem_packet_scope(), payload_tvb, offset, tlv_len));
+ proto_item_append_text(ti, " = %s)", tvb_bytes_to_str(pinfo->pool, payload_tvb, offset, tlv_len));
offset += tlv_len;
break;
case MLE_TLV_RESPONSE:
proto_tree_add_item(tlv_tree, hf_mle_tlv_response, payload_tvb, offset, tlv_len, ENC_NA);
- proto_item_append_text(ti, " = %s)", tvb_bytes_to_str(wmem_packet_scope(), payload_tvb, offset, tlv_len));
+ proto_item_append_text(ti, " = %s)", tvb_bytes_to_str(pinfo->pool, payload_tvb, offset, tlv_len));
offset += tlv_len;
break;
diff --git a/epan/dissectors/packet-mongo.c b/epan/dissectors/packet-mongo.c
index 44cfde8973..2f0747bc49 100644
--- a/epan/dissectors/packet-mongo.c
+++ b/epan/dissectors/packet-mongo.c
@@ -362,7 +362,7 @@ dissect_bson_document(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre
gint doc_len = -1; /* Document length */
e_type = tvb_get_guint8(tvb, offset);
- tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset+1, &str_len, ENC_ASCII);
+ tvb_get_stringz_enc(pinfo->pool, tvb, offset+1, &str_len, ENC_ASCII);
element = proto_tree_add_item(elements_tree, hf_mongo_element_name, tvb, offset+1, str_len-1, ENC_UTF_8|ENC_NA);
element_sub_tree = proto_item_add_subtree(element, ett_mongo_element);
@@ -420,11 +420,11 @@ dissect_bson_document(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre
break;
case BSON_ELEMENT_TYPE_REGEX:
/* regex pattern */
- tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &str_len, ENC_ASCII);
+ tvb_get_stringz_enc(pinfo->pool, tvb, offset, &str_len, ENC_ASCII);
proto_tree_add_item(element_sub_tree, hf_mongo_element_value_regex_pattern, tvb, offset, str_len, ENC_UTF_8|ENC_NA);
offset += str_len;
/* regex options */
- tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &str_len, ENC_ASCII);
+ tvb_get_stringz_enc(pinfo->pool, tvb, offset, &str_len, ENC_ASCII);
proto_tree_add_item(element_sub_tree, hf_mongo_element_value_regex_options, tvb, offset, str_len, ENC_UTF_8|ENC_NA);
offset += str_len;
break;
diff --git a/epan/dissectors/packet-mount.c b/epan/dissectors/packet-mount.c
index ad9de7cacf..537d0beba6 100644
--- a/epan/dissectors/packet-mount.c
+++ b/epan/dissectors/packet-mount.c
@@ -154,12 +154,12 @@ dissect_mount_dirpath_call(tvbuff_t *tvb, packet_info *pinfo,
gchar *name, *ptr;
int addr_len, name_len;
- name = address_to_str(wmem_packet_scope(), &pinfo->dst);
+ name = address_to_str(pinfo->pool, &pinfo->dst);
addr_len = (int)strlen(name);
/* IP address, colon, path, terminating 0 */
name_len = addr_len + 1 + len_field + 1;
- name = (gchar *)wmem_realloc(wmem_packet_scope(),
+ name = (gchar *)wmem_realloc(pinfo->pool,
(void *)name, name_len);
ptr = name + addr_len;
*ptr++ = ':';
@@ -276,7 +276,7 @@ dissect_exportlist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
groups_item = proto_tree_add_item(exportlist_tree, hf_mount_groups, tvb, offset, -1, ENC_NA);
groups_tree = proto_item_add_subtree(groups_item, ett_mount_groups);
- group_name_list_strbuf = wmem_strbuf_new(wmem_packet_scope(), "");
+ group_name_list_strbuf = wmem_strbuf_new(pinfo->pool, "");
offset = dissect_rpc_list(tvb, pinfo, groups_tree, offset,
dissect_group, (void *)group_name_list_strbuf);
if (groups_item) {
@@ -295,8 +295,8 @@ dissect_exportlist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
/* now we have a nicer string */
proto_item_set_text(exportlist_item,
"Export List Entry: %s -> %s",
- format_text(wmem_packet_scope(), directory, strlen(directory)),
- format_text(wmem_packet_scope(), group_name_list, strlen(group_name_list)));
+ format_text(pinfo->pool, directory, strlen(directory)),
+ format_text(pinfo->pool, group_name_list, strlen(group_name_list)));
/* now we know, that exportlist is shorter */
proto_item_set_len(exportlist_item, offset - old_offset);
}
diff --git a/epan/dissectors/packet-mpeg-dsmcc.c b/epan/dissectors/packet-mpeg-dsmcc.c
index aed04170ee..3b6651d3b7 100644
--- a/epan/dissectors/packet-mpeg-dsmcc.c
+++ b/epan/dissectors/packet-mpeg-dsmcc.c
@@ -977,7 +977,7 @@ dissect_dsmcc_un_session_id(
offset_start = offset;
sub_sub_tree = proto_tree_add_subtree(sub_tree, tvb, offset, 10, ett_dsmcc_heading, NULL, "Session ID");
- proto_item_set_text(sub_sub_tree, "Session ID: 0x%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 10));
+ proto_item_set_text(sub_sub_tree, "Session ID: 0x%s", tvb_bytes_to_str(pinfo->pool, tvb, offset, 10));
proto_tree_add_item(sub_sub_tree, hf_dsmcc_un_sess_session_id_device_id, tvb, offset, 6, ENC_NA);
offset += 6;
proto_tree_add_item(sub_sub_tree, hf_dsmcc_un_sess_session_id_session_number, tvb, offset, 4, ENC_BIG_ENDIAN);
diff --git a/epan/dissectors/packet-mq-pcf.c b/epan/dissectors/packet-mq-pcf.c
index 1800e7913c..346e31fc0e 100644
--- a/epan/dissectors/packet-mq-pcf.c
+++ b/epan/dissectors/packet-mq-pcf.c
@@ -291,12 +291,12 @@ guint32 dissect_mqpcf_parm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mq_tre
uCCS = tvb_get_guint32(tvb, offset + uLenF, bLittleEndian);
uSLn = tvb_get_guint32(tvb, offset + uLenF + 4, bLittleEndian);
- sStr = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + uLenF + 8,
+ sStr = tvb_get_string_enc(pinfo->pool, tvb, offset + uLenF + 8,
uSLn, IS_EBCDIC(uCCS) ? ENC_EBCDIC : ENC_ASCII);
if (*sStr)
strip_trailing_blanks(sStr, uSLn);
if (*sStr)
- sStr = (guint8*)format_text_chr(wmem_packet_scope(), sStr, strlen((const char *)sStr), '.');
+ sStr = (guint8*)format_text_chr(pinfo->pool, sStr, strlen((const char *)sStr), '.');
tree = proto_tree_add_subtree_format(mq_tree, tvb, offset, uLen, ett_mqpcf_prm, NULL, "%s: %s", strPrm, sStr);
@@ -364,12 +364,12 @@ guint32 dissect_mqpcf_parm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mq_tre
offset += uLenF + 12;
for (u2 = 0; u2 < uCnt && u2 < mq_pcf_maxlst; u2++)
{
- sStr = tvb_get_string_enc(wmem_packet_scope(), tvb, offset,
+ sStr = tvb_get_string_enc(pinfo->pool, tvb, offset,
uSLn, IS_EBCDIC(uCCS) ? ENC_EBCDIC : ENC_ASCII);
if (*sStr)
strip_trailing_blanks(sStr, uSLn);
if (*sStr)
- sStr = (guint8*)format_text_chr(wmem_packet_scope(), sStr, strlen((const char *)sStr), '.');
+ sStr = (guint8*)format_text_chr(pinfo->pool, sStr, strlen((const char *)sStr), '.');
proto_tree_add_string_format(tree, hf_mq_pcf_stringlist, tvb, offset, uSLn, (const char *)sStr,
"%s[%*d]: %s", hfinfo->name, uDigit, u2 + 1, sStr);
@@ -411,8 +411,8 @@ guint32 dissect_mqpcf_parm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mq_tre
uSLn = tvb_get_guint32(tvb, offset + uLenF, bLittleEndian);
if (uSLn)
{
- guint8 *sStrA = (guint8 *)format_text_chr(wmem_packet_scope(), tvb_get_string_enc(wmem_packet_scope(), tvb, offset + uLenF + 4, uSLn, ENC_ASCII), uSLn, '.');
- guint8 *sStrE = (guint8 *)format_text_chr(wmem_packet_scope(), tvb_get_string_enc(wmem_packet_scope(), tvb, offset + uLenF + 4, uSLn, ENC_EBCDIC), uSLn, '.');
+ guint8 *sStrA = (guint8 *)format_text_chr(pinfo->pool, tvb_get_string_enc(pinfo->pool, tvb, offset + uLenF + 4, uSLn, ENC_ASCII), uSLn, '.');
+ guint8 *sStrE = (guint8 *)format_text_chr(pinfo->pool, tvb_get_string_enc(pinfo->pool, tvb, offset + uLenF + 4, uSLn, ENC_EBCDIC), uSLn, '.');
if (uSLn > 35)
{
tree = proto_tree_add_subtree_format(mq_tree, tvb, offset, uLen, ett_mqpcf_prm, NULL,
@@ -467,8 +467,8 @@ guint32 dissect_mqpcf_parm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mq_tre
uOpe = tvb_get_guint32(tvb, offset + uLenF, bLittleEndian);
uCCS = tvb_get_guint32(tvb, offset + uLenF + 4, bLittleEndian);
uSLn = tvb_get_guint32(tvb, offset + uLenF + 8, bLittleEndian);
- sStr = (guint8 *)format_text_chr(wmem_packet_scope(),
- tvb_get_string_enc(wmem_packet_scope(), tvb, offset + uLenF + 12, uSLn, IS_EBCDIC(uCCS) ? ENC_EBCDIC : ENC_ASCII),
+ sStr = (guint8 *)format_text_chr(pinfo->pool,
+ tvb_get_string_enc(pinfo->pool, tvb, offset + uLenF + 12, uSLn, IS_EBCDIC(uCCS) ? ENC_EBCDIC : ENC_ASCII),
uSLn, '.');
strip_trailing_blanks(sStr, uSLn);
@@ -492,8 +492,8 @@ guint32 dissect_mqpcf_parm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mq_tre
uSLn = tvb_get_guint32(tvb, offset + uLenF + 4, bLittleEndian);
if (uSLn)
{
- guint8 *sStrA = (guint8 *)format_text_chr(wmem_packet_scope(), tvb_get_string_enc(wmem_packet_scope(), tvb, offset + uLenF + 8, uSLn, ENC_ASCII), uSLn, '.');
- guint8 *sStrE = (guint8 *)format_text_chr(wmem_packet_scope(), tvb_get_string_enc(wmem_packet_scope(), tvb, offset + uLenF + 8, uSLn, ENC_EBCDIC), uSLn, '.');
+ guint8 *sStrA = (guint8 *)format_text_chr(pinfo->pool, tvb_get_string_enc(pinfo->pool, tvb, offset + uLenF + 8, uSLn, ENC_ASCII), uSLn, '.');
+ guint8 *sStrE = (guint8 *)format_text_chr(pinfo->pool, tvb_get_string_enc(pinfo->pool, tvb, offset + uLenF + 8, uSLn, ENC_EBCDIC), uSLn, '.');
tree = proto_tree_add_subtree_format(mq_tree, tvb, offset, uLen, ett_mqpcf_prm, NULL, "%s: %s A(%s) E(%s)",
strPrm, val_to_str(uOpe, GET_VALSV(FilterOP), " Unknown (0x%02x)") + 7, sStrA, sStrE);
}
diff --git a/epan/dissectors/packet-mrcpv2.c b/epan/dissectors/packet-mrcpv2.c
index 540a350d85..dc0e518525 100644
--- a/epan/dissectors/packet-mrcpv2.c
+++ b/epan/dissectors/packet-mrcpv2.c
@@ -457,35 +457,35 @@ dissect_mrcpv2_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
sp_end = tvb_find_guint8(tvb, 0, linelen, ' ');
if ((sp_end == -1) || (sp_end > tvb_len) || (sp_end > linelen))
return -1;
- field1 = tvb_get_string_enc(wmem_packet_scope(), tvb, 0, sp_end, ENC_ASCII);
+ field1 = tvb_get_string_enc(pinfo->pool, tvb, 0, sp_end, ENC_ASCII);
sp_start = sp_end + 1;
/* length */
sp_end = tvb_find_guint8(tvb, sp_start, linelen - sp_start, ' ');
if ((sp_end == -1) || (sp_end > tvb_len) || (sp_end > linelen))
return -1;
- field2 = tvb_get_string_enc(wmem_packet_scope(), tvb, sp_start, sp_end - sp_start, ENC_ASCII);
+ field2 = tvb_get_string_enc(pinfo->pool, tvb, sp_start, sp_end - sp_start, ENC_ASCII);
sp_start = sp_end + 1;
/* method, request ID or event */
sp_end = tvb_find_guint8(tvb, sp_start, linelen - sp_start, ' ');
if ((sp_end == -1) || (sp_end > tvb_len) || (sp_end > linelen))
return -1;
- field3 = tvb_get_string_enc(wmem_packet_scope(), tvb, sp_start, sp_end - sp_start, ENC_ASCII);
+ field3 = tvb_get_string_enc(pinfo->pool, tvb, sp_start, sp_end - sp_start, ENC_ASCII);
sp_start = sp_end + 1;
/* request ID or status code */
sp_end = tvb_find_guint8(tvb, sp_start, linelen - sp_start, ' ');
if (sp_end == -1)
{
- field4 = tvb_get_string_enc(wmem_packet_scope(), tvb, sp_start, linelen - sp_start, ENC_ASCII);
+ field4 = tvb_get_string_enc(pinfo->pool, tvb, sp_start, linelen - sp_start, ENC_ASCII);
line_type = REQUEST_LINE; /* only request line has 4 parameters */
}
else
{
if ((sp_end > tvb_len) || (sp_end > linelen))
return -1;
- field4 = tvb_get_string_enc(wmem_packet_scope(), tvb, sp_start, sp_end - sp_start, ENC_ASCII);
+ field4 = tvb_get_string_enc(pinfo->pool, tvb, sp_start, sp_end - sp_start, ENC_ASCII);
if (g_ascii_isdigit(field3[0])) /* request ID is number, so it has to be response */
line_type = RESPONSE_LINE;
@@ -496,7 +496,7 @@ dissect_mrcpv2_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
sp_end = linelen;
if ((sp_end > tvb_len) || (sp_end > linelen))
return -1;
- field5 = tvb_get_string_enc(wmem_packet_scope(), tvb, sp_start, sp_end - sp_start, ENC_ASCII);
+ field5 = tvb_get_string_enc(pinfo->pool, tvb, sp_start, sp_end - sp_start, ENC_ASCII);
}
/* check pdu size */
@@ -624,10 +624,10 @@ dissect_mrcpv2_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(mrcpv2_tree, hf_mrcpv2_Unknown_Header, tvb, offset, linelen, ENC_UTF_8|ENC_NA);
continue;
}
- header_name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, colon_offset - offset, ENC_ASCII);
+ header_name = tvb_get_string_enc(pinfo->pool, tvb, offset, colon_offset - offset, ENC_ASCII);
ascii_strdown_inplace(header_name);
value_offset = tvb_skip_wsp(tvb, colon_offset + 1, offset + linelen - (colon_offset + 1));
- header_value = tvb_get_string_enc(wmem_packet_scope(), tvb, value_offset, offset + linelen - value_offset, ENC_ASCII);
+ header_value = tvb_get_string_enc(pinfo->pool, tvb, value_offset, offset + linelen - value_offset, ENC_ASCII);
/* find out header type */
header_type = UNKNOWN;
@@ -965,9 +965,9 @@ get_mrcpv2_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data
/* second string is message length */
len_end = tvb_find_guint8(tvb, len_start, MRCPV2_MIN_PDU_LEN - len_start, ' ');
if (len_end == -1)
- msg_len = tvb_get_string_enc(wmem_packet_scope(), tvb, len_start, MRCPV2_MIN_PDU_LEN - len_start, ENC_ASCII);
+ msg_len = tvb_get_string_enc(pinfo->pool, tvb, len_start, MRCPV2_MIN_PDU_LEN - len_start, ENC_ASCII);
else
- msg_len = tvb_get_string_enc(wmem_packet_scope(), tvb, len_start, len_end - len_start, ENC_ASCII);
+ msg_len = tvb_get_string_enc(pinfo->pool, tvb, len_start, len_end - len_start, ENC_ASCII);
ws_strtou32(msg_len, NULL, &num_msg_len);
return num_msg_len;
@@ -1000,7 +1000,7 @@ dissect_mrcpv2_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
slash_offset = tvb_find_guint8(tvb, 0, MRCPV2_MIN_LENGTH, '/');
if (slash_offset != 4)
return 0;
- version = tvb_get_string_enc(wmem_packet_scope(), tvb, 0, slash_offset, ENC_ASCII);
+ version = tvb_get_string_enc(pinfo->pool, tvb, 0, slash_offset, ENC_ASCII);
if (strcmp(version, "MRCP") != 0)
return 0;
@@ -1011,7 +1011,7 @@ dissect_mrcpv2_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
value_size = dot_offset - slash_offset - 1;
if ((value_size != 1) && (value_size != 2))
return 0;
- major = tvb_get_string_enc(wmem_packet_scope(), tvb, slash_offset + 1, value_size, ENC_ASCII);
+ major = tvb_get_string_enc(pinfo->pool, tvb, slash_offset + 1, value_size, ENC_ASCII);
if (!ws_strtou32(major, NULL, &value) || value != 2)
return 0;
@@ -1019,12 +1019,12 @@ dissect_mrcpv2_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
sp_offset = tvb_find_guint8(tvb, dot_offset + 1, MRCPV2_MIN_LENGTH - dot_offset - 1, ' ');
if (sp_offset == -1)
{
- minor = tvb_get_string_enc(wmem_packet_scope(), tvb, dot_offset + 1, MRCPV2_MIN_LENGTH - dot_offset - 1, ENC_ASCII);
+ minor = tvb_get_string_enc(pinfo->pool, tvb, dot_offset + 1, MRCPV2_MIN_LENGTH - dot_offset - 1, ENC_ASCII);
len = MRCPV2_MIN_LENGTH;
}
else
{
- minor = tvb_get_string_enc(wmem_packet_scope(), tvb, dot_offset + 1, MRCPV2_MIN_LENGTH - sp_offset - 1, ENC_ASCII);
+ minor = tvb_get_string_enc(pinfo->pool, tvb, dot_offset + 1, MRCPV2_MIN_LENGTH - sp_offset - 1, ENC_ASCII);
len = sp_offset;
}
if (!ws_strtou32(minor, NULL, &value) || value != 0)
diff --git a/epan/dissectors/packet-ms-mms.c b/epan/dissectors/packet-ms-mms.c
index f4dbcd0ffb..0f478c308f 100644
--- a/epan/dissectors/packet-ms-mms.c
+++ b/epan/dissectors/packet-ms-mms.c
@@ -417,7 +417,7 @@ static gint dissect_msmms_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree
offset += 4;
/* Protocol name. Must be "MMS"... */
- if (strncmp((char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 3, ENC_ASCII), "MMS", 3) != 0)
+ if (strncmp((char*)tvb_get_string_enc(pinfo->pool, tvb, offset, 3, ENC_ASCII), "MMS", 3) != 0)
{
return offset;
}
@@ -733,14 +733,14 @@ static void dissect_client_transport_info(tvbuff_t *tvb, packet_info *pinfo, pro
offset += 4;
/* Extract and show the string in tree and info column */
- transport_info = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length_remaining - 20, ENC_UTF_16|ENC_LITTLE_ENDIAN);
+ transport_info = tvb_get_string_enc(pinfo->pool, tvb, offset, length_remaining - 20, ENC_UTF_16|ENC_LITTLE_ENDIAN);
proto_tree_add_string_format(tree, hf_msmms_command_client_transport_info, tvb,
offset, length_remaining-20,
transport_info, "Transport: (%s)", transport_info);
col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
- format_text(wmem_packet_scope(), (guchar*)transport_info, length_remaining - 20));
+ format_text(pinfo->pool, (guchar*)transport_info, length_remaining - 20));
/* Try to extract details from this string */
@@ -834,10 +834,10 @@ static void dissect_server_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
/* Server version string */
proto_tree_add_item_ret_string(tree, hf_msmms_command_server_version, tvb,
offset, server_version_length*2,
- ENC_UTF_16|ENC_LITTLE_ENDIAN, wmem_packet_scope(), &server_version);
+ ENC_UTF_16|ENC_LITTLE_ENDIAN, pinfo->pool, &server_version);
col_append_fstr(pinfo->cinfo, COL_INFO, " (version='%s')",
- format_text(wmem_packet_scope(), (const guchar*)server_version, strlen(server_version)));
+ format_text(pinfo->pool, (const guchar*)server_version, strlen(server_version)));
}
offset += (server_version_length*2);
@@ -888,10 +888,10 @@ static void dissect_client_player_info(tvbuff_t *tvb, packet_info *pinfo, proto_
/* Extract and show the string in tree and info column */
proto_tree_add_item_ret_string(tree, hf_msmms_command_client_player_info, tvb,
offset, length_remaining-12,
- ENC_UTF_16|ENC_LITTLE_ENDIAN, wmem_packet_scope(), &player_info);
+ ENC_UTF_16|ENC_LITTLE_ENDIAN, pinfo->pool, &player_info);
col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
- format_text(wmem_packet_scope(), (const guchar*)player_info, strlen(player_info)));
+ format_text(pinfo->pool, (const guchar*)player_info, strlen(player_info)));
}
/* Dissect info about where client wants to start playing from */
@@ -963,10 +963,10 @@ static void dissect_request_server_file(tvbuff_t *tvb, packet_info *pinfo, proto
/* File path on server */
proto_tree_add_item_ret_string(tree, hf_msmms_command_server_file, tvb,
offset, length_remaining-16,
- ENC_UTF_16|ENC_LITTLE_ENDIAN, wmem_packet_scope(), &server_file);
+ ENC_UTF_16|ENC_LITTLE_ENDIAN, pinfo->pool, &server_file);
col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
- format_text(wmem_packet_scope(), (const guchar*)server_file, strlen(server_file)));
+ format_text(pinfo->pool, (const guchar*)server_file, strlen(server_file)));
}
/* Dissect media details from server */
diff --git a/epan/dissectors/packet-msn-messenger.c b/epan/dissectors/packet-msn-messenger.c
index f7f78d88dc..b7f0384190 100644
--- a/epan/dissectors/packet-msn-messenger.c
+++ b/epan/dissectors/packet-msn-messenger.c
@@ -76,7 +76,7 @@ dissect_msnms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
* Put the first line from the buffer into the summary.
*/
col_add_str(pinfo->cinfo, COL_INFO,
- format_text(wmem_packet_scope(), line, linelen));
+ format_text(pinfo->pool, line, linelen));
if (tree) {
ti = proto_tree_add_item(tree, proto_msnms, tvb, offset, -1,
diff --git a/epan/dissectors/packet-msrp.c b/epan/dissectors/packet-msrp.c
index 8b067ed30f..5714baa2ba 100644
--- a/epan/dissectors/packet-msrp.c
+++ b/epan/dissectors/packet-msrp.c
@@ -554,7 +554,7 @@ dissect_msrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
reqresp_tree = proto_item_add_subtree(th, ett_msrp_reqresp);
proto_tree_add_item(reqresp_tree,hf_msrp_transactionID,tvb,token_2_start,token_2_len,ENC_UTF_8|ENC_NA);
msrp_status_code_valid = ws_strtou32(
- tvb_get_string_enc(wmem_packet_scope(), tvb, token_3_start, token_3_len, ENC_UTF_8|ENC_NA),
+ tvb_get_string_enc(pinfo->pool, tvb, token_3_start, token_3_len, ENC_UTF_8|ENC_NA),
NULL, & msrp_status_code);
pi = proto_tree_add_uint(reqresp_tree,hf_msrp_status_code,tvb,token_3_start,token_3_len,msrp_status_code);
if (!msrp_status_code_valid)
@@ -621,7 +621,7 @@ dissect_msrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
* Fetch the value.
*/
value_len = line_end_offset - value_offset;
- value = tvb_get_string_enc(wmem_packet_scope(), tvb, value_offset,
+ value = tvb_get_string_enc(pinfo->pool, tvb, value_offset,
value_len, ENC_UTF_8|ENC_NA);
/*
@@ -650,11 +650,11 @@ dissect_msrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
parameter_offset++;
content_type_len = semi_colon_offset - value_offset;
content_type_parameter_str_len = line_end_offset - parameter_offset;
- message_info.media_str = tvb_get_string_enc(wmem_packet_scope(), tvb,
+ message_info.media_str = tvb_get_string_enc(pinfo->pool, tvb,
parameter_offset, content_type_parameter_str_len, ENC_UTF_8|ENC_NA);
}
media_type_str_lower_case = ascii_strdown_inplace(
- (gchar *)tvb_get_string_enc(wmem_packet_scope(), tvb, value_offset, content_type_len, ENC_UTF_8|ENC_NA));
+ (gchar *)tvb_get_string_enc(pinfo->pool, tvb, value_offset, content_type_len, ENC_UTF_8|ENC_NA));
break;
default:
diff --git a/epan/dissectors/packet-mux27010.c b/epan/dissectors/packet-mux27010.c
index ad0236ec9a..bea9d1f4dd 100644
--- a/epan/dissectors/packet-mux27010.c
+++ b/epan/dissectors/packet-mux27010.c
@@ -729,7 +729,7 @@ getFrameInformation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *field_tree,
int offset, guint32 length_info){
/*Get the data from information field as string*/
- char *information_field = tvb_get_string_enc(wmem_packet_scope(), tvb,offset,length_info, ENC_ASCII);
+ char *information_field = tvb_get_string_enc(pinfo->pool, tvb,offset,length_info, ENC_ASCII);
/*delete unneeded signs out of info field -> for info column: CR (0x0d) and LF (0x0a)*/
information_field = g_strdelimit(information_field, "\r\n", ' ');
diff --git a/epan/dissectors/packet-mysql.c b/epan/dissectors/packet-mysql.c
index fa3fdaf300..8e29e7e1c0 100644
--- a/epan/dissectors/packet-mysql.c
+++ b/epan/dissectors/packet-mysql.c
@@ -1509,7 +1509,7 @@ add_connattrs_entry_to_tree(tvbuff_t *tvb, packet_info *pinfo _U_, proto_item *t
proto_tree_add_uint64(connattrs_tree, hf_mysql_connattrs_name_length, tvb, offset, lenfle, lenstr);
offset += lenfle;
- proto_tree_add_item_ret_string(connattrs_tree, hf_mysql_connattrs_name, tvb, offset, (gint)lenstr, ENC_ASCII|ENC_NA, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_string(connattrs_tree, hf_mysql_connattrs_name, tvb, offset, (gint)lenstr, ENC_ASCII|ENC_NA, pinfo->pool, &str);
proto_item_append_text(ti, " - %s", str);
offset += (int)lenstr;
@@ -1517,7 +1517,7 @@ add_connattrs_entry_to_tree(tvbuff_t *tvb, packet_info *pinfo _U_, proto_item *t
proto_tree_add_uint64(connattrs_tree, hf_mysql_connattrs_value_length, tvb, offset, lenfle, lenstr);
offset += lenfle;
- proto_tree_add_item_ret_string(connattrs_tree, hf_mysql_connattrs_value, tvb, offset, (gint)lenstr, ENC_ASCII|ENC_NA, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_string(connattrs_tree, hf_mysql_connattrs_value, tvb, offset, (gint)lenstr, ENC_ASCII|ENC_NA, pinfo->pool, &str);
proto_item_append_text(ti, ": %s", str);
offset += (int)lenstr;
diff --git a/epan/dissectors/packet-nas_5gs.c b/epan/dissectors/packet-nas_5gs.c
index f0305d5cf3..80d6f0e4bf 100644
--- a/epan/dissectors/packet-nas_5gs.c
+++ b/epan/dissectors/packet-nas_5gs.c
@@ -2018,7 +2018,7 @@ de_nas_5gs_mm_ciphering_key_data(tvbuff_t* tvb, proto_tree* tree, packet_info* p
tv.secs = mktime(&tm);
tv.nsecs = 0;
proto_tree_add_time_format_value(sub_tree, hf_nas_5gs_mm_ciph_key_data_validity_start_time, tvb, curr_offset, 5, &tv,
- "%s", abs_time_to_str(wmem_packet_scope(), &tv, ABSOLUTE_TIME_LOCAL, FALSE));
+ "%s", abs_time_to_str(pinfo->pool, &tv, ABSOLUTE_TIME_LOCAL, FALSE));
curr_offset += 5;
proto_tree_add_item(sub_tree, hf_nas_5gs_mm_ciph_key_data_validity_duration, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset += 2;
@@ -8814,11 +8814,11 @@ dissect_nas_5gs_media_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (!json_tvb || !message_info || !message_info->content_id)
return 0;
- json_data = tvb_get_string_enc(wmem_packet_scope(), json_tvb, 0, tvb_reported_length(json_tvb), ENC_UTF_8|ENC_NA);
+ json_data = tvb_get_string_enc(pinfo->pool, json_tvb, 0, tvb_reported_length(json_tvb), ENC_UTF_8|ENC_NA);
ret = json_parse(json_data, NULL, 0);
if (ret <= 0)
return 0;
- tokens = wmem_alloc_array(wmem_packet_scope(), jsmntok_t, ret);
+ tokens = wmem_alloc_array(pinfo->pool, jsmntok_t, ret);
if (json_parse(json_data, tokens, ret) <= 0)
return 0;
cur_tok = json_get_object(json_data, tokens, "n1MessageContainer");
diff --git a/epan/dissectors/packet-nas_eps.c b/epan/dissectors/packet-nas_eps.c
index 8003ac5cb9..19b318ca3d 100644
--- a/epan/dissectors/packet-nas_eps.c
+++ b/epan/dissectors/packet-nas_eps.c
@@ -2832,7 +2832,7 @@ de_emm_ciph_key_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint3
tv.secs = mktime(&tm);
tv.nsecs = 0;
proto_tree_add_time_format_value(sub_tree, hf_nas_eps_emm_ciph_key_data_validity_start_time, tvb, curr_offset, 5, &tv,
- "%s", abs_time_to_str(wmem_packet_scope(), &tv, ABSOLUTE_TIME_LOCAL, FALSE));
+ "%s", abs_time_to_str(pinfo->pool, &tv, ABSOLUTE_TIME_LOCAL, FALSE));
curr_offset += 5;
proto_tree_add_item(sub_tree, hf_nas_eps_emm_ciph_key_data_validity_duration, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
curr_offset += 2;
diff --git a/epan/dissectors/packet-nbd.c b/epan/dissectors/packet-nbd.c
index 0884d5973c..0f78149ba4 100644
--- a/epan/dissectors/packet-nbd.c
+++ b/epan/dissectors/packet-nbd.c
@@ -266,7 +266,7 @@ dissect_nbd_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
if(!nbd_trans){
/* create a "fake" nbd_trans structure */
- nbd_trans=wmem_new(wmem_packet_scope(), nbd_transaction_t);
+ nbd_trans=wmem_new(pinfo->pool, nbd_transaction_t);
nbd_trans->req_frame=0;
nbd_trans->rep_frame=0;
nbd_trans->req_time=pinfo->abs_ts;
diff --git a/epan/dissectors/packet-netanalyzer.c b/epan/dissectors/packet-netanalyzer.c
index abfcb1a4c8..3447809efb 100644
--- a/epan/dissectors/packet-netanalyzer.c
+++ b/epan/dissectors/packet-netanalyzer.c
@@ -237,7 +237,7 @@ dissect_netanalyzer_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_bitmask(netanalyzer_header_tree, tvb, 0, hf_netanalyzer_status, ett_netanalyzer_status, hfx_netanalyzer_status, ENC_LITTLE_ENDIAN);
- strbuf = wmem_strbuf_new_label(wmem_packet_scope());
+ strbuf = wmem_strbuf_new_label(pinfo->pool);
for (idx = 0; idx < 8; idx++)
{
if (packet_status & (1 << idx))
diff --git a/epan/dissectors/packet-netmon.c b/epan/dissectors/packet-netmon.c
index 51f14c6158..106c170437 100644
--- a/epan/dissectors/packet-netmon.c
+++ b/epan/dissectors/packet-netmon.c
@@ -418,7 +418,7 @@ dissect_netmon_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
*/
/* Ensure string termination */
- comment = wmem_strndup(wmem_packet_scope(), pinfo->pseudo_header->netmon.description, pinfo->pseudo_header->netmon.descLength);
+ comment = wmem_strndup(pinfo->pool, pinfo->pseudo_header->netmon.description, pinfo->pseudo_header->netmon.descLength);
ti = proto_tree_add_string(header_tree, hf_netmon_header_description_comment, tvb, 0, 0, comment);
proto_item_set_generated(ti);
@@ -517,7 +517,7 @@ dissect_netmon_event(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
offset += 16;
col_add_fstr(pinfo->cinfo, COL_INFO, "Thread ID: %d, Process ID: %d, Provider ID: %s",
- thread_id, process_id, guid_to_str(wmem_packet_scope(), &provider_guid.guid));
+ thread_id, process_id, guid_to_str(pinfo->pool, &provider_guid.guid));
event_desc_tree = proto_tree_add_subtree(event_tree, tvb, offset, 16, ett_netmon_event_desc, NULL, "Event Descriptor");
proto_tree_add_item_ret_uint(event_desc_tree, hf_netmon_event_event_desc_id, tvb, offset, 2, ENC_LITTLE_ENDIAN, &provider_id_data.event_id);
@@ -627,7 +627,7 @@ dissect_netmon_filter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
offset += length;
length = tvb_unicode_strsize(tvb, offset);
proto_tree_add_item_ret_string(filter_tree, hf_netmon_filter_filter, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16,
- wmem_packet_scope(), &filter);
+ pinfo->pool, &filter);
col_add_fstr(pinfo->cinfo, COL_INFO, "Filter: %s", filter);
return tvb_captured_length(tvb);
@@ -949,7 +949,7 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 4;
proto_tree_add_item(system_tree, hf_netmon_system_config_scsi_lun, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_manufacturer, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_manufacturer, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += 512;
proto_tree_add_item(system_tree, hf_netmon_system_config_partition_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
@@ -957,7 +957,7 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 1;
proto_tree_add_item(system_tree, hf_netmon_system_config_pad, tvb, offset, 1, ENC_NA);
offset += 1;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_boot_drive_letter, tvb, offset, 6, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field2);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_boot_drive_letter, tvb, offset, 6, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field2);
offset += 6;
proto_tree_add_item(system_tree, hf_netmon_system_config_spare, tvb, offset, 4, ENC_LITTLE_ENDIAN|ENC_UTF_16);
offset += 4;
@@ -975,7 +975,7 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 4;
proto_tree_add_item(system_tree, hf_netmon_system_config_drive_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_drive_letter, tvb, offset, 8, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_drive_letter, tvb, offset, 8, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += 8;
proto_tree_add_item(system_tree, hf_netmon_system_config_pad, tvb, offset, 4, ENC_NA);
offset += 4;
@@ -991,14 +991,14 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 8;
proto_tree_add_item(system_tree, hf_netmon_system_config_total_num_clusters, tvb, offset, 8, ENC_LITTLE_ENDIAN);
offset += 8;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_file_system, tvb, offset, 32, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field2);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_file_system, tvb, offset, 32, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field2);
offset += 32;
col_add_fstr(pinfo->cinfo, COL_INFO, "Drive: %s, FileSystem: %s", str_field1, str_field2);
proto_tree_add_item(system_tree, hf_netmon_system_config_volume_ext, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
break;
case 13:
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_nic_name, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_nic_name, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += 512;
proto_tree_add_item(system_tree, hf_netmon_system_config_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
@@ -1043,13 +1043,13 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 4;
proto_tree_add_item(system_tree, hf_netmon_system_config_vrefresh, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_chip_type, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_chip_type, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += 512;
proto_tree_add_item(system_tree, hf_netmon_system_config_dac_type, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16);
offset += 512;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_adapter_string, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field2);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_adapter_string, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field2);
offset += 512;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_bios_string, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field3);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_bios_string, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field3);
offset += 512;
col_add_fstr(pinfo->cinfo, COL_INFO, "Chip: %s, Adapter: %s, Bios: %s", str_field1, str_field2, str_field3);
proto_tree_add_item(system_tree, hf_netmon_system_config_device_id, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16);
@@ -1058,11 +1058,11 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 4;
break;
case 15:
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_service_name, tvb, offset, 68, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_service_name, tvb, offset, 68, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += 68;
proto_tree_add_item(system_tree, hf_netmon_system_config_display_name, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16);
offset += 512;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_process_name, tvb, offset, 68, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field2);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_process_name, tvb, offset, 68, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field2);
offset += 68;
col_add_fstr(pinfo->cinfo, COL_INFO, "Service: %s, Process: %s", str_field1, str_field2);
proto_tree_add_item_ret_uint(system_tree, hf_netmon_system_config_process_id, tvb, offset, 4, ENC_LITTLE_ENDIAN, &field1);
@@ -1104,13 +1104,13 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 4;
/* XXX - can we trust sizes above? */
length = tvb_unicode_strsize(tvb, offset);
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_device_id, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_device_id, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += length;
length = tvb_unicode_strsize(tvb, offset);
proto_tree_add_item(system_tree, hf_netmon_system_config_device_desc, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
offset += length;
length = tvb_unicode_strsize(tvb, offset);
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_friendly_name, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field2);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_friendly_name, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field2);
offset += length;
col_add_fstr(pinfo->cinfo, COL_INFO, "ID: %s, Name: %s", str_field1, str_field2);
length = tvb_unicode_strsize(tvb, offset);
@@ -1161,7 +1161,7 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 4;
proto_tree_add_item(system_tree, hf_netmon_system_config_scsi_lun, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_manufacturer, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_manufacturer, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += 512;
proto_tree_add_item(system_tree, hf_netmon_system_config_partition_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
@@ -1169,7 +1169,7 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 1;
proto_tree_add_item(system_tree, hf_netmon_system_config_pad, tvb, offset, 1, ENC_NA);
offset += 1;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_boot_drive_letter, tvb, offset, 6, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field2);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_boot_drive_letter, tvb, offset, 6, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field2);
offset += 6;
proto_tree_add_item(system_tree, hf_netmon_system_config_spare, tvb, offset, 4, ENC_LITTLE_ENDIAN|ENC_UTF_16);
offset += 4;
@@ -1187,7 +1187,7 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 4;
proto_tree_add_item(system_tree, hf_netmon_system_config_drive_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_drive_letter, tvb, offset, 8, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_drive_letter, tvb, offset, 8, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += 8;
proto_tree_add_item(system_tree, hf_netmon_system_config_pad, tvb, offset, 4, ENC_NA);
offset += 4;
@@ -1203,14 +1203,14 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 8;
proto_tree_add_item(system_tree, hf_netmon_system_config_total_num_clusters, tvb, offset, 8, ENC_LITTLE_ENDIAN);
offset += 8;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_file_system, tvb, offset, 32, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field2);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_file_system, tvb, offset, 32, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field2);
offset += 32;
col_add_fstr(pinfo->cinfo, COL_INFO, "Drive: %s, FileSystem: %s", str_field1, str_field2);
proto_tree_add_item(system_tree, hf_netmon_system_config_volume_ext, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
break;
case 13:
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_nic_name, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_nic_name, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += 512;
proto_tree_add_item(system_tree, hf_netmon_system_config_index, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
@@ -1255,13 +1255,13 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 4;
proto_tree_add_item(system_tree, hf_netmon_system_config_vrefresh, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_chip_type, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_chip_type, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += 512;
proto_tree_add_item(system_tree, hf_netmon_system_config_dac_type, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16);
offset += 512;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_adapter_string, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field2);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_adapter_string, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field2);
offset += 512;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_bios_string, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field3);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_bios_string, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field3);
offset += 512;
col_add_fstr(pinfo->cinfo, COL_INFO, "Chip: %s, Adapter: %s, Bios: %s", str_field1, str_field2, str_field3);
proto_tree_add_item(system_tree, hf_netmon_system_config_device_id, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16);
@@ -1270,11 +1270,11 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 4;
break;
case 15:
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_service_name, tvb, offset, 68, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_service_name, tvb, offset, 68, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += 68;
proto_tree_add_item(system_tree, hf_netmon_system_config_display_name, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16);
offset += 512;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_process_name, tvb, offset, 68, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field2);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_process_name, tvb, offset, 68, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field2);
offset += 68;
col_add_fstr(pinfo->cinfo, COL_INFO, "Service: %s, Process: %s", str_field1, str_field2);
proto_tree_add_item_ret_uint(system_tree, hf_netmon_system_config_process_id, tvb, offset, 4, ENC_LITTLE_ENDIAN, &field1);
@@ -1316,13 +1316,13 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 4;
/* XXX - can we trust sizes above? */
length = tvb_unicode_strsize(tvb, offset);
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_device_id, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_device_id, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += length;
length = tvb_unicode_strsize(tvb, offset);
proto_tree_add_item(system_tree, hf_netmon_system_config_device_desc, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
offset += length;
length = tvb_unicode_strsize(tvb, offset);
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_friendly_name, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field2);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_friendly_name, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field2);
offset += length;
col_add_fstr(pinfo->cinfo, COL_INFO, "ID: %s, Name: %s", str_field1, str_field2);
length = tvb_unicode_strsize(tvb, offset);
@@ -1373,7 +1373,7 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 4;
proto_tree_add_item(system_tree, hf_netmon_system_config_scsi_lun, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_manufacturer, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_manufacturer, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += 512;
proto_tree_add_item(system_tree, hf_netmon_system_config_partition_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
@@ -1381,7 +1381,7 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 1;
proto_tree_add_item(system_tree, hf_netmon_system_config_pad, tvb, offset, 1, ENC_NA);
offset += 1;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_boot_drive_letter, tvb, offset, 6, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field2);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_boot_drive_letter, tvb, offset, 6, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field2);
offset += 6;
proto_tree_add_item(system_tree, hf_netmon_system_config_spare, tvb, offset, 4, ENC_LITTLE_ENDIAN|ENC_UTF_16);
offset += 4;
@@ -1399,7 +1399,7 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 4;
proto_tree_add_item(system_tree, hf_netmon_system_config_drive_type, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_drive_letter, tvb, offset, 8, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_drive_letter, tvb, offset, 8, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += 8;
proto_tree_add_item(system_tree, hf_netmon_system_config_pad, tvb, offset, 4, ENC_NA);
offset += 4;
@@ -1415,7 +1415,7 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 8;
proto_tree_add_item(system_tree, hf_netmon_system_config_total_num_clusters, tvb, offset, 8, ENC_LITTLE_ENDIAN);
offset += 8;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_file_system, tvb, offset, 32, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field2);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_file_system, tvb, offset, 32, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field2);
offset += 32;
col_add_fstr(pinfo->cinfo, COL_INFO, "Drive: %s, FileSystem: %s", str_field1, str_field2);
proto_tree_add_item(system_tree, hf_netmon_system_config_volume_ext, tvb, offset, 4, ENC_LITTLE_ENDIAN);
@@ -1436,7 +1436,7 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
proto_tree_add_item(system_tree, hf_netmon_system_config_nic_description, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
offset += length;
length = tvb_unicode_strsize(tvb, offset);
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_ipaddresses, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_ipaddresses, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += length;
col_add_fstr(pinfo->cinfo, COL_INFO, "IP Addresses: %s", str_field1);
length = tvb_unicode_strsize(tvb, offset);
@@ -1454,13 +1454,13 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 4;
proto_tree_add_item(system_tree, hf_netmon_system_config_vrefresh, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_chip_type, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_chip_type, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += 512;
proto_tree_add_item(system_tree, hf_netmon_system_config_dac_type, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16);
offset += 512;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_adapter_string, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field2);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_adapter_string, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field2);
offset += 512;
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_bios_string, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field3);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_bios_string, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field3);
offset += 512;
col_add_fstr(pinfo->cinfo, COL_INFO, "Chip: %s, Adapter: %s, Bios: %s", str_field1, str_field2, str_field3);
proto_tree_add_item(system_tree, hf_netmon_system_config_device_id, tvb, offset, 512, ENC_LITTLE_ENDIAN|ENC_UTF_16);
@@ -1476,13 +1476,13 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
proto_tree_add_item(system_tree, hf_netmon_system_config_sub_process_tag, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
length = tvb_unicode_strsize(tvb, offset);
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_service_name, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_service_name, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += length;
length = tvb_unicode_strsize(tvb, offset);
proto_tree_add_item(system_tree, hf_netmon_system_config_display_name, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
offset += length;
length = tvb_unicode_strsize(tvb, offset);
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_process_name, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field2);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_process_name, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field2);
offset += length;
col_add_fstr(pinfo->cinfo, COL_INFO, "Service: %s, Process: %s", str_field1, str_field2);
break;
@@ -1533,13 +1533,13 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 4;
/* XXX - can we trust sizes above? */
length = tvb_unicode_strsize(tvb, offset);
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_device_id, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_device_id, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += length;
length = tvb_unicode_strsize(tvb, offset);
proto_tree_add_item(system_tree, hf_netmon_system_config_device_desc, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
offset += length;
length = tvb_unicode_strsize(tvb, offset);
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_friendly_name, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field2);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_friendly_name, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field2);
offset += length;
col_add_fstr(pinfo->cinfo, COL_INFO, "ID: %s, Name: %s", str_field1, str_field2);
break;
@@ -1553,22 +1553,22 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
proto_tree_add_item(system_tree, hf_netmon_system_config_location_information_len, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
length = tvb_unicode_strsize(tvb, offset);
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_location_information, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_location_information, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += length;
col_add_fstr(pinfo->cinfo, COL_INFO, "Location: %s", str_field1);
break;
case 25:
length = tvb_unicode_strsize(tvb, offset);
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_system_manufacturer, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_system_manufacturer, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += length;
length = tvb_unicode_strsize(tvb, offset);
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_system_product_name, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field2);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_system_product_name, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field2);
offset += length;
length = tvb_unicode_strsize(tvb, offset);
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_bios_date, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field3);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_bios_date, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field3);
offset += length;
length = tvb_unicode_strsize(tvb, offset);
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_bios_version, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field4);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_bios_version, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field4);
offset += length;
col_add_fstr(pinfo->cinfo, COL_INFO, "Manufacturer: %s, ProductName: %s, BiosDate: %s, BiosVersion: %s", str_field1, str_field2, str_field3, str_field4);
break;
@@ -1586,7 +1586,7 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
proto_tree_add_item(system_tree, hf_netmon_system_config_sub_process_tag, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
length = tvb_unicode_strsize(tvb, offset);
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_service_name, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_service_name, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += length;
col_add_fstr(pinfo->cinfo, COL_INFO, "Service: %s, (PID=%d)", str_field1, field1);
length = tvb_unicode_strsize(tvb, offset);
@@ -1628,13 +1628,13 @@ dissect_netmon_system_config(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
offset += 4;
/* XXX - can we trust sizes above? */
length = tvb_unicode_strsize(tvb, offset);
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_device_id, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field1);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_device_id, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field1);
offset += length;
length = tvb_unicode_strsize(tvb, offset);
proto_tree_add_item(system_tree, hf_netmon_system_config_device_desc, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16);
offset += length;
length = tvb_unicode_strsize(tvb, offset);
- proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_friendly_name, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, wmem_packet_scope(), &str_field2);
+ proto_tree_add_item_ret_string(system_tree, hf_netmon_system_config_friendly_name, tvb, offset, length, ENC_LITTLE_ENDIAN|ENC_UTF_16, pinfo->pool, &str_field2);
offset += length;
col_add_fstr(pinfo->cinfo, COL_INFO, "ID: %s, Name: %s", str_field1, str_field2);
length = tvb_unicode_strsize(tvb, offset);
@@ -1684,7 +1684,7 @@ dissect_netmon_process(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
&ei_netmon_process_user_sid, FALSE);
length = tvb_strsize(tvb, offset);
proto_tree_add_item_ret_string(process_tree, hf_netmon_process_image_file_name, tvb, offset, length, ENC_NA|ENC_ASCII,
- wmem_packet_scope(), &filename);
+ pinfo->pool, &filename);
col_add_fstr(pinfo->cinfo, COL_INFO, "Filename: %s", filename);
offset += length;
break;
@@ -1712,7 +1712,7 @@ dissect_netmon_process(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
&ei_netmon_process_user_sid, FALSE);
length = tvb_strsize(tvb, offset);
proto_tree_add_item_ret_string(process_tree, hf_netmon_process_image_file_name, tvb, offset, length, ENC_NA|ENC_ASCII,
- wmem_packet_scope(), &filename);
+ pinfo->pool, &filename);
col_add_fstr(pinfo->cinfo, COL_INFO, "Filename: %s", filename);
offset += length;
break;
@@ -1750,7 +1750,7 @@ dissect_netmon_process(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
&ei_netmon_process_user_sid, FALSE);
length = tvb_strsize(tvb, offset);
proto_tree_add_item_ret_string(process_tree, hf_netmon_process_image_file_name, tvb, offset, length, ENC_NA|ENC_ASCII,
- wmem_packet_scope(), &filename);
+ pinfo->pool, &filename);
col_add_fstr(pinfo->cinfo, COL_INFO, "Filename: %s", filename);
offset += length;
@@ -1833,7 +1833,7 @@ dissect_netmon_process(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
&ei_netmon_process_user_sid, FALSE);
length = tvb_strsize(tvb, offset);
proto_tree_add_item_ret_string(process_tree, hf_netmon_process_image_file_name, tvb, offset, length, ENC_NA|ENC_ASCII,
- wmem_packet_scope(), &filename);
+ pinfo->pool, &filename);
col_add_fstr(pinfo->cinfo, COL_INFO, "Filename: %s", filename);
offset += length;
diff --git a/epan/dissectors/packet-netperfmeter.c b/epan/dissectors/packet-netperfmeter.c
index e26517ab4f..3704f1b0ea 100644
--- a/epan/dissectors/packet-netperfmeter.c
+++ b/epan/dissectors/packet-netperfmeter.c
@@ -459,7 +459,7 @@ dissect_npm_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *npm_t
{
proto_tree* flags_tree;
- tap_npm_rec_t* tap_rec = wmem_new0(wmem_packet_scope(), tap_npm_rec_t);
+ tap_npm_rec_t* tap_rec = wmem_new0(pinfo->pool, tap_npm_rec_t);
tap_rec->type = tvb_get_guint8(message_tvb, 0);
tap_rec->size = tvb_get_ntohs(message_tvb, 2);
tap_rec->type_string = val_to_str_const(tap_rec->type, message_type_values, "Unknown NetPerfMeter message type");
diff --git a/epan/dissectors/packet-netrom.c b/epan/dissectors/packet-netrom.c
index aff4bc9794..a66c46d3af 100644
--- a/epan/dissectors/packet-netrom.c
+++ b/epan/dissectors/packet-netrom.c
@@ -143,7 +143,7 @@ dissect_netrom_type(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *t
type = tvb_get_guint8( tvb, offset );
op_code = type &0x0f;
- info_buffer = wmem_strdup_printf( wmem_packet_scope(), "%s%s%s%s (0x%02x)",
+ info_buffer = wmem_strdup_printf( pinfo->pool, "%s%s%s%s (0x%02x)",
val_to_str_const( op_code, op_code_vals_text, "Unknown" ),
( type & NETROM_MORE_FLAG ) ? ", More" : "",
( type & NETROM_NAK_FLAG ) ? ", NAK" : "",
@@ -223,8 +223,8 @@ dissect_netrom_proto(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ti = proto_tree_add_protocol_format( tree, proto_netrom, tvb, 0, NETROM_HEADER_SIZE,
"NET/ROM, Src: %s, Dst: %s",
- address_to_str(wmem_packet_scope(), &pinfo->src),
- address_to_str(wmem_packet_scope(), &pinfo->dst));
+ address_to_str(pinfo->pool, &pinfo->src),
+ address_to_str(pinfo->pool, &pinfo->dst));
netrom_tree = proto_item_add_subtree( ti, ett_netrom );
@@ -453,7 +453,7 @@ dissect_netrom_routing(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
netrom_tree = proto_item_add_subtree( ti, ett_netrom );
proto_tree_add_item_ret_string_and_length(netrom_tree, hf_netrom_mnemonic, tvb, 1, 6, ENC_ASCII|ENC_NA,
- wmem_packet_scope(), &mnemonic, &mnemonic_len);
+ pinfo->pool, &mnemonic, &mnemonic_len);
proto_item_append_text(ti, ", routing table frame, Node: %.6s", mnemonic);
}
diff --git a/epan/dissectors/packet-nfapi.c b/epan/dissectors/packet-nfapi.c
index fe2dacd635..e48fc35d76 100644
--- a/epan/dissectors/packet-nfapi.c
+++ b/epan/dissectors/packet-nfapi.c
@@ -6934,7 +6934,7 @@ static void dissect_rx_cqi_indication_body_value(ptvcursor_t * ptvc, packet_info
if (num_pdu > 0)
{
- lengths = (guint16*)wmem_alloc0(wmem_packet_scope(), num_pdu * 2);
+ lengths = (guint16*)wmem_alloc0(pinfo->pool, num_pdu * 2);
}
for (i = 0; i < num_pdu; ++i)
@@ -8066,7 +8066,7 @@ static void dissect_rx_indication_body_value(ptvcursor_t * ptvc, packet_info* pi
{
guint32 i = 0, count;
guint number_of_pdu_addr = ptvcursor_current_offset(ptvc); // *offset;
- wmem_array_t *lengths = wmem_array_new(wmem_packet_scope(), sizeof(guint16));
+ wmem_array_t *lengths = wmem_array_new(pinfo->pool, sizeof(guint16));
ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_pdus, 2, ENC_BIG_ENDIAN, &count);
diff --git a/epan/dissectors/packet-nhrp.c b/epan/dissectors/packet-nhrp.c
index 13e0c92070..04c7131f8c 100644
--- a/epan/dissectors/packet-nhrp.c
+++ b/epan/dissectors/packet-nhrp.c
@@ -884,7 +884,7 @@ static void dissect_nhrp_ext(tvbuff_t *tvb,
auth_tree = proto_tree_add_subtree_format(nhrp_tree, tvb, offset, len,
ett_nhrp_auth_ext, NULL, "Extension Data: SPI=%u: Data=%s", tvb_get_ntohs(tvb, offset + 2),
- tvb_bytes_to_str(wmem_packet_scope(), tvb, offset + 4 + srcLen, len - (4 + srcLen)));
+ tvb_bytes_to_str(pinfo->pool, tvb, offset + 4 + srcLen, len - (4 + srcLen)));
proto_tree_add_item(auth_tree, hf_nhrp_auth_ext_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(auth_tree, hf_nhrp_auth_ext_spi, tvb, offset + 2, 2, ENC_BIG_ENDIAN);
if (srcLen == 4)
@@ -920,7 +920,7 @@ static void dissect_nhrp_ext(tvbuff_t *tvb,
}
if (len > 3) {
proto_tree_add_item(vendor_tree, hf_nhrp_vendor_ext_data, tvb, offset + 3, len - 3, ENC_NA);
- proto_item_append_text(vendor_item, ", Data=%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset + 3, len - 3));
+ proto_item_append_text(vendor_item, ", Data=%s", tvb_bytes_to_str(pinfo->pool, tvb, offset + 3, len - 3));
} else {
proto_item_append_text(vendor_item, ", Data=<none>");
}
diff --git a/epan/dissectors/packet-nordic_ble.c b/epan/dissectors/packet-nordic_ble.c
index 9df541d2e1..71517afdf9 100644
--- a/epan/dissectors/packet-nordic_ble.c
+++ b/epan/dissectors/packet-nordic_ble.c
@@ -760,7 +760,7 @@ dissect_nordic_ble(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
gint offset;
gboolean bad_length = FALSE;
- context = wmem_new0(wmem_packet_scope(), btle_context_t);
+ context = wmem_new0(pinfo->pool, btle_context_t);
offset = dissect_header(tvb, pinfo, tree, context, &bad_length);
payload_tvb = tvb_new_subset_length_caplen(tvb, offset, -1, tvb_captured_length(tvb) - offset);
diff --git a/epan/dissectors/packet-ns-mep.c b/epan/dissectors/packet-ns-mep.c
index b7b6c45b19..dc90d492e7 100644
--- a/epan/dissectors/packet-ns-mep.c
+++ b/epan/dissectors/packet-ns-mep.c
@@ -247,7 +247,7 @@ dissect_ns_mep_v02xx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset +=1;
proto_tree_add_item_ret_uint(ns_mep_tree, hf_nsmep_msgtype, tvb, offset, 2, ENC_LITTLE_ENDIAN, &mesgtype);
offset +=2;
- version_str = wmem_strdup_printf(wmem_packet_scope(), "v%d.%d %s", maj_ver, min_ver, val_to_str(mesgtype, nslist_gslbmessage, "Unknown Mesg Type: 0x%02X"));
+ version_str = wmem_strdup_printf(pinfo->pool, "v%d.%d %s", maj_ver, min_ver, val_to_str(mesgtype, nslist_gslbmessage, "Unknown Mesg Type: 0x%02X"));
proto_item_append_text(ti, ", %s", version_str);
proto_tree_add_item_ret_uint(ns_mep_tree, hf_nsmep_msglen, tvb, offset, 2, ENC_LITTLE_ENDIAN, &mesglen);
offset +=2;
@@ -279,7 +279,7 @@ dissect_ns_mep_v02xx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item_ret_uint(ns_mep_mfu_tree, hf_nsmep_mfu_svctype, tvb, offset, 2, ENC_LITTLE_ENDIAN, &svctype);
offset +=2;
- proto_item_append_text(tf, " for %s:%d:%s", tvb_address_to_str(wmem_packet_scope(), tvb, FT_IPv4, offset-8), public_port, val_to_str(svctype, ns_svc_type_vals, "0x%02X"));
+ proto_item_append_text(tf, " for %s:%d:%s", tvb_address_to_str(pinfo->pool, tvb, FT_IPv4, offset-8), public_port, val_to_str(svctype, ns_svc_type_vals, "0x%02X"));
if ((maj_ver > 2) || ((maj_ver==2) && (min_ver > 2)))
{
proto_tree_add_item(ns_mep_mfu_tree, hf_nsmep_mfu_eff_state, tvb, offset, 1, ENC_LITTLE_ENDIAN);
@@ -311,7 +311,7 @@ dissect_ns_mep_v02xx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item_ret_uint(ns_mep_mfr_tree, hf_nsmep_mfu_svctype, tvb, offset, 4, ENC_LITTLE_ENDIAN, &svctype);
offset +=4;
- proto_item_append_text(tf, " for %s:%d:%s", tvb_address_to_str(wmem_packet_scope(), tvb, FT_IPv4, offset-8), public_port, val_to_str(svctype, ns_svc_type_vals, "0x%02X"));
+ proto_item_append_text(tf, " for %s:%d:%s", tvb_address_to_str(pinfo->pool, tvb, FT_IPv4, offset-8), public_port, val_to_str(svctype, ns_svc_type_vals, "0x%02X"));
if ((maj_ver > 2) || ((maj_ver==2) && (min_ver > 2)))
{
@@ -353,7 +353,7 @@ dissect_ns_mep_v02xx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item_ret_uint(ns_mep_mfu_tree, hf_nsmep_mfu_svctype, tvb, offset, 2, ENC_LITTLE_ENDIAN, &svctype);
offset +=2;
- proto_item_append_text(tf, " for %s:%d:%s", tvb_address_to_str(wmem_packet_scope(), tvb, FT_IPv4, offset-8), public_port, val_to_str(svctype, ns_svc_type_vals, "0x%02X"));
+ proto_item_append_text(tf, " for %s:%d:%s", tvb_address_to_str(pinfo->pool, tvb, FT_IPv4, offset-8), public_port, val_to_str(svctype, ns_svc_type_vals, "0x%02X"));
if ((maj_ver > 2) || ((maj_ver==2) && (min_ver > 2)))
{
@@ -408,7 +408,7 @@ dissect_ns_mep_v02xx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
while (tvb_reported_length_remaining(tvb, offset) >= GSLIB_NET_MET_TABLE_SIZE)
{
tf = proto_tree_add_item(ns_mep_tree, hf_ns_networkMetrics, tvb, offset, GSLIB_NET_MET_TABLE_SIZE, ENC_NA);
- proto_item_append_text(tf, " of %s", tvb_address_to_str(wmem_packet_scope(), tvb, AT_IPv4, offset));
+ proto_item_append_text(tf, " of %s", tvb_address_to_str(pinfo->pool, tvb, AT_IPv4, offset));
ns_mep_nwu_tree = proto_item_add_subtree(tf, ett_nsmep_nwu);
proto_tree_add_item(ns_mep_nwu_tree, hf_nsmep_ldns_ip, tvb, offset, 4, ENC_LITTLE_ENDIAN);
@@ -431,7 +431,7 @@ dissect_ns_mep_v02xx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
while (tvb_reported_length_remaining(tvb, offset) >= NS_PERSIST_INFO_SIZE)
{
tf = proto_tree_add_item(ns_mep_tree, hf_ns_persistenceInfo, tvb, offset, NS_PERSIST_INFO_SIZE, ENC_NA);
- proto_item_append_text(tf, " %s", tvb_address_to_str(wmem_packet_scope(), tvb, AT_IPv4, offset));
+ proto_item_append_text(tf, " %s", tvb_address_to_str(pinfo->pool, tvb, AT_IPv4, offset));
ns_mep_pr_tree = proto_item_add_subtree(tf, ett_nsmep_nwu);
proto_tree_add_item(ns_mep_pr_tree, hf_nsmep_ldns_ip, tvb, offset, 4, ENC_LITTLE_ENDIAN);
@@ -467,7 +467,7 @@ dissect_ns_mep_v02xx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item_ret_uint(ns_mep_di_tree, hf_nsmep_mfu_svctype, tvb, offset, 2, ENC_LITTLE_ENDIAN, &svctype);
offset += 2;
- proto_item_append_text(tf, " for %s:%d:%s", tvb_address_to_str(wmem_packet_scope(), tvb, FT_IPv4, offset-8), public_port, val_to_str(svctype, ns_svc_type_vals, "0x%02X"));
+ proto_item_append_text(tf, " for %s:%d:%s", tvb_address_to_str(pinfo->pool, tvb, FT_IPv4, offset-8), public_port, val_to_str(svctype, ns_svc_type_vals, "0x%02X"));
proto_tree_add_item_ret_uint(ns_mep_di_tree, hf_ns_gslbDomNamelen, tvb, offset, 1, ENC_LITTLE_ENDIAN, &domainlen);
offset += 1;
@@ -530,7 +530,7 @@ dissect_ns_mep_v02xx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item_ret_uint(ns_mep_di_tree, hf_nsmep_mfu_svctype, tvb, offset, 2, ENC_LITTLE_ENDIAN, &svctype);
offset += 2;
- proto_item_append_text(tf, " for %s:%d:%s", tvb_address_to_str(wmem_packet_scope(), tvb, FT_IPv4, offset-8), public_port, val_to_str(svctype, ns_svc_type_vals, "0x%02X"));
+ proto_item_append_text(tf, " for %s:%d:%s", tvb_address_to_str(pinfo->pool, tvb, FT_IPv4, offset-8), public_port, val_to_str(svctype, ns_svc_type_vals, "0x%02X"));
proto_tree_add_item_ret_uint(ns_mep_di_tree, hf_ns_gslbDomNamelen, tvb, offset, 1, ENC_LITTLE_ENDIAN, &domainlen);
offset += 1;
@@ -558,7 +558,7 @@ dissect_ns_mep_v02xx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item_ret_uint(ns_mep_di_tree, hf_nsmep_mfu_svctype, tvb, offset, 2, ENC_LITTLE_ENDIAN, &svctype);
offset += 2;
- proto_item_append_text(tf, " for %s:%d:%s", tvb_address_to_str(wmem_packet_scope(), tvb, FT_IPv4, offset-8), public_port, val_to_str(svctype, ns_svc_type_vals, "0x%02X"));
+ proto_item_append_text(tf, " for %s:%d:%s", tvb_address_to_str(pinfo->pool, tvb, FT_IPv4, offset-8), public_port, val_to_str(svctype, ns_svc_type_vals, "0x%02X"));
break;
}
case GSLB_MSG_LBNODE_GETSVC:
@@ -577,7 +577,7 @@ dissect_ns_mep_v02xx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item_ret_uint(ns_mep_di_tree, hf_nsmep_mfu_svctype, tvb, offset, 2, ENC_LITTLE_ENDIAN, &svctype);
offset += 2;
- proto_item_append_text(tf, " for %s:%d:%s", tvb_address_to_str(wmem_packet_scope(), tvb, FT_IPv4, offset-8), public_port, val_to_str(svctype, ns_svc_type_vals, "0x%02X"));
+ proto_item_append_text(tf, " for %s:%d:%s", tvb_address_to_str(pinfo->pool, tvb, FT_IPv4, offset-8), public_port, val_to_str(svctype, ns_svc_type_vals, "0x%02X"));
proto_tree_add_item_ret_uint(ns_mep_di_tree, hf_ns_gslbDomNamelen, tvb, offset, 1, ENC_LITTLE_ENDIAN, &domainlen);
offset += 1;
@@ -604,7 +604,7 @@ dissect_ns_mep_v02xx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item_ret_uint(ns_mep_di_tree, hf_nsmep_mfu_svctype, tvb, offset, 2, ENC_LITTLE_ENDIAN, &svctype);
offset += 2;
- proto_item_append_text(tf, " for %s:%d:%s", tvb_address_to_str(wmem_packet_scope(), tvb, FT_IPv4, offset-8), public_port, val_to_str(svctype, ns_svc_type_vals, "0x%02X"));
+ proto_item_append_text(tf, " for %s:%d:%s", tvb_address_to_str(pinfo->pool, tvb, FT_IPv4, offset-8), public_port, val_to_str(svctype, ns_svc_type_vals, "0x%02X"));
proto_tree_add_item_ret_uint(ns_mep_di_tree, hf_ns_gslbDomNamelen, tvb, offset, 1, ENC_LITTLE_ENDIAN, &domainlen);
offset += 1;
diff --git a/epan/dissectors/packet-nt-tpcp.c b/epan/dissectors/packet-nt-tpcp.c
index 1af0aeacee..ed98a8cfea 100644
--- a/epan/dissectors/packet-nt-tpcp.c
+++ b/epan/dissectors/packet-nt-tpcp.c
@@ -129,7 +129,7 @@ dissect_tpcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
cport = tvb_get_ntohs(tvb, 6);
proto_tree_add_uint_format_value(tpcp_tree, hf_tpcp_cport, tvb, 6, 2, cport,
- "%s", udp_port_to_display(wmem_packet_scope(), cport));
+ "%s", udp_port_to_display(pinfo->pool, cport));
proto_tree_add_item(tpcp_tree, hf_tpcp_caddr, tvb, 8, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(tpcp_tree, hf_tpcp_saddr, tvb, 12, 4, ENC_BIG_ENDIAN);
@@ -143,7 +143,7 @@ dissect_tpcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
col_add_fstr(pinfo->cinfo, COL_INFO,"%s id %d CPort %s CIP %s SIP %s",
val_to_str_const(type, type_vals, "Unknown"),
id,
- udp_port_to_display(wmem_packet_scope(), cport),
+ udp_port_to_display(pinfo->pool, cport),
tvb_ip_to_str(tvb, 8),
tvb_ip_to_str(tvb, 12));
diff --git a/epan/dissectors/packet-obex.c b/epan/dissectors/packet-obex.c
index e29c38d21f..484e5c04e8 100644
--- a/epan/dissectors/packet-obex.c
+++ b/epan/dissectors/packet-obex.c
@@ -1807,7 +1807,7 @@ dissect_headers(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo,
default:
proto_tree_add_item(hdr_tree, hf_hdr_val_unicode, tvb, offset, value_length, ENC_UCS_2 | ENC_BIG_ENDIAN);
}
- str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, value_length, ENC_UCS_2 | ENC_BIG_ENDIAN);
+ str = tvb_get_string_enc(pinfo->pool, tvb, offset, value_length, ENC_UCS_2 | ENC_BIG_ENDIAN);
proto_item_append_text(hdr_tree, ": \"%s\"", str);
col_append_fstr(pinfo->cinfo, COL_INFO, " \"%s\"", str);
@@ -1922,7 +1922,7 @@ dissect_headers(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo,
break;
case 0x42: /* Type */
proto_tree_add_item(hdr_tree, hf_type, tvb, offset, value_length, ENC_ASCII | ENC_NA);
- proto_item_append_text(hdr_tree, ": \"%s\"", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, value_length, ENC_ASCII));
+ proto_item_append_text(hdr_tree, ": \"%s\"", tvb_get_string_enc(pinfo->pool, tvb, offset, value_length, ENC_ASCII));
if (!pinfo->fd->visited && obex_last_opcode_data && (obex_last_opcode_data->code == OBEX_CODE_VALS_GET || obex_last_opcode_data->code == OBEX_CODE_VALS_PUT)) {
obex_last_opcode_data->data.get_put.type = tvb_get_string_enc(wmem_file_scope(), tvb, offset, value_length, ENC_ASCII | ENC_NA);
}
@@ -1939,7 +1939,7 @@ dissect_headers(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo,
case 0x44: /* Time (ISO8601) */
{
const guint8* time_str;
- proto_tree_add_item_ret_string(hdr_tree, hf_time_iso8601, tvb, offset, value_length, ENC_ASCII | ENC_NA, wmem_packet_scope(), &time_str);
+ proto_tree_add_item_ret_string(hdr_tree, hf_time_iso8601, tvb, offset, value_length, ENC_ASCII | ENC_NA, pinfo->pool, &time_str);
proto_item_append_text(hdr_tree, ": \"%s\"", time_str);
offset += value_length;
@@ -1969,8 +1969,8 @@ dissect_headers(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo,
{
call_dissector(xml_handle, next_tvb, pinfo, tree);
} else if (is_ascii_str(tvb_get_ptr(tvb, offset, value_length), value_length)) {
- proto_item_append_text(hdr_tree, ": \"%s\"", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, value_length, ENC_ASCII));
- col_append_fstr(pinfo->cinfo, COL_INFO, " \"%s\"", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, value_length, ENC_ASCII));
+ proto_item_append_text(hdr_tree, ": \"%s\"", tvb_get_string_enc(pinfo->pool, tvb, offset, value_length, ENC_ASCII));
+ col_append_fstr(pinfo->cinfo, COL_INFO, " \"%s\"", tvb_get_string_enc(pinfo->pool, tvb, offset, value_length, ENC_ASCII));
}
offset += value_length;
}
@@ -2039,7 +2039,7 @@ dissect_headers(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo,
case 0x51: /* Object Class */
{
const guint8* obj_str;
- proto_tree_add_item_ret_string(hdr_tree, hf_object_class, tvb, offset, value_length, ENC_ASCII | ENC_NA, wmem_packet_scope(), &obj_str);
+ proto_tree_add_item_ret_string(hdr_tree, hf_object_class, tvb, offset, value_length, ENC_ASCII | ENC_NA, pinfo->pool, &obj_str);
proto_item_append_text(hdr_tree, ": \"%s\"", obj_str);
offset += value_length;
diff --git a/epan/dissectors/packet-omron-fins.c b/epan/dissectors/packet-omron-fins.c
index 579bb8f229..3f380f978f 100644
--- a/epan/dissectors/packet-omron-fins.c
+++ b/epan/dissectors/packet-omron-fins.c
@@ -1236,7 +1236,7 @@ dissect_omron_fins_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *omron_t
cmd_str = try_val_to_str_idx(command_code, command_code_cv, &cmd_str_idx);
if (cmd_str_idx == -1)
- cmd_str = wmem_strdup_printf(wmem_packet_scope(), "Unknown (%d)", command_code);
+ cmd_str = wmem_strdup_printf(pinfo->pool, "Unknown (%d)", command_code);
/* Setup and fill in the INFO column if it's there */
icf_flags = tvb_get_guint8(tvb, offset);
diff --git a/epan/dissectors/packet-openflow_v6.c b/epan/dissectors/packet-openflow_v6.c
index ba59151bfb..460751e654 100644
--- a/epan/dissectors/packet-openflow_v6.c
+++ b/epan/dissectors/packet-openflow_v6.c
@@ -2958,7 +2958,7 @@ dissect_openflow_port_v6(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
/* char name[OFP_MAX_PORT_NAME_LEN]; Null-terminated */
proto_tree_add_item(port_tree, hf_openflow_v6_port_name, tvb, offset, OFP_MAX_PORT_NAME_LEN, ENC_ASCII|ENC_NA);
- proto_item_append_text(port_tree, " (%s)", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, OFP_ETH_ALEN, ENC_ASCII));
+ proto_item_append_text(port_tree, " (%s)", tvb_get_string_enc(pinfo->pool, tvb, offset, OFP_ETH_ALEN, ENC_ASCII));
offset+=OFP_MAX_PORT_NAME_LEN;
/* uint32_t config; */
diff --git a/epan/dissectors/packet-openwire.c b/epan/dissectors/packet-openwire.c
index 4fe2c1c829..11ae0eaef1 100644
--- a/epan/dissectors/packet-openwire.c
+++ b/epan/dissectors/packet-openwire.c
@@ -670,7 +670,7 @@ dissect_openwire_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o
proto_item * cached_item = NULL;
inlined = tvb_get_guint8(tvb, offset + 0) == TRUE ? TRUE : FALSE;
cachedID = tvb_get_ntohs(tvb, offset + 1);
- cache_str = wmem_strdup_printf(wmem_packet_scope(), " (CachedID: %d)", cachedID);
+ cache_str = wmem_strdup_printf(pinfo->pool, " (CachedID: %d)", cachedID);
if (openwire_verbose_type)
{
proto_tree_add_item(tree, hf_openwire_cached_inlined, tvb, offset, 1, ENC_BIG_ENDIAN);
diff --git a/epan/dissectors/packet-osmo_trx.c b/epan/dissectors/packet-osmo_trx.c
index 178778bb4c..eb1dfb129f 100644
--- a/epan/dissectors/packet-osmo_trx.c
+++ b/epan/dissectors/packet-osmo_trx.c
@@ -725,7 +725,7 @@ static int dissect_otrxc(tvbuff_t *tvb, packet_info *pinfo,
col_clear(pinfo->cinfo, COL_INFO);
msg_len = tvb_reported_length(tvb);
- msg_str = tvb_get_string_enc(wmem_packet_scope(), tvb, 0, msg_len, ENC_ASCII);
+ msg_str = tvb_get_string_enc(pinfo->pool, tvb, 0, msg_len, ENC_ASCII);
col_add_str(pinfo->cinfo, COL_INFO, msg_str);
ti = proto_tree_add_item(tree, proto_otrxc, tvb, 0, msg_len, ENC_ASCII);
@@ -749,7 +749,7 @@ static int dissect_otrxc(tvbuff_t *tvb, packet_info *pinfo,
/* First 3 bytes define a type of the message ("IND", "CMD", "RSP") */
proto_tree_add_item_ret_string(otrxc_tree, hf_otrxc_type, tvb, offset, 3,
- ENC_NA | ENC_ASCII, wmem_packet_scope(),
+ ENC_NA | ENC_ASCII, pinfo->pool,
&msg_type_str);
offset += 3;
diff --git a/epan/dissectors/packet-p_mul.c b/epan/dissectors/packet-p_mul.c
index 4c4bcbf45c..5ef6ad960c 100644
--- a/epan/dissectors/packet-p_mul.c
+++ b/epan/dissectors/packet-p_mul.c
@@ -459,7 +459,7 @@ static p_mul_seq_val *register_p_mul_id (packet_info *pinfo, address *addr, guin
if (pdu_type == Ack_PDU) {
/* Data is just copied to the structure and never stored,
so keep a "more temporary" structure */
- p_mul_data = wmem_new0(wmem_packet_scope(), p_mul_seq_val);
+ p_mul_data = wmem_new0(pinfo->pool, p_mul_seq_val);
} else {
p_mul_data = wmem_new0(wmem_file_scope(), p_mul_seq_val);
}
@@ -891,7 +891,7 @@ static int dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
en = proto_tree_add_item (p_mul_tree, hf_checksum, tvb, offset, 2, ENC_BIG_ENDIAN);
checksum_tree = proto_item_add_subtree (en, ett_checksum);
len = tvb_captured_length (tvb);
- value = (guint8 *)tvb_memdup (wmem_packet_scope(), tvb, 0, len);
+ value = (guint8 *)tvb_memdup (pinfo->pool, tvb, 0, len);
if (len >= offset+2) {
value[offset] = 0;
value[offset+1] = 0;
@@ -1054,7 +1054,7 @@ static int dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
break;
case Ack_PDU:
- message_id_list = wmem_strbuf_new_label(wmem_packet_scope());
+ message_id_list = wmem_strbuf_new_label(pinfo->pool);
for (i = 0; i < count; i++) {
/* Ack Info Entry */
diff --git a/epan/dissectors/packet-packetbb.c b/epan/dissectors/packet-packetbb.c
index 813f1cf347..8ca0894d41 100644
--- a/epan/dissectors/packet-packetbb.c
+++ b/epan/dissectors/packet-packetbb.c
@@ -704,7 +704,7 @@ static int dissect_pbb_addressblock(tvbuff_t *tvb, packet_info *pinfo, proto_tre
case 3:
addrValue_item = proto_tree_add_bytes_format_value(addr_tree, hf_packetbb_addr_value[addressType],
tvb, mid_index, block_index + block_length - mid_index, NULL,
- "%s", bytes_to_str(wmem_packet_scope(), addr, head_length + midSize));
+ "%s", bytes_to_str(pinfo->pool, addr, head_length + midSize));
break;
default:
break;
diff --git a/epan/dissectors/packet-packetlogger.c b/epan/dissectors/packet-packetlogger.c
index 1dc6dc9b41..ab65bc7fbb 100644
--- a/epan/dissectors/packet-packetlogger.c
+++ b/epan/dissectors/packet-packetlogger.c
@@ -120,7 +120,7 @@ static void dissect_syslog(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
len = tvb_strsize (tvb, offset);
proto_tree_add_item (sub_tree, hf_syslog_message, tvb, offset, len, ENC_ASCII|ENC_NA);
- col_add_fstr (pinfo->cinfo, COL_INFO, "%s", tvb_format_stringzpad_wsp (wmem_packet_scope(), tvb, offset, len));
+ col_add_fstr (pinfo->cinfo, COL_INFO, "%s", tvb_format_stringzpad_wsp (pinfo->pool, tvb, offset, len));
}
static int dissect_packetlogger(tvbuff_t *tvb, packet_info *pinfo,
@@ -200,7 +200,7 @@ static int dissect_packetlogger(tvbuff_t *tvb, packet_info *pinfo,
case PKT_CONFIG:
case PKT_NEW_CONTROLLER:
proto_tree_add_item (packetlogger_tree, hf_info, next_tvb, 0, len, ENC_ASCII|ENC_NA);
- col_add_fstr (pinfo->cinfo, COL_INFO, "%s", tvb_format_stringzpad_wsp (wmem_packet_scope(), next_tvb, 0, len));
+ col_add_fstr (pinfo->cinfo, COL_INFO, "%s", tvb_format_stringzpad_wsp (pinfo->pool, next_tvb, 0, len));
break;
default:
call_data_dissector(next_tvb, pinfo, tree);
diff --git a/epan/dissectors/packet-pana.c b/epan/dissectors/packet-pana.c
index e0053a4169..b2be46da06 100644
--- a/epan/dissectors/packet-pana.c
+++ b/epan/dissectors/packet-pana.c
@@ -519,7 +519,7 @@ dissect_pana_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if(!pana_trans){
/* create a "fake" pana_trans structure */
- pana_trans=wmem_new(wmem_packet_scope(), pana_transaction_t);
+ pana_trans=wmem_new(pinfo->pool, pana_transaction_t);
pana_trans->req_frame=0;
pana_trans->rep_frame=0;
pana_trans->req_time=pinfo->abs_ts;
diff --git a/epan/dissectors/packet-pcomtcp.c b/epan/dissectors/packet-pcomtcp.c
index 597c48edff..6243f02c6f 100644
--- a/epan/dissectors/packet-pcomtcp.c
+++ b/epan/dissectors/packet-pcomtcp.c
@@ -310,7 +310,7 @@ dissect_pcomascii(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
}
}
if ( cc_len > 0 ){
- cc_str2 = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, cc_len, ENC_ASCII);
+ cc_str2 = tvb_get_string_enc(pinfo->pool, tvb, offset, cc_len, ENC_ASCII);
proto_tree_add_string_format_value(pcomascii_tree,
hf_pcomascii_command_code, tvb, offset, cc_len,
cc_str2, "%s (%s)", cc_str, cc_str2);
diff --git a/epan/dissectors/packet-pflog.c b/epan/dissectors/packet-pflog.c
index 4c26990a27..f4230c6693 100644
--- a/epan/dissectors/packet-pflog.c
+++ b/epan/dissectors/packet-pflog.c
@@ -178,7 +178,7 @@ dissect_pflog(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
proto_tree_add_item(pflog_tree, hf_pflog_reason, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- proto_tree_add_item_ret_string(pflog_tree, hf_pflog_ifname, tvb, offset, 16, ENC_ASCII|ENC_NA, wmem_packet_scope(), &ifname);
+ proto_tree_add_item_ret_string(pflog_tree, hf_pflog_ifname, tvb, offset, 16, ENC_ASCII|ENC_NA, pinfo->pool, &ifname);
offset += 16;
proto_tree_add_item(pflog_tree, hf_pflog_ruleset, tvb, offset, 16, ENC_ASCII|ENC_NA);
@@ -422,7 +422,7 @@ dissect_old_pflog(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
af = tvb_get_ntohl(tvb, offset);
offset +=4;
- proto_tree_add_item_ret_string(pflog_tree, hf_old_pflog_ifname, tvb, offset, 16, ENC_ASCII|ENC_NA, wmem_packet_scope(), &ifname);
+ proto_tree_add_item_ret_string(pflog_tree, hf_old_pflog_ifname, tvb, offset, 16, ENC_ASCII|ENC_NA, pinfo->pool, &ifname);
offset +=16;
proto_tree_add_item(pflog_tree, hf_old_pflog_rnr, tvb, offset, 2, ENC_BIG_ENDIAN);
diff --git a/epan/dissectors/packet-pim.c b/epan/dissectors/packet-pim.c
index 47e98405e2..4a9b28f13d 100644
--- a/epan/dissectors/packet-pim.c
+++ b/epan/dissectors/packet-pim.c
@@ -1368,7 +1368,7 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
tigroup=proto_tree_add_string_format(pimopt_tree, hf_pim_group, tvb, offset, -1, "", "Group %d", i);
grouptree = proto_item_add_subtree(tigroup, ett_pim);
if (!dissect_pim_addr(grouptree, tvb, offset, pimv2_group,
- wmem_strdup_printf(wmem_packet_scope(), "Group %d", i), NULL,
+ wmem_strdup_printf(pinfo->pool, "Group %d", i), NULL,
hf_pim_group_ip4, hf_pim_group_ip6, &advance))
goto breakbreak3;
@@ -1428,7 +1428,7 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
for (i = 0; tvb_reported_length_remaining(tvb, offset) > 0; i++) {
if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_group,
- wmem_strdup_printf(wmem_packet_scope(), "Group %d", i), &tigroup,
+ wmem_strdup_printf(pinfo->pool, "Group %d", i), &tigroup,
hf_pim_group_ip4, hf_pim_group_ip6, &advance))
goto breakbreak4;
@@ -1443,7 +1443,7 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
for (j = 0; j < frpcnt; j++) {
if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_unicast,
- wmem_strdup_printf(wmem_packet_scope(), "RP %d", j), NULL,
+ wmem_strdup_printf(pinfo->pool, "RP %d", j), NULL,
hf_pim_rp_ip4, hf_pim_rp_ip6, &advance))
goto breakbreak4;
@@ -1513,7 +1513,7 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
for (i = 0; i < pfxcnt; i++) {
if (!dissect_pim_addr(pimopt_tree, tvb, offset, pimv2_group,
- wmem_strdup_printf(wmem_packet_scope(), "Group %d", i), NULL,
+ wmem_strdup_printf(pinfo->pool, "Group %d", i), NULL,
hf_pim_group_ip4, hf_pim_group_ip6, &advance))
goto breakbreak8;
offset += advance;
diff --git a/epan/dissectors/packet-pingpongprotocol.c b/epan/dissectors/packet-pingpongprotocol.c
index cccbb72952..a4f3fc6a7d 100644
--- a/epan/dissectors/packet-pingpongprotocol.c
+++ b/epan/dissectors/packet-pingpongprotocol.c
@@ -115,7 +115,7 @@ dissect_pingpongprotocol_pong_message(tvbuff_t *message_tvb, proto_tree *message
static void
dissect_pingpongprotocol_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *pingpongprotocol_tree)
{
- tap_pingpongprotocol_rec_t* tap_rec = wmem_new0(wmem_packet_scope(), tap_pingpongprotocol_rec_t);
+ tap_pingpongprotocol_rec_t* tap_rec = wmem_new0(pinfo->pool, tap_pingpongprotocol_rec_t);
tap_rec->type = tvb_get_guint8(message_tvb, MESSAGE_TYPE_OFFSET);
tap_rec->size = tvb_get_ntohs(message_tvb, MESSAGE_LENGTH_OFFSET);
tap_rec->type_string = val_to_str_const(tap_rec->type, message_type_values, "Unknown PingPongProtocol message type");
diff --git a/epan/dissectors/packet-pktc.c b/epan/dissectors/packet-pktc.c
index b9493dfa9f..961f0ad0c6 100644
--- a/epan/dissectors/packet-pktc.c
+++ b/epan/dissectors/packet-pktc.c
@@ -371,7 +371,7 @@ dissect_pktc_ap_reply(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int o
proto_tree_add_uint_format(tree, hf_pktc_sec_param_lifetime, tvb, offset, 4,
tvb_get_ntohl(tvb, offset), "%s: %s",
proto_registrar_get_name(hf_pktc_sec_param_lifetime),
- signed_time_secs_to_str(wmem_packet_scope(), tvb_get_ntohl(tvb, offset)));
+ signed_time_secs_to_str(pinfo->pool, tvb_get_ntohl(tvb, offset)));
offset+=4;
/* grace period */
@@ -422,7 +422,7 @@ dissect_pktc_rekey(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offs
/* Timestamp: YYMMDDhhmmssZ */
/* They really came up with a two-digit year in late 1990s! =8o */
- timestr=tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 13, ENC_ASCII);
+ timestr=tvb_get_string_enc(pinfo->pool, tvb, offset, 13, ENC_ASCII);
proto_tree_add_string_format_value(tree, hf_pktc_timestamp, tvb, offset, 13, timestr,
"%.2s-%.2s-%.2s %.2s:%.2s:%.2s",
timestr, timestr+2, timestr+4, timestr+6, timestr+8, timestr+10);
diff --git a/epan/dissectors/packet-pop.c b/epan/dissectors/packet-pop.c
index f1d3f4d8f3..61511c0dc6 100644
--- a/epan/dissectors/packet-pop.c
+++ b/epan/dissectors/packet-pop.c
@@ -167,7 +167,7 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
* Find the end of the first line.
*/
linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, FALSE);
- line = (guchar*)wmem_alloc(wmem_packet_scope(), linelen+1);
+ line = (guchar*)wmem_alloc(pinfo->pool, linelen+1);
tvb_memcpy(tvb, line, offset, linelen);
line[linelen] = '\0';
@@ -192,7 +192,7 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
}
else
col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s", is_request ? "C" : "S",
- format_text(wmem_packet_scope(), line, linelen));
+ format_text(pinfo->pool, line, linelen));
ti = proto_tree_add_item(tree, proto_pop, tvb, offset, -1, ENC_NA);
pop_tree = proto_item_add_subtree(ti, ett_pop);
@@ -344,13 +344,13 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
}
break;
case pop_arg_type_password:
- auth = wmem_new0(wmem_packet_scope(), tap_credential_t);
+ auth = wmem_new0(pinfo->pool, tap_credential_t);
auth->num = pinfo->num;
auth->username_num = data_val->username_num;
auth->password_hf_id = hf_pop_request_parameter;
auth->username = data_val->username;
auth->proto = "POP3";
- auth->info = wmem_strdup_printf(wmem_packet_scope(), "Username in packet %u", data_val->username_num);
+ auth->info = wmem_strdup_printf(pinfo->pool, "Username in packet %u", data_val->username_num);
tap_queue_packet(credentials_tap, pinfo, auth);
break;
default:
diff --git a/epan/dissectors/packet-ppi.c b/epan/dissectors/packet-ppi.c
index 9cf2fc9395..47085a6ad4 100644
--- a/epan/dissectors/packet-ppi.c
+++ b/epan/dissectors/packet-ppi.c
@@ -1171,7 +1171,7 @@ dissect_ppi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
while (fd_head) {
if (fd_head->tvb_data && fd_head->len) {
mpdu_count++;
- mpdu_str = wmem_strdup_printf(wmem_packet_scope(), "MPDU #%d", mpdu_count);
+ mpdu_str = wmem_strdup_printf(pinfo->pool, "MPDU #%d", mpdu_count);
next_tvb = tvb_new_chain(tvb, fd_head->tvb_data);
add_new_data_source(pinfo, next_tvb, mpdu_str);
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;
diff --git a/epan/dissectors/packet-pppoe.c b/epan/dissectors/packet-pppoe.c
index aff3002623..167b8054de 100644
--- a/epan/dissectors/packet-pppoe.c
+++ b/epan/dissectors/packet-pppoe.c
@@ -474,7 +474,7 @@ dissect_pppoe_tags(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tr
{
const guint8* str;
proto_tree_add_item_ret_string(pppoe_tree, hf_pppoed_tag_ac_name, tvb,
- tagstart+4, poe_tag_length, ENC_ASCII|ENC_NA, wmem_packet_scope(), &str);
+ tagstart+4, poe_tag_length, ENC_ASCII|ENC_NA, pinfo->pool, &str);
/* Show AC-Name in info column */
col_append_fstr(pinfo->cinfo, COL_INFO, " AC-Name='%s'", str);
}
diff --git a/epan/dissectors/packet-protobuf.c b/epan/dissectors/packet-protobuf.c
index 4b75287fce..3e11c57dfc 100644
--- a/epan/dissectors/packet-protobuf.c
+++ b/epan/dissectors/packet-protobuf.c
@@ -412,7 +412,7 @@ dissect_packed_repeated_field_values(tvbuff_t *tvb, guint start, guint length, p
case PROTOBUF_TYPE_SINT64:
case PROTOBUF_TYPE_BOOL:
case PROTOBUF_TYPE_ENUM:
- varint_list = wmem_list_new(wmem_packet_scope());
+ varint_list = wmem_list_new(pinfo->pool);
/* try to test all can parsed as varint */
while (offset < max_offset) {
@@ -424,7 +424,7 @@ dissect_packed_repeated_field_values(tvbuff_t *tvb, guint start, guint length, p
}
/* temporarily store varint info in the list */
- info = wmem_new(wmem_packet_scope(), protobuf_varint_tvb_info_t);
+ info = wmem_new(pinfo->pool, protobuf_varint_tvb_info_t);
info->offset = offset;
info->length = sub_value_length;
info->value = sub_value;
@@ -652,13 +652,13 @@ protobuf_dissect_field_value(proto_tree *value_tree, tvbuff_t *tvb, guint offset
proto_item_append_text(ti_field, " =");
/* FALLTHROUGH */
case PROTOBUF_TYPE_STRING:
- proto_tree_add_item_ret_display_string(value_tree, hf_protobuf_value_string, tvb, offset, length, ENC_UTF_8|ENC_NA, wmem_packet_scope(), &buf);
+ proto_tree_add_item_ret_display_string(value_tree, hf_protobuf_value_string, tvb, offset, length, ENC_UTF_8|ENC_NA, pinfo->pool, &buf);
proto_item_append_text(ti_field, "%s %s", prepend_text, buf);
if (is_top_level) {
col_append_fstr(pinfo->cinfo, COL_INFO, "=%s", buf);
}
if (hf_id_ptr) {
- ti = proto_tree_add_item_ret_display_string(pbf_tree, *hf_id_ptr, tvb, offset, length, ENC_UTF_8|ENC_NA, wmem_packet_scope(), &buf);
+ ti = proto_tree_add_item_ret_display_string(pbf_tree, *hf_id_ptr, tvb, offset, length, ENC_UTF_8|ENC_NA, pinfo->pool, &buf);
}
break;
@@ -1243,7 +1243,7 @@ dissect_protobuf_message(tvbuff_t *tvb, guint offset, guint length, packet_info
message_name = pbw_Descriptor_full_name(message_desc);
field_count = pbw_Descriptor_field_count(message_desc);
if (add_default_value && field_count > 0) {
- parsed_fields = wmem_alloc0_array(wmem_packet_scope(), int, field_count);
+ parsed_fields = wmem_alloc0_array(pinfo->pool, int, field_count);
}
}
@@ -1302,7 +1302,7 @@ dissect_protobuf_message(tvbuff_t *tvb, guint offset, guint length, packet_info
}
if (parsed_fields) {
- wmem_free(wmem_packet_scope(), parsed_fields);
+ wmem_free(pinfo->pool, parsed_fields);
}
}
@@ -1388,7 +1388,7 @@ dissect_protobuf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
message_info++; /* ignore first '/' */
}
- gchar** tmp_names = wmem_strsplit(wmem_packet_scope(), message_info, ",", 2);
+ gchar** tmp_names = wmem_strsplit(pinfo->pool, message_info, ",", 2);
gchar* method_name = (tmp_names[0]) ? tmp_names[0] : NULL;
gchar* direction_type = (method_name && tmp_names[1]) ? tmp_names[1] : NULL;
diff --git a/epan/dissectors/packet-proxy.c b/epan/dissectors/packet-proxy.c
index 036bc3aa0f..7f92801947 100644
--- a/epan/dissectors/packet-proxy.c
+++ b/epan/dissectors/packet-proxy.c
@@ -161,12 +161,12 @@ dissect_proxy_v2_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *proxy_tree,
break;
case PP2_SUBTYPE_SSL_VERSION: /* SSL Version */
proto_tree_add_item(tlv_tree, hf_proxy2_tlv_ssl_version, tvb, offset, length, ENC_ASCII|ENC_NA);
- proto_item_append_text(ti_tlv, ": %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII));
+ proto_item_append_text(ti_tlv, ": %s", tvb_get_string_enc(pinfo->pool, tvb, offset, length, ENC_ASCII));
offset += length;
break;
case PP2_SUBTYPE_SSL_CN: /* SSL CommonName */
proto_tree_add_item(tlv_tree, hf_proxy2_tlv_ssl_cn, tvb, offset, length, ENC_ASCII|ENC_NA);
- proto_item_append_text(ti_tlv, ": %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII));
+ proto_item_append_text(ti_tlv, ": %s", tvb_get_string_enc(pinfo->pool, tvb, offset, length, ENC_ASCII));
offset += length;
break;
case PP2_SUBTYPE_SSL_CIPHER: /* SSL Cipher */
diff --git a/epan/dissectors/packet-ptpip.c b/epan/dissectors/packet-ptpip.c
index 050a796458..990e8bd528 100644
--- a/epan/dissectors/packet-ptpip.c
+++ b/epan/dissectors/packet-ptpip.c
@@ -987,7 +987,7 @@ static void dissect_ptpIP_unicode_name(tvbuff_t *tvb, packet_info *pinfo, proto_
gint nameLen;
nameLen = tvb_unicode_strsize(tvb, *offset);
- proto_tree_add_item_ret_string(tree, hf_ptpIP_name, tvb, *offset, nameLen, ENC_UTF_16|ENC_LITTLE_ENDIAN, wmem_packet_scope(), &name);
+ proto_tree_add_item_ret_string(tree, hf_ptpIP_name, tvb, *offset, nameLen, ENC_UTF_16|ENC_LITTLE_ENDIAN, pinfo->pool, &name);
*offset += nameLen;
col_append_fstr(pinfo->cinfo, COL_INFO, " Name: %s", name);
}
@@ -1018,7 +1018,7 @@ static void dissect_ptpIP_guid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
{
guint8 *guid;
- guid = tvb_bytes_to_str(wmem_packet_scope(), tvb, *offset, PTPIP_GUID_SIZE);
+ guid = tvb_bytes_to_str(pinfo->pool, tvb, *offset, PTPIP_GUID_SIZE);
proto_tree_add_item(tree, hf_ptpIP_guid, tvb, *offset, PTPIP_GUID_SIZE, ENC_NA);
*offset += PTPIP_GUID_SIZE;
col_append_fstr(
diff --git a/epan/dissectors/packet-qnet6.c b/epan/dissectors/packet-qnet6.c
index 9cd324cbd2..4c211345b0 100644
--- a/epan/dissectors/packet-qnet6.c
+++ b/epan/dissectors/packet-qnet6.c
@@ -1577,7 +1577,7 @@ dissect_qnet6_lr(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, gint *
*/
if (i != 2 && i != 5)
{
- name[i] = tvb_get_string_enc(wmem_packet_scope(),
+ name[i] = tvb_get_string_enc(pinfo->pool,
tvb,
addr_data_offset,
len,
diff --git a/epan/dissectors/packet-quake3.c b/epan/dissectors/packet-quake3.c
index 1a517a233d..1f46c10406 100644
--- a/epan/dissectors/packet-quake3.c
+++ b/epan/dissectors/packet-quake3.c
@@ -156,7 +156,7 @@ dissect_quake3_ConnectionlessPacket(tvbuff_t *tvb, packet_info *pinfo _U_,
* XXX - are non-ASCII characters supported and, if so, what
* encoding is used for them?
*/
- text = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &len, ENC_ASCII|ENC_NA);
+ text = tvb_get_stringz_enc(pinfo->pool, tvb, offset, &len, ENC_ASCII|ENC_NA);
if (cl_tree) {
text_item = proto_tree_add_string(cl_tree,
hf_quake3_connectionless_text,
diff --git a/epan/dissectors/packet-r09.c b/epan/dissectors/packet-r09.c
index 44ef8b85e1..fcdc9c1c16 100644
--- a/epan/dissectors/packet-r09.c
+++ b/epan/dissectors/packet-r09.c
@@ -82,7 +82,7 @@ dissect_r09(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
ib2 = tvb_get_guint8(tvb, 1);
tl = ib2 & 0x0F;
- r09x_str = wmem_strdup_printf(wmem_packet_scope(), "R09.%u%u", ty, tl);
+ r09x_str = wmem_strdup_printf(pinfo->pool, "R09.%u%u", ty, tl);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s", r09x_str);
ti = proto_tree_add_protocol_format(tree, proto_r09, tvb, 0, -1, "%s", r09x_str);
@@ -116,19 +116,19 @@ dissect_r09(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
if (tl >= 3) {
/* Zusatzbyte 2, 3 */
- ln_str = tvb_get_bcd_string(wmem_packet_scope(), tvb, 4, 2, &Dgt1_9_bcd, TRUE, FALSE, TRUE);
+ ln_str = tvb_get_bcd_string(pinfo->pool, tvb, 4, 2, &Dgt1_9_bcd, TRUE, FALSE, TRUE);
proto_tree_add_string(r09_tree, hf_r09_ln, tvb, 4, 2, ln_str);
}
if (tl >= 4) {
/* Zusatzbyte 4 */
- kn_str = tvb_get_bcd_string(wmem_packet_scope(), tvb, 6, 1, &Dgt1_9_bcd, FALSE, FALSE, TRUE);
+ kn_str = tvb_get_bcd_string(pinfo->pool, tvb, 6, 1, &Dgt1_9_bcd, FALSE, FALSE, TRUE);
proto_tree_add_string(r09_tree, hf_r09_kn, tvb, 6, 1, kn_str);
}
if (tl >= 6) {
/* Zusatzbyte 5, 6 */
- zn_str = tvb_get_bcd_string(wmem_packet_scope(), tvb, 7, 2, &Dgt1_9_bcd, FALSE, TRUE, TRUE);
+ zn_str = tvb_get_bcd_string(pinfo->pool, tvb, 7, 2, &Dgt1_9_bcd, FALSE, TRUE, TRUE);
proto_tree_add_string(r09_tree, hf_r09_zn, tvb, 7, 2, zn_str);
}
@@ -139,9 +139,9 @@ dissect_r09(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
if (tl == 8) {
/* Zusatzbyte 6, 7, 8 */
- fn_str = tvb_get_bcd_string(wmem_packet_scope(), tvb, 8, 2, &Dgt1_9_bcd, TRUE, FALSE, TRUE);
+ fn_str = tvb_get_bcd_string(pinfo->pool, tvb, 8, 2, &Dgt1_9_bcd, TRUE, FALSE, TRUE);
proto_tree_add_string(r09_tree, hf_r09_fn, tvb, 8, 2, fn_str);
- un_str = tvb_get_bcd_string(wmem_packet_scope(), tvb, 10, 1, &Dgt1_9_bcd, FALSE, FALSE, TRUE);
+ un_str = tvb_get_bcd_string(pinfo->pool, tvb, 10, 1, &Dgt1_9_bcd, FALSE, FALSE, TRUE);
proto_tree_add_string(r09_tree, hf_r09_un, tvb, 10, 1, un_str);
}
diff --git a/epan/dissectors/packet-raknet.c b/epan/dissectors/packet-raknet.c
index 2170e07f64..df5d198f56 100644
--- a/epan/dissectors/packet-raknet.c
+++ b/epan/dissectors/packet-raknet.c
@@ -282,7 +282,7 @@ raknet_dissect_system_address(proto_tree *tree, int hf,
*/
v4_addr = ~tvb_get_ipv4(tvb, *offset);
set_address(&addr, AT_IPv4, sizeof(v4_addr), &v4_addr);
- addr_str = address_to_display(wmem_packet_scope(), &addr);
+ addr_str = address_to_display(pinfo->pool, &addr);
proto_tree_add_ipv4(sub_tree, hf_raknet_ipv4_address, tvb, *offset + 1, 4, v4_addr);
*offset += 4;
port = tvb_get_ntohs(tvb, *offset);
@@ -1028,7 +1028,7 @@ raknet_dissect_common_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rak
*/
wmem_strbuf_t *strbuf;
- strbuf = wmem_strbuf_new(wmem_packet_scope(), "");
+ strbuf = wmem_strbuf_new(pinfo->pool, "");
wmem_strbuf_append_printf(strbuf,
"{Message fragment %" G_GUINT32_FORMAT "/%" G_GUINT32_FORMAT "; Reassembled} ",
split_packet_index + 1, split_packet_count);
@@ -1042,7 +1042,7 @@ raknet_dissect_common_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rak
else {
wmem_strbuf_t *strbuf;
- strbuf = wmem_strbuf_new(wmem_packet_scope(), "");
+ strbuf = wmem_strbuf_new(pinfo->pool, "");
wmem_strbuf_append_printf(strbuf,
"{Message fragment %" G_GUINT32_FORMAT "/%" G_GUINT32_FORMAT "}",
split_packet_index + 1, split_packet_count);
diff --git a/epan/dissectors/packet-rdp.c b/epan/dissectors/packet-rdp.c
index 54ba647cbd..cb8b26ae23 100644
--- a/epan/dissectors/packet-rdp.c
+++ b/epan/dissectors/packet-rdp.c
@@ -1153,7 +1153,7 @@ dissect_rdp_clientNetworkData(tvbuff_t *tvb, int offset, packet_info *pinfo, pro
if (rdp_info) {
rdp_channel_def_t *channel = &rdp_info->staticChannels[i];
channel->value = -1; /* unset */
- channel->strptr = tvb_get_string_enc(wmem_packet_scope(), tvb,
+ channel->strptr = tvb_get_string_enc(pinfo->pool, tvb,
offset, 8, ENC_ASCII);
channel->channelType = find_known_channel_by_name(
channel->strptr);
@@ -2396,9 +2396,9 @@ dissect_rdp_cr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, TRUE);
proto_tree_add_item_ret_string(tree, hf_rdp_rt_cookie, tvb, offset,
linelen, ENC_ASCII|ENC_NA,
- wmem_packet_scope(), &stringval);
+ pinfo->pool, &stringval);
offset = (linelen == -1) ? (gint)tvb_captured_length(tvb) : next_offset;
- col_append_str(pinfo->cinfo, COL_INFO, format_text(wmem_packet_scope(), stringval, strlen(stringval)));
+ col_append_str(pinfo->cinfo, COL_INFO, format_text(pinfo->pool, stringval, strlen(stringval)));
sep = ", ";
}
/*
diff --git a/epan/dissectors/packet-reload-framing.c b/epan/dissectors/packet-reload-framing.c
index a23e7f4436..6e7bf77639 100644
--- a/epan/dissectors/packet-reload-framing.c
+++ b/epan/dissectors/packet-reload-framing.c
@@ -264,7 +264,7 @@ dissect_reload_framing_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
if (!reload_frame) {
/* create a "fake" pana_trans structure */
- reload_frame = wmem_new(wmem_packet_scope(), reload_frame_t);
+ reload_frame = wmem_new(pinfo->pool, reload_frame_t);
reload_frame->data_frame = (type==DATA) ? pinfo->num : 0;
reload_frame->ack_frame = (type!=DATA) ? pinfo->num : 0;
reload_frame->req_time = pinfo->abs_ts;
diff --git a/epan/dissectors/packet-reload.c b/epan/dissectors/packet-reload.c
index 3ef3e0c398..551502d60e 100644
--- a/epan/dissectors/packet-reload.c
+++ b/epan/dissectors/packet-reload.c
@@ -3774,7 +3774,7 @@ extern gint dissect_reload_messagecontents(tvbuff_t *tvb, packet_info *pinfo, pr
if (error_code <= 19) {
guint16 info_length = tvb_get_ntohs(tvb,offset+2);
if (info_length>0) {
- proto_item_append_text(ti_error, " (%s)", tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, info_length, ENC_ASCII));
+ proto_item_append_text(ti_error, " (%s)", tvb_get_string_enc(pinfo->pool, tvb, offset+4, info_length, ENC_ASCII));
}
}
break;
@@ -4146,7 +4146,7 @@ dissect_reload_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
if (!reload_trans) {
/* create a "fake" pana_trans structure */
- reload_trans = wmem_new(wmem_packet_scope(), reload_transaction_t);
+ reload_trans = wmem_new(pinfo->pool, reload_transaction_t);
reload_trans->req_frame = 0;
reload_trans->rep_frame = 0;
reload_trans->req_time = pinfo->abs_ts;
diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c
index ea1d255921..c576f30bb6 100644
--- a/epan/dissectors/packet-rlc-lte.c
+++ b/epan/dissectors/packet-rlc-lte.c
@@ -2918,7 +2918,7 @@ static void dissect_rlc_lte_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree
struct rlc_lte_info *p_rlc_lte_info;
/* Allocate and Zero tap struct */
- rlc_lte_tap_info *tap_info = wmem_new0(wmem_packet_scope(), rlc_lte_tap_info);
+ rlc_lte_tap_info *tap_info = wmem_new0(pinfo->pool, rlc_lte_tap_info);
/* Set protocol name */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RLC-LTE");
diff --git a/epan/dissectors/packet-rlogin.c b/epan/dissectors/packet-rlogin.c
index b903c8ced0..91a0b473c3 100644
--- a/epan/dissectors/packet-rlogin.c
+++ b/epan/dissectors/packet-rlogin.c
@@ -288,7 +288,7 @@ static void rlogin_display(rlogin_hash_entry_t *hash_info,
/* Terminal speed */
str_len = tvb_strsize(tvb, offset);
- str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, str_len,
+ str = tvb_get_string_enc(pinfo->pool, tvb, offset, str_len,
ENC_NA|ENC_ASCII);
term_len_valid = ws_strtou32(str, NULL, &term_len);
pi = proto_tree_add_uint(user_info_tree,
diff --git a/epan/dissectors/packet-rmt-lct.c b/epan/dissectors/packet-rmt-lct.c
index 4b6a317238..10fbf3b49f 100644
--- a/epan/dissectors/packet-rmt-lct.c
+++ b/epan/dissectors/packet-rmt-lct.c
@@ -433,7 +433,7 @@ dissect_lct(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
if (toi_size <= 8)
col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "TOI: %" G_GINT64_MODIFIER "u", toi);
else
- col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "TOI: 0x%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, toi_size));
+ col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "TOI: 0x%s", tvb_bytes_to_str(pinfo->pool, tvb, offset, toi_size));
offset += toi_size;
}
diff --git a/epan/dissectors/packet-rohc.c b/epan/dissectors/packet-rohc.c
index 320778b1b5..b8aea424ac 100644
--- a/epan/dissectors/packet-rohc.c
+++ b/epan/dissectors/packet-rohc.c
@@ -1148,7 +1148,7 @@ dissect_rohc_feedback_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
if(!rohc_cid_context){
if (cid_context) {
/* Reuse info coming from private data */
- rohc_cid_context = wmem_new(wmem_packet_scope(), rohc_cid_context_t);
+ rohc_cid_context = wmem_new(pinfo->pool, rohc_cid_context_t);
/*rohc_cid_context->d_mode;*/
rohc_cid_context->rnd = p_rohc_info->rnd;
rohc_cid_context->udp_checksum_present = p_rohc_info->udp_checksum_present;
diff --git a/epan/dissectors/packet-rpcap.c b/epan/dissectors/packet-rpcap.c
index 0e4876b687..da76d3c873 100644
--- a/epan/dissectors/packet-rpcap.c
+++ b/epan/dissectors/packet-rpcap.c
@@ -372,11 +372,11 @@ dissect_rpcap_error (tvbuff_t *tvb, packet_info *pinfo,
return;
col_append_fstr (pinfo->cinfo, COL_INFO, ": %s",
- tvb_format_text_wsp (wmem_packet_scope(), tvb, offset, len));
+ tvb_format_text_wsp (pinfo->pool, tvb, offset, len));
ti = proto_tree_add_item (parent_tree, hf_error, tvb, offset, len, ENC_ASCII|ENC_NA);
expert_add_info_format(pinfo, ti, &ei_error,
- "Error: %s", tvb_format_text_wsp (wmem_packet_scope(), tvb, offset, len));
+ "Error: %s", tvb_format_text_wsp (pinfo->pool, tvb, offset, len));
}
@@ -480,7 +480,7 @@ dissect_rpcap_findalldevs_if (tvbuff_t *tvb, packet_info *pinfo _U_,
if (namelen) {
const guint8* name;
- proto_tree_add_item_ret_string(tree, hf_if_name, tvb, offset, namelen, ENC_ASCII|ENC_NA, wmem_packet_scope(), &name);
+ proto_tree_add_item_ret_string(tree, hf_if_name, tvb, offset, namelen, ENC_ASCII|ENC_NA, pinfo->pool, &name);
proto_item_append_text (ti, ": %s", name);
offset += namelen;
}
@@ -647,10 +647,10 @@ dissect_rpcap_auth_request (tvbuff_t *tvb, packet_info *pinfo _U_,
} else if (type == RPCAP_RMTAUTH_PWD) {
const guint8 *username, *password;
- proto_tree_add_item_ret_string(tree, hf_auth_username, tvb, offset, slen1, ENC_ASCII|ENC_NA, wmem_packet_scope(), &username);
+ proto_tree_add_item_ret_string(tree, hf_auth_username, tvb, offset, slen1, ENC_ASCII|ENC_NA, pinfo->pool, &username);
offset += slen1;
- proto_tree_add_item_ret_string(tree, hf_auth_password, tvb, offset, slen2, ENC_ASCII|ENC_NA, wmem_packet_scope(), &password);
+ proto_tree_add_item_ret_string(tree, hf_auth_password, tvb, offset, slen2, ENC_ASCII|ENC_NA, pinfo->pool, &password);
offset += slen2;
proto_item_append_text (ti, " (%s/%s)", username, password);
@@ -742,7 +742,7 @@ dissect_rpcap_startcap_request (tvbuff_t *tvb, packet_info *pinfo,
proto_tree_add_item (field_tree, hf_flags_outbound, tvb, offset, 2, ENC_BIG_ENDIAN);
if (flags & 0x1F) {
- gchar *flagstr = wmem_strdup_printf (wmem_packet_scope(), "%s%s%s%s%s",
+ gchar *flagstr = wmem_strdup_printf (pinfo->pool, "%s%s%s%s%s",
(flags & FLAG_PROMISC) ? ", Promiscuous" : "",
(flags & FLAG_DGRAM) ? ", Datagram" : "",
(flags & FLAG_SERVEROPEN) ? ", ServerOpen" : "",
diff --git a/epan/dissectors/packet-rsh.c b/epan/dissectors/packet-rsh.c
index 9592a28ebc..3fe31a111e 100644
--- a/epan/dissectors/packet-rsh.c
+++ b/epan/dissectors/packet-rsh.c
@@ -222,7 +222,7 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if(hash_info->state == WAIT_FOR_STDERR_PORT
&& tvb_reported_length_remaining(tvb, offset)){
- field_stringz = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &length, ENC_ASCII);
+ field_stringz = tvb_get_stringz_enc(pinfo->pool, tvb, offset, &length, ENC_ASCII);
/* Check if this looks like the stderr_port field.
* It is optional, so it may only be 1 character long
@@ -245,7 +245,7 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if(hash_info->state == WAIT_FOR_CLIENT_USERNAME
&& tvb_reported_length_remaining(tvb, offset)){
- field_stringz = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &length, ENC_ASCII);
+ field_stringz = tvb_get_stringz_enc(pinfo->pool, tvb, offset, &length, ENC_ASCII);
/* Check if this looks like the username field */
if(length != 1 && length <= RSH_CLIENT_USERNAME_LEN
@@ -273,7 +273,7 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if(hash_info->state == WAIT_FOR_SERVER_USERNAME
&& tvb_reported_length_remaining(tvb, offset)){
- field_stringz = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &length, ENC_ASCII);
+ field_stringz = tvb_get_stringz_enc(pinfo->pool, tvb, offset, &length, ENC_ASCII);
/* Check if this looks like the password field */
if(length != 1 && length <= RSH_SERVER_USERNAME_LEN
@@ -298,7 +298,7 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if(hash_info->state == WAIT_FOR_COMMAND
&& tvb_reported_length_remaining(tvb, offset)){
- field_stringz = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &length, ENC_ASCII);
+ field_stringz = tvb_get_stringz_enc(pinfo->pool, tvb, offset, &length, ENC_ASCII);
/* Check if this looks like the command field */
if(length != 1 && length <= RSH_COMMAND_LEN
diff --git a/epan/dissectors/packet-rsync.c b/epan/dissectors/packet-rsync.c
index 384414be7d..8497701e89 100644
--- a/epan/dissectors/packet-rsync.c
+++ b/epan/dissectors/packet-rsync.c
@@ -122,7 +122,7 @@ dissect_rsync_version_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rsyn
offset += 1; /* skip the space */
proto_tree_add_item(rsync_tree, &hfi_rsync_hdr_version, tvb, offset, -1, ENC_ASCII|ENC_NA);
len = tvb_reported_length_remaining(tvb, offset);
- version = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII|ENC_NA);
+ version = tvb_get_string_enc(pinfo->pool, tvb, offset, len, ENC_ASCII|ENC_NA);
/* VERSION string can contain undesirable char (like \n) at the end. Trim it. */
if (len > 0 && version[len - 1] == '\n')
diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c
index 3e08adbfff..cfcbd03b18 100644
--- a/epan/dissectors/packet-rtcp.c
+++ b/epan/dissectors/packet-rtcp.c
@@ -1277,8 +1277,8 @@ dissect_rtcp_rtpfb_transport_cc( tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree_add_item_ret_uint( fci_tree, hf_rtcp_rtpfb_transport_cc_fci_pkt_stats_cnt, tvb, offset, 2, ENC_BIG_ENDIAN, &pkt_count );
offset += 2;
- delta_array = wmem_alloc0_array( wmem_packet_scope(), gint8, pkt_count );
- pkt_seq_array = wmem_alloc0_array( wmem_packet_scope(), gint16, pkt_count );
+ delta_array = wmem_alloc0_array( pinfo->pool, gint8, pkt_count );
+ pkt_seq_array = wmem_alloc0_array( pinfo->pool, gint16, pkt_count );
/* reference time */
proto_tree_add_item( fci_tree, hf_rtcp_rtpfb_transport_cc_fci_ref_time, tvb, offset, 3, ENC_BIG_ENDIAN );
@@ -1353,7 +1353,7 @@ dissect_rtcp_rtpfb_transport_cc( tvbuff_t *tvb, int offset, packet_info *pinfo,
}
else
{
- wmem_strbuf_t* status = wmem_strbuf_new(wmem_packet_scope(), "|");
+ wmem_strbuf_t* status = wmem_strbuf_new(pinfo->pool, "|");
/* Status Vector Chunk, first bit is one */
if ( !(chunk & 0x4000) )
@@ -1870,7 +1870,7 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
if (item_len != 8) /* SHALL be 8 */
return offset;
- proto_tree_add_item_ret_time_string(PoC1_tree, hf_rtcp_app_poc1_request_ts, tvb, offset, 8, ENC_TIME_NTP | ENC_BIG_ENDIAN, wmem_packet_scope(), &buff);
+ proto_tree_add_item_ret_time_string(PoC1_tree, hf_rtcp_app_poc1_request_ts, tvb, offset, 8, ENC_TIME_NTP | ENC_BIG_ENDIAN, pinfo->pool, &buff);
offset += 8;
@@ -1983,7 +1983,7 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
offset++;
col_append_fstr(pinfo->cinfo, COL_INFO, " CNAME=\"%s\"",
- tvb_get_string_enc(wmem_packet_scope(), tvb, offset, item_len, ENC_ASCII));
+ tvb_get_string_enc(pinfo->pool, tvb, offset, item_len, ENC_ASCII));
offset += item_len;
packet_len = packet_len - item_len - 1;
@@ -2014,7 +2014,7 @@ dissect_rtcp_app_poc1(tvbuff_t* tvb, packet_info* pinfo, int offset, proto_tree*
offset++;
col_append_fstr(pinfo->cinfo, COL_INFO, " DISPLAY-NAME=\"%s\"",
- tvb_get_string_enc(wmem_packet_scope(), tvb, offset, item_len, ENC_ASCII));
+ tvb_get_string_enc(pinfo->pool, tvb, offset, item_len, ENC_ASCII));
offset += item_len;
packet_len = packet_len - item_len - 1;
@@ -2860,7 +2860,7 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree
/* Application Name (ASCII) */
is_ascii = tvb_ascii_isprint(tvb, offset, 4);
if (is_ascii) {
- proto_tree_add_item_ret_string(tree, hf_rtcp_name_ascii, tvb, offset, 4, ENC_ASCII | ENC_NA, wmem_packet_scope(), &ascii_name);
+ proto_tree_add_item_ret_string(tree, hf_rtcp_name_ascii, tvb, offset, 4, ENC_ASCII | ENC_NA, pinfo->pool, &ascii_name);
} else {
proto_tree_add_expert(tree, pinfo, &ei_rtcp_appl_not_ascii, tvb, offset, 4);
}
@@ -4272,7 +4272,7 @@ static void add_roundtrip_delay_info(tvbuff_t *tvb, packet_info *pinfo, proto_tr
/* Report delay in INFO column */
col_append_fstr(pinfo->cinfo, COL_INFO,
" (roundtrip delay <-> %s = %dms, using frame %u) ",
- address_to_str(wmem_packet_scope(), &pinfo->net_src), delay, frame);
+ address_to_str(pinfo->pool, &pinfo->net_src), delay, frame);
}
static int
diff --git a/epan/dissectors/packet-rtitcp.c b/epan/dissectors/packet-rtitcp.c
index 04c3fd56b1..120ea96350 100644
--- a/epan/dissectors/packet-rtitcp.c
+++ b/epan/dissectors/packet-rtitcp.c
@@ -360,10 +360,10 @@ static guint dissect_attribute(tvbuff_t *tvb, packet_info *pinfo,
}
proto_item_append_text(rtitcp_message, "%s%s",
(*first_attribute) ? "" : ", ",
- tvb_bytes_to_str(wmem_packet_scope(), tvb, attributes_list_offset+offset+4, 16));
+ tvb_bytes_to_str(pinfo->pool, tvb, attributes_list_offset+offset+4, 16));
col_append_fstr(pinfo->cinfo, COL_INFO, "%s%s",
(*first_attribute) ? "" : ", ",
- tvb_bytes_to_str(wmem_packet_scope(), tvb, attributes_list_offset+offset+4, 16));
+ tvb_bytes_to_str(pinfo->pool, tvb, attributes_list_offset+offset+4, 16));
(*first_attribute) = FALSE;
break;
}
@@ -506,7 +506,7 @@ static guint16 dissect_control_message(proto_tree *rtitcp_tree, tvbuff_t *tvb, p
/* Now we dissect the transaction id */
proto_tree_add_item(rtitcp_message, hf_rtitcp_control_transaction_id, tvb, offset, 12, ENC_NA);
- transaction_id_str = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 12);
+ transaction_id_str = tvb_bytes_to_str(pinfo->pool, tvb, offset, 12);
/* Get the transaction identifier. Not the whole transaction but the middle part, which
* shouldn't coincide */
@@ -552,7 +552,7 @@ static guint16 dissect_control_message(proto_tree *rtitcp_tree, tvbuff_t *tvb, p
}
if (!rtitcp_trans) {
/* create a "fake" rtitcp_trans structure */
- rtitcp_trans=wmem_new(wmem_packet_scope(), rtitcp_transaction_t);
+ rtitcp_trans=wmem_new(pinfo->pool, rtitcp_transaction_t);
rtitcp_trans->req_frame = 0;
rtitcp_trans->rep_frame = 0;
rtitcp_trans->req_time = pinfo->abs_ts;
diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c
index 496b4ce1c5..9731e0303d 100644
--- a/epan/dissectors/packet-rtp.c
+++ b/epan/dissectors/packet-rtp.c
@@ -1067,7 +1067,7 @@ srtp_add_address(packet_info *pinfo, const port_type ptype, address *addr, int p
}
DPRINT(("#%u: %srtp_add_address(%d, %s, %u, %u, %s, %u)",
- pinfo->num, (srtp_info)?"s":"", ptype, address_to_str(wmem_packet_scope(), addr), port,
+ pinfo->num, (srtp_info)?"s":"", ptype, address_to_str(pinfo->pool, addr), port,
other_port, setup_method, setup_frame_number));
DINDENT();
@@ -1612,7 +1612,7 @@ dissect_rtp_rfc2198(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
payload_type_str = NULL;
/* Allocate and fill in header */
- hdr_new = wmem_new(wmem_packet_scope(), rfc2198_hdr);
+ hdr_new = wmem_new(pinfo->pool, rfc2198_hdr);
hdr_new->next = NULL;
octet1 = tvb_get_guint8(tvb, offset);
hdr_new->pt = RTP_PAYLOAD_TYPE(octet1);
diff --git a/epan/dissectors/packet-rtpproxy.c b/epan/dissectors/packet-rtpproxy.c
index 9bd3bf42d8..69bd95a40e 100644
--- a/epan/dissectors/packet-rtpproxy.c
+++ b/epan/dissectors/packet-rtpproxy.c
@@ -334,7 +334,7 @@ rtpproxy_add_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtpproxy_t
/* Extract the entire parameters line. */
/* Something like "t4p1iic8,0,2,4,18,96,97,98,100,101" */
- rawstr = tvb_get_string_enc(wmem_packet_scope(), tvb, begin, realsize, ENC_ASCII);
+ rawstr = tvb_get_string_enc(pinfo->pool, tvb, begin, realsize, ENC_ASCII);
while(offset < realsize){
ti = proto_tree_add_item(rtpproxy_tree, hf_rtpproxy_command_parameter, tvb, begin + offset, 1, ENC_ASCII | ENC_NA);
@@ -345,13 +345,13 @@ rtpproxy_add_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtpproxy_t
case 'c':
new_offset = (gint)strspn(rawstr+offset, "0123456789,");
another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_codecs);
- codecs = wmem_strsplit(wmem_packet_scope(), tvb_get_string_enc(wmem_packet_scope(), tvb, begin+offset, new_offset, ENC_ASCII), ",", 0);
+ codecs = wmem_strsplit(pinfo->pool, tvb_get_string_enc(pinfo->pool, tvb, begin+offset, new_offset, ENC_ASCII), ",", 0);
i = 0;
while(codecs[i]){
/* We assume strings < 2^32-1 bytes long. :-) */
codec_len = (guint)strlen(codecs[i]);
ti = proto_tree_add_uint(another_tree, hf_rtpproxy_command_parameter_codec, tvb, begin+offset, codec_len,
- (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(wmem_packet_scope(), tvb, begin+offset, codec_len, ENC_ASCII), NULL, 10));
+ (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(pinfo->pool, tvb, begin+offset, codec_len, ENC_ASCII), NULL, 10));
proto_item_append_text(ti, " (%s)", val_to_str_ext((guint)strtoul(tvb_format_text(tvb,begin+offset,codec_len),NULL,10), &rtp_payload_type_vals_ext, "Unknown"));
offset += codec_len;
if(codecs[i+1])
@@ -366,7 +366,7 @@ rtpproxy_add_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtpproxy_t
new_offset = (gint)strspn(rawstr+offset, "0123456789.");
if(new_offset){
another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_local);
- if(str_to_ip((char*)tvb_get_string_enc(wmem_packet_scope(), tvb, begin+offset, new_offset, ENC_ASCII), ipaddr))
+ if(str_to_ip((char*)tvb_get_string_enc(pinfo->pool, tvb, begin+offset, new_offset, ENC_ASCII), ipaddr))
proto_tree_add_ipv4(another_tree, hf_rtpproxy_command_parameter_local_ipv4, tvb, begin+offset, new_offset, ipaddr[0]);
else
proto_tree_add_expert(another_tree, pinfo, &ei_rtpproxy_bad_ipv4, tvb, begin+offset, new_offset);
@@ -376,7 +376,7 @@ rtpproxy_add_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtpproxy_t
case 'r':
new_offset = (gint)strspn(rawstr+offset, "0123456789.");
another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_remote);
- if(str_to_ip((char*)tvb_get_string_enc(wmem_packet_scope(), tvb, begin+offset, new_offset, ENC_ASCII), ipaddr))
+ if(str_to_ip((char*)tvb_get_string_enc(pinfo->pool, tvb, begin+offset, new_offset, ENC_ASCII), ipaddr))
proto_tree_add_ipv4(another_tree, hf_rtpproxy_command_parameter_remote_ipv4, tvb, begin+offset, new_offset, ipaddr[0]);
else
proto_tree_add_expert(another_tree, pinfo, &ei_rtpproxy_bad_ipv4, tvb, begin+offset, new_offset);
@@ -386,7 +386,7 @@ rtpproxy_add_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtpproxy_t
new_offset = (gint)strspn(rawstr+offset, "0123456789");
another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_repacketize);
proto_tree_add_uint(another_tree, hf_rtpproxy_command_parameter_repacketize, tvb, begin+offset, new_offset,
- (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(wmem_packet_scope(), tvb, begin+offset, new_offset, ENC_ASCII), NULL, 10));
+ (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(pinfo->pool, tvb, begin+offset, new_offset, ENC_ASCII), NULL, 10));
offset += new_offset;
break;
/* Unofficial long parameters */
@@ -394,7 +394,7 @@ rtpproxy_add_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtpproxy_t
new_offset = (gint)strspn(rawstr+offset, "0123456789");
another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_dtmf);
proto_tree_add_uint(another_tree, hf_rtpproxy_command_parameter_dtmf, tvb, begin+offset, new_offset,
- (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(wmem_packet_scope(), tvb, begin+offset, new_offset, ENC_ASCII), NULL, 10));
+ (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(pinfo->pool, tvb, begin+offset, new_offset, ENC_ASCII), NULL, 10));
if(rtpproxy_establish_conversation){
pt = (guint)strtoul(tvb_format_text(tvb,begin+offset,new_offset),NULL,10);
dissector_add_uint("rtp.pt", pt, rtp_events_handle);
@@ -415,7 +415,7 @@ rtpproxy_add_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtpproxy_t
new_offset = (gint)strspn(rawstr+offset, "0123456789");
another_tree = proto_item_add_subtree(ti, ett_rtpproxy_command_parameters_transcode);
ti = proto_tree_add_uint(another_tree, hf_rtpproxy_command_parameter_transcode, tvb, begin+offset, new_offset,
- (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(wmem_packet_scope(), tvb, begin+offset, new_offset, ENC_ASCII), NULL, 10));
+ (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(pinfo->pool, tvb, begin+offset, new_offset, ENC_ASCII), NULL, 10));
proto_item_append_text(ti, " (%s)", val_to_str_ext((guint)strtoul(tvb_format_text(tvb,begin+offset, new_offset),NULL,10), &rtp_payload_type_vals_ext, "Unknown"));
offset += new_offset;
break;
@@ -488,19 +488,19 @@ rtpproxy_add_notify_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtpproxy
}
/* We have ip:port */
if(ipv6){
- if(str_to_ip6((char*)tvb_get_string_enc(wmem_packet_scope(), tvb, begin, offset - begin, ENC_ASCII), ipaddr))
+ if(str_to_ip6((char*)tvb_get_string_enc(pinfo->pool, tvb, begin, offset - begin, ENC_ASCII), ipaddr))
proto_tree_add_ipv6(rtpproxy_tree, hf_rtpproxy_notify_ipv6, tvb, begin, offset - begin, (const ws_in6_addr*)ipaddr);
else
proto_tree_add_expert(rtpproxy_tree, pinfo, &ei_rtpproxy_bad_ipv6, tvb, begin, offset - begin);
}
else{
- if(str_to_ip((char*)tvb_get_string_enc(wmem_packet_scope(), tvb, begin, offset - begin, ENC_ASCII), ipaddr))
+ if(str_to_ip((char*)tvb_get_string_enc(pinfo->pool, tvb, begin, offset - begin, ENC_ASCII), ipaddr))
proto_tree_add_ipv4(rtpproxy_tree, hf_rtpproxy_notify_ipv4, tvb, begin, offset - begin, ipaddr[0]);
else
proto_tree_add_expert(rtpproxy_tree, pinfo, &ei_rtpproxy_bad_ipv4, tvb, begin, offset - begin);
}
proto_tree_add_uint(rtpproxy_tree, hf_rtpproxy_notify_port, tvb, offset+1, end - (offset+1),
- (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset+1, end - (offset+1), ENC_ASCII), NULL, 10));
+ (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(pinfo->pool, tvb, offset+1, end - (offset+1), ENC_ASCII), NULL, 10));
}
else{
proto_item *ti = NULL;
@@ -514,7 +514,7 @@ rtpproxy_add_notify_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtpproxy
if (ti) {
proto_item_set_generated(ti);
proto_tree_add_uint(rtpproxy_tree, hf_rtpproxy_notify_port, tvb, begin, end - begin,
- (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(wmem_packet_scope(), tvb, begin, end - begin, ENC_ASCII), NULL, 10));
+ (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(pinfo->pool, tvb, begin, end - begin, ENC_ASCII), NULL, 10));
}
}
}
@@ -563,7 +563,7 @@ dissect_rtpproxy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
ti = proto_tree_add_item(tree, proto_rtpproxy, tvb, 0, -1, ENC_NA);
rtpproxy_tree = proto_item_add_subtree(ti, ett_rtpproxy);
- proto_tree_add_item_ret_string(rtpproxy_tree, hf_rtpproxy_cookie, tvb, 0, offset, ENC_ASCII | ENC_NA, wmem_packet_scope(), &cookie);
+ proto_tree_add_item_ret_string(rtpproxy_tree, hf_rtpproxy_cookie, tvb, 0, offset, ENC_ASCII | ENC_NA, pinfo->pool, &cookie);
/* Skip whitespace */
offset = tvb_skip_wsp(tvb, offset+1, -1);
@@ -648,7 +648,7 @@ dissect_rtpproxy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
if ((tmp == 'v') && (offset + (gint)strlen("VF YYYYMMDD") <= realsize)){
/* Skip whitespace between "VF" and "YYYYMMDD" tokens */
new_offset = tvb_skip_wsp(tvb, offset + ((guint)strlen("VF") + 1), -1);
- ti = proto_tree_add_item_ret_string(rtpproxy_tree, hf_rtpproxy_version_request, tvb, new_offset, (gint)strlen("YYYYMMDD"), ENC_ASCII | ENC_NA, wmem_packet_scope(), &tmpstr);
+ ti = proto_tree_add_item_ret_string(rtpproxy_tree, hf_rtpproxy_version_request, tvb, new_offset, (gint)strlen("YYYYMMDD"), ENC_ASCII | ENC_NA, pinfo->pool, &tmpstr);
proto_item_append_text(ti, " (%s)", str_to_str(tmpstr, versiontypenames, "Unknown"));
break;
}
@@ -695,13 +695,13 @@ dissect_rtpproxy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
/* Extract IP */
new_offset = tvb_find_guint8(tvb, offset, -1, ' ');
if (tvb_find_guint8(tvb, offset, new_offset - offset, ':') == -1){
- if(str_to_ip((char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, new_offset - offset, ENC_ASCII), ipaddr))
+ if(str_to_ip((char*)tvb_get_string_enc(pinfo->pool, tvb, offset, new_offset - offset, ENC_ASCII), ipaddr))
proto_tree_add_ipv4(rtpproxy_tree, hf_rtpproxy_ipv4, tvb, offset, new_offset - offset, ipaddr[0]);
else
proto_tree_add_expert(rtpproxy_tree, pinfo, &ei_rtpproxy_bad_ipv4, tvb, offset, new_offset - offset);
}
else{
- if(str_to_ip6((char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, new_offset - offset, ENC_ASCII), ipaddr))
+ if(str_to_ip6((char*)tvb_get_string_enc(pinfo->pool, tvb, offset, new_offset - offset, ENC_ASCII), ipaddr))
proto_tree_add_ipv6(rtpproxy_tree, hf_rtpproxy_ipv6, tvb, offset, new_offset - offset, (const ws_in6_addr *)ipaddr);
else
proto_tree_add_expert(rtpproxy_tree, pinfo, &ei_rtpproxy_bad_ipv6, tvb, offset, new_offset - offset);
@@ -712,7 +712,7 @@ dissect_rtpproxy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
/* Extract Port */
new_offset = tvb_find_guint8(tvb, offset, -1, ' ');
proto_tree_add_uint(rtpproxy_tree, hf_rtpproxy_port, tvb, offset, new_offset - offset,
- (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, new_offset - offset, ENC_ASCII), NULL, 10));
+ (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(pinfo->pool, tvb, offset, new_offset - offset, ENC_ASCII), NULL, 10));
/* Skip whitespace */
offset = tvb_skip_wsp(tvb, new_offset+1, -1);
}
@@ -736,7 +736,7 @@ dissect_rtpproxy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
/* Extract codec */
new_offset = tvb_find_guint8(tvb, offset, -1, ' ');
proto_tree_add_uint(rtpproxy_tree, hf_rtpproxy_playback_codec, tvb, offset, new_offset - offset,
- (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, new_offset - offset, ENC_ASCII), NULL, 10));
+ (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(pinfo->pool, tvb, offset, new_offset - offset, ENC_ASCII), NULL, 10));
/* Skip whitespace */
offset = tvb_skip_wsp(tvb, new_offset+1, -1);
}
@@ -804,7 +804,7 @@ dissect_rtpproxy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
if (tmp == 'e'){
tmp = tvb_find_line_end(tvb, offset, -1, &new_offset, FALSE);
- tmpstr = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tmp, ENC_ASCII);
+ tmpstr = tvb_get_string_enc(pinfo->pool, tvb, offset, tmp, ENC_ASCII);
ti = proto_tree_add_item(rtpproxy_tree, hf_rtpproxy_error, tvb, offset, (gint)strlen(tmpstr), ENC_ASCII | ENC_NA);
proto_item_append_text(ti, " (%s)", str_to_str(tmpstr, errortypenames, "Unknown"));
break;
@@ -835,7 +835,7 @@ dissect_rtpproxy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
/* Extract Port */
new_offset = tvb_find_guint8(tvb, offset, -1, ' ');
/* Convert port to unsigned 16-bit number */
- port = (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, new_offset - offset, ENC_ASCII), NULL, 10);
+ port = (guint16) g_ascii_strtoull((gchar*)tvb_get_string_enc(pinfo->pool, tvb, offset, new_offset - offset, ENC_ASCII), NULL, 10);
proto_tree_add_uint(rtpproxy_tree, hf_rtpproxy_port, tvb, offset, new_offset - offset, port);
/* Skip whitespace */
offset = tvb_skip_wsp(tvb, new_offset+1, -1);
@@ -857,20 +857,20 @@ dissect_rtpproxy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
}
if (tvb_find_guint8(tvb, offset, -1, ':') == -1){
- if (str_to_ip((char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tmp, ENC_ASCII), ipaddr)){
+ if (str_to_ip((char*)tvb_get_string_enc(pinfo->pool, tvb, offset, tmp, ENC_ASCII), ipaddr)){
addr.type = AT_IPv4;
addr.len = 4;
- addr.data = wmem_memdup(wmem_packet_scope(), ipaddr, 4);
+ addr.data = wmem_memdup(pinfo->pool, ipaddr, 4);
proto_tree_add_ipv4(rtpproxy_tree, hf_rtpproxy_ipv4, tvb, offset, tmp, ipaddr[0]);
}
else
proto_tree_add_expert(rtpproxy_tree, pinfo, &ei_rtpproxy_bad_ipv4, tvb, offset, tmp);
}
else{
- if (str_to_ip6((char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tmp, ENC_ASCII), ipaddr)){
+ if (str_to_ip6((char*)tvb_get_string_enc(pinfo->pool, tvb, offset, tmp, ENC_ASCII), ipaddr)){
addr.type = AT_IPv6;
addr.len = 16;
- addr.data = wmem_memdup(wmem_packet_scope(), ipaddr, 16);
+ addr.data = wmem_memdup(pinfo->pool, ipaddr, 16);
proto_tree_add_ipv6(rtpproxy_tree, hf_rtpproxy_ipv6, tvb, offset, tmp, (const ws_in6_addr *)ipaddr);
}
else
diff --git a/epan/dissectors/packet-rtps-processed.c b/epan/dissectors/packet-rtps-processed.c
index 968db54107..92af5b1dce 100644
--- a/epan/dissectors/packet-rtps-processed.c
+++ b/epan/dissectors/packet-rtps-processed.c
@@ -302,7 +302,7 @@ static gint dissect_rtps_processed(
const gchar *colinfo = col_get_text(pinfo->cinfo, COL_INFO);
if (colinfo) {
info_w_encrypted = wmem_strbuf_new(
- wmem_packet_scope(),
+ pinfo->pool,
colinfo);
col_clear(pinfo->cinfo, COL_INFO);
}
@@ -323,7 +323,7 @@ static gint dissect_rtps_processed(
*/
if (pinfo->cinfo) {
const gchar *colinfo = col_get_text(pinfo->cinfo, COL_INFO);
- info_w_decrypted = wmem_strbuf_new(wmem_packet_scope(), "");
+ info_w_decrypted = wmem_strbuf_new(pinfo->pool, "");
if (colinfo) {
get_new_colinfo_w_submessages(
info_w_decrypted, /* out */
diff --git a/epan/dissectors/packet-rtps-virtual-transport.c b/epan/dissectors/packet-rtps-virtual-transport.c
index 90c65921b6..107b133506 100644
--- a/epan/dissectors/packet-rtps-virtual-transport.c
+++ b/epan/dissectors/packet-rtps-virtual-transport.c
@@ -495,7 +495,7 @@ static gint dissect_parameter_transport_rtps_type(
OFFSET_TO_VAL,
param_length);
const gchar *guid_string = bytestring_to_str(
- wmem_packet_scope(),
+ pinfo->pool,
guid_bytes,
MIN(param_length, 12),
0);
diff --git a/epan/dissectors/packet-rx.c b/epan/dissectors/packet-rx.c
index 6b0d2cfe15..a922066471 100644
--- a/epan/dissectors/packet-rx.c
+++ b/epan/dissectors/packet-rx.c
@@ -182,8 +182,8 @@ dissect_rx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
"Destination Port: %s ",
(unsigned long)seq,
(unsigned long)callnumber,
- udp_port_to_display(wmem_packet_scope(), pinfo->srcport),
- udp_port_to_display(wmem_packet_scope(), pinfo->destport)
+ udp_port_to_display(pinfo->pool, pinfo->srcport),
+ udp_port_to_display(pinfo->pool, pinfo->destport)
);
item = proto_tree_add_item(parent_tree, hf_rx_response, tvb, offset, -1, ENC_NA);
@@ -234,8 +234,8 @@ dissect_rx_abort(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
"Destination Port: %s ",
(unsigned long)seq,
(unsigned long)callnumber,
- udp_port_to_display(wmem_packet_scope(), pinfo->srcport),
- udp_port_to_display(wmem_packet_scope(), pinfo->destport)
+ udp_port_to_display(pinfo->pool, pinfo->srcport),
+ udp_port_to_display(pinfo->pool, pinfo->destport)
);
item = proto_tree_add_item(parent_tree, hf_rx_abort, tvb, offset, -1, ENC_NA);
@@ -266,8 +266,8 @@ dissect_rx_challenge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
"Destination Port: %s ",
(unsigned long)seq,
(unsigned long)callnumber,
- udp_port_to_display(wmem_packet_scope(), pinfo->srcport),
- udp_port_to_display(wmem_packet_scope(), pinfo->destport)
+ udp_port_to_display(pinfo->pool, pinfo->srcport),
+ udp_port_to_display(pinfo->pool, pinfo->destport)
);
item = proto_tree_add_item(parent_tree, hf_rx_challenge, tvb, offset, -1, ENC_NA);
@@ -383,8 +383,8 @@ dissect_rx_acks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
val_to_str(reason, rx_reason, "%d"),
(unsigned long)seq,
(unsigned long)callnumber,
- udp_port_to_display(wmem_packet_scope(), pinfo->srcport),
- udp_port_to_display(wmem_packet_scope(), pinfo->destport)
+ udp_port_to_display(pinfo->pool, pinfo->srcport),
+ udp_port_to_display(pinfo->pool, pinfo->destport)
);
proto_item_set_len(item, offset-old_offset);
@@ -524,8 +524,8 @@ dissect_rx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *dat
"Destination Port: %s ",
(unsigned long)seq,
(unsigned long)callnumber,
- udp_port_to_display(wmem_packet_scope(), pinfo->srcport),
- udp_port_to_display(wmem_packet_scope(), pinfo->destport)
+ udp_port_to_display(pinfo->pool, pinfo->srcport),
+ udp_port_to_display(pinfo->pool, pinfo->destport)
);
break;
case RX_PACKET_TYPE_VERSION:
@@ -544,8 +544,8 @@ dissect_rx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *dat
version_type,
(unsigned long)seq,
(unsigned long)callnumber,
- udp_port_to_display(wmem_packet_scope(), pinfo->srcport),
- udp_port_to_display(wmem_packet_scope(), pinfo->destport)
+ udp_port_to_display(pinfo->pool, pinfo->srcport),
+ udp_port_to_display(pinfo->pool, pinfo->destport)
);
break;
case RX_PACKET_TYPE_CHALLENGE:
diff --git a/epan/dissectors/packet-s7comm.c b/epan/dissectors/packet-s7comm.c
index a8d26e26d0..76a8708a73 100644
--- a/epan/dissectors/packet-s7comm.c
+++ b/epan/dissectors/packet-s7comm.c
@@ -3157,7 +3157,7 @@ s7comm_decode_pistart_parameters(tvbuff_t *tvb,
guint8 i;
guint8 len;
wmem_strbuf_t *args_buf;
- args_buf = wmem_strbuf_new_label(wmem_packet_scope());
+ args_buf = wmem_strbuf_new_label(pinfo->pool);
for (i = 0; i < nfields; i++) {
len = tvb_get_guint8(tvb, offset);
@@ -3237,7 +3237,7 @@ s7comm_decode_pi_service(tvbuff_t *tvb,
len = tvb_get_guint8(tvb, offset);
proto_tree_add_uint(tree, hf_s7comm_piservice_string_len, tvb, offset, 1, len);
offset += 1;
- item = proto_tree_add_item_ret_string(tree, hf_s7comm_piservice_servicename, tvb, offset, len, ENC_ASCII|ENC_NA, wmem_packet_scope(), &servicename);
+ item = proto_tree_add_item_ret_string(tree, hf_s7comm_piservice_servicename, tvb, offset, len, ENC_ASCII|ENC_NA, pinfo->pool, &servicename);
offset += len;
/* get the index position in pi_service_names, and add infotext with description to the item */
@@ -3267,7 +3267,7 @@ s7comm_decode_pi_service(tvbuff_t *tvb,
itemadd = proto_tree_add_item(file_tree, hf_s7comm_data_blockcontrol_block_type, tvb, paramoffset, 2, ENC_ASCII|ENC_NA);
proto_item_append_text(itemadd, " (%s)", val_to_str(blocktype, blocktype_names, "Unknown Block type: 0x%04x"));
paramoffset += 2;
- proto_tree_add_item_ret_string(file_tree, hf_s7comm_data_blockcontrol_block_num, tvb, paramoffset, 5, ENC_ASCII|ENC_NA, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_string(file_tree, hf_s7comm_data_blockcontrol_block_num, tvb, paramoffset, 5, ENC_ASCII|ENC_NA, pinfo->pool, &str);
paramoffset += 5;
num_valid = ws_strtoi32((const char*)str, NULL, &num);
proto_item_append_text(file_tree, " [%s ",
@@ -3299,7 +3299,7 @@ s7comm_decode_pi_service(tvbuff_t *tvb,
proto_item_append_text(tree, " -> %s()", servicename);
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s()", servicename);
} else {
- proto_tree_add_item_ret_string(param_tree, hf_s7comm_data_plccontrol_argument, tvb, paramoffset, paramlen, ENC_ASCII|ENC_NA, wmem_packet_scope(), &str1);
+ proto_tree_add_item_ret_string(param_tree, hf_s7comm_data_plccontrol_argument, tvb, paramoffset, paramlen, ENC_ASCII|ENC_NA, pinfo->pool, &str1);
proto_item_append_text(param_tree, ": (\"%s\")", str1);
proto_item_append_text(tree, " -> %s(\"%s\")", servicename, str1);
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s(\"%s\")", servicename, str1);
@@ -3629,7 +3629,7 @@ s7comm_decode_plc_controls_filename(tvbuff_t *tvb,
itemadd = proto_tree_add_item(file_tree, hf_s7comm_data_blockcontrol_block_type, tvb, offset, 2, ENC_ASCII|ENC_NA);
proto_item_append_text(itemadd, " (%s)", val_to_str(blocktype, blocktype_names, "Unknown Block type: 0x%04x"));
offset += 2;
- proto_tree_add_item_ret_string(file_tree, hf_s7comm_data_blockcontrol_block_num, tvb, offset, 5, ENC_ASCII|ENC_NA, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_string(file_tree, hf_s7comm_data_blockcontrol_block_num, tvb, offset, 5, ENC_ASCII|ENC_NA, pinfo->pool, &str);
offset += 5;
num_valid = ws_strtoi32((const gchar*)str, NULL, &num);
proto_item_append_text(file_tree, " [%s",
@@ -3650,7 +3650,7 @@ s7comm_decode_plc_controls_filename(tvbuff_t *tvb,
}
}
if (is_plcfilename == FALSE) {
- str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII);
+ str = tvb_get_string_enc(pinfo->pool, tvb, offset, len, ENC_ASCII);
col_append_fstr(pinfo->cinfo, COL_INFO, " File:[%s]", str);
offset += len;
}
@@ -5302,7 +5302,7 @@ s7comm_decode_ud_ncprg_subfunc(tvbuff_t *tvb,
if (dlength >= 2) {
if (type == S7COMM_UD_TYPE_NCREQ && subfunc == S7COMM_NCPRG_FUNCREQUESTDOWNLOAD) {
proto_tree_add_item_ret_string(data_tree, hf_s7comm_data_blockcontrol_filename, tvb, offset, dlength,
- ENC_ASCII|ENC_NA, wmem_packet_scope(), &str_filename);
+ ENC_ASCII|ENC_NA, pinfo->pool, &str_filename);
col_append_fstr(pinfo->cinfo, COL_INFO, " File:[%s]", str_filename);
offset += dlength;
} else if (type == S7COMM_UD_TYPE_NCREQ && subfunc == S7COMM_NCPRG_FUNCSTARTUPLOAD) {
@@ -5313,7 +5313,7 @@ s7comm_decode_ud_ncprg_subfunc(tvbuff_t *tvb,
offset += 1;
dlength -= 1;
proto_tree_add_item_ret_string(data_tree, hf_s7comm_data_blockcontrol_filename, tvb, offset, dlength,
- ENC_ASCII|ENC_NA, wmem_packet_scope(), &str_filename);
+ ENC_ASCII|ENC_NA, pinfo->pool, &str_filename);
col_append_fstr(pinfo->cinfo, COL_INFO, " File:[%s]", str_filename);
offset += dlength;
} else if (type == S7COMM_UD_TYPE_NCRES && subfunc == S7COMM_NCPRG_FUNCREQUESTDOWNLOAD) {
@@ -5968,7 +5968,7 @@ s7comm_decode_ud_block_subfunc(tvbuff_t *tvb,
itemadd = proto_tree_add_item(data_tree, hf_s7comm_ud_blockinfo_block_type, tvb, offset, 2, ENC_ASCII|ENC_NA);
proto_item_append_text(itemadd, " (%s)", val_to_str(blocktype16, blocktype_names, "Unknown Block type: 0x%04x"));
offset += 2;
- proto_tree_add_item_ret_string(data_tree, hf_s7comm_ud_blockinfo_block_num_ascii, tvb, offset, 5, ENC_ASCII|ENC_NA, wmem_packet_scope(), &pBlocknumber);
+ proto_tree_add_item_ret_string(data_tree, hf_s7comm_ud_blockinfo_block_num_ascii, tvb, offset, 5, ENC_ASCII|ENC_NA, pinfo->pool, &pBlocknumber);
num_valid = ws_strtoi32((const gchar*)pBlocknumber, NULL, &num);
proto_item_append_text(data_tree, " [%s ",
val_to_str(blocktype16, blocktype_names, "Unknown Block type: 0x%04x"));
diff --git a/epan/dissectors/packet-sametime.c b/epan/dissectors/packet-sametime.c
index 9f83221b6f..f54081dff9 100644
--- a/epan/dissectors/packet-sametime.c
+++ b/epan/dissectors/packet-sametime.c
@@ -516,7 +516,7 @@ dissect_sametime_content(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
col_append_str(pinfo->cinfo, COL_INFO, " ");
/* message type statistic */
- sinfo = wmem_new(wmem_packet_scope(), struct SametimeTap);
+ sinfo = wmem_new(pinfo->pool, struct SametimeTap);
sinfo->message_type = message_type;
sinfo->send_type = -1;
sinfo->user_status = -1;
diff --git a/epan/dissectors/packet-sap.c b/epan/dissectors/packet-sap.c
index 96e01f54cd..0329ae06ca 100644
--- a/epan/dissectors/packet-sap.c
+++ b/epan/dissectors/packet-sap.c
@@ -251,7 +251,7 @@ dissect_sap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
pt_len = pt_string_len + 1;
}
- pt_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, pt_string_len, ENC_ASCII);
+ pt_str = tvb_get_string_enc(pinfo->pool, tvb, offset, pt_string_len, ENC_ASCII);
proto_tree_add_string_format_value(sap_tree, hf_sap_payload_type, tvb, offset, pt_len,
pt_str, "%.*s", pt_string_len, pt_str);
offset += pt_len;
diff --git a/epan/dissectors/packet-sbus.c b/epan/dissectors/packet-sbus.c
index c7e387ba55..a57ce7af4b 100644
--- a/epan/dissectors/packet-sbus.c
+++ b/epan/dissectors/packet-sbus.c
@@ -1052,7 +1052,7 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
}
sbus_quint8_helper0 += 1;
}
- tmp_string = tvb_get_string_enc(wmem_packet_scope(), tvb , 19,
+ tmp_string = tvb_get_string_enc(pinfo->pool, tvb , 19,
sbus_quint8_helper0, ENC_ASCII);
col_append_fstr(pinfo->cinfo, COL_INFO,
": (File: %s)", tmp_string);
@@ -1069,7 +1069,7 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
}
sbus_quint8_helper0 += 1;
}
- tmp_string = tvb_get_string_enc(wmem_packet_scope(), tvb , 15,
+ tmp_string = tvb_get_string_enc(pinfo->pool, tvb , 15,
sbus_quint8_helper0, ENC_ASCII);
col_append_fstr(pinfo->cinfo, COL_INFO,
": (File: %s)", tmp_string);
@@ -1471,7 +1471,7 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
}
sbus_quint8_helper0 += 1;
}
- tmp_string = tvb_get_string_enc(wmem_packet_scope(), tvb , 19, sbus_quint8_helper0, ENC_ASCII);
+ tmp_string = tvb_get_string_enc(pinfo->pool, tvb , 19, sbus_quint8_helper0, ENC_ASCII);
proto_tree_add_string(sbus_tree,
hf_sbus_rdwr_file_name, tvb, offset,
sbus_quint8_helper0, tmp_string);
@@ -1536,7 +1536,7 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
}
sbus_quint8_helper0 += 1;
}
- tmp_string = tvb_get_string_enc(wmem_packet_scope(), tvb, 19, sbus_quint8_helper0, ENC_ASCII);
+ tmp_string = tvb_get_string_enc(pinfo->pool, tvb, 19, sbus_quint8_helper0, ENC_ASCII);
proto_tree_add_string(sbus_tree,
hf_sbus_rdwr_file_name, tvb, offset,
sbus_quint8_helper0, tmp_string);
@@ -1578,7 +1578,7 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
}
sbus_quint8_helper0 += 1;
}
- tmp_string = tvb_get_string_enc(wmem_packet_scope(), tvb, 14, sbus_quint8_helper0, ENC_ASCII);
+ tmp_string = tvb_get_string_enc(pinfo->pool, tvb, 14, sbus_quint8_helper0, ENC_ASCII);
proto_tree_add_string(sbus_tree,
hf_sbus_rdwr_file_name, tvb, offset,
sbus_quint8_helper0, tmp_string);
@@ -1622,7 +1622,7 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
}
sbus_quint8_helper0 += 1;
}
- tmp_string = tvb_get_string_enc(wmem_packet_scope(), tvb, 22, sbus_quint8_helper0, ENC_ASCII);
+ tmp_string = tvb_get_string_enc(pinfo->pool, tvb, 22, sbus_quint8_helper0, ENC_ASCII);
proto_tree_add_string(sbus_tree,
hf_sbus_rdwr_file_name, tvb, offset,
sbus_quint8_helper0, tmp_string);
@@ -1661,7 +1661,7 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
}
sbus_quint8_helper0 += 1;
}
- tmp_string = tvb_get_string_enc(wmem_packet_scope(), tvb, 14, sbus_quint8_helper0, ENC_ASCII);
+ tmp_string = tvb_get_string_enc(pinfo->pool, tvb, 14, sbus_quint8_helper0, ENC_ASCII);
proto_tree_add_string(sbus_tree,
hf_sbus_rdwr_file_name, tvb, offset,
sbus_quint8_helper0, tmp_string);
diff --git a/epan/dissectors/packet-sccp.c b/epan/dissectors/packet-sccp.c
index c8e36642c8..496397902a 100644
--- a/epan/dissectors/packet-sccp.c
+++ b/epan/dissectors/packet-sccp.c
@@ -1461,8 +1461,8 @@ get_sccp_assoc(packet_info *pinfo, guint offset, sccp_decode_context_t* value)
if (value->assoc)
return value->assoc;
- opck = opc->type == ss7pc_address_type ? mtp3_pc_hash((const mtp3_addr_pc_t *)opc->data) : g_str_hash(address_to_str(wmem_packet_scope(), opc));
- dpck = dpc->type == ss7pc_address_type ? mtp3_pc_hash((const mtp3_addr_pc_t *)dpc->data) : g_str_hash(address_to_str(wmem_packet_scope(), dpc));
+ opck = opc->type == ss7pc_address_type ? mtp3_pc_hash((const mtp3_addr_pc_t *)opc->data) : g_str_hash(address_to_str(pinfo->pool, opc));
+ dpck = dpc->type == ss7pc_address_type ? mtp3_pc_hash((const mtp3_addr_pc_t *)dpc->data) : g_str_hash(address_to_str(pinfo->pool, dpc));
switch (value->message_type) {
@@ -1770,7 +1770,7 @@ dissect_sccp_gt_address_information(tvbuff_t *tvb, packet_info *pinfo,
if (is_connectionless(sccp_info->message_type) && sccp_info->sccp_msg) {
guint8 **gt_ptr = called ? &(sccp_info->sccp_msg->data.ud.called_gt) : &(sccp_info->sccp_msg->data.ud.calling_gt);
- *gt_ptr = (guint8 *)wmem_strdup(wmem_packet_scope(), gt_digits);
+ *gt_ptr = (guint8 *)wmem_strdup(pinfo->pool, gt_digits);
}
digits_item = proto_tree_add_string(tree, called ? hf_sccp_called_gt_digits
@@ -2810,7 +2810,7 @@ dissect_sccp_optional_parameters(tvbuff_t *tvb, packet_info *pinfo,
static sccp_msg_info_t *
new_ud_msg(packet_info *pinfo, guint32 msg_type _U_)
{
- sccp_msg_info_t *m = wmem_new0(wmem_packet_scope(), sccp_msg_info_t);
+ sccp_msg_info_t *m = wmem_new0(pinfo->pool, sccp_msg_info_t);
m->framenum = pinfo->num;
m->data.ud.calling_gt = NULL;
m->data.ud.called_gt = NULL;
diff --git a/epan/dissectors/packet-scriptingservice.c b/epan/dissectors/packet-scriptingservice.c
index 0af3da1f61..d4bb181dae 100644
--- a/epan/dissectors/packet-scriptingservice.c
+++ b/epan/dissectors/packet-scriptingservice.c
@@ -116,7 +116,7 @@ dissect_ssprotocol_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree
guint16 info_length;
guint total_length;
- tap_ssprotocol_rec_t* tap_rec = wmem_new0(wmem_packet_scope(), tap_ssprotocol_rec_t);
+ tap_ssprotocol_rec_t* tap_rec = wmem_new0(pinfo->pool, tap_ssprotocol_rec_t);
tap_rec->type = tvb_get_guint8(message_tvb, MESSAGE_TYPE_OFFSET);
tap_rec->size = tvb_get_ntohs(message_tvb, MESSAGE_LENGTH_OFFSET);
tap_rec->type_string = val_to_str_const(tap_rec->type, message_type_values, "Unknown SSP message type");
diff --git a/epan/dissectors/packet-sflow.c b/epan/dissectors/packet-sflow.c
index 6adc239340..1007181b01 100644
--- a/epan/dissectors/packet-sflow.c
+++ b/epan/dissectors/packet-sflow.c
@@ -2497,7 +2497,7 @@ dissect_sflow_245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
break;
case ADDR_TYPE_IPV4:
case ADDR_TYPE_IPV6:
- col_append_fstr(pinfo->cinfo, COL_INFO, ", agent %s", address_to_str(wmem_packet_scope(), &addr_details));
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", agent %s", address_to_str(pinfo->pool, &addr_details));
break;
}
@@ -2513,7 +2513,7 @@ dissect_sflow_245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
offset += 4;
uptime = tvb_get_ntohl(tvb, offset);
proto_tree_add_uint_format_value(sflow_245_tree, hf_sflow_245_sysuptime, tvb, offset, 4, uptime, "%s (%ums)",
- unsigned_time_secs_to_str(wmem_packet_scope(), uptime / 1000), uptime);
+ unsigned_time_secs_to_str(pinfo->pool, uptime / 1000), uptime);
offset += 4;
numsamples = tvb_get_ntohl(tvb, offset);
col_append_fstr(pinfo->cinfo, COL_INFO, ", %u samples", numsamples);
diff --git a/epan/dissectors/packet-sgsap.c b/epan/dissectors/packet-sgsap.c
index a202d79694..b6d8b1887d 100644
--- a/epan/dissectors/packet-sgsap.c
+++ b/epan/dissectors/packet-sgsap.c
@@ -224,7 +224,7 @@ de_sgsap_imeisv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
curr_offset = offset;
- proto_tree_add_item_ret_display_string(tree, hf_sgsap_imeisv, tvb, curr_offset, len, ENC_BCD_DIGITS_0_9, wmem_packet_scope(), &imeisv_str);
+ proto_tree_add_item_ret_display_string(tree, hf_sgsap_imeisv, tvb, curr_offset, len, ENC_BCD_DIGITS_0_9, pinfo->pool, &imeisv_str);
if (add_string) {
/* (len<<2)+4 = the maximum number of bytes to produce (including the terminating nul character). */
g_snprintf(add_string, (len<<2)+4, " - %s", imeisv_str);
@@ -363,7 +363,7 @@ de_sgsap_mme_name(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint
name_len = tvb_get_guint8(tvb, offset);
if (name_len < 0x20) {
- fqdn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, len - 1, ENC_ASCII);
+ fqdn = tvb_get_string_enc(pinfo->pool, tvb, offset + 1, len - 1, ENC_ASCII);
for (;;) {
if (name_len >= len - 1)
break;
@@ -372,7 +372,7 @@ de_sgsap_mme_name(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint
fqdn[tmp] = '.';
}
} else{
- fqdn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII);
+ fqdn = tvb_get_string_enc(pinfo->pool, tvb, offset, len, ENC_ASCII);
}
proto_tree_add_string(tree, hf_sgsap_mme_name, tvb, offset, len, fqdn);
if (add_string)
@@ -564,7 +564,7 @@ de_sgsap_vlr_name(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint
name_len = tvb_get_guint8(tvb, offset);
if (name_len < 0x20) {
- fqdn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1, len - 1, ENC_ASCII);
+ fqdn = tvb_get_string_enc(pinfo->pool, tvb, offset + 1, len - 1, ENC_ASCII);
for (;;) {
if (name_len >= len - 1)
break;
@@ -573,7 +573,7 @@ de_sgsap_vlr_name(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint
fqdn[tmp] = '.';
}
} else{
- fqdn = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII);
+ fqdn = tvb_get_string_enc(pinfo->pool, tvb, offset, len, ENC_ASCII);
}
proto_tree_add_string(tree, hf_sgsap_vlr_name, tvb, offset, len, fqdn);
if (add_string)
diff --git a/epan/dissectors/packet-simple.c b/epan/dissectors/packet-simple.c
index cdb831e659..e4a19ccbff 100644
--- a/epan/dissectors/packet-simple.c
+++ b/epan/dissectors/packet-simple.c
@@ -315,7 +315,7 @@ static void dissect_simple_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree
proto_tree_add_item(tree, hf_simple_status_word_count, tvb, offset, 1, ENC_NA);
offset++;
- name = tvb_get_stringzpad(wmem_packet_scope(), tvb, offset, SIMPLE_STATUS_NAME_LEN, ENC_ASCII|ENC_NA);
+ name = tvb_get_stringzpad(pinfo->pool, tvb, offset, SIMPLE_STATUS_NAME_LEN, ENC_ASCII|ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, ", Name: %s", name);
proto_tree_add_item(tree, hf_simple_status_name, tvb, offset, SIMPLE_STATUS_NAME_LEN, ENC_ASCII|ENC_NA);
offset += SIMPLE_STATUS_NAME_LEN;
diff --git a/epan/dissectors/packet-simulcrypt.c b/epan/dissectors/packet-simulcrypt.c
index 5f0f2c3200..b2d88bffb2 100644
--- a/epan/dissectors/packet-simulcrypt.c
+++ b/epan/dissectors/packet-simulcrypt.c
@@ -1289,7 +1289,7 @@ dissect_simulcrypt_data(proto_tree *simulcrypt_tree, proto_item *simulcrypt_item
/* Parameter Length 2 Bytes */
plen = tvb_get_ntohs(tvb, offset+2); /* read 2 byte length value */
/* Parameter Value plen Bytes */
- pvalue_char = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset+4, plen);
+ pvalue_char = tvb_bytes_to_str(pinfo->pool, tvb, offset+4, plen);
simulcrypt_item = proto_tree_add_item(simulcrypt_tree, hf_simulcrypt_parameter, tvb, offset, plen+2+2, ENC_NA );
diff --git a/epan/dissectors/packet-sipfrag.c b/epan/dissectors/packet-sipfrag.c
index 65d72f082f..2e5f39180d 100644
--- a/epan/dissectors/packet-sipfrag.c
+++ b/epan/dissectors/packet-sipfrag.c
@@ -61,7 +61,7 @@ static int dissect_sipfrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* For now, add all lines as unparsed strings */
/* Extract & add the string. */
- string = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, linelen, ENC_ASCII);
+ string = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset, linelen, ENC_ASCII);
proto_tree_add_string_format(sipfrag_tree, hf_sipfrag_line,
tvb, offset,
linelen, string,
diff --git a/epan/dissectors/packet-skinny.c.in b/epan/dissectors/packet-skinny.c.in
index ff70493eac..8ce184cdaf 100644
--- a/epan/dissectors/packet-skinny.c.in
+++ b/epan/dissectors/packet-skinny.c.in
@@ -274,8 +274,8 @@ dissect_skinny_displayLabel(ptvcursor_t *cursor, int hfindex, gint length)
item = proto_tree_add_item(tree, hfindex, tvb, offset, length, ENC_ASCII | ENC_NA);
- wmem_new = wmem_strbuf_sized_new(wmem_packet_scope(), length + 1, 0);
- disp_string = (gchar*) wmem_alloc(wmem_packet_scope(), length + 1);
+ wmem_new = wmem_strbuf_sized_new(pinfo->pool, length + 1, 0);
+ disp_string = (gchar*) wmem_alloc(pinfo->pool, length + 1);
disp_string[length] = '\0';
tvb_memcpy(tvb, (void*)disp_string, offset, length);
diff --git a/epan/dissectors/packet-slsk.c b/epan/dissectors/packet-slsk.c
index 5b05d4f1d1..e5893b9f0c 100644
--- a/epan/dissectors/packet-slsk.c
+++ b/epan/dissectors/packet-slsk.c
@@ -845,10 +845,10 @@ static int dissect_slsk_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_item_ret_length(slsk_tree, hf_slsk_username, tvb, offset, 4, ENC_ASCII|ENC_LITTLE_ENDIAN, &str_len);
offset += str_len;
len = tvb_get_letohl(tvb, offset);
- str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, len, ENC_ASCII);
+ str = tvb_get_string_enc(pinfo->pool, tvb, offset+4, len, ENC_ASCII);
proto_tree_add_string_format_value(slsk_tree, hf_slsk_connection_type, tvb, offset, 4+len, str,
"%s (Char: %s)", connection_type(str),
- format_text(wmem_packet_scope(), str, len));
+ format_text(pinfo->pool, str, len));
offset += 4+len;
}
else if (check_slsk_format(tvb, offset, "issiii")) {
@@ -861,10 +861,10 @@ static int dissect_slsk_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_item_ret_length(slsk_tree, hf_slsk_username, tvb, offset, 4, ENC_ASCII|ENC_LITTLE_ENDIAN, &str_len);
offset += str_len;
len = tvb_get_letohl(tvb, offset);
- str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, len, ENC_ASCII);
+ str = tvb_get_string_enc(pinfo->pool, tvb, offset+4, len, ENC_ASCII);
proto_tree_add_string_format_value(slsk_tree, hf_slsk_connection_type, tvb, offset, 4+len, str,
"%s (Char: %s)", connection_type(str),
- format_text(wmem_packet_scope(), str, len));
+ format_text(pinfo->pool, str, len));
offset += 4+len;
proto_tree_add_item(slsk_tree, hf_slsk_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
@@ -1998,10 +1998,10 @@ static int dissect_slsk_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_item_ret_length(slsk_tree, hf_slsk_username, tvb, offset, 4, ENC_ASCII|ENC_LITTLE_ENDIAN, &str_len);
offset += str_len;
len = tvb_get_letohl(tvb, offset);
- str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, len, ENC_ASCII);
+ str = tvb_get_string_enc(pinfo->pool, tvb, offset+4, len, ENC_ASCII);
proto_tree_add_string_format_value(slsk_tree, hf_slsk_connection_type, tvb, offset, 4+len, str,
"%s (Char: %s)", connection_type(str),
- format_text(wmem_packet_scope(), str, len));
+ format_text(pinfo->pool, str, len));
offset += 4+len;
proto_tree_add_item(slsk_tree, hf_slsk_token, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
diff --git a/epan/dissectors/packet-smb-browse.c b/epan/dissectors/packet-smb-browse.c
index bf4735bd77..88732f8a64 100644
--- a/epan/dissectors/packet-smb-browse.c
+++ b/epan/dissectors/packet-smb-browse.c
@@ -553,11 +553,11 @@ dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
proto_tree_add_uint_format_value(tree, hf_periodicity, tvb, offset, 4,
periodicity,
"%s",
- signed_time_msecs_to_str(wmem_packet_scope(), periodicity));
+ signed_time_msecs_to_str(pinfo->pool, periodicity));
offset += 4;
/* server name */
- host_name = tvb_get_stringzpad(wmem_packet_scope(), tvb, offset, HOST_NAME_LEN, ENC_CP437|ENC_NA);
+ host_name = tvb_get_stringzpad(pinfo->pool, tvb, offset, HOST_NAME_LEN, ENC_CP437|ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s", host_name);
proto_tree_add_string_format(tree, hf_server_name,
tvb, offset, HOST_NAME_LEN,
@@ -629,7 +629,7 @@ dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
offset += 1;
/* name of computer to which to send reply */
- computer_name = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &namelen, ENC_ASCII);
+ computer_name = tvb_get_stringz_enc(pinfo->pool, tvb, offset, &namelen, ENC_ASCII);
proto_tree_add_string(tree, hf_response_computer_name,
tvb, offset, namelen, computer_name);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s", computer_name);
@@ -650,7 +650,7 @@ dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
proto_tree_add_uint_format_value(tree, hf_server_uptime,
tvb, offset, 4, uptime,
"%s",
- signed_time_msecs_to_str(wmem_packet_scope(), uptime));
+ signed_time_msecs_to_str(pinfo->pool, uptime));
offset += 4;
/* next 4 bytes must be zero */
@@ -797,11 +797,11 @@ dissect_mailslot_lanman(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
proto_tree_add_uint_format_value(tree, hf_periodicity, tvb, offset, 2,
periodicity,
"%s",
- signed_time_msecs_to_str(wmem_packet_scope(), periodicity));
+ signed_time_msecs_to_str(pinfo->pool, periodicity));
offset += 2;
/* server name */
- host_name = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &namelen, ENC_CP437|ENC_NA);
+ host_name = tvb_get_stringz_enc(pinfo->pool, tvb, offset, &namelen, ENC_CP437|ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s", host_name);
proto_tree_add_item(tree, hf_server_name,
diff --git a/epan/dissectors/packet-smb-pipe.c b/epan/dissectors/packet-smb-pipe.c
index 52ff2c89b7..53bd508b42 100644
--- a/epan/dissectors/packet-smb-pipe.c
+++ b/epan/dissectors/packet-smb-pipe.c
@@ -315,11 +315,11 @@ add_string_param_update_parent(tvbuff_t *tvb, int offset, int count, packet_info
DISSECTOR_ASSERT(hf_index != -1);
ti = proto_tree_add_item_ret_string(tree, hf_index, tvb, offset,
- count, ENC_ASCII|ENC_NA, wmem_packet_scope(), &str);
+ count, ENC_ASCII|ENC_NA, pinfo->pool, &str);
/* XXX - code page? */
parent_ti = proto_item_get_parent(ti);
proto_item_append_text(parent_ti, ": %s",
- format_text(wmem_packet_scope(), str, strlen(str)));
+ format_text(pinfo->pool, str, strlen(str)));
offset += count;
return offset;
}
@@ -516,7 +516,7 @@ add_reltime(tvbuff_t *tvb, int offset, int count _U_, packet_info *pinfo _U_,
nstime.nsecs = 0;
proto_tree_add_time_format_value(tree, hf_index, tvb, offset, 4,
&nstime, "%s",
- signed_time_secs_to_str(wmem_packet_scope(), (gint32) nstime.secs));
+ signed_time_secs_to_str(pinfo->pool, (gint32) nstime.secs));
offset += 4;
return offset;
}
@@ -638,7 +638,7 @@ add_logon_hours(tvbuff_t *tvb, int offset, int count, packet_info *pinfo _U_,
proto_tree_add_bytes_format_value(tree, hf_index, tvb,
cptr, count, NULL,
"%s (wrong length, should be 21, is %d",
- tvb_bytes_to_str(wmem_packet_scope(), tvb, cptr, count), count);
+ tvb_bytes_to_str(pinfo->pool, tvb, cptr, count), count);
}
} else {
proto_tree_add_bytes_format_value(tree, hf_index, tvb, 0, 0,
@@ -658,11 +658,11 @@ add_tzoffset(tvbuff_t *tvb, int offset, int count _U_, packet_info *pinfo _U_,
if (tzoffset < 0) {
proto_tree_add_int_format_value(tree, hf_tzoffset, tvb, offset, 2,
tzoffset, "%s east of UTC",
- signed_time_secs_to_str(wmem_packet_scope(), -tzoffset*60));
+ signed_time_secs_to_str(pinfo->pool, -tzoffset*60));
} else if (tzoffset > 0) {
proto_tree_add_int_format_value(tree, hf_tzoffset, tvb, offset, 2,
tzoffset, "%s west of UTC",
- signed_time_secs_to_str(wmem_packet_scope(), tzoffset*60));
+ signed_time_secs_to_str(pinfo->pool, tzoffset*60));
} else {
proto_tree_add_int_format_value(tree, hf_tzoffset, tvb, offset, 2,
tzoffset, "at UTC");
@@ -1711,7 +1711,7 @@ dissect_request_parameters(tvbuff_t *tvb, int offset, packet_info *pinfo,
"%s: Value is %s, type is wrong (b)",
proto_registrar_get_name((*items->hf_index == -1) ?
hf_smb_pipe_bytes_param : *items->hf_index),
- tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, count));
+ tvb_bytes_to_str(pinfo->pool, tvb, offset, count));
offset += count;
items++;
} else {
@@ -1864,7 +1864,7 @@ dissect_response_parameters(tvbuff_t *tvb, int offset, packet_info *pinfo,
"%s: Value is %s, type is wrong (g)",
proto_registrar_get_name((*items->hf_index == -1) ?
hf_smb_pipe_bytes_param : *items->hf_index),
- tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, count));
+ tvb_bytes_to_str(pinfo->pool, tvb, offset, count));
offset += count;
items++;
} else {
@@ -2061,7 +2061,7 @@ dissect_transact_data(tvbuff_t *tvb, int offset, int convert,
"%s: Value is %s, type is wrong (B)",
proto_registrar_get_name((*items->hf_index == -1) ?
hf_smb_pipe_bytes_param : *items->hf_index),
- tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, count));
+ tvb_bytes_to_str(pinfo->pool, tvb, offset, count));
offset += count;
items++;
} else {
@@ -2153,7 +2153,7 @@ dissect_transact_data(tvbuff_t *tvb, int offset, int convert,
"%s: Value is %s, type is wrong (b)",
proto_registrar_get_name((*items->hf_index == -1) ?
hf_smb_pipe_bytes_param : *items->hf_index),
- tvb_bytes_to_str(wmem_packet_scope(), tvb, cptr, count));
+ tvb_bytes_to_str(pinfo->pool, tvb, cptr, count));
items++;
} else {
offset = (*items->func)(tvb, offset, count,
diff --git a/epan/dissectors/packet-smtp.c b/epan/dissectors/packet-smtp.c
index f83cca3689..7bb5c0020b 100644
--- a/epan/dissectors/packet-smtp.c
+++ b/epan/dissectors/packet-smtp.c
@@ -327,7 +327,7 @@ decode_plain_auth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_item *ti;
gsize len = 0;
- decrypt = tvb_get_string_enc(wmem_packet_scope(), tvb, a_offset, a_linelen, ENC_ASCII);
+ decrypt = tvb_get_string_enc(pinfo->pool, tvb, a_offset, a_linelen, ENC_ASCII);
if (smtp_auth_parameter_decoding_enabled) {
if (strlen(decrypt) > 1) {
g_base64_decode_inplace(decrypt, &len);
@@ -341,7 +341,7 @@ decode_plain_auth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
length_user2 = (gint)strlen(decrypt + length_user1 + 1);
proto_tree_add_string(tree, hf_smtp_username, tvb,
a_offset, a_linelen, decrypt + length_user1 + 1);
- username = format_text(wmem_packet_scope(), decrypt + length_user1 + 1, length_user2);
+ username = format_text(pinfo->pool, decrypt + length_user1 + 1, length_user2);
col_append_fstr(pinfo->cinfo, COL_INFO, "User: %s", username);
if (returncode >= (length_user1 + 1 + length_user2 + 1)) {
@@ -350,9 +350,9 @@ decode_plain_auth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
a_offset, length_pass, decrypt + length_user1 + length_user2 + 2);
col_append_str(pinfo->cinfo, COL_INFO, " ");
col_append_fstr(pinfo->cinfo, COL_INFO, " Pass: %s",
- format_text(wmem_packet_scope(), decrypt + length_user1 + length_user2 + 2, length_pass));
+ format_text(pinfo->pool, decrypt + length_user1 + length_user2 + 2, length_pass));
- tap_credential_t* auth = wmem_new0(wmem_packet_scope(), tap_credential_t);
+ tap_credential_t* auth = wmem_new0(pinfo->pool, tap_credential_t);
auth->num = pinfo->num;
auth->username_num = pinfo->num;
auth->password_hf_id = hf_smtp_password;
@@ -367,7 +367,7 @@ decode_plain_auth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
ti = proto_tree_add_item(tree, hf_smtp_username_password, tvb,
a_offset, a_linelen, ENC_ASCII|ENC_NA);
expert_add_info(pinfo, ti, &ei_smtp_base64_decode);
- col_append_str(pinfo->cinfo, COL_INFO, format_text(wmem_packet_scope(), decrypt, a_linelen));
+ col_append_str(pinfo->cinfo, COL_INFO, format_text(pinfo->pool, decrypt, a_linelen));
}
}
@@ -582,7 +582,7 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
if ((session_state->auth_state != SMTP_AUTH_STATE_NONE) &&
(pinfo->num >= session_state->first_auth_frame) &&
((session_state->last_auth_frame == 0) || (pinfo->num <= session_state->last_auth_frame))) {
- decrypt = tvb_get_string_enc(wmem_packet_scope(), tvb, loffset, linelen, ENC_ASCII);
+ decrypt = tvb_get_string_enc(pinfo->pool, tvb, loffset, linelen, ENC_ASCII);
if ((smtp_auth_parameter_decoding_enabled) &&
(strlen(decrypt) > 1) &&
(g_base64_decode_inplace(decrypt, &decrypt_len)) &&
@@ -846,7 +846,7 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
if (session_state->username_frame == pinfo->num) {
if (decrypt == NULL) {
/* This line wasn't already decrypted through the state machine */
- decrypt = tvb_get_string_enc(wmem_packet_scope(), tvb, loffset, linelen, ENC_ASCII);
+ decrypt = tvb_get_string_enc(pinfo->pool, tvb, loffset, linelen, ENC_ASCII);
decrypt_len = linelen;
if (smtp_auth_parameter_decoding_enabled) {
if (strlen(decrypt) > 1) {
@@ -857,7 +857,7 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
}
if (decrypt_len == 0) {
/* Go back to the original string */
- decrypt = tvb_get_string_enc(wmem_packet_scope(), tvb, loffset, linelen, ENC_ASCII);
+ decrypt = tvb_get_string_enc(pinfo->pool, tvb, loffset, linelen, ENC_ASCII);
decrypt_len = linelen;
}
}
@@ -867,11 +867,11 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
session_state->username = wmem_strdup(wmem_file_scope(), decrypt);
proto_tree_add_string(smtp_tree, hf_smtp_username, tvb,
loffset, linelen, decrypt);
- col_append_fstr(pinfo->cinfo, COL_INFO, "User: %s", format_text(wmem_packet_scope(), decrypt, decrypt_len));
+ col_append_fstr(pinfo->cinfo, COL_INFO, "User: %s", format_text(pinfo->pool, decrypt, decrypt_len));
} else if (session_state->password_frame == pinfo->num) {
if (decrypt == NULL) {
/* This line wasn't already decrypted through the state machine */
- decrypt = tvb_get_string_enc(wmem_packet_scope(), tvb, loffset, linelen, ENC_ASCII);
+ decrypt = tvb_get_string_enc(pinfo->pool, tvb, loffset, linelen, ENC_ASCII);
decrypt_len = linelen;
if (smtp_auth_parameter_decoding_enabled) {
if (strlen(decrypt) > 1) {
@@ -882,25 +882,25 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
}
if (decrypt_len == 0) {
/* Go back to the original string */
- decrypt = tvb_get_string_enc(wmem_packet_scope(), tvb, loffset, linelen, ENC_ASCII);
+ decrypt = tvb_get_string_enc(pinfo->pool, tvb, loffset, linelen, ENC_ASCII);
decrypt_len = linelen;
}
}
}
proto_tree_add_string(smtp_tree, hf_smtp_password, tvb,
loffset, linelen, decrypt);
- col_append_fstr(pinfo->cinfo, COL_INFO, "Pass: %s", format_text(wmem_packet_scope(), decrypt, decrypt_len));
+ col_append_fstr(pinfo->cinfo, COL_INFO, "Pass: %s", format_text(pinfo->pool, decrypt, decrypt_len));
- tap_credential_t* auth = wmem_new0(wmem_packet_scope(), tap_credential_t);
+ tap_credential_t* auth = wmem_new0(pinfo->pool, tap_credential_t);
auth->num = pinfo->num;
auth->username_num = session_state->username_frame;
auth->password_hf_id = hf_smtp_password;
auth->username = session_state->username;
auth->proto = "SMTP";
- auth->info = wmem_strdup_printf(wmem_packet_scope(), "Username in packet %u", auth->username_num);
+ auth->info = wmem_strdup_printf(pinfo->pool, "Username in packet %u", auth->username_num);
tap_queue_packet(credentials_tap, pinfo, auth);
} else if (session_state->ntlm_rsp_frame == pinfo->num) {
- decrypt = tvb_get_string_enc(wmem_packet_scope(), tvb, loffset, linelen, ENC_ASCII);
+ decrypt = tvb_get_string_enc(pinfo->pool, tvb, loffset, linelen, ENC_ASCII);
decrypt_len = linelen;
if (smtp_auth_parameter_decoding_enabled) {
if (strlen(decrypt) > 1) {
@@ -911,19 +911,19 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
}
if (decrypt_len == 0) {
/* Go back to the original string */
- decrypt = tvb_get_string_enc(wmem_packet_scope(), tvb, loffset, linelen, ENC_ASCII);
+ decrypt = tvb_get_string_enc(pinfo->pool, tvb, loffset, linelen, ENC_ASCII);
decrypt_len = linelen;
- col_append_str(pinfo->cinfo, COL_INFO, format_text(wmem_packet_scope(), decrypt, linelen));
+ col_append_str(pinfo->cinfo, COL_INFO, format_text(pinfo->pool, decrypt, linelen));
proto_tree_add_item(smtp_tree, hf_smtp_command_line, tvb,
loffset, linelen, ENC_ASCII|ENC_NA);
}
else {
- base64_string = tvb_get_string_enc(wmem_packet_scope(), tvb, loffset, linelen, ENC_ASCII);
+ base64_string = tvb_get_string_enc(pinfo->pool, tvb, loffset, linelen, ENC_ASCII);
dissect_ntlm_auth(tvb, pinfo, smtp_tree, base64_string);
}
}
else {
- col_append_str(pinfo->cinfo, COL_INFO, format_text(wmem_packet_scope(), decrypt, linelen));
+ col_append_str(pinfo->cinfo, COL_INFO, format_text(pinfo->pool, decrypt, linelen));
proto_tree_add_item(smtp_tree, hf_smtp_command_line, tvb,
loffset, linelen, ENC_ASCII|ENC_NA);
}
@@ -953,7 +953,7 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
if (linelen >= 11) {
if (decrypt == NULL) {
/* This line wasn't already decrypted through the state machine */
- decrypt = tvb_get_string_enc(wmem_packet_scope(), tvb, loffset + 11, linelen - 11, ENC_ASCII);
+ decrypt = tvb_get_string_enc(pinfo->pool, tvb, loffset + 11, linelen - 11, ENC_ASCII);
decrypt_len = linelen - 11;
if (smtp_auth_parameter_decoding_enabled) {
if (strlen(decrypt) > 1) {
@@ -964,7 +964,7 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
}
if (decrypt_len == 0) {
/* Go back to the original string */
- decrypt = tvb_get_string_enc(wmem_packet_scope(), tvb, loffset + 11, linelen - 11, ENC_ASCII);
+ decrypt = tvb_get_string_enc(pinfo->pool, tvb, loffset + 11, linelen - 11, ENC_ASCII);
decrypt_len = linelen - 11;
}
}
@@ -972,14 +972,14 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
proto_tree_add_string(cmdresp_tree, hf_smtp_username, tvb, loffset + 11, linelen - 11, decrypt);
col_append_str(pinfo->cinfo, COL_INFO,
tvb_format_text(tvb, loffset, 11));
- col_append_fstr(pinfo->cinfo, COL_INFO, "User: %s", format_text(wmem_packet_scope(), decrypt, decrypt_len));
+ col_append_fstr(pinfo->cinfo, COL_INFO, "User: %s", format_text(pinfo->pool, decrypt, decrypt_len));
}
}
else if ((linelen > 5) && (session_state->ntlm_req_frame == pinfo->num) ) {
proto_tree_add_item(cmdresp_tree, hf_smtp_req_parameter, tvb,
loffset + 5, linelen - 5, ENC_ASCII|ENC_NA);
if (linelen >= 10) {
- decrypt = tvb_get_string_enc(wmem_packet_scope(), tvb, loffset + 10, linelen - 10, ENC_ASCII);
+ decrypt = tvb_get_string_enc(pinfo->pool, tvb, loffset + 10, linelen - 10, ENC_ASCII);
decrypt_len = linelen - 10;
if (smtp_auth_parameter_decoding_enabled) {
if (strlen(decrypt) > 1) {
@@ -990,23 +990,23 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
}
if (decrypt_len == 0) {
/* Go back to the original string */
- decrypt = tvb_get_string_enc(wmem_packet_scope(), tvb, loffset + 10, linelen - 10, ENC_ASCII);
+ decrypt = tvb_get_string_enc(pinfo->pool, tvb, loffset + 10, linelen - 10, ENC_ASCII);
decrypt_len = linelen - 10;
col_append_str(pinfo->cinfo, COL_INFO,
tvb_format_text(tvb, loffset, 10));
- col_append_str(pinfo->cinfo, COL_INFO, format_text(wmem_packet_scope(), decrypt, linelen - 10));
+ col_append_str(pinfo->cinfo, COL_INFO, format_text(pinfo->pool, decrypt, linelen - 10));
}
else {
- base64_string = tvb_get_string_enc(wmem_packet_scope(), tvb, loffset + 10, linelen - 10, ENC_ASCII);
+ base64_string = tvb_get_string_enc(pinfo->pool, tvb, loffset + 10, linelen - 10, ENC_ASCII);
col_append_str(pinfo->cinfo, COL_INFO,
tvb_format_text(tvb, loffset, 10));
- dissect_ntlm_auth(tvb, pinfo, cmdresp_tree, format_text(wmem_packet_scope(), base64_string, linelen - 10));
+ dissect_ntlm_auth(tvb, pinfo, cmdresp_tree, format_text(pinfo->pool, base64_string, linelen - 10));
}
}
else {
col_append_str(pinfo->cinfo, COL_INFO,
tvb_format_text(tvb, loffset, 10));
- col_append_str(pinfo->cinfo, COL_INFO, format_text(wmem_packet_scope(), decrypt, linelen - 10));
+ col_append_str(pinfo->cinfo, COL_INFO, format_text(pinfo->pool, decrypt, linelen - 10));
}
}
}
@@ -1183,11 +1183,11 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
decrypt = NULL;
if (linelen >= 4) {
if ((smtp_auth_parameter_decoding_enabled) && (code == 334)) {
- decrypt = tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 4, linelen - 4, ENC_ASCII);
+ decrypt = tvb_get_string_enc(pinfo->pool, tvb, offset + 4, linelen - 4, ENC_ASCII);
if (strlen(decrypt) > 1 && (g_base64_decode_inplace(decrypt, &decrypt_len)) && decrypt_len > 0) {
decrypt[decrypt_len] = 0;
if (g_ascii_strncasecmp(decrypt, "NTLMSSP", 7) == 0) {
- base64_string = tvb_get_string_enc(wmem_packet_scope(), tvb, loffset + 4, linelen - 4, ENC_ASCII);
+ base64_string = tvb_get_string_enc(pinfo->pool, tvb, loffset + 4, linelen - 4, ENC_ASCII);
col_append_fstr(pinfo->cinfo, COL_INFO, "%d ", code);
proto_tree_add_string(cmdresp_tree, hf_smtp_rsp_parameter, tvb,
offset + 4, linelen - 4, (const char*)base64_string);
@@ -1197,7 +1197,7 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
proto_tree_add_string(cmdresp_tree, hf_smtp_rsp_parameter, tvb,
offset + 4, linelen - 4, (const char*)decrypt);
- col_append_fstr(pinfo->cinfo, COL_INFO, "%d %s", code, format_text(wmem_packet_scope(), decrypt, decrypt_len));
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%d %s", code, format_text(pinfo->pool, decrypt, decrypt_len));
}
} else {
decrypt = NULL;
diff --git a/epan/dissectors/packet-someip-sd.c b/epan/dissectors/packet-someip-sd.c
index f0642f3e29..19473ea012 100644
--- a/epan/dissectors/packet-someip-sd.c
+++ b/epan/dissectors/packet-someip-sd.c
@@ -238,7 +238,7 @@ dissect_someip_sd_pdu_option_configuration(tvbuff_t *tvb, packet_info *pinfo, pr
offset += 1;
gint config_string_length = length - offset + offset_orig;
- ti = proto_tree_add_item_ret_string(tree, hf_someip_sd_option_config_string, tvb, offset, config_string_length, ENC_ASCII | ENC_NA, wmem_packet_scope(), &config_string);
+ ti = proto_tree_add_item_ret_string(tree, hf_someip_sd_option_config_string, tvb, offset, config_string_length, ENC_ASCII | ENC_NA, pinfo->pool, &config_string);
subtree = proto_item_add_subtree(ti, ett_someip_sd_config_string);
guint8 pos = 0;
diff --git a/epan/dissectors/packet-someip.c b/epan/dissectors/packet-someip.c
index 2070ee4a2a..8c9413a09d 100644
--- a/epan/dissectors/packet-someip.c
+++ b/epan/dissectors/packet-someip.c
@@ -2654,7 +2654,7 @@ dissect_someip_payload_string(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
str_encoding = ENC_ASCII | ENC_NA;
}
- buf = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, str_encoding);
+ buf = tvb_get_string_enc(pinfo->pool, tvb, offset, length, str_encoding);
/* sanitizing buffer */
if (str_encoding & ENC_ASCII || str_encoding & ENC_UTF_8) {
diff --git a/epan/dissectors/packet-soupbintcp.c b/epan/dissectors/packet-soupbintcp.c
index 50eb41026a..c3dca9b3dc 100644
--- a/epan/dissectors/packet-soupbintcp.c
+++ b/epan/dissectors/packet-soupbintcp.c
@@ -192,7 +192,7 @@ dissect_soupbintcp_common(
/* If first dissection of Login Accept, save sequence number */
if (pkt_type == 'A' && !PINFO_FD_VISITED(pinfo)) {
- ws_strtou32(tvb_get_string_enc(wmem_packet_scope(), tvb, 13, 20, ENC_ASCII),
+ ws_strtou32(tvb_get_string_enc(pinfo->pool, tvb, 13, 20, ENC_ASCII),
NULL, &next_seq);
/* Create new conversation for this session */
@@ -278,7 +278,7 @@ dissect_soupbintcp_common(
tvb, offset, 10, ENC_ASCII|ENC_NA);
offset += 10;
- seq_num_valid = ws_strtoi32(tvb_get_string_enc(wmem_packet_scope(),
+ seq_num_valid = ws_strtoi32(tvb_get_string_enc(pinfo->pool,
tvb, offset, 20, ENC_ASCII), NULL, &seq_num);
pi = proto_tree_add_string_format_value(soupbintcp_tree,
hf_soupbintcp_next_seq_num,
@@ -327,7 +327,7 @@ dissect_soupbintcp_common(
tvb, offset, 10, ENC_ASCII|ENC_NA);
offset += 10;
- seq_num_valid = ws_strtoi32(tvb_get_string_enc(wmem_packet_scope(),
+ seq_num_valid = ws_strtoi32(tvb_get_string_enc(pinfo->pool,
tvb, offset, 20, ENC_ASCII), NULL, &seq_num);
pi = proto_tree_add_string_format_value(soupbintcp_tree,
hf_soupbintcp_req_seq_num,
diff --git a/epan/dissectors/packet-spnego.c b/epan/dissectors/packet-spnego.c
index 475ec6dc7e..8cb5b2e849 100644
--- a/epan/dissectors/packet-spnego.c
+++ b/epan/dissectors/packet-spnego.c
@@ -1073,7 +1073,7 @@ decrypt_gssapi_krb_arcfour_wrap(proto_tree *tree _U_, packet_info *pinfo, tvbuff
/* XXX we should only do this for first time, then store somewhere */
/* XXX We also need to re-read the keytab when the preference changes */
- cryptocopy=(guint8 *)wmem_alloc(wmem_packet_scope(), length);
+ cryptocopy=(guint8 *)wmem_alloc(pinfo->pool, length);
output_message_buffer=(guint8 *)wmem_alloc(pinfo->pool, length);
for(ek=enc_key_list;ek;ek=ek->next){
diff --git a/epan/dissectors/packet-steam-ihs-discovery.c b/epan/dissectors/packet-steam-ihs-discovery.c
index 365418af29..c75c156bc4 100644
--- a/epan/dissectors/packet-steam-ihs-discovery.c
+++ b/epan/dissectors/packet-steam-ihs-discovery.c
@@ -520,7 +520,7 @@ steamdiscover_dissect_body_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree
value = get_varint64(pb.tvb, pb.offset, pb.bytes_left, &len);
proto_tree_add_item(tree, hf_steam_ihs_discovery_body_status_hostname, pb.tvb,
pb.offset+len, (gint)value, ENC_UTF_8|ENC_NA);
- hostname = tvb_get_string_enc(wmem_packet_scope(), pb.tvb, pb.offset+len, (gint)value, ENC_UTF_8);
+ hostname = tvb_get_string_enc(pinfo->pool, pb.tvb, pb.offset+len, (gint)value, ENC_UTF_8);
if(hostname && strlen(hostname)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "%s from %s", hf_steam_ihs_discovery_header_msgtype_strings[STEAMDISCOVER_MSGTYPE_CLIENTBROADCASTMSGSTATUS].strptr, hostname);
}
@@ -660,7 +660,7 @@ steamdiscover_dissect_body_authrequest(tvbuff_t *tvb, packet_info *pinfo, proto_
value = get_varint64(pb.tvb, pb.offset, pb.bytes_left, &len);
proto_tree_add_item(tree, hf_steam_ihs_discovery_body_authrequest_devicename, pb.tvb,
pb.offset+len, (gint)value, ENC_UTF_8|ENC_NA);
- devicename = tvb_get_string_enc(wmem_packet_scope(), pb.tvb, pb.offset+len, (gint)value, ENC_UTF_8);
+ devicename = tvb_get_string_enc(pinfo->pool, pb.tvb, pb.offset+len, (gint)value, ENC_UTF_8);
if (devicename && strlen(devicename)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " from %s", devicename);
}
diff --git a/epan/dissectors/packet-stun.c b/epan/dissectors/packet-stun.c
index 8bbd3a620a..2c9443ecca 100644
--- a/epan/dissectors/packet-stun.c
+++ b/epan/dissectors/packet-stun.c
@@ -952,7 +952,7 @@ dissect_stun_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole
if (!stun_trans) {
/* create a "fake" pana_trans structure */
- stun_trans=wmem_new(wmem_packet_scope(), stun_transaction_t);
+ stun_trans=wmem_new(pinfo->pool, stun_transaction_t);
stun_trans->req_frame=0;
stun_trans->rep_frame=0;
stun_trans->req_time=pinfo->abs_ts;
@@ -1209,7 +1209,7 @@ dissect_stun_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole
if (network_version > NET_VER_3489) {
const guint8 *user_name_str;
- proto_tree_add_item_ret_string(att_tree, hf_stun_att_username, tvb, offset, att_length, ENC_UTF_8|ENC_NA, wmem_packet_scope(), &user_name_str);
+ proto_tree_add_item_ret_string(att_tree, hf_stun_att_username, tvb, offset, att_length, ENC_UTF_8|ENC_NA, pinfo->pool, &user_name_str);
proto_item_append_text(att_tree, ": %s", user_name_str);
col_append_fstr( pinfo->cinfo, COL_INFO, " user: %s", user_name_str);
} else {
@@ -1253,7 +1253,7 @@ dissect_stun_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole
break;
{
const guint8 *error_reas_str;
- proto_tree_add_item_ret_string(att_tree, hf_stun_att_error_reason, tvb, offset + 4, att_length - 4, ENC_UTF_8 | ENC_NA, wmem_packet_scope(), &error_reas_str);
+ proto_tree_add_item_ret_string(att_tree, hf_stun_att_error_reason, tvb, offset + 4, att_length - 4, ENC_UTF_8 | ENC_NA, pinfo->pool, &error_reas_str);
proto_item_append_text(att_tree, ": %s", error_reas_str);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s", error_reas_str);
@@ -1268,7 +1268,7 @@ dissect_stun_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole
case REALM:
{
const guint8 *realm_str;
- proto_tree_add_item_ret_string(att_tree, hf_stun_att_realm, tvb, offset, att_length, ENC_UTF_8|ENC_NA, wmem_packet_scope(), &realm_str);
+ proto_tree_add_item_ret_string(att_tree, hf_stun_att_realm, tvb, offset, att_length, ENC_UTF_8|ENC_NA, pinfo->pool, &realm_str);
proto_item_append_text(att_tree, ": %s", realm_str);
col_append_fstr(pinfo->cinfo, COL_INFO, " realm: %s", realm_str);
break;
@@ -1276,7 +1276,7 @@ dissect_stun_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole
case NONCE:
{
const guint8 *nonce_str;
- proto_tree_add_item_ret_string(att_tree, hf_stun_att_nonce, tvb, offset, att_length, ENC_UTF_8|ENC_NA, wmem_packet_scope(), &nonce_str);
+ proto_tree_add_item_ret_string(att_tree, hf_stun_att_nonce, tvb, offset, att_length, ENC_UTF_8|ENC_NA, pinfo->pool, &nonce_str);
proto_item_append_text(att_tree, ": %s", nonce_str);
col_append_str(pinfo->cinfo, COL_INFO, " with nonce");
break;
@@ -1388,7 +1388,7 @@ dissect_stun_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole
}
if (addr.type != AT_NONE) {
- const gchar *ipstr = address_to_str(wmem_packet_scope(), &addr);
+ const gchar *ipstr = address_to_str(pinfo->pool, &addr);
proto_item_append_text(att_tree, ": %s:%d", ipstr, clear_port);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s: %s:%d",
attribute_name_str, ipstr, clear_port);
diff --git a/epan/dissectors/packet-sysex_digitech.c b/epan/dissectors/packet-sysex_digitech.c
index e656274c6f..4c3832ab02 100644
--- a/epan/dissectors/packet-sysex_digitech.c
+++ b/epan/dissectors/packet-sysex_digitech.c
@@ -1008,7 +1008,7 @@ dissect_digitech_procedure(guint8 procedure, const gint offset,
while ((count > 0) && (str_size = tvb_strsize(data_tvb, data_offset)))
{
- tmp_string = tvb_get_string_enc(wmem_packet_scope(), data_tvb, data_offset, str_size - 1, ENC_ASCII);
+ tmp_string = tvb_get_string_enc(pinfo->pool, data_tvb, data_offset, str_size - 1, ENC_ASCII);
proto_tree_add_string(tree, hf_digitech_preset_name, data_tvb, data_offset, str_size, tmp_string);
data_offset += (gint)str_size;
count--;
@@ -1032,7 +1032,7 @@ dissect_digitech_procedure(guint8 procedure, const gint offset,
/* Preset name (NULL-terminated) */
str_size = tvb_strsize(data_tvb, data_offset);
- tmp_string = tvb_get_string_enc(wmem_packet_scope(), data_tvb, data_offset, str_size - 1, ENC_ASCII);
+ tmp_string = tvb_get_string_enc(pinfo->pool, data_tvb, data_offset, str_size - 1, ENC_ASCII);
proto_tree_add_string(tree, hf_digitech_preset_name, data_tvb, data_offset, str_size, tmp_string);
data_offset += (gint)str_size;
diff --git a/epan/dissectors/packet-systemd-journal.c b/epan/dissectors/packet-systemd-journal.c
index b96ff7bbd8..6601f313fa 100644
--- a/epan/dissectors/packet-systemd-journal.c
+++ b/epan/dissectors/packet-systemd-journal.c
@@ -376,7 +376,7 @@ dissect_systemd_journal_line_entry(tvbuff_t *tvb, packet_info *pinfo _U_, proto_
}
if (hf_idx == hf_sj_message) {
col_clear(pinfo->cinfo, COL_INFO);
- col_add_str(pinfo->cinfo, COL_INFO, (char *) tvb_get_string_enc(wmem_packet_scope(), tvb, eq_off, val_len, ENC_UTF_8));
+ col_add_str(pinfo->cinfo, COL_INFO, (char *) tvb_get_string_enc(pinfo->pool, tvb, eq_off, val_len, ENC_UTF_8));
}
found = TRUE;
}
@@ -384,7 +384,7 @@ dissect_systemd_journal_line_entry(tvbuff_t *tvb, packet_info *pinfo _U_, proto_
if (!found && eq_off > offset + 1) {
proto_item *unk_ti = proto_tree_add_none_format(sje_tree, hf_sj_unknown_field, tvb, offset, line_len,
- "Unknown text field: %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, eq_off - offset - 1, ENC_UTF_8));
+ "Unknown text field: %s", tvb_get_string_enc(pinfo->pool, tvb, offset, eq_off - offset - 1, ENC_UTF_8));
proto_tree *unk_tree = proto_item_add_subtree(unk_ti, ett_systemd_unknown_field);
proto_tree_add_item(unk_tree, hf_sj_unknown_field_name, tvb, offset, eq_off - offset - 1, ENC_UTF_8|ENC_NA);
proto_tree_add_item(unk_tree, hf_sj_unknown_field_value, tvb, eq_off, val_len, ENC_UTF_8|ENC_NA);
diff --git a/epan/dissectors/packet-tali.c b/epan/dissectors/packet-tali.c
index e013f33560..47e431958d 100644
--- a/epan/dissectors/packet-tali.c
+++ b/epan/dissectors/packet-tali.c
@@ -92,7 +92,7 @@ dissect_tali_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
proto_item *tali_item = NULL;
proto_tree *tali_tree = NULL;
- opcode = (char *) tvb_get_string_enc(wmem_packet_scope(), tvb, TALI_SYNC_LENGTH, TALI_OPCODE_LENGTH, ENC_ASCII|ENC_NA);
+ opcode = (char *) tvb_get_string_enc(pinfo->pool, tvb, TALI_SYNC_LENGTH, TALI_OPCODE_LENGTH, ENC_ASCII|ENC_NA);
length = tvb_get_letohs(tvb, TALI_SYNC_LENGTH + TALI_OPCODE_LENGTH);
/* Make entries in Protocol column on summary display */
diff --git a/epan/dissectors/packet-tcap.c b/epan/dissectors/packet-tcap.c
index 3410f3b24e..96dd72b5b6 100644
--- a/epan/dissectors/packet-tcap.c
+++ b/epan/dissectors/packet-tcap.c
@@ -2131,7 +2131,7 @@ tcaphash_begin_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree *stat_tree=NULL;
#ifdef DEBUG_TCAPSRT
- dbg(51,"src %s srcTid %lx dst %s ", address_to_str(wmem_packet_scope(), &pinfo->src), p_tcapsrt_info->src_tid, address_to_str(wmem_packet_scope(), &pinfo->dst));
+ dbg(51,"src %s srcTid %lx dst %s ", address_to_str(pinfo->pool, &pinfo->src), p_tcapsrt_info->src_tid, address_to_str(pinfo->pool, &pinfo->dst));
#endif
/* prepare the key data */
@@ -2142,7 +2142,7 @@ tcaphash_begin_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
tcaphash_begin_key.pc_hash = mtp3_pc_hash((const mtp3_addr_pc_t *)pinfo->src.data);
} else {
/* Don't have MTP3 PCs (have SCCP GT ?) */
- tcaphash_begin_key.pc_hash = g_str_hash(address_to_str(wmem_packet_scope(), &pinfo->src));
+ tcaphash_begin_key.pc_hash = g_str_hash(address_to_str(pinfo->pool, &pinfo->src));
}
tcaphash_begin_key.hashKey=tcaphash_begin_calchash(&tcaphash_begin_key);
@@ -2150,7 +2150,7 @@ tcaphash_begin_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
#ifdef DEBUG_TCAPSRT
dbg(10,"\n Hbegin #%u ", pinfo->num);
dbg(11,"key %lx ",tcaphash_begin_key.hashKey);
- dbg(51,"addr %s ", address_to_str(wmem_packet_scope(), &pinfo->src));
+ dbg(51,"addr %s ", address_to_str(pinfo->pool, &pinfo->src));
dbg(51,"Tid %lx \n",tcaphash_begin_key.tid);
#endif
@@ -2322,7 +2322,7 @@ tcaphash_cont_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
gboolean use_dst = FALSE;
#ifdef DEBUG_TCAPSRT
- dbg(51,"src %s srcTid %lx dst %s dstTid %lx ", address_to_str(wmem_packet_scope(), &pinfo->src), p_tcapsrt_info->src_tid, address_to_str(wmem_packet_scope(), &pinfo->dst), p_tcapsrt_info->dst_tid);
+ dbg(51,"src %s srcTid %lx dst %s dstTid %lx ", address_to_str(pinfo->pool, &pinfo->src), p_tcapsrt_info->src_tid, address_to_str(pinfo->pool, &pinfo->dst), p_tcapsrt_info->dst_tid);
dbg(10,"\n Hcont #%u ", pinfo->num);
#endif
@@ -2336,14 +2336,14 @@ tcaphash_cont_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
tcaphash_cont_key.dpc_hash = mtp3_pc_hash((const mtp3_addr_pc_t *)pinfo->dst.data);
} else {
/* Don't have MTP3 PCs (have SCCP GT ?) */
- tcaphash_cont_key.opc_hash = g_str_hash(address_to_str(wmem_packet_scope(), &pinfo->src));
- tcaphash_cont_key.dpc_hash = g_str_hash(address_to_str(wmem_packet_scope(), &pinfo->dst));
+ tcaphash_cont_key.opc_hash = g_str_hash(address_to_str(pinfo->pool, &pinfo->src));
+ tcaphash_cont_key.dpc_hash = g_str_hash(address_to_str(pinfo->pool, &pinfo->dst));
}
tcaphash_cont_key.hashKey=tcaphash_cont_calchash(&tcaphash_cont_key);
#ifdef DEBUG_TCAPSRT
dbg(11,"Ckey %lx ", tcaphash_cont_key.hashKey);
- dbg(51,"addr %s %s ", address_to_str(wmem_packet_scope(), &pinfo->src), address_to_str(wmem_packet_scope(), &pinfo->dst));
+ dbg(51,"addr %s %s ", address_to_str(pinfo->pool, &pinfo->src), address_to_str(pinfo->pool, &pinfo->dst));
dbg(51,"Tid %lx %lx \n",tcaphash_cont_key.src_tid, tcaphash_cont_key.dst_tid);
#endif
p_tcaphash_contcall = find_tcaphash_cont(&tcaphash_cont_key, pinfo);
@@ -2364,13 +2364,13 @@ tcaphash_cont_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
tcaphash_begin_key.pc_hash = mtp3_pc_hash((const mtp3_addr_pc_t *)pinfo->dst.data);
} else {
/* Don't have MTP3 PCs (have SCCP GT ?) */
- tcaphash_begin_key.pc_hash = g_str_hash(address_to_str(wmem_packet_scope(), &pinfo->dst));
+ tcaphash_begin_key.pc_hash = g_str_hash(address_to_str(pinfo->pool, &pinfo->dst));
}
tcaphash_begin_key.hashKey=tcaphash_begin_calchash(&tcaphash_begin_key);
#ifdef DEBUG_TCAPSRT
dbg(11,"Bkey %lx ", tcaphash_begin_key.hashKey);
- dbg(51,"addr %s ", address_to_str(wmem_packet_scope(), &pinfo->dst));
+ dbg(51,"addr %s ", address_to_str(pinfo->pool, &pinfo->dst));
dbg(51,"Tid %lx \n",tcaphash_begin_key.tid);
#endif
p_tcaphash_begincall = find_tcaphash_begin(&tcaphash_begin_key, pinfo, FALSE);
@@ -2389,12 +2389,12 @@ tcaphash_cont_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
tcaphash_begin_key.pc_hash = mtp3_pc_hash((const mtp3_addr_pc_t *)pinfo->src.data);
} else {
/* Don't have MTP3 PCs (have SCCP GT ?) */
- tcaphash_begin_key.pc_hash = g_str_hash(address_to_str(wmem_packet_scope(), &pinfo->src));
+ tcaphash_begin_key.pc_hash = g_str_hash(address_to_str(pinfo->pool, &pinfo->src));
}
tcaphash_begin_key.hashKey=tcaphash_begin_calchash(&tcaphash_begin_key);
#ifdef DEBUG_TCAPSRT
dbg(11,"Bkey %lx ", tcaphash_begin_key.hashKey);
- dbg(51,"addr %s ", address_to_str(wmem_packet_scope(), &pinfo->src));
+ dbg(51,"addr %s ", address_to_str(pinfo->pool, &pinfo->src));
dbg(51,"Tid %lx \n",tcaphash_begin_key.tid);
#endif
p_tcaphash_begincall = find_tcaphash_begin(&tcaphash_begin_key, pinfo,FALSE);
@@ -2423,14 +2423,14 @@ tcaphash_cont_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
tcaphash_end_key.opc_hash = mtp3_pc_hash((const mtp3_addr_pc_t *)(use_dst ? pinfo->src.data : pinfo->dst.data));
} else {
/* Don't have MTP3 PCs (have SCCP GT ?) */
- tcaphash_end_key.dpc_hash = g_str_hash(address_to_str(wmem_packet_scope(), use_dst ? &pinfo->dst : &pinfo->src));
- tcaphash_end_key.opc_hash = g_str_hash(address_to_str(wmem_packet_scope(), use_dst ? &pinfo->src : &pinfo->dst));
+ tcaphash_end_key.dpc_hash = g_str_hash(address_to_str(pinfo->pool, use_dst ? &pinfo->dst : &pinfo->src));
+ tcaphash_end_key.opc_hash = g_str_hash(address_to_str(pinfo->pool, use_dst ? &pinfo->src : &pinfo->dst));
}
tcaphash_end_key.hashKey=tcaphash_end_calchash(&tcaphash_end_key);
#ifdef DEBUG_TCAPSRT
dbg(10,"New Ekey %lx ",tcaphash_end_key.hashKey);
- dbg(51,"addr %s ", address_to_str(wmem_packet_scope(), use_dst ? &pinfo->dst : &pinfo->src));
+ dbg(51,"addr %s ", address_to_str(pinfo->pool, use_dst ? &pinfo->dst : &pinfo->src));
dbg(51,"Tid %lx ",tcaphash_end_key.tid);
dbg(11,"Frame reqlink #%u ", pinfo->num);
#endif
@@ -2488,7 +2488,7 @@ tcaphash_end_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree *stat_tree=NULL;
#ifdef DEBUG_TCAPSRT
- dbg(51,"src %s dst %s dstTid %lx ", address_to_str(wmem_packet_scope(), &pinfo->src), address_to_str(wmem_packet_scope(), &pinfo->dst), p_tcapsrt_info->dst_tid);
+ dbg(51,"src %s dst %s dstTid %lx ", address_to_str(pinfo->pool, &pinfo->src), address_to_str(pinfo->pool, &pinfo->dst), p_tcapsrt_info->dst_tid);
dbg(10,"\n Hend #%u ", pinfo->num);
#endif
/* look only for matching request, if matching conversation is available. */
@@ -2500,14 +2500,14 @@ tcaphash_end_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
tcaphash_end_key.dpc_hash = mtp3_pc_hash((const mtp3_addr_pc_t *)pinfo->dst.data);
} else {
/* Don't have MTP3 PCs (have SCCP GT ?) */
- tcaphash_end_key.opc_hash = g_str_hash(address_to_str(wmem_packet_scope(), &pinfo->src));
- tcaphash_end_key.dpc_hash = g_str_hash(address_to_str(wmem_packet_scope(), &pinfo->dst));
+ tcaphash_end_key.opc_hash = g_str_hash(address_to_str(pinfo->pool, &pinfo->src));
+ tcaphash_end_key.dpc_hash = g_str_hash(address_to_str(pinfo->pool, &pinfo->dst));
}
tcaphash_end_key.hashKey=tcaphash_end_calchash(&tcaphash_end_key);
#ifdef DEBUG_TCAPSRT
dbg(11,"Ekey %lx ",tcaphash_end_key.hashKey);
- dbg(11,"addr %s ", address_to_str(wmem_packet_scope(), &pinfo->dst));
+ dbg(11,"addr %s ", address_to_str(pinfo->pool, &pinfo->dst));
dbg(51,"Tid %lx ",tcaphash_end_key.tid);
#endif
p_tcaphash_endcall = find_tcaphash_end(&tcaphash_end_key, pinfo,TRUE);
@@ -2523,13 +2523,13 @@ tcaphash_end_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
tcaphash_begin_key.pc_hash = mtp3_pc_hash((const mtp3_addr_pc_t *)pinfo->dst.data);
} else {
/* Don't have MTP3 PCs (have SCCP GT ?) */
- tcaphash_begin_key.pc_hash = g_str_hash(address_to_str(wmem_packet_scope(), &pinfo->dst));
+ tcaphash_begin_key.pc_hash = g_str_hash(address_to_str(pinfo->pool, &pinfo->dst));
}
tcaphash_begin_key.hashKey=tcaphash_begin_calchash(&tcaphash_begin_key);
#ifdef DEBUG_TCAPSRT
dbg(11,"Bkey %lx ", tcaphash_begin_key.hashKey);
- dbg(51,"addr %s ", address_to_str(wmem_packet_scope(), &pinfo->dst));
+ dbg(51,"addr %s ", address_to_str(pinfo->pool, &pinfo->dst));
dbg(51,"Tid %lx ",tcaphash_begin_key.tid);
#endif
p_tcaphash_begincall = find_tcaphash_begin(&tcaphash_begin_key, pinfo,FALSE);
@@ -2620,8 +2620,8 @@ tcaphash_ansi_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
tcaphash_ansi_key.dpc_hash = mtp3_pc_hash((const mtp3_addr_pc_t *)pinfo->dst.data);
} else {
/* Don't have MTP3 PCs (have SCCP GT ?) */
- tcaphash_ansi_key.opc_hash = g_str_hash(address_to_str(wmem_packet_scope(), &pinfo->src));
- tcaphash_ansi_key.dpc_hash = g_str_hash(address_to_str(wmem_packet_scope(), &pinfo->dst));
+ tcaphash_ansi_key.opc_hash = g_str_hash(address_to_str(pinfo->pool, &pinfo->src));
+ tcaphash_ansi_key.dpc_hash = g_str_hash(address_to_str(pinfo->pool, &pinfo->dst));
}
tcaphash_ansi_key.hashKey=tcaphash_ansi_calchash(&tcaphash_ansi_key);
@@ -2629,7 +2629,7 @@ tcaphash_ansi_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
#ifdef DEBUG_TCAPSRT
dbg(10,"\n Hansi #%u ", pinfo->num);
dbg(11,"key %lx ",tcaphash_ansi_key.hashKey);
- dbg(51,"PC %s %s ",address_to_str(wmem_packet_scope(), &pinfo->src), address_to_str(wmem_packet_scope(), &pinfo->dst));
+ dbg(51,"PC %s %s ",address_to_str(pinfo->pool, &pinfo->src), address_to_str(pinfo->pool, &pinfo->dst));
dbg(51,"Tid %lx ",tcaphash_ansi_key.tid);
#endif
p_tcaphash_ansicall = (struct tcaphash_ansicall_t *)
@@ -3168,7 +3168,7 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
cur_oid = NULL;
tcapext_oid = NULL;
- p_tcap_private = wmem_new0(wmem_packet_scope(), struct tcap_private_t);
+ p_tcap_private = wmem_new0(pinfo->pool, struct tcap_private_t);
asn1_ctx.value_ptr = p_tcap_private;
gp_tcapsrt_info=tcapsrt_razinfo();
tcap_subdissector_used=FALSE;
diff --git a/epan/dissectors/packet-tcpros.c b/epan/dissectors/packet-tcpros.c
index 6b0c12c79e..0d58c6de5e 100644
--- a/epan/dissectors/packet-tcpros.c
+++ b/epan/dissectors/packet-tcpros.c
@@ -92,7 +92,7 @@ dissect_ros_connection_header_field(tvbuff_t *tvb, proto_tree *tree, packet_info
if( sep > 0 ) {
const guint8* field;
field_tree = proto_item_add_subtree(ti, ett_tcpros);
- proto_tree_add_item_ret_string(field_tree, hf_tcpros_connection_header_field_name, tvb, offset, sep, ENC_UTF_8|ENC_NA, wmem_packet_scope(), &field);
+ proto_tree_add_item_ret_string(field_tree, hf_tcpros_connection_header_field_name, tvb, offset, sep, ENC_UTF_8|ENC_NA, pinfo->pool, &field);
proto_tree_add_item(field_tree, hf_tcpros_connection_header_field_value, tvb, offset+sep+1, fLen - sep - 1, ENC_UTF_8|ENC_NA);
col_append_str(pinfo->cinfo, COL_INFO, field);
@@ -228,7 +228,7 @@ dissect_ros_message_header(tvbuff_t *tvb, proto_tree *root_tree, packet_info *pi
proto_tree_add_item(sub_tree, hf_tcpros_message_header_frame_length, tvb, offset + consumed_len, SIZE_OF_LENGTH_FIELD, ENC_LITTLE_ENDIAN);
consumed_len += SIZE_OF_LENGTH_FIELD;
- proto_tree_add_item_ret_string(sub_tree, hf_tcpros_message_header_frame_value, tvb, offset + consumed_len, frame_id_len, ENC_UTF_8|ENC_NA, wmem_packet_scope(), &frame_str);
+ proto_tree_add_item_ret_string(sub_tree, hf_tcpros_message_header_frame_value, tvb, offset + consumed_len, frame_id_len, ENC_UTF_8|ENC_NA, pinfo->pool, &frame_str);
col_append_fstr(pinfo->cinfo, COL_INFO, "Frame ID: '%s' ", frame_str);
consumed_len += frame_id_len;
diff --git a/epan/dissectors/packet-tftp.c b/epan/dissectors/packet-tftp.c
index 8191f0cd8f..54d9c2286c 100644
--- a/epan/dissectors/packet-tftp.c
+++ b/epan/dissectors/packet-tftp.c
@@ -613,7 +613,7 @@ static void dissect_tftp_message(tftp_conv_info_t *tftp_info,
tftp_eo_t *eo_info;
/* Create the eo_info to pass to the listener */
- eo_info = wmem_new(wmem_packet_scope(), tftp_eo_t);
+ eo_info = wmem_new(pinfo->pool, tftp_eo_t);
/* Set filename */
eo_info->filename = g_strdup(filename);
diff --git a/epan/dissectors/packet-thread.c b/epan/dissectors/packet-thread.c
index 588ac2f9cb..17445f8451 100644
--- a/epan/dissectors/packet-thread.c
+++ b/epan/dissectors/packet-thread.c
@@ -1952,7 +1952,7 @@ dissect_thread_nwd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
tvb_memcpy(tvb, (guint8 *)&prefix.bytes, offset, prefix_byte_len);
proto_tree_add_ipv6(tlv_tree, hf_thread_nwd_tlv_prefix, tvb, offset, prefix_byte_len, &prefix);
set_address(&prefix_addr, AT_IPv6, 16, prefix.bytes);
- proto_item_append_text(ti, " = %s/%d", address_to_str(wmem_packet_scope(), &prefix_addr), prefix_len);
+ proto_item_append_text(ti, " = %s/%d", address_to_str(pinfo->pool, &prefix_addr), prefix_len);
offset += prefix_byte_len;
tlv_offset += prefix_byte_len;
@@ -2111,7 +2111,7 @@ dissect_thread_coap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
uri = wmem_strbuf_get_str(coinfo->uri_str_strbuf);
- tokens = wmem_strsplit(wmem_packet_scope(), uri, "/", 3);
+ tokens = wmem_strsplit(pinfo->pool, uri, "/", 3);
if (g_strv_length(tokens) == 3) {
/* No need to create a subset as we are dissecting the tvb as it is. */
dissector_try_string(thread_coap_namespace, tokens[THREAD_URI_NAMESPACE_IDX], tvb, pinfo, tree, NULL);
@@ -2155,7 +2155,7 @@ static int dissect_thread_bcn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
offset += 1;
/* Get and display the network ID. */
- proto_tree_add_item_ret_string(beacon_tree, hf_thread_bcn_network_id, tvb, offset, 16, ENC_ASCII|ENC_NA, wmem_packet_scope(), &ssid);
+ proto_tree_add_item_ret_string(beacon_tree, hf_thread_bcn_network_id, tvb, offset, 16, ENC_ASCII|ENC_NA, pinfo->pool, &ssid);
col_append_fstr(pinfo->cinfo, COL_INFO, ", Network ID: %s", ssid);
offset += 16;
diff --git a/epan/dissectors/packet-thrift.c b/epan/dissectors/packet-thrift.c
index 7992165740..b3086b0724 100644
--- a/epan/dissectors/packet-thrift.c
+++ b/epan/dissectors/packet-thrift.c
@@ -599,7 +599,7 @@ dissect_thrift_common(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void
str_len = tvb_get_ntohl(tvb, 4);
seq_id = tvb_get_ntohl(tvb, str_len + 8);
- method_str = tvb_get_string_enc(wmem_packet_scope(), tvb, 8, str_len, ENC_UTF_8);
+ method_str = tvb_get_string_enc(pinfo->pool, tvb, 8, str_len, ENC_UTF_8);
proto_tree_add_item(tree, proto_thrift, tvb, 0, -1, ENC_NA);
sub_tree = proto_tree_add_subtree_format(tree, tvb, 0, -1, ett_thrift, NULL, "%s[ version:0x%x, seqid:%d, method:%s]",
diff --git a/epan/dissectors/packet-tibia.c b/epan/dissectors/packet-tibia.c
index 1dc192850c..e68d09e42e 100644
--- a/epan/dissectors/packet-tibia.c
+++ b/epan/dissectors/packet-tibia.c
@@ -846,7 +846,7 @@ dissect_loginserv_packet(struct tibia_convo *convo, tvbuff_t *tvb, int offset, i
ptvcursor_add(ptvc, hf_tibia_worldlist_entry_name, 2, convo->has.string_enc | ENC_LITTLE_ENDIAN);
guint ipv4addr_len = tvb_get_letohs(tvb, ptvcursor_current_offset(ptvc));
- char *ipv4addr_str = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, ptvcursor_current_offset(ptvc) + 2, ipv4addr_len, ENC_LITTLE_ENDIAN | convo->has.string_enc);
+ char *ipv4addr_str = (char*)tvb_get_string_enc(pinfo->pool, tvb, ptvcursor_current_offset(ptvc) + 2, ipv4addr_len, ENC_LITTLE_ENDIAN | convo->has.string_enc);
guint32 ipv4addr = ipv4tonl(ipv4addr_str);
ptvcursor_add(ptvc, hf_tibia_worldlist_entry_ip, 2, ENC_LITTLE_ENDIAN | convo->has.string_enc);
guint16 port = tvb_get_letohs(tvb, ptvcursor_current_offset(ptvc));
@@ -1487,7 +1487,7 @@ dissect_tibia(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *fragmen
}
offset += len;
} else /* account number */ {
- char *accnum = wmem_strdup_printf(wmem_packet_scope(), "%" G_GUINT32_FORMAT, tvb_get_letohl(tvb_decrypted, offset));
+ char *accnum = wmem_strdup_printf(pinfo->pool, "%" G_GUINT32_FORMAT, tvb_get_letohl(tvb_decrypted, offset));
proto_tree_add_string(tibia_tree, hf_tibia_acc_number, tvb_decrypted, offset, 4, accnum);
if (!convo->acc)
convo->acc = (guint8*)wmem_strdup(wmem_file_scope(), accnum);
@@ -1529,7 +1529,7 @@ dissect_tibia(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *fragmen
proto_tree_add_item_ret_uint(subtree, hf_tibia_client_locale_id, tvb_decrypted, offset, 1, ENC_NA, &locale_id);
offset += 1;
- proto_tree_add_item_ret_string(subtree, hf_tibia_client_locale_name, tvb_decrypted, offset, 3, convo->has.string_enc|ENC_NA, wmem_packet_scope(), &locale_name);
+ proto_tree_add_item_ret_string(subtree, hf_tibia_client_locale_name, tvb_decrypted, offset, 3, convo->has.string_enc|ENC_NA, pinfo->pool, &locale_name);
offset += 3;
proto_item_set_text(item, "Locale: %s (0x%X)", locale_name, locale_id);
/* } */
@@ -1547,7 +1547,7 @@ dissect_tibia(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *fragmen
item = proto_tree_add_item(infotree, hf_tibia_client_cpu, tvb_decrypted, offset, 15, ENC_NA);
subtree = proto_item_add_subtree(item, ett_cpu);
- proto_tree_add_item_ret_string(subtree, hf_tibia_client_cpu_name, tvb_decrypted, offset, 9, convo->has.string_enc|ENC_NA, wmem_packet_scope(), &cpu);
+ proto_tree_add_item_ret_string(subtree, hf_tibia_client_cpu_name, tvb_decrypted, offset, 9, convo->has.string_enc|ENC_NA, pinfo->pool, &cpu);
offset += 9;
proto_tree_add_item(subtree, hf_tibia_unknown, tvb_decrypted, offset, 2, ENC_NA);
diff --git a/epan/dissectors/packet-time.c b/epan/dissectors/packet-time.c
index a3426c7bf0..fb648de533 100644
--- a/epan/dissectors/packet-time.c
+++ b/epan/dissectors/packet-time.c
@@ -65,7 +65,7 @@ dissect_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
guint32 delta_seconds = tvb_get_ntohl(tvb, 0);
proto_tree_add_uint_format(time_tree, hf_time_time, tvb, 0, 4,
delta_seconds, "%s",
- abs_time_secs_to_str(wmem_packet_scope(), delta_seconds-EPOCH_DELTA_1900_01_01_00_00_00_UTC,
+ abs_time_secs_to_str(pinfo->pool, delta_seconds-EPOCH_DELTA_1900_01_01_00_00_00_UTC,
(absolute_time_display_e)time_display_type, TRUE));
}
return tvb_captured_length(tvb);
diff --git a/epan/dissectors/packet-tivoconnect.c b/epan/dissectors/packet-tivoconnect.c
index ffffb6b148..16e0226e79 100644
--- a/epan/dissectors/packet-tivoconnect.c
+++ b/epan/dissectors/packet-tivoconnect.c
@@ -58,7 +58,7 @@ dissect_tivoconnect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolea
}
length = tvb_captured_length(tvb);
- string = (gchar*)tvb_get_string_enc(wmem_packet_scope(), tvb, 0, length, ENC_ASCII);
+ string = (gchar*)tvb_get_string_enc(pinfo->pool, tvb, 0, length, ENC_ASCII);
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "TiVoConnect");
diff --git a/epan/dissectors/packet-tn3270.c b/epan/dissectors/packet-tn3270.c
index 5fd9adcb96..10e13d25f8 100644
--- a/epan/dissectors/packet-tn3270.c
+++ b/epan/dissectors/packet-tn3270.c
@@ -4718,7 +4718,7 @@ dissect_structured_fields(proto_tree *tn3270_tree, packet_info *pinfo, tvbuff_t
}
/* Not found */
- sf_id_str = wmem_strdup_printf(wmem_packet_scope(), "Unknown [%0*x]", sf_id_len*2, sf_id);
+ sf_id_str = wmem_strdup_printf(pinfo->pool, "Unknown [%0*x]", sf_id_len*2, sf_id);
display_sf_hdr(tn3270_tree, tvb, offset, sf_length,
sf_length, sf_id_len, sf_id_str);
offset += sf_length;
diff --git a/epan/dissectors/packet-tnef.c b/epan/dissectors/packet-tnef.c
index 51ca209cbe..3be315070b 100644
--- a/epan/dissectors/packet-tnef.c
+++ b/epan/dissectors/packet-tnef.c
@@ -382,7 +382,7 @@ static void dissect_mapiprops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
offset += 4;
proto_tree_add_item_ret_string(tag_tree, hf_tnef_property_tag_name_string, tvb, offset, tag_length,
- ENC_UTF_16|ENC_LITTLE_ENDIAN, wmem_packet_scope(), &name_string);
+ ENC_UTF_16|ENC_LITTLE_ENDIAN, pinfo->pool, &name_string);
offset += tag_length;
if((padding = (4 - tag_length % 4)) != 4) {
@@ -603,7 +603,7 @@ static int dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
case ATP_STRING:
{
const guint8* atp;
- proto_tree_add_item_ret_string(attr_tree, hf_tnef_attribute_string, tvb, offset, length, oem_encoding, wmem_packet_scope(), &atp);
+ proto_tree_add_item_ret_string(attr_tree, hf_tnef_attribute_string, tvb, offset, length, oem_encoding, pinfo->pool, &atp);
proto_item_append_text(attr_item, " %s", atp);
}
break;
diff --git a/epan/dissectors/packet-tsdns.c b/epan/dissectors/packet-tsdns.c
index 87913b534f..ebd86f211b 100644
--- a/epan/dissectors/packet-tsdns.c
+++ b/epan/dissectors/packet-tsdns.c
@@ -50,10 +50,10 @@ static int dissect_tsdns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
if (request) {
col_set_str(pinfo->cinfo, COL_INFO, "Request");
- col_append_fstr(pinfo->cinfo, COL_INFO, " %.*s", pLen - 5, tvb_get_string_enc(wmem_packet_scope(), tvb, 0, pLen - 5, ENC_ASCII|ENC_NA));
+ col_append_fstr(pinfo->cinfo, COL_INFO, " %.*s", pLen - 5, tvb_get_string_enc(pinfo->pool, tvb, 0, pLen - 5, ENC_ASCII|ENC_NA));
} else {
col_set_str(pinfo->cinfo, COL_INFO, "Response");
- col_append_fstr(pinfo->cinfo, COL_INFO, " %.*s", pLen, tvb_get_string_enc(wmem_packet_scope(), tvb, 0, pLen, ENC_ASCII|ENC_NA));
+ col_append_fstr(pinfo->cinfo, COL_INFO, " %.*s", pLen, tvb_get_string_enc(pinfo->pool, tvb, 0, pLen, ENC_ASCII|ENC_NA));
}
proto_tree *tsdns_tree;
@@ -72,7 +72,7 @@ static int dissect_tsdns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
hidden_item = proto_tree_add_boolean(tsdns_tree, hf_tsdns_response, tvb, 0, 0, 1);
address_item = proto_tree_add_item(tsdns_tree, hf_tsdns_response_address, tvb, offset, pLen, ENC_ASCII|ENC_NA);
gchar** splitAddress;
- splitAddress = wmem_strsplit(wmem_packet_scope(), tvb_format_text(tvb, 0, pLen), ":", 1); // unsure if TSDNS also does IPv6...
+ splitAddress = wmem_strsplit(pinfo->pool, tvb_format_text(tvb, 0, pLen), ":", 1); // unsure if TSDNS also does IPv6...
if (splitAddress == NULL || splitAddress[0] == NULL || splitAddress[1] == NULL) {
expert_add_info(pinfo, address_item, &ei_response_port_malformed);
} else {
diff --git a/epan/dissectors/packet-turbocell.c b/epan/dissectors/packet-turbocell.c
index a0dc7a57e2..4027505478 100644
--- a/epan/dissectors/packet-turbocell.c
+++ b/epan/dissectors/packet-turbocell.c
@@ -153,8 +153,8 @@ dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
name_item = proto_tree_add_item(turbocell_tree, hf_turbocell_name, tvb, 0x14, 30, ENC_ASCII|ENC_NA);
network_tree = proto_item_add_subtree(name_item, ett_network);
- str_name=tvb_get_stringz_enc(wmem_packet_scope(), tvb, 0x14, &str_len, ENC_ASCII);
- col_append_fstr(pinfo->cinfo, COL_INFO, ", Network=\"%s\"", format_text(wmem_packet_scope(), str_name, str_len-1));
+ str_name=tvb_get_stringz_enc(pinfo->pool, tvb, 0x14, &str_len, ENC_ASCII);
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Network=\"%s\"", format_text(pinfo->pool, str_name, str_len-1));
while(tvb_get_guint8(tvb, 0x34 + 8*i)==0x00 && (tvb_reported_length_remaining(tvb,0x34 + 8*i) > 6) && (i<32)) {
proto_tree_add_item(network_tree, hf_turbocell_station, tvb, 0x34+8*i, 6, ENC_NA);
diff --git a/epan/dissectors/packet-ua3g.c b/epan/dissectors/packet-ua3g.c
index bfd5855d6c..8a536af442 100644
--- a/epan/dissectors/packet-ua3g.c
+++ b/epan/dissectors/packet-ua3g.c
@@ -1983,7 +1983,7 @@ decode_lcd_line_cmd(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
if (!ua3g_body_tree)
return;
- strbuf = wmem_strbuf_new_label(wmem_packet_scope());
+ strbuf = wmem_strbuf_new_label(pinfo->pool);
wmem_strbuf_append_printf(strbuf, "\"%s\"", tvb_format_text(tvb, offset + 2, length - 2));
@@ -2803,7 +2803,7 @@ decode_audio_config(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
int j;
int device_index = 0;
- strbuf = wmem_strbuf_new_label(wmem_packet_scope());
+ strbuf = wmem_strbuf_new_label(pinfo->pool);
while (length > 0) {
diff --git a/epan/dissectors/packet-ubdp.c b/epan/dissectors/packet-ubdp.c
index f06f9c1f8d..234a0cbf6a 100644
--- a/epan/dissectors/packet-ubdp.c
+++ b/epan/dissectors/packet-ubdp.c
@@ -195,7 +195,7 @@ dissect_ubdp(tvbuff_t *ubdp_tvb, packet_info *pinfo, proto_tree *tree, void *dat
proto_tree_add_item(tlv_tree, hf_ubdp_hostname, ubdp_tvb, offset, ubdp_length, ENC_ASCII|ENC_NA);
break;
case UB_PRODUCT:
- uValue = tvb_get_string_enc(wmem_packet_scope(), ubdp_tvb, offset, ubdp_length, ENC_ASCII);
+ uValue = tvb_get_string_enc(pinfo->pool, ubdp_tvb, offset, ubdp_length, ENC_ASCII);
uModel = try_str_to_str(uValue, ubiquiti_vals);
proto_tree_add_string(tlv_tree, hf_ubdp_product, ubdp_tvb, offset, ubdp_length, uModel ? uModel : uValue);
break;
@@ -227,12 +227,12 @@ dissect_ubdp(tvbuff_t *ubdp_tvb, packet_info *pinfo, proto_tree *tree, void *dat
}
break;
case UB_TYPE:
- uValue = tvb_get_string_enc(wmem_packet_scope(), ubdp_tvb, offset, ubdp_length, ENC_ASCII);
+ uValue = tvb_get_string_enc(pinfo->pool, ubdp_tvb, offset, ubdp_length, ENC_ASCII);
uModel = try_str_to_str(uValue, ubiquiti_vals);
proto_tree_add_string(tlv_tree, hf_ubdp_model, ubdp_tvb, offset, ubdp_length, uModel ? uModel : uValue);
break;
case UB_MODEL:
- uValue = tvb_get_string_enc(wmem_packet_scope(), ubdp_tvb, offset, ubdp_length, ENC_ASCII);
+ uValue = tvb_get_string_enc(pinfo->pool, ubdp_tvb, offset, ubdp_length, ENC_ASCII);
uModel = try_str_to_str(uValue, ubiquiti_vals);
proto_tree_add_string(tlv_tree, hf_ubdp_model, ubdp_tvb, offset, ubdp_length, uModel ? uModel : uValue);
break;
diff --git a/epan/dissectors/packet-ubertooth.c b/epan/dissectors/packet-ubertooth.c
index 3bc2fb1ee2..f0c7b14213 100644
--- a/epan/dissectors/packet-ubertooth.c
+++ b/epan/dissectors/packet-ubertooth.c
@@ -1324,7 +1324,7 @@ dissect_usb_rx_packet(proto_tree *main_tree, proto_tree *tree, packet_info *pinf
else
length += tvb_get_guint8(tvb, offset + 5) & 0x1f;
- ubertooth_data = wmem_new(wmem_packet_scope(), ubertooth_data_t);
+ ubertooth_data = wmem_new(pinfo->pool, ubertooth_data_t);
ubertooth_data->bus_id = usb_conv_info->bus_id;
ubertooth_data->device_address = usb_conv_info->device_address;
ubertooth_data->clock_100ns = clock_100ns;
@@ -1677,7 +1677,7 @@ dissect_ubertooth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
break;
case 51: /* Set AFH Map */
proto_tree_add_item(main_tree, hf_afh_map, tvb, offset, 10, ENC_NA);
- col_append_fstr(pinfo->cinfo, COL_INFO, " - %s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 10));
+ col_append_fstr(pinfo->cinfo, COL_INFO, " - %s", tvb_bytes_to_str(pinfo->pool, tvb, offset, 10));
offset += 10;
break;
@@ -1829,7 +1829,7 @@ dissect_ubertooth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
if (status) break;
- serial = (guint32 *) wmem_alloc(wmem_packet_scope(), 16);
+ serial = (guint32 *) wmem_alloc(pinfo->pool, 16);
serial[0] = tvb_get_ntohl(tvb, offset);
serial[1] = tvb_get_ntohl(tvb, offset + 4);
serial[2] = tvb_get_ntohl(tvb, offset + 8);
@@ -1838,7 +1838,7 @@ dissect_ubertooth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
proto_tree_add_bytes(main_tree, hf_serial_number, tvb,
offset, 16, (guint8 *) serial);
col_append_fstr(pinfo->cinfo, COL_INFO, " = %s",
- bytes_to_str(wmem_packet_scope(), (guint8 *) serial, 16));
+ bytes_to_str(pinfo->pool, (guint8 *) serial, 16));
offset += 16;
break;
@@ -1906,7 +1906,7 @@ dissect_ubertooth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
length = tvb_get_guint8(tvb, offset);
offset += 1;
- proto_tree_add_item_ret_string(main_tree, hf_firmware_revision, tvb, offset, length, ENC_NA | ENC_ASCII, wmem_packet_scope(), &firmware);
+ proto_tree_add_item_ret_string(main_tree, hf_firmware_revision, tvb, offset, length, ENC_NA | ENC_ASCII, pinfo->pool, &firmware);
col_append_fstr(pinfo->cinfo, COL_INFO, " = %s", firmware);
offset += length;
}
@@ -1982,7 +1982,7 @@ dissect_ubertooth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
length = tvb_get_guint8(tvb, offset);
offset += 1;
- proto_tree_add_item_ret_string(main_tree, hf_firmware_compile_info, tvb, offset, length, ENC_NA | ENC_ASCII, wmem_packet_scope(), &compile);
+ proto_tree_add_item_ret_string(main_tree, hf_firmware_compile_info, tvb, offset, length, ENC_NA | ENC_ASCII, pinfo->pool, &compile);
col_append_fstr(pinfo->cinfo, COL_INFO, " = %s", compile);
offset += length;
}
diff --git a/epan/dissectors/packet-udp.c b/epan/dissectors/packet-udp.c
index 7572969969..5b87ed7e60 100644
--- a/epan/dissectors/packet-udp.c
+++ b/epan/dissectors/packet-udp.c
@@ -991,7 +991,7 @@ dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 ip_proto)
proto_tree *process_tree;
gboolean udp_jumbogram = FALSE;
- udph = wmem_new0(wmem_packet_scope(), e_udphdr);
+ udph = wmem_new0(pinfo->pool, e_udphdr);
udph->uh_sport = tvb_get_ntohs(tvb, offset);
udph->uh_dport = tvb_get_ntohs(tvb, offset + 2);
copy_address_shallow(&udph->ip_src, &pinfo->src);
@@ -1007,8 +1007,8 @@ dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 ip_proto)
ti = proto_tree_add_item(tree, (ip_proto == IP_PROTO_UDP) ? hfi_udp : hfi_udplite, tvb, offset, 8, ENC_NA);
if (udp_summary_in_tree) {
proto_item_append_text(ti, ", Src Port: %s, Dst Port: %s",
- port_with_resolution_to_str(wmem_packet_scope(), PT_UDP, udph->uh_sport),
- port_with_resolution_to_str(wmem_packet_scope(), PT_UDP, udph->uh_dport));
+ port_with_resolution_to_str(pinfo->pool, PT_UDP, udph->uh_sport),
+ port_with_resolution_to_str(pinfo->pool, PT_UDP, udph->uh_dport));
}
udp_tree = proto_item_add_subtree(ti, ett_udp);
p_add_proto_data(pinfo->pool, pinfo, hfi_udp->id, pinfo->curr_layer_num, udp_tree);
diff --git a/epan/dissectors/packet-uds.c b/epan/dissectors/packet-uds.c
index 47e791f5e3..a8a3240e7c 100644
--- a/epan/dissectors/packet-uds.c
+++ b/epan/dissectors/packet-uds.c
@@ -611,7 +611,7 @@ dissect_uds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void* data
proto_tree_add_item(subtree, hf_uds_dsc_parameter_record, tvb,
UDS_DSC_PARAMETER_RECORD_OFFSET, parameter_record_length, ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
- tvb_bytes_to_str_punct(wmem_packet_scope(), tvb, UDS_DSC_PARAMETER_RECORD_OFFSET,
+ tvb_bytes_to_str_punct(pinfo->pool, tvb, UDS_DSC_PARAMETER_RECORD_OFFSET,
parameter_record_length, ' '));
}
break;
@@ -631,7 +631,7 @@ dissect_uds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void* data
proto_tree_add_item(subtree, hf_uds_rdtci_record, tvb,
UDS_RDTCI_RECORD_OFFSET, record_length, ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s %s", val_to_str(enum_val, uds_rdtci_types, "Unknown (0x%02x)"),
- tvb_bytes_to_str_punct(wmem_packet_scope(), tvb, UDS_RDTCI_RECORD_OFFSET, record_length, ' '));
+ tvb_bytes_to_str_punct(pinfo->pool, tvb, UDS_RDTCI_RECORD_OFFSET, record_length, ' '));
break;
}
case UDS_SERVICES_RDBI:
@@ -650,7 +650,7 @@ dissect_uds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void* data
col_append_fstr(pinfo->cinfo, COL_INFO, " 0x%04x", data_identifier);
infocol_append_data_name(pinfo, data_identifier);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
- tvb_bytes_to_str_punct(wmem_packet_scope(), tvb, UDS_RDBI_DATA_RECORD_OFFSET,
+ tvb_bytes_to_str_punct(pinfo->pool, tvb, UDS_RDBI_DATA_RECORD_OFFSET,
record_length, ' '));
} else {
guint32 identifier_length = data_length - UDS_RDBI_DATA_IDENTIFIER_OFFSET;
@@ -681,7 +681,7 @@ dissect_uds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void* data
if (seed_length > 0) {
proto_tree_add_item(subtree, hf_uds_sa_seed, tvb, UDS_SA_SEED_OFFSET, seed_length, ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
- tvb_bytes_to_str_punct(wmem_packet_scope(), tvb, UDS_SA_SEED_OFFSET, seed_length,
+ tvb_bytes_to_str_punct(pinfo->pool, tvb, UDS_SA_SEED_OFFSET, seed_length,
' '));
}
} else {
@@ -689,7 +689,7 @@ dissect_uds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void* data
if (key_length > 0) {
proto_tree_add_item(subtree, hf_uds_sa_key, tvb, UDS_SA_KEY_OFFSET, key_length, ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
- tvb_bytes_to_str_punct(wmem_packet_scope(), tvb, UDS_SA_KEY_OFFSET, key_length,
+ tvb_bytes_to_str_punct(pinfo->pool, tvb, UDS_SA_KEY_OFFSET, key_length,
' '));
}
}
@@ -711,7 +711,7 @@ dissect_uds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void* data
col_append_fstr(pinfo->cinfo, COL_INFO, " 0x%04x", enum_val);
infocol_append_data_name(pinfo, enum_val);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
- tvb_bytes_to_str_punct(wmem_packet_scope(), tvb, UDS_WDBI_DATA_RECORD_OFFSET,
+ tvb_bytes_to_str_punct(pinfo->pool, tvb, UDS_WDBI_DATA_RECORD_OFFSET,
record_length, ' '));
}
break;
@@ -735,7 +735,7 @@ dissect_uds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void* data
infocol_append_data_name(pinfo, data_identifier);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s %s",
val_to_str(enum_val, uds_iocbi_parameters, "Unknown (0x%02x)"),
- tvb_bytes_to_str_punct(wmem_packet_scope(), tvb, UDS_IOCBI_STATE_OFFSET,
+ tvb_bytes_to_str_punct(pinfo->pool, tvb, UDS_IOCBI_STATE_OFFSET,
state_length, ' '));
break;
}
@@ -765,7 +765,7 @@ dissect_uds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void* data
proto_tree_add_item(subtree, hf_uds_rc_status_record, tvb,
UDS_RC_STATUS_RECORD_OFFSET, status_record_len, ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
- tvb_bytes_to_str_punct(wmem_packet_scope(), tvb,
+ tvb_bytes_to_str_punct(pinfo->pool, tvb,
UDS_RC_STATUS_RECORD_OFFSET, status_record_len, ' '));
}
}
@@ -775,7 +775,7 @@ dissect_uds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void* data
proto_tree_add_item(subtree, hf_uds_rc_option_record, tvb,
UDS_RC_OPTION_RECORD_OFFSET, option_record_len, ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
- tvb_bytes_to_str_punct(wmem_packet_scope(), tvb,
+ tvb_bytes_to_str_punct(pinfo->pool, tvb,
UDS_RC_OPTION_RECORD_OFFSET, option_record_len, ' '));
}
}
diff --git a/epan/dissectors/packet-udt.c b/epan/dissectors/packet-udt.c
index 11eb3650d3..c746e91a68 100644
--- a/epan/dissectors/packet-udt.c
+++ b/epan/dissectors/packet-udt.c
@@ -153,7 +153,7 @@ dissect_udt(tvbuff_t *tvb, packet_info* pinfo, proto_tree *parent_tree,
col_add_fstr(pinfo->cinfo, COL_INFO, "UDT type: ack2");
break;
case UDT_PACKET_TYPE_NAK: {
- wmem_strbuf_t *nakstr = wmem_strbuf_new(wmem_packet_scope(), "");
+ wmem_strbuf_t *nakstr = wmem_strbuf_new(pinfo->pool, "");
guint max = tvb_reported_length(tvb);
if (max > UDT_MAX_NAK_LENGTH)
max = UDT_MAX_NAK_LENGTH;
diff --git a/epan/dissectors/packet-uma.c b/epan/dissectors/packet-uma.c
index 9b85279842..af584ac78e 100644
--- a/epan/dissectors/packet-uma.c
+++ b/epan/dissectors/packet-uma.c
@@ -1427,7 +1427,7 @@ dissect_uma_IE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
case 98:
/* UNC Fully Qualified Domain/Host Name */
if ( ie_len > 0){
- proto_tree_add_item_ret_string(urr_ie_tree, hf_uma_unc_FQDN, tvb, ie_offset, ie_len, ENC_ASCII|ENC_NA, wmem_packet_scope(), &string);
+ proto_tree_add_item_ret_string(urr_ie_tree, hf_uma_unc_FQDN, tvb, ie_offset, ie_len, ENC_ASCII|ENC_NA, pinfo->pool, &string);
}else{
proto_tree_add_expert(urr_ie_tree, pinfo, &ei_uma_fqdn_not_present, tvb, offset, 1);
}
diff --git a/epan/dissectors/packet-umts_rlc.c b/epan/dissectors/packet-umts_rlc.c
index 04b3253416..a3db0c4ec5 100644
--- a/epan/dissectors/packet-umts_rlc.c
+++ b/epan/dissectors/packet-umts_rlc.c
@@ -1413,7 +1413,7 @@ translate_hex_key(gchar * char_key){
int i,j;
guint8 * key_in;
- key_in = wmem_alloc0(wmem_packet_scope(), sizeof(guint8)*16);
+ key_in = wmem_alloc0(pinfo->pool, sizeof(guint8)*16);
j= (int)(strlen(char_key)/2)-1;
/*Translate "hex-string" into a byte aligned block */
for(i = (int)strlen(char_key); i> 0; i-=2 ){
@@ -1456,7 +1456,7 @@ rlc_decipher_tvb(tvbuff_t *tvb, packet_info *pinfo, guint32 counter, guint8 rbid
/*Fix the key into a byte block*/
/*TODO: This should be done in a preferences callback function*/
- out = wmem_alloc0(wmem_packet_scope(), strlen(global_rlc_kasumi_key)+1);
+ out = wmem_alloc0(pinfo->pool, strlen(global_rlc_kasumi_key)+1);
memcpy(out,global_rlc_kasumi_key,strlen(global_rlc_kasumi_key)); /*Copy from prefrence const pointer*/
key_in = translate_hex_key(out); /*Translation*/
@@ -2090,7 +2090,7 @@ dissect_rlc_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guin
bitmap_tree = proto_tree_add_subtree(sufi_tree, tvb, bit_offset/8, (gint)len, ett_rlc_bitmap, &ti, "Decoded bitmap:");
col_append_str(pinfo->cinfo, COL_INFO, " BITMAP=(");
- buff = (gchar *)wmem_alloc(wmem_packet_scope(), BUFF_SIZE);
+ buff = (gchar *)wmem_alloc(pinfo->pool, BUFF_SIZE);
for (i=0; i<len; i++) {
bits = tvb_get_bits8(tvb, bit_offset, 8);
for (l=0, j=0; l<8; l++) {
diff --git a/epan/dissectors/packet-usb-i1d3.c b/epan/dissectors/packet-usb-i1d3.c
index f8e043fc06..3295354fbc 100644
--- a/epan/dissectors/packet-usb-i1d3.c
+++ b/epan/dissectors/packet-usb-i1d3.c
@@ -459,7 +459,7 @@ static void dissect_usb_i1d3_response(
const guint8 *information;
proto_tree_add_item_ret_string(
tree, hf_usb_i1d3_information, tvb, 2, -1,
- ENC_ASCII | ENC_NA, wmem_packet_scope(), &information);
+ ENC_ASCII | ENC_NA, pinfo->pool, &information);
col_add_fstr(
pinfo->cinfo, COL_INFO, "Information: %s", information);
break;
@@ -482,7 +482,7 @@ static void dissect_usb_i1d3_response(
const guint8 *prodname;
proto_tree_add_item_ret_string(
tree, hf_usb_i1d3_prodname, tvb, 2, -1,
- ENC_ASCII | ENC_NA, wmem_packet_scope(), &prodname);
+ ENC_ASCII | ENC_NA, pinfo->pool, &prodname);
col_add_fstr(pinfo->cinfo, COL_INFO, "Product name: %s", prodname);
break;
}
@@ -500,7 +500,7 @@ static void dissect_usb_i1d3_response(
const guint8 *firmver;
proto_tree_add_item_ret_string(
tree, hf_usb_i1d3_firmver, tvb, 2, -1,
- ENC_ASCII | ENC_NA, wmem_packet_scope(), &firmver);
+ ENC_ASCII | ENC_NA, pinfo->pool, &firmver);
col_add_fstr(
pinfo->cinfo, COL_INFO, "Firmware version: %s", firmver);
break;
@@ -509,7 +509,7 @@ static void dissect_usb_i1d3_response(
const guint8 *firmdate;
proto_tree_add_item_ret_string(
tree, hf_usb_i1d3_firmdate, tvb, 2, -1,
- ENC_ASCII | ENC_NA, wmem_packet_scope(), &firmdate);
+ ENC_ASCII | ENC_NA, pinfo->pool, &firmdate);
col_add_fstr(pinfo->cinfo, COL_INFO, "Firmware date: %s", firmdate);
break;
}
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c
index 754f09feb2..6fb14badc6 100644
--- a/epan/dissectors/packet-usb.c
+++ b/epan/dissectors/packet-usb.c
@@ -2491,7 +2491,7 @@ dissect_usb_endpoint_descriptor(packet_info *pinfo, proto_tree *parent_tree,
if ((!pinfo->fd->visited) && usb_trans_info && usb_trans_info->interface_info) {
if (pinfo->destport == NO_ENDPOINT) {
address tmp_addr;
- usb_address_t *usb_addr = wmem_new0(wmem_packet_scope(), usb_address_t);
+ usb_address_t *usb_addr = wmem_new0(pinfo->pool, usb_address_t);
/* packet is sent from a USB device's endpoint 0 to the host
* replace endpoint 0 with the endpoint of this descriptor
@@ -2919,7 +2919,7 @@ dissect_usb_setup_get_descriptor_response(packet_info *pinfo, proto_tree *tree,
proto_tree_add_bytes_format(tree, hf_usb_get_descriptor_resp_generic, tvb, offset, len, NULL,
"GET DESCRIPTOR Response data (unknown descriptor type %u): %s",
usb_trans_info->u.get_descriptor.type,
- tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, len));
+ tvb_bytes_to_str(pinfo->pool, tvb, offset, len));
offset = offset + len;
}
break;
@@ -3444,7 +3444,7 @@ usb_tap_queue_packet(packet_info *pinfo, guint8 urb_type,
{
usb_tap_data_t *tap_data;
- tap_data = wmem_new(wmem_packet_scope(), usb_tap_data_t);
+ tap_data = wmem_new(pinfo->pool, usb_tap_data_t);
tap_data->urb_type = urb_type;
tap_data->transfer_type = (guint8)(usb_conv_info->transfer_type);
tap_data->conv_info = usb_conv_info;
@@ -3610,7 +3610,7 @@ try_dissect_next_protocol(proto_tree *tree, tvbuff_t *next_tvb, packet_info *pin
endpoint = usb_trans_info->setup.wIndex & 0x0f;
if (usb_conv_info->is_request) {
- usb_address_t *dst_addr = wmem_new0(wmem_packet_scope(), usb_address_t);
+ usb_address_t *dst_addr = wmem_new0(pinfo->pool, usb_address_t);
dst_addr->bus_id = usb_conv_info->bus_id;
dst_addr->device = usb_conv_info->device_address;
dst_addr->endpoint = dst_endpoint = GUINT32_TO_LE(endpoint);
@@ -3619,7 +3619,7 @@ try_dissect_next_protocol(proto_tree *tree, tvbuff_t *next_tvb, packet_info *pin
conversation = get_usb_conversation(pinfo, &pinfo->src, &endpoint_addr, pinfo->srcport, dst_endpoint);
}
else {
- usb_address_t *src_addr = wmem_new0(wmem_packet_scope(), usb_address_t);
+ usb_address_t *src_addr = wmem_new0(pinfo->pool, usb_address_t);
src_addr->bus_id = usb_conv_info->bus_id;
src_addr->device = usb_conv_info->device_address;
src_addr->endpoint = src_endpoint = GUINT32_TO_LE(endpoint);
@@ -4146,8 +4146,8 @@ usb_set_addr(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, guint16 bus_id
/* sent/received is from the perspective of the USB host */
pinfo->p2p_dir = req ? P2P_DIR_SENT : P2P_DIR_RECV;
- str_src_addr = address_to_str(wmem_packet_scope(), &pinfo->src);
- str_dst_addr = address_to_str(wmem_packet_scope(), &pinfo->dst);
+ str_src_addr = address_to_str(pinfo->pool, &pinfo->src);
+ str_dst_addr = address_to_str(pinfo->pool, &pinfo->dst);
sub_item = proto_tree_add_string(tree, hf_usb_src, tvb, 0, 0, str_src_addr);
proto_item_set_generated(sub_item);
diff --git a/epan/dissectors/packet-usbip.c b/epan/dissectors/packet-usbip.c
index 62539e5f79..e6f95409a9 100644
--- a/epan/dissectors/packet-usbip.c
+++ b/epan/dissectors/packet-usbip.c
@@ -547,7 +547,7 @@ usbip_dissect_urb(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree,
}
if (!usbip_trans) {
- usbip_trans = wmem_new(wmem_packet_scope(), usbip_transaction_t);
+ usbip_trans = wmem_new(pinfo->pool, usbip_transaction_t);
usbip_trans->cmd_frame = 0;
usbip_trans->ret_frame = 0;
usbip_trans->devid = 0;
diff --git a/epan/dissectors/packet-usbll.c b/epan/dissectors/packet-usbll.c
index 501c3fc43c..68ddf07927 100644
--- a/epan/dissectors/packet-usbll.c
+++ b/epan/dissectors/packet-usbll.c
@@ -701,8 +701,8 @@ usbll_set_address(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
set_address(&pinfo->net_dst, usbll_address_type, sizeof(usbll_address_t), (char *)dst_addr);
copy_address_shallow(&pinfo->dst, &pinfo->net_dst);
- str_src_addr = address_to_str(wmem_packet_scope(), &pinfo->src);
- str_dst_addr = address_to_str(wmem_packet_scope(), &pinfo->dst);
+ str_src_addr = address_to_str(pinfo->pool, &pinfo->src);
+ str_dst_addr = address_to_str(pinfo->pool, &pinfo->dst);
sub_item = proto_tree_add_string(tree, hf_usbll_src, tvb, 0, 0, str_src_addr);
proto_item_set_generated(sub_item);
diff --git a/epan/dissectors/packet-user_encap.c b/epan/dissectors/packet-user_encap.c
index 6cecb2d3a0..332a6c2ab8 100644
--- a/epan/dissectors/packet-user_encap.c
+++ b/epan/dissectors/packet-user_encap.c
@@ -118,7 +118,7 @@ static int dissect_user(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, voi
encap = &user2_encap;
}
if (!encap) {
- char* msg = wmem_strdup_printf(wmem_packet_scope(),
+ char* msg = wmem_strdup_printf(pinfo->pool,
"User encapsulation not handled: DLT=%d, "
"check your Preferences->Protocols->DLT_USER",
pinfo->match_uint + 147 - WTAP_ENCAP_USER0);
@@ -129,7 +129,7 @@ static int dissect_user(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, voi
return tvb_captured_length(tvb);
}
if (encap->payload_proto == NULL) {
- char* msg = wmem_strdup_printf(wmem_packet_scope(),
+ char* msg = wmem_strdup_printf(pinfo->pool,
"User encapsulation's protocol %s not found: "
"DLT=%d, check your Preferences->Protocols->DLT_USER",
encap->payload_proto_name,
diff --git a/epan/dissectors/packet-uts.c b/epan/dissectors/packet-uts.c
index 16afa4f9c7..ecf7a4efba 100644
--- a/epan/dissectors/packet-uts.c
+++ b/epan/dissectors/packet-uts.c
@@ -290,7 +290,7 @@ dissect_uts(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree, void* data
if (etx_start)
length = (etx_start - stx_start - 1); /* and the data part is the rest... */
/* whatever preceeds the ETX if it exists */
- data_ptr = tvb_get_string_enc(wmem_packet_scope(), tvb, stx_start+1, length, ENC_ASCII); /* copy the string for dissecting */
+ data_ptr = tvb_get_string_enc(pinfo->pool, tvb, stx_start+1, length, ENC_ASCII); /* copy the string for dissecting */
proto_tree_add_string_format(uts_tree, hf_data, tvb, stx_start + 1, length, data_ptr,
"Text (%d byte%s)", length, plurality(length, "", "s"));
}
diff --git a/epan/dissectors/packet-vines.c b/epan/dissectors/packet-vines.c
index c2f6a5bc93..b3b25061c6 100644
--- a/epan/dissectors/packet-vines.c
+++ b/epan/dissectors/packet-vines.c
@@ -1219,7 +1219,7 @@ dissect_vines_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
if (packet_type == VARP_ASSIGNMENT_RESP) {
col_append_fstr(pinfo->cinfo, COL_INFO,
", Address = %s",
- tvb_address_to_str(wmem_packet_scope(), tvb, AT_VINES, 2));
+ tvb_address_to_str(pinfo->pool, tvb, AT_VINES, 2));
proto_tree_add_item(vines_arp_tree, hf_vines_arp_address, tvb, 2, VINES_ADDR_LEN, ENC_NA);
}
proto_tree_add_item(vines_arp_tree, hf_vines_arp_sequence_number, tvb, 2+VINES_ADDR_LEN, 4, ENC_BIG_ENDIAN);
@@ -1241,7 +1241,7 @@ dissect_vines_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
if (packet_type == VARP_ASSIGNMENT_RESP) {
col_append_fstr(pinfo->cinfo, COL_INFO,
", Address = %s",
- tvb_address_to_str(wmem_packet_scope(), tvb, AT_VINES, 2));
+ tvb_address_to_str(pinfo->pool, tvb, AT_VINES, 2));
proto_tree_add_item(vines_arp_tree, hf_vines_arp_address, tvb, 2, VINES_ADDR_LEN, ENC_NA);
}
diff --git a/epan/dissectors/packet-vlan.c b/epan/dissectors/packet-vlan.c
index a56a5774c8..408586b999 100644
--- a/epan/dissectors/packet-vlan.c
+++ b/epan/dissectors/packet-vlan.c
@@ -316,7 +316,7 @@ dissect_vlan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
if (gbl_resolv_flags.vlan_name) {
item = proto_tree_add_string(vlan_tree, &hfi_vlan_id_name, tvb, 0, 2,
- get_vlan_name(wmem_packet_scope(), vlan_id));
+ get_vlan_name(pinfo->pool, vlan_id));
proto_item_set_generated(item);
}
diff --git a/epan/dissectors/packet-vmlab.c b/epan/dissectors/packet-vmlab.c
index 298de9defa..e400fbd8fa 100644
--- a/epan/dissectors/packet-vmlab.c
+++ b/epan/dissectors/packet-vmlab.c
@@ -111,8 +111,8 @@ dissect_vmlab(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
offset += 6;
proto_item_append_text(ti, ", Src: %s, Dst: %s",
- tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, offset-6),
- tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, offset-12));
+ tvb_address_with_resolution_to_str(pinfo->pool, tvb, AT_ETHER, offset-6),
+ tvb_address_with_resolution_to_str(pinfo->pool, tvb, AT_ETHER, offset-12));
/* Encapsulated Ethertype is also part of the block*/
encap_proto = tvb_get_ntohs(tvb, offset);
diff --git a/epan/dissectors/packet-vpp.c b/epan/dissectors/packet-vpp.c
index 51f3644028..811263b464 100644
--- a/epan/dissectors/packet-vpp.c
+++ b/epan/dissectors/packet-vpp.c
@@ -277,7 +277,7 @@ dissect_vpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
/* Nodename */
len = tvb_strsize(tvb, offset);
- name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len,
+ name = tvb_get_string_enc(pinfo->pool, tvb, offset, len,
ENC_ASCII);
proto_tree_add_string(tree, hf_vpp_nodename, tvb, offset, len, name);
offset += len;
diff --git a/epan/dissectors/packet-vtp.c b/epan/dissectors/packet-vtp.c
index 5e5a6ed6d6..356593d4c2 100644
--- a/epan/dissectors/packet-vtp.c
+++ b/epan/dissectors/packet-vtp.c
@@ -168,7 +168,7 @@ dissect_vtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
proto_tree_add_item(vtp_tree, hf_vtp_upd_id, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- upd_timestamp = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 12, ENC_ASCII);
+ upd_timestamp = tvb_get_string_enc(pinfo->pool, tvb, offset, 12, ENC_ASCII);
proto_tree_add_string_format_value(vtp_tree, hf_vtp_upd_ts, tvb,
offset, 12, (gchar*)upd_timestamp,
"%.2s-%.2s-%.2s %.2s:%.2s:%.2s",
diff --git a/epan/dissectors/packet-vuze-dht.c b/epan/dissectors/packet-vuze-dht.c
index 5ee4971f40..053c7070c1 100644
--- a/epan/dissectors/packet-vuze-dht.c
+++ b/epan/dissectors/packet-vuze-dht.c
@@ -336,7 +336,7 @@ dissect_vuze_dht_address(tvbuff_t *tvb, packet_info _U_*pinfo, proto_tree *tree,
offset += ip_length;
proto_tree_add_item(sub_tree, hf_vuze_dht_address_port, tvb, offset, TL_SHORT, ENC_BIG_ENDIAN);
- proto_item_append_text( ti, "%s:%d", address_to_str(wmem_packet_scope(), &addr ), tvb_get_ntohs(tvb,offset) );
+ proto_item_append_text( ti, "%s:%d", address_to_str(pinfo->pool, &addr ), tvb_get_ntohs(tvb,offset) );
offset += TL_SHORT;
return offset;
@@ -407,7 +407,7 @@ dissect_vuze_dht_key(tvbuff_t *tvb, packet_info _U_*pinfo, proto_tree *tree, int
offset += TL_BYTE;
proto_tree_add_item( sub_tree, hf_vuze_dht_key_data, tvb, offset, key_len, ENC_NA );
- proto_item_append_text( ti, ": %d bytes ( %s )", key_len, tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, key_len ) );
+ proto_item_append_text( ti, ": %d bytes ( %s )", key_len, tvb_bytes_to_str(pinfo->pool, tvb, offset, key_len ) );
offset += key_len;
return offset;
@@ -493,7 +493,7 @@ dissect_vuze_dht_value(tvbuff_t *tvb, packet_info _U_*pinfo, proto_tree *tree, i
offset += TL_SHORT;
proto_tree_add_item(sub_tree, hf_vuze_dht_value_bytes, tvb, offset, value_bytes_count, ENC_NA);
- proto_item_append_text( ti, ": %d bytes ( %s )", value_bytes_count, tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, value_bytes_count ) );
+ proto_item_append_text( ti, ": %d bytes ( %s )", value_bytes_count, tvb_bytes_to_str(pinfo->pool, tvb, offset, value_bytes_count ) );
offset += value_bytes_count;
offset = dissect_vuze_dht_contact( tvb, pinfo, sub_tree, offset );
@@ -583,7 +583,7 @@ dissect_vuze_dht_network_coordinate(tvbuff_t *tvb, packet_info _U_*pinfo, proto_
tvb_get_ntohieee_float(tvb, offset+TL_BYTE+TL_BYTE+TL_FLOAT+TL_FLOAT+TL_FLOAT) );
} else {
proto_item_append_text( ti, " ( %s )",
- tvb_bytes_to_str(wmem_packet_scope(), tvb, offset+TL_BYTE+TL_BYTE, coordinate_size ) );
+ tvb_bytes_to_str(pinfo->pool, tvb, offset+TL_BYTE+TL_BYTE, coordinate_size ) );
}
proto_tree_add_item( sub_tree, hf_vuze_dht_network_coordinate_type, tvb, offset, TL_BYTE, ENC_BIG_ENDIAN );
diff --git a/epan/dissectors/packet-websocket.c b/epan/dissectors/packet-websocket.c
index 7e8ced7dcf..ee7f8bee8f 100644
--- a/epan/dissectors/packet-websocket.c
+++ b/epan/dissectors/packet-websocket.c
@@ -233,12 +233,12 @@ websocket_uncompress(tvbuff_t *tvb, packet_info *pinfo, z_streamp z_strm, tvbuff
gint err;
compr_len = tvb_captured_length(tvb) + 4;
- compr_payload = (guint8 *)wmem_alloc(wmem_packet_scope(), compr_len);
+ compr_payload = (guint8 *)wmem_alloc(pinfo->pool, compr_len);
tvb_memcpy(tvb, compr_payload, 0, compr_len-4);
compr_payload[compr_len-4] = compr_payload[compr_len-3] = 0x00;
compr_payload[compr_len-2] = compr_payload[compr_len-1] = 0xff;
decompr_buf_len = 2*compr_len;
- decompr_buf = (guint8 *)wmem_alloc(wmem_packet_scope(), decompr_buf_len);
+ decompr_buf = (guint8 *)wmem_alloc(pinfo->pool, decompr_buf_len);
z_strm->next_in = compr_payload;
z_strm->avail_in = compr_len;
@@ -349,7 +349,7 @@ dissect_websocket_data_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
uncompress_ok = websocket_uncompress(tvb, pinfo, z_strm, &uncompressed, raw_offset);
} else {
/* no context take over, initialize a new context */
- z_strm = wmem_new0(wmem_packet_scope(), z_stream);
+ z_strm = wmem_new0(pinfo->pool, z_stream);
if (inflateInit2(z_strm, wbits) == Z_OK) {
uncompress_ok = websocket_uncompress(tvb, pinfo, z_strm, &uncompressed, raw_offset);
}
diff --git a/epan/dissectors/packet-wifi-nan.c b/epan/dissectors/packet-wifi-nan.c
index 274e4e36da..68c42f67bb 100644
--- a/epan/dissectors/packet-wifi-nan.c
+++ b/epan/dissectors/packet-wifi-nan.c
@@ -1583,7 +1583,7 @@ dissect_attr_availability(proto_tree* attr_tree, tvbuff_t* tvb, gint offset, gui
proto_tree_add_item(op_class_tree, hf_nan_attr_availability_entry_entries_start_freq, tvb, offset, 1, ENC_LITTLE_ENDIAN);
proto_tree_add_item(op_class_tree, hf_nan_attr_availability_entry_entries_bandwidth, tvb, offset, 1, ENC_LITTLE_ENDIAN);
wmem_strbuf_t* str;
- str = wmem_strbuf_new(wmem_packet_scope(), "");
+ str = wmem_strbuf_new(pinfo->pool, "");
for(unsigned i_bitmap = 0; i_bitmap < 16; ++i_bitmap)
{
if (bitmap & (1u << i_bitmap))
diff --git a/epan/dissectors/packet-winsrepl.c b/epan/dissectors/packet-winsrepl.c
index 47714364fd..7354fcf6ed 100644
--- a/epan/dissectors/packet-winsrepl.c
+++ b/epan/dissectors/packet-winsrepl.c
@@ -342,7 +342,7 @@ dissect_winsrepl_wins_address_list(tvbuff_t *winsrepl_tvb, packet_info *pinfo,
winsrepl_offset, addr_list_tree,
&ip, addr_list_tree, i);
set_address(&addr, AT_IPv4, 4, &ip);
- addr_str = address_to_str(wmem_packet_scope(), &addr);
+ addr_str = address_to_str(pinfo->pool, &addr);
if (i == 0) {
proto_item_append_text(parent_item, ": %s", addr_str);
proto_item_append_text(addr_list_item, ": %s", addr_str);
diff --git a/epan/dissectors/packet-wisun.c b/epan/dissectors/packet-wisun.c
index 74f4c63d9b..c0b2336787 100644
--- a/epan/dissectors/packet-wisun.c
+++ b/epan/dissectors/packet-wisun.c
@@ -823,7 +823,7 @@ dissect_wisun_netnameie(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
proto_tree_add_item(subtree, hf_wisun_netnameie_name, tvb, 2, tvb_reported_length_remaining(tvb, 2), ENC_ASCII|ENC_NA);
col_append_sep_fstr(pinfo->cinfo, COL_INFO, ", ", "Netname: %s",
- tvb_get_string_enc(wmem_packet_scope(), tvb, 2, tvb_reported_length_remaining(tvb, 2), ENC_ASCII));
+ tvb_get_string_enc(pinfo->pool, tvb, 2, tvb_reported_length_remaining(tvb, 2), ENC_ASCII));
return tvb_reported_length(tvb);
}
diff --git a/epan/dissectors/packet-wol.c b/epan/dissectors/packet-wol.c
index eb7970518d..9bf8405b39 100644
--- a/epan/dissectors/packet-wol.c
+++ b/epan/dissectors/packet-wol.c
@@ -101,7 +101,7 @@ dissect_wol_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
/* So far so good. Now get the next 6 bytes, which we'll assume is the
* target's MAC address, and do 15 memory chunk comparisons, since if this
* is a real MagicPacket, the target's MAC will be duplicated 16 times. */
- mac = (guint8 *)tvb_memdup(wmem_packet_scope(), tvb, 6, 6);
+ mac = (guint8 *)tvb_memdup(pinfo->pool, tvb, 6, 6);
for ( offset = 12; offset < 102; offset += 6 )
if ( tvb_memeql(tvb, offset, mac, 6) != 0 )
return (0);
@@ -157,7 +157,7 @@ dissect_wol_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
set_address(&mac_addr, AT_ETHER, 6, mac);
col_add_fstr(pinfo->cinfo, COL_INFO, "MagicPacket for %s",
- address_with_resolution_to_str(wmem_packet_scope(), &mac_addr));
+ address_with_resolution_to_str(pinfo->pool, &mac_addr));
/* NOTE: ether-wake uses a dotted-decimal format for specifying a
* 4-byte password or an Ethernet mac address format for specifying
@@ -217,7 +217,7 @@ dissect_wol_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
/* create display subtree for the protocol */
ti = proto_tree_add_item(tree, proto_wol, tvb, 0, len, ENC_NA);
proto_item_append_text(ti, ", MAC: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &mac_addr));
+ address_with_resolution_to_str(pinfo->pool, &mac_addr));
if ( passwd )
proto_item_append_text(ti, ", password: %s", passwd);
wol_tree = proto_item_add_subtree(ti, ett_wol);
@@ -228,7 +228,7 @@ dissect_wol_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
/* Continue adding tree items to process the packet here */
mac_tree = proto_tree_add_subtree_format(wol_tree, tvb, 6, 96,
ett_wol_macblock, NULL, "MAC: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &mac_addr));
+ address_with_resolution_to_str(pinfo->pool, &mac_addr));
for ( offset = 6; offset < 102; offset += 6 )
proto_tree_add_ether(mac_tree, hf_wol_mac, tvb, offset, 6, mac);
diff --git a/epan/dissectors/packet-wtp.c b/epan/dissectors/packet-wtp.c
index 9667abeb4b..069075f9e2 100644
--- a/epan/dissectors/packet-wtp.c
+++ b/epan/dissectors/packet-wtp.c
@@ -323,7 +323,7 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gint dataLen;
#define SZINFO_SIZE 256
- szInfo=(char *)wmem_alloc(wmem_packet_scope(), SZINFO_SIZE);
+ szInfo=(char *)wmem_alloc(pinfo->pool, SZINFO_SIZE);
b0 = tvb_get_guint8 (tvb, offCur + 0);
/* Discover Concatenated PDUs */
diff --git a/epan/dissectors/packet-xcsl.c b/epan/dissectors/packet-xcsl.c
index d016b29b50..5886298cf4 100644
--- a/epan/dissectors/packet-xcsl.c
+++ b/epan/dissectors/packet-xcsl.c
@@ -288,7 +288,7 @@ static gboolean dissect_xcsl_tcp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_t
guint8 *protocol;
if (tvb_captured_length (tvb) >= 5) {
- protocol = tvb_get_string_enc(wmem_packet_scope(), tvb, 0, 5, ENC_ASCII);
+ protocol = tvb_get_string_enc(pinfo->pool, tvb, 0, 5, ENC_ASCII);
if (strncmp(protocol,"xcsl",4) == 0 && (protocol[4] == ';' || protocol[4] == '-')) {
diff --git a/epan/dissectors/packet-xmpp-other.c b/epan/dissectors/packet-xmpp-other.c
index 8b16969808..a2d59397f1 100644
--- a/epan/dissectors/packet-xmpp-other.c
+++ b/epan/dissectors/packet-xmpp-other.c
@@ -840,7 +840,7 @@ xmpp_x_event(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t
xmpp_element_t *cond, *id;
- gchar *cond_value = wmem_strdup(wmem_packet_scope(), "");
+ gchar *cond_value = wmem_strdup(pinfo->pool, "");
x_item = proto_tree_add_item(tree, hf_xmpp_x_event, tvb, element->offset, element->length, ENC_BIG_ENDIAN);
x_tree = proto_item_add_subtree(x_item, ett_xmpp_x_event);
@@ -854,9 +854,9 @@ xmpp_x_event(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t
while((cond = xmpp_steal_element_by_names(element, cond_names, array_length(cond_names))) != NULL)
{
if(strcmp(cond_value,"") != 0)
- cond_value = wmem_strdup_printf(wmem_packet_scope(), "%s/%s",cond_value, cond->name);
+ cond_value = wmem_strdup_printf(pinfo->pool, "%s/%s",cond_value, cond->name);
else
- cond_value = wmem_strdup(wmem_packet_scope(), cond->name);
+ cond_value = wmem_strdup(pinfo->pool, cond->name);
}
fake_cond = xmpp_ep_init_attr_t(cond_value, element->offset, element->length);
diff --git a/epan/dissectors/packet-xtp.c b/epan/dissectors/packet-xtp.c
index 27399495b9..fcfa143103 100644
--- a/epan/dissectors/packet-xtp.c
+++ b/epan/dissectors/packet-xtp.c
@@ -935,7 +935,7 @@ dissect_xtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
xtph->seq += tvb_get_ntohl(tvb, offset+4);
#define MAX_OPTIONS_LEN 128
- options=(gchar *)wmem_alloc(wmem_packet_scope(), MAX_OPTIONS_LEN);
+ options=(gchar *)wmem_alloc(pinfo->pool, MAX_OPTIONS_LEN);
options[0]=0;
cmd_options = xtph->cmd_options >> 8;
for (i = 0; i < 16; i++) {
diff --git a/epan/dissectors/packet-zbee-nwk-gp.c b/epan/dissectors/packet-zbee-nwk-gp.c
index 0a5b7b0ecb..2ccbb945c7 100644
--- a/epan/dissectors/packet-zbee-nwk-gp.c
+++ b/epan/dissectors/packet-zbee-nwk-gp.c
@@ -816,7 +816,7 @@ dissect_zbee_nwk_gp_cmd_commissioning(tvbuff_t *tvb, packet_info *pinfo, proto_t
/* Decrypt the security key */
dec_buffer = (guint8 *)wmem_alloc(pinfo->pool, ZBEE_SEC_CONST_KEYSIZE);
enc_buffer_withA = (guint8 *)wmem_alloc(pinfo->pool, 4 + ZBEE_SEC_CONST_KEYSIZE + 4); /* CCM* a (this is SrcID) + encKey + MIC */
- enc_buffer = tvb_memdup(wmem_packet_scope(), tvb, offset - ZBEE_SEC_CONST_KEYSIZE - 4, ZBEE_SEC_CONST_KEYSIZE + 4);
+ enc_buffer = tvb_memdup(pinfo->pool, tvb, offset - ZBEE_SEC_CONST_KEYSIZE - 4, ZBEE_SEC_CONST_KEYSIZE + 4);
phtole32(enc_buffer_withA, packet->source_id);
memcpy(enc_buffer_withA+4, enc_buffer, ZBEE_SEC_CONST_KEYSIZE + 4);
gp_decrypted = FALSE;
@@ -847,7 +847,7 @@ dissect_zbee_nwk_gp_cmd_commissioning(tvbuff_t *tvb, packet_info *pinfo, proto_t
key_record.frame_num = 0;
key_record.label = NULL;
- key = tvb_memdup(wmem_packet_scope(), tvb, offset - ZBEE_SEC_CONST_KEYSIZE, ZBEE_SEC_CONST_KEYSIZE);
+ key = tvb_memdup(pinfo->pool, tvb, offset - ZBEE_SEC_CONST_KEYSIZE, ZBEE_SEC_CONST_KEYSIZE);
memcpy(key_record.key, key, ZBEE_SEC_CONST_KEYSIZE);
zbee_gp_keyring = g_slist_prepend(zbee_gp_keyring, g_memdup2(&key_record, sizeof(key_record_t)));
}
@@ -1114,7 +1114,7 @@ dissect_zbee_nwk_gp_cmd_commissioning_reply(tvbuff_t *tvb, packet_info *pinfo, p
key_record.frame_num = 0;
key_record.label = NULL;
- key = tvb_memdup(wmem_packet_scope(), tvb, offset - ZBEE_SEC_CONST_KEYSIZE, ZBEE_SEC_CONST_KEYSIZE);
+ key = tvb_memdup(pinfo->pool, tvb, offset - ZBEE_SEC_CONST_KEYSIZE, ZBEE_SEC_CONST_KEYSIZE);
memcpy(key_record.key, key, ZBEE_SEC_CONST_KEYSIZE);
zbee_gp_keyring = g_slist_prepend(zbee_gp_keyring, g_memdup2(&key_record, sizeof(key_record_t)));
}
@@ -1140,7 +1140,7 @@ dissect_zbee_nwk_gp_cmd_commissioning_reply(tvbuff_t *tvb, packet_info *pinfo, p
/* decrypt the security key*/
dec_buffer = (guint8 *)wmem_alloc(pinfo->pool, ZBEE_SEC_CONST_KEYSIZE);
enc_buffer_withA = (guint8 *)wmem_alloc(pinfo->pool, 4 + ZBEE_SEC_CONST_KEYSIZE + 4); /* CCM* a (this is SrcID) + encKey + MIC */
- enc_buffer = tvb_memdup(wmem_packet_scope(), tvb, offset - ZBEE_SEC_CONST_KEYSIZE - 4 - 4, ZBEE_SEC_CONST_KEYSIZE + 4);
+ enc_buffer = tvb_memdup(pinfo->pool, tvb, offset - ZBEE_SEC_CONST_KEYSIZE - 4 - 4, ZBEE_SEC_CONST_KEYSIZE + 4);
phtole32(enc_buffer_withA, packet->source_id); /* enc_buffer_withA = CCM* a (srcID) | enc_buffer */
memcpy(enc_buffer_withA+4, enc_buffer, ZBEE_SEC_CONST_KEYSIZE + 4);
gp_decrypted = FALSE;
@@ -1755,7 +1755,7 @@ dissect_zbee_nwk_gp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
"ZGP stub NWK header");
nwk_tree = proto_item_add_subtree(proto_root, ett_zbee_nwk);
- enc_buffer = (guint8 *)tvb_memdup(wmem_packet_scope(), tvb, 0, tvb_captured_length(tvb));
+ enc_buffer = (guint8 *)tvb_memdup(pinfo->pool, tvb, 0, tvb_captured_length(tvb));
/* Get and parse the FCF. */
fcf = tvb_get_guint8(tvb, offset);
packet.frame_type = zbee_get_bit_field(fcf, ZBEE_NWK_GP_FCF_FRAME_TYPE);
diff --git a/epan/dissectors/packet-zbee-nwk.c b/epan/dissectors/packet-zbee-nwk.c
index a411ed9727..ecb8e1bd61 100644
--- a/epan/dissectors/packet-zbee-nwk.c
+++ b/epan/dissectors/packet-zbee-nwk.c
@@ -557,7 +557,7 @@ dissect_zbee_nwk_full(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
set_address_tvb(&pinfo->net_dst, zbee_nwk_address_type, 2, tvb, offset);
copy_address_shallow(&pinfo->dst, &pinfo->net_dst);
- dst_addr = address_to_str(wmem_packet_scope(), &pinfo->dst);
+ dst_addr = address_to_str(pinfo->pool, &pinfo->dst);
proto_tree_add_uint(nwk_tree, hf_zbee_nwk_dst, tvb, offset, 2, packet.dst);
ti = proto_tree_add_uint(nwk_tree, hf_zbee_nwk_addr, tvb, offset, 2, packet.dst);
@@ -573,7 +573,7 @@ dissect_zbee_nwk_full(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
set_address_tvb(&pinfo->net_src, zbee_nwk_address_type, 2, tvb, offset);
copy_address_shallow(&pinfo->src, &pinfo->net_src);
- src_addr = address_to_str(wmem_packet_scope(), &pinfo->src);
+ src_addr = address_to_str(pinfo->pool, &pinfo->src);
if (nwk_hints)
nwk_hints->src = packet.src;
@@ -1557,9 +1557,9 @@ static int dissect_zbee_beacon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
if (version >= ZBEE_VERSION_2007) {
/* In ZigBee 2006 and later, the beacon contains an extended PAN ID. */
proto_tree_add_item(beacon_tree, hf_zbee_beacon_epid, tvb, offset, 8, ENC_LITTLE_ENDIAN);
- col_append_fstr(pinfo->cinfo, COL_INFO, ", EPID: %s", eui64_to_display(wmem_packet_scope(),
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", EPID: %s", eui64_to_display(pinfo->pool,
tvb_get_guint64(tvb, offset, ENC_LITTLE_ENDIAN)));
- proto_item_append_text(beacon_root, ", EPID: %s", eui64_to_display(wmem_packet_scope(),
+ proto_item_append_text(beacon_root, ", EPID: %s", eui64_to_display(pinfo->pool,
tvb_get_guint64(tvb, offset, ENC_LITTLE_ENDIAN)));
offset += 8;
@@ -1659,7 +1659,7 @@ static int dissect_zbip_beacon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
/* Get and display the network ID. */
proto_tree_add_item(beacon_tree, hf_zbip_beacon_network_id, tvb, offset, 16, ENC_ASCII|ENC_NA);
- ssid = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 16, ENC_ASCII|ENC_NA);
+ ssid = tvb_get_string_enc(pinfo->pool, tvb, offset, 16, ENC_ASCII|ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, ", SSID: %s", ssid);
offset += 16;
@@ -1786,7 +1786,7 @@ dissect_ieee802154_zigbee_rejoin(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
subtree = proto_tree_add_subtree(tree, tvb, *offset, 10, ett_zbee_nwk_ie_rejoin, NULL, "ZigBee Rejoin");
proto_tree_add_item(subtree, hf_ieee802154_zigbee_rejoin_epid, tvb, *offset, 8, ENC_LITTLE_ENDIAN);
- proto_item_append_text(tree, ", EPID %s", eui64_to_display(wmem_packet_scope(),
+ proto_item_append_text(tree, ", EPID %s", eui64_to_display(pinfo->pool,
tvb_get_guint64(tvb, *offset, ENC_LITTLE_ENDIAN)));
*offset += 8;
diff --git a/epan/dissectors/packet-zbee-security.c b/epan/dissectors/packet-zbee-security.c
index 9b9acb71c3..c9af0ff709 100644
--- a/epan/dissectors/packet-zbee-security.c
+++ b/epan/dissectors/packet-zbee-security.c
@@ -476,14 +476,14 @@ dissect_zbee_secure(tvbuff_t *tvb, packet_info *pinfo, proto_tree* tree, guint o
* Eww, I think I just threw up a little... ZigBee requires this field
* to be patched before computing the MIC, but we don't have write-access
* to the tvbuff. So we need to allocate a copy of the whole thing just
- * so we can fix these 3 bits. Memory allocated by tvb_memdup(wmem_packet_scope(),...)
+ * so we can fix these 3 bits. Memory allocated by tvb_memdup(pinfo->pool,...)
* is automatically freed before the next packet is processed.
*/
- enc_buffer = (guint8 *)tvb_memdup(wmem_packet_scope(), tvb, 0, tvb_captured_length(tvb));
+ enc_buffer = (guint8 *)tvb_memdup(pinfo->pool, tvb, 0, tvb_captured_length(tvb));
/*
* Override the const qualifiers and patch the security level field, we
* know it is safe to overide the const qualifiers because we just
- * allocated this memory via tvb_memdup(wmem_packet_scope(),...).
+ * allocated this memory via tvb_memdup(pinfo->pool,...).
*/
enc_buffer[offset] = packet.control;
packet.level = zbee_get_bit_field(packet.control, ZBEE_SEC_CONTROL_LEVEL);
diff --git a/epan/dissectors/packet-zbee-zdp-binding.c b/epan/dissectors/packet-zbee-zdp-binding.c
index c4c7084e85..df1b672a63 100644
--- a/epan/dissectors/packet-zbee-zdp-binding.c
+++ b/epan/dissectors/packet-zbee-zdp-binding.c
@@ -139,7 +139,7 @@ dissect_zbee_zdp_req_end_device_bind(tvbuff_t *tvb, packet_info *pinfo, proto_tr
offset += sizeof_cluster;
}
if (version >= ZBEE_VERSION_2007) {
- zbee_append_info(tree, pinfo, " Src: %s", eui64_to_display(wmem_packet_scope(), ext_addr));
+ zbee_append_info(tree, pinfo, " Src: %s", eui64_to_display(pinfo->pool, ext_addr));
}
zbee_append_info(tree, pinfo, ", Target: 0x%04x", target);
@@ -194,13 +194,13 @@ dissect_zbee_zdp_req_bind(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
zbee_append_info(tree, pinfo, ", %s (Cluster ID: 0x%04x)", rval_to_str(cluster, zbee_aps_cid_names, "Unknown Cluster"), cluster);
if (version >= ZBEE_VERSION_2007) {
- zbee_append_info(tree, pinfo, " Src: %s", eui64_to_display(wmem_packet_scope(), src64));
+ zbee_append_info(tree, pinfo, " Src: %s", eui64_to_display(pinfo->pool, src64));
}
if (dst_mode == ZBEE_ZDP_ADDR_MODE_GROUP) {
zbee_append_info(tree, pinfo, ", Dst: 0x%04x", dst);
}
else {
- zbee_append_info(tree, pinfo, ", Dst: %s", eui64_to_display(wmem_packet_scope(), dst64));
+ zbee_append_info(tree, pinfo, ", Dst: %s", eui64_to_display(pinfo->pool, dst64));
}
/* Dump any leftover bytes. */
@@ -255,13 +255,13 @@ dissect_zbee_zdp_req_unbind(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
zbee_append_info(tree, pinfo, ", %s (Cluster ID: 0x%04x)", rval_to_str(cluster, zbee_aps_cid_names, "Unknown Cluster"), cluster);
if (version >= ZBEE_VERSION_2007) {
- zbee_append_info(tree, pinfo, " Src: %s", eui64_to_display(wmem_packet_scope(), src64));
+ zbee_append_info(tree, pinfo, " Src: %s", eui64_to_display(pinfo->pool, src64));
}
if (dst_mode == ZBEE_ZDP_ADDR_MODE_GROUP) {
zbee_append_info(tree, pinfo, ", Dst: 0x%04x", dst);
}
else {
- zbee_append_info(tree, pinfo, ", Dst: %s", eui64_to_display(wmem_packet_scope(), dst64));
+ zbee_append_info(tree, pinfo, ", Dst: %s", eui64_to_display(pinfo->pool, dst64));
}
/* Dump any leftover bytes. */
@@ -283,7 +283,7 @@ dissect_zbee_zdp_req_bind_register(tvbuff_t *tvb, packet_info *pinfo, proto_tree
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL);
- zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(wmem_packet_scope(), ext_addr));
+ zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(pinfo->pool, ext_addr));
/* Dump any leftover bytes. */
zdp_dump_excess(tvb, offset, pinfo, tree);
@@ -310,8 +310,8 @@ dissect_zbee_zdp_req_replace_device(tvbuff_t *tvb, packet_info *pinfo, proto_tre
proto_tree_add_item(tree, hf_zbee_zdp_replacement_ep, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
- zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(wmem_packet_scope(), ext_addr));
- zbee_append_info(tree, pinfo, ", Replacement: %s", eui64_to_display(wmem_packet_scope(), new_addr));
+ zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(pinfo->pool, ext_addr));
+ zbee_append_info(tree, pinfo, ", Replacement: %s", eui64_to_display(pinfo->pool, new_addr));
/* Dump any leftover bytes. */
zdp_dump_excess(tvb, offset, pinfo, tree);
@@ -356,7 +356,7 @@ dissect_zbee_zdp_req_store_bak_bind_entry(tvbuff_t *tvb, packet_info *pinfo, pro
}
zbee_append_info(tree, pinfo, ", %s (Cluster ID: 0x%04x)", rval_to_str(cluster, zbee_aps_cid_names, "Unknown Cluster"), cluster);
- zbee_append_info(tree, pinfo, ", Src: %s", eui64_to_display(wmem_packet_scope(), src64));
+ zbee_append_info(tree, pinfo, ", Src: %s", eui64_to_display(pinfo->pool, src64));
zbee_append_info(tree, pinfo, ", Src Endpoint: %d", src_ep);
/* Dump any leftover bytes. */
@@ -402,7 +402,7 @@ dissect_zbee_zdp_req_remove_bak_bind_entry(tvbuff_t *tvb, packet_info *pinfo, pr
}
zbee_append_info(tree, pinfo, ", %s (Cluster ID: 0x%04x)", val_to_str(cluster, zbee_zdp_cluster_names, "Unknown Device Profile Cluster"), cluster);
- zbee_append_info(tree, pinfo, ", Src: %s", eui64_to_display(wmem_packet_scope(), src64));
+ zbee_append_info(tree, pinfo, ", Src: %s", eui64_to_display(pinfo->pool, src64));
zbee_append_info(tree, pinfo, ", Src Endpoint: %d", src_ep);
/* Dump any leftover bytes. */
diff --git a/epan/dissectors/packet-zbee-zdp-discovery.c b/epan/dissectors/packet-zbee-zdp-discovery.c
index 84533a0aff..e432fb51bb 100644
--- a/epan/dissectors/packet-zbee-zdp-discovery.c
+++ b/epan/dissectors/packet-zbee-zdp-discovery.c
@@ -43,7 +43,7 @@ dissect_zbee_zdp_req_nwk_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
proto_tree_add_item(tree, hf_zbee_zdp_index, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
- zbee_append_info(tree, pinfo, ", Address: %s", eui64_to_display(wmem_packet_scope(), ext_addr));
+ zbee_append_info(tree, pinfo, ", Address: %s", eui64_to_display(pinfo->pool, ext_addr));
/* Dump any leftover bytes. */
zdp_dump_excess(tvb, offset, pinfo, tree);
@@ -280,7 +280,7 @@ dissect_zbee_zdp_req_discovery_cache(tvbuff_t *tvb, packet_info *pinfo, proto_tr
offset += 2;
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL);
- zbee_append_info(tree, pinfo, ", Ext Addr: %s", eui64_to_display(wmem_packet_scope(), ext_addr));
+ zbee_append_info(tree, pinfo, ", Ext Addr: %s", eui64_to_display(pinfo->pool, ext_addr));
/* Dump any leftover bytes. */
zdp_dump_excess(tvb, offset, pinfo, tree);
@@ -306,7 +306,7 @@ dissect_zbee_zdp_device_annce(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL);
/*capability =*/ zdp_parse_cinfo(tree, ett_zbee_zdp_cinfo, tvb, &offset);
- zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x, Ext Addr: %s", short_addr, eui64_to_display(wmem_packet_scope(), ext_addr));
+ zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x, Ext Addr: %s", short_addr, eui64_to_display(pinfo->pool, ext_addr));
/* Dump any leftover bytes. */
zdp_dump_excess(tvb, offset, pinfo, tree);
@@ -336,7 +336,7 @@ dissect_zbee_zdp_parent_annce(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL);
if (i == 0)
{
- zbee_append_info(tree, pinfo, n_children == 1 ? " %s" : " %s ...", eui64_to_display(wmem_packet_scope(), ext_addr));
+ zbee_append_info(tree, pinfo, n_children == 1 ? " %s" : " %s ...", eui64_to_display(pinfo->pool, ext_addr));
}
}
@@ -371,7 +371,7 @@ dissect_zbee_zdp_rsp_parent_annce(tvbuff_t *tvb, packet_info *pinfo, proto_tree
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL);
if (i == 0)
{
- zbee_append_info(tree, pinfo, n_children == 1 ? " %s" : " %s ...", eui64_to_display(wmem_packet_scope(), ext_addr));
+ zbee_append_info(tree, pinfo, n_children == 1 ? " %s" : " %s ...", eui64_to_display(pinfo->pool, ext_addr));
}
}
@@ -403,7 +403,7 @@ dissect_zbee_zdp_req_set_user_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* No Length field in ZigBee 2003 & earlier, uses a fixed length of 16. */
user_length = 16;
}
- proto_tree_add_item_ret_string(tree, hf_zbee_zdp_user, tvb, offset, user_length, ENC_ASCII, wmem_packet_scope(), &user);
+ proto_tree_add_item_ret_string(tree, hf_zbee_zdp_user, tvb, offset, user_length, ENC_ASCII, pinfo->pool, &user);
offset += user_length;
zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x, Desc: \'%s\'", device, user);
@@ -467,7 +467,7 @@ dissect_zbee_zdp_req_store_discovery(tvbuff_t *tvb, packet_info *pinfo, proto_tr
offset += 1;
}
- zbee_append_info(tree, pinfo, ", Ext Addr: %s", eui64_to_display(wmem_packet_scope(), ext_addr));
+ zbee_append_info(tree, pinfo, ", Ext Addr: %s", eui64_to_display(pinfo->pool, ext_addr));
/* Dump any leftover bytes. */
zdp_dump_excess(tvb, offset, pinfo, tree);
@@ -491,7 +491,7 @@ dissect_zbee_zdp_req_store_node_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tr
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL);
zdp_parse_node_desc(tree, pinfo, FALSE, ett_zbee_zdp_node, tvb, &offset, version);
- zbee_append_info(tree, pinfo, ", Address: %s", eui64_to_display(wmem_packet_scope(), ext_addr));
+ zbee_append_info(tree, pinfo, ", Address: %s", eui64_to_display(pinfo->pool, ext_addr));
/* Dump any leftover bytes. */
zdp_dump_excess(tvb, offset, pinfo, tree);
@@ -515,7 +515,7 @@ dissect_zbee_zdp_req_store_power_desc(tvbuff_t *tvb, packet_info *pinfo, proto_t
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL);
zdp_parse_power_desc(tree, ett_zbee_zdp_power, tvb, &offset);
- zbee_append_info(tree, pinfo, ", Address: %s", eui64_to_display(wmem_packet_scope(), ext_addr));
+ zbee_append_info(tree, pinfo, ", Address: %s", eui64_to_display(pinfo->pool, ext_addr));
/* Dump any leftover bytes. */
zdp_dump_excess(tvb, offset, pinfo, tree);
@@ -551,7 +551,7 @@ dissect_zbee_zdp_req_store_active_ep(tvbuff_t *tvb, packet_info *pinfo, proto_tr
offset += 1;
}
- zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(wmem_packet_scope(), ext_addr));
+ zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(pinfo->pool, ext_addr));
/* Dump any leftover bytes. */
zdp_dump_excess(tvb, offset, pinfo, tree);
@@ -577,7 +577,7 @@ dissect_zbee_zdp_req_store_simple_desc(tvbuff_t *tvb, packet_info *pinfo, proto_
offset += 1;
zdp_parse_simple_desc(tree, ett_zbee_zdp_simple, tvb, &offset, version);
- zbee_append_info(tree, pinfo, ", Address: %s", eui64_to_display(wmem_packet_scope(), ext_addr));
+ zbee_append_info(tree, pinfo, ", Address: %s", eui64_to_display(pinfo->pool, ext_addr));
/* Dump any leftover bytes. */
zdp_dump_excess(tvb, offset, pinfo, tree);
@@ -600,7 +600,7 @@ dissect_zbee_zdp_req_remove_node_cache(tvbuff_t *tvb, packet_info *pinfo, proto_
offset += 2;
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL);
- zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(wmem_packet_scope(), ext_addr));
+ zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(pinfo->pool, ext_addr));
/* Dump any leftover bytes. */
zdp_dump_excess(tvb, offset, pinfo, tree);
@@ -623,7 +623,7 @@ dissect_zbee_zdp_req_find_node_cache(tvbuff_t *tvb, packet_info *pinfo, proto_tr
offset += 2;
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL);
- zbee_append_info(tree, pinfo, ", Address: %s", eui64_to_display(wmem_packet_scope(), ext_addr));
+ zbee_append_info(tree, pinfo, ", Address: %s", eui64_to_display(pinfo->pool, ext_addr));
/* Dump any leftover bytes. */
zdp_dump_excess(tvb, offset, pinfo, tree);
@@ -726,7 +726,7 @@ dissect_zbee_zdp_rsp_nwk_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status));
if (status == ZBEE_ZDP_STATUS_SUCCESS) {
- zbee_append_info(tree, pinfo, ", Address: %s = 0x%04x", eui64_to_display(wmem_packet_scope(), ext_addr), device);
+ zbee_append_info(tree, pinfo, ", Address: %s = 0x%04x", eui64_to_display(pinfo->pool, ext_addr), device);
}
/* Dump any leftover bytes. */
@@ -775,7 +775,7 @@ dissect_zbee_zdp_rsp_ext_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status));
if (status == ZBEE_ZDP_STATUS_SUCCESS) {
- zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x = %s", device, eui64_to_display(wmem_packet_scope(), ext_addr));
+ zbee_append_info(tree, pinfo, ", Nwk Addr: 0x%04x = %s", device, eui64_to_display(pinfo->pool, ext_addr));
}
/* Dump any leftover bytes. */
@@ -1018,7 +1018,7 @@ dissect_zbee_zdp_rsp_user_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
}
else user_length = 0;
- user = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, user_length, ENC_ASCII);
+ user = tvb_get_string_enc(pinfo->pool, tvb, offset, user_length, ENC_ASCII);
if (tree) {
proto_tree_add_string(tree, hf_zbee_zdp_user, tvb, offset, user_length, user);
}
diff --git a/epan/dissectors/packet-zbee-zdp-management.c b/epan/dissectors/packet-zbee-zdp-management.c
index 659bb6be1c..66c3a7855d 100644
--- a/epan/dissectors/packet-zbee-zdp-management.c
+++ b/epan/dissectors/packet-zbee-zdp-management.c
@@ -305,7 +305,7 @@ dissect_zbee_zdp_req_mgmt_leave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
offset += 1;
}
- zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(wmem_packet_scope(), ext_addr));
+ zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(pinfo->pool, ext_addr));
/* Dump any leftover bytes. */
zdp_dump_excess(tvb, offset, pinfo, tree);
@@ -328,7 +328,7 @@ dissect_zbee_zdp_req_mgmt_direct_join(tvbuff_t *tvb, packet_info *pinfo, proto_t
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, 8, NULL);
/*cinfo =*/ zdp_parse_cinfo(tree, ett_zbee_zdp_cinfo, tvb, &offset);
- zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(wmem_packet_scope(), ext_addr));
+ zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(pinfo->pool, ext_addr));
/* Dump any leftover bytes. */
zdp_dump_excess(tvb, offset, pinfo, tree);
diff --git a/epan/dissectors/packet-zep.c b/epan/dissectors/packet-zep.c
index f50fe411bf..b50e4e9055 100644
--- a/epan/dissectors/packet-zep.c
+++ b/epan/dissectors/packet-zep.c
@@ -119,7 +119,7 @@ static int dissect_zep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
return 0;
/* Determine whether this is a Q51/IEEE 802.15.4 sniffer packet or not */
- if(strcmp(tvb_get_string_enc(wmem_packet_scope(), tvb, 0, 2, ENC_ASCII), ZEP_PREAMBLE)){
+ if(strcmp(tvb_get_string_enc(pinfo->pool, tvb, 0, 2, ENC_ASCII), ZEP_PREAMBLE)){
/* This is not a Q51/ZigBee sniffer packet */
return 0;
}
diff --git a/epan/dissectors/packet-zvt.c b/epan/dissectors/packet-zvt.c
index 03a5e9914c..5f89c0dc49 100644
--- a/epan/dissectors/packet-zvt.c
+++ b/epan/dissectors/packet-zvt.c
@@ -630,7 +630,7 @@ dissect_zvt_tlv_seq(tvbuff_t *tvb, gint offset, guint16 seq_max_len,
gint ret;
if (!seq_info) {
- seq_info = wmem_new(wmem_packet_scope(), tlv_seq_info_t);
+ seq_info = wmem_new(pinfo->pool, tlv_seq_info_t);
/* by default, text lines are using the CP437 charset
there's an object to change the encoding
@@ -749,7 +749,7 @@ static inline gint dissect_zvt_time(
tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree)
{
const gchar *str = tvb_bcd_dig_to_wmem_packet_str_be(tvb, offset, 3, NULL, FALSE);
- gchar *fstr = (char *)wmem_alloc(wmem_packet_scope(), 9);
+ gchar *fstr = (char *)wmem_alloc(pinfo->pool, 9);
fstr[0] = str[0];
fstr[1] = str[1];
fstr[2] = ':';
@@ -768,7 +768,7 @@ static inline gint dissect_zvt_date(
tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree)
{
const gchar *str = tvb_bcd_dig_to_wmem_packet_str_be(tvb, offset, 2, NULL, FALSE);
- gchar *fstr = (char *)wmem_alloc(wmem_packet_scope(), 6);
+ gchar *fstr = (char *)wmem_alloc(pinfo->pool, 6);
fstr[0] = str[0];
fstr[1] = str[1];
fstr[2] = '/';
@@ -784,7 +784,7 @@ static inline gint dissect_zvt_expiry_date(
tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree)
{
const gchar *str = tvb_bcd_dig_to_wmem_packet_str_be(tvb, offset, 2, NULL, FALSE);
- gchar *fstr = (char *)wmem_alloc(wmem_packet_scope(), 6);
+ gchar *fstr = (char *)wmem_alloc(pinfo->pool, 6);
fstr[0] = str[0];
fstr[1] = str[1];
fstr[2] = '/';
@@ -824,7 +824,7 @@ static inline gint dissect_zvt_card_name(
guint8 ones = tvb_get_guint8(tvb, offset + 1) & 0x0f;
guint8 length = tens * 10 + ones;
const guint8 * str = NULL;
- proto_tree_add_item_ret_string(tree, hf_zvt_card_name, tvb, offset + 2, length, ENC_ASCII, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_string(tree, hf_zvt_card_name, tvb, offset + 2, length, ENC_ASCII, pinfo->pool, &str);
return 2 + length;
}
@@ -837,7 +837,7 @@ static inline gint dissect_zvt_additional_data(
guint8 ones = tvb_get_guint8(tvb, offset + 2) & 0x0f;
guint16 length = hundrets * 100 + tens * 10 + ones;
const guint8 * str = NULL;
- proto_tree_add_item_ret_string(tree, hf_zvt_additional_data, tvb, offset + 3, length, ENC_ASCII, wmem_packet_scope(), &str);
+ proto_tree_add_item_ret_string(tree, hf_zvt_additional_data, tvb, offset + 3, length, ENC_ASCII, pinfo->pool, &str);
return 3 + length;
}
diff --git a/epan/dissectors/pidl/witness/witness.cnf b/epan/dissectors/pidl/witness/witness.cnf
index 0c5800ebaf..09a0bbd175 100644
--- a/epan/dissectors/pidl/witness/witness.cnf
+++ b/epan/dissectors/pidl/witness/witness.cnf
@@ -57,7 +57,7 @@ witness_dissect_struct_notifyResponse(tvbuff_t *tvb _U_, int offset _U_, packet_
tree = proto_item_add_subtree(item, ett_witness_witness_notifyResponse);
}
- type = wmem_new0(wmem_packet_scope(), guint32);
+ type = wmem_new0(pinfo->pool, guint32);
offset = witness_dissect_element_notifyResponse_type(tvb, offset, pinfo, tree, di, drep, type);
@@ -173,7 +173,7 @@ witness_dissect_element_interfaceInfo_group_name(tvbuff_t *tvb, int offset, pack
pi = proto_tree_add_item_ret_display_string(parent_tree,
hf_witness_witness_interfaceInfo_group_name, tvb, offset, stringlen,
ENC_UTF_16|ENC_LITTLE_ENDIAN,
- wmem_packet_scope(), &str);
+ pinfo->pool, &str);
proto_item_append_text(pi, " [%d]", totlen);
proto_item_append_text(parent_tree, ": %s", str);