Follow-up of r44162: clean more filters
authorPascal Quantin <pascal.quantin@gmail.com>
Wed, 1 Aug 2012 14:07:18 +0000 (14:07 -0000)
committerPascal Quantin <pascal.quantin@gmail.com>
Wed, 1 Aug 2012 14:07:18 +0000 (14:07 -0000)
svn path=/trunk/; revision=44187

epan/dissectors/packet-gsm_a_bssmap.c
epan/dissectors/packet-gsm_a_common.c
epan/dissectors/packet-gsm_a_common.h
epan/dissectors/packet-gsm_a_dtap.c
epan/dissectors/packet-gsm_a_rr.c
epan/dissectors/packet-gsm_bssmap_le.c
epan/dissectors/packet-gsm_sim.c

index 6c964e832e14c94151cf6b0679e2c1d7e21b5b32..3d93aa92133ecc921ce182ca3a69c9145cbaf18c 100644 (file)
@@ -464,10 +464,9 @@ static const value_string fe_cur_chan_type2_chan_field_vals[] = {
 static int proto_a_bssmap = -1;
 
 static int hf_gsm_a_bssmap_msg_type = -1;
-int hf_gsm_a_length = -1;
 int hf_gsm_a_bssmap_elem_id = -1;
 static int hf_gsm_a_bssmap_field_elem_id = -1;
-int hf_gsm_a_bssmap_cell_ci = -1;
+static int hf_gsm_a_bssmap_cell_ci = -1;
 static int hf_gsm_a_bssmap_cell_lac = -1;
 static int hf_gsm_a_bssmap_sac = -1;
 static int hf_gsm_a_bssmap_dlci_cc = -1;
@@ -6972,23 +6971,18 @@ proto_register_gsm_a_bssmap(void)
         FT_UINT8, BASE_HEX, VALS(bssmap_field_element_ids), 0,
         NULL, HFILL }
     },
-    { &hf_gsm_a_length,
-        { "Length",     "gsm_a.len",
-        FT_UINT16, BASE_DEC, NULL, 0,
-        NULL, HFILL }
-    },
     { &hf_gsm_a_bssmap_cell_ci,
-        { "Cell CI",    "gsm_a.cell_ci",
+        { "Cell CI",    "gsm_a_bssmap.cell_ci",
         FT_UINT16, BASE_HEX_DEC, 0, 0x0,
         NULL, HFILL }
     },
     { &hf_gsm_a_bssmap_cell_lac,
-        { "Cell LAC",   "gsm_a.cell_lac",
+        { "Cell LAC",   "gsm_a_bssmap.cell_lac",
         FT_UINT16, BASE_HEX_DEC, 0, 0x0,
         NULL, HFILL }
     },
     { &hf_gsm_a_bssmap_sac,
-        { "SAC",    "gsm_a.sac",
+        { "SAC",    "gsm_a_bssmap.sac",
         FT_UINT16, BASE_HEX, 0, 0x0,
         NULL, HFILL }
     },
@@ -7013,7 +7007,7 @@ proto_register_gsm_a_bssmap(void)
         NULL, HFILL }
     },
     { &hf_gsm_a_bssmap_be_cell_id_disc,
-        { "Cell identification discriminator","gsm_a.be.cell_id_disc",
+        { "Cell identification discriminator","gsm_a_bssmap.be.cell_id_disc",
         FT_UINT8,BASE_DEC|BASE_EXT_STRING,  &gsm_a_be_cell_id_disc_vals_ext, 0x0f,
         NULL, HFILL }
     },
@@ -7148,12 +7142,12 @@ proto_register_gsm_a_bssmap(void)
         NULL, HFILL }
     },
     { &hf_gsm_a_bssmap_be_rnc_id,
-        { "RNC-ID","gsm_a.be.rnc_id",
+        { "RNC-ID","gsm_a_bssmap.be.rnc_id",
         FT_UINT16,BASE_DEC,  NULL, 0x0,
         NULL, HFILL }
     },
     { &hf_gsm_a_bssmap_apdu_protocol_id,
-        { "Protocol ID", "gsm_a.apdu_protocol_id",
+        { "Protocol ID", "gsm_a_bssmap.apdu_protocol_id",
         FT_UINT8, BASE_DEC, VALS(gsm_a_apdu_protocol_id_strings), 0x0,
         "APDU embedded protocol id", HFILL }
     },
index 61e5d3d2b29947f0dff4beef0e79cb2fbd3ef26e..ac2b2d855c7151b815f3d5d8e366d679181ed49b 100644 (file)
@@ -68,6 +68,12 @@ const value_string gsm_common_elem_strings[] = {
     { 0, NULL }
 };
 
+static const true_false_string gsm_a_extension_value = {
+    "No Extension",
+    "Extended"
+};
+
+
 /* Mobile Station Classmark Value strings
  */
 
@@ -555,11 +561,14 @@ static int hf_gsm_a_tmgi_mcc_mnc_ind = -1;
 static int hf_gsm_a_mbs_ses_id_ind = -1;
 static int hf_gsm_a_mbs_service_id = -1;
 static int hf_gsm_a_mbs_session_id = -1;
+static int hf_gsm_a_length = -1;
+int hf_gsm_a_extension = -1;
 int hf_gsm_a_L3_protocol_discriminator = -1;
 int hf_gsm_a_call_prio = -1;
 int hf_gsm_a_skip_ind = -1;
 int hf_gsm_a_spare_bits = -1;
 int hf_gsm_a_lac = -1;
+
 static int hf_gsm_a_spare_nibble = -1;
 static int hf_gsm_a_type_of_ciph_alg = -1;
 static int hf_gsm_a_att = -1;
@@ -3645,6 +3654,16 @@ proto_register_gsm_a_common(void)
         FT_UINT8, BASE_HEX, NULL, 0x0,
         NULL, HFILL }
     },
