diff options
author | Martin Mathieson <martin.mathieson@keysight.com> | 2023-07-10 09:41:35 +0100 |
---|---|---|
committer | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2023-07-10 12:18:00 +0000 |
commit | 4f7fc217084efd278ec93fac5d7ab5ac04ba5a8c (patch) | |
tree | efa20d7914bc450060d0660b6b31d87617995671 | |
parent | b41504399e7c7090851993bf17805089f453a201 (diff) |
check_typed_item_calls: fix some minor issues
-rw-r--r-- | epan/dissectors/packet-json_3gpp.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-lustre.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-nfapi.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-sndcp-xid.c | 54 | ||||
-rw-r--r-- | epan/dissectors/packet-v150fw.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-wisun.c | 1 | ||||
-rwxr-xr-x | tools/check_typed_item_calls.py | 2 |
7 files changed, 42 insertions, 41 deletions
diff --git a/epan/dissectors/packet-json_3gpp.c b/epan/dissectors/packet-json_3gpp.c index 5607226246..c2ec9bcd73 100644 --- a/epan/dissectors/packet-json_3gpp.c +++ b/epan/dissectors/packet-json_3gpp.c @@ -72,7 +72,7 @@ static int hf_json_3gpp_suppfeat_npcf_am_8_es3xx = -1; static int hf_json_3gpp_suppfeat_npcf_am_9_ueslicembrauthorization = -1; static int hf_json_3gpp_suppfeat_npcf_am_10_aminfluence = -1; static int hf_json_3gpp_suppfeat_npcf_am_11_enena = -1; -static int hf_json_3gpp_suppfeat_npcf_am_12_targetnassai = -1; +static int hf_json_3gpp_suppfeat_npcf_am_12_targetnssai = -1; static int hf_json_3gpp_suppfeat_npcf_am_13_5gaccessstratumtime = -1; @@ -310,7 +310,7 @@ dissect_3gpp_supportfeatures(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo &hf_json_3gpp_suppfeat_npcf_am_9_ueslicembrauthorization, &hf_json_3gpp_suppfeat_npcf_am_10_aminfluence, &hf_json_3gpp_suppfeat_npcf_am_11_enena, - &hf_json_3gpp_suppfeat_npcf_am_12_targetnassai, + &hf_json_3gpp_suppfeat_npcf_am_12_targetnssai, NULL }; proto_tree_add_bitmask_list(sub_tree, suppfeat_tvb, offset_reverse, 1, json_3gpp_suppfeat_npcf_am_list_3, ENC_UTF_8|BASE_DEC_HEX); @@ -826,8 +826,8 @@ proto_register_json_3gpp(void) FT_BOOLEAN, 4, NULL, 0x4, NULL, HFILL } }, - { &hf_json_3gpp_suppfeat_npcf_am_12_targetnassai, - { "TargetNSSAI", "json.3gpp.suppfeat.targetnassai", + { &hf_json_3gpp_suppfeat_npcf_am_12_targetnssai, + { "TargetNSSAI", "json.3gpp.suppfeat.targetnssai", FT_BOOLEAN, 4, NULL, 0x8, NULL, HFILL } }, diff --git a/epan/dissectors/packet-lustre.c b/epan/dissectors/packet-lustre.c index b58548dd31..0976f2797c 100644 --- a/epan/dissectors/packet-lustre.c +++ b/epan/dissectors/packet-lustre.c @@ -7981,7 +7981,7 @@ proto_register_lustre(void) { &hf_lustre_ldlm_resource_desc, { "LDLM Resc Desc", "lustre.ldlm_resource_desc", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL } }, { &hf_lustre_ldlm_resource_desc_lr_type, - { "Lr Type", "lustre.ldlm_resource_desc.lr_type", FT_UINT16, BASE_DEC, VALS(lustre_ldlm_type_vals), 0, NULL, HFILL }}, + { "Lr Type", "lustre.ldlm_resource_desc.lr_type", FT_UINT32, BASE_DEC, VALS(lustre_ldlm_type_vals), 0, NULL, HFILL }}, { &hf_lustre_ldlm_resource_desc_lr_padding, { "Lr Padding", "lustre.ldlm_resource_desc.lr_padding", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, diff --git a/epan/dissectors/packet-nfapi.c b/epan/dissectors/packet-nfapi.c index b1fa7593f1..e6b0e2af62 100644 --- a/epan/dissectors/packet-nfapi.c +++ b/epan/dissectors/packet-nfapi.c @@ -903,7 +903,7 @@ static int hf_nfapi_maximum_transmit_power = -1; static int hf_nfapi_maximum_transmit_power_2 = -1; static int hf_nfapi_earfcn = -1; static int hf_nfapi_minimum_transmit_power = -1; -static int hf_nfapi_number_of_antennas_suppported = -1; +static int hf_nfapi_number_of_antennas_supported = -1; static int hf_nfapi_minimum_downlink_frequency = -1; static int hf_nfapi_maximum_downlink_frequency = -1; static int hf_nfapi_minimum_uplink_frequency = -1; @@ -1681,7 +1681,7 @@ static void dissect_pnf_rf_config_value(ptvcursor_t * ptvc, packet_info* pinfo) ptvcursor_add(ptvc, hf_nfapi_maximum_transmit_power, 2, ENC_BIG_ENDIAN); ptvcursor_add(ptvc, hf_nfapi_minimum_transmit_power, 2, ENC_BIG_ENDIAN); - item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_antennas_suppported, 1, ENC_BIG_ENDIAN, &test_value); + item = ptvcursor_add_ret_uint(ptvc, hf_nfapi_number_of_antennas_supported, 1, ENC_BIG_ENDIAN, &test_value); switch (test_value) { case 1: @@ -9551,8 +9551,8 @@ void proto_register_nfapi(void) FT_UINT16, BASE_CUSTOM, CF_FUNC(max_transmit_power_conversion_fn), 0x0, "The minimum transmit power for the RF chain operating at the maximum supported bandwidth as defined in 3GPP TS 36.104.", HFILL } }, - { &hf_nfapi_number_of_antennas_suppported, - { "Number of Supported Antennas", "nfapi.number_of_antennas_suppported", + { &hf_nfapi_number_of_antennas_supported, + { "Number of Supported Antennas", "nfapi.number_of_antennas_supported", FT_UINT8, BASE_DEC, NULL, 0x0, "The maximum number of antennas supported.", HFILL } }, @@ -9567,7 +9567,7 @@ void proto_register_nfapi(void) "The maximum supported downlink frequency in 100kHz units", HFILL } }, { &hf_nfapi_minimum_uplink_frequency, - { "Minimum uplink frequency", "nfapi.minimum_downlink_frequency", + { "Minimum uplink frequency", "nfapi.minimum_uplink_frequency", FT_UINT32, BASE_DEC | BASE_UNIT_STRING, &khz_100_units_db, 0x0, "The minimum supported uplink frequency in 100kHz units", HFILL } }, diff --git a/epan/dissectors/packet-sndcp-xid.c b/epan/dissectors/packet-sndcp-xid.c index 8fa41c99c0..b5adfa3db2 100644 --- a/epan/dissectors/packet-sndcp-xid.c +++ b/epan/dissectors/packet-sndcp-xid.c @@ -701,11 +701,11 @@ proto_register_sndcp_xid(void) static hf_register_info hf[] = { /* L3 XID Parameter Parsing Info */ {&hf_sndcp_xid_type, - { "Parameter type","llcgprs.l3xidpartype", FT_UINT8, BASE_DEC, NULL, 0xFF, "Data", HFILL}}, + { "Parameter type","llcgprs.l3xidpartype", FT_UINT8, BASE_DEC, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_len, - { "Length","llcgprs.l3xidparlen", FT_UINT8, BASE_DEC, NULL, 0xFF, "Data", HFILL}}, + { "Length","llcgprs.l3xidparlen", FT_UINT8, BASE_DEC, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_value, - { "Value","llcgprs.l3xidparvalue", FT_UINT8, BASE_DEC, NULL, 0xFF, "Data", HFILL}}, + { "Value","llcgprs.l3xidparvalue", FT_UINT8, BASE_DEC, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_comp_pbit, { "P bit","llcgprs.l3xiddcomppbit", FT_UINT8, BASE_DEC, NULL, 0x80, "Data", HFILL}}, {&hf_sndcp_xid_comp_spare_byte1, @@ -717,7 +717,7 @@ proto_register_sndcp_xid(void) {&hf_sndcp_xid_comp_algo_id, { "Algorithm identifier","llcgprs.l3xidalgoid", FT_UINT8, BASE_DEC, NULL, 0x1F, "Data", HFILL}}, {&hf_sndcp_xid_comp_len, - { "Length","llcgprs.l3xidcomplen", FT_UINT8, BASE_DEC, NULL, 0xFF, "Data", HFILL}}, + { "Length","llcgprs.l3xidcomplen", FT_UINT8, BASE_DEC, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_comp[0], { "DCOMP1","llcgprs.l3xiddcomp", FT_UINT8, BASE_DEC, NULL, 0xF0, "Data", HFILL}}, {&hf_sndcp_xid_comp[1], @@ -775,43 +775,43 @@ proto_register_sndcp_xid(void) {&hf_element_applicable_nsapi_spare, { "Spare","sndcpxid.spare", FT_UINT8, BASE_DEC, NULL, 0x1F, "Ignore", HFILL}}, {&hf_sndcp_xid_rfc1144_s0, - { "S0 - 1","sndcpxid.rfc1144_s0", FT_UINT8, BASE_DEC, NULL, 0xFF, "Data", HFILL}}, + { "S0 - 1","sndcpxid.rfc1144_s0", FT_UINT8, BASE_DEC, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_rfc2507_f_max_period_msb, - { "F Max Period MSB","sndcpxid.rfc2507_f_max_period_msb", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "F Max Period MSB","sndcpxid.rfc2507_f_max_period_msb", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_rfc2507_f_max_period_lsb, - { "F Max Period LSB","sndcpxid.rfc2507_f_max_period_lsb", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "F Max Period LSB","sndcpxid.rfc2507_f_max_period_lsb", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_rfc2507_f_max_time, - { "F Max Time","sndcpxid.rfc2507_f_max_time", FT_UINT8, BASE_DEC, NULL, 0xFF, "Data", HFILL}}, + { "F Max Time","sndcpxid.rfc2507_f_max_time", FT_UINT8, BASE_DEC, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_rfc2507_max_header, - { "Max Header","sndcpxid.rfc2507_max_header", FT_UINT8, BASE_DEC, NULL, 0xFF, "Data", HFILL}}, + { "Max Header","sndcpxid.rfc2507_max_header", FT_UINT8, BASE_DEC, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_rfc2507_tcp_space, - { "TCP Space","sndcpxid.rfc2507_max_tcp_space", FT_UINT8, BASE_DEC, NULL, 0xFF, "Data", HFILL}}, + { "TCP Space","sndcpxid.rfc2507_max_tcp_space", FT_UINT8, BASE_DEC, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_rfc2507_non_tcp_space_msb, - { "TCP non space MSB","sndcpxid.rfc2507_max_non_tcp_space_msb", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "TCP non space MSB","sndcpxid.rfc2507_max_non_tcp_space_msb", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_rfc2507_non_tcp_space_lsb, - { "TCP non space LSB","sndcpxid.rfc2507_max_non_tcp_space_lsb", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "TCP non space LSB","sndcpxid.rfc2507_max_non_tcp_space_lsb", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_rohc_max_cid_spare, { "Spare","sndcpxid.rohc_max_cid_spare", FT_UINT8, BASE_DEC, NULL, 0xC0, "Ignore", HFILL}}, {&hf_sndcp_xid_rohc_max_cid_msb, { "Max CID MSB","sndcpxid.rohc_max_cid_msb", FT_UINT8, BASE_HEX, NULL, 0x3F, "Data", HFILL}}, {&hf_sndcp_xid_rohc_max_cid_lsb, - { "Max CID LSB","sndcpxid.rohc_max_cid_lsb", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "Max CID LSB","sndcpxid.rohc_max_cid_lsb", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_rohc_max_header, - { "Max header","sndcpxid.rohc_max_header", FT_UINT8, BASE_DEC, NULL, 0xFF, "Data", HFILL}}, + { "Max header","sndcpxid.rohc_max_header", FT_UINT8, BASE_DEC, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_rohc_profile_msb, - { "Profile MSB","sndcpxid.rohc_profile_msb", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "Profile MSB","sndcpxid.rohc_profile_msb", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_rohc_profile_lsb, - { "Profile LSB","sndcpxid.rohc_profile_lsb", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "Profile LSB","sndcpxid.rohc_profile_lsb", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_V42bis_p0_spare, { "Spare","sndcpxid.V42bis_p0spare", FT_UINT8, BASE_DEC, NULL, 0xFC, "Ignore", HFILL}}, {&hf_sndcp_xid_V42bis_p0, { "P0","sndcpxid.V42bis_p0", FT_UINT8, BASE_HEX, NULL, 0x03, "Data", HFILL}}, {&hf_sndcp_xid_V42bis_p1_msb, - { "P1 MSB","sndcpxid.V42bis_p1_msb", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "P1 MSB","sndcpxid.V42bis_p1_msb", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_V42bis_p1_lsb, - { "P1 LSB","sndcpxid.V42bis_p1_lsb", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "P1 LSB","sndcpxid.V42bis_p1_lsb", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_V42bis_p2, - { "P2","sndcpxid.V42bis_p2", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "P2","sndcpxid.V42bis_p2", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_V44_c0_spare, { "P2","sndcpxid.V44_c0_spare", FT_UINT8, BASE_HEX, NULL, 0x3F, "Ignore", HFILL}}, {&hf_sndcp_xid_V44_c0, @@ -821,21 +821,21 @@ proto_register_sndcp_xid(void) {&hf_sndcp_xid_V44_p0, { "P0","sndcpxid.V44_p0", FT_UINT8, BASE_HEX, NULL, 0x03, "Data", HFILL}}, {&hf_sndcp_xid_V44_p1t_msb, - { "P1t MSB","sndcpxid.V44_p1t_msb", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "P1t MSB","sndcpxid.V44_p1t_msb", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_V44_p1t_lsb, - { "P1t LSB","sndcpxid.V44_p1t_lsb", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "P1t LSB","sndcpxid.V44_p1t_lsb", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_V44_p1r_msb, - { "P1r MSB","sndcpxid.V44_p1r_msb", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "P1r MSB","sndcpxid.V44_p1r_msb", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_V44_p1r_lsb, - { "P1r LSB","sndcpxid.V44_p1r_lsb", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "P1r LSB","sndcpxid.V44_p1r_lsb", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_V44_p3t_msb, - { "P3t MSB","sndcpxid.V44_p3t_msb", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "P3t MSB","sndcpxid.V44_p3t_msb", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_V44_p3t_lsb, - { "P3t LSB","sndcpxid.V44_p3t_lsb", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "P3t LSB","sndcpxid.V44_p3t_lsb", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_V44_p3r_msb, - { "P3r MSB","sndcpxid.V44_p3r_msb", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "P3r MSB","sndcpxid.V44_p3r_msb", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, {&hf_sndcp_xid_V44_p3r_lsb, - { "P3r LSB","sndcpxid.V44_p3r_lsb", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}}, + { "P3r LSB","sndcpxid.V44_p3r_lsb", FT_UINT8, BASE_HEX, NULL, 0x0, "Data", HFILL}}, }; /* Setup protocol subtree array */ diff --git a/epan/dissectors/packet-v150fw.c b/epan/dissectors/packet-v150fw.c index e56772fba6..782d9708d7 100644 --- a/epan/dissectors/packet-v150fw.c +++ b/epan/dissectors/packet-v150fw.c @@ -444,7 +444,7 @@ proto_register_v150fw(void) FT_UINT16, BASE_HEX, NULL, - 0xFFFF, + 0x0, NULL, HFILL } }, @@ -516,7 +516,7 @@ proto_register_v150fw(void) FT_UINT8, BASE_HEX, NULL, - 0xFF, + 0x0, NULL, HFILL } }, @@ -528,7 +528,7 @@ proto_register_v150fw(void) FT_UINT16, BASE_HEX, NULL, - 0xFFFF, + 0x0, NULL, HFILL } }, diff --git a/epan/dissectors/packet-wisun.c b/epan/dissectors/packet-wisun.c index eff139dc60..679a9615ff 100644 --- a/epan/dissectors/packet-wisun.c +++ b/epan/dissectors/packet-wisun.c @@ -1182,6 +1182,7 @@ dissect_wisun_schedule_common(tvbuff_t *tvb, packet_info *pinfo, guint offset, p while (count) { guint16 ex_start = tvb_get_letohs(tvb, offset); guint16 ex_end = tvb_get_letohs(tvb, offset+2); + /* TODO: log as separate start and end values so filterable? */ proto_tree_add_uint_format_value(tree, hf_wisun_usie_exclude_range, tvb, offset, 4, ex_start, "[%u-%u]", ex_start, ex_end); offset += 4; count--; diff --git a/tools/check_typed_item_calls.py b/tools/check_typed_item_calls.py index c458a12540..8f00f5a421 100755 --- a/tools/check_typed_item_calls.py +++ b/tools/check_typed_item_calls.py @@ -716,7 +716,7 @@ class Item: if num_digits is None: return if mask[2:] == 'f'*num_digits or mask[2:] == 'F'*num_digits: - print('Warning:', self.filename, self.hf, 'filter=', self.filter, ' - item is all set - this is confusing - set 0 instead! :', '"' + mask + '"') + print('Warning:', self.filename, self.hf, 'filter=', self.filter, ' - mask is all set - this is confusing - set 0 instead! :', '"' + mask + '"') global warnings_found warnings_found += 1 |