forked from osmocom/wireshark
Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25294
This commit is contained in:
parent
5f4f0df387
commit
2e0c1810e7
|
@ -236,6 +236,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_item *mstp_item, *msti_item;
|
||||
proto_tree *flags_tree;
|
||||
proto_item *flags_item;
|
||||
proto_item *hidden_item;
|
||||
const char *sep;
|
||||
|
||||
/* GARP application frames require special interpretation of the
|
||||
|
@ -442,9 +443,10 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_item_append_text(flags_item, ")");
|
||||
}
|
||||
|
||||
proto_tree_add_ether_hidden(bpdu_tree, hf_bpdu_root_mac, tvb,
|
||||
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_tree_add_text(bpdu_tree, tvb, BPDU_ROOT_IDENTIFIER, 8,
|
||||
"Root Identifier: %d / %s",
|
||||
root_identifier_bridge_priority,
|
||||
|
@ -455,9 +457,10 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
"Bridge Identifier: %d / %s",
|
||||
bridge_identifier_bridge_priority,
|
||||
bridge_identifier_mac_str);
|
||||
proto_tree_add_ether_hidden(bpdu_tree, hf_bpdu_bridge_mac, tvb,
|
||||
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_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;
|
||||
|
@ -578,9 +581,10 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
"CIST Bridge Identifier: %d / %s",
|
||||
cist_bridge_identifier_bridge_priority,
|
||||
cist_bridge_identifier_mac_str);
|
||||
proto_tree_add_ether_hidden(mstp_tree, hf_bpdu_cist_bridge_identifier_mac, tvb,
|
||||
hidden_item = proto_tree_add_ether(mstp_tree, hf_bpdu_cist_bridge_identifier_mac, tvb,
|
||||
BPDU_CIST_BRIDGE_IDENTIFIER + 2, 6,
|
||||
cist_bridge_identifier_mac);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
break;
|
||||
|
||||
case MSTI_FORMAT_ALTERNATIVE:
|
||||
|
@ -591,9 +595,10 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
"CIST Bridge Identifier: %d / %s",
|
||||
cist_bridge_identifier_bridge_priority,
|
||||
cist_bridge_identifier_mac_str);
|
||||
proto_tree_add_ether_hidden(mstp_tree, hf_bpdu_cist_bridge_identifier_mac, tvb,
|
||||
hidden_item = proto_tree_add_ether(mstp_tree, hf_bpdu_cist_bridge_identifier_mac, tvb,
|
||||
ALT_BPDU_CIST_BRIDGE_IDENTIFIER + 2, 6,
|
||||
cist_bridge_identifier_mac);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
|
||||
proto_tree_add_item(mstp_tree, hf_bpdu_cist_internal_root_path_cost, tvb,
|
||||
ALT_BPDU_CIST_INTERNAL_ROOT_PATH_COST, 4, FALSE);
|
||||
|
@ -664,9 +669,10 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
|
||||
/* pri, MSTID, Regional root */
|
||||
proto_tree_add_ether_hidden(msti_tree, hf_bpdu_msti_regional_root_mac, tvb,
|
||||
hidden_item = proto_tree_add_ether(msti_tree, hf_bpdu_msti_regional_root_mac, tvb,
|
||||
offset + MSTI_REGIONAL_ROOT + 2, 6,
|
||||
msti_regional_root_mac);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
proto_tree_add_text(msti_tree, tvb, offset + MSTI_REGIONAL_ROOT, 8,
|
||||
"MSTID %d, priority %d Root Identifier %s",
|
||||
msti_regional_root_mstid,
|
||||
|
@ -753,9 +759,10 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
|
||||
/* pri, MSTID, Regional root */
|
||||
proto_tree_add_ether_hidden(msti_tree, hf_bpdu_msti_regional_root_mac, tvb,
|
||||
hidden_item = proto_tree_add_ether(msti_tree, hf_bpdu_msti_regional_root_mac, tvb,
|
||||
offset + ALT_MSTI_REGIONAL_ROOT + 2, 6,
|
||||
msti_regional_root_mac);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
proto_tree_add_text(msti_tree, tvb, offset + ALT_MSTI_REGIONAL_ROOT, 8,
|
||||
"MSTI Regional Root Identifier: %d / %d / %s",
|
||||
msti_regional_root_mstid,
|
||||
|
|
|
@ -570,7 +570,7 @@ dissect_bssap_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bssap_tree,
|
|||
static void
|
||||
dissect_bssap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
proto_item *bssap_item;
|
||||
proto_item *bssap_item, *hidden_item;
|
||||
proto_tree *bssap_tree = NULL;
|
||||
|
||||
/*
|
||||
|
@ -587,7 +587,8 @@ dissect_bssap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/*
|
||||
* create the bssap protocol tree
|
||||
*/
|
||||
proto_tree_add_item_hidden(tree, proto_bssap, tvb, 0, -1, FALSE);
|
||||
hidden_item = proto_tree_add_item(tree, proto_bssap, tvb, 0, -1, FALSE);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
bssap_item = proto_tree_add_text(tree, tvb, 0, -1, (bssap_or_bsap_global == BSSAP) ? "BSSAP" : "BSAP");
|
||||
bssap_tree = proto_item_add_subtree(bssap_item, ett_bssap);
|
||||
|
||||
|
|
|
@ -1261,6 +1261,7 @@ bssgp_proto_handoff(bssgp_ie_t *ie, build_info_t *bi, int ie_start_offset, disse
|
|||
|
||||
static void
|
||||
decode_nri(proto_tree *tf, build_info_t *bi, guint32 tmsi_tlli) {
|
||||
proto_item *hidden_item;
|
||||
const guint32 LOCAL_TLLI_MASK = 0xc0000000;
|
||||
const guint32 FOREIGN_TLLI_MASK = 0x80000000;
|
||||
guint16 nri;
|
||||
|
@ -1270,8 +1271,9 @@ decode_nri(proto_tree *tf, build_info_t *bi, guint32 tmsi_tlli) {
|
|||
((tmsi_tlli & FOREIGN_TLLI_MASK) == FOREIGN_TLLI_MASK))) {
|
||||
nri = get_masked_guint32(tmsi_tlli, make_mask32( (guint8) bssgp_nri_length, 8));
|
||||
if (tf) {
|
||||
proto_tree_add_uint_hidden(tf, hf_bssgp_nri, bi->tvb, bi->offset, 4,
|
||||
hidden_item = proto_tree_add_uint(tf, hf_bssgp_nri, bi->tvb, bi->offset, 4,
|
||||
nri);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
}
|
||||
if (check_col(bi->pinfo->cinfo, COL_INFO)) {
|
||||
col_append_sep_fstr(bi->pinfo->cinfo, COL_INFO, BSSGP_SEP,
|
||||
|
@ -1702,7 +1704,7 @@ decode_iei_alignment_octets(bssgp_ie_t *ie, build_info_t *bi, int ie_start_offse
|
|||
|
||||
static void
|
||||
decode_iei_bvci(bssgp_ie_t *ie, build_info_t *bi, int ie_start_offset) {
|
||||
proto_item *ti;
|
||||
proto_item *ti, *hidden_item;
|
||||
guint16 bvci;
|
||||
|
||||
bvci = tvb_get_ntohs(bi->tvb, bi->offset);
|
||||
|
@ -1710,9 +1712,10 @@ decode_iei_bvci(bssgp_ie_t *ie, build_info_t *bi, int ie_start_offset) {
|
|||
if (bi->bssgp_tree) {
|
||||
ti = bssgp_proto_tree_add_ie(ie, bi, ie_start_offset);
|
||||
proto_item_append_text(ti, ": %u", bvci);
|
||||
proto_tree_add_item_hidden(bi->bssgp_tree, hf_bssgp_bvci,
|
||||
hidden_item = proto_tree_add_item(bi->bssgp_tree, hf_bssgp_bvci,
|
||||
bi->tvb, bi->offset, ie->value_length,
|
||||
BSSGP_LITTLE_ENDIAN);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
}
|
||||
bi->offset += ie->value_length;
|
||||
|
||||
|
@ -3418,7 +3421,7 @@ decode_iei_service_utran_cco(bssgp_ie_t *ie, build_info_t *bi, int ie_start_offs
|
|||
|
||||
static void
|
||||
decode_iei_nsei(bssgp_ie_t *ie, build_info_t *bi, int ie_start_offset) {
|
||||
proto_item *ti;
|
||||
proto_item *ti, *hidden_item;
|
||||
guint16 nsei;
|
||||
|
||||
nsei = tvb_get_ntohs(bi->tvb, bi->offset);
|
||||
|
@ -3426,8 +3429,9 @@ decode_iei_nsei(bssgp_ie_t *ie, build_info_t *bi, int ie_start_offset) {
|
|||
if (bi->bssgp_tree) {
|
||||
ti = bssgp_proto_tree_add_ie(ie, bi, ie_start_offset);
|
||||
proto_item_append_text(ti, ": %u", nsei);
|
||||
proto_tree_add_item_hidden(bi->bssgp_tree, hf_bssgp_nsei,
|
||||
hidden_item = proto_tree_add_item(bi->bssgp_tree, hf_bssgp_nsei,
|
||||
bi->tvb, bi->offset, 2, BSSGP_LITTLE_ENDIAN);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
}
|
||||
bi->offset += ie->value_length;
|
||||
|
||||
|
|
|
@ -2266,7 +2266,7 @@ dissect_cigi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/* Set up structures needed to add the protocol subtree and manage it */
|
||||
guint8 packet_id = 0;
|
||||
|
||||
proto_item *ti;
|
||||
proto_item *ti, *hidden_item;
|
||||
proto_tree *cigi_tree;
|
||||
|
||||
const char* src_str;
|
||||
|
@ -2318,13 +2318,18 @@ dissect_cigi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
cigi_tree = proto_item_add_subtree(ti, ett_cigi);
|
||||
|
||||
/* Ports */
|
||||
proto_tree_add_uint_hidden(cigi_tree, hf_cigi_src_port, tvb, 0, 0, pinfo->srcport);
|
||||
proto_tree_add_uint_hidden(cigi_tree, hf_cigi_dest_port, tvb, 0, 0, pinfo->destport);
|
||||
proto_tree_add_uint_hidden(cigi_tree, hf_cigi_port, tvb, 0, 0, pinfo->srcport);
|
||||
proto_tree_add_uint_hidden(cigi_tree, hf_cigi_port, tvb, 0, 0, pinfo->destport);
|
||||
hidden_item = proto_tree_add_uint(cigi_tree, hf_cigi_src_port, tvb, 0, 0, pinfo->srcport);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
hidden_item = proto_tree_add_uint(cigi_tree, hf_cigi_dest_port, tvb, 0, 0, pinfo->destport);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
hidden_item = proto_tree_add_uint(cigi_tree, hf_cigi_port, tvb, 0, 0, pinfo->srcport);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
hidden_item = proto_tree_add_uint(cigi_tree, hf_cigi_port, tvb, 0, 0, pinfo->destport);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
|
||||
/* Frame Size */
|
||||
proto_tree_add_uint_hidden(cigi_tree, hf_cigi_frame_size, tvb, 0, 0, tvb_reported_length(tvb));
|
||||
hidden_item = proto_tree_add_uint(cigi_tree, hf_cigi_frame_size, tvb, 0, 0, tvb_reported_length(tvb));
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
|
||||
/* Since the versions of CIGI are not backwards compatible,
|
||||
* dissection is different for each version.
|
||||
|
|
Loading…
Reference in New Issue