Minor: use VALS macro (as per convention); Add editor modelines; Do whitespace changes.
authorBill Meier <wmeier@newsguy.com>
Wed, 28 May 2014 00:33:22 +0000 (20:33 -0400)
committerBill Meier <wmeier@newsguy.com>
Wed, 28 May 2014 15:40:39 +0000 (15:40 +0000)
Change-Id: I6007c1b2098d06e4a892474dd07f06a7538f94ef
Reviewed-on: https://code.wireshark.org/review/1843
Reviewed-by: Bill Meier <wmeier@newsguy.com>
24 files changed:
epan/dissectors/packet-adwin-config.c
epan/dissectors/packet-bmc.c
epan/dissectors/packet-cip.c
epan/dissectors/packet-cops.c
epan/dissectors/packet-enip.c
epan/dissectors/packet-giop.c
epan/dissectors/packet-gsm_a_gm.c
epan/dissectors/packet-isakmp.c
epan/dissectors/packet-ismp.c
epan/dissectors/packet-ldss.c
epan/dissectors/packet-lg8979.c
epan/dissectors/packet-nsrp.c
epan/dissectors/packet-openflow_v4.c
epan/dissectors/packet-openflow_v5.c
epan/dissectors/packet-ppp.c
epan/dissectors/packet-pw-fr.c
epan/dissectors/packet-q931.c
epan/dissectors/packet-radius_packetcable.c
epan/dissectors/packet-rohc.c
epan/dissectors/packet-rsl.c
epan/dissectors/packet-rtacser.c
epan/dissectors/packet-srp.c
epan/dissectors/packet-trmac.c
epan/dissectors/packet-xmcp.c

index d6484a889cc48d12644c6f23230877bc29e983e2..4b7d0d7f76eacd74798fb6366bf22d747989667b 100644 (file)
@@ -366,7 +366,7 @@ dissect_TCPFlashUpdate(tvbuff_t *tvb,  packet_info *pinfo _U_, proto_tree *tree,
        length = tvb_length(tvb) - offset;
        proto_tree_add_item(adwin_tree, hf_adwin_config_data, tvb, offset, length, ENC_NA);
 
-    return tvb_length(tvb);
+       return tvb_length(tvb);
 }
 
 /* 00:50:c2:0a:2*:** */
@@ -511,7 +511,7 @@ proto_register_adwin_config(void)
                },
                { &hf_adwin_config_command,
                  { "Command", "adwin_config.command",
-                   FT_UINT32, BASE_DEC, config_command_mapping, 0x0,
+                   FT_UINT32, BASE_DEC, VALS(config_command_mapping), 0x0,
                    NULL, HFILL }
                },
                { &hf_adwin_config_data,
@@ -571,7 +571,7 @@ proto_register_adwin_config(void)
                },
                { &hf_adwin_config_pattern,
                  { "Pattern", "adwin_config.pattern",
-                   FT_UINT32, BASE_HEX, pattern_mapping, 0x0,
+                   FT_UINT32, BASE_HEX, VALS(pattern_mapping), 0x0,
                    NULL, HFILL }
                },
                { &hf_adwin_config_path,
@@ -756,3 +756,17 @@ proto_reg_handoff_adwin_config(void)
        heur_dissector_add("udp", dissect_adwin_config_udp, proto_adwin_config);
        heur_dissector_add("tcp", dissect_adwin_config_tcp, proto_adwin_config);
 }
