aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2008-05-15 01:44:53 +0000
committerBill Meier <wmeier@newsguy.com>2008-05-15 01:44:53 +0000
commit931cc922a14049c904a6ac416656c36caf01d6b3 (patch)
tree3d1112b08a02413f491bfad24d294022e8ef867c /epan/dissectors
parent78f4e06717899b3e6504300f3b47e61bc3989ee6 (diff)
Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25305
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-bpdu.c4
-rw-r--r--epan/dissectors/packet-cip.c9
-rw-r--r--epan/dissectors/packet-clnp.c29
-rw-r--r--epan/dissectors/packet-cpfi.c37
-rw-r--r--epan/dissectors/packet-dcc.c4
-rw-r--r--epan/dissectors/packet-dccp.c50
-rw-r--r--epan/dissectors/packet-dcerpc-spoolss.c128
-rw-r--r--epan/dissectors/packet-dmp.c12
-rw-r--r--epan/dissectors/packet-edonkey.c21
-rw-r--r--epan/dissectors/packet-fcp.c138
-rw-r--r--epan/dissectors/packet-fddi.c20
-rw-r--r--epan/dissectors/packet-fr.c9
-rw-r--r--epan/dissectors/packet-ipv6.c3
-rw-r--r--epan/dissectors/packet-isl.c8
-rw-r--r--epan/dissectors/packet-isup.c10
-rw-r--r--epan/dissectors/packet-m2ua.c4
-rw-r--r--epan/dissectors/packet-mdshdr.c7
-rw-r--r--epan/dissectors/packet-megaco.c15
18 files changed, 328 insertions, 180 deletions
diff --git a/epan/dissectors/packet-bpdu.c b/epan/dissectors/packet-bpdu.c
index b3a3bbbb46..2cef7b2535 100644
--- a/epan/dissectors/packet-bpdu.c
+++ b/epan/dissectors/packet-bpdu.c
@@ -446,7 +446,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
hidden_item = proto_tree_add_ether(bpdu_tree, hf_bpdu_root_mac, tvb,
BPDU_ROOT_IDENTIFIER + 2, 6,
root_identifier_mac);
- PROTO_ITEM_SET_HIDDEN(hidden_item);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_text(bpdu_tree, tvb, BPDU_ROOT_IDENTIFIER, 8,
"Root Identifier: %d / %s",
root_identifier_bridge_priority,
@@ -460,7 +460,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
hidden_item= proto_tree_add_ether(bpdu_tree, hf_bpdu_bridge_mac, tvb,
BPDU_BRIDGE_IDENTIFIER + 2, 6,
bridge_identifier_mac);
- PROTO_ITEM_SET_HIDDEN(hidden_item);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_uint(bpdu_tree, hf_bpdu_port_id, tvb,
BPDU_PORT_IDENTIFIER, 2, port_identifier);
message_age = tvb_get_ntohs(tvb, BPDU_MESSAGE_AGE) / 256.0;
diff --git a/epan/dissectors/packet-cip.c b/epan/dissectors/packet-cip.c
index 8b2b2ff9f9..58769e262e 100644
--- a/epan/dissectors/packet-cip.c
+++ b/epan/dissectors/packet-cip.c
@@ -449,12 +449,14 @@ dissect_epath( tvbuff_t *tvb, proto_item *epath_item, int offset, int path_lengt
proto_tree *e_key_tree, *cia_tree, *ds_tree;
proto_item *mcpi, *port_item, *net_item;
proto_tree *mc_tree;
+ proto_item *hidden_item;
/* Create a sub tree for the epath */
path_tree = proto_item_add_subtree( epath_item, ett_path );
- proto_tree_add_item_hidden(path_tree, hf_cip_epath,
- tvb, offset, path_length, TRUE );
+ hidden_item = proto_tree_add_item(path_tree, hf_cip_epath,
+ tvb, offset, path_length, TRUE );
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
pathpos = 0;
@@ -904,7 +906,8 @@ dissect_epath( tvbuff_t *tvb, proto_item *epath_item, int offset, int path_lengt
tvb_format_text(tvb, offset + pathpos + 2, seg_size ) );
proto_item_append_text(epath_item, "%s", tvb_format_text(tvb, offset + pathpos + 2, seg_size ) );
- proto_tree_add_item_hidden( ds_tree, hf_cip_symbol, tvb, offset + pathpos + 2, seg_size, FALSE );
+ hidden_item = proto_tree_add_item( ds_tree, hf_cip_symbol, tvb, offset + pathpos + 2, seg_size, FALSE );
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
if( seg_size %2 )
{
diff --git a/epan/dissectors/packet-clnp.c b/epan/dissectors/packet-clnp.c
index 8e7c43b913..11c14cb3a8 100644
--- a/epan/dissectors/packet-clnp.c
+++ b/epan/dissectors/packet-clnp.c
@@ -465,6 +465,7 @@ static gboolean ositp_decode_var_part(tvbuff_t *tvb, int offset,
guint16 s, s1,s2,s3,s4;
guint32 t1, t2, t3, t4;
guint32 pref_max_tpdu_size;
+ proto_item *hidden_item;
while (vp_length != 0) {
code = tvb_get_guint8(tvb, offset);
@@ -664,13 +665,15 @@ static gboolean ositp_decode_var_part(tvbuff_t *tvb, int offset,
TSAP is not printable, add as bytes and hidden as string;
otherwise vice-versa */
if (tsap_display==TSAP_DISPLAY_STRING ||
- (tsap_display==TSAP_DISPLAY_AUTO && is_all_printable(tvb_get_ptr(tvb,offset,length),length))) {
- proto_tree_add_string(tree, hf_cotp_vp_src_tsap, tvb, offset, length,
- print_tsap(tvb_get_ptr(tvb, offset, length),length));
- proto_tree_add_item_hidden(tree, hf_cotp_vp_src_tsap_bytes, tvb, offset, length, TRUE);
+ (tsap_display==TSAP_DISPLAY_AUTO && is_all_printable(tvb_get_ptr(tvb,offset,length),length))) {
+ proto_tree_add_string(tree, hf_cotp_vp_src_tsap, tvb, offset, length,
+ print_tsap(tvb_get_ptr(tvb, offset, length),length));
+ hidden_item = proto_tree_add_item(tree, hf_cotp_vp_src_tsap_bytes, tvb, offset, length, TRUE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
} else {
- proto_tree_add_string_hidden(tree, hf_cotp_vp_src_tsap, tvb, offset, length,
- print_tsap(tvb_get_ptr(tvb, offset, length),length));
+ hidden_item = proto_tree_add_string(tree, hf_cotp_vp_src_tsap, tvb, offset, length,
+ print_tsap(tvb_get_ptr(tvb, offset, length),length));
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_item(tree, hf_cotp_vp_src_tsap_bytes, tvb, offset, length, TRUE);
}
offset += length;
@@ -682,13 +685,15 @@ static gboolean ositp_decode_var_part(tvbuff_t *tvb, int offset,
TSAP is not printable, add as bytes and hidden as string;
otherwise vice-versa */
if (tsap_display==TSAP_DISPLAY_STRING ||
- (tsap_display==TSAP_DISPLAY_AUTO && is_all_printable(tvb_get_ptr(tvb,offset,length),length))) {
- proto_tree_add_string(tree, hf_cotp_vp_dst_tsap, tvb, offset, length,
- print_tsap(tvb_get_ptr(tvb, offset, length),length));
- proto_tree_add_item_hidden(tree, hf_cotp_vp_dst_tsap_bytes, tvb, offset, length, TRUE);
+ (tsap_display==TSAP_DISPLAY_AUTO && is_all_printable(tvb_get_ptr(tvb,offset,length),length))) {
+ proto_tree_add_string(tree, hf_cotp_vp_dst_tsap, tvb, offset, length,
+ print_tsap(tvb_get_ptr(tvb, offset, length),length));
+ hidden_item = proto_tree_add_item(tree, hf_cotp_vp_dst_tsap_bytes, tvb, offset, length, TRUE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
} else {
- proto_tree_add_string_hidden(tree, hf_cotp_vp_dst_tsap, tvb, offset, length,
- print_tsap(tvb_get_ptr(tvb, offset, length),length));
+ hidden_item = proto_tree_add_string(tree, hf_cotp_vp_dst_tsap, tvb, offset, length,
+ print_tsap(tvb_get_ptr(tvb, offset, length),length));
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_item(tree, hf_cotp_vp_dst_tsap_bytes, tvb, offset, length, TRUE);
}
offset += length;
diff --git a/epan/dissectors/packet-cpfi.c b/epan/dissectors/packet-cpfi.c
index 633ca6ac23..9f7ae45a97 100644
--- a/epan/dissectors/packet-cpfi.c
+++ b/epan/dissectors/packet-cpfi.c
@@ -167,6 +167,7 @@ dissect_cpfi_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 dst_port = 0;
proto_item *extra_item = NULL;
proto_tree *extra_tree = NULL;
+ proto_item *hidden_item;
/* add a tree for the header */
if ( tree != NULL)
@@ -241,21 +242,33 @@ dissect_cpfi_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* For "real" TDAs (i.e. not for microTDAs), add hidden addresses to allow filtering */
if ( src != 0 )
{
- proto_tree_add_bytes_hidden(extra_tree, hf_cpfi_t_instance, tvb, 0, 1, &src_instance);
- proto_tree_add_bytes_hidden(extra_tree, hf_cpfi_t_src_instance, tvb, 0, 1, &src_instance);
- proto_tree_add_bytes_hidden(extra_tree, hf_cpfi_t_board, tvb, 0, 1, &src_board);
- proto_tree_add_bytes_hidden(extra_tree, hf_cpfi_t_src_board, tvb, 0, 1, &src_board);
- proto_tree_add_bytes_hidden(extra_tree, hf_cpfi_t_port, tvb, 0, 1, &src_port);
- proto_tree_add_bytes_hidden(extra_tree, hf_cpfi_t_src_port, tvb, 0, 1, &src_port);
+ hidden_item = proto_tree_add_bytes(extra_tree, hf_cpfi_t_instance, tvb, 0, 1, &src_instance);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_bytes(extra_tree, hf_cpfi_t_src_instance, tvb, 0, 1, &src_instance);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_bytes(extra_tree, hf_cpfi_t_board, tvb, 0, 1, &src_board);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_bytes(extra_tree, hf_cpfi_t_src_board, tvb, 0, 1, &src_board);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_bytes(extra_tree, hf_cpfi_t_port, tvb, 0, 1, &src_port);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_bytes(extra_tree, hf_cpfi_t_src_port, tvb, 0, 1, &src_port);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
}
if ( dst != 0 )
{
- proto_tree_add_bytes_hidden(extra_tree, hf_cpfi_t_instance, tvb, 0, 1, &dst_instance);
- proto_tree_add_bytes_hidden(extra_tree, hf_cpfi_t_dst_instance, tvb, 0, 1, &dst_instance);
- proto_tree_add_bytes_hidden(extra_tree, hf_cpfi_t_board, tvb, 0, 1, &dst_board);
- proto_tree_add_bytes_hidden(extra_tree, hf_cpfi_t_dst_board, tvb, 0, 1, &dst_board);
- proto_tree_add_bytes_hidden(extra_tree, hf_cpfi_t_port, tvb, 0, 1, &dst_port);
- proto_tree_add_bytes_hidden(extra_tree, hf_cpfi_t_dst_port, tvb, 0, 1, &dst_port);
+ hidden_item = proto_tree_add_bytes(extra_tree, hf_cpfi_t_instance, tvb, 0, 1, &dst_instance);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_bytes(extra_tree, hf_cpfi_t_dst_instance, tvb, 0, 1, &dst_instance);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_bytes(extra_tree, hf_cpfi_t_board, tvb, 0, 1, &dst_board);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_bytes(extra_tree, hf_cpfi_t_dst_board, tvb, 0, 1, &dst_board);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_bytes(extra_tree, hf_cpfi_t_port, tvb, 0, 1, &dst_port);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_bytes(extra_tree, hf_cpfi_t_dst_port, tvb, 0, 1, &dst_port);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
}
/* add word 1 components to the protocol tree */
diff --git a/epan/dissectors/packet-dcc.c b/epan/dissectors/packet-dcc.c
index 3be5cba167..af28a29ac3 100644
--- a/epan/dissectors/packet-dcc.c
+++ b/epan/dissectors/packet-dcc.c
@@ -107,8 +107,9 @@ static gint ett_dcc_trace = -1;
#define D_TARGET() \
- proto_tree_add_item_hidden(dcc_tree, hf_dcc_target, tvb, \
+ hidden_item = proto_tree_add_item(dcc_tree, hf_dcc_target, tvb, \
offset, sizeof(DCC_TGTS), FALSE); \
+ PROTO_ITEM_SET_HIDDEN(hidden_item); \
proto_tree_add_text(dcc_optree, tvb, offset, sizeof(DCC_TGTS), \
val_to_str(tvb_get_ntohl(tvb,offset), dcc_target_vals, "Targets (%u)")); \
offset += sizeof(DCC_TGTS); \
@@ -212,6 +213,7 @@ dissect_dcc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *dcc_tree, *dcc_optree, *dcc_opnumtree, *ti;
proto_tree *dcc_tracetree;
+ proto_item *hidden_item;
int offset = 0;
int client_is_le = 0;
int op = 0;
diff --git a/epan/dissectors/packet-dccp.c b/epan/dissectors/packet-dccp.c
index c5febbe4b5..908b1c7670 100644
--- a/epan/dissectors/packet-dccp.c
+++ b/epan/dissectors/packet-dccp.c
@@ -298,10 +298,11 @@ static void dissect_feature_options(proto_tree *dccp_options_tree, tvbuff_t *tvb
guint8 option_type)
{
guint8 feature_number = tvb_get_guint8(tvb, offset + 2);
- proto_item *dccp_item;
+ proto_item *dccp_item, *hidden_item;
int i;
- proto_tree_add_uint_hidden(dccp_options_tree, hf_dccp_feature_number, tvb, offset + 2, 1, feature_number);
+ hidden_item = proto_tree_add_uint(dccp_options_tree, hf_dccp_feature_number, tvb, offset + 2, 1, feature_number);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
dccp_item = proto_tree_add_text(dccp_options_tree, tvb, offset, option_len, "%s(",
val_to_str(option_type, dccp_feature_options_vals, "Unknown Type"));
@@ -367,7 +368,8 @@ static void dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *d
/* first byte is the option type */
option_type = tvb_get_guint8(tvb, offset);
- proto_tree_add_uint_hidden(dccp_options_tree, hf_dccp_option_type, tvb, offset, 1, option_type);
+ hidden_item = proto_tree_add_uint(dccp_options_tree, hf_dccp_option_type, tvb, offset, 1, option_type);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
if (option_type >= 32) { /* variable length options */
@@ -677,8 +679,10 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint_format_value(dccp_tree, hf_dccp_dstport, tvb, offset + 2, 2, dccph->dport,
"%s (%u)", get_dccp_port(dccph->dport), dccph->dport);
- proto_tree_add_uint_hidden(dccp_tree, hf_dccp_port, tvb, offset, 2, dccph->sport);
- proto_tree_add_uint_hidden(dccp_tree, hf_dccp_port, tvb, offset + 2, 2, dccph->dport);
+ hidden_item = proto_tree_add_uint(dccp_tree, hf_dccp_port, tvb, offset, 2, dccph->sport);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_uint(dccp_tree, hf_dccp_port, tvb, offset + 2, 2, dccph->dport);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_uint(dccp_tree, hf_dccp_data_offset, tvb, offset + 4, 1, dccph->data_offset);
proto_tree_add_uint(dccp_tree, hf_dccp_ccval, tvb, offset + 5, 1, dccph->ccval);
@@ -743,11 +747,13 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset + 6, 2, dccph->checksum, "0x%04x", dccph->checksum);
}
- proto_tree_add_uint_hidden(dccp_tree, hf_dccp_res1, tvb, offset + 8, 1, dccph->reserved1);
+ hidden_item = proto_tree_add_uint(dccp_tree, hf_dccp_res1, tvb, offset + 8, 1, dccph->reserved1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_uint(dccp_tree, hf_dccp_type, tvb, offset + 8, 1, dccph->type);
proto_tree_add_boolean(dccp_tree, hf_dccp_x, tvb, offset + 8, 1, dccph->x);
if(dccph->x) {
- proto_tree_add_uint_hidden(dccp_tree, hf_dccp_res2, tvb, offset + 9, 1, dccph->reserved2);
+ hidden_item = proto_tree_add_uint(dccp_tree, hf_dccp_res2, tvb, offset + 9, 1, dccph->reserved2);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_uint64(dccp_tree, hf_dccp_seq, tvb, offset + 10, 6, dccph->seq);
} else {
proto_tree_add_uint64(dccp_tree, hf_dccp_seq, tvb, offset + 9, 3, dccph->seq);
@@ -785,8 +791,10 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return;
}
dccph->ack_reserved=tvb_get_ntohs(tvb, offset);
- if(tree)
- proto_tree_add_uint_hidden(dccp_tree, hf_dccp_ack_res, tvb, offset, 2, dccph->ack_reserved);
+ if(tree) {
+ hidden_item = proto_tree_add_uint(dccp_tree, hf_dccp_ack_res, tvb, offset, 2, dccph->ack_reserved);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ }
dccph->ack=tvb_get_ntohs(tvb, offset+2);
dccph->ack<<=32;
dccph->ack+=tvb_get_ntohl(tvb, offset+4);
@@ -825,8 +833,10 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return;
}
dccph->ack_reserved=tvb_get_ntohs(tvb, offset);
- if(tree)
- proto_tree_add_uint_hidden(dccp_tree, hf_dccp_ack_res, tvb, offset, 2, dccph->ack_reserved);
+ if(tree) {
+ hidden_item = proto_tree_add_uint(dccp_tree, hf_dccp_ack_res, tvb, offset, 2, dccph->ack_reserved);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ }
dccph->ack=tvb_get_ntohs(tvb, offset+2);
dccph->ack<<=32;
dccph->ack+=tvb_get_ntohl(tvb, offset+4);
@@ -843,8 +853,10 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return;
}
dccph->ack_reserved=tvb_get_guint8(tvb, offset);
- if(tree)
- proto_tree_add_uint_hidden(dccp_tree, hf_dccp_ack_res, tvb, offset, 1, dccph->ack_reserved);
+ if(tree) {
+ hidden_item = proto_tree_add_uint(dccp_tree, hf_dccp_ack_res, tvb, offset, 1, dccph->ack_reserved);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ }
dccph->ack=tvb_get_guint8(tvb, offset+1);
dccph->ack<<=16;
dccph->ack+=tvb_get_ntohs(tvb, offset+2);
@@ -864,8 +876,10 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return;
}
dccph->ack_reserved=tvb_get_ntohs(tvb, offset);
- if(tree)
- proto_tree_add_uint_hidden(dccp_tree, hf_dccp_ack_res, tvb, offset, 2, dccph->ack_reserved);
+ if(tree) {
+ hidden_item = proto_tree_add_uint(dccp_tree, hf_dccp_ack_res, tvb, offset, 2, dccph->ack_reserved);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ }
dccph->ack=tvb_get_ntohs(tvb, offset+2);
dccph->ack<<=32;
dccph->ack+=tvb_get_ntohl(tvb, offset+4);
@@ -902,8 +916,10 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return;
}
dccph->ack_reserved=tvb_get_ntohs(tvb, offset);
- if(tree)
- proto_tree_add_uint_hidden(dccp_tree, hf_dccp_ack_res, tvb, offset, 2, dccph->ack_reserved);
+ if(tree) {
+ hidden_item = proto_tree_add_uint(dccp_tree, hf_dccp_ack_res, tvb, offset, 2, dccph->ack_reserved);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ }
dccph->ack=tvb_get_ntohs(tvb, offset+2);
dccph->ack<<=32;
dccph->ack+=tvb_get_ntohl(tvb, offset+4);
diff --git a/epan/dissectors/packet-dcerpc-spoolss.c b/epan/dissectors/packet-dcerpc-spoolss.c
index 1f75407913..c9297ecdea 100644
--- a/epan/dissectors/packet-dcerpc-spoolss.c
+++ b/epan/dissectors/packet-dcerpc-spoolss.c
@@ -623,7 +623,7 @@ static int dissect_printerdata_data(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
guint8 *drep _U_, guint32 type)
{
- proto_item *item;
+ proto_item *item, *hidden_item;
proto_tree *subtree;
guint32 size;
@@ -650,9 +650,10 @@ static int dissect_printerdata_data(tvbuff_t *tvb, int offset,
col_append_fstr(
pinfo->cinfo, COL_INFO, " = %s", data);
- proto_tree_add_string_hidden(
+ hidden_item = proto_tree_add_string(
tree, hf_printerdata_data_sz, tvb,
offset - size, size, data);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
g_free(data);
@@ -668,9 +669,10 @@ static int dissect_printerdata_data(tvbuff_t *tvb, int offset,
pinfo->cinfo, COL_INFO, " = 0x%08x",
data);
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_printerdata_data_dword, tvb,
offset - size, 4, data);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
break;
}
@@ -702,9 +704,11 @@ static int SpoolssGetPrinterData_q(tvbuff_t *tvb, int offset,
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
char *value_name;
+ proto_item *hidden_item;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_printerdata, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -742,9 +746,11 @@ static int SpoolssGetPrinterData_r(tvbuff_t *tvb, int offset,
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
guint32 type;
+ proto_item *hidden_item;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_printerdata, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -780,9 +786,11 @@ static int SpoolssGetPrinterDataEx_q(tvbuff_t *tvb, int offset,
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
char *key_name, *value_name;
+ proto_item *hidden_item;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_printerdata, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -826,9 +834,11 @@ static int SpoolssGetPrinterDataEx_r(tvbuff_t *tvb, int offset,
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
guint32 size, type;
+ proto_item *hidden_item;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_printerdata, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -868,9 +878,11 @@ static int SpoolssSetPrinterData_q(tvbuff_t *tvb, int offset,
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
char *value_name;
guint32 type;
+ proto_item *hidden_item;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_printerdata, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -912,8 +924,11 @@ static int SpoolssSetPrinterData_r(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
guint8 *drep _U_)
{
- proto_tree_add_uint_hidden(
+ proto_item *hidden_item;
+
+ hidden_item = proto_tree_add_uint(
tree, hf_printerdata, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -937,9 +952,11 @@ static int SpoolssSetPrinterDataEx_q(tvbuff_t *tvb, int offset,
{
char *key_name, *value_name;
guint32 max_len;
+ proto_item *hidden_item;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_printerdata, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -986,8 +1003,11 @@ static int SpoolssSetPrinterDataEx_r(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
guint8 *drep _U_)
{
- proto_tree_add_uint_hidden(
+ proto_item *hidden_item;
+
+ hidden_item = proto_tree_add_uint(
tree, hf_printerdata, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -1318,9 +1338,11 @@ dissect_DEVMODE_fields(tvbuff_t *tvb, gint offset, packet_info *pinfo,
proto_item *item;
proto_tree *subtree;
guint32 fields;
+ proto_item *hidden_item;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_devmode, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, drep,
hf_devmode_fields, &fields);
@@ -3596,9 +3618,11 @@ static int SpoolssEnumForms_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
guint32 level;
+ proto_item *hidden_item;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_form, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -3634,9 +3658,11 @@ static int SpoolssEnumForms_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
BUFFER buffer;
guint32 level = GPOINTER_TO_UINT(dcv->se_data), i, count;
int buffer_offset;
+ proto_item *hidden_item;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_form, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -3760,9 +3786,11 @@ static int SpoolssEnumPrinterData_q(tvbuff_t *tvb, int offset,
guint8 *drep _U_)
{
guint32 ndx;
+ proto_item *hidden_item;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_printerdata, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -3796,9 +3824,11 @@ static int SpoolssEnumPrinterData_r(tvbuff_t *tvb, int offset,
char *value;
proto_item *value_item;
proto_tree *value_subtree;
+ proto_item *hidden_item;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_printerdata, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -3823,8 +3853,9 @@ static int SpoolssEnumPrinterData_r(tvbuff_t *tvb, int offset,
proto_item_append_text(value_item, ": %s", value);
- proto_tree_add_string_hidden(
+ hidden_item = proto_tree_add_string(
tree, hf_printerdata_value, tvb, offset, 0, value);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
g_free(value);
}
@@ -4137,9 +4168,11 @@ static int SpoolssAddForm_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
guint32 level;
+ proto_item *hidden_item;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_form, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -4166,8 +4199,11 @@ static int SpoolssAddForm_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int SpoolssAddForm_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, guint8 *drep _U_)
{
- proto_tree_add_uint_hidden(
+ proto_item *hidden_item;
+
+ hidden_item = proto_tree_add_uint(
tree, hf_form, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -4184,10 +4220,12 @@ static int SpoolssAddForm_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int SpoolssDeleteForm_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, guint8 *drep _U_)
{
+ proto_item *hidden_item;
char *name = NULL;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_form, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -4210,8 +4248,11 @@ static int SpoolssDeleteForm_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int SpoolssDeleteForm_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, guint8 *drep _U_)
{
- proto_tree_add_uint_hidden(
+ proto_item *hidden_item;
+
+ hidden_item = proto_tree_add_uint(
tree, hf_form, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -4230,9 +4271,11 @@ static int SpoolssSetForm_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
{
char *name = NULL;
guint32 level;
+ proto_item *hidden_item;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_form, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -4263,8 +4306,11 @@ static int SpoolssSetForm_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int SpoolssSetForm_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, guint8 *drep _U_)
{
- proto_tree_add_uint_hidden(
+ proto_item *hidden_item;
+
+ hidden_item = proto_tree_add_uint(
tree, hf_form, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -4283,11 +4329,13 @@ static int SpoolssGetForm_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
{
dcerpc_info *di = (dcerpc_info *)pinfo->private_data;
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
+ proto_item *hidden_item;
guint32 level;
char *name;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_form, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -4329,9 +4377,11 @@ static int SpoolssGetForm_r(tvbuff_t *tvb, int offset, packet_info *pinfo,
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
BUFFER buffer;
guint32 level = GPOINTER_TO_UINT(dcv->se_data);
+ proto_item *hidden_item;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_form, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -5168,9 +5218,11 @@ static int SpoolssDeletePrinterData_q(tvbuff_t *tvb, int offset,
guint8 *drep)
{
char *value_name;
+ proto_item *hidden_item;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_printerdata, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -5194,8 +5246,11 @@ static int SpoolssDeletePrinterData_r(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
guint8 *drep)
{
- proto_tree_add_uint_hidden(
+ proto_item *hidden_item;
+
+ hidden_item = proto_tree_add_uint(
tree, hf_printerdata, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -5724,6 +5779,7 @@ static void cb_notify_str_postprocess(packet_info *pinfo _U_,
gint levels, hf_index = GPOINTER_TO_INT(callback_args);
guint32 len;
char *s;
+ proto_item *hidden_item;
/* Align start_offset on 4-byte boundary. */
@@ -5759,9 +5815,11 @@ static void cb_notify_str_postprocess(packet_info *pinfo _U_,
/* Add hidden field so filter brings up any notify data */
- if (hf_index != -1)
- proto_tree_add_string_hidden(
+ if (hf_index != -1) {
+ hidden_item = proto_tree_add_string(
tree, hf_index, tvb, start_offset, len, s);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ }
g_free(s);
}
@@ -5996,6 +6054,7 @@ dissect_NOTIFY_INFO_DATA_job(tvbuff_t *tvb, int offset, packet_info *pinfo,
guint16 field)
{
guint32 value1;
+ proto_item *hidden_item;
switch (field) {
@@ -6070,9 +6129,10 @@ dissect_NOTIFY_INFO_DATA_job(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_item_append_text(item, ": %d", value);
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, job_notify_hf_index(field), tvb,
offset, 4, value);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
break;
}
@@ -6516,9 +6576,11 @@ static int SpoolssEnumPrinterDataEx_q(tvbuff_t *tvb, int offset,
guint8 *drep)
{
char *key_name;
+ proto_item *hidden_item;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_printerdata, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
@@ -6678,9 +6740,11 @@ static int SpoolssEnumPrinterDataEx_r(tvbuff_t *tvb, int offset,
guint8 *drep)
{
guint32 size, num_values;
+ proto_item *hidden_item;
- proto_tree_add_uint_hidden(
+ hidden_item = proto_tree_add_uint(
tree, hf_printerdata, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c
index 78ab7c3853..c27a326b74 100644
--- a/epan/dissectors/packet-dmp.c
+++ b/epan/dissectors/packet-dmp.c
@@ -2327,6 +2327,7 @@ static gint dissect_dmp_ack (tvbuff_t *tvb, packet_info *pinfo,
{
proto_tree *ack_tree = NULL, *recip_tree = NULL;
proto_item *en = NULL, *rt = NULL;
+ proto_item *hidden_item;
guint prev_rec_no = 0;
gint rec_len, rec_no = 0;
gint boffset = offset;
@@ -2351,7 +2352,8 @@ static gint dissect_dmp_ack (tvbuff_t *tvb, packet_info *pinfo,
/* Subject Message Identifier */
dmp.subj_id = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (ack_tree, hf_message_subj_id, tvb, offset, 2, FALSE);
- proto_tree_add_item_hidden (ack_tree, hf_dmp_id, tvb, offset, 2, FALSE);
+ hidden_item = proto_tree_add_item (ack_tree, hf_dmp_id, tvb, offset, 2, FALSE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
offset += 2;
if (use_seq_ack_analysis) {
@@ -2389,6 +2391,7 @@ static gint dissect_dmp_envelope (tvbuff_t *tvb, packet_info *pinfo,
proto_tree *envelope_tree = NULL;
proto_tree *field_tree = NULL;
proto_item *en = NULL, *tf = NULL, *vf = NULL;
+ proto_item *hidden_item;
guint8 envelope, prot_id, time_diff;
guint16 subm_time, no_rec, value16;
gint32 secs = 0;
@@ -2504,8 +2507,9 @@ static gint dissect_dmp_envelope (tvbuff_t *tvb, packet_info *pinfo,
dmp.msg_id = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (envelope_tree, hf_envelope_msg_id, tvb, offset,
2, FALSE);
- proto_tree_add_item_hidden (envelope_tree, hf_dmp_id, tvb, offset,
+ hidden_item = proto_tree_add_item (envelope_tree, hf_dmp_id, tvb, offset,
2, FALSE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
offset += 2;
/* Submission Time */
@@ -3097,6 +3101,7 @@ static gint dissect_dmp_content (tvbuff_t *tvb, packet_info *pinfo,
proto_tree *message_tree = NULL;
proto_tree *field_tree = NULL;
proto_item *en = NULL, *tf = NULL, *tr = NULL;
+ proto_item *hidden_item;
guint8 message, dmp_sec_pol, dmp_sec_class, exp_time, dtg;
gint32 secs = 0;
gchar *sec_cat = NULL;
@@ -3425,8 +3430,9 @@ static gint dissect_dmp_content (tvbuff_t *tvb, packet_info *pinfo,
dmp.subj_id = tvb_get_ntohs (tvb, offset);
proto_tree_add_item (message_tree, hf_message_subj_id, tvb, offset,
2, FALSE);
- proto_tree_add_item_hidden (message_tree, hf_dmp_id, tvb, offset,
+ hidden_item = proto_tree_add_item (message_tree, hf_dmp_id, tvb, offset,
2, FALSE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
offset += 2;
}
diff --git a/epan/dissectors/packet-edonkey.c b/epan/dissectors/packet-edonkey.c
index a739c14f31..11b6e3c0dc 100644
--- a/epan/dissectors/packet-edonkey.c
+++ b/epan/dissectors/packet-edonkey.c
@@ -850,13 +850,14 @@ static int dissect_kademlia_tagname(tvbuff_t *tvb, packet_info *pinfo _U_,
/* <String> ::= <String length (guint16)> DATA */
const gchar * tagname;
const gchar * tag_full_name = NULL;
- proto_item *ti;
+ proto_item *ti, *hidden_item;
guint16 string_length = tvb_get_letohs(tvb, offset);
proto_tree_add_uint(tree, hf_kademlia_tag_name_length, tvb, offset, 2, string_length);
- proto_tree_add_uint_hidden(tree, hf_edonkey_string_length, tvb, offset, 2, string_length);
+ hidden_item = proto_tree_add_uint(tree, hf_edonkey_string_length, tvb, offset, 2, string_length);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
tagname = tvb_get_ephemeral_string( tvb, offset + 2, string_length );
@@ -957,8 +958,11 @@ static int dissect_kademlia_hash(tvbuff_t *tvb, packet_info *pinfo _U_,
static int dissect_kademlia_hash_hidden(tvbuff_t *tvb, packet_info *pinfo _U_,
int offset, proto_tree *tree)
{
+ proto_item *hidden_item;
+
/* <File hash> ::= HASH (16 word MD4 digest) */
- proto_tree_add_item_hidden(tree, hf_kademlia_hash, tvb, offset, 16, FALSE);
+ hidden_item = proto_tree_add_item(tree, hf_kademlia_hash, tvb, offset, 16, FALSE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
return offset+16;
}
@@ -1014,10 +1018,13 @@ static int dissect_kademlia_tag_bsob(tvbuff_t *tvb, packet_info *pinfo _U_,
static int dissect_kademlia_tag_string(tvbuff_t *tvb, packet_info *pinfo _U_,
int offset, proto_tree *tree, const gchar** string_value)
{
+ proto_item *hidden_item;
guint16 string_length = tvb_get_letohs(tvb, offset);
- proto_tree_add_uint_hidden(tree, hf_edonkey_string_length, tvb, offset, 2, string_length);
- proto_tree_add_item_hidden(tree, hf_edonkey_string, tvb, offset+2, string_length, FALSE);
+ hidden_item = proto_tree_add_uint(tree, hf_edonkey_string_length, tvb, offset, 2, string_length);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_item(tree, hf_edonkey_string, tvb, offset+2, string_length, FALSE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
*string_value = tvb_get_ephemeral_string(tvb, offset + 2, string_length);
proto_tree_add_item(tree, hf_kademlia_tag_string, tvb, offset + 2, string_length, FALSE);
@@ -2475,8 +2482,10 @@ static int dissect_kademlia_udp_message(guint8 msg_type,
int offset, int length, proto_tree *tree)
{
int msg_start, msg_end, bytes_remaining;
+ proto_item *hidden_item;
- proto_tree_add_item_hidden(tree, hf_kademlia, tvb, offset, 1, FALSE);
+ hidden_item = proto_tree_add_item(tree, hf_kademlia, tvb, offset, 1, FALSE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
bytes_remaining = tvb_reported_length_remaining(tvb, offset);
if ((length < 0) || (length > bytes_remaining)) length = bytes_remaining;
diff --git a/epan/dissectors/packet-fcp.c b/epan/dissectors/packet-fcp.c
index f5d1f5f3ee..d010066f6f 100644
--- a/epan/dissectors/packet-fcp.c
+++ b/epan/dissectors/packet-fcp.c
@@ -399,10 +399,11 @@ dissect_fcp_cmnd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, pro
int len,
add_len = 0;
guint8 flags, rwflags, lun0;
- guint16 lun=0xffff;
+ guint16 lun=0xffff;
tvbuff_t *cdb_tvb;
int tvb_len, tvb_rlen;
itl_nexus_t *itl=NULL;
+ proto_item *hidden_item;
/* Determine the length of the FCP part of the packet */
flags = tvb_get_guint8 (tvb, offset+10);
@@ -416,7 +417,8 @@ dissect_fcp_cmnd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, pro
len = FCP_DEF_CMND_LEN;
}
- proto_tree_add_uint_hidden(tree, hf_fcp_type, tvb, offset, 0, 0);
+ hidden_item = proto_tree_add_uint(tree, hf_fcp_type, tvb, offset, 0, 0);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
lun0 = tvb_get_guint8 (tvb, offset);
@@ -500,15 +502,15 @@ dissect_fcp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, con
static void
dissect_fcp_rspinfo(tvbuff_t *tvb, proto_tree *tree, int offset)
{
- /* 2 reserved bytes */
- offset+=2;
+ /* 2 reserved bytes */
+ offset+=2;
- /* rsp code */
- proto_tree_add_item(tree, hf_fcp_rspcode, tvb, offset, 1, 0);
- offset++;
+ /* rsp code */
+ proto_tree_add_item(tree, hf_fcp_rspcode, tvb, offset, 1, 0);
+ offset++;
- /* 4 reserved bytes */
- offset+=4;
+ /* 4 reserved bytes */
+ offset+=4;
}
static void
@@ -519,6 +521,7 @@ dissect_fcp_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, prot
rsplen = 0;
guint8 flags;
guint8 status;
+ proto_item *hidden_item;
status = tvb_get_guint8 (tvb, offset+11);
@@ -527,86 +530,87 @@ dissect_fcp_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, prot
val_to_str (status, scsi_status_val, "0x%x"));
}
- proto_tree_add_uint_hidden(tree, hf_fcp_type, tvb, offset, 0, 0);
+ hidden_item = proto_tree_add_uint(tree, hf_fcp_type, tvb, offset, 0, 0);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ /* 8 reserved bytes */
+ offset+=8;
- /* 8 reserved bytes */
- offset+=8;
+ /* retry delay timer */
+ proto_tree_add_item(tree, hf_fcp_retry_delay_timer, tvb, offset, 2, 0);
+ offset+=2;
- /* retry delay timer */
- proto_tree_add_item(tree, hf_fcp_retry_delay_timer, tvb, offset, 2, 0);
- offset+=2;
+ /* flags */
+ flags = tvb_get_guint8 (tvb, offset);
+ dissect_rsp_flags(tree, tvb, offset);
+ offset++;
- /* flags */
- flags = tvb_get_guint8 (tvb, offset);
- dissect_rsp_flags(tree, tvb, offset);
- offset++;
+ /* scsi status code */
+ proto_tree_add_item(tree, hf_fcp_scsistatus, tvb, offset, 1, 0);
+ dissect_scsi_rsp(tvb, pinfo, parent_tree, fchdr->itlq, itl, tvb_get_guint8(tvb, offset));
+ offset++;
- /* scsi status code */
- proto_tree_add_item(tree, hf_fcp_scsistatus, tvb, offset, 1, 0);
- dissect_scsi_rsp(tvb, pinfo, parent_tree, fchdr->itlq, itl, tvb_get_guint8(tvb, offset));
- offset++;
-
- /* residual count */
- if(flags & 0x0e){
- proto_tree_add_item(tree, hf_fcp_resid, tvb, offset, 4, 0);
- }
- offset+=4;
+ /* residual count */
+ if(flags & 0x0e){
+ proto_tree_add_item(tree, hf_fcp_resid, tvb, offset, 4, 0);
+ }
+ offset+=4;
- /* sense length */
- if (flags & 0x2) {
- snslen=tvb_get_ntohl(tvb, offset);
- proto_tree_add_uint(tree, hf_fcp_snslen, tvb, offset, 4,
- snslen);
- }
- offset+=4;
+ /* sense length */
+ if (flags & 0x2) {
+ snslen=tvb_get_ntohl(tvb, offset);
+ proto_tree_add_uint(tree, hf_fcp_snslen, tvb, offset, 4,
+ snslen);
+ }
+ offset+=4;
- /* response length */
- if (flags & 0x1) {
- rsplen=tvb_get_ntohl(tvb, offset);
- proto_tree_add_uint(tree, hf_fcp_rsplen, tvb, offset, 4,
- rsplen);
- }
- offset+=4;
+ /* response length */
+ if (flags & 0x1) {
+ rsplen=tvb_get_ntohl(tvb, offset);
+ proto_tree_add_uint(tree, hf_fcp_rsplen, tvb, offset, 4,
+ rsplen);
+ }
+ offset+=4;
- /* rsp_info */
- if(rsplen){
- tvbuff_t *rspinfo_tvb;
+ /* rsp_info */
+ if(rsplen){
+ tvbuff_t *rspinfo_tvb;
- rspinfo_tvb=tvb_new_subset(tvb, offset, MIN(rsplen, tvb_length_remaining(tvb, offset)), rsplen);
- dissect_fcp_rspinfo(tvb, tree, 0);
+ rspinfo_tvb=tvb_new_subset(tvb, offset, MIN(rsplen, tvb_length_remaining(tvb, offset)), rsplen);
+ dissect_fcp_rspinfo(tvb, tree, 0);
- offset+=rsplen;
- }
+ offset+=rsplen;
+ }
- /* sense info */
- if(snslen){
- tvbuff_t *sns_tvb;
+ /* sense info */
+ if(snslen){
+ tvbuff_t *sns_tvb;
- sns_tvb=tvb_new_subset(tvb, offset, MIN(snslen, tvb_length_remaining(tvb, offset)), snslen);
- dissect_scsi_snsinfo (sns_tvb, pinfo, parent_tree, 0,
- snslen,
- fchdr->itlq, itl);
+ sns_tvb=tvb_new_subset(tvb, offset, MIN(snslen, tvb_length_remaining(tvb, offset)), snslen);
+ dissect_scsi_snsinfo (sns_tvb, pinfo, parent_tree, 0,
+ snslen,
+ fchdr->itlq, itl);
- offset+=snslen;
- }
+ offset+=snslen;
+ }
- /* bidir read resid (only present for bidirectional responses) */
- if(flags&0x80){
- if(flags&0x60){
- proto_tree_add_item(tree, hf_fcp_bidir_resid, tvb, offset, 4, 0);
- }
- offset+=4;
+ /* bidir read resid (only present for bidirectional responses) */
+ if(flags&0x80){
+ if(flags&0x60){
+ proto_tree_add_item(tree, hf_fcp_bidir_resid, tvb, offset, 4, 0);
}
+ offset+=4;
+ }
}
static void
dissect_fcp_xfer_rdy(tvbuff_t *tvb, proto_tree *tree)
{
int offset = 0;
+ proto_item *hidden_item;
-
- proto_tree_add_uint_hidden(tree, hf_fcp_type, tvb, offset, 0, 0);
+ hidden_item = proto_tree_add_uint(tree, hf_fcp_type, tvb, offset, 0, 0);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_item(tree, hf_fcp_data_ro, tvb, offset, 4, 0);
proto_tree_add_item(tree, hf_fcp_burstlen, tvb, offset+4, 4, 0);
diff --git a/epan/dissectors/packet-fddi.c b/epan/dissectors/packet-fddi.c
index 49fb89ba2d..0195c25282 100644
--- a/epan/dissectors/packet-fddi.c
+++ b/epan/dissectors/packet-fddi.c
@@ -267,7 +267,7 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
gboolean bitswapped)
{
proto_tree *fh_tree = NULL;
- proto_item *ti;
+ proto_item *ti, *hidden_item;
const gchar *fc_str;
proto_tree *fc_tree;
static guchar src[6], dst[6];
@@ -333,11 +333,14 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (fh_tree) {
proto_tree_add_ether(fh_tree, hf_fddi_dst, tvb, FDDI_P_DHOST + FDDI_PADDING, 6, dst);
- proto_tree_add_ether_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_DHOST + FDDI_PADDING, 6, dst);
+ hidden_item = proto_tree_add_ether(fh_tree, hf_fddi_addr, tvb, FDDI_P_DHOST + FDDI_PADDING, 6, dst);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* hide some bit-swapped mac address fields in the proto_tree, just in case */
- proto_tree_add_ether_hidden(fh_tree, hf_fddi_dst, tvb, FDDI_P_DHOST + FDDI_PADDING, 6, dst_swapped);
- proto_tree_add_ether_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_DHOST + FDDI_PADDING, 6, dst_swapped);
+ hidden_item = proto_tree_add_ether(fh_tree, hf_fddi_dst, tvb, FDDI_P_DHOST + FDDI_PADDING, 6, dst_swapped);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_ether(fh_tree, hf_fddi_addr, tvb, FDDI_P_DHOST + FDDI_PADDING, 6, dst_swapped);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
}
/* Extract the source address, possibly bit-swapping it. */
@@ -355,11 +358,14 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (fh_tree) {
proto_tree_add_ether(fh_tree, hf_fddi_src, tvb, FDDI_P_SHOST + FDDI_PADDING, 6, src);
- proto_tree_add_ether_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_SHOST + FDDI_PADDING, 6, src);
+ hidden_item = proto_tree_add_ether(fh_tree, hf_fddi_addr, tvb, FDDI_P_SHOST + FDDI_PADDING, 6, src);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* hide some bit-swapped mac address fields in the proto_tree, just in case */
- proto_tree_add_ether_hidden(fh_tree, hf_fddi_src, tvb, FDDI_P_SHOST + FDDI_PADDING, 6, src_swapped);
- proto_tree_add_ether_hidden(fh_tree, hf_fddi_addr, tvb, FDDI_P_SHOST + FDDI_PADDING, 6, src_swapped);
+ hidden_item = proto_tree_add_ether(fh_tree, hf_fddi_src, tvb, FDDI_P_SHOST + FDDI_PADDING, 6, src_swapped);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_ether(fh_tree, hf_fddi_addr, tvb, FDDI_P_SHOST + FDDI_PADDING, 6, src_swapped);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
}
next_tvb = tvb_new_subset(tvb, FDDI_HEADER_SIZE + FDDI_PADDING, -1, -1);
diff --git a/epan/dissectors/packet-fr.c b/epan/dissectors/packet-fr.c
index 41c2e92c7f..15835efa49 100644
--- a/epan/dissectors/packet-fr.c
+++ b/epan/dissectors/packet-fr.c
@@ -747,9 +747,12 @@ static void dissect_fr_nlpid(tvbuff_t *tvb, int offset, packet_info *pinfo,
* Yes, we got a match. Add the NLPID as a hidden item,
* so you can, at least, filter on it.
*/
- if (tree)
- proto_tree_add_uint_hidden(fr_tree, hf_fr_nlpid,
- tvb, offset, 1, fr_nlpid );
+ if (tree) {
+ proto_item *hidden_item;
+ hidden_item = proto_tree_add_uint(fr_tree, hf_fr_nlpid,
+ tvb, offset, 1, fr_nlpid );
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ }
return;
}
diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c
index ae21499dd7..303951e606 100644
--- a/epan/dissectors/packet-ipv6.c
+++ b/epan/dissectors/packet-ipv6.c
@@ -1414,7 +1414,8 @@ again:
}
#ifdef TEST_FINALHDR
- proto_tree_add_uint_hidden(ipv6_tree, hf_ipv6_final, tvb, poffset, 1, nxt);
+ ti = proto_tree_add_uint(ipv6_tree, hf_ipv6_final, tvb, poffset, 1, nxt);
+ PROTO_ITEM_SET_HIDDEN(ti);
#endif
/* collect packet info */
diff --git a/epan/dissectors/packet-isl.c b/epan/dissectors/packet-isl.c
index 35c98be408..14f7b4e738 100644
--- a/epan/dissectors/packet-isl.c
+++ b/epan/dissectors/packet-isl.c
@@ -148,7 +148,7 @@ void
dissect_isl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int fcs_len)
{
proto_tree *volatile fh_tree = NULL;
- proto_item *ti;
+ proto_item *ti, *hidden_item;
guint8 type;
volatile guint16 length;
gint captured_length;
@@ -169,7 +169,8 @@ dissect_isl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int fcs_len)
"ISL");
fh_tree = proto_item_add_subtree(ti, ett_isl);
proto_tree_add_item(fh_tree, hf_isl_dst, tvb, 0, 5, FALSE);
- proto_tree_add_item_hidden(fh_tree, hf_isl_addr, tvb, 0, 6, FALSE);
+ hidden_item = proto_tree_add_item(fh_tree, hf_isl_addr, tvb, 0, 6, FALSE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_item(fh_tree, hf_isl_type, tvb, 5, 1, FALSE);
switch (type) {
@@ -184,7 +185,8 @@ dissect_isl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int fcs_len)
break;
}
proto_tree_add_item(fh_tree, hf_isl_src, tvb, 6, 6, FALSE);
- proto_tree_add_item_hidden(fh_tree, hf_isl_addr, tvb, 6, 6, FALSE);
+ hidden_item = proto_tree_add_item(fh_tree, hf_isl_addr, tvb, 6, 6, FALSE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
}
length = tvb_get_ntohs(tvb, 12);
if (tree)
diff --git a/epan/dissectors/packet-isup.c b/epan/dissectors/packet-isup.c
index b24444603e..cb089a5a7e 100644
--- a/epan/dissectors/packet-isup.c
+++ b/epan/dissectors/packet-isup.c
@@ -1891,6 +1891,7 @@ dissect_isup_called_party_number_parameter(tvbuff_t *parameter_tvb, proto_tree *
{
proto_item *address_digits_item;
proto_tree *address_digits_tree;
+ proto_item *hidden_item;
guint8 indicators1, indicators2;
guint8 address_digit_pair=0;
gint offset=0;
@@ -1944,8 +1945,9 @@ dissect_isup_called_party_number_parameter(tvbuff_t *parameter_tvb, proto_tree *
e164_info.E164_number_str = called_number;
e164_info.E164_number_length = i - 1;
dissect_e164_number(parameter_tvb, address_digits_tree, 2, (offset - 2), e164_info);
- proto_tree_add_string_hidden(address_digits_tree, hf_isup_called, parameter_tvb,
- offset - length, length, called_number);
+ hidden_item = proto_tree_add_string(address_digits_tree, hf_isup_called, parameter_tvb,
+ offset - length, length, called_number);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
} else {
proto_tree_add_string(address_digits_tree, hf_isup_called, parameter_tvb,
offset - length, length, called_number);
@@ -3646,6 +3648,7 @@ dissect_isup_calling_party_number_parameter(tvbuff_t *parameter_tvb, proto_tree
{
proto_item *address_digits_item;
proto_tree *address_digits_tree;
+ proto_item *hidden_item;
guint8 indicators1, indicators2;
guint8 address_digit_pair=0;
gint offset=0;
@@ -3703,8 +3706,9 @@ dissect_isup_calling_party_number_parameter(tvbuff_t *parameter_tvb, proto_tree
e164_info.E164_number_str = calling_number;
e164_info.E164_number_length = i - 1;
dissect_e164_number(parameter_tvb, address_digits_tree, 2, (offset - 2), e164_info);
- proto_tree_add_string_hidden(address_digits_tree, hf_isup_calling, parameter_tvb,
+ hidden_item = proto_tree_add_string(address_digits_tree, hf_isup_calling, parameter_tvb,
offset - length, length, calling_number);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
} else {
proto_tree_add_string(address_digits_tree, hf_isup_calling, parameter_tvb,
offset - length, length, calling_number);
diff --git a/epan/dissectors/packet-m2ua.c b/epan/dissectors/packet-m2ua.c
index ff5492b417..8544e3080a 100644
--- a/epan/dissectors/packet-m2ua.c
+++ b/epan/dissectors/packet-m2ua.c
@@ -900,7 +900,9 @@ dissect_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *tree,
if ((protocol_data_1_global == PROTOCOL_DATA_1_DRAFT_7) &&
(tag == PROTOCOL_DATA_1_DRAFT_7))
{
- proto_tree_add_uint_hidden(parameter_tree, hf_parameter_tag, parameter_tvb, PARAMETER_TAG_OFFSET, PARAMETER_TAG_LENGTH, tag);
+ proto_item *hidden_item;
+ hidden_item = proto_tree_add_uint(parameter_tree, hf_parameter_tag, parameter_tvb, PARAMETER_TAG_OFFSET, PARAMETER_TAG_LENGTH, tag);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* add tag and length to the m2ua tree */
proto_tree_add_text(parameter_tree, parameter_tvb, PARAMETER_TAG_OFFSET, PARAMETER_TAG_LENGTH,
diff --git a/epan/dissectors/packet-mdshdr.c b/epan/dissectors/packet-mdshdr.c
index 263381fd87..84f2954550 100644
--- a/epan/dissectors/packet-mdshdr.c
+++ b/epan/dissectors/packet-mdshdr.c
@@ -158,6 +158,7 @@ dissect_mdshdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Set up structures needed to add the protocol subtree and manage it */
proto_item *ti_main, *ti_hdr, *ti_trlr;
+ proto_item *hidden_item;
proto_tree *mdshdr_tree_main, *mdshdr_tree_hdr, *mdshdr_tree_trlr;
int offset = 0;
guint pktlen;
@@ -228,8 +229,9 @@ dissect_mdshdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
MDSHDR_HEADER_SIZE, "MDS Header");
mdshdr_tree_hdr = proto_item_add_subtree (ti_hdr, ett_mdshdr_hdr);
- proto_tree_add_item_hidden (mdshdr_tree_hdr, hf_mdshdr_sof, tvb, MDSHDR_SOF_OFFSET,
+ hidden_item = proto_tree_add_item (mdshdr_tree_hdr, hf_mdshdr_sof, tvb, MDSHDR_SOF_OFFSET,
MDSHDR_SIZE_BYTE, 0);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_item (mdshdr_tree_hdr, hf_mdshdr_pkt_len, tvb, MDSHDR_PKTLEN_OFFSET,
MDSHDR_SIZE_INT16, 0);
proto_tree_add_item (mdshdr_tree_hdr, hf_mdshdr_dstidx, tvb, MDSHDR_DIDX_OFFSET,
@@ -238,9 +240,10 @@ dissect_mdshdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
MDSHDR_SIZE_INT16, 0);
proto_tree_add_item (mdshdr_tree_hdr, hf_mdshdr_vsan, tvb, MDSHDR_VSAN_OFFSET,
MDSHDR_SIZE_INT16, 0);
- proto_tree_add_uint_hidden(mdshdr_tree_hdr, hf_mdshdr_span,
+ hidden_item = proto_tree_add_uint(mdshdr_tree_hdr, hf_mdshdr_span,
tvb, MDSHDR_VSAN_OFFSET,
MDSHDR_SIZE_BYTE, span_id);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Add Mdshdr Trailer part */
if (tvb_length (tvb) >= MDSHDR_HEADER_SIZE + pktlen) {
diff --git a/epan/dissectors/packet-megaco.c b/epan/dissectors/packet-megaco.c
index f9aae24066..123bb3b75b 100644
--- a/epan/dissectors/packet-megaco.c
+++ b/epan/dissectors/packet-megaco.c
@@ -332,6 +332,7 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint32 ctx_id = 0;
gcp_cmd_type_t cmd_type = GCP_CMD_NONE;
gcp_wildcard_t wild_term = GCP_WILDCARD_NONE;
+ proto_item *hidden_item;
top_tree=tree;
/* Initialize variables */
@@ -464,8 +465,10 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(message_tree, hf_megaco_version,tvb, ver_offset, ver_length, FALSE);
proto_tree_add_item(message_tree, hf_megaco_mId,tvb, mId_offset, mId_length, FALSE);
}else{
- proto_tree_add_item_hidden(message_tree, hf_megaco_version,tvb, ver_offset, ver_length, FALSE);
- proto_tree_add_item_hidden(message_tree, hf_megaco_mId,tvb, mId_offset, mId_length, FALSE);
+ hidden_item = proto_tree_add_item(message_tree, hf_megaco_version,tvb, ver_offset, ver_length, FALSE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_item(message_tree, hf_megaco_mId,tvb, mId_offset, mId_length, FALSE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
}
}
@@ -2810,21 +2813,23 @@ dissect_megaco_errordescriptor(tvbuff_t *tvb, proto_tree *megaco_tree_command_li
guint8 error[4];
gint tvb_next_offset, tvb_current_offset,tvb_len;
proto_item* item;
+ proto_item* hidden_item;
tvb_len = tvb_length(tvb);
tokenlen = 0;
- tvb_next_offset = 0;
- tvb_current_offset = 0;
+ tvb_next_offset = 0;
+ tvb_current_offset = 0;
tvb_len = 0;
tvb_current_offset = tvb_find_guint8(tvb, tvb_previous_offset , tvb_RBRKT, '=');
tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_current_offset +1);
tvb_get_nstringz0(tvb,tvb_current_offset,4,error);
error_code = atoi(error);
- proto_tree_add_string_hidden(megaco_tree_command_line, hf_megaco_error_descriptor, tvb,
+ hidden_item = proto_tree_add_string(megaco_tree_command_line, hf_megaco_error_descriptor, tvb,
tvb_current_offset, 3,
tvb_format_text(tvb, tvb_current_offset,
3));
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
tokenlen = (tvb_RBRKT) - tvb_previous_offset+1;