aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/epan
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 /plugins/epan
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 'plugins/epan')
-rw-r--r--plugins/epan/irda/packet-irda.c18
-rw-r--r--plugins/epan/opcua/opcua_simpletypes.c4
-rw-r--r--plugins/epan/profinet/packet-dcerpc-pn-io.c34
-rw-r--r--plugins/epan/profinet/packet-dcom-cba-acco.c10
-rw-r--r--plugins/epan/profinet/packet-pn-dcp.c38
-rw-r--r--plugins/epan/profinet/packet-pn-rsi.c12
-rw-r--r--plugins/epan/profinet/packet-pn-rtc-one.c8
-rw-r--r--plugins/epan/wimax/msg_dcd.c2
-rw-r--r--plugins/epan/wimax/msg_ucd.c2
9 files changed, 64 insertions, 64 deletions
diff --git a/plugins/epan/irda/packet-irda.c b/plugins/epan/irda/packet-irda.c
index c95dc259e7..79dc458b96 100644
--- a/plugins/epan/irda/packet-irda.c
+++ b/plugins/epan/irda/packet-irda.c
@@ -590,12 +590,12 @@ static void dissect_iap_request(tvbuff_t* tvb, packet_info* pinfo, proto_tree* r
iap_conv->pattr_dissector = NULL;
}
- char *class_name = (char *) tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1 + 1, clen, ENC_ASCII|ENC_NA);
- char *attr_name = (char *) tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 1 + 1 + clen + 1, alen, ENC_ASCII|ENC_NA);
+ char *class_name = (char *) tvb_get_string_enc(pinfo->pool, tvb, offset + 1 + 1, clen, ENC_ASCII|ENC_NA);
+ char *attr_name = (char *) tvb_get_string_enc(pinfo->pool, tvb, offset + 1 + 1 + clen + 1, alen, ENC_ASCII|ENC_NA);
col_add_fstr(pinfo->cinfo, COL_INFO, "GetValueByClass: \"%s\" \"%s\"",
- format_text(wmem_packet_scope(), (guchar *) class_name, strlen(class_name)),
- format_text(wmem_packet_scope(), (guchar *) attr_name, strlen(attr_name)));
+ format_text(pinfo->pool, (guchar *) class_name, strlen(class_name)),
+ format_text(pinfo->pool, (guchar *) attr_name, strlen(attr_name)));
/* Dissect IAP query if it is new */
if (iap_conv)
@@ -748,7 +748,7 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
case IAS_STRING:
n = tvb_get_guint8(tvb, offset + 8);
- col_append_fstr(pinfo->cinfo, COL_INFO, ", \"%s\"", tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 9, n, ENC_ASCII));
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", \"%s\"", tvb_get_string_enc(pinfo->pool, tvb, offset + 9, n, ENC_ASCII));
break;
default:
break;
@@ -1668,8 +1668,8 @@ static void dissect_xid(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, pro
if (have_encoding)
{
- name = (gchar *) tvb_get_string_enc(wmem_packet_scope(), tvb, offset, name_len, encoding);
- col_append_fstr(pinfo->cinfo, COL_INFO, ", \"%s\"", format_text(wmem_packet_scope(), (guchar *) name, strlen(name)));
+ name = (gchar *) tvb_get_string_enc(pinfo->pool, tvb, offset, name_len, encoding);
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", \"%s\"", format_text(pinfo->pool, (guchar *) name, strlen(name)));
if (root)
proto_tree_add_item(lmp_tree, hf_lmp_xid_name, tvb, offset,
-1, encoding);
@@ -1705,13 +1705,13 @@ static void dissect_log(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
char *buf;
length = tvb_captured_length(tvb);
- buf = (char *) tvb_get_string_enc(wmem_packet_scope(), tvb, 0, length, ENC_ASCII|ENC_NA);
+ buf = (char *) tvb_get_string_enc(pinfo->pool, tvb, 0, length, ENC_ASCII|ENC_NA);
if (length > 0 && buf[length-1] == '\n')
buf[length-1] = 0;
else if (length > 1 && buf[length-2] == '\n')
buf[length-2] = 0;
- col_add_str(pinfo->cinfo, COL_INFO, format_text(wmem_packet_scope(), (guchar *) buf, strlen(buf)));
+ col_add_str(pinfo->cinfo, COL_INFO, format_text(pinfo->pool, (guchar *) buf, strlen(buf)));
}
if (root)
diff --git a/plugins/epan/opcua/opcua_simpletypes.c b/plugins/epan/opcua/opcua_simpletypes.c
index b2d512c8a0..945b528794 100644
--- a/plugins/epan/opcua/opcua_simpletypes.c
+++ b/plugins/epan/opcua/opcua_simpletypes.c
@@ -632,7 +632,7 @@ proto_item* parseString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_,
else
{
item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, 0, ENC_NA);
- szValue = wmem_strdup_printf(wmem_packet_scope(), "[Invalid String] Invalid length: %d", iLen);
+ szValue = wmem_strdup_printf(pinfo->pool, "[Invalid String] Invalid length: %d", iLen);
proto_item_append_text(item, "%s", szValue);
proto_item_set_end(item, tvb, *pOffset + 4);
}
@@ -758,7 +758,7 @@ proto_item* parseByteString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
else
{
item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, 0, ENC_NA);
- szValue = wmem_strdup_printf(wmem_packet_scope(), "[Invalid ByteString] Invalid length: %d", iLen);
+ szValue = wmem_strdup_printf(pinfo->pool, "[Invalid ByteString] Invalid length: %d", iLen);
proto_item_append_text(item, "%s", szValue);
proto_item_set_end(item, tvb, *pOffset + 4);
}
diff --git a/plugins/epan/profinet/packet-dcerpc-pn-io.c b/plugins/epan/profinet/packet-dcerpc-pn-io.c
index 4542e8c6fe..0372778f2a 100644
--- a/plugins/epan/profinet/packet-dcerpc-pn-io.c
+++ b/plugins/epan/profinet/packet-dcerpc-pn-io.c
@@ -2595,9 +2595,9 @@ pnio_ar_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pnio_ar_t *ar)
sub_tree = proto_tree_add_subtree_format(tree, tvb, 0, 0, ett_pn_io_ar_info, &sub_item,
"ARUUID:%s ContrMAC:%s ContrAlRef:0x%x DevMAC:%s DevAlRef:0x%x InCR:0x%x OutCR=0x%x",
- guid_to_str(wmem_packet_scope(), (const e_guid_t*) &ar->aruuid),
- address_to_str(wmem_packet_scope(), &controllermac_addr), ar->controlleralarmref,
- address_to_str(wmem_packet_scope(), &devicemac_addr), ar->devicealarmref,
+ guid_to_str(pinfo->pool, (const e_guid_t*) &ar->aruuid),
+ address_to_str(pinfo->pool, &controllermac_addr), ar->controlleralarmref,
+ address_to_str(pinfo->pool, &devicemac_addr), ar->devicealarmref,
ar->inputframeid, ar->outputframeid);
proto_item_set_generated(sub_item);
@@ -3455,11 +3455,11 @@ dissect_IandM1_block(tvbuff_t *tvb, int offset,
}
/* IM_Tag_Function [32] */
- proto_tree_add_item_ret_display_string (tree, hf_pn_io_im_tag_function, tvb, offset, 32, ENC_ASCII|ENC_NA, wmem_packet_scope(), &pTagFunction);
+ proto_tree_add_item_ret_display_string (tree, hf_pn_io_im_tag_function, tvb, offset, 32, ENC_ASCII|ENC_NA, pinfo->pool, &pTagFunction);
offset += 32;
/* IM_Tag_Location [22] */
- proto_tree_add_item_ret_display_string (tree, hf_pn_io_im_tag_location, tvb, offset, 22, ENC_ASCII|ENC_NA, wmem_packet_scope(), &pTagLocation);
+ proto_tree_add_item_ret_display_string (tree, hf_pn_io_im_tag_location, tvb, offset, 22, ENC_ASCII|ENC_NA, pinfo->pool, &pTagLocation);
offset += 22;
proto_item_append_text(item, ": TagFunction:\"%s\", TagLocation:\"%s\"", pTagFunction, pTagLocation);
@@ -3481,7 +3481,7 @@ dissect_IandM2_block(tvbuff_t *tvb, int offset,
}
/* IM_Date [16] */
- proto_tree_add_item_ret_display_string (tree, hf_pn_io_im_date, tvb, offset, 16, ENC_ASCII|ENC_NA, wmem_packet_scope(), &pDate);
+ proto_tree_add_item_ret_display_string (tree, hf_pn_io_im_date, tvb, offset, 16, ENC_ASCII|ENC_NA, pinfo->pool, &pDate);
offset += 16;
proto_item_append_text(item, ": Date:\"%s\"", pDate);
@@ -3503,7 +3503,7 @@ dissect_IandM3_block(tvbuff_t *tvb, int offset,
}
/* IM_Descriptor [54] */
- proto_tree_add_item_ret_display_string (tree, hf_pn_io_im_descriptor, tvb, offset, 54, ENC_ASCII|ENC_NA, wmem_packet_scope(), &pDescriptor);
+ proto_tree_add_item_ret_display_string (tree, hf_pn_io_im_descriptor, tvb, offset, 54, ENC_ASCII|ENC_NA, pinfo->pool, &pDescriptor);
offset += 54;
proto_item_append_text(item, ": Descriptor:\"%s\"", pDescriptor);
@@ -5005,7 +5005,7 @@ dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
hf_pn_io_length_own_port_id, &u8LengthOwnPortID);
/* OwnPortID */
- proto_tree_add_item_ret_display_string (tree, hf_pn_io_own_port_id, tvb, offset, u8LengthOwnPortID, ENC_ASCII|ENC_NA, wmem_packet_scope(), &pOwnPortID);
+ proto_tree_add_item_ret_display_string (tree, hf_pn_io_own_port_id, tvb, offset, u8LengthOwnPortID, ENC_ASCII|ENC_NA, pinfo->pool, &pOwnPortID);
offset += u8LengthOwnPortID;
/* NumberOfPeers */
@@ -7150,7 +7150,7 @@ dissect_ARData_block(tvbuff_t *tvb, int offset,
pn_init_append_aruuid_frame_setup_list(aruuid, pinfo->num);
}
- proto_item_append_text(ar_item, "ARUUID:%s", guid_to_str(wmem_packet_scope(), (const e_guid_t*) &aruuid));
+ proto_item_append_text(ar_item, "ARUUID:%s", guid_to_str(pinfo->pool, (const e_guid_t*) &aruuid));
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, ar_tree, drep,
hf_pn_io_ar_type, &u16ARType);
offset = dissect_ARProperties(tvb, offset, pinfo, ar_tree, item, drep);
@@ -7267,7 +7267,7 @@ dissect_ARData_block(tvbuff_t *tvb, int offset,
pn_init_append_aruuid_frame_setup_list(aruuid, pinfo->num);
}
- proto_item_append_text(ar_item, "ARUUID:%s", guid_to_str(wmem_packet_scope(), (const e_guid_t*) &aruuid));
+ proto_item_append_text(ar_item, "ARUUID:%s", guid_to_str(pinfo->pool, (const e_guid_t*) &aruuid));
/* CMInitiatorObjectUUID */
offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, ar_tree, drep, hf_pn_io_cminitiator_objectuuid, &uuid);
/* ParameterServerObjectUUID */
@@ -7978,7 +7978,7 @@ dissect_ARBlockReq_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
hf_pn_io_station_name_length, &u16NameLength);
- proto_tree_add_item_ret_display_string (tree, hf_pn_io_cminitiator_station_name, tvb, offset, u16NameLength, ENC_ASCII|ENC_NA, wmem_packet_scope(), &pStationName);
+ proto_tree_add_item_ret_display_string (tree, hf_pn_io_cminitiator_station_name, tvb, offset, u16NameLength, ENC_ASCII|ENC_NA, pinfo->pool, &pStationName);
offset += u16NameLength;
proto_item_append_text(item, ": %s, Session:%u, MAC:%02x:%02x:%02x:%02x:%02x:%02x, Port:0x%x, Station:%s",
@@ -8583,7 +8583,7 @@ dissect_MCRBlockReq_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
hf_pn_io_station_name_length, &u16NameLength);
- proto_tree_add_item_ret_display_string (tree, hf_pn_io_provider_station_name, tvb, offset, u16NameLength, ENC_ASCII|ENC_NA, wmem_packet_scope(), &pStationName);
+ proto_tree_add_item_ret_display_string (tree, hf_pn_io_provider_station_name, tvb, offset, u16NameLength, ENC_ASCII|ENC_NA, pinfo->pool, &pStationName);
offset += u16NameLength;
proto_item_append_text(item, ", CRRef:%u, Properties:0x%x, TFactor:%u, Station:%s",
@@ -9083,13 +9083,13 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset,
guint32 current_aruuid = 0;
/* Helppointer initial */
- convertStr = (gchar*)wmem_alloc(wmem_packet_scope(), MAX_NAMELENGTH);
+ convertStr = (gchar*)wmem_alloc(pinfo->pool, MAX_NAMELENGTH);
convertStr[0] = '\0';
- pch = (gchar*)wmem_alloc(wmem_packet_scope(), MAX_LINE_LENGTH);
+ pch = (gchar*)wmem_alloc(pinfo->pool, MAX_LINE_LENGTH);
pch[0] = '\0';
- puffer = (gchar*)wmem_alloc(wmem_packet_scope(), MAX_LINE_LENGTH);
+ puffer = (gchar*)wmem_alloc(pinfo->pool, MAX_LINE_LENGTH);
puffer[0] = '\0';
- temp = (gchar*)wmem_alloc(wmem_packet_scope(), MAX_LINE_LENGTH);
+ temp = (gchar*)wmem_alloc(pinfo->pool, MAX_LINE_LENGTH);
temp[0] = '\0';
/* Initial */
@@ -9150,7 +9150,7 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset,
while ((filename = g_dir_read_name(dir)) != NULL) {
/* ---- complete the path to open a GSD-file ---- */
- diropen = wmem_strdup_printf(wmem_packet_scope(), "%s" G_DIR_SEPARATOR_S "%s", pnio_ps_networkpath, filename);
+ diropen = wmem_strdup_printf(pinfo->pool, "%s" G_DIR_SEPARATOR_S "%s", pnio_ps_networkpath, filename);
/* ---- Open the found GSD-file ---- */
fp = ws_fopen(diropen, "r");
diff --git a/plugins/epan/profinet/packet-dcom-cba-acco.c b/plugins/epan/profinet/packet-dcom-cba-acco.c
index ae6e268421..1b5d4cc1cd 100644
--- a/plugins/epan/profinet/packet-dcom-cba-acco.c
+++ b/plugins/epan/profinet/packet-dcom-cba-acco.c
@@ -418,7 +418,7 @@ cba_object_dump(void)
for(pdevs = cba_pdevs; pdevs != NULL; pdevs = g_list_next(pdevs)) {
pdev = pdevs->data;
set_address(&addr, AT_IPv4, 4, pdev->ip);
- ws_debug_printf("PDev #%5u: %s IFs:%u", pdev->first_packet, address_to_str(wmem_packet_scope(), &addr),
+ ws_debug_printf("PDev #%5u: %s IFs:%u", pdev->first_packet, address_to_str(pinfo->pool, &addr),
pdev->object ? g_list_length(pdev->object->interfaces) : 0);
for(ldevs = pdev->ldevs; ldevs != NULL; ldevs = g_list_next(ldevs)) {
@@ -470,11 +470,11 @@ cba_pdev_find(packet_info *pinfo, const address *addr, e_guid_t *ipid)
pdev = (cba_pdev_t *)interf->parent->private_data;
if (pdev == NULL) {
expert_add_info_format(pinfo, NULL, &ei_cba_acco_pdev_find, "pdev_find: no pdev for IP:%s IPID:%s",
- address_to_str(wmem_packet_scope(), addr), guids_resolve_guid_to_str(ipid));
+ address_to_str(pinfo->pool, addr), guids_resolve_guid_to_str(ipid));
}
} else {
expert_add_info_format(pinfo, NULL, &ei_cba_acco_pdev_find_unknown_interface, "pdev_find: unknown interface of IP:%s IPID:%s",
- address_to_str(wmem_packet_scope(), addr), guids_resolve_guid_to_str(ipid));
+ address_to_str(pinfo->pool, addr), guids_resolve_guid_to_str(ipid));
pdev = NULL;
}
@@ -597,11 +597,11 @@ cba_ldev_find(packet_info *pinfo, const address *addr, e_guid_t *ipid) {
}
if (ldev == NULL) {
expert_add_info_format(pinfo, NULL, &ei_cba_acco_ldev_unknown, "Unknown LDev of %s",
- address_to_str(wmem_packet_scope(), addr));
+ address_to_str(pinfo->pool, addr));
}
} else {
expert_add_info_format(pinfo, NULL, &ei_cba_acco_ipid_unknown, "Unknown IPID of %s",
- address_to_str(wmem_packet_scope(), addr));
+ address_to_str(pinfo->pool, addr));
ldev = NULL;
}
diff --git a/plugins/epan/profinet/packet-pn-dcp.c b/plugins/epan/profinet/packet-pn-dcp.c
index 85ad126bfe..289637a220 100644
--- a/plugins/epan/profinet/packet-pn-dcp.c
+++ b/plugins/epan/profinet/packet-pn-dcp.c
@@ -468,7 +468,7 @@ dissect_PNDCP_Suboption_IP(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_pn_mac(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_ip_mac_address, mac);
set_address(&addr, AT_ETHER, 6, mac);
- proto_item_append_text(block_item, ", MACAddress: %s", address_to_str(wmem_packet_scope(), &addr));
+ proto_item_append_text(block_item, ", MACAddress: %s", address_to_str(pinfo->pool, &addr));
break;
case PNDCP_SUBOPTION_IP_IP:
pn_append_info(pinfo, dcp_item, ", IP");
@@ -504,17 +504,17 @@ dissect_PNDCP_Suboption_IP(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* IPAddress */
offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_ip_ip, &ip);
set_address(&addr, AT_IPv4, 4, &ip);
- proto_item_append_text(block_item, ", IP: %s", address_to_str(wmem_packet_scope(), &addr));
+ proto_item_append_text(block_item, ", IP: %s", address_to_str(pinfo->pool, &addr));
/* Subnetmask */
offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_ip_subnetmask, &ip);
set_address(&addr, AT_IPv4, 4, &ip);
- proto_item_append_text(block_item, ", Subnet: %s", address_to_str(wmem_packet_scope(), &addr));
+ proto_item_append_text(block_item, ", Subnet: %s", address_to_str(pinfo->pool, &addr));
/* StandardGateway */
offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_ip_standard_gateway, &ip);
set_address(&addr, AT_IPv4, 4, &ip);
- proto_item_append_text(block_item, ", Gateway: %s", address_to_str(wmem_packet_scope(), &addr));
+ proto_item_append_text(block_item, ", Gateway: %s", address_to_str(pinfo->pool, &addr));
break;
case PNDCP_SUBOPTION_IP_FULL_IP_SUITE:
pn_append_info(pinfo, dcp_item, ", MAC");
@@ -548,37 +548,37 @@ dissect_PNDCP_Suboption_IP(tvbuff_t *tvb, int offset, packet_info *pinfo,
/* IPAddress */
offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_ip_ip, &ip);
set_address(&addr, AT_IPv4, 4, &ip);
- proto_item_append_text(block_item, ", IP: %s", address_to_str(wmem_packet_scope(), &addr));
+ proto_item_append_text(block_item, ", IP: %s", address_to_str(pinfo->pool, &addr));
/* Subnetmask */
offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_ip_subnetmask, &ip);
set_address(&addr, AT_IPv4, 4, &ip);
- proto_item_append_text(block_item, ", Subnet: %s", address_to_str(wmem_packet_scope(), &addr));
+ proto_item_append_text(block_item, ", Subnet: %s", address_to_str(pinfo->pool, &addr));
/* StandardGateway */
offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_ip_standard_gateway, &ip);
set_address(&addr, AT_IPv4, 4, &ip);
- proto_item_append_text(block_item, ", Gateway: %s", address_to_str(wmem_packet_scope(), &addr));
+ proto_item_append_text(block_item, ", Gateway: %s", address_to_str(pinfo->pool, &addr));
/* IPAddress_1 */
offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_ip_ip, &ip);
set_address(&addr, AT_IPv4, 4, &ip);
- proto_item_append_text(block_item, ", DNSServerIP1: %s", address_to_str(wmem_packet_scope(), &addr));
+ proto_item_append_text(block_item, ", DNSServerIP1: %s", address_to_str(pinfo->pool, &addr));
/* IPAddress_2 */
offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_ip_subnetmask, &ip);
set_address(&addr, AT_IPv4, 4, &ip);
- proto_item_append_text(block_item, ", DNSServerIP2: %s", address_to_str(wmem_packet_scope(), &addr));
+ proto_item_append_text(block_item, ", DNSServerIP2: %s", address_to_str(pinfo->pool, &addr));
/* IPAddress_3 */
offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_ip_standard_gateway, &ip);
set_address(&addr, AT_IPv4, 4, &ip);
- proto_item_append_text(block_item, ", DNSServerIP3: %s", address_to_str(wmem_packet_scope(), &addr));
+ proto_item_append_text(block_item, ", DNSServerIP3: %s", address_to_str(pinfo->pool, &addr));
/* IPAddress_4 */
offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_ip_standard_gateway, &ip);
set_address(&addr, AT_IPv4, 4, &ip);
- proto_item_append_text(block_item, ", DNSServerIP4: %s", address_to_str(wmem_packet_scope(), &addr));
+ proto_item_append_text(block_item, ", DNSServerIP4: %s", address_to_str(pinfo->pool, &addr));
break;
default:
@@ -653,7 +653,7 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
* part, not realizing that they should have done "(R)" or something
* such as that.
*/
- proto_tree_add_item_ret_display_string (tree, hf_pn_dcp_suboption_device_typeofstation, tvb, offset, block_length, ENC_ASCII|ENC_NA, wmem_packet_scope(), &typeofstation);
+ proto_tree_add_item_ret_display_string (tree, hf_pn_dcp_suboption_device_typeofstation, tvb, offset, block_length, ENC_ASCII|ENC_NA, pinfo->pool, &typeofstation);
pn_append_info(pinfo, dcp_item, ", DeviceVendorValue");
proto_item_append_text(block_item, "Device/Manufacturer specific");
if (have_block_qualifier) {
@@ -710,8 +710,8 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
* is just an ASCII string to be interpreted as a Punycode Unicode
* domain name?
*/
- proto_tree_add_item_ret_display_string (tree, hf_pn_dcp_suboption_device_nameofstation, tvb, offset, block_length, ENC_ASCII|ENC_NA, wmem_packet_scope(), &nameofstation);
- pn_append_info(pinfo, dcp_item, wmem_strdup_printf(wmem_packet_scope(), ", NameOfStation:\"%s\"", nameofstation));
+ proto_tree_add_item_ret_display_string (tree, hf_pn_dcp_suboption_device_nameofstation, tvb, offset, block_length, ENC_ASCII|ENC_NA, pinfo->pool, &nameofstation);
+ pn_append_info(pinfo, dcp_item, wmem_strdup_printf(pinfo->pool, ", NameOfStation:\"%s\"", nameofstation));
proto_item_append_text(block_item, "Device/NameOfStation");
if (have_block_qualifier) {
proto_item_append_text(block_item, ", BlockQualifier: %s",
@@ -814,7 +814,7 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_item_append_text(block_item, ", PN-Supervisor");
break;
case PNDCP_SUBOPTION_DEVICE_DEV_OPTIONS:
- info_str = wmem_strdup_printf(wmem_packet_scope(), ", Dev-Options(%u)", block_length/2);
+ info_str = wmem_strdup_printf(pinfo->pool, ", Dev-Options(%u)", block_length/2);
pn_append_info(pinfo, dcp_item, info_str);
proto_item_append_text(block_item, "Device/Device Options");
if (have_block_qualifier) {
@@ -858,8 +858,8 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
* NameOfStationValue" that it's a domain name, complete with
* RFC 5890 Punycode.
*/
- proto_tree_add_item_ret_display_string (tree, hf_pn_dcp_suboption_device_aliasname, tvb, offset, block_length, ENC_ASCII|ENC_NA, wmem_packet_scope(), &aliasname);
- pn_append_info(pinfo, dcp_item, wmem_strdup_printf(wmem_packet_scope(), ", AliasName:\"%s\"", aliasname));
+ proto_tree_add_item_ret_display_string (tree, hf_pn_dcp_suboption_device_aliasname, tvb, offset, block_length, ENC_ASCII|ENC_NA, pinfo->pool, &aliasname);
+ pn_append_info(pinfo, dcp_item, wmem_strdup_printf(pinfo->pool, ", AliasName:\"%s\"", aliasname));
proto_item_append_text(block_item, "Device/AliasName");
if (have_block_qualifier) {
proto_item_append_text(block_item, ", BlockQualifier: %s",
@@ -1120,7 +1120,7 @@ dissect_PNDCP_Suboption_Control(tvbuff_t *tvb, int offset, packet_info *pinfo,
expert_add_info_format(pinfo, item, &ei_pn_dcp_block_error_unknown, "%s",
val_to_str(block_error, pn_dcp_block_error, "Unknown"));
}
- info_str = wmem_strdup_printf(wmem_packet_scope(), ", Response(%s)",
+ info_str = wmem_strdup_printf(pinfo->pool, ", Response(%s)",
val_to_str(block_error, pn_dcp_block_error, "Unknown"));
pn_append_info(pinfo, dcp_item, info_str);
proto_item_append_text(block_item, ", BlockError: %s",
@@ -1380,7 +1380,7 @@ dissect_PNDCP_PDU(tvbuff_t *tvb,
return;
}
- xid_str = wmem_strdup_printf(wmem_packet_scope(), ", Xid:0x%x", xid);
+ xid_str = wmem_strdup_printf(pinfo->pool, ", Xid:0x%x", xid);
pn_append_info(pinfo, dcp_item, xid_str);
/* dissect a number of blocks (depending on the remaining length) */
diff --git a/plugins/epan/profinet/packet-pn-rsi.c b/plugins/epan/profinet/packet-pn-rsi.c
index ef43414e71..69f226dda1 100644
--- a/plugins/epan/profinet/packet-pn-rsi.c
+++ b/plugins/epan/profinet/packet-pn-rsi.c
@@ -779,7 +779,7 @@ dissect_PDRsiInstances_block(tvbuff_t *tvb, int offset,
/* SystemIdentification */
/* DeviceType */
- deviceType = (char *)wmem_alloc(wmem_packet_scope(), deviceType_size + 1);
+ deviceType = (char *)wmem_alloc(pinfo->pool, deviceType_size + 1);
tvb_memcpy(tvb, (guint8 *)deviceType, offset, 25);
deviceType[deviceType_size] = '\0';
proto_tree_add_string(tree, hf_pn_rsi_device_type, tvb, offset, deviceType_size, deviceType);
@@ -788,7 +788,7 @@ dissect_PDRsiInstances_block(tvbuff_t *tvb, int offset,
/* Blank */
/* OrderID */
- orderID = (char *)wmem_alloc(wmem_packet_scope(), orderID_size + 1);
+ orderID = (char *)wmem_alloc(pinfo->pool, orderID_size + 1);
tvb_memcpy(tvb, (guint8 *)orderID, offset, 20);
orderID[orderID_size] = '\0';
proto_tree_add_string(tree, hf_pn_rsi_order_id, tvb, offset, orderID_size, orderID);
@@ -797,7 +797,7 @@ dissect_PDRsiInstances_block(tvbuff_t *tvb, int offset,
/* Blank */
/* IM_Serial_Number */
- IMserialnumber = (char *)wmem_alloc(wmem_packet_scope(), IMserialnumber_size + 1);
+ IMserialnumber = (char *)wmem_alloc(pinfo->pool, IMserialnumber_size + 1);
tvb_memcpy(tvb, (guint8 *)IMserialnumber, offset, 16);
IMserialnumber[IMserialnumber_size] = '\0';
proto_tree_add_string(tree, hf_pn_rsi_im_serial_number, tvb, offset, IMserialnumber_size, IMserialnumber);
@@ -806,7 +806,7 @@ dissect_PDRsiInstances_block(tvbuff_t *tvb, int offset,
/* Blank */
/* HWRevision */
- HWrevision = (char *)wmem_alloc(wmem_packet_scope(), HWrevision_size + 1);
+ HWrevision = (char *)wmem_alloc(pinfo->pool, HWrevision_size + 1);
tvb_memcpy(tvb, (guint8 *)HWrevision, offset, 5);
HWrevision[HWrevision_size] = '\0';
proto_tree_add_string(tree, hf_pn_rsi_hw_revision, tvb, offset, HWrevision_size, HWrevision);
@@ -815,14 +815,14 @@ dissect_PDRsiInstances_block(tvbuff_t *tvb, int offset,
/* Blank */
/* SWRevisionPrefix */
- SWrevisionprefix = (char *)wmem_alloc(wmem_packet_scope(), SWrevisionprefix_size + 1);
+ SWrevisionprefix = (char *)wmem_alloc(pinfo->pool, SWrevisionprefix_size + 1);
tvb_memcpy(tvb, (guint8 *)SWrevisionprefix, offset, 1);
SWrevisionprefix[SWrevisionprefix_size] = '\0';
proto_tree_add_string(tree, hf_pn_rsi_sw_revision_prefix, tvb, offset, SWrevisionprefix_size, SWrevisionprefix);
offset += SWrevisionprefix_size;
/* SWRevision */
- SWrevision = (char *)wmem_alloc(wmem_packet_scope(), SWrevision_size + 1);
+ SWrevision = (char *)wmem_alloc(pinfo->pool, SWrevision_size + 1);
tvb_memcpy(tvb, (guint8 *)SWrevision, offset, 9);
SWrevision[SWrevision_size] = '\0';
proto_tree_add_string(tree, hf_pn_rsi_sw_revision, tvb, offset, SWrevision_size, SWrevision);
diff --git a/plugins/epan/profinet/packet-pn-rtc-one.c b/plugins/epan/profinet/packet-pn-rtc-one.c
index fe31943824..c91f3db2b9 100644
--- a/plugins/epan/profinet/packet-pn-rtc-one.c
+++ b/plugins/epan/profinet/packet-pn-rtc-one.c
@@ -604,10 +604,10 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
/* ModuleIdentNr appears not only once in GSD-file -> set module name more generally */
if (io_data_object->amountInGSDML > 1) { /* if ModuleIdentNr only appears once in GSD-file, use the found GSD-file-ModuleName, else ... */
if (io_data_object->slotNr == 0) {
- moduleName = wmem_strbuf_new(wmem_packet_scope(), "Headstation");
+ moduleName = wmem_strbuf_new(pinfo->pool, "Headstation");
}
else {
- moduleName = wmem_strbuf_new(wmem_packet_scope(), "Module");
+ moduleName = wmem_strbuf_new(pinfo->pool, "Module");
}
if (io_data_object->profisafeSupported == TRUE) {
@@ -798,10 +798,10 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
/* ModuleIdentNr appears not only once in GSD-file -> set module name more generally */
if (io_data_object->amountInGSDML > 1) { /* if ModuleIdentNr only appears once in GSD-file, use the found GSD-file-ModuleName, else ... */
if (io_data_object->slotNr == 0) {
- moduleName = wmem_strbuf_new(wmem_packet_scope(), "Headstation");
+ moduleName = wmem_strbuf_new(pinfo->pool, "Headstation");
}
else {
- moduleName = wmem_strbuf_new(wmem_packet_scope(), "Module");
+ moduleName = wmem_strbuf_new(pinfo->pool, "Module");
}
if (io_data_object->profisafeSupported == TRUE) {
diff --git a/plugins/epan/wimax/msg_dcd.c b/plugins/epan/wimax/msg_dcd.c
index 58066ff1d6..26472b21ee 100644
--- a/plugins/epan/wimax/msg_dcd.c
+++ b/plugins/epan/wimax/msg_dcd.c
@@ -384,7 +384,7 @@ static int dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo, p
dl_burst_diuc = (tvb_get_guint8(tvb, offset) & 0x0F);
/* display TLV info */
/* add TLV subtree */
- proto_str = wmem_strdup_printf(wmem_packet_scope(), "Downlink_Burst_Profile (DIUC=%u)", dl_burst_diuc);
+ proto_str = wmem_strdup_printf(pinfo->pool, "Downlink_Burst_Profile (DIUC=%u)", dl_burst_diuc);
tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dcd_decoder, dcd_tree, proto_mac_mgmt_msg_dcd_decoder, tvb, offset-tlv_value_offset, tlv_len, proto_str);
/* detail display */
proto_tree_add_item(tlv_tree, hf_dcd_dl_burst_profile_rsv, tvb, offset, 1, ENC_BIG_ENDIAN);
diff --git a/plugins/epan/wimax/msg_ucd.c b/plugins/epan/wimax/msg_ucd.c
index ead54a570a..6f5ffab431 100644
--- a/plugins/epan/wimax/msg_ucd.c
+++ b/plugins/epan/wimax/msg_ucd.c
@@ -331,7 +331,7 @@ static int dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, p
/* get the UIUC */
ul_burst_uiuc = tvb_get_guint8(tvb, offset) & 0x0F;
/* add TLV subtree */
- proto_str = wmem_strdup_printf(wmem_packet_scope(), "Uplink Burst Profile (UIUC = %u)", ul_burst_uiuc);
+ proto_str = wmem_strdup_printf(pinfo->pool, "Uplink Burst Profile (UIUC = %u)", ul_burst_uiuc);
tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_ucd_decoder, ucd_tree, proto_mac_mgmt_msg_ucd_decoder, tvb, offset-tlv_value_offset, tlv_len, proto_str);
proto_tree_add_item(tlv_tree, hf_ucd_ul_burst_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_ucd_ul_burst_uiuc, tvb, offset, 1, ENC_BIG_ENDIAN);