+
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
index 68134f839128d6b5e06b0ae71c1dd3bab306f60a..cde5f729dd80f7aa418212397ee7c1230273cbc7 100644 (file)
@@ -255,7 +255,7 @@ proto_register_bmc(void)
     static hf_register_info hf[] = {
         { &hf_bmc_message_type,
             { "Message Type", "bmc.message_type",
-            FT_UINT8, BASE_DEC, message_type_vals, 0,
+            FT_UINT8, BASE_DEC, VALS(message_type_vals), 0,
             NULL, HFILL }
         },
         { &hf_bmc_message_id,
@@ -297,7 +297,7 @@ proto_register_bmc(void)
         },
         { &hf_bmc_message_description_type,
             { "Message Description Type", "bmc.message_description_type",
-            FT_UINT8, BASE_DEC, message_description_type_vals, 0,
+            FT_UINT8, BASE_DEC, VALS(message_description_type_vals), 0,
             NULL, HFILL }
         },
         { &hf_bmc_offset_to_ctch_bs_index_of_first_transmission,
@@ -343,3 +343,16 @@ proto_register_bmc(void)
     proto_register_field_array(proto_bmc, hf, array_length(hf));
     proto_register_subtree_array(ett, array_length(ett));
 }
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
index 3a2ba54be5cc1cd6b219ef9e7e1562389826a803..c1b29232eb3b4b322613c32f63285b67e0ff2253 100644 (file)
@@ -6780,7 +6780,7 @@ proto_register_cip(void)
       { &hf_cip_cco_target_config_data, { "Target Config Data", "cip.cco.target_config_data", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
       { &hf_cip_cco_iomap_attribute, { "Attribute Data", "cip.cco.iomap", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
       { &hf_cip_cco_safety, { "Safety Parameters", "cip.cco.safety", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
-      { &hf_cip_cco_change_type, { "Change Type", "cip.cco.change_type", FT_UINT16, BASE_DEC, cip_cco_change_type_vals, 0, NULL, HFILL }},
+      { &hf_cip_cco_change_type, { "Change Type", "cip.cco.change_type", FT_UINT16, BASE_DEC, VALS(cip_cco_change_type_vals), 0, NULL, HFILL }},
    };
 
    /* Setup protocol subtree array */
index 99c612719976acaffe399ff706b611964080ba89..f9cd4f021fb2ebf17eaf5eefb04070be5d1f78eb 100644 (file)
@@ -2442,12 +2442,12 @@ void proto_register_cops(void)
         },
         { &hf_cops_pcmm_classifier_activation_state,
           { "Activation State", "cops.pc_mm_classifier_activation_state",
-            FT_UINT8, BASE_HEX, pcmm_activation_state_vals, 0,
+            FT_UINT8, BASE_HEX, VALS(pcmm_activation_state_vals), 0,
             "PacketCable Multimedia Classifier Activation State", HFILL }
         },
         { &hf_cops_pcmm_classifier_action,
           { "Action", "cops.pc_mm_classifier_action",
-            FT_UINT8, BASE_HEX, pcmm_action_vals, 0,
+            FT_UINT8, BASE_HEX, VALS(pcmm_action_vals), 0,
             "PacketCable Multimedia Classifier Action", HFILL }
         },
         { &hf_cops_pcmm_classifier_flags,
@@ -2508,7 +2508,7 @@ void proto_register_cops(void)
         },
         { &hf_cops_pcmm_flow_spec_service_number,
           { "Service Number", "cops.pc_mm_fs_svc_num",
-            FT_UINT8, BASE_DEC, pcmm_flow_spec_service_vals, 0,
+            FT_UINT8, BASE_DEC, VALS(pcmm_flow_spec_service_vals), 0,
             "PacketCable Multimedia Flow Spec Service Number", HFILL }
         },
 
@@ -2690,12 +2690,12 @@ void proto_register_cops(void)
 
         { &hf_cops_pcmm_synch_options_report_type,
           { "Report Type", "cops.pc_mm_synch_options_report_type",
-            FT_UINT8, BASE_DEC, pcmm_report_type_vals, 0,
+            FT_UINT8, BASE_DEC, VALS(pcmm_report_type_vals), 0,
             "PacketCable Multimedia Synch Options Report Type", HFILL }
         },
         { &hf_cops_pcmm_synch_options_synch_type,
           { "Synch Type", "cops.pc_mm_synch_options_synch_type",
-            FT_UINT8, BASE_DEC, pcmm_synch_type_vals, 0,
+            FT_UINT8, BASE_DEC, VALS(pcmm_synch_type_vals), 0,
             "PacketCable Multimedia Synch Options Synch Type", HFILL }
         },
 
@@ -6259,3 +6259,16 @@ cops_analyze_packetcable_mm_obj(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
 
 
 /* End of PacketCable Addition */
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
index 7ad7d2fa7709c6bebdfffccfbb9c018342995c90..0ebe2bbdedf9c777e2b693923bf7beee75993583 100644 (file)
@@ -2783,7 +2783,7 @@ proto_register_enip(void)
 
       { &hf_tcpip_status_interface_config,
         { "Interface Configuration Status", "cip.tcpip.status.interface_config",
-          FT_UINT32, BASE_DEC, enip_tcpip_status_interface_config_vals, 0x0000000F,
+          FT_UINT32, BASE_DEC, VALS(enip_tcpip_status_interface_config_vals), 0x0000000F,
           NULL, HFILL }},
 
       { &hf_tcpip_status_mcast_pending,
@@ -2798,7 +2798,7 @@ proto_register_enip(void)
 
       { &hf_tcpip_status_acd,
         { "ACD Status", "cip.tcpip.status.acd",
-          FT_UINT32, BASE_DEC, enip_tcpip_status_acd_vals, 0x00000040,
+          FT_UINT32, BASE_DEC, VALS(enip_tcpip_status_acd_vals), 0x00000040,
           NULL, HFILL }},
 
       { &hf_tcpip_status_reserved,
@@ -2863,7 +2863,7 @@ proto_register_enip(void)
 
       { &hf_tcpip_config_control_config,
         { "Configuration Method", "cip.tcpip.config_control.config",
-          FT_UINT32, BASE_DEC, enip_tcpip_config_control_config_vals, 0x0000000F,
+          FT_UINT32, BASE_DEC, VALS(enip_tcpip_config_control_config_vals), 0x0000000F,
           NULL, HFILL }},
 
       { &hf_tcpip_config_control_dns,
@@ -2923,7 +2923,7 @@ proto_register_enip(void)
 
       { &hf_tcpip_mcast_alloc,
         { "Alloc Control", "cip.tcpip.mcast.alloc",
-          FT_UINT8, BASE_DEC, enip_tcpip_mcast_alloc_vals, 0,
+          FT_UINT8, BASE_DEC, VALS(enip_tcpip_mcast_alloc_vals), 0,
           NULL, HFILL }},
 
       { &hf_tcpip_mcast_reserved,
@@ -2948,7 +2948,7 @@ proto_register_enip(void)
 
       { &hf_tcpip_lcd_acd_activity,
         { "ACD Activity", "cip.tcpip.last_conflict.acd_activity",
-          FT_UINT8, BASE_DEC, enip_tcpip_acd_activity_vals, 0,
+          FT_UINT8, BASE_DEC, VALS(enip_tcpip_acd_activity_vals), 0,
           NULL, HFILL }},
 
       { &hf_tcpip_lcd_remote_mac,
@@ -2984,22 +2984,22 @@ proto_register_enip(void)
 
       { &hf_elink_iflags_duplex,
         { "Duplex", "cip.elink.iflags.duplex",
-          FT_UINT32, BASE_DEC, enip_elink_duplex_vals, 0x00000002,
+          FT_UINT32, BASE_DEC, VALS(enip_elink_duplex_vals), 0x00000002,
           NULL, HFILL }},
 
       { &hf_elink_iflags_neg_status,
         { "Negotiation Status", "cip.elink.iflags.neg_status",
-          FT_UINT32, BASE_DEC, enip_elink_iflags_neg_status_vals, 0x0000001C,
+          FT_UINT32, BASE_DEC, VALS(enip_elink_iflags_neg_status_vals), 0x0000001C,
           NULL, HFILL }},
 
       { &hf_elink_iflags_manual_reset,
         { "Manual Reset Required", "cip.elink.iflags.manual_reset",
-          FT_UINT32, BASE_DEC, enip_elink_iflags_reset_vals, 0x00000020,
+          FT_UINT32, BASE_DEC, VALS(enip_elink_iflags_reset_vals), 0x00000020,
           NULL, HFILL }},
 
       { &hf_elink_iflags_local_hw_fault,
         { "Local Hardware Fault", "cip.elink.iflags.local_hw_fault",
-          FT_UINT32, BASE_DEC, enip_elink_iflags_hw_fault_vals, 0x00000040,
+          FT_UINT32, BASE_DEC, VALS(enip_elink_iflags_hw_fault_vals), 0x00000040,
           NULL, HFILL }},
 
       { &hf_elink_iflags_reserved,
@@ -3139,7 +3139,7 @@ proto_register_enip(void)
 
       { &hf_elink_icontrol_control_bits_forced_duplex,
         { "Forced Duplex Mode", "cip.elink.icontrol.control_bits.forced_duplex",
-          FT_UINT16, BASE_DEC, enip_elink_duplex_vals, 0x0002,
+          FT_UINT16, BASE_DEC, VALS(enip_elink_duplex_vals), 0x0002,
           NULL, HFILL }},
 
       { &hf_elink_icontrol_control_bits_reserved,
@@ -3154,17 +3154,17 @@ proto_register_enip(void)
 
       { &hf_elink_interface_type,
         { "Interface Type", "cip.elink.interface_type",
-          FT_UINT8, BASE_DEC, enip_elink_interface_type_vals, 0,
+          FT_UINT8, BASE_DEC, VALS(enip_elink_interface_type_vals), 0,
           NULL, HFILL }},
 
       { &hf_elink_interface_state,
         { "Interface State", "cip.elink.interface_state",
-          FT_UINT8, BASE_DEC, enip_elink_interface_state_vals, 0,
+          FT_UINT8, BASE_DEC, VALS(enip_elink_interface_state_vals), 0,
           NULL, HFILL }},
 
       { &hf_elink_admin_state,
         { "Admin State", "cip.elink.admin_state",
-          FT_UINT8, BASE_DEC, enip_elink_admin_state_vals, 0,
+          FT_UINT8, BASE_DEC, VALS(enip_elink_admin_state_vals), 0,
           NULL, HFILL }},
 
       { &hf_elink_interface_label,
@@ -3215,17 +3215,17 @@ proto_register_enip(void)
 
       { &hf_dlr_network_topology,
         { "Network Topology", "cip.dlr.network_topology",
-          FT_UINT8, BASE_DEC, enip_dlr_network_topology_vals, 0,
+          FT_UINT8, BASE_DEC, VALS(enip_dlr_network_topology_vals), 0,
           NULL, HFILL }},
 
       { &hf_dlr_network_status,
         { "Network Status", "cip.dlr.network_status",
-          FT_UINT8, BASE_DEC, enip_dlr_network_status_vals, 0,
+          FT_UINT8, BASE_DEC, VALS(enip_dlr_network_status_vals), 0,
           NULL, HFILL }},
 
       { &hf_dlr_ring_supervisor_status,
         { "Ring Supervisor Status", "cip.dlr.ring_supervisor_status",
-          FT_UINT8, BASE_DEC, enip_dlr_ring_supervisor_status_vals, 0,
+          FT_UINT8, BASE_DEC, VALS(enip_dlr_ring_supervisor_status_vals), 0,
           NULL, HFILL }},
 
       { &hf_dlr_rsc_ring_supervisor_enable,
@@ -3375,7 +3375,7 @@ proto_register_enip(void)
 
       { &hf_dlr_redundant_gateway_status,
         { "Redundant Gateway Status", "cip.dlr.redundant_gateway_status",
-          FT_UINT8, BASE_DEC, enip_dlr_redundant_gateway_status_vals, 0,
+          FT_UINT8, BASE_DEC, VALS(enip_dlr_redundant_gateway_status_vals), 0,
           NULL, HFILL }},
 
       { &hf_dlr_aga_ip_addr,
index e0b74e4756e131e61a55c898d12a6eada88efdfd..58d2b5d976892703d4548fdaf85143ad4ff2664c 100644 (file)
@@ -5010,7 +5010,7 @@ proto_register_giop (void)
 
     { &hf_giop_message_type,
       { "Message type", "giop.type",
-        FT_UINT8, BASE_DEC, giop_message_types, 0x0, NULL, HFILL }
+        FT_UINT8, BASE_DEC, VALS(giop_message_types), 0x0, NULL, HFILL }
     },
 
     { &hf_giop_message_size,
index c41d4bddb5a08cfe1c5dec66f188894b0b803c4c..17970634e61f5d762fa94089de2c557acc6e2211 100644 (file)
@@ -3438,8 +3438,8 @@ de_gmm_voice_domain_pref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_
 
 /* [10] 10.5.5.29 P-TMSI type */
 static const true_false_string gsm_a_gm_ptmsi_type_value = {
-    "Mapped P-TMSI",
-    "Native P-TMSI"
+       "Mapped P-TMSI",
+       "Native P-TMSI"
 };
 
 static guint16
@@ -7224,7 +7224,7 @@ proto_register_gsm_a_gm(void)
                },
                { &hf_gsm_a_sm_tft_protocol_header,
                  { "Protocol/header", "gsm_a.gm.sm.tft.protocol_header",
-                   FT_UINT8, BASE_HEX|BASE_EXT_STRING, (&ipproto_val_ext), 0x0,
+                   FT_UINT8, BASE_HEX|BASE_EXT_STRING, &ipproto_val_ext, 0x0,
                    NULL, HFILL }
                },
                { &hf_gsm_a_sm_tft_port,
@@ -8159,11 +8159,11 @@ proto_register_gsm_a_gm(void)
                },
        };
 
-    static ei_register_info ei[] = {
-        { &ei_gsm_a_gm_extraneous_data, { "gsm_a.gm.extraneous_data", PI_PROTOCOL, PI_NOTE, "Extraneous Data, dissector bug or later version spec(report to wireshark.org)", EXPFILL }},
-    };
+       static ei_register_info ei[] = {
+               { &ei_gsm_a_gm_extraneous_data, { "gsm_a.gm.extraneous_data", PI_PROTOCOL, PI_NOTE, "Extraneous Data, dissector bug or later version spec(report to wireshark.org)", EXPFILL }},
+       };
 
-    expert_module_t* expert_gsm_a_gm;
+       expert_module_t* expert_gsm_a_gm;
 
        /* Setup protocol subtree array */
 #define        NUM_INDIVIDUAL_ELEMS    7
@@ -8205,8 +8205,8 @@ proto_register_gsm_a_gm(void)
        proto_register_field_array(proto_a_gm, hf, array_length(hf));
 
        proto_register_subtree_array(ett, array_length(ett));
-    expert_gsm_a_gm = expert_register_protocol(proto_a_gm);
-    expert_register_field_array(expert_gsm_a_gm, ei, array_length(ei));
+       expert_gsm_a_gm = expert_register_protocol(proto_a_gm);
+       expert_register_field_array(expert_gsm_a_gm, ei, array_length(ei));
 
        /* subdissector code */
        gprs_sm_pco_subdissector_table = register_dissector_table("sm_pco.protocol",
@@ -8220,3 +8220,16 @@ proto_reg_handoff_gsm_a_gm(void)
        rrc_irat_ho_info_handle = find_dissector("rrc.irat.irat_ho_info");
        lte_rrc_ue_eutra_cap_handle = find_dissector("lte-rrc.ue_eutra_cap");
 }
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
index 51d86bcab0d4bf505e01eb127748715b9ebc7fc1..b9fe3310d4974837bd91ff81fb0475155e07e026 100644 (file)
@@ -5205,7 +5205,7 @@ proto_register_isakmp(void)
         "ISAKMP (v2) ID Type", HFILL }},
     { &hf_isakmp_id_protoid,
       { "Protocol ID", "isakmp.id.protoid",
-        FT_UINT8, BASE_DEC|BASE_EXT_STRING, (&ipproto_val_ext), 0x0,
+        FT_UINT8, BASE_DEC|BASE_EXT_STRING, &ipproto_val_ext, 0x0,
         "ISAKMP ID Protocol ID", HFILL }},
     { &hf_isakmp_id_port,
       { "Port", "isakmp.id.port",
@@ -5527,7 +5527,7 @@ proto_register_isakmp(void)
         NULL, HFILL }},
     { &hf_isakmp_ts_protoid,
       { "Protocol ID", "isakmp.ts.protoid",
-        FT_UINT8, BASE_DEC|BASE_EXT_STRING, (&ipproto_val_ext), 0x0,
+        FT_UINT8, BASE_DEC|BASE_EXT_STRING, &ipproto_val_ext, 0x0,
         "IKEv2 Traffic Selector Protocol ID", HFILL }},
     { &hf_isakmp_ts_selector_length,
       { "Selector Length", "isakmp.ts.selector_length",
index 69b6aece2de2c6ea6c43b038d04d1c13c206a371..19fd34d052ce021c35fbee6df45b351b82d40ddd 100644 (file)
@@ -126,19 +126,19 @@ static gint ett_ismp_edp_tuples_leaf = -1;
 
 
 static const value_string edp_device_types[] = {
-        { EDP_DEVICE_TYPE_SFS17,       "Network Switch running SecureFast version 1.7 or lower" },
-        { EDP_DEVICE_TYPE_SFS18,         "Network Switch running SecureFast version 1.8 or greater" },
-        { EDP_DEVICE_TYPE_ROUTER,         "Router" },
-        { EDP_DEVICE_TYPE_BRIDGE,         "Bridge" },
-        { EDP_DEVICE_TYPE_VLANMAN,         "Cabletron VLAN Manager" },
-        { EDP_DEVICE_TYPE_NTSERVER,         "Network Server (NT)" },
-        { EDP_DEVICE_TYPE_NTCLIENT,    "Network Workstation (NT)" },
-        { EDP_DEVICE_TYPE_WIN95,     "Windows95" },
-        { EDP_DEVICE_TYPE_WIN98,        "Windows98" },
-        { EDP_DEVICE_TYPE_UNIXSERVER,       "UNIX Server" },
-        { EDP_DEVICE_TYPE_UNIXCLIENT, "UNIX Workstation" },
-        { EDP_DEVICE_TYPE_ACCESSPOINT,     "Roamabout wireless access point" },
-        { 0,                    NULL },
+       { EDP_DEVICE_TYPE_SFS17,       "Network Switch running SecureFast version 1.7 or lower" },
+       { EDP_DEVICE_TYPE_SFS18,       "Network Switch running SecureFast version 1.8 or greater" },
+       { EDP_DEVICE_TYPE_ROUTER,      "Router" },
+       { EDP_DEVICE_TYPE_BRIDGE,      "Bridge" },
+       { EDP_DEVICE_TYPE_VLANMAN,     "Cabletron VLAN Manager" },
+       { EDP_DEVICE_TYPE_NTSERVER,    "Network Server (NT)" },
+       { EDP_DEVICE_TYPE_NTCLIENT,    "Network Workstation (NT)" },
+       { EDP_DEVICE_TYPE_WIN95,       "Windows95" },
+       { EDP_DEVICE_TYPE_WIN98,       "Windows98" },
+       { EDP_DEVICE_TYPE_UNIXSERVER,  "UNIX Server" },
+       { EDP_DEVICE_TYPE_UNIXCLIENT,  "UNIX Workstation" },
+       { EDP_DEVICE_TYPE_ACCESSPOINT, "Roamabout wireless access point" },
+       { 0,                    NULL },
 };
 
 
@@ -207,8 +207,8 @@ static const value_string edp_tuple_types[] =
 
 /* Is value set? */
 static const true_false_string is_set = {
-        "set",
-        "not set"
+       "set",
+       "not set"
 };
 
 
@@ -605,7 +605,7 @@ proto_register_ismp(void)
                },
                { &hf_ismp_edp_device_type,
                        { "Device Type", "ismp.edp.devtype",
-                       FT_UINT16, BASE_DEC, edp_device_types, 0x0,
+                       FT_UINT16, BASE_DEC, VALS(edp_device_types), 0x0,
                        NULL, HFILL }
                },
                { &hf_ismp_edp_module_rev,
@@ -864,3 +864,16 @@ proto_reg_handoff_ismp(void)
            proto_ismp);
        dissector_add_uint("ethertype", ETHERTYPE_ISMP, ismp_handle);
 }
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
index 8fd83c1c8b6343b38e88cbc0c45ca36a0fe2c373..29b69e72744a74b8358d91aa761ac9dccaa6bc4d 100644 (file)
@@ -830,28 +830,28 @@ proto_register_ldss (void) {
                {   &hf_ldss_message_id,
                    {   "LDSS Message ID",
                        "ldss.message_id",
-                       FT_UINT16, BASE_DEC, ldss_message_id_value, 0x0,
+                       FT_UINT16, BASE_DEC, VALS(ldss_message_id_value), 0x0,
                        NULL, HFILL
                    }
                },
                {   &hf_ldss_message_detail,
                    {   "Inferred meaning",
                        "ldss.inferred_meaning",
-                       FT_UINT16, BASE_DEC, ldss_inferred_value, 0x0,
+                       FT_UINT16, BASE_DEC, VALS(ldss_inferred_value), 0x0,
                        "Inferred meaning of the packet", HFILL
                    }
                },
                {   &hf_ldss_digest_type,
                    {   "Digest Type",
                        "ldss.digest_type",
-                       FT_UINT8, BASE_DEC, ldss_digest_type_value, 0x0,
+                       FT_UINT8, BASE_DEC, VALS(ldss_digest_type_value), 0x0,
                        NULL, HFILL
                    }
                },
                {   &hf_ldss_compression,
                    {   "Compressed Format",
                        "ldss.compression",
-                       FT_UINT8, BASE_DEC, ldss_compression_value, 0x0,
+                       FT_UINT8, BASE_DEC, VALS(ldss_compression_value), 0x0,
                        NULL, HFILL
                    }
                },
@@ -1009,3 +1009,16 @@ proto_reg_handoff_ldss (void)
        dissector_add_uint("udp.port", global_udp_port_ldss, ldss_udp_handle);
        saved_udp_port_ldss = global_udp_port_ldss;
 }
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
index 5a9a492bae6f9ca61440f48bf56fac7e78902ab3..12c1aeb52a0a47f5f1e12aad9faf5cf0bf553e1c 100644 (file)
@@ -1431,17 +1431,17 @@ proto_register_lg8979(void)
         { &hf_lg8979_ang_output_val,
         { "Point Value", "lg8979.ang_output_val", FT_UINT16, BASE_DEC, NULL, 0x0FFF, NULL, HFILL }},
         { &hf_lg8979_sbo_tripclose,
-        { "Trip/Close Control Code", "lg8979.sbo_tripclose", FT_UINT8, BASE_DEC, lg8979_sbo_tripclose_vals, 0x80, NULL, HFILL }},
+        { "Trip/Close Control Code", "lg8979.sbo_tripclose", FT_UINT8, BASE_DEC, VALS(lg8979_sbo_tripclose_vals), 0x80, NULL, HFILL }},
         { &hf_lg8979_sbo_timercnt,
         { "Timer Count", "lg8979.sbo_timercnt", FT_UINT8, BASE_DEC, NULL, 0x7F, NULL, HFILL }},
         { &hf_lg8979_digout_data,
         { "Data", "lg8979.digout_data", FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL }},
         { &hf_lg8979_pul_output_base,
-        { "Base Time", "lg8979.pul_output_base", FT_UINT8, BASE_HEX, lg8979_pul_output_base_vals, 0x03, NULL, HFILL }},
+        { "Base Time", "lg8979.pul_output_base", FT_UINT8, BASE_HEX, VALS(lg8979_pul_output_base_vals), 0x03, NULL, HFILL }},
         { &hf_lg8979_pul_output_dur,
         { "Duration", "lg8979.pul_output_dur", FT_UINT8, BASE_HEX, NULL, 0x7C, NULL, HFILL }},
         { &hf_lg8979_pul_output_rl,
-        { "Raise/Lower", "lg8979.pul_output_rl", FT_UINT8, BASE_HEX, lg8979_pul_output_rl_vals, 0x80, NULL, HFILL }},
+        { "Raise/Lower", "lg8979.pul_output_rl", FT_UINT8, BASE_HEX, VALS(lg8979_pul_output_rl_vals), 0x80, NULL, HFILL }},
         { &hf_lg8979_ang_deadband,
         { "Deadband", "lg8979.ang_deadband", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
         { &hf_lg8979_acc_preset,
@@ -1451,7 +1451,7 @@ proto_register_lg8979(void)
         { &hf_lg8979_rtucfg_chassis_num,
         { "Chassis Number", "lg8979.rtucfg_chassis_num", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
         { &hf_lg8979_rtucfg_card_slot,
-        { "Card Code", "lg8979.rtucfg_card_slot", FT_UINT8, BASE_DEC, lg8979_cardcode_vals, 0x0, NULL, HFILL }},
+        { "Card Code", "lg8979.rtucfg_card_slot", FT_UINT8, BASE_DEC, VALS(lg8979_cardcode_vals), 0x0, NULL, HFILL }},
         { &hf_lg8979_timesync_mon,
         { "Month", "lg8979.timesync_mon", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
         { &hf_lg8979_timesync_day,
@@ -1471,7 +1471,7 @@ proto_register_lg8979(void)
         { &hf_lg8979_timebias_proctime,
         { "Time Bias Processing Time (ms)", "lg8979.timebias_proctime", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
         { &hf_lg8979_exprpt_code,
-        { "Exception Report Code", "lg8979.exprpt_code", FT_UINT8, BASE_DEC, lg8979_exprpt_code_vals, 0x0, NULL, HFILL }},
+        { "Exception Report Code", "lg8979.exprpt_code", FT_UINT8, BASE_DEC, VALS(lg8979_exprpt_code_vals), 0x0, NULL, HFILL }},
         { &hf_lg8979_exprpt_parm,
         { "Value", "lg8979.exprpt_parm", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
         { &hf_lg8979_crc16,
index 3389fd5ede23e33859598bed71c1fed02ec63045..680749de31e586c20e2e3c5019bc87f4dd244ac2 100644 (file)
@@ -94,52 +94,52 @@ static int hf_nsrp_data = -1;
 
 
 static const value_string nsrp_msg_type_vals[] = {
-       { 0x01, "HA MESSAGE" },
-       { 0x02, "MNG MESSAGE" },
-       { 0x03, "DADA MESSAGE" },
-       { 0,                    NULL }
+    { 0x01,     "HA MESSAGE" },
+    { 0x02,     "MNG MESSAGE" },
+    { 0x03,     "DADA MESSAGE" },
+    { 0,                        NULL }
 };
 
 static const value_string nsrp_msgtype_vals[] = {
-       { 0x01, "CREATE SESSION" },
-       { 0x02, "CLOSE SESSION" },
-       { 0x03, "CHANG SESSION" },
-       { 0x04, "CREATE SP SESSION" },
-       { 0x05, "SYS CONFIG" },
-       { 0x06, "FILE SYS" },
-       { 0x07, "CMD WEB" },
-       { 0x08, "SAVE SLAVE" },
-       { 0x09, "VPN SPI" },
-       { 0x0a, "ARP" },
-       { 0x0b, "HEALTH CHECK" },
-       { 0x0c, "EMW DATA" },
-       { 0x0d, "INVITE SYNC" },
-       { 0x0e, "DOWNLOAD CONFIG" },
-       { 0x0f, "L2TP TUNL CREATE" },
-       { 0x10, "L2TP TUNL DELETE" },
-       { 0x11, "L2TP CALL CREATE" },
-       { 0x12, "L2TP CALL DELETE" },
-       { 0x13, "PKI SYNC" },
-       { 0x14, "VPN SEQ" },
-       { 0x15, "MAX" },
-       { 0,                    NULL }
+    { 0x01,     "CREATE SESSION" },
+    { 0x02,     "CLOSE SESSION" },
+    { 0x03,     "CHANG SESSION" },
+    { 0x04,     "CREATE SP SESSION" },
+    { 0x05,     "SYS CONFIG" },
+    { 0x06,     "FILE SYS" },
+    { 0x07,     "CMD WEB" },
+    { 0x08,     "SAVE SLAVE" },
+    { 0x09,     "VPN SPI" },
+    { 0x0a,     "ARP" },
+    { 0x0b,     "HEALTH CHECK" },
+    { 0x0c,     "EMW DATA" },
+    { 0x0d,     "INVITE SYNC" },
+    { 0x0e,     "DOWNLOAD CONFIG" },
+    { 0x0f,     "L2TP TUNL CREATE" },
+    { 0x10,     "L2TP TUNL DELETE" },
+    { 0x11,     "L2TP CALL CREATE" },
+    { 0x12,     "L2TP CALL DELETE" },
+    { 0x13,     "PKI SYNC" },
+    { 0x14,     "VPN SEQ" },
+    { 0x15,     "MAX" },
+    { 0,                        NULL }
 };
 
 static const value_string nsrp_flag_vals[] = {
-       { 0x80, "ENCRPT MESSAGE" },
-       { 0x40, "CLOSE SESSION" },
-       { 0x20, "CHANG SESSION" },
-       { 0x10, "CREATE SP SESSION" },
-       { 0x08, "SYS CONFIG" },
-       { 0x04, "FILE SYS" },
-       { 0x02, "CMD WEB" },
-       { 0,                    NULL }
+    { 0x80,     "ENCRPT MESSAGE" },
+    { 0x40,     "CLOSE SESSION" },
+    { 0x20,     "CHANG SESSION" },
+    { 0x10,     "CREATE SP SESSION" },
+    { 0x08,     "SYS CONFIG" },
+    { 0x04,     "FILE SYS" },
+    { 0x02,     "CMD WEB" },
+    { 0,                        NULL }
 };
 
 static const value_string nsrp_encflag_vals[] = {
-       { 0xf0, "ENCRYPT METHOD MASK" },
-       { 0x0f, "ENCRYPT PAD BIT MASK" },
-       { 0,                    NULL }
+    { 0xf0,     "ENCRYPT METHOD MASK" },
+    { 0x0f,     "ENCRYPT PAD BIT MASK" },
+    { 0,                        NULL }
 };
 
 
@@ -160,38 +160,38 @@ dissect_nsrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     col_set_str(pinfo->cinfo, COL_INFO, "NSRP Protocol");
 
     if (tree) {
-                       ti = proto_tree_add_item(tree, proto_nsrp, tvb, 0, -1, ENC_NA);
-                       nsrp_tree = proto_item_add_subtree(ti, ett_nsrp);
+        ti = proto_tree_add_item(tree, proto_nsrp, tvb, 0, -1, ENC_NA);
+        nsrp_tree = proto_item_add_subtree(ti, ett_nsrp);
 
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_version, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_version, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       msgtype = tvb_get_guint8(tvb, offset);
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        msgtype = tvb_get_guint8(tvb, offset);
+        proto_tree_add_item(nsrp_tree, hf_nsrp_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_clust_id, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_clust_id, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_msg_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_msg_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_len, tvb, offset, 2, ENC_BIG_ENDIAN);
-                       offset += 2;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_len, tvb, offset, 2, ENC_BIG_ENDIAN);
+        offset += 2;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_ha_port, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_ha_port, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_not_used, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_not_used, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_dst_unit, tvb, offset, 4, ENC_BIG_ENDIAN);
-                       offset += 4;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_dst_unit, tvb, offset, 4, ENC_BIG_ENDIAN);
+        offset += 4;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_src_unit, tvb, offset, 4, ENC_BIG_ENDIAN);
-                       offset += 4;
-               }
+        proto_tree_add_item(nsrp_tree, hf_nsrp_src_unit, tvb, offset, 4, ENC_BIG_ENDIAN);
+        offset += 4;
+    }
 
 /*
  *
@@ -210,45 +210,45 @@ dissect_nsrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
  *
  */
 
-               if ( msgtype == 0x00 ) {
+    if ( msgtype == 0x00 ) {
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_msgtype, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_msgtype, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_wst_group, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_wst_group, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_hst_group, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_hst_group, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_msgflag, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_msgflag, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_msglen, tvb, offset, 2, ENC_BIG_ENDIAN);
-                       offset += 2;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_msglen, tvb, offset, 2, ENC_BIG_ENDIAN);
+        offset += 2;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_encflag, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_encflag, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_not_used, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_not_used, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_total_size, tvb, offset, 4, ENC_BIG_ENDIAN);
-                       offset += 4;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_total_size, tvb, offset, 4, ENC_BIG_ENDIAN);
+        offset += 4;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_ns, tvb, offset, 2, ENC_BIG_ENDIAN);
-                       offset += 2;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_ns, tvb, offset, 2, ENC_BIG_ENDIAN);
+        offset += 2;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_nr, tvb, offset, 2, ENC_BIG_ENDIAN);
-                       offset += 2;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_nr, tvb, offset, 2, ENC_BIG_ENDIAN);
+        offset += 2;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_no_used, tvb, offset, 2, ENC_BIG_ENDIAN);
-                       offset += 2;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_no_used, tvb, offset, 2, ENC_BIG_ENDIAN);
+        offset += 2;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_checksum, tvb, offset, 2, ENC_BIG_ENDIAN);
-                       offset += 2;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_checksum, tvb, offset, 2, ENC_BIG_ENDIAN);
+        offset += 2;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_data, tvb, offset, -1, ENC_ASCII|ENC_NA);
+        proto_tree_add_item(nsrp_tree, hf_nsrp_data, tvb, offset, -1, ENC_ASCII|ENC_NA);
 
     }
 
@@ -266,39 +266,39 @@ dissect_nsrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
  *
  */
 
-               if ( msgtype == 0x02 ) {
+    if ( msgtype == 0x02 ) {
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_msgtype, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_msgtype, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_wst_group, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_wst_group, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_hst_group, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_hst_group, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_msgflag, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_msgflag, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_msglen, tvb, offset, 2, ENC_BIG_ENDIAN);
-                       offset += 2;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_msglen, tvb, offset, 2, ENC_BIG_ENDIAN);
+        offset += 2;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_authflag, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_authflag, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_not_used, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_not_used, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_priority, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_priority, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_dummy, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_dummy, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_authchecksum, tvb, offset, 2, ENC_BIG_ENDIAN);
-                       offset += 2;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_authchecksum, tvb, offset, 2, ENC_BIG_ENDIAN);
+        offset += 2;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_data, tvb, offset, -1, ENC_ASCII|ENC_NA);
+        proto_tree_add_item(nsrp_tree, hf_nsrp_data, tvb, offset, -1, ENC_ASCII|ENC_NA);
 
     }
 
