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.
This commit is contained in:
Evan Huus 2021-07-16 11:36:34 -04:00 committed by Wireshark GitLab Utility
parent ef542759d0
commit d6d7dd1e56
194 changed files with 803 additions and 802 deletions

View File

@ -452,7 +452,7 @@ instead allocate a buffer dynamically using the string-specific or plain wmem
routines (see README.wmem) such as
wmem_strbuf_t *strbuf;
strbuf = wmem_strbuf_new(wmem_packet_scope(), "");
strbuf = wmem_strbuf_new(pinfo->pool, "");
wmem_strbuf_append_printf(strbuf, ...
or
@ -460,7 +460,7 @@ or
char *buffer=NULL;
...
#define MAX_BUFFER 1024
buffer=wmem_alloc(wmem_packet_scope(), MAX_BUFFER);
buffer=wmem_alloc(pinfo->pool, MAX_BUFFER);
buffer[0]='\0';
...
snprintf(buffer, MAX_BUFFER, ...
@ -491,7 +491,7 @@ instead write the code as
static void
foo_to_str(char **buffer, ...
#define MAX_BUFFER x
*buffer=wmem_alloc(wmem_packet_scope(), MAX_BUFFER);
*buffer=wmem_alloc(pinfo->pool, MAX_BUFFER);
<fill in *buffer>
}
...

View File

@ -122,7 +122,7 @@ actual dissector.
}
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->fd->abs_ts;

View File

@ -54,17 +54,18 @@ changed without warning.
2.2 Wireshark Global Pools
Dissectors that include the wmem header file will have three pools available
to them automatically: wmem_packet_scope(), wmem_file_scope() and
wmem_epan_scope();
to them automatically: pinfo->pool, wmem_file_scope() and
wmem_epan_scope(); there is also a wmem_packet_scope() for cases when the
`pinfo` argument is not accessible, but pinfo->pool should be preferred.
The packet pool is scoped to the dissection of each packet, meaning that any
The pinfo pool is scoped to the dissection of each packet, meaning that any
memory allocated in it will be automatically freed at the end of the current
packet. The file pool is similarly scoped to the dissection of each file,
meaning that any memory allocated in it will be automatically freed when the
current capture file is closed.
NB: Using these pools outside of the appropriate scope (e.g. using the packet
pool when there isn't a packet being dissected) will throw an assertion.
NB: Using these pools outside of the appropriate scope (e.g. using the file
pool when there isn't a file open) will throw an assertion.
See the comment in epan/wmem/wmem_scopes.c for details.
The epan pool is scoped to the library's lifetime - memory allocated in it is

View File

@ -1188,7 +1188,7 @@ static int
dissect_foo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
...
fooinfo = wmem_alloc(wmem_packet_scope(), sizeof(struct FooTap));
fooinfo = wmem_alloc(pinfo->pool, sizeof(struct FooTap));
fooinfo->packet_type = tvb_get_guint8(tvb, 0);
fooinfo->priority = tvb_get_ntohs(tvb, 8);
...

View File

@ -123,7 +123,7 @@ set_address_tvb(address *addr, int addr_type, int addr_len, tvbuff_t *tvb, int o
/** Initialize an address with the given values, allocating a new buffer
* for the address data using wmem-scoped memory.
*
* @param scope [in] The lifetime of the allocated memory, e.g., wmem_packet_scope()
* @param scope [in] The lifetime of the allocated memory, e.g., pinfo->pool
* @param addr [in,out] The address to initialize.
* @param addr_type [in] Address type.
* @param addr_len [in] The length in bytes of the address data. For example, 4 for
@ -154,7 +154,7 @@ alloc_address_wmem(wmem_allocator_t *scope, address *addr,
*
* Same as alloc_address_wmem but it takes a TVB and an offset.
*
* @param scope [in] The lifetime of the allocated memory, e.g., wmem_packet_scope()
* @param scope [in] The lifetime of the allocated memory, e.g., pinfo->pool
* @param addr [in,out] The address to initialize.
* @param addr_type [in] Address type.
* @param addr_len [in] The length in bytes of the address data. For example, 4 for
@ -258,7 +258,7 @@ copy_address_shallow(address *to, const address *from) {
/** Copy an address, allocating a new buffer for the address data
* using wmem-scoped memory.
*
* @param scope [in] The lifetime of the allocated memory, e.g., wmem_packet_scope()
* @param scope [in] The lifetime of the allocated memory, e.g., pinfo->pool
* @param to [in,out] The destination address.
* @param from [in] The source address.
*/
@ -279,7 +279,7 @@ copy_address(address *to, const address *from) {
/** Free an address allocated with wmem-scoped memory.
*
* @param scope [in] The lifetime of the allocated memory, e.g., wmem_packet_scope()
* @param scope [in] The lifetime of the allocated memory, e.g., pinfo->pool
* @param addr [in,out] The address whose data to free.
*/
static inline void

View File

@ -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");

View File

@ -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));

View File

@ -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;

View File

@ -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)",

View File

@ -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);

View File

@ -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 */

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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) {

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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,

View File

@ -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);

View File

@ -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)

View File

@ -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;

View File

@ -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

View File

@ -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);

View File

@ -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) {

View File

@ -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);

View File

@ -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)

View File

@ -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;

View File

@ -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,

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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))

View File

@ -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);
}

View File

@ -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;

View File

@ -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;

View File

@ -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);
}

View File

@ -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);

View File

@ -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);
}

View File

@ -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)

View File

@ -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 */

View File

@ -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,

View File

@ -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:

View File

@ -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", ' ');

View File

@ -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;

View File

@ -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");

View File

@ -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;

View File

@ -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;

View File

@ -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))

View File

@ -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;

View File

@ -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");

View File

@ -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);
}

View File

@ -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);

View File

@ -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>");
}

View File

@ -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);

View File

@ -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;

View File

@ -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));

View File

@ -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;

View File

@ -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);

View File

@ -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; */

View File

@ -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);

View File

@ -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;

View File

@ -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 */

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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");

View File

@ -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);

View File

@ -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:

View File

@ -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);

View File

@ -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;

View File

@ -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);
}

View File

@ -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;

View File

@ -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 */

View File

@ -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(

View File

@ -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,

View File

@ -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,

View File

@ -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);
}

View File

@ -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);

View File

@ -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 = ", ";
}
/*

View File

@ -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;

View File

@ -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;

View File

@ -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");

View File

@ -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,

View File

@ -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;
}

View File

@ -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;

View File

@ -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" : "",

View File

@ -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

View File

@ -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')

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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

View File

@ -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 */

View File

@ -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);

Some files were not shown because too many files have changed in this diff Show More