Fix some issues seen by tools/check_typed_item_calls.py

This commit is contained in:
Martin Mathieson 2023-01-18 10:37:53 +00:00 committed by Martin Mathieson
parent 5f63989ee0
commit be51acfffb
20 changed files with 38 additions and 32 deletions

View File

@ -1625,13 +1625,13 @@ proto_register_acdr(void)
},
{ &hf_acdr_mii_sequence,
{ "MII sequence number", "acdr.mii_sequence_num",
FT_UINT8, BASE_DEC,
FT_UINT16, BASE_DEC,
NULL, 0x0,
NULL, HFILL }
},
{ &hf_acdr_mii_packet_size,
{ "MII packet size", "acdr.mii_packet_size",
FT_UINT8, BASE_DEC,
FT_UINT16, BASE_DEC,
NULL, 0x0,
NULL, HFILL }
},

View File

@ -8614,7 +8614,7 @@ proto_register_acn(void)
/* Broker Vector */
{ &hf_rdmnet_broker_vector,
{ "Broker Vector", "rdmnet.broker_vector",
FT_UINT8, BASE_DEC, VALS(rdmnet_broker_vector_vals), 0x0,
FT_UINT16, BASE_DEC, VALS(rdmnet_broker_vector_vals), 0x0,
NULL, HFILL }
},
/* Broker Client Protocol Vector */
@ -8804,7 +8804,7 @@ proto_register_acn(void)
/* EPT Vector */
{ &hf_rdmnet_ept_vector,
{ "EPT Vector", "rdmnet.ept_vector",
FT_UINT8, BASE_DEC, VALS(rdmnet_ept_vector_vals), 0x0,
FT_UINT32, BASE_DEC, VALS(rdmnet_ept_vector_vals), 0x0,
NULL, HFILL }
},
/* EPT Destination CID */

View File