@@ -317,33 +317,33 @@ dissect_nsrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
  *
  *
  */
-   if ( msgtype == 0x03 ) {
+    if ( msgtype == 0x03 ) {
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_msgtype, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_msgtype, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_wst_group, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_wst_group, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_hst_group, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_hst_group, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_msgflag, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_msgflag, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_msglen, tvb, offset, 2, ENC_BIG_ENDIAN);
-                       offset += 2;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_msglen, tvb, offset, 2, ENC_BIG_ENDIAN);
+        offset += 2;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_ifnum, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_ifnum, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_not_used, tvb, offset, 1, ENC_BIG_ENDIAN);
-                       offset += 1;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_not_used, tvb, offset, 1, ENC_BIG_ENDIAN);
+        offset += 1;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_total_size, tvb, offset, 4, ENC_BIG_ENDIAN);
-                       offset += 4;
+        proto_tree_add_item(nsrp_tree, hf_nsrp_total_size, tvb, offset, 4, ENC_BIG_ENDIAN);
+        offset += 4;
 
-                       proto_tree_add_item(nsrp_tree, hf_nsrp_data, tvb, offset, -1, ENC_ASCII|ENC_NA);
+        proto_tree_add_item(nsrp_tree, hf_nsrp_data, tvb, offset, -1, ENC_ASCII|ENC_NA);
 
     }
 
