Don't use proto_tree_add_item_hidden().
svn path=/trunk/; revision=25235
This commit is contained in:
parent
95a44fe52a
commit
ad890397cc
|
@ -546,13 +546,18 @@ static void dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
ecat_header_tree = proto_item_add_subtree(aitem, ett_ecat_header);
|
||||
|
||||
aitem = proto_tree_add_item(ecat_header_tree, hf_ecat_cmd, tvb, suboffset, sizeof(ecHdr.cmd), TRUE);
|
||||
if( subCount < 10 )
|
||||
aitem = proto_tree_add_item_hidden(ecat_header_tree, hf_ecat_sub_cmd[subCount], tvb, suboffset, sizeof(ecHdr.cmd), TRUE);
|
||||
if( subCount < 10 ){
|
||||
aitem = proto_tree_add_item(ecat_header_tree, hf_ecat_sub_cmd[subCount], tvb, suboffset, sizeof(ecHdr.cmd), TRUE);
|
||||
PROTO_ITEM_SET_HIDDEN(aitem);
|
||||
}
|
||||
|
||||
suboffset+= sizeof(ecHdr.cmd);
|
||||
|
||||
aitem = proto_tree_add_item(ecat_header_tree, hf_ecat_idx, tvb, suboffset, sizeof(ecHdr.idx), TRUE);
|
||||
if( subCount < 10 )
|
||||
aitem = proto_tree_add_item_hidden(ecat_header_tree, hf_ecat_sub_idx[subCount], tvb, suboffset, sizeof(ecHdr.idx), TRUE);
|
||||
if( subCount < 10 ){
|
||||
aitem = proto_tree_add_item(ecat_header_tree, hf_ecat_sub_idx[subCount], tvb, suboffset, sizeof(ecHdr.idx), TRUE);
|
||||
PROTO_ITEM_SET_HIDDEN(aitem);
|
||||
}
|
||||
suboffset+= sizeof(ecHdr.idx);
|
||||
|
||||
switch ( ecHdr.cmd )
|
||||
|
@ -561,20 +566,26 @@ static void dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
case 11:
|
||||
case 12:
|
||||
aitem = proto_tree_add_item(ecat_header_tree, hf_ecat_lad, tvb, suboffset, sizeof(ecHdr.anAddrUnion.a.adp)+sizeof(ecHdr.anAddrUnion.a.ado), TRUE);
|
||||
if( subCount < 10 )
|
||||
aitem = proto_tree_add_item_hidden(ecat_header_tree, hf_ecat_sub_lad[subCount], tvb, suboffset, sizeof(ecHdr.anAddrUnion.a.adp)+sizeof(ecHdr.anAddrUnion.a.ado), TRUE);
|
||||
if( subCount < 10 ){
|
||||
aitem = proto_tree_add_item(ecat_header_tree, hf_ecat_sub_lad[subCount], tvb, suboffset, sizeof(ecHdr.anAddrUnion.a.adp)+sizeof(ecHdr.anAddrUnion.a.ado), TRUE);
|
||||
PROTO_ITEM_SET_HIDDEN(aitem);
|
||||
}
|
||||
|
||||
suboffset += (sizeof(ecHdr.anAddrUnion.a.adp)+sizeof(ecHdr.anAddrUnion.a.ado));
|
||||
break;
|
||||
default:
|
||||
aitem = proto_tree_add_item(ecat_header_tree, hf_ecat_adp, tvb, suboffset, sizeof(ecHdr.anAddrUnion.a.adp), TRUE);
|
||||
if( subCount < 10 )
|
||||
aitem = proto_tree_add_item_hidden(ecat_header_tree, hf_ecat_sub_adp[subCount], tvb, suboffset, sizeof(ecHdr.anAddrUnion.a.adp), TRUE);
|
||||
if( subCount < 10 ){
|
||||
aitem = proto_tree_add_item(ecat_header_tree, hf_ecat_sub_adp[subCount], tvb, suboffset, sizeof(ecHdr.anAddrUnion.a.adp), TRUE);
|
||||
PROTO_ITEM_SET_HIDDEN(aitem);
|
||||
}
|
||||
|
||||
suboffset+= sizeof(ecHdr.anAddrUnion.a.adp);
|
||||
aitem = proto_tree_add_item(ecat_header_tree, hf_ecat_ado, tvb, suboffset, sizeof(ecHdr.anAddrUnion.a.ado), TRUE);
|
||||
if( subCount < 10 )
|
||||
aitem = proto_tree_add_item_hidden(ecat_header_tree, hf_ecat_sub_ado[subCount], tvb, suboffset, sizeof(ecHdr.anAddrUnion.a.ado), TRUE);
|
||||
if( subCount < 10 ){
|
||||
aitem = proto_tree_add_item(ecat_header_tree, hf_ecat_sub_ado[subCount], tvb, suboffset, sizeof(ecHdr.anAddrUnion.a.ado), TRUE);
|
||||
PROTO_ITEM_SET_HIDDEN(aitem);
|
||||
}
|
||||
|
||||
suboffset+= sizeof(ecHdr.anAddrUnion.a.ado);
|
||||
}
|
||||
|
@ -729,14 +740,17 @@ static void dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
ecat_dc_tree = ecat_datagram_tree;
|
||||
}
|
||||
|
||||
if( subCount < 10 )
|
||||
aitem = proto_tree_add_item_hidden(ecat_datagram_tree, hf_ecat_sub_data[subCount], tvb, offset + EcParserHDR_Len, ecHdr.len & 0x07ff, TRUE);
|
||||
if( subCount < 10 ){
|
||||
aitem = proto_tree_add_item(ecat_datagram_tree, hf_ecat_sub_data[subCount], tvb, offset + EcParserHDR_Len, ecHdr.len & 0x07ff, TRUE);
|
||||
PROTO_ITEM_SET_HIDDEN(aitem);
|
||||
}
|
||||
|
||||
if ( pDC[3] != 0 )
|
||||
{
|
||||
proto_tree_add_uint(ecat_dc_tree, hf_ecat_dc_diff_da, tvb, suboffset, 4, pDC[3] - pDC[0]);
|
||||
if( subCount < 10 )
|
||||
if( subCount < 10 ){
|
||||
proto_tree_add_uint_hidden(ecat_dc_tree, hf_ecat_sub_dc_diff_da[subCount], tvb, suboffset, 4, pDC[3] - pDC[0]);
|
||||
}
|
||||
|
||||
if ( pDC[1] != 0 )
|
||||
{
|
||||
|
@ -790,8 +804,10 @@ static void dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
aitem = proto_tree_add_item(ecat_datagram_tree, hf_ecat_data, tvb, startOfData, dataLength, TRUE);
|
||||
}
|
||||
|
||||
if( subCount < 10 )
|
||||
aitem = proto_tree_add_item_hidden(ecat_datagram_tree, hf_ecat_sub_data[subCount], tvb, startOfData, dataLength, TRUE);
|
||||
if( subCount < 10 ){
|
||||
aitem = proto_tree_add_item(ecat_datagram_tree, hf_ecat_sub_data[subCount], tvb, startOfData, dataLength, TRUE);
|
||||
PROTO_ITEM_SET_HIDDEN(aitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -805,16 +821,20 @@ static void dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
aitem = proto_tree_add_item(ecat_datagram_tree, hf_ecat_data, tvb, suboffset, ecHdr.len & 0x07ff, TRUE);
|
||||
}
|
||||
|
||||
if( subCount < 10 )
|
||||
aitem = proto_tree_add_item_hidden(ecat_datagram_tree, hf_ecat_sub_data[subCount], tvb, offset + EcParserHDR_Len, ecHdr.len & 0x07ff, TRUE);
|
||||
if( subCount < 10 ){
|
||||
aitem = proto_tree_add_item(ecat_datagram_tree, hf_ecat_sub_data[subCount], tvb, offset + EcParserHDR_Len, ecHdr.len & 0x07ff, TRUE);
|
||||
PROTO_ITEM_SET_HIDDEN(aitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( tree )
|
||||
{
|
||||
aitem = proto_tree_add_item(ecat_datagram_tree, hf_ecat_cnt, tvb, offset + EcParserHDR_Len + len , 2, TRUE);
|
||||
if( subCount < 10 )
|
||||
aitem = proto_tree_add_item_hidden(ecat_datagram_tree, hf_ecat_sub_cnt[subCount], tvb, offset + EcParserHDR_Len + len , 2, TRUE);
|
||||
if( subCount < 10 ){
|
||||
aitem = proto_tree_add_item(ecat_datagram_tree, hf_ecat_sub_cnt[subCount], tvb, offset + EcParserHDR_Len + len , 2, TRUE);
|
||||
PROTO_ITEM_SET_HIDDEN(aitem);
|
||||
}
|
||||
}
|
||||
|
||||
offset+=subsize;
|
||||
|
|
|
@ -965,7 +965,7 @@ static const value_string l3_info_element_values [] = {
|
|||
static void
|
||||
dissect_layer3_message(tvbuff_t *layer3_data_tvb, proto_tree *v5ua_tree,proto_item *parameter_item, packet_info *pinfo)
|
||||
{
|
||||
proto_item *layer3_header_item,*layer3_item;
|
||||
proto_item *layer3_header_item,*layer3_item, *hidden_item;
|
||||
proto_tree *layer3_header_tree,*layer3_tree;
|
||||
guint16 discriminator_offset, address_offset, low_address_offset, msg_type_offset, info_element_offset;
|
||||
guint8 info_element, info_element_length, buffer;
|
||||
|
@ -1005,7 +1005,8 @@ dissect_layer3_message(tvbuff_t *layer3_data_tvb, proto_tree *v5ua_tree,proto_it
|
|||
|
||||
while(tvb_length_remaining(layer3_data_tvb,info_element_offset)){
|
||||
info_element = tvb_get_guint8(layer3_data_tvb, info_element_offset);
|
||||
proto_tree_add_item_hidden(layer3_tree, hf_l3_info_element, layer3_data_tvb,info_element_offset,INFO_ELEMENT_LENGTH,FALSE);
|
||||
hidden_item = proto_tree_add_item(layer3_tree, hf_l3_info_element, layer3_data_tvb,info_element_offset,INFO_ELEMENT_LENGTH,FALSE);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
switch(tvb_get_guint8(layer3_data_tvb, msg_type_offset) & 0xf0){
|
||||
case 0x00:
|
||||
/* Variable Length */
|
||||
|
|
Loading…
Reference in New Issue