@ -11961,7 +11961,7 @@ proto_register_amqp(void)
"Previously transferred messages", HFILL}},
{&hf_amqp_0_10_method_message_transfer_reject_code, {
"Reject-code", "amqp.message.reject.reject-code",
FT_UINT8, BASE_DEC, VALS(amqp_0_10_message_transfer_reject_codes), 0x0,
FT_UINT16, BASE_DEC, VALS(amqp_0_10_message_transfer_reject_codes), 0x0,
"Message reject code", HFILL}},
{&hf_amqp_0_10_method_message_reject_text, {
"Text", "amqp.message.reject.text",

View File

@ -12030,7 +12030,7 @@ proto_register_bgp(void)
{ "Originating Router", "bgp.mcast_vpn_nlri_origin_router_ipv6", FT_IPv6,
BASE_NONE, NULL, 0x0, NULL, HFILL}},
{ &hf_bgp_mcast_vpn_nlri_source_as,
{ "Source AS", "bgp.mcast_vpn_nlri_source_as", FT_UINT16,
{ "Source AS", "bgp.mcast_vpn_nlri_source_as", FT_UINT32,
BASE_DEC, NULL, 0x0, NULL, HFILL}},
{ &hf_bgp_mcast_vpn_nlri_source_length,
{ "Multicast Source Length", "bgp.mcast_vpn_nlri_source_length", FT_UINT8,

View File

@ -8425,7 +8425,7 @@ void proto_register_c15ch(void)
},
{ &hf_c15ch_orig_iptime,
{ "IP Time", "c15.orig.iptime",
FT_UINT8, BASE_HEX,
FT_UINT32, BASE_HEX,
NULL,
0x0, NULL, HFILL}
},
@ -10675,7 +10675,7 @@ void proto_register_c15ch(void)
},
{ &hf_c15ch_inc_gwe_ptrk_setup_ip_gwe_alert_info,
{ "IP GWE Alert Info", "c15.iinc_gwe.ptrk_setup.ip_gwe_alert_info",
FT_UINT8, BASE_DEC,
FT_UINT32, BASE_DEC,
NULL,
0x0, NULL, HFILL}
},
@ -11272,7 +11272,7 @@ void proto_register_c15ch(void)
/* TODO */
{ &hf_c15ch_out_gwe_digit_scan_voip_dgmp_override,
{ "VOIP DGMP Override", "c15.out_gwe.digit_scan.voip_dgmp_override",
FT_UINT8, BASE_DEC,
FT_UINT32, BASE_DEC,
NULL,
0x0, NULL, HFILL}
},

View File

@ -3691,7 +3691,7 @@ void proto_register_catapult_dct2000(void)
{ &hf_catapult_dct2000_ueid,
{ "UE Id",
"dct2000.ueid", FT_UINT16, BASE_DEC, NULL, 0x0,
"dct2000.ueid", FT_UINT32, BASE_DEC, NULL, 0x0,
"User Equipment Identifier", HFILL
}
},

View File

@ -1291,7 +1291,7 @@ proto_register_dec_rt(void)
NULL, HFILL }},
{ &hf_dec_rt_tiinfo,
{ "Routing information", "dec_dna.ctl.tiinfo",
FT_UINT8, BASE_HEX, VALS(rt_tiinfo_vals), 0x0,
FT_UINT16, BASE_HEX, VALS(rt_tiinfo_vals), 0x0,
NULL, HFILL }},
{ &hf_dec_rt_blk_size,
{ "Block size", "dec_dna.ctl.blk_size",

View File

@ -9184,7 +9184,7 @@ void proto_register_dis(void)
},
{ &hf_dis_radio_receive_state,
{ "Radio Receive State", "dis.radio.receive_state",
FT_UINT8, BASE_DEC, VALS(DIS_PDU_RadioReceiveState_Strings), 0x0,
FT_UINT16, BASE_DEC, VALS(DIS_PDU_RadioReceiveState_Strings), 0x0,
NULL, HFILL }
},
{ &hf_dis_radio_input_source,

View File

@ -6056,7 +6056,7 @@ proto_register_dvbci(void)
},
{ &hf_dvbci_lsc_dst_port,
{ "Destination port", "dvb-ci.lsc.dst_port",
FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }
FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }
},
{ &hf_dvbci_lsc_proto,
{ "Protocol", "dvb-ci.lsc.protocol",

View File

@ -140,7 +140,7 @@ dissect_ecp_unknown_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
ecp_unknown_tlv_tree = proto_tree_add_subtree(tree, tvb, offset, (tempLen + 2), ett_ecp, NULL, "Unknown TLV");
proto_tree_add_item(ecp_unknown_tlv_tree, hf_ecp_subtype, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(ecp_unknown_tlv_tree, hf_ecp_subtype, tvb, offset, 1, ENC_BIG_ENDIAN);
return -1;
}

View File

@ -11544,7 +11544,7 @@ proto_register_ff(void)
{ &hf_ff_sm_find_tag_reply_req_num_of_fda_addr_selectors,
{ "Number Of FDA Address Selectors",
"ff.sm.find_tag_reply.req.num_of_fda_addr_selectors",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_ff_sm_find_tag_reply_req_fda_addr_selector,
{ "FDA Address Selector",
@ -12757,7 +12757,7 @@ proto_register_ff(void)
{ &hf_ff_fms_gen_init_download_seq_req_idx,
{ "Index",
"ff.fms.gen_init_download_seq.req.idx",
FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
@ -12818,7 +12818,7 @@ proto_register_ff(void)
{ &hf_ff_fms_gen_download_seg_req_idx,
{ "Index", "ff.fms.gen_download_seg.req.idx",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_ff_fms_gen_download_seg_req_more_follows,
{ "More Follows", "ff.fms.gen_download_seg.req.more_follows",
@ -12887,7 +12887,7 @@ proto_register_ff(void)
{ &hf_ff_fms_gen_terminate_download_seq_req_idx,
{ "Index", "ff.fms.gen_terminate_download_seq.req.idx",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
@ -12954,7 +12954,7 @@ proto_register_ff(void)
{ &hf_ff_fms_init_download_seq_req_idx,
{ "Index", "ff.fms.init_download_seq.req.idx",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
@ -13013,7 +13013,7 @@ proto_register_ff(void)
{ &hf_ff_fms_download_seg_req_idx,
{ "Index", "ff.fms.download_seg.req.idx",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },

View File

@ -618,7 +618,7 @@ proto_register_pcomtcp(void)
},
{ &hf_pcombinary_reserved3,
{ "Reserved", "pcombinary.reserved3",
FT_UINT8, BASE_HEX, NULL, 0x0,
FT_UINT24, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pcombinary_command,
@ -638,7 +638,7 @@ proto_register_pcomtcp(void)
},
{ &hf_pcombinary_data_length,
{ "Data Length", "pcombinary.data_length",
FT_UINT8, BASE_DEC, NULL, 0x0,
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pcombinary_header_checksum,

View File

@ -2006,7 +2006,7 @@ void proto_register_pn532(void)
{"Not Used", "pn532.txmode.not_used.2_3", FT_UINT8, BASE_HEX,
NULL, 0xC0, NULL, HFILL}},
{&hf_pn532_txmode_tx_framing,
{"Tx Framing", "pn532.txmode.not_used.2_3", FT_UINT8, BASE_HEX,
{"Tx Framing", "pn532.txmode.tx_framing", FT_UINT8, BASE_HEX,
VALS(pn532_txframing_vals), 0x03, NULL, HFILL}},
{&hf_pn532_baudrate,
{"Baudrate", "pn532.baudrate", FT_UINT8, BASE_HEX,

View File

@ -324,6 +324,8 @@ dissect_lct(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
lct_tree = proto_item_add_subtree(ti, ett_main);
/* Fill the LCT subtree */
/* LCT version number (4 bits) */
proto_tree_add_item(lct_tree, hf_version, tvb, offset, 2, ENC_BIG_ENDIAN);
ti = proto_tree_add_item(lct_tree, hf_fsize_header, tvb, offset, 2, ENC_BIG_ENDIAN);

View File

@ -452,7 +452,7 @@ static guint dissect_norm_cmd_squelch(proto_tree *tree, packet_info *pinfo,
offset = dissect_feccode(tree, tvb, offset, pinfo, 0);
while (tvb_reported_length_remaining(tvb, offset) > 0) {
proto_tree_add_item(tree, hf_cc_transport_id, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 2;
proto_tree_add_item(tree, hf_cc_transport_id, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2;
}
return offset;
}

View File

@ -118,7 +118,7 @@ proto_register_tdmoe(void)
static hf_register_info hf[] = {
{ &hf_tdmoe_subaddress,
{ "Subaddress", "tdmoe.subaddress", FT_UINT8, BASE_DEC, NULL, 0x0,
{ "Subaddress", "tdmoe.subaddress", FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_tdmoe_samples,
{ "Samples", "tdmoe.samples", FT_UINT8, BASE_DEC, NULL, 0x0,

View File

@ -1919,7 +1919,7 @@ proto_register_tecmp_payload(void) {
FT_BOOLEAN, 32, TFS(&tfs_tecmp_payload_data_id_type), 0x80000000, NULL, HFILL }},
{ &hf_tecmp_payload_data_id_11,
{ "ID (11bit)", "tecmp.payload.data.can_id_11",
FT_UINT32, BASE_HEX_DEC, NULL, 0x7FF, NULL, HFILL }},
FT_UINT32, BASE_HEX_DEC, NULL, 0x000007FF, NULL, HFILL }},
{ &hf_tecmp_payload_data_id_29,
{ "ID (29bit)", "tecmp.payload.data.can_id_29",
FT_UINT32, BASE_HEX_DEC, NULL, 0x1FFFFFFF, NULL, HFILL }},

View File

@ -868,6 +868,7 @@ void proto_register_ubertooth(void);
void proto_reg_handoff_ubertooth(void);
/* TODO: rewrite to use e.g. proto_tree_add_bitmask() ? */
static void
dissect_cc2400_register(proto_tree *tree, tvbuff_t *tvb, gint offset, guint8 register_id)
{
@ -2954,7 +2955,7 @@ proto_register_ubertooth(void)
},
{ &hf_cc2400_lmtst_lna_current,
{ "Main current in the LNA", "ubertooth.register.value.lmtst.lna_current",
FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_lmtst_lna_current_vals_ext, 0x003,
FT_UINT16, BASE_DEC | BASE_EXT_STRING, &cc2400_lmtst_lna_current_vals_ext, 0x0003,
NULL, HFILL }
},
{ &hf_cc2400_manor_vga_reset_n,
@ -3079,7 +3080,7 @@ proto_register_ubertooth(void)
},
{ &hf_cc2400_mdmtst1_bsync_threshold,
{ "B-Sync Threshold", "ubertooth.register.value.mdmtst1.bsync_threshold",
FT_UINT16, BASE_DEC, NULL, 0x07F,
FT_UINT16, BASE_DEC, NULL, 0x007F,
NULL, HFILL }
},
{ &hf_cc2400_dactst_reserved,

View File

@ -546,7 +546,7 @@ proto_register_vcdu(void)
#if 0
{ &hf_smex_spare,
{ "Spare", "vcdu.smex.spare",
FT_UINT16, BASE_DEC, NULL, 0x03f,
FT_UINT16, BASE_DEC, NULL, 0x003f,
"SMEX Spare", HFILL }
},
#endif

View File

@ -37,7 +37,7 @@ errors_found = 0
def name_has_one_of(name, substring_list):
for word in substring_list:
if name.find(word) != -1:
if name.lower().find(word) != -1:
return True
return False
@ -274,8 +274,8 @@ known_non_contiguous_fields = { 'wlan.fixed.capabilities.cfpoll.sta',
'stun.type.class',
'bssgp.csg_id', 'tiff.t6.unused', 'artnet.ip_prog_reply.unused',
'telnet.auth.mod.enc', 'osc.message.midi.bender', 'btle.data_header.rfu',
'stun.type.method' # figure 3 in rfc 5389
'stun.type.method', # figure 3 in rfc 5389
'tds.done.status' # covers all bits in bitset
}
##################################################################################################
@ -399,6 +399,9 @@ class Item:
# Do see non-contiguous bits often for these..
if name_has_one_of(self.hf, ['reserved', 'unknown']):
return
if name_has_one_of(self.label, ['reserved', 'unknown']):
return
# Walk past any l.s. 0 bits
n = 0