@@ -355,152 +355,152 @@ proto_register_nsrp(void)
 {
 
     static hf_register_info hf[] = {
-       { &hf_nsrp_version,
-         { "Version", "nsrp.version",
-           FT_UINT8, BASE_DEC, NULL, 0,
-           "NSRP Version", HFILL }
-       },
-               { &hf_nsrp_msg_type,
-         { "Type", "nsrp.type",
-           FT_UINT8, BASE_DEC, nsrp_msg_type_vals, 0,
-           "NSRP Message Type", HFILL }
-       },
-               { &hf_nsrp_clust_id,
-         { "Clust ID", "nsrp.clustid",
-           FT_UINT8, BASE_DEC, NULL, 0,
-           "NSRP CLUST ID", HFILL }
-       },
-               { &hf_nsrp_msg_flag,
-         { "Flag", "nsrp.flag",
-           FT_UINT8, BASE_DEC, NULL, 0,
-           "NSRP FLAG", HFILL }
-       },
-       { &hf_nsrp_len,
-         { "Length", "nsrp.length",
-           FT_UINT16, BASE_DEC, NULL, 0,
-           "NSRP Length", HFILL }
-       },
-               { &hf_nsrp_ha_port,
-         { "Port", "nsrp.haport",
-           FT_UINT8, BASE_DEC, NULL, 0,
-           "NSRP HA Port", HFILL }
-       },
-               { &hf_nsrp_not_used,
-         { "Not used", "nsrp.notused",
-           FT_UINT8, BASE_DEC, NULL, 0,
-           NULL, HFILL }
-       },
-               { &hf_nsrp_dst_unit,
-         { "Destination", "nsrp.dst",
-           FT_UINT32, BASE_DEC, NULL, 0,
-           "DESTINATION UNIT INFORMATION", HFILL }
-       },
-       { &hf_nsrp_src_unit,
-         { "Source", "nsrp.src",
-           FT_UINT32, BASE_DEC, NULL, 0,
-           "SOURCE UNIT INFORMATION", HFILL }
-       },
-               { &hf_nsrp_msgtype,
-         { "MsgType", "nsrp.msgtype",
-           FT_UINT8, BASE_DEC, VALS(nsrp_msgtype_vals), 0,
-           "Message Type", HFILL }
-       },
-               { &hf_nsrp_wst_group,
-         { "Wst group", "nsrp.wst",
-           FT_UINT8, BASE_DEC, NULL, 0,
-           "NSRP WST GROUP", HFILL }
-       },
-               { &hf_nsrp_hst_group,
-         { "Hst group", "nsrp.hst",
-           FT_UINT8, BASE_DEC, NULL, 0,
-           "NSRP HST GROUP", HFILL }
-       },
-       { &hf_nsrp_msgflag,
-         { "Msgflag", "nsrp.msgflag",
-           FT_UINT8, BASE_DEC, VALS(nsrp_flag_vals), 0,
-           "NSRP MSG FLAG", HFILL }
-       },
-       { &hf_nsrp_msglen,
-         { "Msg Length", "nsrp.msglen",
-           FT_UINT16, BASE_DEC, NULL, 0,
-           "NSRP MESSAGE LENGTH", HFILL }
-       },
-
-       { &hf_nsrp_encflag,
-         { "Enc Flag", "nsrp.encflag",
-           FT_UINT8, BASE_DEC, VALS(nsrp_encflag_vals), 0,
-           "NSRP ENCRYPT FLAG", HFILL }
-       },
+        { &hf_nsrp_version,
+          { "Version", "nsrp.version",
+            FT_UINT8, BASE_DEC, NULL, 0,
+            "NSRP Version", HFILL }
+        },
+        { &hf_nsrp_msg_type,
+          { "Type", "nsrp.type",
+            FT_UINT8, BASE_DEC, VALS(nsrp_msg_type_vals), 0,
+            "NSRP Message Type", HFILL }
+        },
+        { &hf_nsrp_clust_id,
+          { "Clust ID", "nsrp.clustid",
+            FT_UINT8, BASE_DEC, NULL, 0,
+            "NSRP CLUST ID", HFILL }
+        },
+        { &hf_nsrp_msg_flag,
+          { "Flag", "nsrp.flag",
+            FT_UINT8, BASE_DEC, NULL, 0,
+            "NSRP FLAG", HFILL }
+        },
+        { &hf_nsrp_len,
+          { "Length", "nsrp.length",
+            FT_UINT16, BASE_DEC, NULL, 0,
+            "NSRP Length", HFILL }
+        },
+        { &hf_nsrp_ha_port,
+          { "Port", "nsrp.haport",
+            FT_UINT8, BASE_DEC, NULL, 0,
+            "NSRP HA Port", HFILL }
+        },
+        { &hf_nsrp_not_used,
+          { "Not used", "nsrp.notused",
+            FT_UINT8, BASE_DEC, NULL, 0,
+            NULL, HFILL }
+        },
+        { &hf_nsrp_dst_unit,
+          { "Destination", "nsrp.dst",
+            FT_UINT32, BASE_DEC, NULL, 0,
+            "DESTINATION UNIT INFORMATION", HFILL }
+        },
+        { &hf_nsrp_src_unit,
+          { "Source", "nsrp.src",
+            FT_UINT32, BASE_DEC, NULL, 0,
+            "SOURCE UNIT INFORMATION", HFILL }
+        },
+        { &hf_nsrp_msgtype,
+          { "MsgType", "nsrp.msgtype",
+            FT_UINT8, BASE_DEC, VALS(nsrp_msgtype_vals), 0,
+            "Message Type", HFILL }
+        },
+        { &hf_nsrp_wst_group,
+          { "Wst group", "nsrp.wst",
+            FT_UINT8, BASE_DEC, NULL, 0,
+            "NSRP WST GROUP", HFILL }
+        },
+        { &hf_nsrp_hst_group,
+          { "Hst group", "nsrp.hst",
+            FT_UINT8, BASE_DEC, NULL, 0,
+            "NSRP HST GROUP", HFILL }
+        },
+        { &hf_nsrp_msgflag,
+          { "Msgflag", "nsrp.msgflag",
+            FT_UINT8, BASE_DEC, VALS(nsrp_flag_vals), 0,
+            "NSRP MSG FLAG", HFILL }
+        },
+        { &hf_nsrp_msglen,
+          { "Msg Length", "nsrp.msglen",
+            FT_UINT16, BASE_DEC, NULL, 0,
+            "NSRP MESSAGE LENGTH", HFILL }
+        },
+
+        { &hf_nsrp_encflag,
+          { "Enc Flag", "nsrp.encflag",
+            FT_UINT8, BASE_DEC, VALS(nsrp_encflag_vals), 0,
+            "NSRP ENCRYPT FLAG", HFILL }
+        },
 #if 0
-               { &hf_nsrp_notused,
-         { "Not Used", "nsrp.notused",
-           FT_UINT8, BASE_DEC, NULL, 0,
-           NULL, HFILL }
-       },
+        { &hf_nsrp_notused,
+          { "Not Used", "nsrp.notused",
+            FT_UINT8, BASE_DEC, NULL, 0,
+            NULL, HFILL }
+        },
 #endif
-               { &hf_nsrp_total_size,
-         { "Total Size", "nsrp.totalsize",
-           FT_UINT32, BASE_DEC, NULL, 0,
-           "NSRP MSG TOTAL MESSAGE", HFILL }
-       },
-               { &hf_nsrp_ns,
-         { "Ns", "nsrp.ns",
-           FT_UINT16, BASE_DEC, NULL, 0,
-           NULL, HFILL }
-       },
-               { &hf_nsrp_nr,
-         { "Nr", "nsrp.nr",
-           FT_UINT16, BASE_DEC, NULL, 0,
-           NULL, HFILL }
-       },
-               { &hf_nsrp_no_used,
-         { "Reserved", "nsrp.reserved",
-           FT_UINT16, BASE_DEC, NULL, 0,
-           NULL, HFILL }
-       },
-               { &hf_nsrp_checksum,
-         { "Checksum", "nsrp.checksum",
-           FT_UINT16, BASE_HEX, NULL, 0,
-           "NSRP PACKET CHECKSUM", HFILL }
-       },
-               { &hf_nsrp_authflag,
-         { "AuthFlag", "nsrp.authflag",
-           FT_UINT8, BASE_HEX, NULL, 0,
-           "NSRP Auth Flag", HFILL }
-       },
-                       { &hf_nsrp_priority,
-         { "Priority", "nsrp.priority",
-           FT_UINT8, BASE_HEX, NULL, 0,
-           "NSRP Priority", HFILL }
-       },
-                       { &hf_nsrp_dummy,
-         { "Dummy", "nsrp.dummy",
-           FT_UINT8, BASE_HEX, NULL, 0,
-           "NSRP Dummy", HFILL }
-       },
-               { &hf_nsrp_authchecksum,
-         { "Checksum", "nsrp.authchecksum",
-           FT_UINT16, BASE_HEX, NULL, 0,
-           "NSRP AUTH CHECKSUM", HFILL }
-       },
-               { &hf_nsrp_ifnum,
-         { "Ifnum", "nsrp.ifnum",
-           FT_UINT16, BASE_HEX, NULL, 0,
-           "NSRP IfNum", HFILL }
-       },
-       { &hf_nsrp_data,
-         { "Data", "nsrp.data",
-           FT_STRING, BASE_NONE, NULL, 0,
-           "PADDING", HFILL }
-       }
+        { &hf_nsrp_total_size,
+          { "Total Size", "nsrp.totalsize",
+            FT_UINT32, BASE_DEC, NULL, 0,
+            "NSRP MSG TOTAL MESSAGE", HFILL }
+        },
+        { &hf_nsrp_ns,
+          { "Ns", "nsrp.ns",
+            FT_UINT16, BASE_DEC, NULL, 0,
+            NULL, HFILL }
+        },
+        { &hf_nsrp_nr,
+          { "Nr", "nsrp.nr",
+            FT_UINT16, BASE_DEC, NULL, 0,
+            NULL, HFILL }
+        },
+        { &hf_nsrp_no_used,
+          { "Reserved", "nsrp.reserved",
+            FT_UINT16, BASE_DEC, NULL, 0,
+            NULL, HFILL }
+        },
+        { &hf_nsrp_checksum,
+          { "Checksum", "nsrp.checksum",
+            FT_UINT16, BASE_HEX, NULL, 0,
+            "NSRP PACKET CHECKSUM", HFILL }
+        },
+        { &hf_nsrp_authflag,
+          { "AuthFlag", "nsrp.authflag",
+            FT_UINT8, BASE_HEX, NULL, 0,
+            "NSRP Auth Flag", HFILL }
+        },
+        { &hf_nsrp_priority,
+          { "Priority", "nsrp.priority",
+            FT_UINT8, BASE_HEX, NULL, 0,
+            "NSRP Priority", HFILL }
+        },
+        { &hf_nsrp_dummy,
+          { "Dummy", "nsrp.dummy",
+            FT_UINT8, BASE_HEX, NULL, 0,
+            "NSRP Dummy", HFILL }
+        },
+        { &hf_nsrp_authchecksum,
+          { "Checksum", "nsrp.authchecksum",
+            FT_UINT16, BASE_HEX, NULL, 0,
+            "NSRP AUTH CHECKSUM", HFILL }
+        },
+        { &hf_nsrp_ifnum,
+          { "Ifnum", "nsrp.ifnum",
+            FT_UINT16, BASE_HEX, NULL, 0,
+            "NSRP IfNum", HFILL }
+        },
+        { &hf_nsrp_data,
+          { "Data", "nsrp.data",
+            FT_STRING, BASE_NONE, NULL, 0,
+            "PADDING", HFILL }
+        }
     };
 
     static gint *ett[] = {
-       &ett_nsrp
+        &ett_nsrp
     };
 
     proto_nsrp = proto_register_protocol("Juniper Netscreen Redundant Protocol",
-       "NSRP", "nsrp");
+                                         "NSRP", "nsrp");
     proto_register_field_array(proto_nsrp, hf, array_length(hf));
     proto_register_subtree_array(ett, array_length(ett));
 }
