Fix a number of proto_tree_add_item() encoding args.

svn path=/trunk/; revision=39774
This commit is contained in:
Bill Meier 2011-11-09 17:33:18 +00:00
parent 4052a406f3
commit 30cee99009
31 changed files with 33 additions and 33 deletions

View File

@ -538,7 +538,7 @@ dissect_ndr_ctx_hnd (tvbuff_t *tvb, gint offset, packet_info *pinfo,
dcerpc_tvb_get_uuid (tvb, offset+4, drep, &ctx_hnd.uuid);
if (tree) {
/* Bytes is bytes - don't worry about the data representation */
proto_tree_add_item (tree, hfindex, tvb, offset, 20, FALSE);
proto_tree_add_item (tree, hfindex, tvb, offset, 20, ENC_NA);
}
if (pdata) {
*pdata = ctx_hnd;

View File

@ -3804,7 +3804,7 @@ netlogon_dissect_CIPHER_VALUE_DATA(tvbuff_t *tvb, int offset,
hf_netlogon_cipher_len, &data_len);
proto_tree_add_item(tree, di->hf_index, tvb, offset,
data_len, FALSE);
data_len, ENC_NA);
offset += data_len;
return offset;

View File

@ -2448,7 +2448,7 @@ dcerpc_try_handoff (packet_info *pinfo, proto_tree *tree,
if (tree) {
sub_item = proto_tree_add_item (tree, sub_proto->proto_id,
(decrypted_tvb != NULL)?decrypted_tvb:tvb,
0, -1, FALSE);
0, -1, ENC_NA);
if (sub_item) {
sub_tree = proto_item_add_subtree (sub_item, sub_proto->ett);

View File

@ -4728,7 +4728,7 @@ dissect_dcm_assoc_item(tvbuff_t *tvb, proto_tree *tree, guint32 offset,
g_snprintf(*item_value, MAX_BUF_LEN, "%d", item_number);
proto_item_append_text(assoc_item_pitem, "%s", *item_value);
proto_tree_add_item(assoc_item_ptree, *hf_value, tvb, offset+4, 4, FALSE);
proto_tree_add_item(assoc_item_ptree, *hf_value, tvb, offset+4, 4, ENC_BIG_ENDIAN);
break;

View File

@ -673,7 +673,7 @@ dissect_mux_al_pdu( tvbuff_t *tvb, packet_info *pinfo, proto_tree *vc_tree,
al_item = proto_tree_add_item(vc_tree,
al2_sequenced?hf_h223_al2_sequenced:hf_h223_al2_unsequenced,
tvb, 0, -1,FALSE);
tvb, 0, -1, ENC_NA);
al_tree = proto_item_add_subtree (al_item, ett_h223_al2);
PROTO_ITEM_SET_GENERATED(tmp_item);

View File

@ -788,7 +788,7 @@ static void dissect_h248_annexc_NSAP(proto_tree* tree,
}
static void dissect_h248_annexc_vpvc(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo _U_, int hfid, h248_curr_info_t* h248_info _U_, void* unused _U_) {
proto_item* pi = proto_tree_add_item(tree,hfid,tvb,0,2,FALSE);
proto_item* pi = proto_tree_add_item(tree,hfid,tvb,0,2,ENC_BIG_ENDIAN);
proto_tree* pt = proto_item_add_subtree(pi,ett_vpvc);
proto_tree_add_item(pt,hf_h248_pkg_annexc_vp,tvb,0,2,ENC_BIG_ENDIAN);
proto_tree_add_item(pt,hf_h248_pkg_annexc_vc,tvb,2,2,ENC_BIG_ENDIAN);

View File

@ -298,7 +298,7 @@ static void dissect_bt_tunneled_proto(proto_tree* tree, tvbuff_t* tvb, packet_in
call_dissector(bctp_dissector,bctp_tvb,pinfo,tree);
}
} else {
proto_tree_add_item(tree,hfid,tvb,0,-1,FALSE);
proto_tree_add_item(tree,hfid,tvb,0,-1,ENC_NA);
}
}

View File

@ -758,7 +758,7 @@ dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
} else {
/* remove 2 bytes to take off the final CRLF to make things a little prettier */
item = proto_tree_add_item(tree, hf_id, tvb, value_offset, end_offset - value_offset - 2, FALSE);
item = proto_tree_add_item(tree, hf_id, tvb, value_offset, end_offset - value_offset - 2, ENC_ASCII|ENC_NA);
}
if(f_info->add_to_col_info && check_col(pinfo->cinfo, COL_INFO)) {

View File

@ -922,7 +922,7 @@ dissect_opts(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info * pinfo, c
if (tree) {
/* !!! specify length */
ti = proto_tree_add_item(tree, hf_option_item, tvb, offset, len, FALSE);
ti = proto_tree_add_item(tree, hf_option_item, tvb, offset, len, ENC_NA);
dstopt_tree = proto_item_add_subtree(ti, ett_ipv6);

View File

@ -680,7 +680,7 @@ handleDataSegment(proto_item *ti, tvbuff_t *tvb, guint offset, guint dataSegment
int dataOffset = offset;
int dataLen = MIN(dataSegmentLen, endOffset - offset);
if(dataLen > 0) {
proto_tree_add_item(ti, hf_id, tvb, offset, dataLen, FALSE);
proto_tree_add_item(ti, hf_id, tvb, offset, dataLen, ENC_NA);
offset += dataLen;
}
if(offset < endOffset && (offset & 3) != 0) {

View File

@ -255,7 +255,7 @@ dissect_ismp_edp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *ismp
/* create display subtree for EDP */
if (ismp_tree) {
edp_ti = proto_tree_add_item(ismp_tree, hf_ismp_edp, tvb, offset,
tvb_length_remaining(tvb, offset), FALSE);
tvb_length_remaining(tvb, offset), ENC_NA);
edp_tree = proto_item_add_subtree(edp_ti, ett_ismp_edp);
col_add_fstr(pinfo->cinfo, COL_INFO, "MIP %s, MMAC %s, ifIdx %d",

View File

@ -947,7 +947,7 @@ static int dissect_jxta_welcome(tvbuff_t * tvb, packet_info * pinfo, proto_tree
if (jxta_welcome_tree) {
jxta_welcome_tree_item = proto_tree_add_item(jxta_welcome_tree,
(each_variable_token < (variable_tokens -1) ? hf_jxta_welcome_variable : hf_jxta_welcome_version),
tvb, token_offset, (gint) strlen(*current_token), FALSE);
tvb, token_offset, (gint) strlen(*current_token), ENC_ASCII|ENC_NA);
proto_item_append_text(jxta_welcome_tree_item, " (UNRECOGNIZED)");
}

View File

@ -101,7 +101,7 @@ static const value_string m_type_vals[] = {
static int
dissect_krb4_string(packet_info *pinfo _U_, int hf_index, proto_tree *tree, tvbuff_t *tvb, int offset)
{
proto_tree_add_item(tree, hf_index, tvb, offset, -1, FALSE);
proto_tree_add_item(tree, hf_index, tvb, offset, -1, ENC_ASCII|ENC_NA);
while(tvb_get_guint8(tvb, offset)!=0){
offset++;
}

View File

@ -137,7 +137,7 @@ dissect_macctrl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
pause_times_tree = proto_item_add_subtree(ti, ett_macctrl_cbfc_pause_times);
for (i=0; i<8; i++) {
proto_tree_add_item(pause_times_tree, *macctrl_cbfc_pause_times_list[i], tvb, 4+i*2, 2, FALSE);
proto_tree_add_item(pause_times_tree, *macctrl_cbfc_pause_times_list[i], tvb, 4+i*2, 2, ENC_BIG_ENDIAN);
}
}
break;

View File

@ -1487,7 +1487,7 @@ dissect_mip6_opt_vsm(const ip_tcp_opt *optp _U_, tvbuff_t *tvb, int offset,
break;
}
proto_tree_add_item(field_tree, hf_mip6_vsm_subtype_local, tvb,
offset + MIP6_VSM_SUBTYPE_OFF, MIP6_VSM_SUBTYPE_LEN, FALSE);
offset + MIP6_VSM_SUBTYPE_OFF, MIP6_VSM_SUBTYPE_LEN, ENC_BIG_ENDIAN);
p = offset + MIP6_VSM_DATA_OFF;
len = optlen - MIP6_VSM_DATA_OFF;

View File

@ -4270,7 +4270,7 @@ dissect_ndps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree)
}
if(ndps_hfname != 0)
{
proto_tree_add_item(ndps_tree, ndps_hfname, tvb, foffset, 4, FALSE);
proto_tree_add_item(ndps_tree, ndps_hfname, tvb, foffset, 4, ENC_BIG_ENDIAN);
if (ndps_func_string != NULL)
{
if (check_col(pinfo->cinfo, COL_INFO))

View File

@ -949,7 +949,7 @@ dissect_ntlmssp_blob (tvbuff_t *tvb, int offset,
if (ntlmssp_tree) {
tf = proto_tree_add_item (ntlmssp_tree, blob_hf, tvb,
blob_offset, blob_length, FALSE);
blob_offset, blob_length, ENC_NA);
tree = proto_item_add_subtree(tf, ett_ntlmssp_blob);
}
proto_tree_add_uint(tree, hf_ntlmssp_blob_len,

View File

@ -468,7 +468,7 @@ decode_value_string_attribute(tvbuff_t *tvb, proto_tree *tree, int* hfValue, int
proto_tree_add_text(tree, tvb, offset, length, "Too short attribute!");
return;
}
proto_tree_add_item(tree, *hfValue, tvb, offset+4, 4, FALSE);
proto_tree_add_item(tree, *hfValue, tvb, offset+4, 4, ENC_BIG_ENDIAN);
}
static void

View File

@ -1009,7 +1009,7 @@ static void dissect_payload_structure(tvbuff_t *tvb, gint offset, gint length, p
dissect_ipv6_address(tvb, offset, 16, pnrp_payload_tree);
offset += 16;
proto_tree_add_text(pnrp_payload_tree, tvb, offset,2, "Port Number : %d",tvb_get_letohs(tvb,offset));
/* proto_tree_add_item(pnrp_payload_tree, hf_pnrp_payload_port, tvb, offset, 2, FALSE); */
/* proto_tree_add_item(pnrp_payload_tree, hf_pnrp_payload_port, tvb, offset, 2, ENC_BIG_ENDIAN); */
offset += 2;
proto_tree_add_text(pnrp_payload_tree, tvb, offset,2, "IANA Protocol Number : %d",tvb_get_letohs(tvb,offset));
offset += 2;

View File

@ -2237,7 +2237,7 @@ dissect_q931_number_ie(tvbuff_t *tvb, int offset, int len,
if (len == 0)
return;
proto_tree_add_item(tree, hfindex, tvb, offset, len, FALSE);
proto_tree_add_item(tree, hfindex, tvb, offset, len, ENC_ASCII|ENC_NA);
proto_item_append_text(proto_tree_get_parent(tree), ": '%s'", tvb_format_text(tvb, offset, len));
if ( number_plan == 1 ) {

View File

@ -1682,7 +1682,7 @@ dissect_q933_number_ie(tvbuff_t *tvb, int offset, int len,
if (len == 0)
return;
proto_tree_add_item(tree, hfindex, tvb, offset, len, FALSE);
proto_tree_add_item(tree, hfindex, tvb, offset, len, ENC_ASCII|ENC_NA);
}
/*

View File

@ -118,7 +118,7 @@ redbackli_dissect_avp(guint8 avptype, guint8 avplen, tvbuff_t *tvb, gint offset,
break;
case(RB_AVP_DIR):
proto_tree_add_item(st, hf_redbackli_dir, tvb,
offset+2, avplen, FALSE);
offset+2, avplen, ENC_NA);
break;
case(RB_AVP_ACCTID):
proto_tree_add_item(st, hf_redbackli_acctid, tvb,

View File

@ -695,7 +695,7 @@ static void show_PDU_in_tree(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb
(rlc_info->rlcMode == RLC_AM_MODE) ?
hf_rlc_lte_am_data :
hf_rlc_lte_um_data,
tvb, offset, length, FALSE);
tvb, offset, length, ENC_NA);
/* Send whole PDU to PDCP */
if ((whole_pdu || (reassembly_info != NULL)) &&

View File

@ -176,7 +176,7 @@ void fec_dissector(struct _fec_ptr f, tvbuff_t *tvb, proto_tree *tree, guint *of
/* Create the FEC subtree */
if (tree)
{
ti = proto_tree_add_item(tree, f.hf->header, tvb, *offset, -1, FALSE);
ti = proto_tree_add_item(tree, f.hf->header, tvb, *offset, -1, ENC_NA);
fec_tree = proto_item_add_subtree(ti, f.ett->main);
} else
{

View File

@ -302,16 +302,16 @@ gboolean lct_dissector(struct _lct_ptr l, struct _fec_ptr f, tvbuff_t *tvb, prot
if (tree)
{
/* Create the LCT subtree */
ti = proto_tree_add_item(tree, l.hf->header, tvb, *offset, l.lct->hlen, FALSE);
ti = proto_tree_add_item(tree, l.hf->header, tvb, *offset, l.lct->hlen, ENC_NA);
lct_tree = proto_item_add_subtree(ti, l.ett->main);
/* Fill the LCT subtree */
proto_tree_add_uint(lct_tree, l.hf->version, tvb, *offset, 1, l.lct->version);
ti = proto_tree_add_item(lct_tree, l.hf->fsize_header, tvb, *offset, 2, FALSE);
ti = proto_tree_add_item(lct_tree, l.hf->fsize_header, tvb, *offset, 2, ENC_NA);
lct_fsize_tree = proto_item_add_subtree(ti, l.ett->fsize);
ti = proto_tree_add_item(lct_tree, l.hf->flags_header, tvb, *offset, 2, FALSE);
ti = proto_tree_add_item(lct_tree, l.hf->flags_header, tvb, *offset, 2, ENC_NA);
lct_flags_tree = proto_item_add_subtree(ti, l.ett->flags);
proto_tree_add_uint(lct_tree, l.hf->hlen, tvb, *offset+2, 1, l.lct->hlen);

View File

@ -117,7 +117,7 @@ dissect_rudp(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree)
flags_tree = proto_item_add_subtree(ti, ett_rudp_flags);
for (i = 0; i < 8; i++)
proto_tree_add_item(flags_tree, flags[i], tvb, 0, 1, FALSE);
proto_tree_add_item(flags_tree, flags[i], tvb, 0, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(rudp_tree, hf_rudp_hlen, tvb, 1, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(rudp_tree, hf_rudp_seq, tvb, 2, 1, ENC_BIG_ENDIAN);

View File

@ -1419,7 +1419,7 @@ dissect_sgsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/*
* Add SGSAP message name
*/
proto_tree_add_item(sgsap_tree, hf_idx, tvb, offset, 1, FALSE);
proto_tree_add_item(sgsap_tree, hf_idx, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;

View File

@ -188,7 +188,7 @@ static void dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
col_append_fstr(pinfo->cinfo, COL_INFO, ", Network=\"%s\"",format_text(str_name, str_len-1));
while(tvb_get_guint8(tvb, 0x34 + 8*i)==0x00 && (tvb_length_remaining(tvb,0x34 + 8*i) > 6) && (i<32)) {
proto_tree_add_item(network_tree, hf_turbocell_station[i], tvb, 0x34+8*i, 6, FALSE);
proto_tree_add_item(network_tree, hf_turbocell_station[i], tvb, 0x34+8*i, 6, ENC_NA);
i++;
}

View File

@ -329,7 +329,7 @@ dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 ip_proto)
get_udp_port(udph->uh_sport), udph->uh_sport, get_udp_port(udph->uh_dport), udph->uh_dport);
}
} else {
ti = proto_tree_add_item(tree, (ip_proto == IP_PROTO_UDP) ? proto_udp : proto_udplite, tvb, offset, 8, FALSE);
ti = proto_tree_add_item(tree, (ip_proto == IP_PROTO_UDP) ? proto_udp : proto_udplite, tvb, offset, 8, ENC_NA);
}
udp_tree = proto_item_add_subtree(ti, ett_udp);

View File

@ -711,7 +711,7 @@ process_tight_capabilities(proto_tree *tree,
for (i = 0; i < num_capabilities; i++) {
char *name;
proto_tree_add_item(tree, type_index, tvb, offset, 4, FALSE);
proto_tree_add_item(tree, type_index, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
offset = process_vendor(tree, vendor_index, tvb, offset);

View File

@ -1467,7 +1467,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset,
guint16 dev_cat = tvb_get_ntohs(tvb, offset+4);
if (dev_cat > 0 && dev_cat <= WPS_DEVICE_TYPE_CATEGORY_MAX) {
proto_tree_add_item(tlv_root, hf_eapwps_tlv_primary_device_type_category, tvb, offset+4, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_root, hf_eapwps_tlv_primary_device_type_subcategory[dev_cat-1], tvb, offset+10, 2, FALSE);
proto_tree_add_item(tlv_root, hf_eapwps_tlv_primary_device_type_subcategory[dev_cat-1], tvb, offset+10, 2, ENC_BIG_ENDIAN);
}
}