Rename BASE_VALS_NO_UNKNOWN to BASE_SPECIAL_VALS.

It makes it a bit clearer what its purpose is - to allow a value_string
to be used for numeric rather than enumerated fields, giving certain
values of the field a special meaning.

Change the explanation in the documentation to match as well.

Change-Id: Id07b22eee996b79ea5f3473928d29adcabe09bf3
Reviewed-on: https://code.wireshark.org/review/21209
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2017-04-18 15:27:28 -07:00
parent c908846625
commit 913f9fb353
15 changed files with 53 additions and 51 deletions

View File

@ -117,7 +117,7 @@ FIELDDISPLAY --For FT_UINT{8,16,24,32,40,48,56,64} and
BASE_DEC, BASE_HEX, BASE_OCT, BASE_DEC_HEX, BASE_HEX_DEC,
BASE_CUSTOM, or BASE_NONE, possibly ORed with
BASE_RANGE_STRING, BASE_EXT_STRING, BASE_VAL64_STRING,
BASE_ALLOW_ZERO, BASE_UNIT_STRING, BASE_VALS_NO_UNKNOWN or
BASE_ALLOW_ZERO, BASE_UNIT_STRING, BASE_SPECIAL_VALS or
BASE_NO_DISPLAY_VALUE
BASE_NONE may be used with a non-NULL FIELDCONVERT when the
@ -950,11 +950,12 @@ indicate the end of the array). The 'strings' field would be set to
If the field has a numeric rather than an enumerated type, the 'strings'
field would be set to NULL.
If BASE_VALS_NO_UNKNOWN is also applied to the display bitmask, then if
the numeric value of a field doesn't match any values in the value_string
then just the numeric value is displayed (i.e. no "Unknown"). This is intended
for value_strings that may only have a single value or maybe an enumeration
for mix/max values of a field.
If BASE_SPECIAL_VALS is also applied to the display bitmask, then if the
numeric value of a field doesn't match any values in the value_string
then just the numeric value is displayed (i.e. no "Unknown"). This is
intended for use when the value_string only gives special names for
certain field values and values not in the value_string are expected.
-- Extended value strings
You can also use an extended version of the value_string for faster lookups.
@ -999,7 +1000,8 @@ val64_strings are like value_strings, except that the integer type
used is a guint64 (instead of guint32). Instead of using the VALS()
macro for the 'strings' field in the header_field_info struct array,
'VALS64()' is used.
BASE_VALS_NO_UNKNOWN can also be used for val64_string.
BASE_SPECIAL_VALS can also be used for val64_string.
-- Unit string
Some integer fields, of type FT_UINT* and float fields, of type FT_FLOAT

View File

@ -1586,12 +1586,12 @@ proto_register_alcap(void)
{ &hf_alcap_ceid_pathid,
{ "Path ID", "alcap.ceid.pathid",
FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(all_paths_vals), 0,
FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(all_paths_vals), 0,
NULL, HFILL }
},
{ &hf_alcap_ceid_cid,
{ "CID", "alcap.ceid.cid",
FT_UINT8, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(all_cids_vals), 0,
FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(all_cids_vals), 0,
NULL, HFILL }
},

View File

@ -2484,7 +2484,7 @@ proto_register_btavrcp(void)
},
{ &hf_btavrcp_number_of_attributes,
{ "Number of Attributes", "btavrcp.number_of_attributes",
FT_UINT8, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_all_supported_attributes), 0x00,
FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_all_supported_attributes), 0x00,
NULL, HFILL }
},
{ &hf_btavrcp_attribute_count,

View File

@ -4659,10 +4659,10 @@ proto_register_icmpv6(void)
{ "Reserved", "icmpv6.opt.prefix.flag.reserved", FT_UINT8, BASE_DEC, NULL, 0x1f,
NULL, HFILL }},
{ &hf_icmpv6_opt_prefix_valid_lifetime,
{ "Valid Lifetime", "icmpv6.opt.prefix.valid_lifetime", FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_infinity), 0x00,
{ "Valid Lifetime", "icmpv6.opt.prefix.valid_lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_infinity), 0x00,
"The length of time in seconds that the prefix is valid for the purpose of on-link determination", HFILL }},
{ &hf_icmpv6_opt_prefix_preferred_lifetime,
{ "Preferred Lifetime", "icmpv6.opt.prefix.preferred_lifetime", FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_infinity), 0x00,
{ "Preferred Lifetime", "icmpv6.opt.prefix.preferred_lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_infinity), 0x00,
"The length of time in seconds that addresses generated from the prefix via stateless address autoconfiguration remain preferred", HFILL }},
{ &hf_icmpv6_opt_prefix,
{ "Prefix", "icmpv6.opt.prefix", FT_IPv6, BASE_NONE, NULL, 0x00,
@ -4773,7 +4773,7 @@ proto_register_icmpv6(void)
{ "Reserved", "icmpv6.opt.route_info.flag.reserved", FT_UINT8, BASE_DEC, NULL, ND_RA_FLAG_RESERV_MASK,
"Must be 0", HFILL }},
{ &hf_icmpv6_opt_route_lifetime,
{ "Route Lifetime", "icmpv6.opt.route_lifetime", FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_infinity), 0x00,
{ "Route Lifetime", "icmpv6.opt.route_lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_infinity), 0x00,
"The length of time in seconds that the prefix is valid for the purpose of route determination", HFILL }},
{ &hf_icmpv6_opt_name_type,
{ "Name Type", "icmpv6.opt.name_type", FT_UINT8, BASE_DEC, VALS(icmpv6_option_name_type_vals), 0x0,
@ -4826,7 +4826,7 @@ proto_register_icmpv6(void)
{ "IPv6 Address", "icmpv6.opt.ipv6_address", FT_IPv6, BASE_NONE, NULL, 0x0,
"IPv6 addresses of the interface", HFILL }},
{ &hf_icmpv6_opt_rdnss_lifetime,
{ "Lifetime", "icmpv6.opt.rdnss.lifetime", FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(rdnss_infinity), 0x0,
{ "Lifetime", "icmpv6.opt.rdnss.lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(rdnss_infinity), 0x0,
NULL, HFILL }},
{ &hf_icmpv6_opt_rdnss,
{ "Recursive DNS Servers", "icmpv6.opt.rdnss", FT_IPv6, BASE_NONE, NULL, 0x0,
@ -4892,7 +4892,7 @@ proto_register_icmpv6(void)
{ "MN-Value", "icmpv6.opt.mn.value", FT_BYTES, BASE_NONE, NULL, 0x0,
"The value specified by the Option-Code", HFILL }},
{ &hf_icmpv6_opt_dnssl_lifetime,
{ "Lifetime", "icmpv6.opt.dnssl.lifetime", FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(dnssl_infinity), 0x0,
{ "Lifetime", "icmpv6.opt.dnssl.lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(dnssl_infinity), 0x0,
NULL, HFILL }},
{ &hf_icmpv6_opt_dnssl,
{ "Domain Names", "icmpv6.opt.dnssl", FT_STRING, BASE_NONE, NULL, 0x0,
@ -5047,10 +5047,10 @@ proto_register_icmpv6(void)
{ "Reserved", "icmpv6.rr.pco.up.flagmask.reserved", FT_UINT8, BASE_DEC, NULL, 0x3f,
NULL, HFILL }},
{ &hf_icmpv6_rr_pco_up_validlifetime,
{ "Valid Lifetime", "icmpv6.rr.pco.up.validlifetime", FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_infinity), 0x0,
{ "Valid Lifetime", "icmpv6.rr.pco.up.validlifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_infinity), 0x0,
"The number of seconds for which the New Prefix will be valid", HFILL }},
{ &hf_icmpv6_rr_pco_up_preferredlifetime,
{ "Preferred Lifetime", "icmpv6.rr.pco.up.preferredlifetime", FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_infinity), 0x0,
{ "Preferred Lifetime", "icmpv6.rr.pco.up.preferredlifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_infinity), 0x0,
"The number of seconds for which the New Prefix will be preferred", HFILL }},
{ &hf_icmpv6_rr_pco_up_flag,
{ "Flags", "icmpv6.rr.pco.up.flag", FT_UINT32, BASE_HEX, NULL, 0x0,
@ -5514,7 +5514,7 @@ proto_register_icmpv6(void)
{ "Reserved","icmpv6.rpl.opt.route.reserved", FT_UINT8, BASE_DEC, NULL, RPL_OPT_ROUTE_RESERVED,
"Reserved (Must be Zero)", HFILL }},
{ &hf_icmpv6_rpl_opt_route_lifetime,
{ "Route Lifetime", "icmpv6.rpl.opt.route.lifetime", FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_infinity), 0x0,
{ "Route Lifetime", "icmpv6.rpl.opt.route.lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_infinity), 0x0,
"The length of time in seconds (relative to the time the packet is sent) that the prefix is valid for route determination", HFILL }},
{ &hf_icmpv6_rpl_opt_route_prefix,
{ "Prefix", "icmpv6.rpl.opt.route.prefix", FT_IPv6, BASE_NONE, NULL, 0x0,
@ -5632,10 +5632,10 @@ proto_register_icmpv6(void)
{ "Reserved", "icmpv6.rpl.opt.config.flag.rsv", FT_UINT8, BASE_DEC, NULL, RPL_OPT_PREFIX_FLAG_RSV,
"Must Be Zero", HFILL }},
{ &hf_icmpv6_rpl_opt_prefix_vlifetime,
{ "Valid Lifetime", "icmpv6.rpl.opt.prefix.valid_lifetime", FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_infinity), 0x0,
{ "Valid Lifetime", "icmpv6.rpl.opt.prefix.valid_lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_infinity), 0x0,
"The length of time in seconds that the prefix is valid for the purpose of on-link determination", HFILL }},
{ &hf_icmpv6_rpl_opt_prefix_plifetime,
{ "Preferred Lifetime", "icmpv6.rpl.opt.prefix.preferred_lifetime", FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_infinity), 0x0,
{ "Preferred Lifetime", "icmpv6.rpl.opt.prefix.preferred_lifetime", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_infinity), 0x0,
"The length of time in seconds that addresses generated from the prefix via stateless address autoconfiguration remain preferred", HFILL }},
{ &hf_icmpv6_rpl_opt_prefix,
{ "Destination Prefix", "icmpv6.rpl.opt.prefix", FT_IPv6, BASE_NONE, NULL, 0x0,

View File

@ -2972,7 +2972,7 @@ proto_register_ipmi_se(void)
"ipmi.cp12.byte1", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
{ &hf_ipmi_se_cp12_alert_stringsel,
{ "Alert String Selector (set selector)",
"ipmi.cp12.alert_stringsel", FT_UINT8, BASE_HEX|BASE_VALS_NO_UNKNOWN, VALS(unique_selects_volatile_string_parameters), 0x7f, NULL, HFILL }},
"ipmi.cp12.alert_stringsel", FT_UINT8, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_selects_volatile_string_parameters), 0x7f, NULL, HFILL }},
{ &hf_ipmi_se_cp12_evfilter,
{ "Filter Number",
"ipmi.cp12.evfilter", FT_UINT8, BASE_HEX, NULL, 0x7f, NULL, HFILL }},
@ -3021,14 +3021,14 @@ proto_register_ipmi_se(void)
{ &hf_ipmi_se_00_addr,
{ "Event Receiver slave address",
"ipmi.se00.addr", FT_UINT8, BASE_HEX|BASE_VALS_NO_UNKNOWN, VALS(unique_disable_message_generation), 0, NULL, HFILL }},
"ipmi.se00.addr", FT_UINT8, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_disable_message_generation), 0, NULL, HFILL }},
{ &hf_ipmi_se_00_lun,
{ "Event Receiver LUN",
"ipmi.se00.lun", FT_UINT8, BASE_HEX, NULL, 0x3, NULL, HFILL }},
{ &hf_ipmi_se_01_addr,
{ "Event Receiver slave address",
"ipmi.se01.addr", FT_UINT8, BASE_HEX|BASE_VALS_NO_UNKNOWN, VALS(unique_disable_message_generation), 0, NULL, HFILL }},
"ipmi.se01.addr", FT_UINT8, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_disable_message_generation), 0, NULL, HFILL }},
{ &hf_ipmi_se_01_lun,
{ "Event Receiver LUN",
"ipmi.se01.lun", FT_UINT8, BASE_HEX, NULL, 0x3, NULL, HFILL }},
@ -3118,13 +3118,13 @@ proto_register_ipmi_se(void)
"ipmi.se15.tstamp", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
{ &hf_ipmi_se_15_lastrec,
{ "Record ID for last record in SEL",
"ipmi.se15.lastrec", FT_UINT16, BASE_HEX|BASE_VALS_NO_UNKNOWN, VALS(unique_sel_is_empty), 0, NULL, HFILL }},
"ipmi.se15.lastrec", FT_UINT16, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_sel_is_empty), 0, NULL, HFILL }},
{ &hf_ipmi_se_15_proc_sw,
{ "Last SW Processed Event Record ID",
"ipmi.se15.proc_sw", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
{ &hf_ipmi_se_15_proc_bmc,
{ "Last BMC Processed Event Record ID",
"ipmi.se15.proc_bmc", FT_UINT16, BASE_HEX|BASE_VALS_NO_UNKNOWN, VALS(unique_event_processed_not_logged), 0, NULL, HFILL }},
"ipmi.se15.proc_bmc", FT_UINT16, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_event_processed_not_logged), 0, NULL, HFILL }},
{ &hf_ipmi_se_16_chan,
{ "Channel",

View File

@ -837,7 +837,7 @@ proto_register_iso7816(void)
},
{ &hf_iso7816_cla_channel,
{ "Logical channel number", "iso7816.apdu.cla.channel",
FT_UINT8, BASE_HEX|BASE_VALS_NO_UNKNOWN, VALS(unique_or_unused), 0x03, NULL , HFILL }
FT_UINT8, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_or_unused), 0x03, NULL , HFILL }
},
{ &hf_iso7816_ins,
{ "Instruction", "iso7816.apdu.ins",
@ -857,7 +857,7 @@ proto_register_iso7816(void)
},
{ &hf_iso7816_le,
{ "Expected response length Le", "iso7816.apdu.le",
FT_UINT8, BASE_HEX|BASE_VALS_NO_UNKNOWN, VALS(unique_max_num_available_bytes), 0, NULL, HFILL }
FT_UINT8, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_max_num_available_bytes), 0, NULL, HFILL }
},
{ &hf_iso7816_body,
{ "APDU Body", "iso7816.apdu.body",

View File

@ -3711,8 +3711,8 @@ proto_register_l2tp(void)
{ &hf_l2tp_avp_circuit_type, { "Circuit Type", "l2tp.avp.circuit_type", FT_BOOLEAN, 16, TFS(&tfs_new_existing), 0x0002, NULL, HFILL }},
{ &hf_l2tp_avp_preferred_language, { "Preferred Language", "l2tp.avp.preferred_language", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_l2tp_avp_nonce, { "Nonce", "l2tp.avp.nonce", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_l2tp_avp_tx_connect_speed_v3, { "Tx Connect Speed v3", "l2tp.avp.tx_connect_speed_v3", FT_UINT64, BASE_HEX|BASE_VAL64_STRING|BASE_VALS_NO_UNKNOWN, VALS64(unique_indeterminable_or_no_link), 0x0, NULL, HFILL }},
{ &hf_l2tp_avp_rx_connect_speed_v3, { "Rx Connect Speed v3", "l2tp.avp.rx_connect_speed_v3", FT_UINT64, BASE_HEX|BASE_VAL64_STRING|BASE_VALS_NO_UNKNOWN, VALS64(unique_indeterminable_or_no_link), 0x0, NULL, HFILL }},
{ &hf_l2tp_avp_tx_connect_speed_v3, { "Tx Connect Speed v3", "l2tp.avp.tx_connect_speed_v3", FT_UINT64, BASE_HEX|BASE_VAL64_STRING|BASE_SPECIAL_VALS, VALS64(unique_indeterminable_or_no_link), 0x0, NULL, HFILL }},
{ &hf_l2tp_avp_rx_connect_speed_v3, { "Rx Connect Speed v3", "l2tp.avp.rx_connect_speed_v3", FT_UINT64, BASE_HEX|BASE_VAL64_STRING|BASE_SPECIAL_VALS, VALS64(unique_indeterminable_or_no_link), 0x0, NULL, HFILL }},
{ &hf_l2tp_lapd_info, { "LAPD info", "l2tp.lapd_info", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_l2tp_session_id, { "Packet Type", "l2tp.session_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_l2tp_zero_length_body_message, { "Zero Length Body message", "l2tp.zero_length_body_message", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},

View File

@ -2973,19 +2973,19 @@ proto_register_llrp(void)
NULL, HFILL }},
{ &hf_llrp_rospec,
{ "ROSpec ID", "llrp.rospec", FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_all_rospecs), 0,
{ "ROSpec ID", "llrp.rospec", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_all_rospecs), 0,
NULL, HFILL }},
{ &hf_llrp_antenna_id,
{ "Antenna ID", "llrp.antenna_id", FT_UINT16, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_all_antenna), 0,
{ "Antenna ID", "llrp.antenna_id", FT_UINT16, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_all_antenna), 0,
NULL, HFILL }},
{ &hf_llrp_gpi_port,
{ "GPI Port Number", "llrp.gpi_port", FT_UINT16, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_all_gpi_ports), 0,
{ "GPI Port Number", "llrp.gpi_port", FT_UINT16, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_all_gpi_ports), 0,
NULL, HFILL }},
{ &hf_llrp_gpo_port,
{ "GPO Port Number", "llrp.gpo_port", FT_UINT16, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_all_gpo_ports), 0,
{ "GPO Port Number", "llrp.gpo_port", FT_UINT16, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_all_gpo_ports), 0,
NULL, HFILL }},
{ &hf_llrp_rest_fact,
@ -2993,7 +2993,7 @@ proto_register_llrp(void)
NULL, HFILL }},
{ &hf_llrp_accessspec,
{ "Access Spec ID", "llrp.accessspec", FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_all_access_specs), 0,
{ "Access Spec ID", "llrp.accessspec", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_all_access_specs), 0,
NULL, HFILL }},
{ &hf_llrp_vendor,
@ -3113,23 +3113,23 @@ proto_register_llrp(void)
NULL, HFILL }},
{ &hf_llrp_max_num_rospec,
{ "Maximum number of ROSpecs", "llrp.param.max_num_rospec", FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_no_limit), 0,
{ "Maximum number of ROSpecs", "llrp.param.max_num_rospec", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_no_limit), 0,
NULL, HFILL }},
{ &hf_llrp_max_num_spec_per_rospec,
{ "Maximum number of spec per ROSpec", "llrp.param.max_num_spec_per_rospec", FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_no_limit), 0,
{ "Maximum number of spec per ROSpec", "llrp.param.max_num_spec_per_rospec", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_no_limit), 0,
NULL, HFILL }},
{ &hf_llrp_max_num_inventory_per_aispec,
{ "Maximum number of Inventory Spec per AISpec", "llrp.param.max_num_inventory_per_aispec", FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_no_limit), 0,
{ "Maximum number of Inventory Spec per AISpec", "llrp.param.max_num_inventory_per_aispec", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_no_limit), 0,
NULL, HFILL }},
{ &hf_llrp_max_num_accessspec,
{ "Maximum number of AccessSpec", "llrp.param.max_num_accessspec", FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_no_limit), 0,
{ "Maximum number of AccessSpec", "llrp.param.max_num_accessspec", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_no_limit), 0,
NULL, HFILL }},
{ &hf_llrp_max_num_opspec_per_accressspec,
{ "Maximum number of OpSpec per AccessSpec", "llrp.param.max_num_opspec_per_accressspec", FT_UINT32, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_no_limit), 0,
{ "Maximum number of OpSpec per AccessSpec", "llrp.param.max_num_opspec_per_accressspec", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_no_limit), 0,
NULL, HFILL }},
/* TODO add translation */
@ -3514,7 +3514,7 @@ proto_register_llrp(void)
NULL, HFILL }},
{ &hf_llrp_max_num_filter_per_query,
{ "Maximum number of select filters per query", "llrp.param.max_num_filter_per_query", FT_UINT16, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_no_limit), 0,
{ "Maximum number of select filters per query", "llrp.param.max_num_filter_per_query", FT_UINT16, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_no_limit), 0,
NULL, HFILL }},
{ &hf_llrp_mode_ident,

View File

@ -1473,13 +1473,13 @@ proto_register_pim(void)
},
{ &hf_pim_holdtime,
{ "Holdtime", "pim.holdtime",
FT_UINT16, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_infinity), 0x0,
FT_UINT16, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_infinity), 0x0,
"The amount of time a receiver must keep the neighbor "
"reachable, in seconds.", HFILL }
},
{ &hf_pim_holdtime_t,
{ "Holdtime", "pim.holdtime",
FT_UINT16, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_infinity_t), 0x0,
FT_UINT16, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_infinity_t), 0x0,
"The amount of time a receiver must keep the neighbor "
"reachable, in seconds.", HFILL }
},

