Check that string items have display set to BASE_NONE
This commit is contained in:
parent
7b58f82228
commit
73c7fcab1e
|
@ -1510,7 +1510,7 @@ proto_register_ged125 (void)
|
|||
|
||||
{ &hf_ged125_floating_payload_strg,
|
||||
{ "Floating Payload", "ged125.floating_payload.strg",
|
||||
FT_STRING, FT_NONE, NULL, 0x0, NULL, HFILL }},
|
||||
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
||||
|
||||
{ &hf_ged125_floating_payload_uint,
|
||||
{ "Floating Payload", "ged125.floating_payload.uint",
|
||||
|
|
|
@ -1279,7 +1279,7 @@ void proto_register_idn(void) {
|
|||
},
|
||||
{ &hf_idn_name,
|
||||
{ "Name", "idn.name",
|
||||
FT_STRING, ENC_ASCII,
|
||||
FT_STRING, BASE_NONE,
|
||||
NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
|
|
|
@ -11689,72 +11689,72 @@ proto_register_isup(void)
|
|||
|
||||
{ &hf_isup_called,
|
||||
{ "Called Party Number", "isup.called",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_isup_calling,
|
||||
{ "Calling Party Number", "isup.calling",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_isup_redirecting,
|
||||
{ "Redirecting Number", "isup.redirecting",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_isup_redirection_number,
|
||||
{ "Redirection Number", "isup.redirection_number",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_isup_subsequent_number,
|
||||
{ "Subsequent Number", "isup.subsequent_number",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_isup_connected_number,
|
||||
{ "Connected Number", "isup.connected_number",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_isup_transit_network_selection,
|
||||
{ "Transit Network Selection", "isup.transit_network_selection",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_isup_original_called_number,
|
||||
{ "Original Called Number", "isup.original_called_number",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_isup_location_number,
|
||||
{ "Location Number", "isup.location_number",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_isup_call_transfer_number,
|
||||
{ "Call Transfer Number", "isup.call_transfer_number",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_isup_called_in_number,
|
||||
{ "Called IN Number", "isup.called_in_number",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_isup_generic_number,
|
||||
{ "Generic Number", "isup.generic_number",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_isup_jurisdiction,
|
||||
{ "Jurisdiction", "isup.jurisdiction",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_isup_charge_number,
|
||||
{ "Charge Number", "isup.charge_number",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_isup_apm_msg_fragments,
|
||||
|
|
|
@ -13962,11 +13962,11 @@ void proto_register_lbmc(void)
|
|||
{ &hf_lbmc_extopt_cfgopt_parent,
|
||||
{ "Parent", "lbmc.extopt.cfgopt.parent", FT_UINT64, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
|
||||
{ &hf_lbmc_extopt_cfgopt_name,
|
||||
{ "Name", "lbmc.extopt.cfgopt.name", FT_STRING, FT_NONE, NULL, 0x0, NULL, HFILL } },
|
||||
{ "Name", "lbmc.extopt.cfgopt.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
|
||||
{ &hf_lbmc_extopt_cfgopt_value,
|
||||
{ "Value", "lbmc.extopt.cfgopt.value", FT_STRING, FT_NONE, NULL, 0x0, NULL, HFILL } },
|
||||
{ "Value", "lbmc.extopt.cfgopt.value", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
|
||||
{ &hf_lbmc_extopt_msgsel,
|
||||
{ "Message Selector", "lbmc.extopt.msgsel", FT_STRING, FT_NONE, NULL, 0x0, NULL, HFILL } },
|
||||
{ "Message Selector", "lbmc.extopt.msgsel", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
|
||||
{ &hf_lbmc_extopt_reassembled_data,
|
||||
{ "EXTOPT Reassembled Data", "lbmc.extopt.reassembled_data", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
|
||||
{ &hf_lbmc_extopt_reassembled_data_subtype,
|
||||
|
@ -13976,7 +13976,7 @@ void proto_register_lbmc(void)
|
|||
{ &hf_lbmc_extopt_reassembled_data_data,
|
||||
{ "Data", "lbmc.extopt.reassembled_data.data", FT_BYTES, FT_NONE, NULL, 0x0, NULL, HFILL } },
|
||||
{ &hf_lbmc_extopt_reassembled_data_msgsel,
|
||||
{ "Message Selector", "lbmc.extopt.reassembled_data.msgsel", FT_STRING, FT_NONE, NULL, 0x0, NULL, HFILL } },
|
||||
{ "Message Selector", "lbmc.extopt.reassembled_data.msgsel", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
|
||||
{ &hf_lbm_msg_properties,
|
||||
{ "Message Properties", "lbmc.lbm_msg_properties", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
|
||||
{ &hf_lbm_msg_properties_data,
|
||||
|
|
|
@ -4035,7 +4035,7 @@ proto_register_oran(void)
|
|||
/* Puncturing patters as appears in SE 20 */
|
||||
{&hf_oran_puncPattern,
|
||||
{"puncPattern", "oran_fh_cus.puncPattern",
|
||||
FT_STRING, FT_NONE,
|
||||
FT_STRING, BASE_NONE,
|
||||
NULL, 0x0,
|
||||
NULL,
|
||||
HFILL}
|
||||
|
|
|
@ -1391,7 +1391,7 @@ proto_register_scte35(void)
|
|||
FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL}},
|
||||
{&hf_descriptor_dtmf,
|
||||
{"DTMF", "scte35.splice_descriptor.dtmf",
|
||||
FT_STRING, 0, NULL, 0, NULL, HFILL}},
|
||||
FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL}},
|
||||
|
||||
/* segmentation_descriptor */
|
||||
{&hf_descriptor_event_id,
|
||||
|
@ -1452,7 +1452,7 @@ proto_register_scte35(void)
|
|||
FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL}},
|
||||
{&hf_descriptor_segmentation_upid,
|
||||
{"UPID", "scte35.splice_descriptor.upid",
|
||||
FT_STRING, 0, NULL, 0, NULL, HFILL}},
|
||||
FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL}},
|
||||
{&hf_descriptor_segmentation_type_id,
|
||||
{"Segmentation Type", "scte35.splice_descriptor.segmentation_type_id",
|
||||
FT_UINT8, BASE_HEX | BASE_RANGE_STRING,
|
||||
|
|
|
@ -330,12 +330,12 @@ void proto_register_syslog(void)
|
|||
static hf_register_info hf[] = {
|
||||
{ &hf_syslog_facility,
|
||||
{ "Facility", "syslog.facility",
|
||||
FT_UINT8, BASE_DEC, VALS(syslog_facility_vals), FACILITY_MASK,
|
||||
FT_UINT16, BASE_DEC, VALS(syslog_facility_vals), FACILITY_MASK,
|
||||
"Message facility", HFILL }
|
||||
},
|
||||
{ &hf_syslog_level,
|
||||
{ "Level", "syslog.level",
|
||||
FT_UINT8, BASE_DEC, VALS(syslog_level_vals), PRIORITY_MASK,
|
||||
FT_UINT16, BASE_DEC, VALS(syslog_level_vals), PRIORITY_MASK,
|
||||
"Message level", HFILL }
|
||||
},
|
||||
{ &hf_syslog_msg,
|
||||
|
@ -363,31 +363,31 @@ void proto_register_syslog(void)
|
|||
},
|
||||
{ &hf_syslog_timestamp_old,
|
||||
{ "Syslog timestamp (RFC3164)", "syslog.timestamp_rfc3164",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL,
|
||||
HFILL }
|
||||
},
|
||||
{ &hf_syslog_hostname,
|
||||
{ "Syslog hostname", "syslog.hostname",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL,
|
||||
HFILL }
|
||||
},
|
||||
{ &hf_syslog_appname,
|
||||
{ "Syslog app name", "syslog.appname",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
"The name of the app that generated this message",
|
||||
HFILL }
|
||||
},
|
||||
{ &hf_syslog_procid,
|
||||
{ "Syslog process id", "syslog.procid",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL,
|
||||
HFILL }
|
||||
},
|
||||
{ &hf_syslog_msgid,
|
||||
{ "Syslog message id", "syslog.msgid",
|
||||
FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL,
|
||||
HFILL }
|
||||
},
|
||||
|
|
|
@ -1261,17 +1261,17 @@ void proto_register_waveagent(void)
|
|||
|
||||
{ &hf_waveagent_id,
|
||||
{ "ID", "waveagent.id",
|
||||
FT_STRING, 0, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL } },
|
||||
|
||||
{ &hf_waveagent_bindtag,
|
||||
{ "Binding Tag", "waveagent.bindtag",
|
||||
FT_STRING, 0, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL } },
|
||||
|
||||
{ &hf_waveagent_version,
|
||||
{ "Version", "waveagent.version",
|
||||
FT_STRING, 0, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL } },
|
||||
|
||||
{ &hf_waveagent_brokerip,
|
||||
|
@ -1330,7 +1330,7 @@ void proto_register_waveagent(void)
|
|||
|
||||
{ &hf_waveagent_statusstring,
|
||||
{ "Status Message", "waveagent.statmsg",
|
||||
FT_STRING, 0, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL } },
|
||||
/* END: Command response message fields */
|
||||
|
||||
|
@ -1617,7 +1617,7 @@ void proto_register_waveagent(void)
|
|||
|
||||
{ &hf_waveagent_ifwlanssid,
|
||||
{ "WLAN Interface Connected to SSID", "waveagent.ifwlanssid",
|
||||
FT_STRING, 0, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL } },
|
||||
|
||||
{ &hf_waveagent_ifwlanrssi,
|
||||
|
@ -1670,7 +1670,7 @@ void proto_register_waveagent(void)
|
|||
|
||||
{ &hf_waveagent_ifdescription,
|
||||
{ "Name/Description of the adapter", "waveagent.ifdescription",
|
||||
FT_STRING, 0, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL } },
|
||||
|
||||
{ &hf_waveagent_ifmacaddr,
|
||||
|
@ -1753,7 +1753,7 @@ void proto_register_waveagent(void)
|
|||
|
||||
{ &hf_waveagent_scanssid,
|
||||
{ "SSID", "waveagent.scanssid",
|
||||
FT_STRING, 0, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL } },
|
||||
|
||||
{ &hf_waveagent_ifwlansupprates,
|
||||
|
@ -1790,7 +1790,7 @@ void proto_register_waveagent(void)
|
|||
|
||||
{ &hf_waveagent_oidvalue,
|
||||
{ "OID Value", "waveagent.oidvalue",
|
||||
FT_STRING, 0, NULL, 0x0,
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL } },
|
||||
/* END: OID fields */
|
||||
|
||||
|
|
|
@ -2323,7 +2323,7 @@ void proto_register_wisun(void)
|
|||
},
|
||||
|
||||
{ &hf_wisun_netnameie_name,
|
||||
{ "Network Name", "wisun.netnameie.name", FT_STRING, ENC_ASCII, NULL, 0x0,
|
||||
{ "Network Name", "wisun.netnameie.name", FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
|
||||
|
|
|
@ -1264,6 +1264,14 @@ class Item:
|
|||
errors_found += 1
|
||||
# TODO: check for length > 64?
|
||||
|
||||
def check_string_display(self):
|
||||
global warnings_found
|
||||
if self.item_type in { 'FT_STRING', 'FT_STRINGZ', 'FT_UINT_STRING'}:
|
||||
if self.display != 'BASE_NONE':
|
||||
print('Warning:', self.filename, self.hf, 'type is', self.item_type, 'display must be BASE_NONE, is instead', self.display)
|
||||
warnings_found += 1
|
||||
|
||||
|
||||
|
||||
|
||||
class CombinedCallsCheck:
|
||||
|
@ -1685,6 +1693,8 @@ def checkFile(filename, check_mask=False, mask_exact_width=False, check_label=Fa
|
|||
|
||||
for hf in items_defined:
|
||||
items_defined[hf].check_boolean_length()
|
||||
items_defined[hf].check_string_display()
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue