aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-docsis-macmgmt.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.mathieson@keysight.com>2020-08-07 21:15:46 +0100
committerAnders Broman <a.broman58@gmail.com>2020-08-07 21:27:26 +0000
commit1dd8bb2811d0e3e676b61f3d7e5ac311aa8ab4fc (patch)
tree63d5c9bac648a0c2a8d58555f5fe70773f2649e3 /epan/dissectors/packet-docsis-macmgmt.c
parentb711b300cc9da138ff4d1a5aeeae538710c9daa5 (diff)
Find and fix dissectors that should be using a default tfs.
Found using tools/check_tfs.py, included in this commit. Here are the reports that were fixed here: Examining: All dissector modules epan/dissectors/packet-assa_r3.c tfs_mortisepins_flags - could have used tfs_high_low from tfs.c instead: {High,Low} epan/dissectors/packet-btle.c tfs_present_bit - could have used tfs_present_not_present from tfs.c instead: {Present,Not Present} epan/dissectors/packet-dhcp.c tfs_fqdn_s - could have used tfs_server_client from tfs.c instead: {Server,Client} epan/dissectors/packet-docsis-macmgmt.c mdd_tfs_on_off - could have used tfs_on_off from tfs.c instead: {On,Off} epan/dissectors/packet-docsis-macmgmt.c mdd_tfs_en_dis - could have used tfs_enabled_disabled from tfs.c instead: {Enabled,Disabled} epan/dissectors/packet-docsis-macmgmt.c req_not_req_tfs - could have used tfs_requested_not_requested from tfs.c instead: {Requested,Not Requested} epan/dissectors/packet-docsis-tlv.c on_off_tfs - could have used tfs_on_off from tfs.c instead: {On,Off} epan/dissectors/packet-docsis-tlv.c activation_tfs - could have used tfs_active_inactive from tfs.c instead: {Active,Inactive} epan/dissectors/packet-docsis.c ena_dis_tfs - could have used tfs_enabled_disabled from tfs.c instead: {Enabled,Disabled} epan/dissectors/packet-ecmp.c tfs_not_expected_expected - could have used tfs_odd_even from tfs.c instead: {Odd,Even} epan/dissectors/packet-erf.c erf_link_status_tfs - could have used tfs_up_down from tfs.c instead: {Up,Down} epan/dissectors/packet-h263.c on_off_flg - could have used tfs_on_off from tfs.c instead: {On,Off} epan/dissectors/packet-h263.c cpm_flg - could have used tfs_on_off from tfs.c instead: {On,Off} epan/dissectors/packet-interlink.c flags_set_notset - could have used tfs_set_notset from tfs.c instead: {Set,Not set} epan/dissectors/packet-ip.c tos_set_low - could have used tfs_low_normal from tfs.c instead: {Low,Normal} epan/dissectors/packet-ip.c tos_set_high - could have used tfs_high_normal from tfs.c instead: {High,Normal} epan/dissectors/packet-isakmp.c flag_r - could have used tfs_response_request from tfs.c instead: {Response,Request} epan/dissectors/packet-isis-lsp.c tfs_metric_supported_not_supported - could have used tfs_no_yes from tfs.c instead: {No,Yes} epan/dissectors/packet-kerberos.c supported_tfs - could have used tfs_supported_not_supported from tfs.c instead: {Supported,Not supported} epan/dissectors/packet-kerberos.c set_tfs - could have used tfs_set_notset from tfs.c instead: {Set,Not set} epan/dissectors/packet-mac-lte.c mac_lte_scell_status_vals - could have used tfs_activated_deactivated from tfs.c instead: {Activated,Deactivated} epan/dissectors/packet-p_mul.c no_yes - could have used tfs_no_yes from tfs.c instead: {No,Yes} epan/dissectors/packet-pgm.c opts_present - could have used tfs_present_not_present from tfs.c instead: {Present,Not Present} epan/dissectors/packet-rsl.c rsl_ms_fpc_epc_mode_vals - could have used tfs_inuse_not_inuse from tfs.c instead: {In use,Not in use} epan/dissectors/packet-sita.c tfs_sita_on_off - could have used tfs_on_off from tfs.c instead: {On,Off} epan/dissectors/packet-vines.c tfs_vine_rtp_no_yes - could have used tfs_no_yes from tfs.c instead: {No,Yes} epan/dissectors/packet-vnc.c button_mask_tfs - could have used tfs_pressed_not_pressed from tfs.c instead: {Pressed,Not pressed} 27 issues found Change-Id: I7e53b491f20289955c9e9caa8357197d9010a5aa Reviewed-on: https://code.wireshark.org/review/38087 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-docsis-macmgmt.c')
-rw-r--r--epan/dissectors/packet-docsis-macmgmt.c47
1 files changed, 21 insertions, 26 deletions
diff --git a/epan/dissectors/packet-docsis-macmgmt.c b/epan/dissectors/packet-docsis-macmgmt.c
index 1dfd844e48..edebd80d4e 100644
--- a/epan/dissectors/packet-docsis-macmgmt.c
+++ b/epan/dissectors/packet-docsis-macmgmt.c
@@ -2461,9 +2461,6 @@ static const value_string rba_subband_direction_vals [] = {
{0, NULL}
};
-/* Windows does not allow data copy between dlls */
-static const true_false_string mdd_tfs_on_off = { "On", "Off" };
-static const true_false_string mdd_tfs_en_dis = { "Enabled", "Disabled" };
static const true_false_string tfs_ucd_change_ind_vals = {"Changes", "No changes"};
@@ -2471,8 +2468,6 @@ static const true_false_string tfs_allow_inhibit = { "Inhibit Initial Ranging",
const true_false_string type35ucd_tfs_present_not_present = { "UCD35 is present for this UCID",
"UCD35 is not present for this UCID" };
-static const true_false_string req_not_req_tfs = {"Requested", "Not Requested"};
-
static const true_false_string sid_field_bit15_tfs = {
"The commanded power level P1.6r_n is higher than the value corresponding to the top of the DRW.",
"The commanded power level P1.6r_n is not higher than the value corresponding to the top of the DRW."
@@ -9469,7 +9464,7 @@ proto_register_docsis_mgmt (void)
},
{&hf_docsis_mdd_extended_upstream_transmit_power_support,
{ "Extended Upstream Transmit Power Support", "docsis_mdd.extended_upstream_transmit_power_support",
- FT_BOOLEAN, BASE_NONE, TFS(&mdd_tfs_on_off), 0x0,
+ FT_BOOLEAN, BASE_NONE, TFS(&tfs_on_off), 0x0,
"Mdd Extended Upstream Transmit Power Support", HFILL}
},
{&hf_docsis_mdd_cmts_major_docsis_version,
@@ -9494,62 +9489,62 @@ proto_register_docsis_mgmt (void)
},
{&hf_docsis_mdd_cm_status_event_d31_ofdm_prof_fail,
{ "Downstream OFDM Profile Failure", "docsis_mdd.cm_status_event_d31_ofdm_prof_fail",
- FT_BOOLEAN, 32, TFS(&mdd_tfs_en_dis), 0x01,
+ FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x01,
NULL, HFILL}
},
{&hf_docsis_mdd_cm_status_event_d31_prim_down_chan_change,
{ "Primary Downstream Channel Change", "docsis_mdd.cm_status_event_d31_prim_down_chan_change",
- FT_BOOLEAN, 32, TFS(&mdd_tfs_en_dis), 0x02,
+ FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x02,
NULL, HFILL}
},
{&hf_docsis_mdd_cm_status_event_d31_dpd_mismatch,
{ "DPD Mismatch", "docsis_mdd.cm_status_event_d31_dpd_mismatch",
- FT_BOOLEAN, 32, TFS(&mdd_tfs_en_dis), 0x04,
+ FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x04,
NULL, HFILL}
},
{&hf_docsis_mdd_cm_status_event_d31_deprecated,
{ "Deprecated", "docsis_mdd.cm_status_event_d31_deprecated",
- FT_BOOLEAN, 32, TFS(&mdd_tfs_en_dis), 0x08,
+ FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x08,
NULL, HFILL}
},
{&hf_docsis_mdd_cm_status_event_d31_ncp_prof_fail,
{ "NCP Profile Failure", "docsis_mdd.cm_status_event_d31_ncp_prof_fail",
- FT_BOOLEAN, 32, TFS(&mdd_tfs_en_dis), 0x10,
+ FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x10,
NULL, HFILL}
},
{&hf_docsis_mdd_cm_status_event_d31_loss_fec_plc,
{ "Loss of FEC lock on PLC", "docsis_mdd.cm_status_event_d31_loss_fec_plc",
- FT_BOOLEAN, 32, TFS(&mdd_tfs_en_dis), 0x20,
+ FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x20,
NULL, HFILL}
},
{&hf_docsis_mdd_cm_status_event_d31_ncp_prof_recover,
{ "NCP Profile Recovery", "docsis_mdd.cm_status_event_d31_ncp_prof_recover",
- FT_BOOLEAN, 32, TFS(&mdd_tfs_en_dis), 0x40,
+ FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x40,
NULL, HFILL}
},
{&hf_docsis_mdd_cm_status_event_d31_fec_recover_on_plc,
{ "FEC Recovery on PLC", "docsis_mdd.cm_status_event_d31_fec_recover_on_plc",
- FT_BOOLEAN, 32, TFS(&mdd_tfs_en_dis), 0x80,
+ FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x80,
NULL, HFILL}
},
{&hf_docsis_mdd_cm_status_event_d31_fec_recover_on_ofdm_prof,
{ "FEC Recovery on OFDM Profile", "docsis_mdd.cm_status_event_d31_fec_recover_on_ofdm_prof",
- FT_BOOLEAN, 32, TFS(&mdd_tfs_en_dis), 0x0100,
+ FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x0100,
NULL, HFILL}
},
{&hf_docsis_mdd_cm_status_event_d31_ofdma_prof_fail,
{ "OFDMA Profile Failure", "docsis_mdd.cm_status_event_d31_ofdma_prof_fail",
- FT_BOOLEAN, 32, TFS(&mdd_tfs_en_dis), 0x0200,
+ FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x0200,
NULL, HFILL}
},
{&hf_docsis_mdd_cm_status_event_d31_map_stor_overflow_ind,
{ "MAP Storage Overflow Indicator", "docsis_mdd.cm_status_event_d31_map_stor_overflow_ind",
- FT_BOOLEAN, 32, TFS(&mdd_tfs_en_dis), 0x0400,
+ FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x0400,
NULL, HFILL}
},
{&hf_docsis_mdd_cm_status_event_d31_ofdm_map_stor_almost_full_ind,
{ "MAP Storage Almost Full Indicator", "docsis_mdd.cm_status_event_d31_ofdm_map_stor_almost_full_ind",
- FT_BOOLEAN, 32, TFS(&mdd_tfs_en_dis), 0x0800,
+ FT_BOOLEAN, 32, TFS(&tfs_enabled_disabled), 0x0800,
NULL, HFILL}
},
{&hf_docsis_mdd_cm_status_event_d31_reserved,
@@ -10112,28 +10107,28 @@ proto_register_docsis_mgmt (void)
{"Length", "docsis_optreq.length",FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
},
{&hf_docsis_optreq_reqstat_rxmer_stat_subc,
- {"RxMER Statistics per subcarrier", "docsis_optreq.reqstat.rxmer_stat_per_subcarrier", FT_BOOLEAN, 32, TFS(&req_not_req_tfs), 0x1, NULL, HFILL}
+ {"RxMER Statistics per subcarrier", "docsis_optreq.reqstat.rxmer_stat_per_subcarrier", FT_BOOLEAN, 32, TFS(&tfs_requested_not_requested), 0x1, NULL, HFILL}
},
{&hf_docsis_optreq_reqstat_rxmer_subc_threshold_comp,
- {"RxMER per Subcarrier Threshold Comparison for Candidate Profile", "docsis_optreq.reqstat.rxmer_per_subcarrrier_thresh_comp", FT_BOOLEAN, 32, TFS(&req_not_req_tfs), 0x2, NULL, HFILL}
+ {"RxMER per Subcarrier Threshold Comparison for Candidate Profile", "docsis_optreq.reqstat.rxmer_per_subcarrrier_thresh_comp", FT_BOOLEAN, 32, TFS(&tfs_requested_not_requested), 0x2, NULL, HFILL}
},
{&hf_docsis_optreq_reqstat_snr_marg_cand_prof,
- {"SNR Margin for Candidate Profile", "docsis_optreq.reqstat.snr_marg_cand_prof", FT_BOOLEAN, 32, TFS(&req_not_req_tfs), 0x4, NULL, HFILL}
+ {"SNR Margin for Candidate Profile", "docsis_optreq.reqstat.snr_marg_cand_prof", FT_BOOLEAN, 32, TFS(&tfs_requested_not_requested), 0x4, NULL, HFILL}
},
{&hf_docsis_optreq_reqstat_codew_stat_cand_prof,
- {"Codeword Statistics for Candidate Profile", "docsis_optreq.reqstat.codew_stat_cand_prof", FT_BOOLEAN, 32, TFS(&req_not_req_tfs), 0x8, NULL, HFILL}
+ {"Codeword Statistics for Candidate Profile", "docsis_optreq.reqstat.codew_stat_cand_prof", FT_BOOLEAN, 32, TFS(&tfs_requested_not_requested), 0x8, NULL, HFILL}
},
{&hf_docsis_optreq_reqstat_codew_thresh_comp_cand_prof,
- {"Codeword Threshold Comparison for Candidate Profile", "docsis_optreq.reqstat.codew_thresh_comp_cand_prof", FT_BOOLEAN, 32, TFS(&req_not_req_tfs), 0x10, NULL, HFILL}
+ {"Codeword Threshold Comparison for Candidate Profile", "docsis_optreq.reqstat.codew_thresh_comp_cand_prof", FT_BOOLEAN, 32, TFS(&tfs_requested_not_requested), 0x10, NULL, HFILL}
},
{&hf_docsis_optreq_reqstat_ncp_field_stat,
- {"NCP Field Statistics", "docsis_optreq.reqstat.ncp_field_stats", FT_BOOLEAN, 32, TFS(&req_not_req_tfs), 0x20, NULL, HFILL}
+ {"NCP Field Statistics", "docsis_optreq.reqstat.ncp_field_stats", FT_BOOLEAN, 32, TFS(&tfs_requested_not_requested), 0x20, NULL, HFILL}
},
{&hf_docsis_optreq_reqstat_ncp_crc_thresh_comp,
- {"NCP CRC Threshold Comparison", "docsis_optreq.reqstat.ncp_crc_thresh_comp", FT_BOOLEAN, 32, TFS(&req_not_req_tfs), 0x40, NULL, HFILL}
+ {"NCP CRC Threshold Comparison", "docsis_optreq.reqstat.ncp_crc_thresh_comp", FT_BOOLEAN, 32, TFS(&tfs_requested_not_requested), 0x40, NULL, HFILL}
},
{&hf_docsis_optreq_reqstat_reserved,
- {"Reserved", "docsis_optreq.reqstat.reserved", FT_BOOLEAN, 32, TFS(&req_not_req_tfs), 0x80, NULL, HFILL}
+ {"Reserved", "docsis_optreq.reqstat.reserved", FT_BOOLEAN, 32, TFS(&tfs_requested_not_requested), 0x80, NULL, HFILL}
},
{&hf_docsis_optreq_tlv_xrmer_thresh_data,
{"TLV Data", "docsis_optreq.rxmer_thresh_params.tlv_data", FT_BYTES, BASE_NO_DISPLAY_VALUE, NULL, 0x0, NULL, HFILL}