View File

@ -9280,7 +9280,7 @@ proto_register_smb2(void)
},
{ &hf_smb2_msg_id,
{ "Message ID", "smb2.msg_id", FT_UINT64, BASE_DEC|BASE_VAL64_STRING|BASE_VALS_NO_UNKNOWN,
{ "Message ID", "smb2.msg_id", FT_UINT64, BASE_DEC|BASE_VAL64_STRING|BASE_SPECIAL_VALS,
VALS64(unique_unsolicited_response), 0, NULL, HFILL }
},

View File

@ -7118,10 +7118,10 @@ tmp_fld_check_assert(header_field_info *hfinfo)
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type));
}
if (hfinfo->display & BASE_VALS_NO_UNKNOWN) {
if (hfinfo->display & BASE_SPECIAL_VALS) {
g_error("Field '%s' (%s) is an integral value (%s)"
" that is being displayed as BASE_NONE but"
" with BASE_VALS_NO_UNKNOWN",
" with BASE_SPECIAL_VALS",
hfinfo->name, hfinfo->abbrev,
ftype_name(hfinfo->type));
}
@ -8279,7 +8279,7 @@ fill_label_number(field_info *fi, gchar *label_str, gboolean is_signed)
const char *val_str = hf_try_val_to_str(value, hfinfo);
out = hfinfo_number_vals_format(hfinfo, buf, value);
if (hfinfo->display & BASE_VALS_NO_UNKNOWN) {
if (hfinfo->display & BASE_SPECIAL_VALS) {
/*
* Unique values only display value_string string
* if there is a match. Otherwise it's just a number

View File

@ -604,7 +604,7 @@ typedef enum {
#define BASE_NO_DISPLAY_VALUE 0x2000 /**< Just display the field name with no value. Intended for
byte arrays or header fields above a subtree */
#define BASE_PROTOCOL_INFO 0x4000 /**< protocol_t in [FIELDCONVERT]. Internal use only. */
#define BASE_VALS_NO_UNKNOWN 0x8000 /**< field will not display "Unknown" if value_string match is not found */
#define BASE_SPECIAL_VALS 0x8000 /**< field will not display "Unknown" if value_string match is not found */
/** BASE_ values that cause the field value to be displayed twice */
#define IS_BASE_DUAL(b) ((b)==BASE_DEC_HEX||(b)==BASE_HEX_DEC)

View File

@ -950,7 +950,7 @@ proto_register_docsis (void)
},
{&hf_docsis_ehdr_phsi,
{"Payload Header Suppression Index", "docsis.ehdr.phsi",
FT_UINT8, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_no_phs), 0x0,
FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_no_phs), 0x0,
NULL, HFILL}
},
{&hf_docsis_ehdr_qind,

View File

@ -773,7 +773,7 @@ void proto_register_docsis_mdd (void)
},
{&hf_docsis_mdd_maximum_number_of_reports_per_event,
{"Maximum Number of Reports per Event", "docsis_mdd.maximum_number_of_reports_per_event",
FT_UINT8, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_unlimited), 0x0,
FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_unlimited), 0x0,
"Mdd Maximum Number of Reports per Event", HFILL}
},
{&hf_docsis_mdd_upstream_transmit_power_reporting,

View File

@ -740,7 +740,7 @@ void proto_register_mac_mgmt_msg_reg_req(void)
&hf_reg_dsx_flow_control,
{
"DSx flow control", "wmx.reg.dsx_flow_control",
FT_UINT8, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_no_limit), 0x0, NULL, HFILL
FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_no_limit), 0x0, NULL, HFILL
}
},
/* When REG-REQ TLV 7 is length 2 */
@ -1072,7 +1072,7 @@ void proto_register_mac_mgmt_msg_reg_req(void)
&hf_reg_mca_flow_control,
{
"MCA flow control", "wmx.reg.mca_flow_control",
FT_UINT8, BASE_DEC|BASE_VALS_NO_UNKNOWN, VALS(unique_no_limit), 0x0, NULL, HFILL
FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(unique_no_limit), 0x0, NULL, HFILL
}
},
{