Ue TFS & VALS macros for certain 'fieldconvert' fields.
authorBill Meier <wmeier@newsguy.com>
Thu, 6 Mar 2014 02:20:40 +0000 (21:20 -0500)
committerBill Meier <wmeier@newsguy.com>
Thu, 6 Mar 2014 03:19:41 +0000 (03:19 +0000)
Change-Id: I8d7468e62d5de99eb68b554134be71b17d1b87c8
Reviewed-on: https://code.wireshark.org/review/525
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
epan/dissectors/packet-bgp.c
epan/dissectors/packet-devicenet.c
epan/dissectors/packet-ipmi-app.c
epan/dissectors/packet-rfid-pn532.c
epan/dissectors/packet-usb-com.c

index 8e7b7ebe693128f541fcef52fc11742eaaafe87a..590bfad716465512a9f991d600ae04b4c667a692 100644 (file)
@@ -6972,7 +6972,7 @@ proto_register_bgp(void)
           TFS(&tfs_set_notset), BGPNLRI_FSPEC_AND_BIT, NULL, HFILL }},
       { &hf_bgp_flowspec_nlri_op_val_len,
         { "Value length", "bgp.flowspec_nlri.op.val_len", FT_UINT8, BASE_DEC,
-          &flow_spec_op_len_val, BGPNLRI_FSPEC_VAL_LEN, NULL, HFILL }},
+          VALS(&flow_spec_op_len_val), BGPNLRI_FSPEC_VAL_LEN, NULL, HFILL }},
       { &hf_bgp_flowspec_nlri_op_un_bit4,
         { "Reserved", "bgp.flowspec_nlri.op.un_bit4", FT_BOOLEAN, 8,
           TFS(&tfs_set_notset), BGPNLRI_FSPEC_UNUSED_BIT4, "Unused (must be zero)",HFILL}},
index e340ee914d34f6730007f483e26bfcbb69be1cfd..b5c669754e62bc52285e933224b1e2ae2e1ed017 100644 (file)
@@ -855,7 +855,7 @@ void proto_register_devicenet(void)
         },
         { &hf_devicenet_service_code,
             { "Service Code", "devicenet.service",
-            FT_UINT8, BASE_DEC, &devicenet_service_code_vals, CIP_SC_MASK,
+            FT_UINT8, BASE_DEC, VALS(devicenet_service_code_vals), CIP_SC_MASK,
             NULL, HFILL }
         },
         { &hf_devicenet_open_exp_src_message_id,
index 2c54df46c93b0dc343256fb50877da5f54e5631d..9d8e18e501129dcd991a1fafa57373d2bbb8e1ac 100644 (file)
@@ -1328,7 +1328,7 @@ ipmi_register_app(gint proto_ipmi)
 
                { &hf_ipmi_app_38_rq_ipmi20,
                        { "Version compatibility",
-                               "ipmi.app38.rq_ipmi20", FT_UINT8, BASE_DEC, &vals_38_ipmi20, 0x80, NULL, HFILL }},
+                               "ipmi.app38.rq_ipmi20", FT_UINT8, BASE_DEC, VALS(&vals_38_ipmi20), 0x80, NULL, HFILL }},
                { &hf_ipmi_app_38_rq_chan,
                        { "Channel",
                                "ipmi.app38.rq_chan", FT_UINT8, BASE_CUSTOM, ipmi_fmt_channel, 0x0f, NULL, HFILL }},
index f6ded23343271d3661f2b5158a63e66c8715ed1d..7b0bfd646f9bcb539794b9b519d221fb6b0d59bf 100644 (file)
@@ -2068,7 +2068,7 @@ void proto_register_pn532(void)
           NULL, 0x00, NULL, HFILL}},
         {&hf_pn532_field,
          {"Field", "pn532.register.value", FT_BOOLEAN, BASE_NONE,
-          &tfs_present_not_present, 0x00, "Field indicates if an external RF field is present and detected by the PN532", HFILL}},
+          TFS(&tfs_present_not_present), 0x00, "Field indicates if an external RF field is present and detected by the PN532", HFILL}},
         {&hf_pn532_brrx,
          {"Baudrate Rx", "pn532.brrx", FT_UINT8, BASE_HEX,
           VALS(pn532_speed_vals), 0x00, NULL, HFILL}},
@@ -2155,10 +2155,10 @@ void proto_register_pn532(void)
           NULL, 0xFC, NULL, HFILL}},
         {&hf_pn532_next_gi,
          {"Gi", "pn532.next.gi", FT_BOOLEAN, 8,
-          &tfs_present_not_present, 0x02, NULL, HFILL}},
+          TFS(&tfs_present_not_present), 0x02, NULL, HFILL}},
         {&hf_pn532_next_nfc_id_3i,
          {"NFC ID 3i", "pn532.next.nfc_id_3i", FT_BOOLEAN, 8,
-          &tfs_present_not_present, 0x01, NULL, HFILL}},
+          TFS(&tfs_present_not_present), 0x01, NULL, HFILL}},
         {&hf_pn532_nfc_id_3t,
          {"NFC ID 3t", "pn532.nfc_id_3t", FT_BYTES, BASE_NONE,
           NULL, 0x00, NULL, HFILL}},
