aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btsdp.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-btsdp.c')
-rw-r--r--epan/dissectors/packet-btsdp.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/epan/dissectors/packet-btsdp.c b/epan/dissectors/packet-btsdp.c
index b7ccc160a8..d178317beb 100644
--- a/epan/dissectors/packet-btsdp.c
+++ b/epan/dissectors/packet-btsdp.c
@@ -1564,7 +1564,7 @@ reassemble_continuation_state(tvbuff_t *tvb, packet_info *pinfo,
if (tid_request->continuation_state_length > 0) {
/* fetch tid_request->continuation_state */
- k_continuation_state_array = (guint32 *) wmem_alloc0(wmem_packet_scope(), 20);
+ k_continuation_state_array = (guint32 *) wmem_alloc0(pinfo->pool, 20);
continuation_state = (guint8 *) k_continuation_state_array;
continuation_state[0] = tid_request->continuation_state_length;
memcpy(&continuation_state[1], tid_request->continuation_state, tid_request->continuation_state_length);
@@ -1721,7 +1721,7 @@ reassemble_continuation_state(tvbuff_t *tvb, packet_info *pinfo,
if (tid_request->continuation_state_length > 0) {
/* fetch tid_request->continuation_state */
- k_continuation_state_array = (guint32 *) wmem_alloc0(wmem_packet_scope(), 20);
+ k_continuation_state_array = (guint32 *) wmem_alloc0(pinfo->pool, 20);
continuation_state = (guint8 *) k_continuation_state_array;
continuation_state[0] = tid_request->continuation_state_length;
memcpy(&continuation_state[1], tid_request->continuation_state, tid_request->continuation_state_length);
@@ -1774,7 +1774,7 @@ reassemble_continuation_state(tvbuff_t *tvb, packet_info *pinfo,
if (record_handle) *record_handle = tid_request->record_handle;
/* save tid_request in continuation_state data */
- k_continuation_state_array = (guint32 *) wmem_alloc0(wmem_packet_scope(), 20);
+ k_continuation_state_array = (guint32 *) wmem_alloc0(pinfo->pool, 20);
continuation_state = (guint8 *) k_continuation_state_array;
continuation_state[0] = continuation_state_length;
memcpy(&continuation_state[1], continuation_state_buffer, continuation_state_length);
@@ -2148,7 +2148,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
gint protocol_order;
wmem_strbuf_t *info_buf;
- info_buf = wmem_strbuf_new_label(wmem_packet_scope());
+ info_buf = wmem_strbuf_new_label(pinfo->pool);
*pinfo_buf = info_buf;
@@ -2527,19 +2527,19 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
case BTSDP_HCRP_SCAN_SERVICE_UUID:
switch (attribute) {
case 0x300:
- proto_tree_add_item_ret_string(next_tree, hf_hcrp_1284_id, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_hcrp_1284_id, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x302:
- proto_tree_add_item_ret_string(next_tree, hf_hcrp_device_name, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_hcrp_device_name, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x304:
- proto_tree_add_item_ret_string(next_tree, hf_hcrp_friendly_name, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_hcrp_friendly_name, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x306:
- proto_tree_add_item_ret_string(next_tree, hf_hcrp_device_location, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_hcrp_device_location, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
default:
@@ -2559,7 +2559,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
wmem_strbuf_append(info_buf, val_to_str_const(value, wap_gateway_vals, "Unknown"));
break;
case 0x308:
- proto_tree_add_item_ret_string(next_tree, hf_wap_homepage_url, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_wap_homepage_url, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x309:
@@ -2636,7 +2636,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
proto_item_set_len(entry_item, (new_offset - entry_offset) + length);
entry_offset = new_offset;
proto_tree_add_item_ret_string(next_tree, hf_hdp_supported_features_mdep_description, tvb, entry_offset, length,
- ENC_ASCII | ENC_NA, wmem_packet_scope(), &entry_str);
+ ENC_ASCII | ENC_NA, pinfo->pool, &entry_str);
proto_item_append_text(entry_item, ": %s", entry_str);
entry_offset += length;
}
@@ -2678,11 +2678,11 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
break;
case 0x30D:
case 0x200:
- proto_tree_add_item_ret_string(next_tree, hf_pan_ipv4_subnet, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_pan_ipv4_subnet, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x30E:
- proto_tree_add_item_ret_string(next_tree, hf_pan_ipv6_subnet, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_pan_ipv6_subnet, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
default:
@@ -2708,11 +2708,11 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
break;
case 0x30D:
case 0x200:
- proto_tree_add_item_ret_string(next_tree, hf_pan_ipv4_subnet, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_pan_ipv4_subnet, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x30E:
- proto_tree_add_item_ret_string(next_tree, hf_pan_ipv6_subnet, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_pan_ipv6_subnet, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
default:
@@ -2763,7 +2763,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
wmem_strbuf_append(info_buf, supported_features ? "true" : "false");
break;
case 0x306:
- proto_tree_add_item_ret_string(next_tree, hf_dun_escape_sequence, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_dun_escape_sequence, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
default:
@@ -3131,16 +3131,16 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
case BTSDP_BPP_REFERENCE_PRINTING_SERVICE_UUID:
switch (attribute) {
case 0x350:
- proto_tree_add_item_ret_string(next_tree, hf_bpp_document_formats_supported, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_bpp_document_formats_supported, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x352:
proto_tree_add_item(next_tree, hf_bpp_character_repertoires_support, tvb, offset, size, ENC_NA);
- new_str = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, size);
+ new_str = tvb_bytes_to_str(pinfo->pool, tvb, offset, size);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x354:
- proto_tree_add_item_ret_string(next_tree, hf_bpp_xhtml_print_image_formats_supported, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_bpp_xhtml_print_image_formats_supported, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x356:
@@ -3149,15 +3149,15 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
wmem_strbuf_append(info_buf, value ? "true" : "false");
break;
case 0x358:
- proto_tree_add_item_ret_string(next_tree, hf_bpp_1284_id, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_bpp_1284_id, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x35A:
- proto_tree_add_item_ret_string(next_tree, hf_bpp_printer_name, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_bpp_printer_name, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x35C:
- proto_tree_add_item_ret_string(next_tree, hf_bpp_printer_location, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_bpp_printer_location, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x35E:
@@ -3166,7 +3166,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
wmem_strbuf_append(info_buf, value ? "true" : "false");
break;
case 0x360:
- proto_tree_add_item_ret_string(next_tree, hf_bpp_media_types_supported, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_bpp_media_types_supported, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x362:
@@ -3185,7 +3185,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
wmem_strbuf_append(info_buf, value ? "true" : "false");
break;
case 0x368:
- proto_tree_add_item_ret_string(next_tree, hf_bpp_rui_formats_supported, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_bpp_rui_formats_supported, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x370:
@@ -3199,15 +3199,15 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
wmem_strbuf_append(info_buf, value ? "true" : "false");
break;
case 0x374:
- proto_tree_add_item_ret_string(next_tree, hf_bpp_reference_printing_top_url, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_bpp_reference_printing_top_url, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x376:
- proto_tree_add_item_ret_string(next_tree, hf_bpp_direct_printing_top_url, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_bpp_direct_printing_top_url, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x37A:
- proto_tree_add_item_ret_string(next_tree, hf_bpp_device_name, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_bpp_device_name, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
default:
@@ -3217,11 +3217,11 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
case BTSDP_BPP_REFLECTED_UI_SERVICE_UUID:
switch (attribute) {
case 0x368:
- proto_tree_add_item_ret_string(next_tree, hf_bpp_rui_formats_supported, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_bpp_rui_formats_supported, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x378:
- proto_tree_add_item_ret_string(next_tree, hf_bpp_printer_admin_rui_top_url, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_bpp_printer_admin_rui_top_url, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
default:
@@ -3343,7 +3343,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
dissect_data_element(entry_tree, &sub_tree, pinfo, tvb, list_offset);
list_offset = get_type_length(tvb, list_offset, &entry_length);
- proto_tree_add_item_ret_string(sub_tree, hf_sdp_lang_code, tvb, list_offset, entry_length, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(sub_tree, hf_sdp_lang_code, tvb, list_offset, entry_length, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append_printf(info_buf, "Lang: %s", (const gchar*)new_str);
proto_item_append_text(entry_item, ": Lang: %s", (const gchar*)new_str);
list_offset += entry_length;
@@ -3419,15 +3419,15 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
}
break;
case 0x00A:
- proto_tree_add_item_ret_string(next_tree, hf_sdp_service_documentation_url, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_sdp_service_documentation_url, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x00B:
- proto_tree_add_item_ret_string(next_tree, hf_sdp_service_client_executable_url, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_sdp_service_client_executable_url, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x00C:
- proto_tree_add_item_ret_string(next_tree, hf_sdp_service_icon_url, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_sdp_service_icon_url, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x00D:
@@ -3454,15 +3454,15 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
}
break;
case 0x100:
- proto_tree_add_item_ret_string(next_tree, hf_sdp_service_name, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_sdp_service_name, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x101:
- proto_tree_add_item_ret_string(next_tree, hf_sdp_service_description, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_sdp_service_description, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
case 0x102:
- proto_tree_add_item_ret_string(next_tree, hf_sdp_service_provider_name, tvb, offset, size, ENC_ASCII | ENC_NA, wmem_packet_scope(), &new_str);
+ proto_tree_add_item_ret_string(next_tree, hf_sdp_service_provider_name, tvb, offset, size, ENC_ASCII | ENC_NA, pinfo->pool, &new_str);
wmem_strbuf_append(info_buf, (const gchar*)new_str);
break;
default:
@@ -3495,7 +3495,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
case 4: {
const guint8 *ptr;
- proto_tree_add_item_ret_string(next_tree, (type == 8) ? hf_data_element_value_url : hf_data_element_value_string, tvb, offset, size, ENC_NA | ENC_ASCII, wmem_packet_scope(), &ptr);
+ proto_tree_add_item_ret_string(next_tree, (type == 8) ? hf_data_element_value_url : hf_data_element_value_string, tvb, offset, size, ENC_NA | ENC_ASCII, pinfo->pool, &ptr);
wmem_strbuf_append_printf(info_buf, "%s ", ptr);
break;
}
@@ -3901,7 +3901,7 @@ dissect_sdp_service_attribute_list(proto_tree *tree, tvbuff_t *tvb, gint offset,
service_info_t *service_info;
wmem_array_t *uuid_array;
- uuid_array = wmem_array_new(wmem_packet_scope(), sizeof(bluetooth_uuid_t));
+ uuid_array = wmem_array_new(pinfo->pool, sizeof(bluetooth_uuid_t));
offset = get_type_length(tvb, offset, &len);
memset(&uuid, 0, sizeof(bluetooth_uuid_t));
@@ -4141,7 +4141,7 @@ dissect_sdp_service_search_response(proto_tree *tree, tvbuff_t *tvb,
st = proto_item_add_subtree(ti, ett_btsdp_ssr);
if (!pinfo->fd->visited)
- record_handle_array = wmem_array_new(wmem_packet_scope(), sizeof(guint32));
+ record_handle_array = wmem_array_new(pinfo->pool, sizeof(guint32));
while (current_count > 0) {
proto_tree_add_item(st, hf_sdp_service_record_handle, tvb, offset, 4, ENC_BIG_ENDIAN);
@@ -4365,7 +4365,7 @@ dissect_sdp_service_search_attribute_request(proto_tree *tree, tvbuff_t *tvb,
if (!pinfo->fd->visited)
uuid_array = wmem_array_new(wmem_file_scope(), sizeof(bluetooth_uuid_t));
else
- uuid_array = wmem_array_new(wmem_packet_scope(), sizeof(bluetooth_uuid_t));
+ uuid_array = wmem_array_new(pinfo->pool, sizeof(bluetooth_uuid_t));
start_offset = offset;
pitem = proto_tree_add_item(tree, hf_service_search_pattern, tvb, offset, 0, ENC_NA);