@@ -514,3 +514,17 @@ proto_reg_handoff_nsrp(void)
     nsrp_handle = create_dissector_handle(dissect_nsrp, proto_nsrp);
     dissector_add_uint("ethertype", ETHERTYPE_NSRP, nsrp_handle);
 }
+
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
index 94d95d4a21c98e4874ea2d2ac6f2e1793bb90968..901cc00223e3e6e8d1868a6daf9d8aacdaa11e09 100644 (file)
@@ -4786,7 +4786,7 @@ proto_register_openflow_v4(void)
         },
         { &hf_openflow_v4_oxm_value_ipproto,
             { "Value", "openflow_v4.oxm.value",
-               FT_UINT8, BASE_DEC|BASE_EXT_STRING, (&ipproto_val_ext), 0x0,
+               FT_UINT8, BASE_DEC|BASE_EXT_STRING, &ipproto_val_ext, 0x0,
                NULL, HFILL }
         },
         { &hf_openflow_v4_oxm_value_uint16,
@@ -7900,3 +7900,16 @@ proto_register_openflow_v4(void)
     expert_openflow_v4 = expert_register_protocol(proto_openflow_v4);
     expert_register_field_array(expert_openflow_v4, ei, array_length(ei));
 }
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
index 410d95c82d97d5ab55989e63b4025b4408dcf496..46b81ab09e9dad5d8d4e05f24c4e82a81c0620f6 100644 (file)
@@ -6092,7 +6092,7 @@ proto_register_openflow_v5(void)
         },
         { &hf_openflow_v5_oxm_value_ipproto,
             { "Value", "openflow_v5.oxm.value",
-               FT_UINT8, BASE_DEC|BASE_EXT_STRING, (&ipproto_val_ext), 0x0,
+               FT_UINT8, BASE_DEC|BASE_EXT_STRING, &ipproto_val_ext, 0x0,
                NULL, HFILL }
         },
         { &hf_openflow_v5_oxm_value_uint16,
@@ -9855,3 +9855,16 @@ proto_register_openflow_v5(void)
     expert_openflow_v5 = expert_register_protocol(proto_openflow_v5);
     expert_register_field_array(expert_openflow_v5, ei, array_length(ei));
 }
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
index e5913296b38597f13e40d10028c09e8678bab58c..89b9fc0acdf7bb69b67c95965993b8d2fd949a2d 100644 (file)
@@ -6842,10 +6842,10 @@ proto_register_iphc_crtp(void)
             { "Sequence", "crtp.seq", FT_UINT8, BASE_DEC, NULL, 0x0f,
                 "The sequence of the compressed packet.", HFILL }},
         { &hf_iphc_crtp_fh_flags,
-            { "Flags", "crtp.fh_flags", FT_UINT8, BASE_HEX, iphc_crtp_fh_flags,
+            { "Flags", "crtp.fh_flags", FT_UINT8, BASE_HEX, VALS(iphc_crtp_fh_flags),
                 0xc0, "The flags of the full header packet.", HFILL }},
         { &hf_iphc_crtp_cs_flags,
-            { "Flags", "crtp.cs_flags", FT_UINT8, BASE_DEC, iphc_crtp_cs_flags,
+            { "Flags", "crtp.cs_flags", FT_UINT8, BASE_DEC, VALS(iphc_crtp_cs_flags),
                 0x0, "The flags of the context state packet.", HFILL }},
         { &hf_iphc_crtp_cs_cnt,
             { "Count", "crtp.cnt", FT_UINT8, BASE_DEC, NULL, 0x0,
index 351d10b369b040510a029415da8b3b84eee9efb3..d9e77d3dfa1bd06c662d8ad29306d64bb23011a5 100644 (file)
@@ -272,7 +272,7 @@ static hf_register_info hf[] = {
                          ,HFILL}},
 
        {&hf_cw_frg     ,{"Fragmentation"       ,"pwfr.frag"    ,FT_UINT8       ,BASE_DEC
-                         ,vals_frg             ,0xc0           ,NULL
+                         ,VALS(vals_frg)       ,0xc0           ,NULL
                          ,HFILL}},
 
        {&hf_cw_len     ,{"Length"              ,"pwfr.length"  ,FT_UINT8       ,BASE_DEC
@@ -314,3 +314,16 @@ proto_reg_handoff_pw_fr(void)
        dissector_add_uint("mpls.label", MPLS_LABEL_INVALID, h);
        fr_stripped_address_handle = find_dissector("fr_stripped_address");
 }
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
index 5bc7c94f0c6e97dc0eb945326d58a2ae235815cf..e7eadd13ee137e42ac810ae5d49547283024a15c 100644 (file)
@@ -476,14 +476,14 @@ static const value_string q931_info_element_vals7[] = {
 /* Codeset array */
 #define NUM_INFO_ELEMENT_VALS  (Q931_IE_SHIFT_CODESET+1)
 static const value_string *q931_info_element_vals[NUM_INFO_ELEMENT_VALS] = {
-  q931_info_element_vals0,
-  q931_info_element_vals1,
-  q931_info_element_vals2,
-  q931_info_element_vals3,
-  q931_info_element_vals4,
-  q931_info_element_vals5,
-  q931_info_element_vals6,
-  q931_info_element_vals7,
+       q931_info_element_vals0,
+       q931_info_element_vals1,
+       q931_info_element_vals2,
+       q931_info_element_vals3,
+       q931_info_element_vals4,
+       q931_info_element_vals5,
+       q931_info_element_vals6,
+       q931_info_element_vals7,
 };
 
 static const value_string q931_congestion_level_vals[] = {
@@ -1416,12 +1416,12 @@ dissect_q931_cause_ie_unsafe(tvbuff_t *tvb, int offset, int len,
 
 void
 dissect_q931_cause_ie(tvbuff_t *tvb, int offset, int len,
-    proto_tree *tree, int hf_cause_value, guint8 *cause_value, const value_string *ie_vals)
+                     proto_tree *tree, int hf_cause_value, guint8 *cause_value, const value_string *ie_vals)
 {
-  gboolean have_valid_q931_pi_save = have_valid_q931_pi;
-  have_valid_q931_pi = FALSE;
-  dissect_q931_cause_ie_unsafe(tvb, offset, len, tree, hf_cause_value, cause_value, ie_vals);
-  have_valid_q931_pi =  have_valid_q931_pi_save;
+       gboolean have_valid_q931_pi_save = have_valid_q931_pi;
+       have_valid_q931_pi = FALSE;
+       dissect_q931_cause_ie_unsafe(tvb, offset, len, tree, hf_cause_value, cause_value, ie_vals);
+       have_valid_q931_pi =  have_valid_q931_pi_save;
 }
 
 /*
@@ -2250,11 +2250,11 @@ dissect_q931_number_ie(tvbuff_t *tvb, int offset, int len,
                }
        }
 
-    /* Collect q931_packet_info */
-    if ( e164_info.e164_number_type == CALLING_PARTY_NUMBER && have_valid_q931_pi)
-          q931_pi->calling_number = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
-    if ( e164_info.e164_number_type == CALLED_PARTY_NUMBER && have_valid_q931_pi)
-          q931_pi->called_number = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
+       /* Collect q931_packet_info */
+       if ( e164_info.e164_number_type == CALLING_PARTY_NUMBER && have_valid_q931_pi)
+               q931_pi->calling_number = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
+       if ( e164_info.e164_number_type == CALLED_PARTY_NUMBER && have_valid_q931_pi)
+               q931_pi->called_number = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
 }
 
 /*
@@ -2685,10 +2685,10 @@ dissect_q931_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                                next_tvb = tvb_new_chain(tvb, fd_head->tvb_data);
                                add_new_data_source(pinfo, next_tvb, "Reassembled Q.931 IEs");
                                /* Show all fragments. */
-                if (tree) {
-                    proto_item *frag_tree_item;
-                    show_fragment_seq_tree(fd_head, &q931_frag_items, q931_tree, pinfo, next_tvb, &frag_tree_item);
-                }
+                               if (tree) {
+                                       proto_item *frag_tree_item;
+                                       show_fragment_seq_tree(fd_head, &q931_frag_items, q931_tree, pinfo, next_tvb, &frag_tree_item);
+                               }
                        } else {  /* only 1 segment */
                                next_tvb = tvb_new_subset_remaining(tvb, offset);
                        }
@@ -3474,7 +3474,7 @@ proto_register_q931(void)
                  { "Redirecting party number digits", "q931.redirecting_number.digits", FT_STRING, BASE_NONE, NULL, 0x0,
                        NULL, HFILL }},
 
-    /* fields for channel identification IE */
+               /* fields for channel identification IE */
                /* 0x80 is the extension bit */
 
                { &hf_q931_channel_interface_explicit,
@@ -3496,11 +3496,11 @@ proto_register_q931(void)
                    "True if the identified channel is the D-Channel", HFILL }},
 
                { &hf_q931_channel_selection_bri,
-                 { "Information channel selection", "q931.channel.selection", FT_UINT8, BASE_HEX, q931_basic_channel_selection_vals, 0x03,
+                 { "Information channel selection", "q931.channel.selection", FT_UINT8, BASE_HEX, VALS(q931_basic_channel_selection_vals), 0x03,
                    "Identifies the information channel to be used", HFILL }},
 
                { &hf_q931_channel_selection_pri,
-                 { "Information channel selection", "q931.channel.selection", FT_UINT8, BASE_HEX, q931_not_basic_channel_selection_vals, 0x03,
+                 { "Information channel selection", "q931.channel.selection", FT_UINT8, BASE_HEX, VALS(q931_not_basic_channel_selection_vals), 0x03,
                    "Identifies the information channel to be used", HFILL }},
 
                { &hf_q931_channel_map,
@@ -3508,14 +3508,14 @@ proto_register_q931(void)
                    "True if channel is indicates by channel map rather than number", HFILL }},
 
                { &hf_q931_channel_element_type,
-                 { "Element type", "q931.channel.element_type", FT_UINT8, BASE_HEX, q931_element_type_vals, 0xF,
+                 { "Element type", "q931.channel.element_type", FT_UINT8, BASE_HEX, VALS(q931_element_type_vals), 0xF,
                    "Type of element in the channel number/slot map octets", HFILL }},
 
                { &hf_q931_channel_number,
                  { "Channel number", "q931.channel.number", FT_UINT8, BASE_DEC, NULL, 0x7F,
                    NULL, HFILL }},
 
-    /* desegmentation fields */
+               /* desegmentation fields */
                { &hf_q931_segment_overlap,
                  { "Segment overlap", "q931.segment.overlap", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
                        "Fragment overlaps with other fragments", HFILL }},
@@ -3620,12 +3620,25 @@ proto_reg_handoff_q931(void)
 
 static void reset_q931_packet_info(q931_packet_info *pi)
 {
-    if(pi == NULL) {
-        return;
-    }
-
-    pi->calling_number = NULL;
-    pi->called_number = NULL;
-    pi->cause_value = 0xFF;
-    pi->crv = -1;
+       if(pi == NULL) {
+               return;
+       }
+
+       pi->calling_number = NULL;
+       pi->called_number = NULL;
+       pi->cause_value = 0xFF;
+       pi->crv = -1;
 }
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
index 52ed50aa7aa5b272e5711a91388351b2c81ccf59..663486291ec5865457dd2be04080542f5d4db426 100644 (file)
@@ -458,12 +458,12 @@ void proto_register_packetcable(void) {
                },
                { &hf_packetcable_em_header_event_message_type,
                { "Event Message Type","packetcable_avps.emh.emt",
-                       FT_UINT16, BASE_DEC, radius_vendor_packetcable_event_message_vals, 0x0,
+                       FT_UINT16, BASE_DEC, VALS(radius_vendor_packetcable_event_message_vals), 0x0,
                        "PacketCable Event Message Type", HFILL }
                },
                { &hf_packetcable_em_header_element_type,
                { "Element Type","packetcable_avps.emh.et",
-                       FT_UINT16, BASE_DEC, packetcable_em_header_element_type_vals, 0x0,
+                       FT_UINT16, BASE_DEC, VALS(packetcable_em_header_element_type_vals), 0x0,
                        "PacketCable Event Message Element Type", HFILL }
                },
                { &hf_packetcable_em_header_sequence_number,
@@ -478,19 +478,19 @@ void proto_register_packetcable(void) {
                },
                { &hf_packetcable_em_header_status_error_indicator,
                { "Status","packetcable_avps.emh.st.ei",
-                       FT_UINT32, BASE_HEX, packetcable_em_header_status_error_indicator_vals,
+                       FT_UINT32, BASE_HEX, VALS(packetcable_em_header_status_error_indicator_vals),
                        PACKETCABLE_EMHS_EI_MASK,
                        "PacketCable Event Message Status Error Indicator", HFILL }
                },
                { &hf_packetcable_em_header_status_event_origin,
                { "Event Origin","packetcable_avps.emh.st.eo",
-                       FT_UINT32, BASE_HEX, packetcable_em_header_status_event_origin_vals,
+                       FT_UINT32, BASE_HEX, VALS(packetcable_em_header_status_event_origin_vals),
                        PACKETCABLE_EMHS_EO_MASK,
                        "PacketCable Event Message Status Event Origin", HFILL }
                },
                { &hf_packetcable_em_header_status_event_message_proxied,
                { "Event Message Proxied","packetcable_avps.emh.st.emp",
-                       FT_UINT32, BASE_HEX, packetcable_em_header_status_event_message_proxied_vals,
+                       FT_UINT32, BASE_HEX, VALS(packetcable_em_header_status_event_message_proxied_vals),
                        PACKETCABLE_EMHS_EMP_MASK,
                        "PacketCable Event Message Status Event Message Proxied", HFILL }
                },
@@ -511,7 +511,7 @@ void proto_register_packetcable(void) {
                },
                { &hf_packetcable_call_termination_cause_source_document,
                { "Source Document","packetcable_avps.ctc.sd",
-                       FT_UINT16, BASE_HEX, packetcable_call_termination_cause_vals, 0x0,
+                       FT_UINT16, BASE_HEX, VALS(packetcable_call_termination_cause_vals), 0x0,
                        "PacketCable Call Termination Cause Source Document", HFILL }
                },
                { &hf_packetcable_call_termination_cause_code,
@@ -521,7 +521,7 @@ void proto_register_packetcable(void) {
                },
                { &hf_packetcable_trunk_group_id_trunk_type,
                { "Trunk Type","packetcable_avps.tgid.tt",
-                       FT_UINT16, BASE_HEX, packetcable_trunk_type_vals, 0x0,
+                       FT_UINT16, BASE_HEX, VALS(packetcable_trunk_type_vals), 0x0,
                        "PacketCable Trunk Group ID Trunk Type", HFILL }
                },
                { &hf_packetcable_trunk_group_id_trunk_number,
@@ -536,7 +536,7 @@ void proto_register_packetcable(void) {
                },
                { &hf_packetcable_qos_status_indication,
                { "Status Indication","packetcable_avps.qs.si",
-                       FT_UINT32, BASE_DEC, packetcable_state_indication_vals, PACKETCABLE_QOS_STATE_INDICATION_MASK,
+                       FT_UINT32, BASE_DEC, VALS(packetcable_state_indication_vals), PACKETCABLE_QOS_STATE_INDICATION_MASK,
                        "PacketCable QoS Descriptor Attribute QoS State Indication", HFILL }
                },
                { &hf_packetcable_qos_desc_flags[0],
@@ -809,3 +809,16 @@ proto_reg_handoff_packetcable(void)
        radius_register_avp_dissector(VENDOR_CABLELABS, 92, dissect_packetcable_party_info); */
 }
 
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
index a54207da541459eef692c38e8d258d387f5f8ae0..7579a535b60546498d4f33da157fd57ab37d51f1 100644 (file)
@@ -2542,7 +2542,7 @@ proto_register_rohc(void)
             },
             { &hf_rohc_ip_protocol,
               { "Protocol","rohc.ip.protocol",
-                FT_UINT8, BASE_DEC|BASE_EXT_STRING, (&ipproto_val_ext), 0x0,
+                FT_UINT8, BASE_DEC|BASE_EXT_STRING, &ipproto_val_ext, 0x0,
                 NULL , HFILL
               }
             },
@@ -2704,7 +2704,7 @@ proto_register_rohc(void)
             },
             { &hf_rohc_rtp_pt,
               { "Payload Type(PT)","rohc.rtp.pt",
-                FT_UINT8, BASE_DEC|BASE_EXT_STRING, (&rtp_payload_type_vals_ext), 0x7f,
+                FT_UINT8, BASE_DEC|BASE_EXT_STRING, &rtp_payload_type_vals_ext, 0x7f,
                 NULL , HFILL
               }
             },
@@ -2973,3 +2973,16 @@ proto_reg_handoff_rohc(void)
     ipv6_handle = find_dissector("ipv6");
     data_handle = find_dissector("data");
 }
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
index fe369469f10382d547cbd0e5024108faf2210242..5f5508b8cb4d0d8b23d237fc28f71f73acd7dcd4 100644 (file)
@@ -3905,12 +3905,12 @@ dissect_rsl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
         ti = proto_tree_add_item(tree, proto_rsl, tvb, 0, -1, ENC_NA);
 
         /* if nanoBTS specific vendor messages are not enabled, skip */
-       if (!global_rsl_use_nano_bts) {
+        if (!global_rsl_use_nano_bts) {
             guint8 msg_disc = tvb_get_guint8(tvb, offset) >> 1;
 
             if (msg_disc == RSL_MSGDISC_IPACCESS)
                 return 0;
-       }
+        }
         rsl_tree = proto_item_add_subtree(ti, ett_rsl);
 
         /* 9.1 Message discriminator */
@@ -3970,7 +3970,7 @@ void proto_register_rsl(void)
         },
         { &hf_rsl_delay_ind,
           { "Delay IND",  "gsm_abis_rsl.delay_ind",
-            FT_UINT8, BASE_DEC, rsl_delay_ind_vals, 0x01,
+            FT_UINT8, BASE_DEC, VALS(rsl_delay_ind_vals), 0x01,
             NULL, HFILL }
         },
         { &hf_rsl_tfo,
@@ -4288,11 +4288,11 @@ void proto_register_rsl(void)
             0xf0, NULL, HFILL }
         },
         { &hf_rsl_conn_id,
-          { "ip.access Connection ID", "gsm_abis_rsl.ipacc.conn_id",
+          { "ip.access Connection ID", "gsm_abis_rsl.ipacc.conn_id",
             FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }
         },
         { &hf_rsl_rtp_payload,
-          { "ip.access RTP Payload Type",      "gsm_abis_rsl.ipacc.rtp_payload",
+          { "ip.access RTP Payload Type", "gsm_abis_rsl.ipacc.rtp_payload",
             FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
         },
         { &hf_rsl_rtp_csd_fmt_d,
@@ -4306,7 +4306,7 @@ void proto_register_rsl(void)
             0xf0, NULL, HFILL },
         },
         { &hf_rsl_local_port,
-          { "ip.access Local RTP Port",        "gsm_abis_rsl.ipacc.local_port",
+          { "ip.access Local RTP Port", "gsm_abis_rsl.ipacc.local_port",
             FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
         },
         { &hf_rsl_remote_port,
@@ -4524,3 +4524,16 @@ proto_reg_handoff_rsl(void)
     gsm_a_dtap_handle = find_dissector("gsm_a_dtap");
     gsm_a_sacch_handle = find_dissector("gsm_a_sacch");
 }
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
index 11c1807bfd296637daa21373021ddcd44ba3dede..c986514c653b44831f905f4b34c2563cafd976ab 100644 (file)
@@ -300,7 +300,7 @@ proto_register_rtacser(void)
         { &hf_rtacser_timestamp,
         { "Timestamp", "rtacser.timestamp", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
         { &hf_rtacser_event_type,
-        { "Event Type", "rtacser.eventtype", FT_UINT8, BASE_HEX, rtacser_eventtype_vals, 0x0, NULL, HFILL }},
+        { "Event Type", "rtacser.eventtype", FT_UINT8, BASE_HEX, VALS(rtacser_eventtype_vals), 0x0, NULL, HFILL }},
         { &hf_rtacser_ctrl_cts,
         { "CTS", "rtacser.cts", FT_UINT8, BASE_DEC, NULL, RTACSER_CTRL_CTS, NULL, HFILL }},
         { &hf_rtacser_ctrl_dcd,
index 53eacf912ec2bd0c94ce5e90433815eb3201a122..65f2fad8e989ae35ab777be642b9f981da08b259 100644 (file)
@@ -60,16 +60,16 @@ static dissector_handle_t h245dg_handle;
 #define SRP_NSRP_RESPONSE 247
 
 static const value_string srp_frame_types[] = {
-  {SRP_SRP_COMMAND, "SRP command"},
-  {SRP_SRP_RESPONSE, "SRP response"},
-  {SRP_NSRP_RESPONSE, "NSRP response"},
-  {0,NULL}
+    {SRP_SRP_COMMAND, "SRP command"},
+    {SRP_SRP_RESPONSE, "SRP response"},
+    {SRP_NSRP_RESPONSE, "NSRP response"},
+    {0,NULL}
 };
 
 static const value_string ccsrl_ls_vals[] = {
-  {0xFF, "Yes"},
-  {0x00, "No"},
-  {0,NULL}
+    {0xFF, "Yes"},
+    {0x00, "No"},
+    {0,NULL}
 };
 
 /*****************************************************************************/
@@ -83,9 +83,9 @@ static void dissect_ccsrl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree
 
     /* add the 'ccsrl' tree to the main tree */
     if (tree) {
-       ccsrl_item = proto_tree_add_item (tree, proto_ccsrl, tvb, 0, -1, ENC_NA);
-       ccsrl_tree = proto_item_add_subtree (ccsrl_item, ett_ccsrl);
-       proto_tree_add_uint(ccsrl_tree,hf_ccsrl_ls,tvb,0,1,lastseg);
+        ccsrl_item = proto_tree_add_item (tree, proto_ccsrl, tvb, 0, -1, ENC_NA);
+        ccsrl_tree = proto_item_add_subtree (ccsrl_item, ett_ccsrl);
+        proto_tree_add_uint(ccsrl_tree,hf_ccsrl_ls,tvb,0,1,lastseg);
     }
 
     /* XXX add support for reassembly of fragments */
@@ -103,7 +103,7 @@ static void dissect_srp_command(tvbuff_t * tvb, packet_info * pinfo, proto_tree
     guint payload_len;
 
     if( srp_tree )
-       proto_tree_add_item(srp_tree,hf_srp_seqno,tvb,1,1,ENC_BIG_ENDIAN);
+        proto_tree_add_item(srp_tree,hf_srp_seqno,tvb,1,1,ENC_BIG_ENDIAN);
 
     payload_len = tvb_reported_length_remaining(tvb,4);
     next_tvb = tvb_new_subset(tvb, 2, payload_len, payload_len );
@@ -124,50 +124,50 @@ static void dissect_srp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
 
     /* add the 'srp' tree to the main tree */
     if (tree) {
-       srp_item = proto_tree_add_item (tree, proto_srp, tvb, 0, -1, ENC_NA);
-       srp_tree = proto_item_add_subtree (srp_item, ett_srp);
-       proto_tree_add_uint(srp_tree,hf_srp_header,tvb,0,1,header);
+        srp_item = proto_tree_add_item (tree, proto_srp, tvb, 0, -1, ENC_NA);
+        srp_tree = proto_item_add_subtree (srp_item, ett_srp);
+        proto_tree_add_uint(srp_tree,hf_srp_header,tvb,0,1,header);
     }
 
     switch( header ) {
-       case SRP_SRP_COMMAND:
-           dissect_srp_command(tvb,pinfo,srp_tree);
-           break;
+        case SRP_SRP_COMMAND:
+            dissect_srp_command(tvb,pinfo,srp_tree);
+            break;
 
-       case SRP_SRP_RESPONSE:
-           break;
+        case SRP_SRP_RESPONSE:
+            break;
 
-       case SRP_NSRP_RESPONSE:
-           if( srp_tree )
-               proto_tree_add_item(srp_tree,hf_srp_seqno,tvb,1,1,ENC_BIG_ENDIAN);
-           break;
+        case SRP_NSRP_RESPONSE:
+            if( srp_tree )
+                proto_tree_add_item(srp_tree,hf_srp_seqno,tvb,1,1,ENC_BIG_ENDIAN);
+            break;
 
-       default:
-           break;
+        default:
+            break;
     }
 
     if( srp_tree ) {
-       guint16 crc, calc_crc;
-       guint crc_offset = tvb_reported_length(tvb)-2;
-       crc = tvb_get_letohs(tvb,-2);
-
-       /* crc includes the header */
-       calc_crc = crc16_ccitt_tvb(tvb,crc_offset);
-
-       if( crc == calc_crc ) {
-           proto_tree_add_uint_format_value(srp_tree, hf_srp_crc, tvb,
-                                      crc_offset, 2, crc,
-                                      "0x%04x (correct)", crc);
-       } else {
-           hidden_item = proto_tree_add_boolean(srp_tree, hf_srp_crc_bad, tvb,
-                                         crc_offset, 2, TRUE);
-           PROTO_ITEM_SET_HIDDEN(hidden_item);
-           proto_tree_add_uint_format_value(srp_tree, hf_srp_crc, tvb,
-                                      crc_offset, 2, crc,
-                                      "0x%04x (incorrect, should be 0x%04x)",
-                                      crc,
-                                      calc_crc);
-       }
+        guint16 crc, calc_crc;
+        guint crc_offset = tvb_reported_length(tvb)-2;
+        crc = tvb_get_letohs(tvb,-2);
+
+        /* crc includes the header */
+        calc_crc = crc16_ccitt_tvb(tvb,crc_offset);
+
+        if( crc == calc_crc ) {
+            proto_tree_add_uint_format_value(srp_tree, hf_srp_crc, tvb,
+                                       crc_offset, 2, crc,
+                                       "0x%04x (correct)", crc);
+        } else {
+            hidden_item = proto_tree_add_boolean(srp_tree, hf_srp_crc_bad, tvb,
+                                          crc_offset, 2, TRUE);
+            PROTO_ITEM_SET_HIDDEN(hidden_item);
+            proto_tree_add_uint_format_value(srp_tree, hf_srp_crc, tvb,
+                                       crc_offset, 2, crc,
+                                       "0x%04x (incorrect, should be 0x%04x)",
+                                       crc,
+                                       calc_crc);
+        }
     }
 
 }
@@ -175,13 +175,13 @@ static void dissect_srp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
 void proto_register_ccsrl (void)
 {
     static hf_register_info hf[] = {
-       { &hf_ccsrl_ls,
-         { "Last Segment","ccsrl.ls",FT_UINT8, BASE_HEX, ccsrl_ls_vals, 0x0,
-           "Last segment indicator", HFILL}},
+        { &hf_ccsrl_ls,
+          { "Last Segment","ccsrl.ls",FT_UINT8, BASE_HEX, VALS(ccsrl_ls_vals), 0x0,
+            "Last segment indicator", HFILL}},
     };
 
     static gint *ett[] = {
-       &ett_ccsrl,
+        &ett_ccsrl,
     };
 
     proto_ccsrl = proto_register_protocol ("H.324/CCSRL", "CCSRL", "ccsrl");
@@ -193,22 +193,22 @@ void proto_register_ccsrl (void)
 void proto_register_srp (void)
 {
     static hf_register_info hf[] = {
-       {&hf_srp_header,
-        { "Header", "srp.header", FT_UINT8, BASE_DEC, srp_frame_types, 0x0,
-          "SRP header octet", HFILL }},
-       {&hf_srp_seqno,
-        { "Sequence Number", "srp.seqno", FT_UINT8, BASE_DEC, NULL, 0x0,
-          NULL, HFILL }},
-       {&hf_srp_crc,
-        { "CRC", "srp.crc", FT_UINT16, BASE_HEX, NULL, 0x0,
-          NULL, HFILL }},
-       { &hf_srp_crc_bad,
-         { "Bad CRC","srp.crc_bad", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
-           NULL, HFILL }},
+        {&hf_srp_header,
+         { "Header", "srp.header", FT_UINT8, BASE_DEC, VALS(srp_frame_types), 0x0,
+           "SRP header octet", HFILL }},
+        {&hf_srp_seqno,
+         { "Sequence Number", "srp.seqno", FT_UINT8, BASE_DEC, NULL, 0x0,
+           NULL, HFILL }},
+        {&hf_srp_crc,
+         { "CRC", "srp.crc", FT_UINT16, BASE_HEX, NULL, 0x0,
+           NULL, HFILL }},
+        { &hf_srp_crc_bad,
+          { "Bad CRC","srp.crc_bad", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+            NULL, HFILL }},
     };
 
     static gint *ett[] = {
-       &ett_srp,
+        &ett_srp,
     };
 
     proto_srp = proto_register_protocol ("H.324/SRP", "SRP", "srp");
@@ -227,3 +227,16 @@ void proto_reg_handoff_srp(void) {
     ccsrl_handle = find_dissector("ccsrl");
     h245dg_handle = find_dissector("h245dg");
 }
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
index f4e394e56eca8b4fc068b0d0a8e56288a729ed38..8185b2856e8fd201a4e3826b73dad468a38c8ac0 100644 (file)
@@ -78,32 +78,33 @@ static expert_field ei_trmac_sv_len = EI_INIT;
 
 /* Major Vector */
 static const value_string major_vector_vs[] = {
-               { 0x00, "Response" },
-               { 0x02, "Beacon" },
-               { 0x03, "Claim Token" },
-               { 0x04, "Ring Purge" },
-               { 0x05, "Active Monitor Present" },
-               { 0x06, "Standby Monitor Present" },
-               { 0x07, "Duplicate Address Test" },
-               { 0x09, "Transmit Forward" },
-               { 0x0B, "Remove Ring Station" },
-               { 0x0C, "Change Parameters" },
-               { 0x0D, "Initialize Ring Station" },
-               { 0x0E, "Request Ring Station Address" },
-               { 0x0F, "Request Ring Station Address" },
-               { 0x10, "Request Ring Station Attachments" },
-               { 0x20, "Request Initialization" },
-               { 0x22, "Report Ring Station Address" },
-               { 0x23, "Report Ring Station State" },
-               { 0x24, "Report Ring Station Attachments" },
-               { 0x25, "Report New Active Monitor" },
-               { 0x26, "Report NAUN Change" },
-               { 0x27, "Report Poll Error" },
-               { 0x28, "Report Monitor Errors" },
-               { 0x29, "Report Error" },
-               { 0x2A, "Report Transmit Forward" },
-               { 0x00, NULL }
+       { 0x00, "Response" },
+       { 0x02, "Beacon" },
+       { 0x03, "Claim Token" },
+       { 0x04, "Ring Purge" },
+       { 0x05, "Active Monitor Present" },
+       { 0x06, "Standby Monitor Present" },
+       { 0x07, "Duplicate Address Test" },
+       { 0x09, "Transmit Forward" },
+       { 0x0B, "Remove Ring Station" },
+       { 0x0C, "Change Parameters" },
+       { 0x0D, "Initialize Ring Station" },
+       { 0x0E, "Request Ring Station Address" },
+       { 0x0F, "Request Ring Station Address" },
+       { 0x10, "Request Ring Station Attachments" },
+       { 0x20, "Request Initialization" },
+       { 0x22, "Report Ring Station Address" },
+       { 0x23, "Report Ring Station State" },
+       { 0x24, "Report Ring Station Attachments" },
+       { 0x25, "Report New Active Monitor" },
+       { 0x26, "Report NAUN Change" },
+       { 0x27, "Report Poll Error" },
+       { 0x28, "Report Monitor Errors" },
+       { 0x29, "Report Error" },
+       { 0x2A, "Report Transmit Forward" },
+       { 0x00, NULL }
 };
+static value_string_ext major_vector_vs_ext = VALUE_STRING_EXT_INIT(major_vector_vs);
 
 /* Src. and Dest. Classes */
 static const value_string classes_vs[] = {
@@ -116,33 +117,34 @@ static const value_string classes_vs[] = {
 };
 
 static const value_string subvector_vs[] = {
-               { 0x01, "Beacon Type" },
-               { 0x02, "Upstream Neighbor's Address" },
-               { 0x03, "Local Ring Number" },
-               { 0x04, "Assign Physical Drop Number" },
-               { 0x05, "Error Report Timer Value" },
-               { 0x06, "Authorized Function Classes" },
-               { 0x07, "Authorized Access Priority" },
-               { 0x09, "Correlator" },
-               { 0x0A, "SA of Last AMP or SMP Frame" },
-               { 0x0B, "Physical Drop Number" },
-               { 0x20, "Response Code" },
-               { 0x21, "Individual Address Count" },
-               { 0x22, "Product Instance ID" },
-               { 0x23, "Ring Station Version Number" },
-               { 0x26, "Wrap Data" },
-               { 0x27, "Frame Forward" },
-               { 0x28, "Station Identifier" },
-               { 0x29, "Ring Station Status" },
-               { 0x2A, "Transmit Forward Status Code" },
-               { 0x2B, "Group Addresses" },
-               { 0x2C, "Functional Addresses" },
-               { 0x2D, "Isolating Error Counts" },
-               { 0x2E, "Non-Isolating Error Counts" },
-               { 0x2F, "Function Request ID" },
-               { 0x30, "Error Code" },
-               { 0x00, NULL }
+       { 0x01, "Beacon Type" },
+       { 0x02, "Upstream Neighbor's Address" },
+       { 0x03, "Local Ring Number" },
+       { 0x04, "Assign Physical Drop Number" },
+       { 0x05, "Error Report Timer Value" },
+       { 0x06, "Authorized Function Classes" },
+       { 0x07, "Authorized Access Priority" },
+       { 0x09, "Correlator" },
+       { 0x0A, "SA of Last AMP or SMP Frame" },
+       { 0x0B, "Physical Drop Number" },
+       { 0x20, "Response Code" },
+       { 0x21, "Individual Address Count" },
+       { 0x22, "Product Instance ID" },
+       { 0x23, "Ring Station Version Number" },
+       { 0x26, "Wrap Data" },
+       { 0x27, "Frame Forward" },
+       { 0x28, "Station Identifier" },
+       { 0x29, "Ring Station Status" },
+       { 0x2A, "Transmit Forward Status Code" },
+       { 0x2B, "Group Addresses" },
+       { 0x2C, "Functional Addresses" },
+       { 0x2D, "Isolating Error Counts" },
+       { 0x2E, "Non-Isolating Error Counts" },
+       { 0x2F, "Function Request ID" },
+       { 0x30, "Error Code" },
+       { 0x00, NULL }
 };
+static value_string_ext subvector_vs_ext = VALUE_STRING_EXT_INIT(subvector_vs);
 
 static const value_string beacon_vs[] = {
        { 0x00, "Recovery mode set" },
@@ -181,7 +183,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree)
 
        sv_id = tvb_get_guint8(tvb, svoff+1);
        proto_tree_add_item(sv_tree, hf_trmac_sv_id, tvb, svoff+1, 1, ENC_NA);
-       proto_item_append_text(sv_item, " (%s)", val_to_str(sv_id, subvector_vs, "Unknown subvector ID 0x%02X"));
+       proto_item_append_text(sv_item, " (%s)", val_to_str_ext(sv_id, &subvector_vs_ext, "Unknown subvector ID 0x%02X"));
 
        switch(sv_id) {
                case 0x01: /* Beacon Type */
@@ -491,7 +493,7 @@ dissect_trmac(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
        /* Interpret the major vector */
        col_add_str(pinfo->cinfo, COL_INFO,
-                   val_to_str(mv_val, major_vector_vs, "Unknown Major Vector: %u"));
+                   val_to_str_ext(mv_val, &major_vector_vs_ext, "Unknown Major Vector: %u"));
 
        if (tree) {
                mv_length = tvb_get_ntohs(tvb, 0);
@@ -522,29 +524,29 @@ dissect_trmac(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 void
 proto_register_trmac(void)
 {
-        static hf_register_info hf[] = {
-                { &hf_trmac_mv,
-                { "Major Vector",                      "trmac.mvec", FT_UINT8, BASE_HEX, major_vector_vs, 0x0,
+       static hf_register_info hf[] = {
+               { &hf_trmac_mv,
+               { "Major Vector",                       "trmac.mvec", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &major_vector_vs_ext, 0x0,
                        NULL, HFILL }},
 
-                { &hf_trmac_length,
-                { "Total Length",                      "trmac.length", FT_UINT8, BASE_DEC, NULL, 0x0,
+               { &hf_trmac_length,
+               { "Total Length",                       "trmac.length", FT_UINT8, BASE_DEC, NULL, 0x0,
                        NULL, HFILL }},
 
-                { &hf_trmac_srcclass,
-                { "Source Class",                      "trmac.srcclass", FT_UINT8, BASE_HEX, classes_vs, 0x0,
+               { &hf_trmac_srcclass,
+               { "Source Class",                       "trmac.srcclass", FT_UINT8, BASE_HEX, VALS(classes_vs), 0x0,
                        NULL, HFILL }},
 
-                { &hf_trmac_dstclass,
-                { "Destination Class",                 "trmac.dstclass", FT_UINT8, BASE_HEX, classes_vs, 0x0,
+               { &hf_trmac_dstclass,
+               { "Destination Class",                  "trmac.dstclass", FT_UINT8, BASE_HEX, VALS(classes_vs), 0x0,
                        NULL, HFILL }},
 
-                { &hf_trmac_sv_len,
-                { "Subvector Length",                  "trmac.svec.len", FT_UINT8, BASE_DEC, NULL, 0x0,
+               { &hf_trmac_sv_len,
+               { "Subvector Length",                   "trmac.svec.len", FT_UINT8, BASE_DEC, NULL, 0x0,
                        NULL, HFILL }},
 
-                { &hf_trmac_sv_id,
-                { "Subvector Identifier",              "trmac.svec.id", FT_UINT8, BASE_HEX, VALS(subvector_vs), 0x0,
+               { &hf_trmac_sv_id,
+               { "Subvector Identifier",               "trmac.svec.id", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &subvector_vs_ext, 0x0,
                        NULL, HFILL }},
 
                { &hf_trmac_errors_iso,
@@ -642,3 +644,16 @@ proto_register_trmac(void)
 
        register_dissector("trmac", dissect_trmac, proto_trmac);
 }
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
index b880623dcb60511150347b27150156ec1697b462..c27f6d43afbd2b4440b7e023764db9975b86a3cd 100644 (file)
@@ -1257,7 +1257,7 @@ proto_register_xmcp(void)
     },
     { &xmcp_attr_service_protocol,
       { "Protocol",             "xmcp.attr.service.transport.protocol",
-        FT_UINT8, BASE_DEC|BASE_EXT_STRING, (&ipproto_val_ext),
+        FT_UINT8, BASE_DEC|BASE_EXT_STRING, &ipproto_val_ext,
         0x0, NULL, HFILL }
     },
     { &xmcp_attr_flag,