From 6f92b028aa08f3c057009646b62b12cedd546bab Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Tue, 7 Apr 2009 12:20:41 +0000 Subject: [PATCH] Use some default true_false_string's. svn path=/trunk/; revision=27983 --- epan/dissectors/packet-bootp.c | 32 +++----- epan/dissectors/packet-bpdu.c | 17 ++--- epan/dissectors/packet-cigi.c | 37 +++------- epan/dissectors/packet-clnp.c | 5 -- epan/dissectors/packet-dec-bpdu.c | 11 +-- epan/dissectors/packet-dec-dnart.c | 27 +++---- epan/dissectors/packet-diameter.c | 23 +++--- epan/dissectors/packet-fr.c | 6 +- epan/dissectors/packet-iax2.c | 36 ++++----- epan/dissectors/packet-ieee80211.c | 97 +++++++++---------------- epan/dissectors/packet-ipmi-transport.c | 80 ++++++++++---------- epan/dissectors/packet-isis-hello.c | 11 +-- epan/dissectors/packet-isis-lsp.c | 14 +--- epan/dissectors/packet-nbns.c | 9 +-- epan/dissectors/packet-netbios.c | 16 +--- epan/dissectors/packet-nlsp.c | 9 +-- epan/dissectors/packet-nsip.c | 13 +--- epan/dissectors/packet-pagp.c | 7 +- epan/dissectors/packet-rpcap.c | 16 +--- epan/dissectors/packet-rtnet.c | 7 +- epan/dissectors/packet-sflow.c | 7 +- epan/dissectors/packet-slowprotocols.c | 56 ++++++-------- epan/dissectors/packet-sua.c | 13 +--- epan/dissectors/packet-wsp.c | 17 ++--- epan/dissectors/packet-xtp.c | 35 ++++----- 25 files changed, 210 insertions(+), 391 deletions(-) diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c index 3e75cedbfb..e2d670d8cc 100644 --- a/epan/dissectors/packet-bootp.c +++ b/epan/dissectors/packet-bootp.c @@ -454,16 +454,6 @@ static const value_string opt53_text[] = { #define FILE_NAME_LEN 128 #define VENDOR_INFO_OFFSET 236 -static const true_false_string toggle_tfs = { - "Enabled", - "Disabled" -}; - -static const true_false_string yes_no_tfs = { - "Yes", - "No" -}; - static const value_string bootp_nbnt_vals[] = { {0x1, "B-node" }, {0x2, "P-node" }, @@ -508,27 +498,27 @@ static struct opt_info default_bootp_opt[BOOTP_OPT_NUM] = { /* 16 */ { "Swap Server", ipv4, NULL }, /* 17 */ { "Root Path", string, NULL }, /* 18 */ { "Extensions Path", string, NULL }, -/* 19 */ { "IP Forwarding", val_boolean, TFS(&toggle_tfs) }, -/* 20 */ { "Non-Local Source Routing", val_boolean, TFS(&toggle_tfs) }, +/* 19 */ { "IP Forwarding", val_boolean, TFS(&tfs_enabled_disabled) }, +/* 20 */ { "Non-Local Source Routing", val_boolean, TFS(&tfs_enabled_disabled) }, /* 21 */ { "Policy Filter", special, NULL }, /* 22 */ { "Maximum Datagram Reassembly Size", val_u_short, NULL }, /* 23 */ { "Default IP Time-to-Live", val_u_byte, NULL }, /* 24 */ { "Path MTU Aging Timeout", time_in_secs, NULL }, /* 25 */ { "Path MTU Plateau Table", val_u_short_list, NULL }, /* 26 */ { "Interface MTU", val_u_short, NULL }, -/* 27 */ { "All Subnets are Local", val_boolean, TFS(&yes_no_tfs) }, +/* 27 */ { "All Subnets are Local", val_boolean, TFS(&tfs_yes_no) }, /* 28 */ { "Broadcast Address", ipv4, NULL }, -/* 29 */ { "Perform Mask Discovery", val_boolean, TFS(&toggle_tfs) }, -/* 30 */ { "Mask Supplier", val_boolean, TFS(&yes_no_tfs) }, -/* 31 */ { "Perform Router Discover", val_boolean, TFS(&toggle_tfs) }, +/* 29 */ { "Perform Mask Discovery", val_boolean, TFS(&tfs_enabled_disabled) }, +/* 30 */ { "Mask Supplier", val_boolean, TFS(&tfs_yes_no) }, +/* 31 */ { "Perform Router Discover", val_boolean, TFS(&tfs_enabled_disabled) }, /* 32 */ { "Router Solicitation Address", ipv4, NULL }, /* 33 */ { "Static Route", special, NULL }, -/* 34 */ { "Trailer Encapsulation", val_boolean, TFS(&toggle_tfs) }, +/* 34 */ { "Trailer Encapsulation", val_boolean, TFS(&tfs_enabled_disabled) }, /* 35 */ { "ARP Cache Timeout", time_in_secs, NULL }, -/* 36 */ { "Ethernet Encapsulation", val_boolean, TFS(&toggle_tfs) }, +/* 36 */ { "Ethernet Encapsulation", val_boolean, TFS(&tfs_enabled_disabled) }, /* 37 */ { "TCP Default TTL", val_u_byte, NULL }, /* 38 */ { "TCP Keepalive Interval", time_in_secs, NULL }, -/* 39 */ { "TCP Keepalive Garbage", val_boolean, TFS(&toggle_tfs) }, +/* 39 */ { "TCP Keepalive Garbage", val_boolean, TFS(&tfs_enabled_disabled) }, /* 40 */ { "Network Information Service Domain", string, NULL }, /* 41 */ { "Network Information Service Servers", ipv4_list, NULL }, /* 42 */ { "Network Time Protocol Servers", ipv4_list, NULL }, @@ -2464,12 +2454,12 @@ dissect_netware_ip_suboption(proto_tree *v_tree, tvbuff_t *tvb, /* 2 */ {"NWIP exists in options area",presence,NULL}, /* 3 */ {"NWIP exists in sname/file",presence,NULL}, /* 4 */ {"NWIP exists, but too big",presence,NULL}, - /* 5 */ {"Broadcast for nearest Netware server",val_boolean,TFS(&yes_no_tfs)}, + /* 5 */ {"Broadcast for nearest Netware server",val_boolean,TFS(&tfs_yes_no)}, /* 6 */ {"Preferred DSS server",ipv4_list,NULL}, /* 7 */ {"Nearest NWIP server",ipv4_list,NULL}, /* 8 */ {"Autoretries",val_u_byte,NULL}, /* 9 */ {"Autoretry delay, secs",val_u_byte,NULL}, - /* 10*/ {"Support NetWare/IP v1.1",val_boolean,TFS(&yes_no_tfs)}, + /* 10*/ {"Support NetWare/IP v1.1",val_boolean,TFS(&tfs_yes_no)}, /* 11*/ {"Primary DSS",ipv4,NULL} }; diff --git a/epan/dissectors/packet-bpdu.c b/epan/dissectors/packet-bpdu.c index e408da5c23..9bea9c1fe0 100644 --- a/epan/dissectors/packet-bpdu.c +++ b/epan/dissectors/packet-bpdu.c @@ -978,11 +978,6 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } -static const true_false_string yesno = { - "Yes", - "No" -}; - void proto_register_bpdu(void) { @@ -1006,19 +1001,19 @@ proto_register_bpdu(void) "", HFILL }}, { &hf_bpdu_flags_tcack, { "Topology Change Acknowledgment", "stp.flags.tcack", - FT_BOOLEAN, 8, TFS(&yesno), BPDU_FLAGS_TCACK, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_TCACK, "", HFILL }}, { &hf_bpdu_flags_agreement, { "Agreement", "stp.flags.agreement", - FT_BOOLEAN, 8, TFS(&yesno), BPDU_FLAGS_AGREEMENT, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_AGREEMENT, "", HFILL }}, { &hf_bpdu_flags_forwarding, { "Forwarding", "stp.flags.forwarding", - FT_BOOLEAN, 8, TFS(&yesno), BPDU_FLAGS_FORWARDING, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_FORWARDING, "", HFILL }}, { &hf_bpdu_flags_learning, { "Learning", "stp.flags.learning", - FT_BOOLEAN, 8, TFS(&yesno), BPDU_FLAGS_LEARNING, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_LEARNING, "", HFILL }}, { &hf_bpdu_flags_port_role, { "Port Role", "stp.flags.port_role", @@ -1026,11 +1021,11 @@ proto_register_bpdu(void) "", HFILL }}, { &hf_bpdu_flags_proposal, { "Proposal", "stp.flags.proposal", - FT_BOOLEAN, 8, TFS(&yesno), BPDU_FLAGS_PROPOSAL, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_PROPOSAL, "", HFILL }}, { &hf_bpdu_flags_tc, { "Topology Change", "stp.flags.tc", - FT_BOOLEAN, 8, TFS(&yesno), BPDU_FLAGS_TC, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_TC, "", HFILL }}, { &hf_bpdu_root_prio, { "Root Bridge Priority", "stp.root.prio", diff --git a/epan/dissectors/packet-cigi.c b/epan/dissectors/packet-cigi.c index b50e16bcc2..f9a0aae124 100644 --- a/epan/dissectors/packet-cigi.c +++ b/epan/dissectors/packet-cigi.c @@ -145,26 +145,11 @@ static dissector_handle_t cigi_handle; /* Initialize the protocol and registered fields */ static int proto_cigi = -1; -static const true_false_string cigi_boolean_tfs = { - "True", - "False" -}; - static const true_false_string cigi_enable_tfs = { "Enable", "Disable" }; -static const true_false_string cigi_active_tfs = { - "Active", - "Inactive" -}; - -static const true_false_string cigi_on_tfs = { - "On", - "Off" -}; - static const true_false_string cigi_valid_tfs = { "Valid", "Invalid" @@ -5616,7 +5601,7 @@ proto_register_cigi(void) }, { &hf_cigi2_ig_control_boresight, { "Tracking Device Boresight", "cigi.ig_control.boresight", - FT_BOOLEAN, 8, TFS(&cigi_boolean_tfs), 0x10, + FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x10, "Used by the host to enable boresight mode", HFILL } }, { &hf_cigi2_ig_control_frame_ctr, @@ -6054,7 +6039,7 @@ proto_register_cigi(void) }, { &hf_cigi2_articulated_parts_control_part_state, { "Articulated Part State", "cigi.art_part_control.part_state", - FT_BOOLEAN, 8, TFS(&cigi_active_tfs), 0x80, + FT_BOOLEAN, 8, TFS(&tfs_active_inactive), 0x80, "Indicates whether an articulated part is to be shown in the display", HFILL } }, { &hf_cigi2_articulated_parts_control_xoff_enable, @@ -6317,7 +6302,7 @@ proto_register_cigi(void) }, { &hf_cigi3_rate_control_apply_to_part, { "Apply to Articulated Part", "cigi.rate_control.apply_to_part", - FT_BOOLEAN, 8, TFS(&cigi_boolean_tfs), 0x01, + FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x01, "Determines whether the rate is applied to the articulated part specified by the Articulated Part ID parameter", HFILL } }, { &hf_cigi3_rate_control_x_rate, @@ -6369,7 +6354,7 @@ proto_register_cigi(void) }, { &hf_cigi3_2_rate_control_apply_to_part, { "Apply to Articulated Part", "cigi.rate_control.apply_to_part", - FT_BOOLEAN, 8, TFS(&cigi_boolean_tfs), 0x01, + FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x01, "Determines whether the rate is applied to the articulated part specified by the Articulated Part ID parameter", HFILL } }, { &hf_cigi3_2_rate_control_coordinate_system, @@ -6535,7 +6520,7 @@ proto_register_cigi(void) }, { &hf_cigi2_environment_control_modtran_enable, { "MODTRAN", "cigi.env_control.modtran_enable", - FT_BOOLEAN, 8, TFS(&cigi_on_tfs), 0x80, + FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x80, "Identifies whether atmospherics will be included in the calculations", HFILL } }, { &hf_cigi2_environment_control_date, @@ -7163,7 +7148,7 @@ proto_register_cigi(void) }, { &hf_cigi2_sensor_control_sensor_enable, { "Sensor On/Off", "cigi.sensor_control.sensor_enable", - FT_BOOLEAN, 8, TFS(&cigi_on_tfs), 0x04, + FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x04, "Indicates whether the sensor is turned on or off", HFILL } }, { &hf_cigi2_sensor_control_polarity, @@ -7173,7 +7158,7 @@ proto_register_cigi(void) }, { &hf_cigi2_sensor_control_line_dropout, { "Line-by-Line Dropout", "cigi.sensor_control.line_dropout", - FT_BOOLEAN, 8, TFS(&cigi_on_tfs), 0x01, + FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x01, "Indicates whether the line-by-line dropout feature is enabled", HFILL } }, { &hf_cigi2_sensor_control_sensor_id, @@ -7188,7 +7173,7 @@ proto_register_cigi(void) }, { &hf_cigi2_sensor_control_auto_gain, { "Automatic Gain", "cigi.sensor_control.auto_gain", - FT_BOOLEAN, 8, TFS(&cigi_on_tfs), 0x08, + FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x08, "When set to \"on,\" cause the weapons sensor to automatically adjust the gain value to optimize the brightness and contrast of the sensor display", HFILL } }, { &hf_cigi2_sensor_control_track_polarity, @@ -7240,7 +7225,7 @@ proto_register_cigi(void) }, { &hf_cigi3_sensor_control_sensor_on_off, { "Sensor On/Off", "cigi.sensor_control.sensor_on_off", - FT_BOOLEAN, 8, TFS(&cigi_on_tfs), 0x01, + FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x01, "Specifies whether the sensor is turned on or off", HFILL } }, { &hf_cigi3_sensor_control_polarity, @@ -7455,7 +7440,7 @@ proto_register_cigi(void) }, { &hf_cigi2_special_effect_definition_color_enable, { "Color Enable", "cigi.special_effect_def.color_enable", - FT_BOOLEAN, 8, TFS(&cigi_on_tfs), 0x40, + FT_BOOLEAN, 8, TFS(&tfs_on_off), 0x40, "Indicates whether the red, green, and blue color values will be applied to the special effect", HFILL } }, { &hf_cigi2_special_effect_definition_red, @@ -7547,7 +7532,7 @@ proto_register_cigi(void) }, { &hf_cigi2_view_definition_tracker_assign, { "Tracker Assign", "cigi.view_def.tracker_assign", - FT_BOOLEAN, 8, TFS(&cigi_boolean_tfs), 0x80, + FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x80, "Specifies whether the view should be controlled by an external tracking device", HFILL } }, { &hf_cigi2_view_definition_near_enable, diff --git a/epan/dissectors/packet-clnp.c b/epan/dissectors/packet-clnp.c index 93f6083edd..9f2dda5cac 100644 --- a/epan/dissectors/packet-clnp.c +++ b/epan/dissectors/packet-clnp.c @@ -73,11 +73,6 @@ static int hf_clnp_segment_too_long_segment = -1; static int hf_clnp_segment_error = -1; static int hf_clnp_reassembled_in = -1; -static const true_false_string fragment_descriptions = { - "Yes", - "No" -}; - static const fragment_items clnp_frag_items = { &ett_clnp_segment, &ett_clnp_segments, diff --git a/epan/dissectors/packet-dec-bpdu.c b/epan/dissectors/packet-dec-bpdu.c index 417fad4c08..7bcebdf0ab 100644 --- a/epan/dissectors/packet-dec-bpdu.c +++ b/epan/dissectors/packet-dec-bpdu.c @@ -197,11 +197,6 @@ dissect_dec_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } -static const true_false_string yesno = { - "Yes", - "No" -}; - void proto_register_dec_bpdu(void) { @@ -225,15 +220,15 @@ proto_register_dec_bpdu(void) "", HFILL }}, { &hf_dec_bpdu_flags_short_timers, { "Use short timers", "dec_stp.flags.short_timers", - FT_BOOLEAN, 8, TFS(&yesno), BPDU_FLAGS_SHORT_TIMERS, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_SHORT_TIMERS, "", HFILL }}, { &hf_dec_bpdu_flags_tcack, { "Topology Change Acknowledgment", "dec_stp.flags.tcack", - FT_BOOLEAN, 8, TFS(&yesno), BPDU_FLAGS_TCACK, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_TCACK, "", HFILL }}, { &hf_dec_bpdu_flags_tc, { "Topology Change", "dec_stp.flags.tc", - FT_BOOLEAN, 8, TFS(&yesno), BPDU_FLAGS_TC, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_TC, "", HFILL }}, { &hf_dec_bpdu_root_pri, { "Root Priority", "dec_stp.root.pri", diff --git a/epan/dissectors/packet-dec-dnart.c b/epan/dissectors/packet-dec-dnart.c index a311821123..5f721cb42a 100644 --- a/epan/dissectors/packet-dec-dnart.c +++ b/epan/dissectors/packet-dec-dnart.c @@ -1312,11 +1312,6 @@ handle_disc_init_contents( } -static const true_false_string yesno = { - "Yes", - "No" -}; - void proto_register_dec_rt(void) { @@ -1329,7 +1324,7 @@ proto_register_dec_rt(void) "DNA routing flag", HFILL }}, { &hf_dec_rt_ctrl_msg, { "Control packet", "dec_dna.flags.control", - FT_BOOLEAN, 8, TFS(&yesno), RT_FLAGS_CTRL_MSG, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), RT_FLAGS_CTRL_MSG, "Control packet", HFILL }}, { &hf_dec_rt_long_msg, { "Long data packet format", "dec_dna.flags.msglen", @@ -1341,19 +1336,19 @@ proto_register_dec_rt(void) "Short message indicator", HFILL }}, { &hf_dec_rt_rqr, { "Return to Sender Request", "dec_dna.flags.RQR", - FT_BOOLEAN, 8, TFS(&yesno), RT_FLAGS_RQR, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), RT_FLAGS_RQR, "Return to Sender", HFILL }}, { &hf_dec_rt_rts, { "Packet on return trip", "dec_dna.flags.RTS", - FT_BOOLEAN, 8, TFS(&yesno), RT_FLAGS_RTS, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), RT_FLAGS_RTS, "Packet on return trip", HFILL }}, { &hf_dec_rt_inter_eth, { "Intra-ethernet packet", "dec_dna.flags.intra_eth", - FT_BOOLEAN, 8, TFS(&yesno), RT_FLAGS_INTRA_ETHER, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), RT_FLAGS_INTRA_ETHER, "Intra-ethernet packet", HFILL }}, { &hf_dec_rt_discard, { "Discarded packet", "dec_dna.flags.discard", - FT_BOOLEAN, 8, TFS(&yesno), RT_FLAGS_DISCARD, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), RT_FLAGS_DISCARD, "Discarded packet", HFILL }}, { &hf_dec_rt_dst_addr, { "Destination Address", "dec_dna.dst.address", @@ -1409,7 +1404,7 @@ proto_register_dec_rt(void) "Segment number", HFILL }}, { &hf_dec_rt_delay, { "Delayed ACK allowed", "dec_dna.nsp.delay", - FT_BOOLEAN, 16, TFS(&yesno), 0x1000, + FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x1000, "Delayed ACK allowed?", HFILL }}, { &hf_dec_rt_visited_nodes, { "Nodes visited ty this package", "dec_dna.vst_node", @@ -1486,23 +1481,23 @@ proto_register_dec_rt(void) "Node type", HFILL }}, { &hf_dec_rt_iinfo_vrf, { "Verification required", "dec_dna.ctl.iinfo.vrf", - FT_BOOLEAN, 8, TFS(&yesno), 0x4, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x4, "Verification required?", HFILL }}, { &hf_dec_rt_iinfo_rej, { "Rejected", "dec_dna.ctl.iinfo.rej", - FT_BOOLEAN, 8, TFS(&yesno), 0x8, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x8, "Rejected message", HFILL }}, { &hf_dec_rt_iinfo_verf, { "Verification failed", "dec_dna.ctl.iinfo.verf", - FT_BOOLEAN, 8, TFS(&yesno), 0x10, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10, "Verification failed?", HFILL }}, { &hf_dec_rt_iinfo_mta, { "Accepts multicast traffic", "dec_dna.ctl.iinfo.mta", - FT_BOOLEAN, 8, TFS(&yesno), 0x20, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x20, "Accepts multicast traffic?", HFILL }}, { &hf_dec_rt_iinfo_blkreq, { "Blocking requested", "dec_dna.ctl.iinfo.blkreq", - FT_BOOLEAN, 8, TFS(&yesno), 0x40, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40, "Blocking requested?", HFILL }}, { &hf_dec_rt_iprio, { "Routing priority", "dec_dna.ctl.prio", diff --git a/epan/dissectors/packet-diameter.c b/epan/dissectors/packet-diameter.c index f1fdc576b8..991bedd0cd 100644 --- a/epan/dissectors/packet-diameter.c +++ b/epan/dissectors/packet-diameter.c @@ -191,11 +191,6 @@ static struct _build_dict build_dict; static const value_string* vnd_short_vs; static dissector_handle_t data_handle; -static const true_false_string reserved_set = { - "Set", - "Unset" -}; - static const value_string diameter_avp_data_addrfamily_vals[]= { {1,"IPv4"}, {2,"IPv6"}, @@ -1411,16 +1406,16 @@ proto_register_diameter(void) { "T(Potentially re-transmitted message)","diameter.flags.T", FT_BOOLEAN, 8, TFS(&flags_set_truth),DIAM_FLAGS_T, "", HFILL }}, { &hf_diameter_flags_reserved4, - { "Reserved","diameter.flags.reserved4", FT_BOOLEAN, 8, TFS(&reserved_set), + { "Reserved","diameter.flags.reserved4", FT_BOOLEAN, 8, TFS(&tfs_set_notset), DIAM_FLAGS_RESERVED4, "", HFILL }}, { &hf_diameter_flags_reserved5, - { "Reserved","diameter.flags.reserved5", FT_BOOLEAN, 8, TFS(&reserved_set), + { "Reserved","diameter.flags.reserved5", FT_BOOLEAN, 8, TFS(&tfs_set_notset), DIAM_FLAGS_RESERVED5, "", HFILL }}, { &hf_diameter_flags_reserved6, - { "Reserved","diameter.flags.reserved6", FT_BOOLEAN, 8, TFS(&reserved_set), + { "Reserved","diameter.flags.reserved6", FT_BOOLEAN, 8, TFS(&tfs_set_notset), DIAM_FLAGS_RESERVED6, "", HFILL }}, { &hf_diameter_flags_reserved7, - { "Reserved","diameter.flags.reserved7", FT_BOOLEAN, 8, TFS(&reserved_set), + { "Reserved","diameter.flags.reserved7", FT_BOOLEAN, 8, TFS(&tfs_set_notset), DIAM_FLAGS_RESERVED7, "", HFILL }}, { &hf_diameter_vendor_id, { "VendorId", "diameter.vendorId", FT_UINT32, BASE_DEC, VALS(sminmpec_values), @@ -1453,19 +1448,19 @@ proto_register_diameter(void) { "Protected","diameter.avp.flags.protected", FT_BOOLEAN, 8, TFS(&flags_set_truth), AVP_FLAGS_P, "", HFILL }}, { &hf_diameter_avp_flags_reserved3, - { "Reserved","diameter.avp.flags.reserved3", FT_BOOLEAN, 8, TFS(&reserved_set), + { "Reserved","diameter.avp.flags.reserved3", FT_BOOLEAN, 8, TFS(&tfs_set_notset), AVP_FLAGS_RESERVED3, "", HFILL }}, { &hf_diameter_avp_flags_reserved4, - { "Reserved","diameter.avp.flags.reserved4", FT_BOOLEAN, 8, TFS(&reserved_set), + { "Reserved","diameter.avp.flags.reserved4", FT_BOOLEAN, 8, TFS(&tfs_set_notset), AVP_FLAGS_RESERVED4, "", HFILL }}, { &hf_diameter_avp_flags_reserved5, - { "Reserved","diameter.avp.flags.reserved5", FT_BOOLEAN, 8, TFS(&reserved_set), + { "Reserved","diameter.avp.flags.reserved5", FT_BOOLEAN, 8, TFS(&tfs_set_notset), AVP_FLAGS_RESERVED5, "", HFILL }}, { &hf_diameter_avp_flags_reserved6, - { "Reserved","diameter.avp.flags.reserved6", FT_BOOLEAN, 8, TFS(&reserved_set), + { "Reserved","diameter.avp.flags.reserved6", FT_BOOLEAN, 8, TFS(&tfs_set_notset), AVP_FLAGS_RESERVED6, "", HFILL }}, { &hf_diameter_avp_flags_reserved7, - { "Reserved","diameter.avp.flags.reserved7", FT_BOOLEAN, 8, TFS(&reserved_set), + { "Reserved","diameter.avp.flags.reserved7", FT_BOOLEAN, 8, TFS(&tfs_set_notset), AVP_FLAGS_RESERVED7, "", HFILL }}, { &hf_diameter_avp_vendor_id, { "AVP Vendor Id","diameter.avp.vendorId", FT_UINT32, BASE_DEC, diff --git a/epan/dissectors/packet-fr.c b/epan/dissectors/packet-fr.c index 8c851ba0d7..95f22cc8d3 100644 --- a/epan/dissectors/packet-fr.c +++ b/epan/dissectors/packet-fr.c @@ -130,10 +130,6 @@ static dissector_table_t osinl_subdissector_table; static gint fr_encap = FRF_3_2; -static const true_false_string cmd_string = { - "Command", - "Response" - }; static const true_false_string ctrl_string = { "DLCI Address", "Control" @@ -825,7 +821,7 @@ void proto_register_fr(void) "Upper DLCI", "fr.upper_dlci", FT_UINT8, BASE_HEX, NULL, FRELAY_UPPER_DLCI, "Upper bits of DLCI", HFILL }}, { &hf_fr_cr, { - "CR", "fr.cr", FT_BOOLEAN, 8, TFS(&cmd_string), + "CR", "fr.cr", FT_BOOLEAN, 8, TFS(&tfs_command_response), FRELAY_CR, "Command/Response", HFILL }}, { &hf_fr_second_dlci, { "Second DLCI", "fr.second_dlci", FT_UINT8, BASE_HEX, diff --git a/epan/dissectors/packet-iax2.c b/epan/dissectors/packet-iax2.c index c4904a3afd..673b40aa98 100644 --- a/epan/dissectors/packet-iax2.c +++ b/epan/dissectors/packet-iax2.c @@ -2090,12 +2090,6 @@ iax_init_protocol(void) void proto_register_iax2 (void) { - /* we use this for displaying which codecs are supported */ - static const true_false_string supported_strings = { - "Supported", - "Not supported" - }; - /* A header field is something you can search/filter on. * * We create a structure to register our fields. It consists of an @@ -2477,77 +2471,77 @@ proto_register_iax2 (void) /* capablilites */ {&hf_iax2_cap_g723_1, {"G.723.1 compression", "iax2.cap.g723_1", FT_BOOLEAN, 32, - TFS(&supported_strings), AST_FORMAT_G723_1, + TFS(&tfs_supported_not_supported), AST_FORMAT_G723_1, "G.723.1 compression", HFILL }}, {&hf_iax2_cap_gsm, {"GSM compression", "iax2.cap.gsm", FT_BOOLEAN, 32, - TFS(&supported_strings), AST_FORMAT_GSM, + TFS(&tfs_supported_not_supported), AST_FORMAT_GSM, "GSM compression", HFILL }}, {&hf_iax2_cap_ulaw, {"Raw mu-law data (G.711)", "iax2.cap.ulaw",FT_BOOLEAN, 32, - TFS(&supported_strings), AST_FORMAT_ULAW, + TFS(&tfs_supported_not_supported), AST_FORMAT_ULAW, "Raw mu-law data (G.711)", HFILL }}, {&hf_iax2_cap_alaw, {"Raw A-law data (G.711)", "iax2.cap.alaw",FT_BOOLEAN, 32, - TFS(&supported_strings), AST_FORMAT_ALAW, + TFS(&tfs_supported_not_supported), AST_FORMAT_ALAW, "Raw A-law data (G.711)", HFILL }}, {&hf_iax2_cap_g726, {"G.726 compression", "iax2.cap.g726",FT_BOOLEAN, 32, - TFS(&supported_strings), AST_FORMAT_G726, + TFS(&tfs_supported_not_supported), AST_FORMAT_G726, "G.726 compression", HFILL }}, {&hf_iax2_cap_adpcm, {"ADPCM", "iax2.cap.adpcm", FT_BOOLEAN, 32, - TFS(&supported_strings), AST_FORMAT_ADPCM, + TFS(&tfs_supported_not_supported), AST_FORMAT_ADPCM, "ADPCM", HFILL }}, {&hf_iax2_cap_slinear, {"Raw 16-bit Signed Linear (8000 Hz) PCM", "iax2.cap.slinear", - FT_BOOLEAN, 32, TFS(&supported_strings), AST_FORMAT_SLINEAR, + FT_BOOLEAN, 32, TFS(&tfs_supported_not_supported), AST_FORMAT_SLINEAR, "Raw 16-bit Signed Linear (8000 Hz) PCM", HFILL }}, {&hf_iax2_cap_lpc10, {"LPC10, 180 samples/frame", "iax2.cap.lpc10", FT_BOOLEAN, 32, - TFS(&supported_strings), AST_FORMAT_LPC10, + TFS(&tfs_supported_not_supported), AST_FORMAT_LPC10, "LPC10, 180 samples/frame", HFILL }}, {&hf_iax2_cap_g729a, {"G.729a Audio", "iax2.cap.g729a", FT_BOOLEAN, 32, - TFS(&supported_strings), AST_FORMAT_G729A, + TFS(&tfs_supported_not_supported), AST_FORMAT_G729A, "G.729a Audio", HFILL }}, {&hf_iax2_cap_speex, {"SPEEX Audio", "iax2.cap.speex", FT_BOOLEAN, 32, - TFS(&supported_strings), AST_FORMAT_SPEEX, + TFS(&tfs_supported_not_supported), AST_FORMAT_SPEEX, "SPEEX Audio", HFILL }}, {&hf_iax2_cap_ilbc, {"iLBC Free compressed Audio", "iax2.cap.ilbc", FT_BOOLEAN, 32, - TFS(&supported_strings), AST_FORMAT_ILBC, + TFS(&tfs_supported_not_supported), AST_FORMAT_ILBC, "iLBC Free compressed Audio", HFILL }}, {&hf_iax2_cap_jpeg, {"JPEG images", "iax2.cap.jpeg", FT_BOOLEAN, 32, - TFS(&supported_strings), AST_FORMAT_JPEG, + TFS(&tfs_supported_not_supported), AST_FORMAT_JPEG, "JPEG images", HFILL }}, {&hf_iax2_cap_png, {"PNG images", "iax2.cap.png", FT_BOOLEAN, 32, - TFS(&supported_strings), AST_FORMAT_PNG, + TFS(&tfs_supported_not_supported), AST_FORMAT_PNG, "PNG images", HFILL }}, {&hf_iax2_cap_h261, {"H.261 video", "iax2.cap.h261", FT_BOOLEAN, 32, - TFS(&supported_strings), AST_FORMAT_H261, + TFS(&tfs_supported_not_supported), AST_FORMAT_H261, "H.261 video", HFILL }}, {&hf_iax2_cap_h263, {"H.263 video", "iax2.cap.h263", FT_BOOLEAN, 32, - TFS(&supported_strings), AST_FORMAT_H263, + TFS(&tfs_supported_not_supported), AST_FORMAT_H263, "H.263 video", HFILL }}, /* reassembly stuff */ diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index 2801202329..44c29a5a51 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -8478,11 +8478,6 @@ proto_register_ieee80211 (void) /*** End: QoS Information STA Fixed Field - Dustin Johnson ***/ /*** Begin: Spatial Multiplexing (SM) Power Control - Dustin Johnson ***/ - static const true_false_string ff_sm_pwr_save_enabled_flag = { - "Enabled", - "Disabled" - }; - static const true_false_string ff_sm_pwr_save_sm_mode_flag = { "Dynamic SM Power Save mode", "Static SM Power Save mode" @@ -9458,11 +9453,6 @@ proto_register_ieee80211 (void) "Transmitter is not able to receive PPDUs with Green Field (GF) preamble" }; - static const true_false_string ht_tf_flag = { - "Supported", - "Not Supported " - }; - static const value_string ht_rx_stbc_flag[] = { {0x00, "No Rx STBC support"}, {0x01, "Rx support of one spatial stream"}, @@ -9741,12 +9731,6 @@ proto_register_ieee80211 (void) "One or more HT STAs in the BSS do not support L-SIG TXOP protection" }; - /* XXX - We might want to use tfs_active_inactive here */ - static const true_false_string ht_info_pco_active_flag = { - "Active", - "Not active" - }; - static const true_false_string ht_info_pco_phase_flag = { "Switch to or continue 40 MHz phase", "Switch to or continue 20 MHz phase" @@ -9803,11 +9787,6 @@ proto_register_ieee80211 (void) {0x00, NULL} }; - static const true_false_string hf_tag_measure_enable_flag = { - "Enabled", - "Disabled" - }; - static const true_false_string hf_tag_measure_acc_not_acc = { "Accepted", "Not Accepted" @@ -9857,11 +9836,6 @@ proto_register_ieee80211 (void) "Not Detected" }; - static const true_false_string hf_tag_measure_true_false = { - "True", - "False" - }; - static const value_string hf_tag_measure_request_measurement_mode_flags[] = { {0x00, "Passive"}, {0x01, "Active"}, @@ -9905,11 +9879,6 @@ proto_register_ieee80211 (void) {0x00, NULL} }; - static const true_false_string hf_tag_extended_capabilities_flag = { - "Supported", - "Not Supported" - }; - /*** Begin: Extended Channel Switch Announcement Tag - Dustin Johnson ***/ static const value_string hf_tag_ext_channel_switch_announcement_switch_mode_flags[] = { {0x00, "Frames may be transmitted before the channel switch has been completed"}, @@ -10113,7 +10082,7 @@ proto_register_ieee80211 (void) {&ff_sm_pwr_save_enabled, {"SM Power Save", "wlan_mgt.fixed.sm.powercontrol.enabled", - FT_BOOLEAN, 8, TFS (&ff_sm_pwr_save_enabled_flag), 0x01, "Spatial Multiplexing (SM) Power Save", HFILL }}, + FT_BOOLEAN, 8, TFS (&tfs_enabled_disabled), 0x01, "Spatial Multiplexing (SM) Power Save", HFILL }}, {&ff_sm_pwr_save_sm_mode, {"SM Mode", "wlan_mgt.fixed.sm.powercontrol.mode", @@ -10600,17 +10569,17 @@ proto_register_ieee80211 (void) {&ht_short20, {"HT Short GI for 20MHz", "wlan_mgt.ht.capabilities.short20", - FT_BOOLEAN, 16, TFS (&ht_tf_flag), 0x0020, + FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0020, "HT Short GI for 20MHz", HFILL }}, {&ht_short40, {"HT Short GI for 40MHz", "wlan_mgt.ht.capabilities.short40", - FT_BOOLEAN, 16, TFS (&ht_tf_flag), 0x0040, + FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0040, "HT Short GI for 40MHz", HFILL }}, {&ht_tx_stbc, {"HT Tx STBC", "wlan_mgt.ht.capabilities.txstbc", - FT_BOOLEAN, 16, TFS (&ht_tf_flag), 0x0080, + FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0080, "HT Tx STBC", HFILL }}, {&ht_rx_stbc, @@ -10645,7 +10614,7 @@ proto_register_ieee80211 (void) {&ht_l_sig, {"HT L-SIG TXOP Protection support", "wlan_mgt.ht.capabilities.lsig", - FT_BOOLEAN, 16, TFS (&ht_tf_flag), 0x8000, + FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x8000, "HT L-SIG TXOP Protection support", HFILL }}, {&duparam, @@ -10732,7 +10701,7 @@ proto_register_ieee80211 (void) {&mcsset_tx_unequal_modulation, {"Unequal Modulation", "wlan_mgt.ht.mcsset.txunequalmod", - FT_BOOLEAN, 16, TFS (&ht_tf_flag), 0x0010, + FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0010, "Unequal Modulation", HFILL }}, {&htex_cap, @@ -10745,7 +10714,7 @@ proto_register_ieee80211 (void) {&htex_pco, {"Transmitter supports PCO", "wlan_mgt.htex.capabilities.pco", - FT_BOOLEAN, 16, TFS (&ht_tf_flag), 0x0001, + FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0001, "Transmitter supports PCO", HFILL }}, {&htex_transtime, @@ -10760,12 +10729,12 @@ proto_register_ieee80211 (void) {&htex_htc_support, {"High Throughput", "wlan_mgt.htex.capabilities.htc", - FT_BOOLEAN, 16, TFS (&ht_tf_flag), 0x0400, + FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0400, "High Throughput", HFILL }}, {&htex_rd_responder, {"Reverse Direction Responder", "wlan_mgt.htex.capabilities.rdresponder", - FT_BOOLEAN, 16, TFS (&ht_tf_flag), 0x0800, + FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0800, "Reverse Direction Responder", HFILL }}, {&txbf, @@ -10778,32 +10747,32 @@ proto_register_ieee80211 (void) {&txbf_cap, {"Transmit Beamforming", "wlan_mgt.txbf.txbf", - FT_BOOLEAN, 32, TFS (&ht_tf_flag), 0x00000001, + FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000001, "Transmit Beamforming", HFILL }}, {&txbf_rcv_ssc, {"Receive Staggered Sounding", "wlan_mgt.txbf.rxss", - FT_BOOLEAN, 32, TFS (&ht_tf_flag), 0x00000002, + FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000002, "Receive Staggered Sounding", HFILL }}, {&txbf_tx_ssc, {"Transmit Staggered Sounding", "wlan_mgt.txbf.txss", - FT_BOOLEAN, 32, TFS (&ht_tf_flag), 0x00000004, + FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000004, "Transmit staggered sounding", HFILL }}, {&txbf_rcv_ndp, {"Receive Null Data packet (NDP)", "wlan_mgt.txbf.rxndp", - FT_BOOLEAN, 32, TFS (&ht_tf_flag), 0x00000008, + FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000008, "Receive Null Data packet (NDP)", HFILL }}, {&txbf_tx_ndp, {"Transmit Null Data packet (NDP)", "wlan_mgt.txbf.txndp", - FT_BOOLEAN, 32, TFS (&ht_tf_flag), 0x00000010, + FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000010, "Transmit Null Data packet (NDP)", HFILL }}, {&txbf_impl_txbf, {"Implicit TxBF capable", "wlan_mgt.txbf.impltxbf", - FT_BOOLEAN, 32, TFS (&ht_tf_flag), 0x00000020, + FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000020, "Implicit Transmit Beamforming (TxBF) capable", HFILL }}, {&txbf_calib, @@ -10813,17 +10782,17 @@ proto_register_ieee80211 (void) {&txbf_expl_csi, {"STA can apply TxBF using CSI explicit feedback", "wlan_mgt.txbf.csi", - FT_BOOLEAN, 32, TFS (&ht_tf_flag), 0x00000100, + FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000100, "Station can apply TxBF using CSI explicit feedback", HFILL }}, {&txbf_expl_uncomp_fm, {"STA can apply TxBF using uncompressed beamforming feedback matrix", "wlan_mgt.txbf.fm.uncompressed.tbf", - FT_BOOLEAN, 32, TFS (&ht_tf_flag), 0x00000200, + FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000200, "Station can apply TxBF using uncompressed beamforming feedback matrix", HFILL }}, {&txbf_expl_comp_fm, {"STA can apply TxBF using compressed beamforming feedback matrix", "wlan_mgt.txbf.fm.compressed.tbf", - FT_BOOLEAN, 32, TFS (&ht_tf_flag), 0x00000400, + FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000400, "Station can apply TxBF using compressed beamforming feedback matrix", HFILL }}, {&txbf_expl_bf_csi, @@ -10955,31 +10924,31 @@ proto_register_ieee80211 (void) {&antsel_b0, {"Antenna Selection Capable", "wlan_mgt.asel.capable", - FT_BOOLEAN, 8, TFS (&ht_tf_flag), 0x01, "Antenna Selection Capable", HFILL }}, + FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x01, "Antenna Selection Capable", HFILL }}, {&antsel_b1, {"Explicit CSI Feedback Based Tx ASEL", "wlan_mgt.asel.txcsi", - FT_BOOLEAN, 8, TFS (&ht_tf_flag), 0x02, "Explicit CSI Feedback Based Tx ASEL", HFILL }}, + FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x02, "Explicit CSI Feedback Based Tx ASEL", HFILL }}, {&antsel_b2, {"Antenna Indices Feedback Based Tx ASEL", "wlan_mgt.asel.txif", - FT_BOOLEAN, 8, TFS (&ht_tf_flag), 0x04, "Antenna Indices Feedback Based Tx ASEL", HFILL }}, + FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x04, "Antenna Indices Feedback Based Tx ASEL", HFILL }}, {&antsel_b3, {"Explicit CSI Feedback", "wlan_mgt.asel.csi", - FT_BOOLEAN, 8, TFS (&ht_tf_flag), 0x08, "Explicit CSI Feedback", HFILL }}, + FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x08, "Explicit CSI Feedback", HFILL }}, {&antsel_b4, {"Antenna Indices Feedback", "wlan_mgt.asel.if", - FT_BOOLEAN, 8, TFS (&ht_tf_flag), 0x10, "Antenna Indices Feedback", HFILL }}, + FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x10, "Antenna Indices Feedback", HFILL }}, {&antsel_b5, {"Rx ASEL", "wlan_mgt.asel.rx", - FT_BOOLEAN, 8, TFS (&ht_tf_flag), 0x20, "Rx ASEL", HFILL }}, + FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x20, "Rx ASEL", HFILL }}, {&antsel_b6, {"Tx Sounding PPDUs", "wlan_mgt.asel.sppdu", - FT_BOOLEAN, 8, TFS (&ht_tf_flag), 0x40, "Tx Sounding PPDUs", HFILL }}, + FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x40, "Tx Sounding PPDUs", HFILL }}, {&antsel_b7, {"Reserved", "wlan_mgt.asel.reserved", @@ -11063,7 +11032,7 @@ proto_register_ieee80211 (void) {&ht_info_pco_active, {"Phased Coexistence Operation (PCO)", "wlan_mgt.ht.info.pco.active", - FT_BOOLEAN, 16, TFS (&ht_info_pco_active_flag), 0x0400, "Phased Coexistence Operation (PCO)", HFILL }}, + FT_BOOLEAN, 16, TFS (&tfs_active_inactive), 0x0400, "Phased Coexistence Operation (PCO)", HFILL }}, {&ht_info_pco_phase, {"Phased Coexistence Operation (PCO) Phase", "wlan_mgt.ht.info.pco.phase", @@ -11122,7 +11091,7 @@ proto_register_ieee80211 (void) {&hf_tag_measure_request_mode_enable, {"Measurement Request Mode Field", "wlan_mgt.measure.req.reqmode.enable", - FT_BOOLEAN, 8, TFS (&hf_tag_measure_enable_flag), 0x02, "Measurement Request Mode Field", HFILL }}, + FT_BOOLEAN, 8, TFS (&tfs_enabled_disabled), 0x02, "Measurement Request Mode Field", HFILL }}, {&hf_tag_measure_request_mode_request, {"Measurement Reports", "wlan_mgt.measure.req.reqmode.request", @@ -11200,7 +11169,7 @@ proto_register_ieee80211 (void) {&hf_tag_measure_report_mode_late, {"Measurement Report Mode Field", "wlan_mgt.measure.rep.repmode.late", - FT_BOOLEAN, 8, TFS (&hf_tag_measure_enable_flag), 0x01, "Measurement Report Mode Field", HFILL }}, + FT_BOOLEAN, 8, TFS (&tfs_enabled_disabled), 0x01, "Measurement Report Mode Field", HFILL }}, {&hf_tag_measure_report_mode_incapable, {"Measurement Reports", "wlan_mgt.measure.rep.repmode.incapable", @@ -11256,7 +11225,7 @@ proto_register_ieee80211 (void) {&hf_tag_measure_map_field_unmeasured, {"Unmeasured", "wlan_mgt.measure.rep.repmode.mapfield.unmeasured", - FT_BOOLEAN, 8, TFS (&hf_tag_measure_true_false), 0x10, "Unmeasured", HFILL }}, + FT_BOOLEAN, 8, TFS (&tfs_true_false), 0x10, "Unmeasured", HFILL }}, {&hf_tag_measure_map_field_reserved, {"Reserved", "wlan_mgt.measure.rep.repmode.mapfield.reserved", @@ -11348,20 +11317,20 @@ proto_register_ieee80211 (void) /* P802.11n/D6.0 */ {&hf_tag_extended_capabilities_b0, {"20/40 BSS Coexistence Management Support", "wlan_mgt.extcap.infoexchange.b0", - FT_BOOLEAN, 8, TFS(&hf_tag_extended_capabilities_flag), 0x0001, "HT Information Exchange Support", HFILL }}, + FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0001, "HT Information Exchange Support", HFILL }}, /* P802.11p/D4.0 */ {&hf_tag_extended_capabilities_b1, {"On-demand beacon", "wlan_mgt.extcap.infoexchange.b1", - FT_BOOLEAN, 8, TFS(&hf_tag_extended_capabilities_flag), 0x0002, "On-demand beacon", HFILL }}, + FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0002, "On-demand beacon", HFILL }}, {&hf_tag_extended_capabilities_b2, {"Extended Channel Switching", "wlan_mgt.extcap.infoexchange.b2", - FT_BOOLEAN, 8, TFS(&hf_tag_extended_capabilities_flag), 0x0004, "Extended Channel Switching", HFILL }}, + FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0004, "Extended Channel Switching", HFILL }}, {&hf_tag_extended_capabilities_b3, {"WAVE indication", "wlan_mgt.extcap.infoexchange.b3", - FT_BOOLEAN, 8, TFS(&hf_tag_extended_capabilities_flag), 0x0008, "WAVE indication", HFILL }}, + FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0008, "WAVE indication", HFILL }}, /*End: P802.11p/D4.0 */ /*** End: Extended Capabilities Tag - Dustin Johnson ***/ diff --git a/epan/dissectors/packet-ipmi-transport.c b/epan/dissectors/packet-ipmi-transport.c index a2694b5b00..a49fec6f8a 100644 --- a/epan/dissectors/packet-ipmi-transport.c +++ b/epan/dissectors/packet-ipmi-transport.c @@ -484,10 +484,6 @@ static gint hf_ipmi_trn_1a_chan = -1; static gint hf_ipmi_trn_1b_user = -1; static gint hf_ipmi_trn_1b_chan = -1; -static const struct true_false_string enabled_tfs = { - "Enabled", "Disabled" -}; - static const value_string lan00_sip_vals[] = { { 0x00, "Set complete" }, { 0x01, "Set in progress" }, @@ -2246,10 +2242,10 @@ ipmi_register_transport(gint proto_ipmi) { &hf_ipmi_trn_lan10_responses, { "ARP responses", - "ipmi.lan10.responses", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x02, "", HFILL }}, + "ipmi.lan10.responses", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }}, { &hf_ipmi_trn_lan10_gratuitous, { "Gratuitous ARPs", - "ipmi.lan10.gratuitous", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x01, "", HFILL }}, + "ipmi.lan10.gratuitous", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }}, { &hf_ipmi_trn_lan11_arp_interval, { "Gratuitous ARP interval", @@ -2361,34 +2357,34 @@ ipmi_register_transport(gint proto_ipmi) "ipmi.serial03.connmode", FT_BOOLEAN, 8, TFS(&serial03_connmode_tfs), 0x80, "", HFILL }}, { &hf_ipmi_trn_serial03_terminal, { "Terminal Mode", - "ipmi.serial03.terminal", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x04, "", HFILL }}, + "ipmi.serial03.terminal", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x04, "", HFILL }}, { &hf_ipmi_trn_serial03_ppp, { "PPP Mode", - "ipmi.serial03.ppp", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x02, "", HFILL }}, + "ipmi.serial03.ppp", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }}, { &hf_ipmi_trn_serial03_basic, { "Basic Mode", - "ipmi.serial03.basic", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x01, "", HFILL }}, + "ipmi.serial03.basic", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }}, { &hf_ipmi_trn_serial04_timeout, { "Session Inactivity Timeout", "ipmi.serial04.timeout", FT_UINT8, BASE_CUSTOM, serial04_timeout_fmt, 0x0f, "", HFILL }}, { &hf_ipmi_trn_serial05_cbcp_callback, { "CBCP Callback", - "ipmi.serial05.cbcp", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x02, "", HFILL }}, + "ipmi.serial05.cbcp", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }}, { &hf_ipmi_trn_serial05_ipmi_callback, { "IPMI Callback", - "ipmi.serial05.ipmi", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x01, "", HFILL }}, + "ipmi.serial05.ipmi", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }}, { &hf_ipmi_trn_serial05_cb_list, { "Callback to list of possible numbers", - "ipmi.serial05.cb_list", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x08, "", HFILL }}, + "ipmi.serial05.cb_list", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x08, "", HFILL }}, { &hf_ipmi_trn_serial05_cb_user, { "Callback to user-specifiable number", - "ipmi.serial05.cb_user", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x04, "", HFILL }}, + "ipmi.serial05.cb_user", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x04, "", HFILL }}, { &hf_ipmi_trn_serial05_cb_prespec, { "Callback to pre-specified number", - "ipmi.serial05.cb_prespec", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x02, "", HFILL }}, + "ipmi.serial05.cb_prespec", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }}, { &hf_ipmi_trn_serial05_no_cb, { "No callback", - "ipmi.serial05.no_cb", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x01, "", HFILL }}, + "ipmi.serial05.no_cb", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }}, { &hf_ipmi_trn_serial05_cb_dest1, { "Callback destination 1", "ipmi.serial05.cb_dest1", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }}, @@ -2400,52 +2396,52 @@ ipmi_register_transport(gint proto_ipmi) "ipmi.serial05.cb_dest3", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }}, { &hf_ipmi_trn_serial06_inactivity, { "Session Inactivity Timeout", - "ipmi.serial06.inactivity", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x02, "", HFILL }}, + "ipmi.serial06.inactivity", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }}, { &hf_ipmi_trn_serial06_dcd, { "Close on DCD Loss", - "ipmi.serial06.dcd", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x01, "", HFILL }}, + "ipmi.serial06.dcd", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }}, { &hf_ipmi_trn_serial07_flowctl, { "Flow Control", "ipmi.serial07.flowctl", FT_UINT8, BASE_HEX, serialXX_flowctl_vals, 0xc0, "", HFILL }}, { &hf_ipmi_trn_serial07_dtrhangup, { "DTR Hang-up", - "ipmi.serial07.dtrhangup", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x20, "", HFILL }}, + "ipmi.serial07.dtrhangup", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x20, "", HFILL }}, { &hf_ipmi_trn_serial07_bitrate, { "Bit rate", "ipmi.serial07.bitrate", FT_UINT8, BASE_HEX, serialXX_bitrate_vals, 0x0f, "", HFILL }}, { &hf_ipmi_trn_serial08_esc_powerup, { "Power-up/wakeup via ESC-^", - "ipmi.serial08.esc_powerup", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x40, "", HFILL }}, + "ipmi.serial08.esc_powerup", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x40, "", HFILL }}, { &hf_ipmi_trn_serial08_esc_reset, { "Hard reset via ESC-R-ESC-r-ESC-R", - "ipmi.serial08.esc_reset", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x20, "", HFILL }}, + "ipmi.serial08.esc_reset", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x20, "", HFILL }}, { &hf_ipmi_trn_serial08_switch_authcap, { "Baseboard-to-BMC switch on Get Channel Auth Capabilities", - "ipmi.serial08.switch_authcap", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x10, "", HFILL }}, + "ipmi.serial08.switch_authcap", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x10, "", HFILL }}, { &hf_ipmi_trn_serial08_switch_rmcp, { "Switch to BMC on IPMI-RMCP pattern", - "ipmi.serial08.switch_rmcp", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x08, "", HFILL }}, + "ipmi.serial08.switch_rmcp", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x08, "", HFILL }}, { &hf_ipmi_trn_serial08_esc_switch1, { "BMC-to-Baseboard switch via ESC-Q", - "ipmi.serial08.esc_switch1", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x04, "", HFILL }}, + "ipmi.serial08.esc_switch1", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x04, "", HFILL }}, { &hf_ipmi_trn_serial08_esc_switch2, { "Baseboard-to-BMC switch via ESC-(", - "ipmi.serial08.esc_switch2", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x02, "", HFILL }}, + "ipmi.serial08.esc_switch2", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }}, { &hf_ipmi_trn_serial08_switch_dcdloss, { "Switch to BMC on DCD loss", - "ipmi.serial08.switch_dcdloss", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x01, "", HFILL }}, + "ipmi.serial08.switch_dcdloss", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }}, { &hf_ipmi_trn_serial08_sharing, { "Serial Port Sharing", - "ipmi.serial08.sharing", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x08, "", HFILL }}, + "ipmi.serial08.sharing", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x08, "", HFILL }}, { &hf_ipmi_trn_serial08_ping_callback, { "Serial/Modem Connection Active during callback", - "ipmi.serial08.ping_callback", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x04, "", HFILL }}, + "ipmi.serial08.ping_callback", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x04, "", HFILL }}, { &hf_ipmi_trn_serial08_ping_direct, { "Serial/Modem Connection Active during direct call", - "ipmi.serial08.ping_direct", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x02, "", HFILL }}, + "ipmi.serial08.ping_direct", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }}, { &hf_ipmi_trn_serial08_ping_retry, { "Retry Serial/Modem Connection Active", - "ipmi.serial08.ping_retry", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x01, "", HFILL }}, + "ipmi.serial08.ping_retry", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }}, { &hf_ipmi_trn_serial09_ring_duration, { "Ring Duration", "ipmi.serial09.ring_duration", FT_UINT8, BASE_CUSTOM, ipmi_fmt_500ms_1based, 0x3f, "", HFILL }}, @@ -2523,7 +2519,7 @@ ipmi_register_transport(gint proto_ipmi) "ipmi.serial19.flowctl", FT_UINT8, BASE_HEX, serialXX_flowctl_vals, 0xc0, "", HFILL }}, { &hf_ipmi_trn_serial19_dtrhangup, { "DTR Hang-up", - "ipmi.serial19.dtrhangup", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x20, "", HFILL }}, + "ipmi.serial19.dtrhangup", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x20, "", HFILL }}, { &hf_ipmi_trn_serial19_stopbits, { "Stop bits", "ipmi.serial19.stopbits", FT_BOOLEAN, 8, TFS(&serial19_stopbits_tfs), 0x10, "", HFILL }}, @@ -2628,16 +2624,16 @@ ipmi_register_transport(gint proto_ipmi) "ipmi.serial29.op", FT_UINT8, BASE_HEX, serial29_op_vals, 0xc0, "", HFILL }}, { &hf_ipmi_trn_serial29_lineedit, { "Line Editing", - "ipmi.serial29.lineedit", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x20, "", HFILL }}, + "ipmi.serial29.lineedit", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x20, "", HFILL }}, { &hf_ipmi_trn_serial29_deletectl, { "Delete control", "ipmi.serial29.deletectl", FT_UINT8, BASE_HEX, serial29_delete_vals, 0x0c, "", HFILL }}, { &hf_ipmi_trn_serial29_echo, { "Echo", - "ipmi.serial29.echo", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x02, "", HFILL }}, + "ipmi.serial29.echo", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }}, { &hf_ipmi_trn_serial29_handshake, { "Handshake", - "ipmi.serial29.handshake", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x01, "", HFILL }}, + "ipmi.serial29.handshake", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }}, { &hf_ipmi_trn_serial29_o_newline, { "Output newline sequence", "ipmi.serial29.o_newline", FT_UINT8, BASE_HEX, serial29_o_nl_vals, 0xf0, "", HFILL }}, @@ -2667,13 +2663,13 @@ ipmi_register_transport(gint proto_ipmi) "ipmi.serial30.ipaddr", FT_UINT8, BASE_HEX, serial30_ipaddr_val, 0x18, "", HFILL }}, { &hf_ipmi_trn_serial30_accm, { "ACCM Negotiation", - "ipmi.serial30.accm", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x04, "", HFILL }}, + "ipmi.serial30.accm", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x04, "", HFILL }}, { &hf_ipmi_trn_serial30_addr_comp, { "Address and Ctl Field Compression", - "ipmi.serial30.addr_comp", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x02, "", HFILL }}, + "ipmi.serial30.addr_comp", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }}, { &hf_ipmi_trn_serial30_proto_comp, { "Protocol Field Compression", - "ipmi.serial30.proto_comp", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x01, "", HFILL }}, + "ipmi.serial30.proto_comp", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }}, { &hf_ipmi_trn_serial31_port, { "Primary RMCP Port Number", "ipmi.serial31.port", FT_UINT16, BASE_CUSTOM, ipmi_fmt_udpport, 0, "", HFILL }}, @@ -3042,22 +3038,22 @@ ipmi_register_transport(gint proto_ipmi) { &hf_ipmi_trn_XX_cap_cbcp, { "CBCP callback", - "ipmi.trXX.cap_cbcp", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x02, "", HFILL }}, + "ipmi.trXX.cap_cbcp", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }}, { &hf_ipmi_trn_XX_cap_ipmi, { "IPMI callback", - "ipmi.trXX.cap_ipmi", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x01, "", HFILL }}, + "ipmi.trXX.cap_ipmi", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }}, { &hf_ipmi_trn_XX_cbcp_from_list, { "Callback to one from list of numbers", - "ipmi.trXX.cbcp_from_list", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x08, "", HFILL }}, + "ipmi.trXX.cbcp_from_list", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x08, "", HFILL }}, { &hf_ipmi_trn_XX_cbcp_user, { "Callback to user-specified number", - "ipmi.trXX.cbcp_user", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x04, "", HFILL }}, + "ipmi.trXX.cbcp_user", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x04, "", HFILL }}, { &hf_ipmi_trn_XX_cbcp_prespec, { "Callback to pre-specified number", - "ipmi.trXX.cbcp_prespec", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x02, "", HFILL }}, + "ipmi.trXX.cbcp_prespec", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }}, { &hf_ipmi_trn_XX_cbcp_nocb, { "No callback", - "ipmi.trXX.cbcp_nocb", FT_BOOLEAN, 8, TFS(&enabled_tfs), 0x01, "", HFILL }}, + "ipmi.trXX.cbcp_nocb", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }}, { &hf_ipmi_trn_XX_dst1, { "Callback destination 1", "ipmi.trXX.dst1", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }}, diff --git a/epan/dissectors/packet-isis-hello.c b/epan/dissectors/packet-isis-hello.c index bd70860289..66cd024e19 100644 --- a/epan/dissectors/packet-isis-hello.c +++ b/epan/dissectors/packet-isis-hello.c @@ -90,11 +90,6 @@ static const value_string isis_hello_circuit_type_vals[] = { { ISIS_HELLO_TYPE_LEVEL_12, "Level 1 and 2"}, { 0, NULL} }; -static const true_false_string truefalse = { - "True", - "False" -}; - /* * Predclare dissectors for use in clv dissection. */ @@ -1003,17 +998,17 @@ isis_register_hello(int proto_isis) { { &hf_isis_hello_clv_restart_flags_rr, { "Restart Request", "isis.hello.clv_restart_flags.rr", - FT_BOOLEAN, 8, TFS(&truefalse), ISIS_RESTART_RR, + FT_BOOLEAN, 8, TFS(&tfs_true_false), ISIS_RESTART_RR, "When set, the router is beginning a graceful restart", HFILL }}, { &hf_isis_hello_clv_restart_flags_ra, { "Restart Acknowledgment", "isis.hello.clv_restart_flags.ra", - FT_BOOLEAN, 8, TFS(&truefalse), ISIS_RESTART_RA, + FT_BOOLEAN, 8, TFS(&tfs_true_false), ISIS_RESTART_RA, "When set, the router is willing to enter helper mode", HFILL }}, { &hf_isis_hello_clv_restart_flags_sa, { "Suppress Adjacency", "isis.hello.clv_restart_flags.sa", - FT_BOOLEAN, 8, TFS(&truefalse), ISIS_RESTART_SA, + FT_BOOLEAN, 8, TFS(&tfs_true_false), ISIS_RESTART_SA, "When set, the router is starting as opposed to restarting", HFILL }}, { &hf_isis_hello_clv_restart_remain_time, diff --git a/epan/dissectors/packet-isis-lsp.c b/epan/dissectors/packet-isis-lsp.c index f4867bddee..1f14a7b849 100644 --- a/epan/dissectors/packet-isis-lsp.c +++ b/epan/dissectors/packet-isis-lsp.c @@ -99,16 +99,6 @@ static const value_string isis_lsp_istype_vals[] = { { ISIS_LSP_TYPE_LEVEL_2, "Level 2"}, { 0, NULL } }; -static const true_false_string supported_string = { - "Supported", - "Unsupported" - }; - -static const true_false_string hippity_string = { - "Set", - "Unset" - }; - /* * Predclare dissectors for use in clv dissection. @@ -1978,7 +1968,7 @@ isis_register_lsp(int proto_isis) { { &hf_isis_lsp_p, { "Partition Repair", "isis.lsp.partition_repair", FT_BOOLEAN, 8, - TFS(&supported_string), ISIS_LSP_PARTITION_MASK, + TFS(&tfs_supported_not_supported), ISIS_LSP_PARTITION_MASK, "If set, this router supports the optional Partition Repair function", HFILL }}, { &hf_isis_lsp_att, @@ -1988,7 +1978,7 @@ isis_register_lsp(int proto_isis) { { &hf_isis_lsp_hippity, { "Overload bit", "isis.lsp.overload", FT_BOOLEAN, 8, - TFS(&hippity_string), ISIS_LSP_HIPPITY_MASK, + TFS(&tfs_set_notset), ISIS_LSP_HIPPITY_MASK, "If set, this router will not be used by any decision process to calculate routes", HFILL }}, { &hf_isis_lsp_is_type, diff --git a/epan/dissectors/packet-nbns.c b/epan/dissectors/packet-nbns.c index f984ac966b..f2493d35b5 100644 --- a/epan/dissectors/packet-nbns.c +++ b/epan/dissectors/packet-nbns.c @@ -1178,11 +1178,6 @@ static const value_string nbds_msgtype_vals[] = { { 0, NULL } }; -static const true_false_string yesno = { - "Yes", - "No" -}; - static const value_string node_type_vals[] = { { 0, "B node" }, { 1, "P node" }, @@ -1899,11 +1894,11 @@ proto_register_nbt(void) "NBDGM message type", HFILL }}, { &hf_nbdgm_fragment, { "More fragments follow", "nbdgm.next", - FT_BOOLEAN, BASE_NONE, TFS(&yesno), 0x0, + FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x0, "TRUE if more fragments follow", HFILL }}, { &hf_nbdgm_first, { "This is first fragment", "nbdgm.first", - FT_BOOLEAN, BASE_NONE, TFS(&yesno), 0x0, + FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x0, "TRUE if first fragment", HFILL }}, { &hf_nbdgm_node_type, { "Node Type", "nbdgm.node_type", diff --git a/epan/dissectors/packet-netbios.c b/epan/dissectors/packet-netbios.c index a83eb325cb..f755d7bf95 100644 --- a/epan/dissectors/packet-netbios.c +++ b/epan/dissectors/packet-netbios.c @@ -231,18 +231,10 @@ static const value_string name_types[] = { { 0, NULL } }; -static const true_false_string flags_set = { - "Set", - "Not set" -}; static const true_false_string flags_allowed = { "Allowed", "Not allowed" }; -static const true_false_string flags_yes_no = { - "Yes", - "No" -}; static const true_false_string netb_version_str = { "2.00 or higher", @@ -1311,7 +1303,7 @@ void proto_register_netbios(void) "", HFILL }}, { &hf_netb_ack, - { "Acknowledge", "netbios.ack", FT_BOOLEAN, 8, TFS( &flags_set), 0x08, + { "Acknowledge", "netbios.ack", FT_BOOLEAN, 8, TFS( &tfs_set_notset), 0x08, "", HFILL }}, { &hf_netb_ack_with_data, @@ -1320,15 +1312,15 @@ void proto_register_netbios(void) { &hf_netb_ack_expected, { "Acknowledge expected", "netbios.ack_expected", FT_BOOLEAN, 8, - TFS( &flags_yes_no), 0x02, "", HFILL }}, + TFS( &tfs_yes_no), 0x02, "", HFILL }}, { &hf_netb_recv_cont_req, { "RECEIVE_CONTINUE requested", "netbios.recv_cont_req", FT_BOOLEAN, 8, - TFS( &flags_yes_no), 0x01, "", HFILL }}, + TFS( &tfs_yes_no), 0x01, "", HFILL }}, { &hf_netb_send_no_ack, { "Handle SEND.NO.ACK", "netbios.send_no_ack", FT_BOOLEAN, 8, - TFS( &flags_yes_no), 0x80, "", HFILL }}, + TFS( &tfs_yes_no), 0x80, "", HFILL }}, { &hf_netb_version, { "NetBIOS Version", "netbios.version", FT_BOOLEAN, 8, diff --git a/epan/dissectors/packet-nlsp.c b/epan/dissectors/packet-nlsp.c index 26d0729c5b..b5a423854c 100644 --- a/epan/dissectors/packet-nlsp.c +++ b/epan/dissectors/packet-nlsp.c @@ -112,11 +112,6 @@ static const value_string nlsp_router_type_vals[] = { { 0, NULL} }; -static const true_false_string supported_string = { - "Supported", - "Unsupported" -}; - /* * Our sub-packet dismantle structure for CLV's */ @@ -1579,7 +1574,7 @@ proto_register_nlsp(void) { &hf_nlsp_hello_multicast, { "Multicast Routing", "nlsp.hello.multicast", FT_BOOLEAN, 8, - TFS(&supported_string), NLSP_HELLO_MULTICAST_MASK, + TFS(&tfs_supported_not_supported), NLSP_HELLO_MULTICAST_MASK, "If set, this router supports multicast routing", HFILL }}, { &hf_nlsp_hello_circuit_type, @@ -1606,7 +1601,7 @@ proto_register_nlsp(void) { &hf_nlsp_lsp_p, { "Partition Repair", "nlsp.lsp.partition_repair", FT_BOOLEAN, 8, - TFS(&supported_string), NLSP_LSP_PARTITION_MASK, + TFS(&tfs_supported_not_supported), NLSP_LSP_PARTITION_MASK, "If set, this router supports the optional Partition Repair function", HFILL }}, { &hf_nlsp_lsp_attached_flag, diff --git a/epan/dissectors/packet-nsip.c b/epan/dissectors/packet-nsip.c index 6b6c348112..c3ab3d7883 100644 --- a/epan/dissectors/packet-nsip.c +++ b/epan/dissectors/packet-nsip.c @@ -253,11 +253,6 @@ typedef struct { static nsip_ip_element_info_t ipv4_element = { NSIP_IP_VERSION_4, 4, 8 }; static nsip_ip_element_info_t ipv6_element = { NSIP_IP_VERSION_6, 16, 20 }; -static true_false_string set_unset = { - "Set", - "Not set" -}; - static void get_value_length(nsip_ie_t *ie, build_info_t *bi) { /* length indicator in bit 8, 0 => two bytes, 1 => one byte */ @@ -1028,7 +1023,7 @@ proto_register_nsip(void) }, { &hf_nsip_reset_flag, { "Reset flag", "nsip.reset_flag", - FT_BOOLEAN, 8, TFS(&set_unset), NSIP_MASK_RESET_FLAG, + FT_BOOLEAN, 8, TFS(&tfs_set_notset), NSIP_MASK_RESET_FLAG, "", HFILL } }, { &hf_nsip_ip_address_type, @@ -1048,17 +1043,17 @@ proto_register_nsip(void) }, { &hf_nsip_end_flag, { "End flag", "nsip.end_flag", - FT_BOOLEAN, 8, TFS(&set_unset), NSIP_MASK_END_FLAG, + FT_BOOLEAN, 8, TFS(&tfs_set_notset), NSIP_MASK_END_FLAG, "", HFILL } }, { &hf_nsip_control_bits_r, { "Request change flow", "nsip.control_bits.r", - FT_BOOLEAN, 8, TFS(&set_unset), NSIP_MASK_CONTROL_BITS_R, + FT_BOOLEAN, 8, TFS(&tfs_set_notset), NSIP_MASK_CONTROL_BITS_R, "", HFILL } }, { &hf_nsip_control_bits_c, { "Confirm change flow", "nsip.control_bits.c", - FT_BOOLEAN, 8, TFS(&set_unset), NSIP_MASK_CONTROL_BITS_C, + FT_BOOLEAN, 8, TFS(&tfs_set_notset), NSIP_MASK_CONTROL_BITS_C, "", HFILL } }, { &hf_nsip_transaction_id, diff --git a/epan/dissectors/packet-pagp.c b/epan/dissectors/packet-pagp.c index d9e681a5ce..37deb42041 100644 --- a/epan/dissectors/packet-pagp.c +++ b/epan/dissectors/packet-pagp.c @@ -148,11 +148,6 @@ static const value_string tlv_types[] = { { 0, NULL } }; -static const true_false_string yesno = { - "Yes", - "No" -}; - static const true_false_string automode = { "Yes", "Desirable Mode" @@ -437,7 +432,7 @@ proto_register_pagp(void) { &hf_pagp_flags_slow_hello, { "Slow Hello", "pagp.flags.slowhello", - FT_BOOLEAN, 8, TFS(&yesno), PAGP_FLAGS_SLOW_HELLO, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), PAGP_FLAGS_SLOW_HELLO, "1 = using Slow Hello, 0 = Slow Hello disabled", HFILL }}, { &hf_pagp_flags_auto_mode, diff --git a/epan/dissectors/packet-rpcap.c b/epan/dissectors/packet-rpcap.c index 61e83bc450..9dbcb37888 100644 --- a/epan/dissectors/packet-rpcap.c +++ b/epan/dissectors/packet-rpcap.c @@ -219,14 +219,6 @@ static guint32 global_linktype = WTAP_ENCAP_UNKNOWN; static guint32 linktype = WTAP_ENCAP_UNKNOWN; static gboolean info_added = FALSE; -static const true_false_string yes_no = { - "Yes", "No" -}; - -static const true_false_string enabled_disabled = { - "Enabled", "Disabled" -}; - static const true_false_string open_closed = { "Open", "Closed" }; @@ -1130,19 +1122,19 @@ proto_register_rpcap (void) NULL, 0x0, "Capture flags", HFILL } }, { &hf_flags_promisc, { "Promiscuous mode", "rpcap.flags.promisc", FT_BOOLEAN, 16, - TFS(&enabled_disabled), FLAG_PROMISC, "Promiscuous mode", HFILL } }, + TFS(&tfs_enabled_disabled), FLAG_PROMISC, "Promiscuous mode", HFILL } }, { &hf_flags_dgram, { "Use Datagram", "rpcap.flags.dgram", FT_BOOLEAN, 16, - TFS(&yes_no), FLAG_DGRAM, "", HFILL } }, + TFS(&tfs_yes_no), FLAG_DGRAM, "", HFILL } }, { &hf_flags_serveropen, { "Server open", "rpcap.flags.serveropen", FT_BOOLEAN, 16, TFS(&open_closed), FLAG_SERVEROPEN, "Server open", HFILL } }, { &hf_flags_inbound, { "Inbound", "rpcap.flags.inbound", FT_BOOLEAN, 16, - TFS(&yes_no), FLAG_INBOUND, "Inbound", HFILL } }, + TFS(&tfs_yes_no), FLAG_INBOUND, "Inbound", HFILL } }, { &hf_flags_outbound, { "Outbound", "rpcap.flags.outbound", FT_BOOLEAN, 16, - TFS(&yes_no), FLAG_OUTBOUND, "Outbound", HFILL } }, + TFS(&tfs_yes_no), FLAG_OUTBOUND, "Outbound", HFILL } }, { &hf_client_port, { "Client Port", "rpcap.client_port", FT_UINT16, BASE_DEC, NULL, 0x0, "Client Port", HFILL } }, diff --git a/epan/dissectors/packet-rtnet.c b/epan/dissectors/packet-rtnet.c index 17ec20dc56..49f2bc5929 100644 --- a/epan/dissectors/packet-rtnet.c +++ b/epan/dissectors/packet-rtnet.c @@ -905,11 +905,6 @@ dissect_rtcfg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { void proto_register_rtmac(void) { - static const true_false_string rtnet_flags_set_truth = { - "Set", - "Not set" - }; - static hf_register_info hf_array_rtmac[] = { /* RTmac header */ @@ -934,7 +929,7 @@ proto_register_rtmac(void) { { &hf_rtmac_header_flags_tunnel, { "Tunnelling Flag", "rtmac.header.flags.tunnel", - FT_BOOLEAN, 8, TFS(&rtnet_flags_set_truth), RTMAC_FLAG_TUNNEL, + FT_BOOLEAN, 8, TFS(&tfs_set_notset), RTMAC_FLAG_TUNNEL, "RTmac Tunnelling Flag", HFILL }}, { &hf_rtmac_header_flags_res, diff --git a/epan/dissectors/packet-sflow.c b/epan/dissectors/packet-sflow.c index a0588d9858..5ee82f6d29 100644 --- a/epan/dissectors/packet-sflow.c +++ b/epan/dissectors/packet-sflow.c @@ -67,11 +67,6 @@ static range_t *global_sflow_ports = NULL; static gboolean global_dissect_samp_headers = TRUE; static gboolean global_analyze_samp_ip_headers = FALSE; -static const true_false_string yes_no_truth = { - "Yes", - "No" -}; - #define ADDRESS_UNKNOWN 0 #define ADDRESS_IPV4 1 #define ADDRESS_IPV6 2 @@ -1606,7 +1601,7 @@ proto_register_sflow(void) }, { &hf_sflow_fs_multipleoutputs, { "Multiple outputs", "sflow.fs.multipleoutputs", - FT_BOOLEAN, 32, TFS(&yes_no_truth), 0x80000000, + FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x80000000, "Output to more than one interface", HFILL } }, { &hf_sflow_fs_numoutinterfaces, diff --git a/epan/dissectors/packet-slowprotocols.c b/epan/dissectors/packet-slowprotocols.c index 33e5cafc89..6c8792b516 100644 --- a/epan/dissectors/packet-slowprotocols.c +++ b/epan/dissectors/packet-slowprotocols.c @@ -594,16 +594,6 @@ static const value_string indication_vals[] = { { 0, NULL } }; -static const true_false_string yesno = { - "Yes", - "No" -}; - -static const true_false_string falsetrue = { - "True", - "False" -}; - static const value_string status_vals[] _U_ = { { 0x00, "Unsatisfied, can't complete" }, { 0x01, "Discovery in process" }, @@ -2421,42 +2411,42 @@ proto_register_slow_protocols(void) { &hf_lacpdu_flags_a_activity, { "LACP Activity", "slow.lacp.actorState.activity", - FT_BOOLEAN, 8, TFS(&yesno), LACPDU_FLAGS_ACTIVITY, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), LACPDU_FLAGS_ACTIVITY, "Activity control value for this link. Active = 1, Passive = 0", HFILL }}, { &hf_lacpdu_flags_a_timeout, { "LACP Timeout", "slow.lacp.actorState.timeout", - FT_BOOLEAN, 8, TFS(&yesno), LACPDU_FLAGS_TIMEOUT, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), LACPDU_FLAGS_TIMEOUT, "Timeout control value for this link. Short Timeout = 1, Long Timeout = 0", HFILL }}, { &hf_lacpdu_flags_a_aggregation, { "Aggregation", "slow.lacp.actorState.aggregation", - FT_BOOLEAN, 8, TFS(&yesno), LACPDU_FLAGS_AGGREGATION, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), LACPDU_FLAGS_AGGREGATION, "Aggregatable = 1, Individual = 0", HFILL }}, { &hf_lacpdu_flags_a_sync, { "Synchronization", "slow.lacp.actorState.synchronization", - FT_BOOLEAN, 8, TFS(&yesno), LACPDU_FLAGS_SYNC, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), LACPDU_FLAGS_SYNC, "In Sync = 1, Out of Sync = 0", HFILL }}, { &hf_lacpdu_flags_a_collecting, { "Collecting", "slow.lacp.actorState.collecting", - FT_BOOLEAN, 8, TFS(&yesno), LACPDU_FLAGS_COLLECTING, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), LACPDU_FLAGS_COLLECTING, "Collection of incoming frames is: Enabled = 1, Disabled = 0", HFILL }}, { &hf_lacpdu_flags_a_distrib, { "Distributing", "slow.lacp.actorState.distributing", - FT_BOOLEAN, 8, TFS(&yesno), LACPDU_FLAGS_DISTRIB, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), LACPDU_FLAGS_DISTRIB, "Distribution of outgoing frames is: Enabled = 1, Disabled = 0", HFILL }}, { &hf_lacpdu_flags_a_defaulted, { "Defaulted", "slow.lacp.actorState.defaulted", - FT_BOOLEAN, 8, TFS(&yesno), LACPDU_FLAGS_DEFAULTED, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), LACPDU_FLAGS_DEFAULTED, "1 = Actor Rx machine is using DEFAULT Partner info, 0 = using info in Rx'd LACPDU", HFILL }}, { &hf_lacpdu_flags_a_expired, { "Expired", "slow.lacp.actorState.expired", - FT_BOOLEAN, 8, TFS(&yesno), LACPDU_FLAGS_EXPIRED, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), LACPDU_FLAGS_EXPIRED, "1 = Actor Rx machine is EXPIRED, 0 = is NOT EXPIRED", HFILL }}, { &hf_lacpdu_actor_reserved, @@ -2506,42 +2496,42 @@ proto_register_slow_protocols(void) { &hf_lacpdu_flags_p_activity, { "LACP Activity", "slow.lacp.partnerState.activity", - FT_BOOLEAN, 8, TFS(&yesno), LACPDU_FLAGS_ACTIVITY, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), LACPDU_FLAGS_ACTIVITY, "Activity control value for this link. Active = 1, Passive = 0", HFILL }}, { &hf_lacpdu_flags_p_timeout, { "LACP Timeout", "slow.lacp.partnerState.timeout", - FT_BOOLEAN, 8, TFS(&yesno), LACPDU_FLAGS_TIMEOUT, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), LACPDU_FLAGS_TIMEOUT, "Timeout control value for this link. Short Timeout = 1, Long Timeout = 0", HFILL }}, { &hf_lacpdu_flags_p_aggregation, { "Aggregation", "slow.lacp.partnerState.aggregation", - FT_BOOLEAN, 8, TFS(&yesno), LACPDU_FLAGS_AGGREGATION, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), LACPDU_FLAGS_AGGREGATION, "Aggregatable = 1, Individual = 0", HFILL }}, { &hf_lacpdu_flags_p_sync, { "Synchronization", "slow.lacp.partnerState.synchronization", - FT_BOOLEAN, 8, TFS(&yesno), LACPDU_FLAGS_SYNC, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), LACPDU_FLAGS_SYNC, "In Sync = 1, Out of Sync = 0", HFILL }}, { &hf_lacpdu_flags_p_collecting, { "Collecting", "slow.lacp.partnerState.collecting", - FT_BOOLEAN, 8, TFS(&yesno), LACPDU_FLAGS_COLLECTING, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), LACPDU_FLAGS_COLLECTING, "Collection of incoming frames is: Enabled = 1, Disabled = 0", HFILL }}, { &hf_lacpdu_flags_p_distrib, { "Distributing", "slow.lacp.partnerState.distributing", - FT_BOOLEAN, 8, TFS(&yesno), LACPDU_FLAGS_DISTRIB, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), LACPDU_FLAGS_DISTRIB, "Distribution of outgoing frames is: Enabled = 1, Disabled = 0", HFILL }}, { &hf_lacpdu_flags_p_defaulted, { "Defaulted", "slow.lacp.partnerState.defaulted", - FT_BOOLEAN, 8, TFS(&yesno), LACPDU_FLAGS_DEFAULTED, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), LACPDU_FLAGS_DEFAULTED, "1 = Actor Rx machine is using DEFAULT Partner info, 0 = using info in Rx'd LACPDU", HFILL }}, { &hf_lacpdu_flags_p_expired, { "Expired", "slow.lacp.partnerState.expired", - FT_BOOLEAN, 8, TFS(&yesno), LACPDU_FLAGS_EXPIRED, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), LACPDU_FLAGS_EXPIRED, "1 = Actor Rx machine is EXPIRED, 0 = is NOT EXPIRED", HFILL }}, { &hf_lacpdu_partner_reserved, @@ -2629,37 +2619,37 @@ proto_register_slow_protocols(void) { &hf_oampdu_flags_link_fault, { "Link Fault", "slow.oam.flags.linkFault", - FT_BOOLEAN, 8, TFS(&falsetrue), OAMPDU_FLAGS_LINK_FAULT, + FT_BOOLEAN, 8, TFS(&tfs_true_false), OAMPDU_FLAGS_LINK_FAULT, "The PHY detected a fault in the receive direction. True = 1, False = 0", HFILL }}, { &hf_oampdu_flags_dying_gasp, { "Dying Gasp", "slow.oam.flags.dyingGasp", - FT_BOOLEAN, 8, TFS(&falsetrue), OAMPDU_FLAGS_DYING_GASP, + FT_BOOLEAN, 8, TFS(&tfs_true_false), OAMPDU_FLAGS_DYING_GASP, "An unrecoverable local failure occured. True = 1, False = 0", HFILL }}, { &hf_oampdu_flags_critical_event, { "Critical Event", "slow.oam.flags.criticalEvent", - FT_BOOLEAN, 8, TFS(&falsetrue), OAMPDU_FLAGS_CRITICAL_EVENT, + FT_BOOLEAN, 8, TFS(&tfs_true_false), OAMPDU_FLAGS_CRITICAL_EVENT, "A critical event has occurred. True = 1, False = 0", HFILL }}, { &hf_oampdu_flags_local_evaluating, { "Local Evaluating", "slow.oam.flags.localEvaluating", - FT_BOOLEAN, 8, TFS(&falsetrue), OAMPDU_FLAGS_LOCAL_EVAL, + FT_BOOLEAN, 8, TFS(&tfs_true_false), OAMPDU_FLAGS_LOCAL_EVAL, "Local DTE Discovery process in progress. True = 1, False = 0", HFILL }}, { &hf_oampdu_flags_local_stable, { "Local Stable", "slow.oam.flags.localStable", - FT_BOOLEAN, 8, TFS(&falsetrue), OAMPDU_FLAGS_LOCAL_STABLE, + FT_BOOLEAN, 8, TFS(&tfs_true_false), OAMPDU_FLAGS_LOCAL_STABLE, "Local DTE is Stable. True = 1, False = 0", HFILL }}, { &hf_oampdu_flags_remote_evaluating, { "Remote Evaluating", "slow.oam.flags.remoteEvaluating", - FT_BOOLEAN, 8, TFS(&falsetrue), OAMPDU_FLAGS_REMOTE_EVAL, + FT_BOOLEAN, 8, TFS(&tfs_true_false), OAMPDU_FLAGS_REMOTE_EVAL, "Remote DTE Discovery process in progress. True = 1, False = 0", HFILL }}, { &hf_oampdu_flags_remote_stable, { "Remote Stable", "slow.oam.flags.remoteStable", - FT_BOOLEAN, 8, TFS(&falsetrue), OAMPDU_FLAGS_REMOTE_STABLE, + FT_BOOLEAN, 8, TFS(&tfs_true_false), OAMPDU_FLAGS_REMOTE_STABLE, "Remote DTE is Stable. True = 1, False = 0", HFILL }}, { &hf_oampdu_code, diff --git a/epan/dissectors/packet-sua.c b/epan/dissectors/packet-sua.c index a4c4cf1e3b..59040e3290 100644 --- a/epan/dissectors/packet-sua.c +++ b/epan/dissectors/packet-sua.c @@ -871,11 +871,6 @@ dissect_receive_sequence_number_parameter(tvbuff_t *parameter_tvb, proto_tree *p #define D_BIT_MASK 0x01 #define RESERVED_BITS_MASK 0xF0 -static const true_false_string sua_supported_bit_value = { - "Supported", - "Unsupported" -}; - static const value_string interworking_values[] = { { 0x0, "No Interworking with SS7 Networks" }, { 0x1, "IP-Signalling Endpoint interworking with with SS7 networks" }, @@ -2011,10 +2006,10 @@ proto_register_sua(void) { &hf_receive_sequence_number_spare_bit, { "Spare Bit", "sua.receive_sequence_number_spare_bit", FT_BOOLEAN, 8, NULL, SPARE_BIT_MASK, "", HFILL } }, { &hf_asp_capabilities_reserved, { "Reserved", "sua.asp_capabilities_reserved", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } }, { &hf_asp_capabilities_reserved_bits, { "Reserved Bits", "sua.asp_capabilities_reserved_bits", FT_UINT8, BASE_HEX, NULL, RESERVED_BITS_MASK, "", HFILL } }, - { &hf_asp_capabilities_a_bit, { "Protocol Class 3", "sua.asp_capabilities_a_bit", FT_BOOLEAN, 8, TFS(&sua_supported_bit_value), A_BIT_MASK, "", HFILL } }, - { &hf_asp_capabilities_b_bit, { "Protocol Class 2", "sua.asp_capabilities_b_bit", FT_BOOLEAN, 8, TFS(&sua_supported_bit_value), B_BIT_MASK, "", HFILL } }, - { &hf_asp_capabilities_c_bit, { "Protocol Class 1", "sua.asp_capabilities_c_bit", FT_BOOLEAN, 8, TFS(&sua_supported_bit_value), C_BIT_MASK, "", HFILL } }, - { &hf_asp_capabilities_d_bit, { "Protocol Class 0", "sua.asp_capabilities_d_bit", FT_BOOLEAN, 8, TFS(&sua_supported_bit_value), D_BIT_MASK, "", HFILL } }, + { &hf_asp_capabilities_a_bit, { "Protocol Class 3", "sua.asp_capabilities_a_bit", FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), A_BIT_MASK, "", HFILL } }, + { &hf_asp_capabilities_b_bit, { "Protocol Class 2", "sua.asp_capabilities_b_bit", FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), B_BIT_MASK, "", HFILL } }, + { &hf_asp_capabilities_c_bit, { "Protocol Class 1", "sua.asp_capabilities_c_bit", FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), C_BIT_MASK, "", HFILL } }, + { &hf_asp_capabilities_d_bit, { "Protocol Class 0", "sua.asp_capabilities_d_bit", FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), D_BIT_MASK, "", HFILL } }, { &hf_asp_capabilities_interworking, { "Interworking", "sua.asp_capabilities_interworking", FT_UINT8, BASE_HEX, VALS(interworking_values), 0x0, "", HFILL } }, { &hf_credit, { "Credit", "sua.credit", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } }, { &hf_cause, { "Cause", "sua.cause_user_cause", FT_UINT16, BASE_DEC, VALS(cause_values), 0x0, "", HFILL } }, diff --git a/epan/dissectors/packet-wsp.c b/epan/dissectors/packet-wsp.c index e7cd05e3b3..09165503ef 100644 --- a/epan/dissectors/packet-wsp.c +++ b/epan/dissectors/packet-wsp.c @@ -1162,7 +1162,7 @@ static const value_string vals_well_known_te[] = { /* * Redirect flags. */ -#define PERMANENT_REDIRECT 0x80 +#define PERMANENT_REDIRECT 0x80 #define REUSE_SECURITY_SESSION 0x40 /* @@ -1170,12 +1170,7 @@ static const value_string vals_well_known_te[] = { */ #define BEARER_TYPE_INCLUDED 0x80 #define PORT_NUMBER_INCLUDED 0x40 -#define ADDRESS_LEN 0x3f - -static const true_false_string yes_no_truth = { - "Yes" , - "No" -}; +#define ADDRESS_LEN 0x3f static const value_string vals_false_true[] = { { 0, "False" }, @@ -6391,14 +6386,14 @@ proto_register_wsp(void) { &hf_wsp_redirect_permanent, { "Permanent Redirect", "wsp.redirect.flags.permanent", - FT_BOOLEAN, 8, TFS(&yes_no_truth), PERMANENT_REDIRECT, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), PERMANENT_REDIRECT, "Permanent Redirect", HFILL } }, { &hf_wsp_redirect_reuse_security_session, { "Reuse Security Session", "wsp.redirect.flags.reuse_security_session", - FT_BOOLEAN, 8, TFS(&yes_no_truth), REUSE_SECURITY_SESSION, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), REUSE_SECURITY_SESSION, "If set, the existing Security Session may be reused", HFILL } }, @@ -6430,14 +6425,14 @@ proto_register_wsp(void) { &hf_address_flags_length_bearer_type_included, { "Bearer Type Included", "wsp.address.flags.bearer_type_included", - FT_BOOLEAN, 8, TFS(&yes_no_truth), BEARER_TYPE_INCLUDED, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), BEARER_TYPE_INCLUDED, "Address bearer type included", HFILL } }, { &hf_address_flags_length_port_number_included, { "Port Number Included", "wsp.address.flags.port_number_included", - FT_BOOLEAN, 8, TFS(&yes_no_truth), PORT_NUMBER_INCLUDED, + FT_BOOLEAN, 8, TFS(&tfs_yes_no), PORT_NUMBER_INCLUDED, "Address port number included", HFILL } }, diff --git a/epan/dissectors/packet-xtp.c b/epan/dissectors/packet-xtp.c index 5b39dbe9d3..ab48ba6b6e 100644 --- a/epan/dissectors/packet-xtp.c +++ b/epan/dissectors/packet-xtp.c @@ -179,11 +179,6 @@ static int hf_xtp_diag_code = -1; static int hf_xtp_diag_val = -1; static int hf_xtp_diag_msg = -1; -static const true_false_string tfs_cmd_options = { - "Set", - "Not set" -}; - /* Initialize the subtree pointers */ static gint ett_xtp = -1; static gint ett_xtp_key = -1; @@ -1046,77 +1041,77 @@ proto_register_xtp(void) }, { &hf_xtp_cmd_options_nocheck, { "NOCHECK", "xtp.cmd.options.nocheck", - FT_BOOLEAN, 24, TFS(&tfs_cmd_options), + FT_BOOLEAN, 24, TFS(&tfs_set_notset), XTP_CMD_OPTIONS_NOCHECK, "", HFILL } }, { &hf_xtp_cmd_options_edge, { "EDGE", "xtp.cmd.options.edge", - FT_BOOLEAN, 24, TFS(&tfs_cmd_options), + FT_BOOLEAN, 24, TFS(&tfs_set_notset), XTP_CMD_OPTIONS_EDGE, "", HFILL } }, { &hf_xtp_cmd_options_noerr, { "NOERR", "xtp.cmd.options.noerr", - FT_BOOLEAN, 24, TFS(&tfs_cmd_options), + FT_BOOLEAN, 24, TFS(&tfs_set_notset), XTP_CMD_OPTIONS_NOERR, "", HFILL } }, { &hf_xtp_cmd_options_multi, { "MULTI", "xtp.cmd.options.multi", - FT_BOOLEAN, 24, TFS(&tfs_cmd_options), + FT_BOOLEAN, 24, TFS(&tfs_set_notset), XTP_CMD_OPTIONS_MULTI, "", HFILL } }, { &hf_xtp_cmd_options_res, { "RES", "xtp.cmd.options.res", - FT_BOOLEAN, 24, TFS(&tfs_cmd_options), + FT_BOOLEAN, 24, TFS(&tfs_set_notset), XTP_CMD_OPTIONS_RES, "", HFILL } }, { &hf_xtp_cmd_options_sort, { "SORT", "xtp.cmd.options.sort", - FT_BOOLEAN, 24, TFS(&tfs_cmd_options), + FT_BOOLEAN, 24, TFS(&tfs_set_notset), XTP_CMD_OPTIONS_SORT, "", HFILL } }, { &hf_xtp_cmd_options_noflow, { "NOFLOW", "xtp.cmd.options.noflow", - FT_BOOLEAN, 24, TFS(&tfs_cmd_options), + FT_BOOLEAN, 24, TFS(&tfs_set_notset), XTP_CMD_OPTIONS_NOFLOW, "", HFILL } }, { &hf_xtp_cmd_options_fastnak, { "FASTNAK", "xtp.cmd.options.fastnak", - FT_BOOLEAN, 24, TFS(&tfs_cmd_options), + FT_BOOLEAN, 24, TFS(&tfs_set_notset), XTP_CMD_OPTIONS_FASTNAK, "", HFILL } }, { &hf_xtp_cmd_options_sreq, { "SREQ", "xtp.cmd.options.sreq", - FT_BOOLEAN, 24, TFS(&tfs_cmd_options), + FT_BOOLEAN, 24, TFS(&tfs_set_notset), XTP_CMD_OPTIONS_SREQ, "", HFILL } }, { &hf_xtp_cmd_options_dreq, { "DREQ", "xtp.cmd.options.dreq", - FT_BOOLEAN, 24, TFS(&tfs_cmd_options), + FT_BOOLEAN, 24, TFS(&tfs_set_notset), XTP_CMD_OPTIONS_DREQ, "", HFILL } }, { &hf_xtp_cmd_options_rclose, { "RCLOSE", "xtp.cmd.options.rclose", - FT_BOOLEAN, 24, TFS(&tfs_cmd_options), + FT_BOOLEAN, 24, TFS(&tfs_set_notset), XTP_CMD_OPTIONS_RCLOSE, "", HFILL } }, { &hf_xtp_cmd_options_wclose, { "WCLOSE", "xtp.cmd.options.wclose", - FT_BOOLEAN, 24, TFS(&tfs_cmd_options), + FT_BOOLEAN, 24, TFS(&tfs_set_notset), XTP_CMD_OPTIONS_WCLOSE, "", HFILL } }, { &hf_xtp_cmd_options_eom, { "EOM", "xtp.cmd.options.eom", - FT_BOOLEAN, 24, TFS(&tfs_cmd_options), + FT_BOOLEAN, 24, TFS(&tfs_set_notset), XTP_CMD_OPTIONS_EOM, "", HFILL } }, { &hf_xtp_cmd_options_end, { "END", "xtp.cmd.options.end", - FT_BOOLEAN, 24, TFS(&tfs_cmd_options), + FT_BOOLEAN, 24, TFS(&tfs_set_notset), XTP_CMD_OPTIONS_END, "", HFILL } }, { &hf_xtp_cmd_options_btag, { "BTAG", "xtp.cmd.options.btag", - FT_BOOLEAN, 24, TFS(&tfs_cmd_options), + FT_BOOLEAN, 24, TFS(&tfs_set_notset), XTP_CMD_OPTIONS_BTAG, "", HFILL } }, { &hf_xtp_cmd_ptype,