Dissect channel needed.
authorAnders Broman <anders.broman@ericsson.com>
Tue, 7 Feb 2006 04:57:30 +0000 (04:57 -0000)
committerAnders Broman <anders.broman@ericsson.com>
Tue, 7 Feb 2006 04:57:30 +0000 (04:57 -0000)
svn path=/trunk/; revision=17194

epan/dissectors/packet-bssap.c
epan/dissectors/packet-gsm_a.c
epan/dissectors/packet-gsm_a.h

index 58f8df562d0f8107dff9850b1aa944cb295d054c..fba71203468c2e105f6093eaea98c9e97d022dbe 100644 (file)
@@ -674,8 +674,7 @@ dissect_bssap_channel_needed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
         * value part of the Channel Needed IE defined in 3GPP TS 44.018.
         * 10.5.2.8 Channel Needed
         */
-       proto_tree_add_item(ie_tree, hf_bssap_plus_ie_data, tvb, offset, ie_len, FALSE);
-
+       de_rr_chnl_needed(tvb, ie_tree, offset, ie_len, NULL, 0);
 
        return offset + ie_len;
 
index 99e3958a0e2f777367a5e1d6318524c8ef4db489..9b49eb0ae38cd4884a62d0e9cef54feb035db383 100644 (file)
@@ -1143,6 +1143,8 @@ static int hf_gsm_a_rr_cm_cng_msg_req = -1;
 static int hf_gsm_a_rr_utran_cm_cng_msg_req = -1;
 static int hf_gsm_a_rr_cdma200_cm_cng_msg_req = -1;
 static int hf_gsm_a_rr_geran_iu_cm_cng_msg_req = -1;
+static int hf_gsm_a_rr_chnl_needed_ch1 = -1;
+static int hf_gsm_a_rr_chnl_needed_ch2 = -1;
 static int hf_gsm_a_rr_suspension_cause = -1;
 static int hf_ROS_component = -1;
 static int hf_ROS_invoke = -1;                    /* Invoke */
@@ -1285,7 +1287,7 @@ static dgt_set_t Dgt_tbcd = {
     }
 };
 
-static dgt_set_t Dgt_msid = {
+static dgt_set_t Dgt1_9_bcd = {
     {
   /*  0   1   2   3   4   5   6   7   8   9   a   b   c   d   e */
      '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?'
@@ -3147,8 +3149,8 @@ typedef enum
 /* [3]  10.5.2.7a      UTRAN predefined configuration status information / START-CS / UE CapabilityUTRAN Classmark information element 218
  * [3]  10.5.2.7b      (void) */
        DE_RR_CM_ENQ_MASK,                              /* [3]  10.5.2.7c       Classmark Enquiry Mask          */
-/* [3]  10.5.2.7d      GERAN Iu Mode Classmark information element
* [3]  10.5.2.8       Channel Needed
+/* [3]  10.5.2.7d      GERAN Iu Mode Classmark information element                                             */
      DE_RR_CHNL_NEEDED,                              /* [3]  10.5.2.8        Channel Needed
  * [3]  10.5.2.8a      (void)  
  * [3]  10.5.2.8b      Channel Request Description 2 */
        DE_RR_CIP_MODE_SET,                             /* [3]  10.5.2.9        Cipher Mode Setting                     */
@@ -3504,7 +3506,7 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_st
            tvb, curr_offset, 1,
            "%s :  Identity Digit 1: %c",
            a_bigbuf,
-           Dgt_msid.out[(oct & 0xf0) >> 4]);
+           Dgt1_9_bcd.out[(oct & 0xf0) >> 4]);
 
        odd = oct & 0x08;
 
@@ -3513,13 +3515,13 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_st
        proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, FALSE);
 
 
-       a_bigbuf[0] = Dgt_msid.out[(oct & 0xf0) >> 4];
+       a_bigbuf[0] = Dgt1_9_bcd.out[(oct & 0xf0) >> 4];
        curr_offset++;
 
        poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
 
        my_dgt_tbcd_unpack(&a_bigbuf[1], poctets, len - (curr_offset - offset),
-           &Dgt_msid);
+           &Dgt1_9_bcd);
 
        proto_tree_add_string_format(tree,
            ((oct & 0x07) == 3) ? hf_gsm_a_imeisv : hf_gsm_a_imsi,
@@ -3553,20 +3555,20 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_st
            tvb, curr_offset, 1,
            "%s :  Identity Digit 1: %c",
            a_bigbuf,
-           Dgt_msid.out[(oct & 0xf0) >> 4]);
+           Dgt1_9_bcd.out[(oct & 0xf0) >> 4]);
 
        proto_tree_add_item(tree, hf_gsm_a_odd_even_ind, tvb, curr_offset, 1, FALSE);
 
        proto_tree_add_item(tree, hf_gsm_a_mobile_identity_type, tvb, curr_offset, 1, FALSE);
 
 
