aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2008-05-09 13:59:10 +0000
committerAnders Broman <anders.broman@ericsson.com>2008-05-09 13:59:10 +0000
commite6238095506fea7978b5726764b15d432aa9d20f (patch)
tree6c0bbdab1d1e239f96992dd122b2a199bbfd4b96
parent22ff43e0bdf81c25319f8c72cc3156b29eccba6b (diff)
Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25264
-rw-r--r--epan/dissectors/Makefile.nmake5
-rw-r--r--epan/dissectors/packet-acap.c20
-rw-r--r--epan/dissectors/packet-afs.c4
-rw-r--r--epan/dissectors/packet-ansi_801.c8
-rw-r--r--epan/dissectors/packet-ascend.c8
-rw-r--r--epan/dissectors/packet-atalk.c17
-rw-r--r--epan/dissectors/packet-beep.c38
-rw-r--r--epan/dissectors/packet-bgp.c11
-rw-r--r--epan/dissectors/packet-sccp.c15
-rw-r--r--epan/dissectors/packet-sctp.c25
10 files changed, 100 insertions, 51 deletions
diff --git a/epan/dissectors/Makefile.nmake b/epan/dissectors/Makefile.nmake
index 91102af26b..815cd33208 100644
--- a/epan/dissectors/Makefile.nmake
+++ b/epan/dissectors/Makefile.nmake
@@ -111,5 +111,6 @@ maintainer-clean: distclean
rm -f $(GENERATED_FILES)
checkapi:
- $(PERL) ../../tools/checkAPIs.pl $(DISSECTOR_SRC) \
- $(CLEAN_DISSECTOR_SRC)
+ $(PERL) ../../tools/checkAPIs.pl \
+ $(ALL_DISSECTORS_SRC) \
+ packet-dcerpc-nt.c
diff --git a/epan/dissectors/packet-acap.c b/epan/dissectors/packet-acap.c
index 60d95c13d9..b402fca22f 100644
--- a/epan/dissectors/packet-acap.c
+++ b/epan/dissectors/packet-acap.c
@@ -49,14 +49,14 @@ static gint ett_acap_reqresp = -1;
static void
dissect_acap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- gboolean is_request;
- proto_tree *acap_tree, *reqresp_tree;
- proto_item *ti;
- gint offset = 0;
+ gboolean is_request;
+ proto_tree *acap_tree, *reqresp_tree;
+ proto_item *ti, *hidden_item;
+ gint offset = 0;
const guchar *line;
- gint next_offset;
- int linelen;
- int tokenlen;
+ gint next_offset;
+ int linelen;
+ int tokenlen;
const guchar *next_token;
if (check_col(pinfo->cinfo, COL_PROTOCOL))
@@ -93,11 +93,13 @@ dissect_acap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
acap_tree = proto_item_add_subtree(ti, ett_acap);
if (is_request) {
- proto_tree_add_boolean_hidden(acap_tree,
+ hidden_item = proto_tree_add_boolean(acap_tree,
hf_acap_request, tvb, 0, 0, TRUE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
} else {
- proto_tree_add_boolean_hidden(acap_tree,
+ hidden_item = proto_tree_add_boolean(acap_tree,
hf_acap_response, tvb, 0, 0, TRUE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
}
/*
diff --git a/epan/dissectors/packet-afs.c b/epan/dissectors/packet-afs.c
index a5819d99a6..4c61d7be4b 100644
--- a/epan/dissectors/packet-afs.c
+++ b/epan/dissectors/packet-afs.c
@@ -1421,6 +1421,7 @@ dissect_afs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
struct afs_request_key request_key, *new_request_key;
struct afs_request_val *request_val=NULL;
proto_tree *afs_tree, *afs_op_tree, *ti;
+ proto_item *hidden_item;
int port, node, typenode, opcode;
value_string const *vals;
int offset = 0;
@@ -1656,7 +1657,8 @@ dissect_afs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if ( typenode != 0 ) {
/* indicate the type of request */
- proto_tree_add_boolean_hidden(afs_tree, typenode, tvb, offset, 0, 1);
+ hidden_item = proto_tree_add_boolean(afs_tree, typenode, tvb, offset, 0, 1);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
}
/* Process the packet according to what service it is */
diff --git a/epan/dissectors/packet-ansi_801.c b/epan/dissectors/packet-ansi_801.c
index 0e26d06e3a..fd98786e2e 100644
--- a/epan/dissectors/packet-ansi_801.c
+++ b/epan/dissectors/packet-ansi_801.c
@@ -2080,6 +2080,7 @@ dissect_ansi_801_for_message(tvbuff_t *tvb, proto_tree *tree)
guint8 oct, num_req, num_rsp, pd_msg_type;
guint rem_len;
const gchar *str = NULL;
+ proto_item *hidden_item;
offset = 0;
oct = tvb_get_guint8(tvb, offset);
@@ -2106,8 +2107,9 @@ dissect_ansi_801_for_message(tvbuff_t *tvb, proto_tree *tree)
bigbuf,
oct & 0x1f);
- proto_tree_add_uint_hidden(tree, hf_ansi_801_sess_tag, tvb, offset,
+ hidden_item = proto_tree_add_uint(tree, hf_ansi_801_sess_tag, tvb, offset,
1, oct & 0x1f);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
offset++;
oct = tvb_get_guint8(tvb, offset);
@@ -2265,6 +2267,7 @@ dissect_ansi_801_rev_message(tvbuff_t *tvb, proto_tree *tree)
guint8 oct, num_req, num_rsp, pd_msg_type;
guint rem_len;
const gchar *str = NULL;
+ proto_item *hidden_item;
offset = 0;
oct = tvb_get_guint8(tvb, offset);
@@ -2291,8 +2294,9 @@ dissect_ansi_801_rev_message(tvbuff_t *tvb, proto_tree *tree)
bigbuf,
oct & 0x1f);
- proto_tree_add_uint_hidden(tree, hf_ansi_801_sess_tag, tvb, offset,
+ hidden_item = proto_tree_add_uint(tree, hf_ansi_801_sess_tag, tvb, offset,
1, oct & 0x1f);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
offset++;
oct = tvb_get_guint8(tvb, offset);
diff --git a/epan/dissectors/packet-ascend.c b/epan/dissectors/packet-ascend.c
index d9b439ba7f..9be0a2bfce 100644
--- a/epan/dissectors/packet-ascend.c
+++ b/epan/dissectors/packet-ascend.c
@@ -52,7 +52,7 @@ static void
dissect_ascend(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *fh_tree;
- proto_item *ti;
+ proto_item *ti, *hidden_item;
union wtap_pseudo_header *pseudo_header = pinfo->pseudo_header;
/* load the top pane info. This should be overwritten by
@@ -91,13 +91,15 @@ dissect_ascend(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
pseudo_header->ascend.call_num);
proto_tree_add_uint(fh_tree, hf_chunk, tvb, 0, 0,
pseudo_header->ascend.chunk);
- proto_tree_add_uint_hidden(fh_tree, hf_session_id, tvb, 0, 0, 0);
+ hidden_item = proto_tree_add_uint(fh_tree, hf_session_id, tvb, 0, 0, 0);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
} else { /* It's wandsession data */
proto_tree_add_string(fh_tree, hf_user_name, tvb, 0, 0,
pseudo_header->ascend.user);
proto_tree_add_uint(fh_tree, hf_session_id, tvb, 0, 0,
pseudo_header->ascend.sess);
- proto_tree_add_uint_hidden(fh_tree, hf_chunk, tvb, 0, 0, 0);
+ hidden_item = proto_tree_add_uint(fh_tree, hf_chunk, tvb, 0, 0, 0);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
}
proto_tree_add_uint(fh_tree, hf_task, tvb, 0, 0, pseudo_header->ascend.task);
}
diff --git a/epan/dissectors/packet-atalk.c b/epan/dissectors/packet-atalk.c
index 55820d9a18..65b5067bd8 100644
--- a/epan/dissectors/packet-atalk.c
+++ b/epan/dissectors/packet-atalk.c
@@ -1683,7 +1683,7 @@ dissect_ddp_short(tvbuff_t *tvb, packet_info *pinfo, guint8 dnode,
guint8 sport;
guint8 type;
proto_tree *ddp_tree = NULL;
- proto_item *ti;
+ proto_item *ti, *hidden_item;
static struct atalk_ddp_addr src, dst;
tvbuff_t *new_tvb;
@@ -1726,10 +1726,12 @@ dissect_ddp_short(tvbuff_t *tvb, packet_info *pinfo, guint8 dnode,
val_to_str(type, op_vals, "Unknown DDP protocol (%02x)"));
}
if (tree) {
- proto_tree_add_string_hidden(ddp_tree, hf_ddp_src, tvb,
+ hidden_item = proto_tree_add_string(ddp_tree, hf_ddp_src, tvb,
4, 3, atalk_addr_to_str(&src));
- proto_tree_add_string_hidden(ddp_tree, hf_ddp_dst, tvb,
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_string(ddp_tree, hf_ddp_dst, tvb,
6, 3, atalk_addr_to_str(&dst));
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_uint(ddp_tree, hf_ddp_type, tvb, 4, 1, type);
}
@@ -1744,7 +1746,7 @@ dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
e_ddp ddp;
proto_tree *ddp_tree;
- proto_item *ti;
+ proto_item *ti, *hidden_item;
static struct atalk_ddp_addr src, dst;
tvbuff_t *new_tvb;
@@ -1781,10 +1783,13 @@ dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
FALSE);
ddp_tree = proto_item_add_subtree(ti, ett_ddp);
- proto_tree_add_string_hidden(ddp_tree, hf_ddp_src, tvb,
+ hidden_item = proto_tree_add_string(ddp_tree, hf_ddp_src, tvb,
4, 3, atalk_addr_to_str(&src));
- proto_tree_add_string_hidden(ddp_tree, hf_ddp_dst, tvb,
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+
+ hidden_item = proto_tree_add_string(ddp_tree, hf_ddp_dst, tvb,
6, 3, atalk_addr_to_str(&dst));
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_uint(ddp_tree, hf_ddp_hopcount, tvb, 0, 1,
ddp_hops(ddp.hops_len));
diff --git a/epan/dissectors/packet-beep.c b/epan/dissectors/packet-beep.c
index d673d75db5..d2fca32fd7 100644
--- a/epan/dissectors/packet-beep.c
+++ b/epan/dissectors/packet-beep.c
@@ -213,6 +213,7 @@ static int
dissect_beep_more(tvbuff_t *tvb, int offset,
proto_tree *tree)
{
+ proto_item *hidden_item;
int ret = 0;
switch (beep_get_more(tvb_get_guint8(tvb, offset))) {
@@ -220,7 +221,8 @@ dissect_beep_more(tvbuff_t *tvb, int offset,
case BEEP_COMPLETE:
if (tree) {
- proto_tree_add_boolean_hidden(tree, hf_beep_complete, tvb, offset, 1, TRUE);
+ hidden_item = proto_tree_add_boolean(tree, hf_beep_complete, tvb, offset, 1, TRUE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_text(tree, tvb, offset, 1, "More: Complete");
}
@@ -231,7 +233,8 @@ dissect_beep_more(tvbuff_t *tvb, int offset,
case BEEP_INTERMEDIATE:
if (tree) {
- proto_tree_add_boolean_hidden(tree, hf_beep_intermediate, tvb, offset, 1, TRUE);
+ hidden_item = proto_tree_add_boolean(tree, hf_beep_intermediate, tvb, offset, 1, TRUE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_text(tree, tvb, offset, 1, "More: Intermediate");
}
@@ -242,7 +245,8 @@ dissect_beep_more(tvbuff_t *tvb, int offset,
default:
if (tree) {
- proto_tree_add_boolean_hidden(tree, hf_beep_proto_viol, tvb, offset, 1, TRUE);
+ hidden_item = proto_tree_add_boolean(tree, hf_beep_proto_viol, tvb, offset, 1, TRUE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_text(tree, tvb, offset, 1, "PROTOCOL VIOLATION: Expected More Flag (* or .)");
}
@@ -258,6 +262,7 @@ dissect_beep_more(tvbuff_t *tvb, int offset,
static void dissect_beep_status(tvbuff_t *tvb, int offset,
proto_tree *tree)
{
+ proto_item *hidden_item;
/* FIXME: We should return a value to indicate all OK. */
@@ -266,7 +271,8 @@ static void dissect_beep_status(tvbuff_t *tvb, int offset,
case '+':
if (tree) {
- proto_tree_add_boolean_hidden(tree, hf_beep_positive, tvb, offset, 1, TRUE);
+ hidden_item = proto_tree_add_boolean(tree, hf_beep_positive, tvb, offset, 1, TRUE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_text(tree, tvb, offset, 1, "Status: Positive");
}
@@ -275,7 +281,8 @@ static void dissect_beep_status(tvbuff_t *tvb, int offset,
case '-':
if (tree) {
- proto_tree_add_boolean_hidden(tree, hf_beep_negative, tvb, offset, 1, TRUE);
+ hidden_item = proto_tree_add_boolean(tree, hf_beep_negative, tvb, offset, 1, TRUE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_text(tree, tvb, offset, 1, "Status: Negative");
}
@@ -310,6 +317,7 @@ static int num_len(tvbuff_t *tvb, int offset)
static int
check_term(tvbuff_t *tvb, int offset, proto_tree *tree)
{
+ proto_item *hidden_item;
/* First, check for CRLF, or, if global_beep_strict_term is false,
* one of CR or LF ... If neither of these hold, we add an element
@@ -332,7 +340,8 @@ check_term(tvbuff_t *tvb, int offset, proto_tree *tree)
if (tree) {
proto_tree_add_text(tree, tvb, offset, 1, "Nonstandard Terminator: CR");
- proto_tree_add_boolean_hidden(tree, hf_beep_proto_viol, tvb, offset, 1, TRUE);
+ hidden_item = proto_tree_add_boolean(tree, hf_beep_proto_viol, tvb, offset, 1, TRUE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
}
return 1;
@@ -341,7 +350,8 @@ check_term(tvbuff_t *tvb, int offset, proto_tree *tree)
if (tree) {
proto_tree_add_text(tree, tvb, offset, 1, "Nonstandard Terminator: LF");
- proto_tree_add_boolean_hidden(tree, hf_beep_proto_viol, tvb, offset, 1, TRUE);
+ hidden_item = proto_tree_add_boolean(tree, hf_beep_proto_viol, tvb, offset, 1, TRUE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
}
return 1;
@@ -350,7 +360,8 @@ check_term(tvbuff_t *tvb, int offset, proto_tree *tree)
if (tree) {
proto_tree_add_text(tree, tvb, offset, 2, "PROTOCOL VIOLATION, Invalid Terminator: %s", tvb_format_text(tvb, offset, 2));
- proto_tree_add_boolean_hidden(tree, hf_beep_proto_viol, tvb, offset, 2, TRUE);
+ hidden_item = proto_tree_add_boolean(tree, hf_beep_proto_viol, tvb, offset, 2, TRUE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
}
return -1;
@@ -438,6 +449,7 @@ static int
dissect_beep_int(tvbuff_t *tvb, int offset,
proto_tree *tree, int hf, int *val, int *hfa[])
{
+ proto_item *hidden_item;
int ival, ind = 0;
unsigned int i = num_len(tvb, offset);
guint8 int_buff[100];
@@ -456,7 +468,8 @@ dissect_beep_int(tvbuff_t *tvb, int offset,
while (hfa[ind]) {
- proto_tree_add_uint_hidden(tree, *hfa[ind], tvb, offset, i, ival);
+ hidden_item = proto_tree_add_uint(tree, *hfa[ind], tvb, offset, i, ival);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
ind++;
}
@@ -527,6 +540,7 @@ dissect_beep_tree(tvbuff_t *tvb, int offset, packet_info *pinfo,
struct beep_proto_data *frame_data)
{
proto_tree *ti = NULL, *hdr = NULL;
+ proto_item *hidden_item;
int st_offset, msgno, ansno, seqno, size, channel, ackno, window, cc,
more;
@@ -554,7 +568,7 @@ dissect_beep_tree(tvbuff_t *tvb, int offset, packet_info *pinfo,
hdr = proto_item_add_subtree(ti, ett_header);
- proto_tree_add_boolean_hidden(hdr, hf_beep_req, tvb, offset, 3, TRUE);
+ hidden_item = proto_tree_add_boolean(hdr, hf_beep_req, tvb, offset, 3, TRUE);
proto_tree_add_text(hdr, tvb, offset, 3, cmd_temp);
}
@@ -674,7 +688,7 @@ dissect_beep_tree(tvbuff_t *tvb, int offset, packet_info *pinfo,
} else if (tvb_strneql(tvb, offset, "SEQ ", 4) == 0) {
if (tree) {
- proto_tree_add_boolean_hidden(tree, hf_beep_seq, tvb, offset, 3, TRUE);
+ hidden_item = proto_tree_add_boolean(tree, hf_beep_seq, tvb, offset, 3, TRUE);
proto_tree_add_text(tree, tvb, offset, 3, "Command: SEQ");
}
@@ -727,7 +741,7 @@ dissect_beep_tree(tvbuff_t *tvb, int offset, packet_info *pinfo,
tr = proto_item_add_subtree(ti, ett_trailer);
- proto_tree_add_boolean_hidden(tr, hf_beep_end, tvb, offset, 3, TRUE);
+ hidden_item = proto_tree_add_boolean(tr, hf_beep_end, tvb, offset, 3, TRUE);
proto_tree_add_text(tr, tvb, offset, 3, "Command: END");
}
diff --git a/epan/dissectors/packet-bgp.c b/epan/dissectors/packet-bgp.c
index 540083e9b0..530d3baf2b 100644
--- a/epan/dissectors/packet-bgp.c
+++ b/epan/dissectors/packet-bgp.c
@@ -1504,12 +1504,13 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
subtree = proto_item_add_subtree(ti, ett_bgp_attrs);
i = 2;
while (i < len) {
+ proto_item *hidden_item;
const char *msg;
int off;
gint k;
guint16 alen, tlen, aoff, aoff_save;
guint16 af;
- guint8 saf, snpa;
+ guint8 saf, snpa;
guint8 nexthop_len;
guint8 asn_len = 0;
@@ -1936,8 +1937,9 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
as_path_item = (asn_len == 2) ?
tvb_get_ntohs(tvb, q) : tvb_get_ntohl(tvb, q);
proto_item_append_text(ti, " %u", as_path_item);
- proto_tree_add_uint_hidden(as_path_tree, hf_bgp_as_path, tvb,
+ hidden_item = proto_tree_add_uint(as_path_tree, hf_bgp_as_path, tvb,
q, asn_len, as_path_item);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
q += asn_len;
}
}
@@ -2326,6 +2328,8 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
end = o + i + aoff + tlen ;
while(q < end) {
+ proto_item *hidden_item;
+
ssa_type = tvb_get_ntohs(tvb, q) & BGP_SSA_TYPE;
ssa_len = tvb_get_ntohs(tvb, q + 2);
@@ -2336,8 +2340,9 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree)
proto_tree_add_item(subtree3, hf_bgp_ssa_t, tvb,
q, 1, FALSE);
- proto_tree_add_item_hidden(subtree3, hf_bgp_ssa_type, tvb,
+ hidden_item = proto_tree_add_item(subtree3, hf_bgp_ssa_type, tvb,
q, 2, FALSE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_text(subtree3, tvb, q, 2,
"Type: %s", val_to_str(ssa_type, bgp_ssa_type, "Unknown"));
if ((ssa_len == 0) || (q + ssa_len > end)) {
diff --git a/epan/dissectors/packet-sccp.c b/epan/dissectors/packet-sccp.c
index cfaad56d3f..168fef8dee 100644
--- a/epan/dissectors/packet-sccp.c
+++ b/epan/dissectors/packet-sccp.c
@@ -1004,7 +1004,7 @@ dissect_sccp_gt_address_information(tvbuff_t *tvb, proto_tree *tree,
{
guint offset = 0;
guint8 odd_signal, even_signal = 0x0f;
- proto_item *digits_item;
+ proto_item *digits_item, *hidden_item;
char gt_digits[GT_MAX_SIGNALS+1] = { 0 };
while(offset < length)
@@ -1037,8 +1037,9 @@ dissect_sccp_gt_address_information(tvbuff_t *tvb, proto_tree *tree,
"Address information (digits): %s",
gt_digits);
- proto_tree_add_string_hidden(tree, hf_sccp_gt_digits, tvb, 0, length,
+ hidden_item = proto_tree_add_string(tree, hf_sccp_gt_digits, tvb, 0, length,
gt_digits);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
return digits_item;
}
@@ -1204,7 +1205,7 @@ static void
dissect_sccp_called_calling_param(tvbuff_t *tvb, proto_tree *tree,
guint length, gboolean called)
{
- proto_item *call_item = 0, *call_ai_item = 0, *item;
+ proto_item *call_item = 0, *call_ai_item = 0, *item, *hidden_item;
proto_tree *call_tree = 0, *call_ai_tree = 0;
guint offset;
guint8 national = 0xFFU, routing_ind, gti, pci, ssni, ssn;
@@ -1305,8 +1306,10 @@ dissect_sccp_called_calling_param(tvbuff_t *tvb, proto_tree *tree,
proto_tree_add_uint(call_tree, called ? hf_sccp_called_ssn
: hf_sccp_calling_ssn,
tvb, offset, ADDRESS_SSN_LENGTH, ssn);
- proto_tree_add_uint_hidden(call_tree, hf_sccp_ssn, tvb, offset,
+ hidden_item = proto_tree_add_uint(call_tree, hf_sccp_ssn, tvb, offset,
ADDRESS_SSN_LENGTH, ssn);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+
offset += ADDRESS_SSN_LENGTH;
/* Get the dissector handle of the dissector registered for this ssn
@@ -1383,8 +1386,10 @@ dissect_sccp_called_calling_param(tvbuff_t *tvb, proto_tree *tree,
proto_tree_add_uint(call_tree, called ? hf_sccp_called_ssn
: hf_sccp_calling_ssn,
tvb, offset, ADDRESS_SSN_LENGTH, ssn);
- proto_tree_add_uint_hidden(call_tree, hf_sccp_ssn, tvb, offset,
+ hidden_item = proto_tree_add_uint(call_tree, hf_sccp_ssn, tvb, offset,
ADDRESS_SSN_LENGTH, ssn);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+
offset += ADDRESS_SSN_LENGTH;
}
diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c
index 1e33a37442..b43485f3b7 100644
--- a/epan/dissectors/packet-sctp.c
+++ b/epan/dissectors/packet-sctp.c
@@ -2748,6 +2748,7 @@ static void
dissect_init_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pinfo, proto_tree *chunk_tree, proto_item *chunk_item)
{
tvbuff_t *parameters_tvb;
+ proto_item *hidden_item;
if (chunk_length < INIT_CHUNK_FIXED_PARAMTERS_LENGTH) {
proto_item_append_text(chunk_item, ", bogus chunk length %u < %u)",
@@ -2758,7 +2759,8 @@ dissect_init_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pinfo
if (chunk_tree) {
/* handle fixed parameters */
proto_tree_add_item(chunk_tree, hf_init_chunk_initiate_tag, chunk_tvb, INIT_CHUNK_INITIATE_TAG_OFFSET, INIT_CHUNK_INITIATE_TAG_LENGTH, NETWORK_BYTE_ORDER);
- proto_tree_add_item_hidden(chunk_tree, hf_initiate_tag, chunk_tvb, INIT_CHUNK_INITIATE_TAG_OFFSET, INIT_CHUNK_INITIATE_TAG_LENGTH, NETWORK_BYTE_ORDER);
+ hidden_item = proto_tree_add_item(chunk_tree, hf_initiate_tag, chunk_tvb, INIT_CHUNK_INITIATE_TAG_OFFSET, INIT_CHUNK_INITIATE_TAG_LENGTH, NETWORK_BYTE_ORDER);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_item(chunk_tree, hf_init_chunk_adv_rec_window_credit, chunk_tvb, INIT_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET, INIT_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH, NETWORK_BYTE_ORDER);
proto_tree_add_item(chunk_tree, hf_init_chunk_number_of_outbound_streams, chunk_tvb, INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_OFFSET, INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_LENGTH, NETWORK_BYTE_ORDER);
proto_tree_add_item(chunk_tree, hf_init_chunk_number_of_inbound_streams, chunk_tvb, INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_OFFSET, INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_LENGTH, NETWORK_BYTE_ORDER);
@@ -2778,6 +2780,7 @@ static void
dissect_init_ack_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pinfo, proto_tree *chunk_tree, proto_item *chunk_item)
{
tvbuff_t *parameters_tvb;
+ proto_item *hidden_item;
if (chunk_length < INIT_CHUNK_FIXED_PARAMTERS_LENGTH) {
proto_item_append_text(chunk_item, ", bogus chunk length %u < %u)",
@@ -2788,7 +2791,8 @@ dissect_init_ack_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *p
if (chunk_tree) {
/* handle fixed parameters */
proto_tree_add_item(chunk_tree, hf_initack_chunk_initiate_tag, chunk_tvb, INIT_CHUNK_INITIATE_TAG_OFFSET, INIT_CHUNK_INITIATE_TAG_LENGTH, NETWORK_BYTE_ORDER);
- proto_tree_add_item_hidden(chunk_tree, hf_initiate_tag, chunk_tvb, INIT_CHUNK_INITIATE_TAG_OFFSET, INIT_CHUNK_INITIATE_TAG_LENGTH, NETWORK_BYTE_ORDER);
+ hidden_item = proto_tree_add_item(chunk_tree, hf_initiate_tag, chunk_tvb, INIT_CHUNK_INITIATE_TAG_OFFSET, INIT_CHUNK_INITIATE_TAG_LENGTH, NETWORK_BYTE_ORDER);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_item(chunk_tree, hf_initack_chunk_adv_rec_window_credit, chunk_tvb, INIT_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET, INIT_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH, NETWORK_BYTE_ORDER);
proto_tree_add_item(chunk_tree, hf_initack_chunk_number_of_outbound_streams, chunk_tvb, INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_OFFSET, INIT_CHUNK_NUMBER_OF_OUTBOUND_STREAMS_LENGTH, NETWORK_BYTE_ORDER);
proto_tree_add_item(chunk_tree, hf_initack_chunk_number_of_inbound_streams, chunk_tvb, INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_OFFSET, INIT_CHUNK_NUMBER_OF_INBOUND_STREAMS_LENGTH, NETWORK_BYTE_ORDER);
@@ -3467,7 +3471,7 @@ dissect_sctp_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolea
guint16 source_port, destination_port;
guint length, reported_length;
gboolean crc32c_correct = FALSE, adler32_correct = FALSE;
- proto_item *sctp_item;
+ proto_item *sctp_item, *hidden_item;
proto_tree *sctp_tree;
guint32 vtag;
sctp_half_assoc_t* ha = NULL;
@@ -3532,8 +3536,10 @@ dissect_sctp_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolea
proto_tree_add_item(sctp_tree, hf_source_port, tvb, SOURCE_PORT_OFFSET, SOURCE_PORT_LENGTH, NETWORK_BYTE_ORDER);
proto_tree_add_item(sctp_tree, hf_destination_port, tvb, DESTINATION_PORT_OFFSET, DESTINATION_PORT_LENGTH, NETWORK_BYTE_ORDER);
proto_tree_add_item(sctp_tree, hf_verification_tag, tvb, VERIFICATION_TAG_OFFSET, VERIFICATION_TAG_LENGTH, NETWORK_BYTE_ORDER);
- proto_tree_add_item_hidden(sctp_tree, hf_port, tvb, SOURCE_PORT_OFFSET, SOURCE_PORT_LENGTH, NETWORK_BYTE_ORDER);
- proto_tree_add_item_hidden(sctp_tree, hf_port, tvb, DESTINATION_PORT_OFFSET, DESTINATION_PORT_LENGTH, NETWORK_BYTE_ORDER);
+ hidden_item = proto_tree_add_item(sctp_tree, hf_port, tvb, SOURCE_PORT_OFFSET, SOURCE_PORT_LENGTH, NETWORK_BYTE_ORDER);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_item(sctp_tree, hf_port, tvb, DESTINATION_PORT_OFFSET, DESTINATION_PORT_LENGTH, NETWORK_BYTE_ORDER);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
if (tvb_bytes_exist(tvb, 0, reported_length)) {
/* We have the whole packet */
@@ -3549,7 +3555,8 @@ dissect_sctp_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolea
else
proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
checksum, "Checksum: 0x%08x [incorrect Adler32, should be 0x%08x]", checksum, calculated_adler32);
- proto_tree_add_boolean_hidden(sctp_tree, hf_checksum_bad, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH, !(adler32_correct));
+ hidden_item = proto_tree_add_boolean(sctp_tree, hf_checksum_bad, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH, !(adler32_correct));
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
break;
case SCTP_CHECKSUM_CRC32C:
if (crc32c_correct)
@@ -3558,7 +3565,8 @@ dissect_sctp_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolea
else
proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
checksum, "Checksum: 0x%08x [incorrect CRC32C, should be 0x%08x]", checksum, calculated_crc32c);
- proto_tree_add_boolean_hidden(sctp_tree, hf_checksum_bad, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH, !(crc32c_correct));
+ hidden_item = proto_tree_add_boolean(sctp_tree, hf_checksum_bad, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH, !(crc32c_correct));
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
break;
case SCTP_CHECKSUM_AUTOMATIC:
if ((adler32_correct) && !(crc32c_correct))
@@ -3574,7 +3582,8 @@ dissect_sctp_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolea
proto_tree_add_uint_format(sctp_tree, hf_checksum, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH,
checksum, "Checksum: 0x%08x [incorrect, should be 0x%08x (Adler32) or 0x%08x (CRC32C)]",
checksum, calculated_adler32, calculated_crc32c);
- proto_tree_add_boolean_hidden(sctp_tree, hf_checksum_bad, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH, !(crc32c_correct || adler32_correct));
+ hidden_item = proto_tree_add_boolean(sctp_tree, hf_checksum_bad, tvb, CHECKSUM_OFFSET, CHECKSUM_LENGTH, !(crc32c_correct || adler32_correct));
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
break;
}
} else {