@@ -2173,13 +2173,13 @@ void proto_register_pn532(void)
           NULL, 0xF8, NULL, HFILL}},
         {&hf_pn532_jump_next_gi,
          {"Gi", "pn532.jump_next.gi", FT_BOOLEAN, 8,
-          &tfs_present_not_present, 0x04, NULL, HFILL}},
+          TFS(&tfs_present_not_present), 0x04, NULL, HFILL}},
         {&hf_pn532_jump_next_nfc_id_3i,
          {"NFC ID 3i", "pn532.jump_next.nfc_id_3i", FT_BOOLEAN, 8,
-          &tfs_present_not_present, 0x02, NULL, HFILL}},
+          TFS(&tfs_present_not_present), 0x02, NULL, HFILL}},
         {&hf_pn532_jump_next_passive_initiator_data,
          {"Passive Initiator Data", "pn532.jump_next.passive_initiator_data", FT_BOOLEAN, 8,
-          &tfs_present_not_present, 0x01, NULL, HFILL}},
+          TFS(&tfs_present_not_present), 0x01, NULL, HFILL}},
         {&hf_pn532_passive_initiator_data,
          {"Passive Initiator Data", "pn532.passive_initiator_data", FT_BYTES, BASE_NONE,
           NULL, 0x00, NULL, HFILL}},
@@ -2272,7 +2272,7 @@ void proto_register_pn532(void)
           NULL, 0x00, NULL, HFILL}},
         {&hf_pn532_diagnose_result,
          {"Result", "pn532.result", FT_BOOLEAN, BASE_NONE,
-          &tfs_ok_error, 0x00, NULL, HFILL}},
+          TFS(&tfs_ok_error), 0x00, NULL, HFILL}},
         {&hf_pn532_andet_bot,
          {"Andet Bot", "pn532.andet.bot", FT_BOOLEAN, 8,
           NULL, 0x80, NULL, HFILL}},
index 9c477de2b4cd00812ded9c175154c7181e69ff5c..c5f34ea7e6d4843135d16b51de493716926b53b6 100644 (file)
@@ -685,16 +685,16 @@ proto_register_usb_com(void)
               NULL, 0xF0, NULL, HFILL }},
         { &hf_usb_com_descriptor_acm_capabilities_network_connection,
             { "Network_Connection", "usbcom.descriptor.acm.capabilities.network_connection", FT_BOOLEAN, 8,
-              &tfs_supported_not_supported, 0x08, NULL, HFILL }},
+              TFS(&tfs_supported_not_supported), 0x08, NULL, HFILL }},
         { &hf_usb_com_descriptor_acm_capabilities_send_break,
             { "Send_Break", "usbcom.descriptor.acm.capabilities.network_connection", FT_BOOLEAN, 8,
-              &tfs_supported_not_supported, 0x04, NULL, HFILL }},
+              TFS(&tfs_supported_not_supported), 0x04, NULL, HFILL }},
         { &hf_usb_com_descriptor_acm_capabilities_line_and_state,
             { "Line Requests and State Notification", "usbcom.descriptor.acm.capabilities.line_and_state", FT_BOOLEAN, 8,
-              &tfs_supported_not_supported, 0x02, NULL, HFILL }},
+              TFS(&tfs_supported_not_supported), 0x02, NULL, HFILL }},
         { &hf_usb_com_descriptor_acm_capabilities_comm_features,
             { "Comm Features Combinations", "usbcom.descriptor.acm.capabilities.comm_features", FT_BOOLEAN, 8,
-              &tfs_supported_not_supported, 0x01, NULL, HFILL }},
+              TFS(&tfs_supported_not_supported), 0x01, NULL, HFILL }},
         { &hf_usb_com_control_interface,
             { "bControlInterface", "usbcom.descriptor.control_interface", FT_UINT8, BASE_HEX,
               NULL, 0, NULL, HFILL }},
@@ -706,10 +706,10 @@ proto_register_usb_com(void)
               NULL, 0xFC, NULL, HFILL }},
         { &hf_usb_com_descriptor_cm_capabilities_call_managment_over_data_class_interface,
             { "Call Managment over Data Class Interface", "usbcom.descriptor.cm.capabilities.call_managment_over_data_class_interface", FT_BOOLEAN, 8,
-              &tfs_supported_not_supported, 0x02, NULL, HFILL }},
+              TFS(&tfs_supported_not_supported), 0x02, NULL, HFILL }},
         { &hf_usb_com_descriptor_cm_capabilities_call_managment,
             { "Call Managment", "usbcom.descriptor.cm.capabilities.call_managment", FT_BOOLEAN, 8,
-              &tfs_supported_not_supported, 0x01, NULL, HFILL }},
+              TFS(&tfs_supported_not_supported), 0x01, NULL, HFILL }},
         { &hf_usb_com_descriptor_cm_data_interface,
             { "bDataInterface", "usbcom.descriptor.cm.data_interface", FT_UINT8, BASE_HEX,
               NULL, 0, NULL, HFILL }},