tvb_bytes_to_ep_str -> tvb_bytes_to_str
Change-Id: I79c613cbdd8dc939dd4c29ebc477fb6eefd5bfc4 Reviewed-on: https://code.wireshark.org/review/6371 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
98d3b1494b
commit
64a7bac641
|
@ -168,9 +168,9 @@ if(next_tvb) {
|
|||
* in the 8 octets case.
|
||||
*/
|
||||
if (len > 4){
|
||||
ansi_tcap_private.TransactionID_str = tvb_bytes_to_ep_str(next_tvb, 4,len-4);
|
||||
ansi_tcap_private.TransactionID_str = tvb_bytes_to_str(wmem_packet_scope(), next_tvb, 4,len-4);
|
||||
}else{
|
||||
ansi_tcap_private.TransactionID_str = tvb_bytes_to_ep_str(next_tvb, 0,len);
|
||||
ansi_tcap_private.TransactionID_str = tvb_bytes_to_str(wmem_packet_scope(), next_tvb, 0,len);
|
||||
}
|
||||
}
|
||||
switch(len) {
|
||||
|
|
|
@ -441,7 +441,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
|
|||
proto_tree_add_uint(tree, hf_c1222_auth_len, tvb, *offset, 1, auth_len);
|
||||
*offset += 1;
|
||||
if (*length >= auth_len) {
|
||||
auth_req = tvb_bytes_to_ep_str(tvb, *offset, auth_len);
|
||||
auth_req = tvb_bytes_to_str(wmem_packet_scope(), tvb, *offset, auth_len);
|
||||
proto_tree_add_item(tree, hf_c1222_auth_data, tvb, *offset, auth_len, ENC_NA);
|
||||
*offset += auth_len;
|
||||
*length -= auth_len + 1;
|
||||
|
|
|
@ -406,7 +406,7 @@ AuditReplyV1/auditResult audit_result
|
|||
/* not ascii or NULL character so do string as hex string */
|
||||
proto_tree_add_text(tree, tvb, offset, len,"%s: 0x%s",
|
||||
(proto_registrar_get_nth(hf_index))->name,
|
||||
tvb_bytes_to_ep_str(tvb, 0, len));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, 0, len));
|
||||
return len;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -158,11 +158,11 @@ VAL_PTR=&Data_Field_field_type_value
|
|||
if (primary_part){
|
||||
if(value_len < 8){
|
||||
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "[%s]",
|
||||
tvb_bytes_to_ep_str(value_tvb,0,value_len));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), value_tvb,0,value_len));
|
||||
}
|
||||
else {
|
||||
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "[%s...]",
|
||||
tvb_bytes_to_ep_str(value_tvb,0,7));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), value_tvb,0,7));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1294,9 +1294,8 @@ libwireshark.so.0 libwireshark0 #MINVER#
|
|||
tvb_address_var_to_str@Base 1.99.2
|
||||
tvb_bcd_dig_to_wmem_packet_str@Base 1.12.0~rc1
|
||||
tvb_bytes_exist@Base 1.9.1
|
||||
tvb_bytes_to_ep_str@Base 1.12.0~rc1
|
||||
tvb_bytes_to_str@Base 1.99.2
|
||||
tvb_bytes_to_str_punct@Base 1.99.2
|
||||
tvb_bytes_to_wmem_str@Base 1.99.2
|
||||
tvb_captured_length@Base 1.12.0~rc1
|
||||
tvb_captured_length_remaining@Base 1.12.0~rc1
|
||||
tvb_child_uncompress@Base 1.12.0~rc1
|
||||
|
|
|
@ -120,7 +120,7 @@ tvb_aarphrdaddr_to_str(tvbuff_t *tvb, gint offset, int ad_len, guint16 type)
|
|||
of address). */
|
||||
return tvb_ether_to_str(tvb, offset);
|
||||
}
|
||||
return tvb_bytes_to_ep_str(tvb, offset, ad_len);
|
||||
return tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, ad_len);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
@ -130,7 +130,7 @@ tvb_aarpproaddr_to_str(tvbuff_t *tvb, gint offset, int ad_len, guint16 type)
|
|||
/* Appletalk address. */
|
||||
return tvb_atalkid_to_str(tvb, offset);
|
||||
}
|
||||
return tvb_bytes_to_ep_str(tvb, offset, ad_len);
|
||||
return tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, ad_len);
|
||||
}
|
||||
|
||||
/* Offsets of fields within an AARP packet. */
|
||||
|
|
|
@ -593,7 +593,7 @@ static const gchar* dissect_fields_dnsea(packet_info* pinfo _U_, tvbuff_t *tvb,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
msg_info->dest_nsap = tvb_bytes_to_ep_str(tvb,offset,20);
|
||||
msg_info->dest_nsap = tvb_bytes_to_str(wmem_packet_scope(), tvb,offset,20);
|
||||
|
||||
proto_tree_add_item(tree, hf_alcap_dnsea, tvb, offset, 20, ENC_NA);
|
||||
dissect_nsap(tvb, offset,20, tree);
|
||||
|
@ -613,7 +613,7 @@ static const gchar* dissect_fields_onsea(packet_info* pinfo _U_, tvbuff_t *tvb,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
msg_info->orig_nsap = tvb_bytes_to_ep_str(tvb,offset,20);
|
||||
msg_info->orig_nsap = tvb_bytes_to_str(wmem_packet_scope(), tvb,offset,20);
|
||||
|
||||
proto_tree_add_item(tree, hf_alcap_onsea, tvb, offset, 20, ENC_NA);
|
||||
dissect_nsap(tvb, offset,20, tree);
|
||||
|
|
|
@ -10546,7 +10546,7 @@ format_amqp_1_0_bin(tvbuff_t *tvb,
|
|||
return length;
|
||||
}
|
||||
AMQP_INCREMENT(offset, length, bound);
|
||||
*value = tvb_bytes_to_ep_str(tvb, offset, bin_length);
|
||||
*value = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, bin_length);
|
||||
return (length+bin_length);
|
||||
}
|
||||
|
||||
|
@ -10623,7 +10623,7 @@ format_amqp_0_10_bin(tvbuff_t *tvb,
|
|||
guint offset, guint bound _U_, guint length,
|
||||
const char **value)
|
||||
{
|
||||
*value = tvb_bytes_to_ep_str(tvb, offset, length);
|
||||
*value = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, length);
|
||||
return length;
|
||||
}
|
||||
|
||||
|
@ -10708,7 +10708,7 @@ format_amqp_0_10_vbin(tvbuff_t *tvb,
|
|||
return length;
|
||||
}
|
||||
AMQP_INCREMENT(offset, length, bound);
|
||||
*value = tvb_bytes_to_ep_str(tvb, offset, bin_length);
|
||||
*value = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, bin_length);
|
||||
AMQP_INCREMENT(offset, bin_length, bound);
|
||||
return (bin_length + length);
|
||||
}
|
||||
|
|
|
@ -622,9 +622,9 @@ if(next_tvb) {
|
|||
* in the 8 octets case.
|
||||
*/
|
||||
if (len > 4){
|
||||
ansi_tcap_private.TransactionID_str = tvb_bytes_to_ep_str(next_tvb, 4,len-4);
|
||||
ansi_tcap_private.TransactionID_str = tvb_bytes_to_str(wmem_packet_scope(), next_tvb, 4,len-4);
|
||||
}else{
|
||||
ansi_tcap_private.TransactionID_str = tvb_bytes_to_ep_str(next_tvb, 0,len);
|
||||
ansi_tcap_private.TransactionID_str = tvb_bytes_to_str(wmem_packet_scope(), next_tvb, 0,len);
|
||||
}
|
||||
}
|
||||
switch(len) {
|
||||
|
|
|
@ -373,7 +373,7 @@ tvb_arphrdaddr_to_str(tvbuff_t *tvb, gint offset, int ad_len, guint16 type)
|
|||
address). */
|
||||
return tvb_ether_to_str(tvb, offset);
|
||||
}
|
||||
return tvb_bytes_to_ep_str(tvb, offset, ad_len);
|
||||
return tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, ad_len);
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
|
|
|
@ -5897,7 +5897,7 @@ fOctetString(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset,
|
|||
offset += fTagHeader(tvb, pinfo, offset, &tag_no, &tag_info, &lvt);
|
||||
|
||||
if (lvt > 0) {
|
||||
tmp = tvb_bytes_to_ep_str(tvb, offset, lvt);
|
||||
tmp = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, lvt);
|
||||
subtree = proto_tree_add_subtree_format(tree, tvb, offset, lvt,
|
||||
ett_bacapp_tag, NULL, "%s %s", label, tmp);
|
||||
offset += lvt;
|
||||
|
@ -5933,7 +5933,7 @@ fMacAddress(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, c
|
|||
|
||||
} else { /* we have 1 Byte MS/TP Address or anything else interpreted as an address */
|
||||
subtree = proto_tree_add_subtree(tree, tvb, offset, lvt,
|
||||
ett_bacapp_tag, NULL, tvb_bytes_to_ep_str(tvb, offset, lvt));
|
||||
ett_bacapp_tag, NULL, tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, lvt));
|
||||
}
|
||||
}
|
||||
offset += lvt;
|
||||
|
|
|
@ -6149,7 +6149,7 @@ dissect_bgp_path_attr(proto_tree *subtree, tvbuff_t *tvb, guint16 path_attr_len,
|
|||
case TUNNEL_SUBTLV_ENCAPSULATION:
|
||||
if (encaps_tunnel_type == TUNNEL_TYPE_L2TP_OVER_IP) {
|
||||
proto_tree_add_text(subtree6, tvb, q + 2, 4, "Session ID: %u", tvb_get_letohl(tvb, q + 2));
|
||||
proto_tree_add_text(subtree6, tvb, q + 6, encaps_tunnel_sublen - 4, "Cookie: %s", tvb_bytes_to_ep_str(tvb, q + 6, encaps_tunnel_sublen - 4));
|
||||
proto_tree_add_text(subtree6, tvb, q + 6, encaps_tunnel_sublen - 4, "Cookie: %s", tvb_bytes_to_str(wmem_packet_scope(), tvb, q + 6, encaps_tunnel_sublen - 4));
|
||||
} else if (encaps_tunnel_type == TUNNEL_TYPE_GRE) {
|
||||
proto_tree_add_text(subtree6, tvb, q + 2, encaps_tunnel_sublen, "GRE key: %x", tvb_get_letohl(tvb, q + 2));
|
||||
}
|
||||
|
|
|
@ -1899,7 +1899,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, proto_item
|
|||
val_to_str_ext_const( enterprise, &sminmpec_values_ext, "Unknown"),
|
||||
enterprise);
|
||||
if (optlen > 6) {
|
||||
buf = tvb_bytes_to_ep_str(tvb, optoff + 6, optlen - 11);
|
||||
buf = tvb_bytes_to_str(wmem_packet_scope(), tvb, optoff + 6, optlen - 11);
|
||||
proto_tree_add_text(v_tree, tvb, optoff + 6,
|
||||
optlen - 11, "identifier: %s", buf);
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ dissect_bencoded_string(tvbuff_t *tvb, packet_info _U_*pinfo, proto_tree *tree,
|
|||
|
||||
/* fill the return data */
|
||||
if( tohex )
|
||||
*result = tvb_bytes_to_ep_str(tvb, offset, string_len );
|
||||
*result = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, string_len );
|
||||
else
|
||||
*result = tvb_get_string_enc( wmem_packet_scope(), tvb, offset, string_len , ENC_ASCII);
|
||||
|
||||
|
@ -318,7 +318,7 @@ dissect_bt_dht_nodes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
|
|||
node_tree = proto_item_add_subtree( node_ti, ett_bt_dht_peers);
|
||||
|
||||
proto_tree_add_item( node_tree, hf_bt_dht_id, tvb, offset, 20, ENC_NA);
|
||||
proto_item_append_text(node_ti, " (id: %s", tvb_bytes_to_ep_str(tvb, offset, 20));
|
||||
proto_item_append_text(node_ti, " (id: %s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 20));
|
||||
proto_tree_add_item( node_tree, hf_ip, tvb, offset+20, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(node_ti, ", IP/Port: %s", tvb_ip_to_str(tvb, offset+20));
|
||||
proto_tree_add_item( node_tree, hf_port, tvb, offset+24, 2, ENC_BIG_ENDIAN);
|
||||
|
|
|
@ -1439,14 +1439,12 @@ reassemble_continuation_state(tvbuff_t *tvb, packet_info *pinfo,
|
|||
} else {
|
||||
guint8 *continuation_state_buffer;
|
||||
guint8 continuation_state_length;
|
||||
guint8 *packet_scope_string;
|
||||
|
||||
continuation_state_length = tvb_get_guint8(tvb, offset);
|
||||
offset++;
|
||||
|
||||
continuation_state_buffer = (guint8 *) wmem_alloc(wmem_file_scope(), continuation_state_length);
|
||||
packet_scope_string = tvb_bytes_to_ep_str(tvb, offset, continuation_state_length);
|
||||
memcpy(continuation_state_buffer, packet_scope_string, continuation_state_length);
|
||||
continuation_state_buffer = tvb_bytes_to_str(wmem_file_scope(), tvb, offset, continuation_state_length);
|
||||
|
||||
if (!pinfo->fd->flags.visited) {
|
||||
if (is_request) {
|
||||
|
@ -2866,7 +2864,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
break;
|
||||
case 0x352:
|
||||
proto_tree_add_item(next_tree, hf_bpp_character_repertoires_support, tvb, offset, size, ENC_NA);
|
||||
new_str = tvb_bytes_to_ep_str(tvb, offset, size);
|
||||
new_str = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, size);
|
||||
wmem_strbuf_append(info_buf, new_str);
|
||||
break;
|
||||
case 0x354:
|
||||
|
|
|
@ -492,7 +492,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
|
|||
proto_tree_add_uint(tree, hf_c1222_auth_len, tvb, *offset, 1, auth_len);
|
||||
*offset += 1;
|
||||
if (*length >= auth_len) {
|
||||
auth_req = tvb_bytes_to_ep_str(tvb, *offset, auth_len);
|
||||
auth_req = tvb_bytes_to_str(wmem_packet_scope(), tvb, *offset, auth_len);
|
||||
proto_tree_add_item(tree, hf_c1222_auth_data, tvb, *offset, auth_len, ENC_NA);
|
||||
*offset += auth_len;
|
||||
*length -= auth_len + 1;
|
||||
|
|
|
@ -1138,7 +1138,7 @@ dissect_address_tlv(tvbuff_t *tvb, int offset, int length, proto_tree *tree)
|
|||
if (hf_addr == -1)
|
||||
{
|
||||
proto_tree_add_item(address_tree, hf_cdp_address, tvb, offset, address_length, ENC_NA);
|
||||
proto_item_set_text(ti, "Address: %s", tvb_bytes_to_ep_str(tvb, offset, address_length));
|
||||
proto_item_set_text(ti, "Address: %s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, address_length));
|
||||
}
|
||||
|
||||
return 2 + protocol_length + 2 + address_length;
|
||||
|
|
|
@ -1810,7 +1810,7 @@ guint c_dissect_blob(proto_tree *root, int hf, int hf_data, int hf_len,
|
|||
if (size)
|
||||
{
|
||||
proto_item_append_text(ti, ", Data: %s",
|
||||
tvb_bytes_to_ep_str(tvb, off+4, size));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, off+4, size));
|
||||
}
|
||||
|
||||
proto_tree_add_item(tree, hf_len,
|
||||
|
|
|
@ -1163,7 +1163,7 @@ static void dissect_nt_chal_resp_cb(packet_info *pinfo _U_, proto_tree *tree,
|
|||
start_offset += 12;
|
||||
len = end_offset - start_offset;
|
||||
|
||||
s = tvb_bytes_to_ep_str(tvb, start_offset, len);
|
||||
s = tvb_bytes_to_str(wmem_packet_scope(), tvb, start_offset, len);
|
||||
|
||||
/* Append string to upper-level proto_items */
|
||||
|
||||
|
|
|
@ -297,8 +297,7 @@ static void cb_byte_array_postprocess(packet_info *pinfo, proto_tree *tree _U_,
|
|||
if ((end_offset - start_offset) <= 12)
|
||||
return;
|
||||
|
||||
s = tvb_bytes_to_ep_str(
|
||||
tvb, start_offset + 12, (end_offset - start_offset - 12) );
|
||||
s = tvb_bytes_to_str(wmem_packet_scope(), tvb, start_offset + 12, (end_offset - start_offset - 12) );
|
||||
|
||||
/* Append string to COL_INFO */
|
||||
|
||||
|
|
|
@ -1477,9 +1477,9 @@ dissect_afield(gboolean dect_packet_type, guint8 *ba,
|
|||
proto_tree_add_string(ColumnsTree, hf_dect_cc_TA, tvb, offset, 1, "[Ct]");
|
||||
|
||||
if(ta==DECT_TA_CT0)
|
||||
wmem_strbuf_append_printf(afield_str,"C-Channel Next Data: %s",tvb_bytes_to_ep_str(tvb, offset, 5));
|
||||
wmem_strbuf_append_printf(afield_str,"C-Channel Next Data: %s",tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 5));
|
||||
else
|
||||
wmem_strbuf_append_printf(afield_str,"C-Channel First Data: %s",tvb_bytes_to_ep_str(tvb, offset, 5));
|
||||
wmem_strbuf_append_printf(afield_str,"C-Channel First Data: %s",tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 5));
|
||||
|
||||
proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, wmem_strbuf_get_str(afield_str));
|
||||
}
|
||||
|
@ -1488,7 +1488,7 @@ dissect_afield(gboolean dect_packet_type, guint8 *ba,
|
|||
/* ETSI EN 300 175-3 V2.3.0 7.2.2 */
|
||||
proto_tree_add_string(ColumnsTree, hf_dect_cc_TA, tvb, offset, 1, "[Nt]");
|
||||
|
||||
wmem_strbuf_append_printf(afield_str,"RFPI: %s",tvb_bytes_to_ep_str(tvb, offset, 5));
|
||||
wmem_strbuf_append_printf(afield_str,"RFPI: %s",tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 5));
|
||||
proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, wmem_strbuf_get_str(afield_str));
|
||||
|
||||
proto_tree_add_item(atailti, hf_dect_A_Tail_Nt, tvb, offset, 5, ENC_NA);
|
||||
|
@ -1658,7 +1658,7 @@ dissect_afield(gboolean dect_packet_type, guint8 *ba,
|
|||
proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_6_Spare, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
offset+=2;
|
||||
|
||||
wmem_strbuf_append_printf(afield_str,"Multi-Frame No.: %s",tvb_bytes_to_ep_str(tvb, offset, 3));
|
||||
wmem_strbuf_append_printf(afield_str,"Multi-Frame No.: %s",tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 3));
|
||||
proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, wmem_strbuf_get_str(afield_str));
|
||||
|
||||
proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_6_Mfn, tvb, offset, 3, ENC_NA);
|
||||
|
@ -1669,7 +1669,7 @@ dissect_afield(gboolean dect_packet_type, guint8 *ba,
|
|||
break;
|
||||
case 7: /* Escape */
|
||||
/* ETSI EN 300 175-3 V2.3.0 7.2.3.8 */
|
||||
wmem_strbuf_append_printf(afield_str,"Escape Data: %s",tvb_bytes_to_ep_str(tvb, offset, 5));
|
||||
wmem_strbuf_append_printf(afield_str,"Escape Data: %s",tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 5));
|
||||
proto_tree_add_string(ColumnsTree, hf_dect_cc_AField, tvb, offset, 1, wmem_strbuf_get_str(afield_str));
|
||||
break;
|
||||
case 8: /* Obsolete */
|
||||
|
|
|
@ -1103,7 +1103,7 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, proto_item *v_item, packet_i
|
|||
}
|
||||
else {
|
||||
proto_item_append_text(ti, "%s",
|
||||
tvb_bytes_to_ep_str(tvb, sub_off, field_len));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, sub_off, field_len));
|
||||
}
|
||||
break;
|
||||
case CL_OPTION_TLV5:
|
||||
|
@ -1211,13 +1211,13 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, proto_item *v_item, packet_i
|
|||
else {
|
||||
/*proto_item_append_text(ti, "CM MAC Address Option = %s", */
|
||||
proto_item_append_text(ti, "%s", tvb_bytes_to_str_punct(wmem_packet_scope(), tvb, sub_off, opt_len, ':'));
|
||||
/* tvb_bytes_to_ep_str(tvb, sub_off, opt_len)); */
|
||||
/* tvb_bytes_to_str(wmem_packet_scope(), tvb, sub_off, opt_len)); */
|
||||
}
|
||||
break;
|
||||
case CL_EROUTER_CONTAINER_OPTION:
|
||||
opt_len = tlv_len;
|
||||
proto_item_append_text(ti, " %s (len=%d)",
|
||||
tvb_bytes_to_ep_str(tvb, sub_off, opt_len), tlv_len);
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, sub_off, opt_len), tlv_len);
|
||||
break;
|
||||
case CL_OPTION_CCC:
|
||||
opt_len = tlv_len;
|
||||
|
@ -1315,7 +1315,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree,
|
|||
|
||||
switch (opttype) {
|
||||
case OPTION_CLIENTID:
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "CID: %s ", tvb_bytes_to_ep_str(tvb, off, optlen));
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "CID: %s ", tvb_bytes_to_str(wmem_packet_scope(), tvb, off, optlen));
|
||||
/* Fall through */
|
||||
case OPTION_SERVERID:
|
||||
case OPTION_RELAYID:
|
||||
|
|
|
@ -2681,7 +2681,7 @@ static gint dissect_mts_identifier (tvbuff_t *tvb, packet_info *pinfo _U_, proto
|
|||
} else if (dmp_nat_decode == NAT_DECODE_THALES) {
|
||||
mts_id = dissect_thales_mts_id (tvb, offset, dmp.mts_id_length);
|
||||
} else {
|
||||
mts_id = tvb_bytes_to_ep_str (tvb, offset, dmp.mts_id_length);
|
||||
mts_id = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, dmp.mts_id_length);
|
||||
}
|
||||
proto_item_append_text (dmp.mts_id_item, " (%zu bytes decompressed)", strlen (mts_id));
|
||||
mts_id = format_text (mts_id, strlen (mts_id));
|
||||
|
@ -2732,7 +2732,7 @@ static gint dissect_ipm_identifier (tvbuff_t *tvb, packet_info *pinfo _U_, proto
|
|||
} else if (dmp_nat_decode == NAT_DECODE_THALES) {
|
||||
ipm_id = dissect_thales_ipm_id (tvb, offset, ipm_id_length, modifier);
|
||||
} else {
|
||||
ipm_id = tvb_bytes_to_ep_str (tvb, offset, ipm_id_length);
|
||||
ipm_id = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, ipm_id_length);
|
||||
}
|
||||
proto_item_append_text (tf, " (%zu bytes decompressed)", strlen (ipm_id));
|
||||
ipm_id = format_text (ipm_id, strlen (ipm_id));
|
||||
|
|
|
@ -1067,7 +1067,7 @@ static int dissect_kademlia_tag_bsob(tvbuff_t *tvb, packet_info *pinfo _U_,
|
|||
guint16 bsob_length;
|
||||
|
||||
bsob_length = tvb_get_guint8(tvb, offset);
|
||||
*string_value = tvb_bytes_to_ep_str( tvb, offset + 1, bsob_length );
|
||||
*string_value = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset + 1, bsob_length );
|
||||
|
||||
proto_tree_add_item(tree, hf_kademlia_tag_bsob, tvb, offset + 1, bsob_length, ENC_NA);
|
||||
return offset + 1 + bsob_length;
|
||||
|
@ -2366,7 +2366,7 @@ static int dissect_kademlia_tag(tvbuff_t *tvb, packet_info *pinfo _U_,
|
|||
switch( type )
|
||||
{
|
||||
case KADEMLIA_TAGTYPE_HASH:
|
||||
proto_item_append_text( tag_node, "%s", tvb_bytes_to_ep_str( tvb, offset, 16 ));
|
||||
proto_item_append_text( tag_node, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 16 ));
|
||||
offset = dissect_kademlia_tag_hash( tvb, pinfo, offset, subtree );
|
||||
break;
|
||||
case KADEMLIA_TAGTYPE_STRING:
|
||||
|
|
|
@ -1001,7 +1001,7 @@ dissect_cat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
|
|||
ti = proto_tree_add_bytes_format(cat_tree, hf_cat_tlv, tvb, pos,
|
||||
len, ptr, "%s: %s",
|
||||
val_to_str_ext(tag, &comp_tlv_tag_vals_ext, "%02x"),
|
||||
(const guint8 *)tvb_bytes_to_ep_str(tvb, pos, len));
|
||||
(const guint8 *)tvb_bytes_to_str(wmem_packet_scope(), tvb, pos, len));
|
||||
#else
|
||||
ti = proto_tree_add_bytes_format(cat_tree, hf_cat_tlv, tvb, pos,
|
||||
len, ptr, "%s: ",
|
||||
|
|
|
@ -5454,7 +5454,7 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of
|
|||
switch (param) {
|
||||
case 0x01:
|
||||
proto_tree_add_text(tf_tree, tvb, curr_offset, pf_length, "Authorization token value: 0x%s",
|
||||
tvb_bytes_to_ep_str(tvb, curr_offset, pf_length));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, curr_offset, pf_length));
|
||||
break;
|
||||
|
||||
case 0x02:
|
||||
|
@ -5474,7 +5474,7 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of
|
|||
|
||||
default:
|
||||
proto_tree_add_text(tf_tree, tvb, curr_offset, pf_length, "Parameter content: 0x%s",
|
||||
tvb_bytes_to_ep_str(tvb, curr_offset, pf_length));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, curr_offset, pf_length));
|
||||
break;
|
||||
}
|
||||
curr_offset += pf_length;
|
||||
|
|
|
@ -585,7 +585,7 @@ dissect_om2k_attr_unkn(tvbuff_t *tvb, gint offset, gint len, gint iei, proto_tre
|
|||
offset, len, NULL,
|
||||
"%s: %s",
|
||||
val_to_str_ext(iei, &om2k_attr_vals_ext, "0x%02x"),
|
||||
tvb_bytes_to_ep_str(tvb, offset, len));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, len));
|
||||
return len;
|
||||
}
|
||||
|
||||
|
|
|
@ -1190,7 +1190,7 @@ dissect_gsm_apdu(guint8 ins, guint8 p1, guint8 p2, guint8 p3, tvbuff_t *tvb,
|
|||
break;
|
||||
case 0x04: /* select by AID */
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "Application %s ",
|
||||
tvb_bytes_to_ep_str(tvb, offset+DATA_OFFS, p3));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset+DATA_OFFS, p3));
|
||||
proto_tree_add_item(tree, hf_aid, tvb, offset+DATA_OFFS, p3, ENC_NA);
|
||||
break;
|
||||
|
||||
|
|
|
@ -5773,7 +5773,7 @@ gchar *dissect_radius_user_loc(proto_tree * tree, tvbuff_t * tvb, packet_info* p
|
|||
break;
|
||||
}
|
||||
|
||||
return tvb_bytes_to_ep_str(tvb, 0, length);
|
||||
return tvb_bytes_to_str(wmem_packet_scope(), tvb, 0, length);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -2392,7 +2392,7 @@ dissect_gtpv2_f_teid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, pr
|
|||
proto_tree_add_item(tree, hf_gtpv2_f_teid_gre_key, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(item, "%s, TEID/GRE Key: 0x%s",
|
||||
val_to_str_ext_const((flags & 0x3f), >pv2_f_teid_interface_type_vals_ext, "Unknown"),
|
||||
tvb_bytes_to_ep_str(tvb, offset, 4));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 4));
|
||||
|
||||
offset += 4;
|
||||
if (flags & 0x80)
|
||||
|
@ -3859,7 +3859,7 @@ dissect_gtpv2_p_tmsi(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, pr
|
|||
|
||||
/* The TMSI consists of 4 octets. It can be coded using a full hexadecimal representation. */
|
||||
proto_tree_add_item(tree, hf_gtpv2_p_tmsi, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(item, "%s", tvb_bytes_to_ep_str(tvb, offset, 4));
|
||||
proto_item_append_text(item, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 4));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3872,7 +3872,7 @@ dissect_gtpv2_p_tmsi_sig(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
|
|||
|
||||
/* The P-TMSI Signature consists of 3 octets and may be allocated by the SGSN. */
|
||||
proto_tree_add_item(tree, hf_gtpv2_p_tmsi_sig, tvb, offset, 3, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(item, "%s", tvb_bytes_to_ep_str(tvb, offset, 3));
|
||||
proto_item_append_text(item, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 3));
|
||||
|
||||
}
|
||||
|
||||
|
@ -4817,7 +4817,7 @@ dissect_gtpv2_mbms_flow_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
|
|||
int offset = 0;
|
||||
/* Two octets OctetString. */
|
||||
proto_tree_add_item(tree, hf_gtpv2_mbms_flow_id, tvb, offset, 2, ENC_NA);
|
||||
proto_item_append_text(item, " %s", tvb_bytes_to_ep_str(tvb, offset, 2));
|
||||
proto_item_append_text(item, " %s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 2));
|
||||
|
||||
offset += 2;
|
||||
if (length > 2)
|
||||
|
|
|
@ -5368,7 +5368,7 @@ dissect_h248_ValueV1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U
|
|||
/* not ascii or NULL character so do string as hex string */
|
||||
proto_tree_add_text(tree, tvb, offset, len,"%s: 0x%s",
|
||||
(proto_registrar_get_nth(hf_index))->name,
|
||||
tvb_bytes_to_ep_str(tvb, 0, len));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, 0, len));
|
||||
return len;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -765,7 +765,7 @@ static void dissect_h248_annexc_BIR(proto_tree* tree,
|
|||
dissect_ber_octet_string(implicit_p ? *((gboolean*)implicit_p) : FALSE, &asn1_ctx, tree, tvb, 0, hfid, &new_tvb);
|
||||
|
||||
if ( new_tvb && h248_info->term && ! h248_info->term->bir ) {
|
||||
h248_info->term->bir = wmem_strdup(wmem_file_scope(), tvb_bytes_to_ep_str(new_tvb,0,tvb_reported_length(new_tvb)));
|
||||
h248_info->term->bir = tvb_bytes_to_str(wmem_file_scope(), new_tvb,0,tvb_reported_length(new_tvb));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -783,7 +783,7 @@ static void dissect_h248_annexc_NSAP(proto_tree* tree,
|
|||
if (new_tvb) {
|
||||
dissect_nsap(new_tvb, 0,tvb_reported_length(new_tvb), tree);
|
||||
if ( h248_info->term && ! h248_info->term->nsap) {
|
||||
h248_info->term->nsap = wmem_strdup(wmem_file_scope(), tvb_bytes_to_ep_str(new_tvb,0,tvb_reported_length(new_tvb)));
|
||||
h248_info->term->nsap = tvb_bytes_to_str(wmem_file_scope(), new_tvb,0,tvb_reported_length(new_tvb));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10435,7 +10435,7 @@ dissect_vendor_ie_aruba(proto_item *item, proto_tree *ietree,
|
|||
default:
|
||||
proto_tree_add_item(ietree, hf_ieee80211_vs_aruba_data, tvb, offset,
|
||||
tag_len, ENC_NA);
|
||||
proto_item_append_text(item, " (Data: %s)", tvb_bytes_to_ep_str(tvb, offset, tag_len));
|
||||
proto_item_append_text(item, " (Data: %s)", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, tag_len));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -612,7 +612,7 @@ add_octetstring_tree(proto_tree *tree, tvbuff_t *tvb, int offset,
|
|||
1 + 2 + name_length + 2 + value_length,
|
||||
ett_ipp_attr, NULL, "%s: %s",
|
||||
tvb_format_text(tvb, offset + 1 + 2, name_length),
|
||||
tvb_bytes_to_ep_str(tvb, offset + 1 + 2 + name_length + 2, value_length));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset + 1 + 2 + name_length + 2, value_length));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -1004,7 +1004,7 @@ dissect_serialization(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "Serial number %s",
|
||||
tvb_bytes_to_ep_str(tvb, 0, 6));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, 0, 6));
|
||||
|
||||
proto_tree_add_item(ser_tree, hf_serial_number, tvb, 0, 6, ENC_NA);
|
||||
}
|
||||
|
|
|
@ -3019,7 +3019,7 @@ dissect_sa(tvbuff_t *tvb, int offset, int length, proto_tree *tree, int isakmp_v
|
|||
proto_tree_add_bytes_format_value(tree, hf_isakmp_sa_situation, tvb, offset, length,
|
||||
NULL,
|
||||
"%s (length is %u, should be >= 4)",
|
||||
tvb_bytes_to_ep_str(tvb, offset, length), length);
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, length), length);
|
||||
return;
|
||||
}
|
||||
sti = proto_tree_add_item(tree, hf_isakmp_sa_situation, tvb, offset, 4, ENC_NA);
|
||||
|
@ -3763,7 +3763,7 @@ dissect_id(tvbuff_t *tvb, int offset, int length, proto_tree *tree, int isakmp_v
|
|||
dissect_x509if_Name(FALSE, tvb, offset, &asn1_ctx, tree, hf_isakmp_id_data_cert);
|
||||
break;
|
||||
default:
|
||||
proto_item_append_text(idit, "%s", tvb_bytes_to_ep_str(tvb,offset,length));
|
||||
proto_item_append_text(idit, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb,offset,length));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ isis_dissect_authentication_clv(proto_tree *tree, packet_info* pinfo, tvbuff_t *
|
|||
case 54:
|
||||
if ( length == 16 ) {
|
||||
proto_tree_add_bytes_format( tree, hf_auth_bytes, tvb, offset, length,
|
||||
NULL, "hmac-md5 (54), password (length %d) = %s", length, tvb_bytes_to_ep_str(tvb, offset, length));
|
||||
NULL, "hmac-md5 (54), password (length %d) = %s", length, tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, length));
|
||||
} else {
|
||||
proto_tree_add_bytes_format( tree, hf_auth_bytes, tvb, offset, length,
|
||||
NULL, "hmac-md5 (54), illegal hmac-md5 digest format (must be 16 bytes)");
|
||||
|
|
|
@ -1198,7 +1198,7 @@ dissect_lldp_chassis_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
|
|||
|
||||
break;
|
||||
default:
|
||||
strPtr = tvb_bytes_to_ep_str(tvb, offset, (dataLen-2));
|
||||
strPtr = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, (dataLen-2));
|
||||
proto_tree_add_item(chassis_tree, hf_chassis_id, tvb, offset, (dataLen-2), ENC_NA);
|
||||
|
||||
break;
|
||||
|
@ -1231,7 +1231,7 @@ dissect_lldp_chassis_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
|
|||
break;
|
||||
case 1: /* Chassis component */
|
||||
case 3: /* Port component */
|
||||
strPtr = tvb_bytes_to_ep_str(tvb, offset, (dataLen-1));
|
||||
strPtr = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, (dataLen-1));
|
||||
|
||||
break;
|
||||
default:
|
||||
|
@ -1350,7 +1350,7 @@ dissect_lldp_port_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint3
|
|||
|
||||
break;
|
||||
default:
|
||||
strPtr = tvb_bytes_to_ep_str(tvb, offset, (dataLen-2));
|
||||
strPtr = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, (dataLen-2));
|
||||
proto_tree_add_item(port_tree, hf_port_id, tvb, offset, (dataLen-2), ENC_ASCII|ENC_NA);
|
||||
|
||||
break;
|
||||
|
@ -1374,7 +1374,7 @@ dissect_lldp_port_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint3
|
|||
switch (tlvsubType)
|
||||
{
|
||||
case 2: /* Port component */
|
||||
strPtr = tvb_bytes_to_ep_str(tvb, offset, (dataLen-1));
|
||||
strPtr = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, (dataLen-1));
|
||||
break;
|
||||
case 1: /* Interface alias */
|
||||
case 5: /* Interface name */
|
||||
|
|
|
@ -801,7 +801,7 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto
|
|||
proto_tree_add_item(tlv_fec_tree, hf_mpls_echo_tlv_fec_rsvp_p2mp_ip_tunnel_id,
|
||||
tvb, offset + 22, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_text(tlv_fec_tree, tvb, offset + 24, 16, "Extended Tunnel ID: 0x%s (%s)",
|
||||
tvb_bytes_to_ep_str(tvb, offset + 24, 16),
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset + 24, 16),
|
||||
tvb_ip6_to_str(tvb, offset + 24));
|
||||
hidden_item = proto_tree_add_item(tlv_fec_tree, hf_mpls_echo_tlv_fec_rsvp_p2mp_ipv6_ext_tunnel_id,
|
||||
tvb, offset + 24, 16, ENC_NA);
|
||||
|
|
|
@ -1607,7 +1607,7 @@ dissect_fhandle_data_LINUX_NFSD_LE(tvbuff_t* tvb, packet_info *pinfo _U_, proto_
|
|||
hash_item = proto_tree_add_text(tree, tvb, offset+4,
|
||||
hashlen + 1,
|
||||
"hash path: %s",
|
||||
tvb_bytes_to_ep_str(tvb, offset+5, hashlen));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset+5, hashlen));
|
||||
hash_tree = proto_item_add_subtree(hash_item,
|
||||
ett_nfs_fh_hp);
|
||||
proto_tree_add_uint(hash_tree,
|
||||
|
@ -1616,7 +1616,7 @@ dissect_fhandle_data_LINUX_NFSD_LE(tvbuff_t* tvb, packet_info *pinfo _U_, proto_
|
|||
proto_tree_add_text(hash_tree, tvb, offset+5,
|
||||
hashlen,
|
||||
"key: %s",
|
||||
tvb_bytes_to_ep_str(tvb, offset+5, hashlen));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset+5, hashlen));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -895,7 +895,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_ep_str(tvb, offset + 4, len - 4));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset + 4, len - 4));
|
||||
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)
|
||||
|
@ -921,7 +921,7 @@ static void dissect_nhrp_ext(tvbuff_t *tvb,
|
|||
tvb_memcpy(tvb, manuf, offset, 3);
|
||||
vendor_tree = proto_tree_add_subtree_format(nhrp_tree, tvb, offset, len,
|
||||
ett_nhrp_vendor_ext, NULL, "Extension Data: Vendor ID=%s, Data=%s", get_manuf_name(manuf),
|
||||
tvb_bytes_to_ep_str(tvb, offset + 3, len - 3));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset + 3, len - 3));
|
||||
proto_tree_add_bytes_format_value(vendor_tree, hf_nhrp_vendor_ext_id, tvb,
|
||||
offset, 3, manuf, "%s", get_manuf_name(manuf));
|
||||
if (len > 3) {
|
||||
|
|
|
@ -1126,7 +1126,7 @@ static void decode_evt(proto_tree *tree,
|
|||
length, key_name,
|
||||
"%s (UTF-8 Value: %s, Unicode Value: 0x%" G_GINT64_MODIFIER "x)",
|
||||
key_name,
|
||||
tvb_bytes_to_ep_str(tvb, offset, length),
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, length),
|
||||
unicode_value);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -2159,7 +2159,7 @@ dissect_ospf_lsa_mpls(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree
|
|||
case OIF_TNA_NSAP_ADDRESS:
|
||||
stlv_tree = proto_tree_add_subtree_format(tlv_tree, tvb, stlv_offset, stlv_len+4,
|
||||
ett_ospf_lsa_oif_tna_stlv, NULL, "%s (NSAP): %s", stlv_name,
|
||||
tvb_bytes_to_ep_str (tvb, stlv_offset + 8, stlv_len - 4));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, stlv_offset + 8, stlv_len - 4));
|
||||
proto_tree_add_uint_format_value(stlv_tree, hf_ospf_tlv_type, tvb, stlv_offset, 2,
|
||||
stlv_type, "%u: %s (NSAP)", stlv_type, stlv_name);
|
||||
proto_tree_add_item(stlv_tree, hf_ospf_tlv_length, tvb, stlv_offset+2, 2, ENC_BIG_ENDIAN);
|
||||
|
|
|
@ -838,7 +838,7 @@ dissect_pgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
pgmhdr_opts = tvb_get_guint8(tvb, 5);
|
||||
pgmhdr_cksum = tvb_get_ntohs(tvb, 6);
|
||||
gsi = tvb_bytes_to_ep_str(tvb, 8, 6);
|
||||
gsi = tvb_bytes_to_str(wmem_packet_scope(), tvb, 8, 6);
|
||||
pgmhdr_tsdulen = tvb_get_ntohs(tvb, 14);
|
||||
sqn = tvb_get_ntohl(tvb, 16);
|
||||
|
||||
|
|
|
@ -3829,7 +3829,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_ep_str(tvb, offset, length));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, length));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -5294,7 +5294,7 @@ dissect_chap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
tvb_format_text(tvb, name_offset,
|
||||
(name_size > 20) ? 20 : name_size),
|
||||
(name_size > 20) ? "..." : "",
|
||||
tvb_bytes_to_ep_str(tvb, value_offset, value_size));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, value_offset, value_size));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -898,7 +898,7 @@ void dissect_ptpIP_guid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui
|
|||
{
|
||||
guint8 *guid;
|
||||
|
||||
guid = tvb_bytes_to_ep_str(tvb, *offset, PTPIP_GUID_SIZE);
|
||||
guid = tvb_bytes_to_str(wmem_packet_scope(), 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(
|
||||
|
|
|
@ -1003,7 +1003,7 @@ dissect_fhandle_data_unknown(tvbuff_t *tvb, int offset, proto_tree *tree)
|
|||
"%s%s",
|
||||
first_line ? "data: " :
|
||||
" ",
|
||||
tvb_bytes_to_ep_str(tvb,offset,sublen));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb,offset,sublen));
|
||||
bytes_left -= sublen;
|
||||
offset += sublen;
|
||||
first_line = FALSE;
|
||||
|
|
|
@ -1386,7 +1386,7 @@ dissect_q2931_number_ie(tvbuff_t *tvb, packet_info* pinfo, int offset, int len,
|
|||
if (len < 20) {
|
||||
proto_tree_add_text(tree, tvb, offset, len,
|
||||
"Number (too short): %s",
|
||||
tvb_bytes_to_ep_str(tvb, offset, len));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, len));
|
||||
return;
|
||||
}
|
||||
nsap_tree = proto_tree_add_subtree(tree, tvb, offset, len, ett_q2931_nsap, NULL, "Number");
|
||||
|
|
|
@ -341,7 +341,7 @@ static const gchar *dissect_chap_password(proto_tree* tree, tvbuff_t* tvb, packe
|
|||
chap_tree = proto_item_add_subtree(ti, ett_chap);
|
||||
proto_tree_add_item(chap_tree, hf_radius_chap_ident, tvb, 0, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(chap_tree, hf_radius_chap_string, tvb, 1, 16, ENC_NA);
|
||||
return (tvb_bytes_to_ep_str(tvb, 0, len));
|
||||
return (tvb_bytes_to_str(wmem_packet_scope(), tvb, 0, len));
|
||||
}
|
||||
|
||||
static const gchar *dissect_framed_ip_address(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo _U_) {
|
||||
|
@ -704,7 +704,7 @@ void radius_string(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _
|
|||
|
||||
void radius_octets(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_, tvbuff_t* tvb, int offset, int len, proto_item* avp_item) {
|
||||
proto_tree_add_item(tree, a->hf, tvb, offset, len, ENC_NA);
|
||||
proto_item_append_text(avp_item, "%s", tvb_bytes_to_ep_str(tvb, offset, len));
|
||||
proto_item_append_text(avp_item, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, len));
|
||||
}
|
||||
|
||||
void radius_ipaddr(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_, tvbuff_t* tvb, int offset, int len, proto_item* avp_item) {
|
||||
|
@ -831,7 +831,7 @@ void radius_date(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_
|
|||
*/
|
||||
void radius_abinary(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_, tvbuff_t* tvb, int offset, int len, proto_item* avp_item) {
|
||||
proto_tree_add_item(tree, a->hf, tvb, offset, len, ENC_NA);
|
||||
proto_item_append_text(avp_item, "%s", tvb_bytes_to_ep_str(tvb, offset, len));
|
||||
proto_item_append_text(avp_item, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, len));
|
||||
}
|
||||
|
||||
void radius_ether(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_, tvbuff_t* tvb, int offset, int len, proto_item* avp_item) {
|
||||
|
@ -846,7 +846,7 @@ void radius_ether(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U
|
|||
|
||||
void radius_ifid(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_, tvbuff_t* tvb, int offset, int len, proto_item* avp_item) {
|
||||
proto_tree_add_item(tree, a->hf, tvb, offset, len, ENC_NA);
|
||||
proto_item_append_text(avp_item, "%s", tvb_bytes_to_ep_str(tvb, offset, len));
|
||||
proto_item_append_text(avp_item, "%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, len));
|
||||
}
|
||||
|
||||
static void add_tlv_to_tree(proto_tree* tlv_tree, proto_item* tlv_item, packet_info* pinfo, tvbuff_t* tvb, radius_attr_info_t* dictionary_entry, guint32 tlv_length, guint32 offset) {
|
||||
|
|
|
@ -455,7 +455,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_ep_str(tvb, offset, toi_size));
|
||||
col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "TOI: 0x%s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, toi_size));
|
||||
offset += toi_size;
|
||||
}
|
||||
|
||||
|
|
|
@ -5866,7 +5866,7 @@ dissect_rsvp_call_id(proto_tree *ti, proto_tree *rsvp_object_tree,
|
|||
|
||||
case 0x7F:
|
||||
offset4 = offset3 + len;
|
||||
str = tvb_bytes_to_ep_str(tvb, offset3, len);
|
||||
str = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset3, len);
|
||||
proto_tree_add_item(rsvp_object_tree, hf_rsvp_callid_srcaddr_bytes, tvb, offset3, len, ENC_NA);
|
||||
break;
|
||||
|
||||
|
@ -5880,7 +5880,7 @@ dissect_rsvp_call_id(proto_tree *ti, proto_tree *rsvp_object_tree,
|
|||
|
||||
proto_item_append_text(ti, "Src: %s. ", str);
|
||||
proto_tree_add_item(rsvp_object_tree, hf_rsvp_call_id_local_identifier, tvb, offset4, 8, ENC_NA);
|
||||
proto_item_append_text(ti, "Local ID: %s. ", tvb_bytes_to_ep_str(tvb, offset4, 8));
|
||||
proto_item_append_text(ti, "Local ID: %s. ", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset4, 8));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -1318,7 +1318,7 @@ dissect_simulcrypt_data(proto_tree *simulcrypt_tree, proto_item *simulcrypt_item
|
|||
/* Parameter Length 2 Bytes */
|
||||
plen = tvb_get_ntohs(tvb, offset+2); /* read 2 byte length value */
|
||||
/* Parameter Value plen Bytes */
|
||||
pvalue_char = tvb_bytes_to_ep_str(tvb, offset+4, plen);
|
||||
pvalue_char = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset+4, plen);
|
||||
|
||||
simulcrypt_item = proto_tree_add_item(simulcrypt_tree, hf_simulcrypt_parameter, tvb, offset, plen+2+2, ENC_NA );
|
||||
|
||||
|
|
|
@ -621,7 +621,7 @@ add_logon_hours(tvbuff_t *tvb, int offset, int count, packet_info *pinfo _U_,
|
|||
proto_tree_add_bytes_format_value(tree, hf_index, tvb,
|
||||
cptr, count, NULL,
|
||||
"%s (wrong length, should be 21, is %d",
|
||||
tvb_bytes_to_ep_str(tvb, cptr, count), count);
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, cptr, count), count);
|
||||
}
|
||||
} else {
|
||||
proto_tree_add_bytes_format_value(tree, hf_index, tvb, 0, 0,
|
||||
|
@ -1702,7 +1702,7 @@ dissect_request_parameters(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
"%s: Value is %s, type is wrong (b)",
|
||||
proto_registrar_get_name((*items->hf_index == -1) ?
|
||||
hf_smb_pipe_bytes_param : *items->hf_index),
|
||||
tvb_bytes_to_ep_str(tvb, offset, count));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, count));
|
||||
offset += count;
|
||||
items++;
|
||||
} else {
|
||||
|
@ -1855,7 +1855,7 @@ dissect_response_parameters(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
"%s: Value is %s, type is wrong (g)",
|
||||
proto_registrar_get_name((*items->hf_index == -1) ?
|
||||
hf_smb_pipe_bytes_param : *items->hf_index),
|
||||
tvb_bytes_to_ep_str(tvb, offset, count));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, count));
|
||||
offset += count;
|
||||
items++;
|
||||
} else {
|
||||
|
@ -2052,7 +2052,7 @@ dissect_transact_data(tvbuff_t *tvb, int offset, int convert,
|
|||
"%s: Value is %s, type is wrong (B)",
|
||||
proto_registrar_get_name((*items->hf_index == -1) ?
|
||||
hf_smb_pipe_bytes_param : *items->hf_index),
|
||||
tvb_bytes_to_ep_str(tvb, offset, count));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, count));
|
||||
offset += count;
|
||||
items++;
|
||||
} else {
|
||||
|
@ -2144,7 +2144,7 @@ dissect_transact_data(tvbuff_t *tvb, int offset, int convert,
|
|||
"%s: Value is %s, type is wrong (b)",
|
||||
proto_registrar_get_name((*items->hf_index == -1) ?
|
||||
hf_smb_pipe_bytes_param : *items->hf_index),
|
||||
tvb_bytes_to_ep_str(tvb, cptr, count));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, cptr, count));
|
||||
items++;
|
||||
} else {
|
||||
offset = (*items->func)(tvb, offset, count,
|
||||
|
|
|
@ -1778,7 +1778,7 @@ smpp_handle_tlv(proto_tree *tree, tvbuff_t *tvb, int *offset)
|
|||
*offset, length, ENC_NA);
|
||||
}
|
||||
|
||||
proto_item_append_text(sub_tree,": %s", tvb_bytes_to_ep_str(tvb,*offset,length));
|
||||
proto_item_append_text(sub_tree,": %s", tvb_bytes_to_str(wmem_packet_scope(), tvb,*offset,length));
|
||||
(*offset) += length;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -684,11 +684,11 @@ dissect_t38_T_field_data(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_
|
|||
if (primary_part){
|
||||
if(value_len < 8){
|
||||
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "[%s]",
|
||||
tvb_bytes_to_ep_str(value_tvb,0,value_len));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), value_tvb,0,value_len));
|
||||
}
|
||||
else {
|
||||
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "[%s...]",
|
||||
tvb_bytes_to_ep_str(value_tvb,0,7));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), value_tvb,0,7));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1622,7 +1622,7 @@ dissect_ubertooth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
|
|||
break;
|
||||
case 51: /* Set AFH Map */
|
||||
proto_tree_add_item(main_tree, hf_afh_map, tvb, offset, 10, ENC_NA);
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " - %s", tvb_bytes_to_ep_str(tvb, offset, 10));
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " - %s", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, 10));
|
||||
|
||||
offset += 10;
|
||||
break;
|
||||
|
|
|
@ -2138,7 +2138,7 @@ dissect_usb_setup_get_descriptor_response(packet_info *pinfo, proto_tree *tree,
|
|||
proto_tree_add_bytes_format(tree, hf_usb_get_descriptor_resp_generic, tvb, offset, len, NULL,
|
||||
"GET DESCRIPTOR Response data (unknown descriptor type %u): %s",
|
||||
usb_trans_info->u.get_descriptor.type,
|
||||
tvb_bytes_to_ep_str(tvb, offset, len));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, len));
|
||||
offset = offset + len;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -388,7 +388,7 @@ dissect_vuze_dht_key(tvbuff_t *tvb, packet_info _U_*pinfo, proto_tree *tree, int
|
|||
offset += TL_BYTE;
|
||||
|
||||
proto_tree_add_item( sub_tree, hf_vuze_dht_key_data, tvb, offset, key_len, ENC_NA );
|
||||
proto_item_append_text( ti, ": %d bytes ( %s )", key_len, tvb_bytes_to_ep_str(tvb, offset, key_len ) );
|
||||
proto_item_append_text( ti, ": %d bytes ( %s )", key_len, tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, key_len ) );
|
||||
offset += key_len;
|
||||
|
||||
return offset;
|
||||
|
@ -474,7 +474,7 @@ dissect_vuze_dht_value(tvbuff_t *tvb, packet_info _U_*pinfo, proto_tree *tree, i
|
|||
offset += TL_SHORT;
|
||||
|
||||
proto_tree_add_item(sub_tree, hf_vuze_dht_value_bytes, tvb, offset, value_bytes_count, ENC_NA);
|
||||
proto_item_append_text( ti, ": %d bytes ( %s )", value_bytes_count, tvb_bytes_to_ep_str(tvb, offset, value_bytes_count ) );
|
||||
proto_item_append_text( ti, ": %d bytes ( %s )", value_bytes_count, tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, value_bytes_count ) );
|
||||
offset += value_bytes_count;
|
||||
|
||||
offset = dissect_vuze_dht_contact( tvb, pinfo, sub_tree, offset );
|
||||
|
@ -553,7 +553,7 @@ dissect_vuze_dht_network_coordinate(tvbuff_t *tvb, packet_info _U_*pinfo, proto_
|
|||
sub_tree = proto_item_add_subtree(ti, ett_vuze_dht_network_coordinate);
|
||||
|
||||
proto_item_append_text( ti, ": type %d, length %d ( %s )",
|
||||
tvb_get_guint8(tvb,offset), tvb_get_guint8(tvb,offset+TL_BYTE), tvb_bytes_to_ep_str(tvb, offset+TL_BYTE+TL_BYTE, coordinate_size ) );
|
||||
tvb_get_guint8(tvb,offset), tvb_get_guint8(tvb,offset+TL_BYTE), tvb_bytes_to_str(wmem_packet_scope(), tvb, offset+TL_BYTE+TL_BYTE, coordinate_size ) );
|
||||
|
||||
proto_tree_add_item( sub_tree, hf_vuze_dht_network_coordinate_type, tvb, offset, TL_BYTE, ENC_BIG_ENDIAN );
|
||||
offset += TL_BYTE;
|
||||
|
|
|
@ -2336,8 +2336,7 @@ dissect_wccp2_capability_element(tvbuff_t *tvb, int offset, gint length,
|
|||
proto_tree_add_text(element_tree, tvb,
|
||||
offset, capability_val_len,
|
||||
"Value: %s",
|
||||
tvb_bytes_to_ep_str(tvb, offset,
|
||||
capability_val_len));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, capability_val_len));
|
||||
break;
|
||||
}
|
||||
return length - 4 - capability_val_len;
|
||||
|
|
|
@ -2363,7 +2363,7 @@ static void listOfTextItem(tvbuff_t *tvb, int *offsetp, proto_tree *t, int hf,
|
|||
tti = proto_tree_add_none_format(tt, hf_x11_textitem_string, tvb, *offsetp, l*2 + 2,
|
||||
"textitem (string): delta = %d, %s",
|
||||
delta,
|
||||
tvb_bytes_to_ep_str(tvb, *offsetp + 2, l*2));
|
||||
tvb_bytes_to_str(wmem_packet_scope(), tvb, *offsetp + 2, l*2));
|
||||
ttt = proto_item_add_subtree(tti, ett_x11_text_item);
|
||||
proto_tree_add_item(ttt, hf_x11_textitem_string_delta, tvb, *offsetp + 1, 1, byte_order);
|
||||
proto_tree_add_item(ttt, hf_x11_textitem_string_string16_bytes, tvb, *offsetp + 2, l*2, byte_order);
|
||||
|
|
|
@ -3482,16 +3482,7 @@ tvb_bcd_dig_to_wmem_packet_str(tvbuff_t *tvb, const gint offset, const gint len,
|
|||
* Format a bunch of data from a tvbuff as bytes, returning a pointer
|
||||
* to the string with the formatted data.
|
||||
*/
|
||||
gchar *
|
||||
tvb_bytes_to_ep_str(tvbuff_t *tvb, const gint offset, const gint len)
|
||||
{
|
||||
return bytes_to_ep_str(ensure_contiguous(tvb, offset, len), len);
|
||||
}
|
||||
|
||||
/*
|
||||
* Same as tvb_bytes_to_ep_str but with wmem
|
||||
*/
|
||||
gchar *tvb_bytes_to_wmem_str(wmem_allocator_t *allocator, tvbuff_t *tvb,
|
||||
gchar *tvb_bytes_to_str(wmem_allocator_t *allocator, tvbuff_t *tvb,
|
||||
const gint offset, const gint len)
|
||||
{
|
||||
return bytes_to_str(allocator, ensure_contiguous(tvb, offset, len), len);
|
||||
|
|
|
@ -850,13 +850,7 @@ WS_DLL_PUBLIC gchar *tvb_bytes_to_str_punct(wmem_allocator_t *scope, tvbuff_t *t
|
|||
* Format a bunch of data from a tvbuff as bytes, returning a pointer
|
||||
* to the string with the formatted data.
|
||||
*/
|
||||
WS_DLL_PUBLIC gchar *tvb_bytes_to_ep_str(tvbuff_t *tvb, const gint offset,
|
||||
const gint len);
|
||||
|
||||
/**
|
||||
* Same as above, but using wmem memory management
|
||||
*/
|
||||
WS_DLL_PUBLIC gchar *tvb_bytes_to_wmem_str(wmem_allocator_t *allocator, tvbuff_t *tvb,
|
||||
WS_DLL_PUBLIC gchar *tvb_bytes_to_str(wmem_allocator_t *allocator, tvbuff_t *tvb,
|
||||
const gint offset, const gint len);
|
||||
|
||||
/**
|
||||
|
|
|
@ -502,7 +502,7 @@ WSLUA_METAMETHOD Tvb__tostring(lua_State* L) {
|
|||
will be appended if the string is too long. */
|
||||
Tvb tvb = checkTvb(L,1);
|
||||
int len = tvb_captured_length(tvb->ws_tvb);
|
||||
char* str = tvb_bytes_to_wmem_str(NULL,tvb->ws_tvb,0,len);
|
||||
char* str = tvb_bytes_to_str(NULL,tvb->ws_tvb,0,len);
|
||||
|
||||
lua_pushfstring(L, "TVB(%d) : %s", len, str);
|
||||
|
||||
|
@ -1566,7 +1566,7 @@ WSLUA_METAMETHOD TvbRange__tostring(lua_State* L) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
str = tvb_bytes_to_wmem_str(NULL,tvbr->tvb->ws_tvb,tvbr->offset,tvbr->len);
|
||||
str = tvb_bytes_to_str(NULL,tvbr->tvb->ws_tvb,tvbr->offset,tvbr->len);
|
||||
|
||||
lua_pushstring(L,str);
|
||||
wmem_free(NULL, str);
|
||||
|
|
|
@ -491,8 +491,7 @@ sub generate_hfs {
|
|||
} elsif (($args[5] =~ /tvb_get_ephemeral_string/) ||
|
||||
($args[5] =~ /tvb_format_text/)){
|
||||
$proto_tree_item[9] = "FT_STRING";
|
||||
} elsif (($args[5] =~ /tvb_bytes_to_str/) ||
|
||||
($args[5] =~ /tvb_bytes_to_ep_str/)) {
|
||||
} elsif (($args[5] =~ /tvb_bytes_to_str/)) {
|
||||
$proto_tree_item[9] = "FT_BYTES";
|
||||
} elsif ($args[5] =~ /tvb_ether_to_str/) {
|
||||
$proto_tree_item[9] = "FT_ETHER";
|
||||
|
|
Loading…
Reference in New Issue