-       a_bigbuf[0] = Dgt_msid.out[(oct & 0xf0) >> 4];
+       a_bigbuf[0] = Dgt1_9_bcd.out[(oct & 0xf0) >> 4];
        curr_offset++;
 
        poctets = tvb_get_ephemeral_string(tvb, curr_offset, len - (curr_offset - offset));
 
        my_dgt_tbcd_unpack(&a_bigbuf[1], poctets, len - (curr_offset - offset),
-           &Dgt_msid);
+           &Dgt1_9_bcd);
 
        proto_tree_add_string_format(tree,
            hf_gsm_a_imei,
@@ -4185,6 +4187,30 @@ de_rr_cm_enq_mask(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc
 }
 /*
  * [3] 10.5.2.8 Channel Needed
+ */
+static const value_string gsm_a_rr_channel_needed_vals[] = {
+{ 0x00,                "Any channel"},
+{ 0x01,                "SDCCH"},
+{ 0x02,                "TCH/F (Full rate)"},
+{ 0x03,                "TCH/H or TCH/F (Dual rate)"},
+       { 0,    NULL }
+};
+guint8
+de_rr_chnl_needed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
+{
+    guint32    curr_offset;
+
+    len = len;
+    curr_offset = offset;
+       
+       proto_tree_add_item(tree, hf_gsm_a_rr_chnl_needed_ch1, tvb, curr_offset, 1, FALSE);
+       proto_tree_add_item(tree, hf_gsm_a_rr_chnl_needed_ch2, tvb, curr_offset, 1, FALSE);
+
+       curr_offset = curr_offset + 1;
+
+    return(curr_offset - offset);
+}
+/*
  * [3] 10.5.2.8a Channel Request Description
  * [3] 10.5.2.8b Channel Request Description 2
  */
@@ -12486,8 +12512,8 @@ static guint8 (*dtap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset
  * [3]  10.5.2.7b      (void) */
 
        de_rr_cm_enq_mask,                              /* [3]  10.5.2.7c       Classmark Enquiry Mask          */
-/* [3]  10.5.2.7d      GERAN Iu Mode Classmark information element
* [3]  10.5.2.8       Channel Needed
+/* [3]  10.5.2.7d      GERAN Iu Mode Classmark information element                                             */
      de_rr_chnl_needed,                              /* [3]  10.5.2.8        Channel Needed
  * [3]  10.5.2.8a      (void)  
  * [3]  10.5.2.8b      Channel Request Description 2 */
        de_rr_cip_mode_set,                                     /* [3]  10.5.2.9        Cipher Mode Setting             */
@@ -18601,6 +18627,16 @@ proto_register_gsm_a(void)
                FT_BOOLEAN,8,  TFS(&gsm_a_msg_req_value), 0x04,          
                "GERAN IU MODE CLASSMARK CHANGE", HFILL }
        },
+       { &hf_gsm_a_rr_chnl_needed_ch1,
+               { "Channel 1","gsm_a.rr_chnl_needed_ch1",
+               FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_channel_needed_vals), 0x03,          
+               "Channel 1", HFILL }
+       },
+       { &hf_gsm_a_rr_chnl_needed_ch2,
+               { "Channel 2","gsm_a.rr_chnl_needed_ch1",
+               FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_channel_needed_vals), 0x0c,          
+               "Channel 2", HFILL }
+       },
        { &hf_gsm_a_rr_suspension_cause,
                { "Suspension cause value","gsm_a.rr.suspension_cause",
                FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_suspension_cause_vals), 0x0,          
index b9b1b822c9f51735fca17543ced15949f490f8bb..f809c00d9b3460abe358333563170fb6a79d212a 100644 (file)
@@ -81,12 +81,14 @@ guint8 de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc
 guint8 de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
 
 guint8 de_rr_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint8 de_rr_chnl_needed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
 guint8 de_rr_cip_mode_set(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
 guint8 de_rr_cell_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
 guint8 de_rr_ch_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
 guint8 de_rr_cm_enq_mask(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
 guint8 de_rr_tlli(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
 guint8 de_rr_sus_cau(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint8 de_rr_chnl_needed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
 
 guint8 de_rej_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
 void dtap_rr_ho_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len);