More checking labels vs filter

This commit is contained in:
Martin Mathieson 2023-06-26 20:37:06 +00:00
parent adb8cb61e5
commit db0f56f025
9 changed files with 28 additions and 28 deletions

View File

@ -1671,7 +1671,7 @@ void proto_register_awdl(void)
}
},
{ &hf_awdl_datastate_flags_7,
{ "Bit 6", "awdl.datastate.flags.7",
{ "Bit 7", "awdl.datastate.flags.7",
FT_BOOLEAN, 16, NULL, 0x0080, NULL, HFILL
}
},

View File

@ -84,7 +84,7 @@ static int hf_bssgp_rim_app_id = -1;
static int hf_bssgp_rim_seq_no = -1;
static int hf_bssgp_rat_discriminator = -1;
static int hf_bssgp_nacc_cause = -1;
static int hf_bssgp_s13_cause = -1;
static int hf_bssgp_si3_cause = -1;
static int hf_bssgp_mbms_data_ch_cause = -1;
static int hf_bssgp_utra_si_cause = -1;
static int hf_bssgp_num_si_psi = -1;
@ -2012,7 +2012,7 @@ static const value_string bssgp_nacc_cause_vals[] = {
{ 0, NULL },
};
static const value_string bssgp_s13_cause_vals[] = {
static const value_string bssgp_si3_cause_vals[] = {
{ 0, "Other unspecified error" },
{ 1, "Syntax error in the Application Container" },
{ 2, "Reporting Cell Identifier does not match with the Destination Cell Identifier or with the Source Cell Identifier" },
@ -2061,7 +2061,7 @@ de_bssgp_ran_app_error_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
* 11.3.64.2 Application Error Container for the SI3 application
*/
/* Octet 3 SI3 Cause */
proto_tree_add_item(tree, hf_bssgp_s13_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_bssgp_si3_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset++;
/* Erroneous Application Container including IEI and LI */
proto_tree_add_expert(tree, pinfo, &ei_bssgp_erroneous_app_container, tvb, curr_offset, len-(curr_offset-offset));
@ -7021,9 +7021,9 @@ proto_register_bssgp(void)
FT_UINT8, BASE_DEC, VALS(bssgp_nacc_cause_vals), 0x0,
NULL, HFILL }
},
{ &hf_bssgp_s13_cause,
{ "SI3 Cause", "bssgp.s13_cause",
FT_UINT8, BASE_DEC, VALS(bssgp_s13_cause_vals), 0x0,
{ &hf_bssgp_si3_cause,
{ "SI3 Cause", "bssgp.si3_cause",
FT_UINT8, BASE_DEC, VALS(bssgp_si3_cause_vals), 0x0,
NULL, HFILL }
},
{ &hf_bssgp_mbms_data_ch_cause,

View File

@ -1460,7 +1460,7 @@ void proto_register_dect_mitel_eth(void)
}
},
{ &hf_dect_mitel_eth_rfpc_higher_layer_capabilities_g726,
{ "ADPCM/G-726 Voice service", "dect_mitel_eth.rfpc.higher_layer_capabilities.g729", FT_BOOLEAN, 16,
{ "ADPCM/G-726 Voice service", "dect_mitel_eth.rfpc.higher_layer_capabilities.g726", FT_BOOLEAN, 16,
TFS(&tfs_yes_no), DECT_MITEL_ETH_RFPC_HIGHER_LAYER_CAPABILITIES_G726, NULL, HFILL
}
},

View File

@ -636,13 +636,13 @@ proto_register_dlsw(void)
{ &hf_dlsw_gds_id, { "GDS ID", "dlsw.gds_id", FT_UINT16, BASE_DEC, VALS(dlsw_gds_vals), 0x0, NULL, HFILL }},
{ &hf_dlsw_sap_list_support, { "SAP List Support", "dlsw.sap_list_support", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_dlsw_sap_list_support_x0, { "x0", "dlsw.sap_list_support.x0", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x80, NULL, HFILL }},
{ &hf_dlsw_sap_list_support_x2, { "x0", "dlsw.sap_list_support.x2", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x40, NULL, HFILL }},
{ &hf_dlsw_sap_list_support_x4, { "x0", "dlsw.sap_list_support.x4", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x20, NULL, HFILL }},
{ &hf_dlsw_sap_list_support_x6, { "x0", "dlsw.sap_list_support.x6", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x10, NULL, HFILL }},
{ &hf_dlsw_sap_list_support_x8, { "x0", "dlsw.sap_list_support.x8", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x08, NULL, HFILL }},
{ &hf_dlsw_sap_list_support_xA, { "x0", "dlsw.sap_list_support.xA", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x04, NULL, HFILL }},
{ &hf_dlsw_sap_list_support_xC, { "x0", "dlsw.sap_list_support.xC", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x02, NULL, HFILL }},
{ &hf_dlsw_sap_list_support_xE, { "x0", "dlsw.sap_list_support.xE", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x01, NULL, HFILL }},
{ &hf_dlsw_sap_list_support_x2, { "x2", "dlsw.sap_list_support.x2", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x40, NULL, HFILL }},
{ &hf_dlsw_sap_list_support_x4, { "x4", "dlsw.sap_list_support.x4", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x20, NULL, HFILL }},
{ &hf_dlsw_sap_list_support_x6, { "x6", "dlsw.sap_list_support.x6", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x10, NULL, HFILL }},
{ &hf_dlsw_sap_list_support_x8, { "x8", "dlsw.sap_list_support.x8", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x08, NULL, HFILL }},
{ &hf_dlsw_sap_list_support_xA, { "xA", "dlsw.sap_list_support.xA", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x04, NULL, HFILL }},
{ &hf_dlsw_sap_list_support_xC, { "xC", "dlsw.sap_list_support.xC", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x02, NULL, HFILL }},
{ &hf_dlsw_sap_list_support_xE, { "xE", "dlsw.sap_list_support.xE", FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x01, NULL, HFILL }},
};
static gint *ett[] = {

View File

@ -541,7 +541,7 @@ static int hf_gsm_a_rr_rfn = -1;
static int hf_gsm_a_rr_RR_cause = -1;
static int hf_gsm_a_rr_cm_cng_msg_req = -1;
static int hf_gsm_a_rr_utran_cm_cng_msg_req = -1;
static int hf_gsm_a_rr_cdma200_cm_cng_msg_req = -1;
static int hf_gsm_a_rr_cdma2000_cm_cng_msg_req = -1;
static int hf_gsm_a_rr_geran_iu_cm_cng_msg_req = -1;
int hf_gsm_a_rr_chnl_needed_ch1 = -1;
static int hf_gsm_a_rr_chnl_needed_ch2 = -1;
@ -2550,7 +2550,7 @@ de_rr_cm_enq_mask(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint
proto_tree_add_item(tree, hf_gsm_a_rr_cm_cng_msg_req, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_gsm_a_rr_utran_cm_cng_msg_req, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_gsm_a_rr_cdma200_cm_cng_msg_req, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_gsm_a_rr_cdma2000_cm_cng_msg_req, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_gsm_a_rr_geran_iu_cm_cng_msg_req, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
curr_offset = curr_offset + 1;
@ -12835,8 +12835,8 @@ proto_register_gsm_a_rr(void)
FT_UINT8,BASE_DEC, VALS(gsm_a_rr_utran_cm_cng_msg_req_vals), 0x70,
NULL, HFILL }
},
{ &hf_gsm_a_rr_cdma200_cm_cng_msg_req,
{ "CDMA2000 CLASSMARK CHANGE","gsm_a.rr.cdma200_cm_cng_msg_req",
{ &hf_gsm_a_rr_cdma2000_cm_cng_msg_req,
{ "CDMA2000 CLASSMARK CHANGE","gsm_a.rr.cdma2000_cm_cng_msg_req",
FT_BOOLEAN,8, TFS(&gsm_a_msg_req_value), 0x08,
NULL, HFILL }
},

View File

@ -1618,7 +1618,7 @@ void proto_register_message_analyzer(void)
FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }
},
{ &hf_etw_ndis_ipsec_offload_v1_net_buffer_list_info,
{ "IPsecOffloadV2NetBufferListInfo", "etw.ndis.ipsec_offload_v1_net_buffer_list_info",
{ "IPsecOffloadV1NetBufferListInfo", "etw.ndis.ipsec_offload_v1_net_buffer_list_info",
FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }
},
{ &hf_etw_ndis_tcp_large_send_net_buffer_list_info,

View File

@ -4449,8 +4449,8 @@ void proto_register_mq(void)
{&hf_mq_lpoo_defreadahead, {"DefReadAHead..", "mq.lpoo.defreadahead", FT_INT32, BASE_DEC, VALS(GET_VALSV(MQREADA)), 0x0, "LPOO Default Read AHead", HFILL}},
{&hf_mq_lpoo_propertyctl, {"PropertyCtl...", "mq.lpoo.propertyctl", FT_INT32, BASE_DEC, NULL, 0x0, "LPOO Property Control", HFILL}},
{&hf_mq_lpoo_qprotect, {"qprotect......", "mq.lpoo.qprotect", FT_STRING, BASE_NONE, NULL, 0x0, "LPOO queue protection", HFILL}},
{&hf_mq_lpoo_qprotect_val1, {"qprotect_val1.", "mq.lpoo.qprotect.val2", FT_INT32, BASE_DEC, NULL, 0x0, "LPOO queue protection val1", HFILL}},
{&hf_mq_lpoo_qprotect_val2, {"qprotect_val2.", "mq.lpoo.qprotect.val1", FT_INT32, BASE_DEC, NULL, 0x0, "LPOO queue protection val2", HFILL}},
{&hf_mq_lpoo_qprotect_val1, {"qprotect_val1.", "mq.lpoo.qprotect.val1", FT_INT32, BASE_DEC, NULL, 0x0, "LPOO queue protection val1", HFILL}},
{&hf_mq_lpoo_qprotect_val2, {"qprotect_val2.", "mq.lpoo.qprotect.val2", FT_INT32, BASE_DEC, NULL, 0x0, "LPOO queue protection val2", HFILL}},
{&hf_mq_pmo_StructID, {"StructID...", "mq.pmo.structid", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
{&hf_mq_pmo_version, {"Version....", "mq.pmo.version", FT_UINT32, BASE_DEC, NULL, 0x0, "PMO version", HFILL}},
@ -4612,7 +4612,7 @@ void proto_register_mq(void)
{&hf_mq_cih_startcode, {"StartCode....", "mq.cih.startcode", FT_STRING, BASE_NONE, NULL, 0x0, "Transaction Start Code", HFILL}},
{&hf_mq_cih_cancelcode, {"CancelCode...", "mq.cih.cancelcode", FT_STRING, BASE_NONE, NULL, 0x0, "Abend transaction code", HFILL}},
{&hf_mq_cih_nexttransid, {"NextTransId..", "mq.cih.nexttransid", FT_STRING, BASE_NONE, NULL, 0x0, "Next transaction to attach", HFILL}},
{&hf_mq_cih_reserved2, {"Reserved3....", "mq.cih.reserved2", FT_STRING, BASE_NONE, NULL, 0x0, "Reserved 2", HFILL}},
{&hf_mq_cih_reserved2, {"Reserved2....", "mq.cih.reserved2", FT_STRING, BASE_NONE, NULL, 0x0, "Reserved 2", HFILL}},
{&hf_mq_cih_reserved3, {"Reserved3....", "mq.cih.reserved3", FT_STRING, BASE_NONE, NULL, 0x0, "Reserved 3", HFILL}},
{&hf_mq_cih_cursorpos, {"CursorPos....", "mq.cih.cursorpos", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, "Cursor Position", HFILL}},
{&hf_mq_cih_erroroffset, {"ErrorOffset..", "mq.cih.erroroffset", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, "Offset of error in message", HFILL}},

View File

@ -1670,7 +1670,7 @@ void proto_register_zbee_zdp(void)
NULL, HFILL }},
{ &hf_zbee_zdp_node_freq_900,
{ "902MHz BPSK Band", "zbee_zdp.node.freq.900mhz", FT_BOOLEAN, 16, NULL, ZBEE_ZDP_NODE_FREQ_900MHZ,
{ "900MHz BPSK Band", "zbee_zdp.node.freq.900mhz", FT_BOOLEAN, 16, NULL, ZBEE_ZDP_NODE_FREQ_900MHZ,
NULL, HFILL }},
{ &hf_zbee_zdp_node_freq_2400,

View File

@ -723,7 +723,7 @@ class Item:
# Return True if appears to be a match
def check_label_vs_filter(self, reportError=True):
def check_label_vs_filter(self, reportError=True, reportNumericalMismatch=True):
global warnings_found
last_filter = self.filter.split('.')[-1]
@ -755,7 +755,7 @@ class Item:
label_numbers = re.findall(r'\d+', label_orig)
filter_numbers = re.findall(r'\d+', last_filter_orig)
if len(label_numbers) == len(filter_numbers) and label_numbers != filter_numbers:
if reportError:
if reportNumericalMismatch:
print('Warning:', self.filename, self.hf, 'label="' + self.label + '" has different **numbers** from filter="' + self.filter + '"')
print(label_numbers, filter_numbers)
warnings_found += 1
@ -1132,7 +1132,7 @@ def checkFile(filename, check_mask=False, mask_exact_width=False, check_label=Fa
if label_vs_filter:
matches = 0
for hf in items_defined:
if items_defined[hf].check_label_vs_filter(reportError=False):
if items_defined[hf].check_label_vs_filter(reportError=False, reportNumericalMismatch=True):
matches += 1
# Only checking if almost every field does match.
@ -1140,7 +1140,7 @@ def checkFile(filename, check_mask=False, mask_exact_width=False, check_label=Fa
if checking:
print(filename, ':', matches, 'label-vs-filter matches of out of', len(items_defined), 'so reporting mismatches')
for hf in items_defined:
items_defined[hf].check_label_vs_filter(reportError=True)
items_defined[hf].check_label_vs_filter(reportError=True, reportNumericalMismatch=False)