+    { &hf_gsm_a_length,
+        { "Length",     "gsm_a.len",
+        FT_UINT16, BASE_DEC, NULL, 0,
+        NULL, HFILL }
+    },
+    { &hf_gsm_a_extension,
+        { "Extension", "gsm_a.extension",
+        FT_BOOLEAN, 8, TFS(&gsm_a_extension_value), 0x80,
+        NULL, HFILL }
+    },
     { &hf_gsm_a_L3_protocol_discriminator,
         { "Protocol discriminator", "gsm_a.L3_protocol_discriminator",
         FT_UINT8, BASE_HEX, VALS(protocol_discriminator_vals), 0x0f,
@@ -4328,7 +4347,7 @@ proto_register_gsm_a_common(void)
     /* Register the protocol name and description */
 
     proto_a_common =
-    proto_register_protocol("GSM A-I/F COMMON", "GSM COMMON", "gsm_a_common");
+    proto_register_protocol("GSM A-I/F COMMON", "GSM COMMON", "gsm_a");
 
     proto_register_field_array(proto_a_common, hf, array_length(hf));
 
index ffc1224168bf98cca239932b5a7ddcb0099cd076..510068bdbef3686cc48a9e29d02ffd67875b79d0 100644 (file)
@@ -86,7 +86,6 @@ extern const value_string gsm_bssmap_elem_strings[];
 extern gint ett_gsm_bssmap_elem[];
 extern elem_fcn bssmap_elem_fcn[];
 extern int hf_gsm_a_bssmap_elem_id;
-extern int hf_gsm_a_bssmap_cell_ci;
 
 extern const value_string gsm_dtap_elem_strings[];
 extern gint ett_gsm_dtap_elem[];
@@ -172,7 +171,6 @@ guint16 dissect_description_of_velocity(tvbuff_t *tvb, proto_tree *tree, packet_
 
 
 /* common field values */
-extern int hf_gsm_a_length;
 extern int hf_gsm_a_extension;
 extern int hf_gsm_a_tmsi;
 extern int hf_gsm_a_L3_protocol_discriminator;
index 0ac4c22fe8858f278bf8c05c52521a8379c1d9d4..fd5d6e2cda6c6b70044ebd2e1f5d13eb6b2c028b 100644 (file)
@@ -422,7 +422,6 @@ static int hf_gsm_a_dtap_cause_ss_diagnostics       = -1;
 static int hf_gsm_a_dtap_emergency_bcd_num     = -1;
 static int hf_gsm_a_dtap_emerg_num_info_length = -1;
 
-int hf_gsm_a_extension = -1;
 static int hf_gsm_a_dtap_type_of_number = -1;
 static int hf_gsm_a_dtap_numbering_plan_id = -1;
 
@@ -2416,11 +2415,6 @@ de_call_state(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 o
        return(1);
 }
 
-static const true_false_string gsm_a_extension_value = {
-       "No Extension",
-       "Extended"
-};
-
 /*
  * Helper function for BCD address decoding
  */
@@ -6607,11 +6601,6 @@ proto_register_gsm_a_dtap(void)
                FT_UINT8, BASE_HEX, 0, 0x0,
                NULL, HFILL }
        },
-       { &hf_gsm_a_extension,
-               { "Extension", "gsm_a.extension",
-               FT_BOOLEAN, 8, TFS(&gsm_a_extension_value), 0x80,
-               NULL, HFILL }
-       },
        { &hf_gsm_a_dtap_type_of_number,
                { "Type of number", "gsm_a_dtap.type_of_number",
                FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_type_of_number_values), 0x70,
index 4fdb8a95c2828326096e42356858cf5c1c14a507..b7bb02f205907c337a5b0257e96fe755acc3cf04 100644 (file)
@@ -633,6 +633,7 @@ static int hf_gsm_a_rr_si2quater_position = -1;
 static int hf_gsm_a_rr_si13alt_position = -1;
 static int hf_gsm_a_rr_prio_thr = -1;
 static int hf_gsm_a_rr_lsa_offset = -1;
+static int hf_gsm_a_rr_cell_id = -1;
 static int hf_gsm_a_rr_paging_channel_restructuring = -1;
 static int hf_gsm_a_rr_nln_sacch = -1;
 static int hf_gsm_a_rr_nln_status_sacch = -1;
@@ -6834,7 +6835,6 @@ de_rr_si4_rest_oct(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, g
     proto_item  *item2, *item3;
     guint32      curr_offset;
     gint         bit_offset, bit_offset_sav;
-    guint        value;
     guint8       tvb_len = tvb_length(tvb);
     guint16      bit_len = tvb_len << 3;
 
@@ -6884,8 +6884,7 @@ de_rr_si4_rest_oct(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, g
 
         if (gsm_rr_csn_HL_flag(tvb, subtree2, bit_len, bit_offset++, "Cell Identity", "Present", "Not present"))
         { /* Cell Identity */
-            value = tvb_get_bits16(tvb, bit_offset, 16, ENC_BIG_ENDIAN);
-            proto_tree_add_uint(subtree2, hf_gsm_a_bssmap_cell_ci, tvb, bit_offset>>3, 2, value);
+            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_cell_id, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
             bit_offset += 16;
         }
 
@@ -11465,6 +11464,11 @@ proto_register_gsm_a_rr(void)
                 FT_UINT8, BASE_DEC, VALS(gsm_a_rr_lsa_offset_vals), 0x0,
                 "Offset to be used for LSA cell re selection between cells with the same LSA priorities (LSA Offset)", HFILL }
             },
+            { &hf_gsm_a_rr_cell_id,
+              { "Cell Identity", "gsm_a_rr.cell_id",
+                FT_UINT16, BASE_HEX_DEC, 0, 0x0,
+                NULL, HFILL }
+            },
             { &hf_gsm_a_rr_paging_channel_restructuring,
               { "Paging Channel Restructuring", "gsm_a_rr.paging_channel_restructuring",
                 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_paging_channel_restructuring_value), 0x0,
index aa377aed13223256ab6821d696c53e8b547007d0..c7ddd15f6749539fb30bbdf49455dfa83d89213b 100644 (file)
@@ -1053,57 +1053,57 @@ proto_register_gsm_bssmap_le(void)
                    NULL, HFILL}
                },
                { &hf_gsm_bssmap_le_acq_ass,
-          { "Acquisition Assistance", "bssap.acq_ass",
+          { "Acquisition Assistance", "gsm_bssmap_le.acq_ass",
             FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x80,
             NULL, HFILL }
                },
                { &hf_gsm_bssmap_le_ref_time,
-          { "Reference Time", "bssap.ref_time",
+          { "Reference Time", "gsm_bssmap_le.ref_time",
             FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x40,
             NULL, HFILL }
                },
                { &hf_gsm_bssmap_le_ref_loc,
-          { "Reference Location", "bssap.ref_loc",
+          { "Reference Location", "gsm_bssmap_le.ref_loc",
             FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x20,
             NULL, HFILL }
                },
                { &hf_gsm_bssmap_le_dgps_corr,
-          { "DGPS Corrections", "bssap.gps_corr",
+          { "DGPS Corrections", "gsm_bssmap_le.gps_corr",
             FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x08,
             NULL, HFILL }
                },
                { &hf_gsm_bssmap_le_nav_mod,
-          { "Navigation Model", "bssap.nav_mod",
+          { "Navigation Model", "gsm_bssmap_le.nav_mod",
             FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x10,
             NULL, HFILL }
                },
                { &hf_gsm_bssmap_le_iono_mod,
-          { "Ionospheric Model", "bssap.iono_mod",
+          { "Ionospheric Model", "gsm_bssmap_le.iono_mod",
             FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x04,
             NULL, HFILL }
                },
                { &hf_gsm_bssmap_le_utc_mod,
-          { "UTC Model", "bssap.utc_mod",
+          { "UTC Model", "gsm_bssmap_le.utc_mod",
             FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x02,
             NULL, HFILL }
                },
                { &hf_gsm_bssmap_le_almanac,
-          { "Almanac", "bssap.almanac",
+          { "Almanac", "gsm_bssmap_le.almanac",
             FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x01,
             NULL, HFILL }
                },
                { &hf_gsm_bssmap_le_ephemeris_ext_chk,
-          { "Ephemeris Extension Check", "bssap.ephemeris_ext_chk",
+          { "Ephemeris Extension Check", "gsm_bssmap_le.ephemeris_ext_chk",
             FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x04,
             NULL, HFILL }
                },
                { &hf_gsm_bssmap_le_ephemeris_ext,
-          { "Ephemeris Extension", "bssap.ephemeris_ext",
+          { "Ephemeris Extension", "gsm_bssmap_le.ephemeris_ext",
             FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x02,
             NULL, HFILL }
                },
                { &hf_gsm_bssmap_le_real_time_int,
-          { "Real-Time Integrity", "bssap.real_time_int",
+          { "Real-Time Integrity", "gsm_bssmap_le.real_time_int",
             FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x01,
             NULL, HFILL }
                },
index 1256737a2ea63200f4030ef00f4171961de0fd6e..23926e09ffa0ade97f65599516ee56dab32589c2 100644 (file)
@@ -1620,7 +1620,7 @@ proto_register_gsm_sim(void)
                },
 
                { &hf_cat_ber_tag,
-                       { "BER-TLV Tag", "cat.ber_tlv_tag",
+                       { "BER-TLV Tag", "gsm_sim.cat.ber_tlv_tag",
                          FT_UINT8, BASE_HEX, VALS(ber_tlv_cat_tag_vals), 0,
                          "Card Application Toolkit BER-TLV tag", HFILL },
                },