Implement TLV-E and LV-E type IE dissection (2 byte length value).
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 23 Dec 2008 20:49:15 +0000 (20:49 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 23 Dec 2008 20:49:15 +0000 (20:49 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27100 f5534014-38df-0310-8fa8-9805f1628bb7

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_gm.c
epan/dissectors/packet-gsm_a_rp.c
epan/dissectors/packet-gsm_a_rr.c
epan/dissectors/packet-gsm_bsslap.c
epan/dissectors/packet-gsm_bssmap_le.c
epan/dissectors/packet-nas_eps.c

index 64a2ab2cbc087d23d3f93aa4848768b27253c0dd..607811cdf166615b450ae287489649b9f1bc6c13 100644 (file)
@@ -563,7 +563,7 @@ gint ett_gsm_bssmap_elem[NUM_GSM_BSSMAP_ELEM];
 /*
  * [2] 3.2.2.2 Circuit Identity Code
  */
-static guint8
+static guint16
 be_cic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
 {
        guint32 curr_offset;
@@ -604,7 +604,7 @@ be_cic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *ad
 /*
  * 3.2.2.4     Resource Available
  */
-static guint8
+static guint16
 be_res_avail(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -627,7 +627,7 @@ be_res_avail(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gch
 /*
  * [2] 3.2.2.5 Cause
  */
-static guint8
+static guint16
 be_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
 {
        guint8  oct;
@@ -819,7 +819,7 @@ be_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_
 /*
  * [2] 3.2.2.7 TMSI
  */
-static guint8
+static guint16
 be_tmsi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
 {
        guint32 curr_offset;
@@ -846,7 +846,7 @@ be_tmsi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_s
 /*
  * [2] 3.2.2.8 Number Of MSs
  */
-static guint8
+static guint16
 be_num_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -864,7 +864,7 @@ be_num_ms(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
  * [2] 3.2.2.9 Layer 3 Header Information
  */
 
-static guint8
+static guint16
 be_l3_header_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -918,7 +918,7 @@ be_l3_header_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc
 /*
  * [2] 3.2.2.10 Encryption Information
  */
-static guint8
+static guint16
 be_enc_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -974,7 +974,7 @@ be_enc_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *a
 /*
  * [2] 3.2.2.11 Channel Type
  */
-guint8
+guint16
 be_chan_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
 {
        guint8  oct;
@@ -1380,7 +1380,7 @@ be_chan_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *
 /*
  * 3.2.2.12    Periodicity
  */
-static guint8
+static guint16
 be_periodicity(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1398,7 +1398,7 @@ static const true_false_string bssmap_tarr_vals = {
    "The total number of accessible channels is requested",
    "No extra Resource Information is requested"
 };
-static guint8
+static guint16
 be_ext_res_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1418,7 +1418,7 @@ be_ext_res_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
 /*
  * 3.2.2.14    Total Resource Accessible
  */
-static guint8
+static guint16
 be_tot_res_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1439,7 +1439,7 @@ be_tot_res_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
  * 3.2.2.15    LSA Identifier
  * The octets 3-5 are coded as specified in 3GPP TS 23.003, 'Identification of Localised Service Area'. Bit 8 of octet 3 is the MSB.
  */
-static guint8
+static guint16
 be_lsa_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1463,7 +1463,7 @@ be_lsa_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
 /*
  * 3.2.2.16    LSA Identifier List
  */
-static guint8
+static guint16
 be_lsa_id_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1487,7 +1487,7 @@ be_lsa_id_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
  * [2] 3.2.2.17 Cell Identifier
  * Formats everything after the discriminator, shared function
  */
-guint8
+guint16
 be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len, guint8 disc)
 {
        guint32 value;
@@ -1589,7 +1589,7 @@ be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar
        return(curr_offset - offset);
 }
 
-static guint8
+static guint16
 be_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
 {
        guint8  oct;
@@ -1623,7 +1623,7 @@ be_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
 /*
  * [2] 3.2.2.18 Priority
  */
-static guint8
+static guint16
 be_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
 {
        guint8  oct;
@@ -1700,7 +1700,7 @@ be_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *a
 /*
  * 3.2.2.21    Interference Band To Be Used
  */
-static guint8
+static guint16
 be_int_band(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1726,7 +1726,7 @@ static const true_false_string bssmap_lsa_only_value = {
    "Allowing emergency call"
 };
 
-static guint8
+static guint16
 be_lsa_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1756,7 +1756,7 @@ be_lsa_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gcha
 /*
  * [2] 3.2.2.24 Layer 3 Information
  */
-static guint8
+static guint16
 be_l3_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1784,7 +1784,7 @@ be_l3_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *ad
 /*
  * [2] 3.2.2.25 DLCI
  */
-static guint8
+static guint16
 be_dlci(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -1816,7 +1816,7 @@ be_dlci(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *a
 /*
  * [2] 3.2.2.26 Downlink DTX Flag
  */
-static guint8
+static guint16
 be_down_dtx_flag(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint   oct;
@@ -1849,11 +1849,11 @@ be_down_dtx_flag(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * [2] 3.2.2.27 Cell Identifier List
  */
-guint8
+guint16
 be_cell_id_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
 {
        guint8  oct;
-       guint consumed;
+       guint16 consumed;
        guint8  disc;
        guint8  num_cells;
        guint32 curr_offset;
@@ -1931,7 +1931,7 @@ static const value_string gsm_a_bssap_cell_id_list_seg_cell_id_disc_vals[] = {
        { 0,    NULL }
 };
 
-static guint8
+static guint16
 be_cell_id_list_seg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1957,7 +1957,7 @@ be_cell_id_list_seg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _
 /*
  * 3.2.2.27b   Cell Identifier List Segment for established cells
  */
-static guint8
+static guint16
 be_cell_id_lst_seg_f_est_cells(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1977,7 +1977,7 @@ be_cell_id_lst_seg_f_est_cells(tvbuff_t *tvb, proto_tree *tree, guint32 offset,
 /*
  * 3.2.2.27c   Cell Identifier List Segment for cells to be established
  */
-static guint8
+static guint16
 be_cell_id_lst_seg_f_cell_tb_est(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2000,7 +2000,7 @@ be_cell_id_lst_seg_f_cell_tb_est(tvbuff_t *tvb, proto_tree *tree, guint32 offset
 /*
  * 3.2.2.27e   Cell Identifier List Segment for released cells - no user present
  */
-static guint8 
+static guint16 
 be_cell_id_lst_seg_f_rel_cell(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2020,7 +2020,7 @@ be_cell_id_lst_seg_f_rel_cell(tvbuff_t *tvb, proto_tree *tree, guint32 offset, g
 /*
  * 3.2.2.27f   Cell Identifier List Segment for not established cells - no establishment possible 
  */
-static guint8
+static guint16
 be_cell_id_lst_seg_f_not_est_cell(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2052,7 +2052,7 @@ static const value_string gsm_a_bssap_resource_indication_vals[] = {
        { 0x4,  "No resource information expected"},
        { 0,    NULL }
 };
-static guint8
+static guint16
 be_res_ind_method(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2074,7 +2074,7 @@ be_res_ind_method(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
 /*
  * 3.2.2.31 Circuit Identity Code List
  */
-static guint8
+static guint16
 be_cic_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2089,7 +2089,7 @@ be_cic_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gcha
 /*
  * 3.2.2.32 Diagnostics
  */
-static guint8
+static guint16
 be_diag(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2142,7 +2142,7 @@ static const value_string gsm_a_bssmap_channel_vals[] = {
        { 4,    "8 Full Rate TCHs" },
        { 0, NULL },
 };
-static guint8
+static guint16
 be_chosen_chan(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2167,7 +2167,7 @@ be_chosen_chan(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
 /*
  * [2] 3.2.2.34 Cipher Response Mode
  */
-static guint8
+static guint16
 be_ciph_resp_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2201,7 +2201,7 @@ be_ciph_resp_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
 /*
  * [2] 3.2.2.35 Layer 3 Message Contents
  */
-static guint8
+static guint16
 be_l3_msg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2229,7 +2229,7 @@ be_l3_msg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
 /*
  * [2] 3.2.2.36 Channel Needed
  */
-static guint8
+static guint16
 be_cha_needed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2261,7 +2261,7 @@ be_cha_needed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
 /*
  * [2] 3.2.2.43 Forward Indicator
  */
-static guint8
+static guint16
 be_for_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2304,7 +2304,7 @@ be_for_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
 /*
  * [2] 3.2.2.44 Chosen Encryption Algorithm
  */
-static guint8
+static guint16
 be_chosen_enc_alg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
 {
        guint8  oct;
@@ -2348,7 +2348,7 @@ be_chosen_enc_alg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
 /*
  * [2] 3.2.2.45 Circuit Pool
  */
-static guint8
+static guint16
 be_cct_pool(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
 {
        guint8  oct;
@@ -2395,7 +2395,7 @@ be_cct_pool(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gcha
 /*
  * [2] 3.2.2.49 Current Channel Type 1
  */
-static guint8
+static guint16
 be_curr_chan_1(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2420,7 +2420,7 @@ be_curr_chan_1(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
 /*
  * [2] 3.2.2.50 Queuing Indicator
  */
-static guint8
+static guint16
 be_que_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2459,7 +2459,7 @@ be_que_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
 /*
  * [2] 3.2.2.51 Speech Version
  */
-static guint8
+static guint16
 be_speech_ver(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
 {
        guint8  oct;
@@ -2508,7 +2508,7 @@ be_speech_ver(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
 /*
  * 3.2.2.52 Assignment Requirement
  */
-static guint8
+static guint16
 be_ass_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2553,7 +2553,7 @@ static const value_string gsm_a_bssmap_smi_vals[] = {
        { 0, NULL },
 };
 
-static guint8
+static guint16
 be_conf_evo_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2590,7 +2590,7 @@ static const value_string lcs_priority_vals[] = {
     { 0, NULL}
 };
 
-static guint8
+static guint16
 be_lcs_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2607,7 +2607,7 @@ be_lcs_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gcha
 /*
  * 3.2.2.63 Location Type (Location Type element of 3GPP TS 49.031 BSSAP-LE.)
  */
-static guint8
+static guint16
 be_loc_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2635,7 +2635,7 @@ be_loc_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gcha
  * The Location Estimate field is composed of 1 or more octets with an internal structure
  * according to 3GPP TS 23.032.
  */
-static guint8
+static guint16
 be_loc_est(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        tvbuff_t *data_tvb;
@@ -2652,7 +2652,7 @@ be_loc_est(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
  * 3.2.2.65 Positioning Data
  * Positioning Data element of 3GPP TS 49.031 BSSAP-LE.
  */
-static guint8
+static guint16
 be_pos_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2718,7 +2718,7 @@ static const value_string gsm_a_apdu_protocol_id_strings[] = {
        { 0, NULL },
 };
 
-static guint8
+static guint16
 be_apdu(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2779,7 +2779,7 @@ be_apdu(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_s
  * 3.2.2.70 GPS Assistance Data
  * Requested GPS Data element of 3GPP TS 49.031 BSSAP-LE.
  */
-static guint8 
+static guint16 
 be_gps_assist_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2800,7 +2800,7 @@ be_gps_assist_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U
  /* 3.2.2.72 Return Error Request
   * Return Error Request element of 3GPP TS 49.031 BSSAP-LE.
   */
-static guint8
+static guint16
 be_ret_err_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2815,7 +2815,7 @@ be_ret_err_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
  * 3.2.2.73 Return Error Cause
  * Return Error Cause element of 3GPP TS 49.031 BSSAP-LE.
  */
-static guint8
+static guint16
 be_ret_err_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2830,7 +2830,7 @@ be_ret_err_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
  * 3.2.2.74 Segmentation
  * Segmentation element of 3GPP TS 49.031 BSSAP-LE.
  */
-static guint8
+static guint16
 be_seg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2855,7 +2855,7 @@ static const value_string gsm_a_bssmap_serv_ho_inf_vals[] = {
        { 7,    "no information available for service based handover" },
        { 0, NULL },
 };
-static guint8
+static guint16
 be_serv_ho(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2873,7 +2873,7 @@ be_serv_ho(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
  * 3.2.2.76 Source RNC to target RNC transparent information (UMTS)
  */
 
-static guint8
+static guint16
 be_src_rnc_to_tar_rnc_umts(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2891,7 +2891,7 @@ be_src_rnc_to_tar_rnc_umts(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guin
 /*
  * 3.2.2.77 Source RNC to target RNC transparent information (cdma2000)
  */
-static guint8
+static guint16
 be_src_rnc_to_tar_rnc_cdma(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2909,7 +2909,7 @@ be_src_rnc_to_tar_rnc_cdma(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guin
  * 3.2.2.78 GERAN Classmark
  */
 
-static guint8
+static guint16
 be_geran_cls_m(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2930,7 +2930,7 @@ be_geran_cls_m(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
 /*
  * 3.2.2.80 New BSS to Old BSS Information
  */
-static guint8
+static guint16
 be_new_bss_to_old_bss_inf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2944,7 +2944,7 @@ be_new_bss_to_old_bss_inf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint
 /*
  * 3.2.2.81 Inter-System Information 
  */
-static guint8
+static guint16
 be_inter_sys_inf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2958,7 +2958,7 @@ be_inter_sys_inf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * 3.2.2.82 SNA Access Information 
  */
-static guint8
+static guint16
 be_sna_acc_inf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2996,7 +2996,7 @@ static const value_string gsm_a_bssmap_paging_cause_vals[] = {
        { 0, NULL },
 };
 
-static guint8
+static guint16
 be_paging_inf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3018,7 +3018,7 @@ be_paging_inf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
 /*
  * 3.2.2.87    Velocity Estimate
  */
-static guint8
+static guint16
 be_vel_est(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3061,7 +3061,7 @@ static const true_false_string gsm_bssmap_bss_tcp_vals = {
        "Talker channel parameter is not applicable to this call"
 };
 
-static guint8
+static guint16
 be_vgcs_feat_flg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3090,7 +3090,7 @@ static const value_string gsm_a_bssmap_talker_pri_vals[] = {
        { 0, NULL },
 };
 
-static guint8
+static guint16
 be_talker_pri(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3112,7 +3112,7 @@ be_talker_pri(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
 /*
  * 3.2.2.91    Talker Identity
  */
-static guint8
+static guint16
 be_talker_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3129,7 +3129,7 @@ be_talker_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gch
 /*
  * 3.2.2.92    SMS to VGCS 
  */
-static guint8
+static guint16
 be_sms_to_vgcs(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3147,7 +3147,7 @@ be_sms_to_vgcs(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
 /*
  * 3.2.2.93    VGCS talker mode
  */
-static guint8
+static guint16
 be_vgcs_talker_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3165,7 +3165,7 @@ be_vgcs_talker_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _
  * 3.2.2.95    GANSS Assistance Data
  * The GANSS Assistance Data octets 3 to n are coded as the Requested GANSS Data element of 3GPP TS 49.031 (BSSAP-LE)
  */
-guint8
+guint16
 be_ganss_ass_dta(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3179,7 +3179,7 @@ be_ganss_ass_dta(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * 3.2.2.96    GANSS Positioning Data
  */
-guint8
+guint16
 be_ganss_pos_dta(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3193,7 +3193,7 @@ be_ganss_pos_dta(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * 3.2.2.97    GANSS Location Type
  */
-guint8
+guint16
 be_ganss_loc_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3213,7 +3213,7 @@ be_ganss_loc_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
 /*
  * 3.2.2.100   Application Data Information
  */
-static guint8
+static guint16
 be_app_data_inf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3231,7 +3231,7 @@ be_app_data_inf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
  /*
   * 3.2.2.102  AoIP Transport Layer Address 
   */
-static guint8
+static guint16
 be_aoip_trans_lay_add(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3322,7 +3322,7 @@ static const value_string bssap_speech_codec_values[] = {
        { 0x0d,         "OHR_AMR-WB" },
        { 0,            NULL } 
 };
-static guint8
+static guint16
 be_speech_codec_lst(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset, consumed = 0;
@@ -3404,7 +3404,7 @@ static const true_false_string bssmap_pt2_vals = {
        "PCM over A-Interface with TDM as transport is selected for this Codec Type",
        "PCM over A-Interface with TDM as transport is not selected for this Codec Type"
 };
-static guint8
+static guint16
 be_speech_codec(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset, consumed = 0;
@@ -3472,7 +3472,7 @@ be_speech_codec(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * 3.2.2.105   Call Identifier
  */
-static guint8
+static guint16
 be_call_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3492,7 +3492,7 @@ be_call_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
 /*
  * 3.2.2.106   Call Identifier List 
  */
-static guint8
+static guint16
 be_call_id_lst(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3509,7 +3509,7 @@ be_call_id_lst(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
        return(len);
 }
 
-guint8 (*bssmap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
+guint16 (*bssmap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
        be_cic, /* Circuit Identity Code */
        NULL,   /* Reserved */
        be_res_avail,   /* Resource Available */
@@ -4443,7 +4443,7 @@ bssmap_ciph_mode_complete(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint
 static void
 bssmap_cl3_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
 {
-       guint consumed;
+       guint32 consumed;
        guint32 curr_offset;
        guint   curr_len;
 
@@ -4476,7 +4476,7 @@ bssmap_cl3_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
 static void
 bssmap_sapi_rej(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
 {
-       guint consumed;
+       guint32 consumed;
        guint32 curr_offset;
        guint   curr_len;
 
index 032eaad86dd13be44704ffdc292ad31a2df9bc81..f6b387fb7b2f7a57542ab1fae4d6e1f69c2b04a1 100644 (file)
@@ -633,18 +633,18 @@ static int get_hf_elem_id(int pdu_type)
 /*
  * Type Length Value (TLV) element dissector
  */
-guint8 elem_tlv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len _U_, const gchar *name_add)
+guint16 elem_tlv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len _U_, const gchar *name_add)
 {
        guint8          oct;
        guint16         parm_len;
        guint8          lengt_length = 1;
-       guint         consumed;
+       guint16         consumed;
        guint32         curr_offset;
        proto_tree              *subtree;
        proto_item              *item;
        const value_string      *elem_names;
        gint            *elem_ett;
-       guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+       guint16 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
 
        curr_offset = offset;
        consumed = 0;
@@ -658,7 +658,6 @@ guint8 elem_tlv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int
                        /* This elements length is in two octets (a bit of a hack here)*/
                        lengt_length = 2;
                        parm_len = tvb_get_ntohs(tvb, curr_offset + 1);
-                       lengt_length = 2;
                        if(parm_len > 255){
                                /* The rest of the logic can't handle length > 255 */
                                DISSECTOR_ASSERT_NOT_REACHED();
@@ -716,22 +715,98 @@ guint8 elem_tlv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int
        return(consumed);
 }
 
+/*
+ * Type Length Value Extended(TLV-E) element dissector
+ * TS 24.007 
+ * information elements of format LV-E or TLV-E with value part consisting of zero, 
+ * one or more octets and a maximum of 65535 octets (type 6). This category is used in EPS only.
+ */
+guint16 elem_tlv_e(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len _U_, const gchar *name_add)
+{
+       guint8          oct;
+       guint16         parm_len;
+       guint8          lengt_length = 1;
+       guint16         consumed;
+       guint32         curr_offset;
+       proto_tree              *subtree;
+       proto_item              *item;
+       const value_string      *elem_names;
+       gint            *elem_ett;
+       guint16 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+
+       curr_offset = offset;
+       consumed = 0;
+
+       SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
+
+       oct = tvb_get_guint8(tvb, curr_offset);
+
+       if (oct == iei){
+               parm_len = tvb_get_ntohs(tvb, curr_offset + 1);
+
+               item = proto_tree_add_text(tree, tvb, curr_offset, parm_len + 1 + 2,
+                       "%s%s",
+                       elem_names[idx].strptr,
+                       (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
+
+               subtree = proto_item_add_subtree(item, elem_ett[idx]);
+
+               proto_tree_add_uint(subtree,
+                       get_hf_elem_id(pdu_type), tvb,
+                       curr_offset, 1, oct);
+
+               proto_tree_add_uint(subtree, hf_gsm_a_length, tvb,
+                       curr_offset + 1, 2, parm_len);
+
+               if (parm_len > 0)
+               {
+                       if (elem_funcs[idx] == NULL)
+                       {
+                               proto_tree_add_text(subtree,
+                                       tvb, curr_offset + 1 + 2, parm_len,
+                                       "Element Value");
+                               /* See ASSERT above */
+                               consumed = parm_len;
+                       }
+                       else
+                       {
+                               gchar *a_add_string;
+
+                               a_add_string=ep_alloc(1024);
+                               a_add_string[0] = '\0';
+                               consumed =
+                               (*elem_funcs[idx])(tvb, subtree, curr_offset + 2,
+                                       parm_len, a_add_string, 1024);
+
+                               if (a_add_string[0] != '\0')
+                               {
+                                       proto_item_append_text(item, "%s", a_add_string);
+                               }
+                       }
+               }
+
+               consumed += 1 + 2;
+       }
+
+       return(consumed);
+}
+
 /*
  * Type Value (TV) element dissector
  *
  * Length cannot be used in these functions, big problem if a element dissector
  * is not defined for these.
  */
-guint8 elem_tv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add)
+guint16 elem_tv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add)
 {
        guint8          oct;
-       guint         consumed;
+       guint16         consumed;
        guint32         curr_offset;
        proto_tree              *subtree;
        proto_item              *item;
        const value_string      *elem_names;
        gint            *elem_ett;
-       guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+       guint16 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
 
        curr_offset = offset;
        consumed = 0;
@@ -794,16 +869,16 @@ guint8 elem_tv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int i
  * Length cannot be used in these functions, big problem if a element dissector
  * is not defined for these.
  */
-guint8 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add)
+guint16 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add)
 {
        guint8          oct;
-       guint         consumed;
+       guint16         consumed;
        guint32         curr_offset;
        proto_tree              *subtree;
        proto_item              *item;
        const value_string      *elem_names;
        gint            *elem_ett;
-       guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+       guint16 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
        char buf[10+1];
 
        curr_offset = offset;
@@ -863,14 +938,14 @@ guint8 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type,
 /*
  * Type (T) element dissector
  */
-guint8 elem_t(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add)
+guint16 elem_t(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add)
 {
        guint8          oct;
        guint32         curr_offset;
-       guint         consumed;
+       guint16         consumed;
        const value_string      *elem_names;
        gint            *elem_ett;
-       guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+       guint16 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
 
        curr_offset = offset;
        consumed = 0;
@@ -897,16 +972,17 @@ guint8 elem_t(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int id
 /*
  * Length Value (LV) element dissector
  */
-guint8 elem_lv(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset, guint len _U_, const gchar *name_add)
+guint16
+elem_lv(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset, guint len _U_, const gchar *name_add)
 {
        guint8          parm_len;
-       guint         consumed;
+       guint16         consumed;
        guint32         curr_offset;
        proto_tree              *subtree;
        proto_item              *item;
        const value_string      *elem_names;
        gint            *elem_ett;
-       guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+       guint16 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
 
        curr_offset = offset;
        consumed = 0;
@@ -957,19 +1033,79 @@ guint8 elem_lv(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32
        return(consumed + 1);
 }
 
+/*
+ * Length Value Extended(LV-E) element dissector
+ */
+guint16 elem_lv_e(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset, guint len _U_, const gchar *name_add)
+{
+       guint16         parm_len;
+       guint16         consumed;
+       guint32         curr_offset;
+       proto_tree              *subtree;
+       proto_item              *item;
+       const value_string      *elem_names;
+       gint            *elem_ett;
+       guint16 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+
+       curr_offset = offset;
+       consumed = 0;
+
+       SET_ELEM_VARS(pdu_type, elem_names, elem_ett, elem_funcs);
+
+       parm_len = tvb_get_ntohs(tvb, curr_offset);
+
+       item = proto_tree_add_text(tree, tvb, curr_offset, parm_len + 2,
+                       "%s%s",
+                       elem_names[idx].strptr,
+                       (name_add == NULL) || (name_add[0] == '\0') ? "" : name_add);
+
+       subtree = proto_item_add_subtree(item, elem_ett[idx]);
+
+       proto_tree_add_uint(subtree, hf_gsm_a_length, tvb,
+               curr_offset, 2, parm_len);
+
+       if (parm_len > 0)
+       {
+               if (elem_funcs[idx] == NULL)
+               {
+                       proto_tree_add_text(subtree,
+                               tvb, curr_offset + 1, parm_len,
+                               "Element Value");
+
+                       consumed = parm_len;
+               }
+               else
+               {
+                       gchar *a_add_string;
+
+                       a_add_string=ep_alloc(1024);
+                       a_add_string[0] = '\0';
+                       consumed =
+                               (*elem_funcs[idx])(tvb, subtree, curr_offset + 1,
+                                       parm_len, a_add_string, 1024);
+
+                       if (a_add_string[0] != '\0')
+                       {
+                               proto_item_append_text(item, "%s", a_add_string);
+                       }
+               }
+       }
+
+       return(consumed + 1);
+}
 /*
  * Value (V) element dissector
  *
  * Length cannot be used in these functions, big problem if a element dissector
  * is not defined for these.
  */
-guint8 elem_v(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset)
+guint16 elem_v(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset)
 {
-       guint         consumed;
+       guint16         consumed;
        guint32         curr_offset;
        const value_string      *elem_names;
        gint            *elem_ett;
-       guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+       guint16 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
 
        curr_offset = offset;
        consumed = 0;
@@ -1006,13 +1142,13 @@ guint8 elem_v(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 o
  * This is expected to be used upper nibble first, as the tables of 24.008.
  */
 
-guint8 elem_v_short(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset)
+guint16 elem_v_short(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset)
 {
-       guint         consumed;
+       guint16         consumed;
        guint32         curr_offset;
        const value_string      *elem_names;
        gint            *elem_ett;
-       guint8 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+       guint16 (**elem_funcs)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
 
        curr_offset = offset;
        consumed = 0;
@@ -1195,7 +1331,7 @@ mcc_mnc_aux(guint8 *octs, gchar *mcc, gchar *mnc)
 /* 3GPP TS 24.008
  * [3] 10.5.1.1 Cell Identity
  */
-guint8
+guint16
 de_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
 {
        guint32 curr_offset;
@@ -1214,7 +1350,7 @@ de_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *ad
 /*
  * [3] 10.5.1.3
  */
-guint8
+guint16
 de_lai(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  octs[3];
@@ -1275,7 +1411,7 @@ static const true_false_string gsm_a_present_vals = {
        "Not present"
 };
 
-guint8
+guint16
 de_mid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
 {
        guint8  oct;
@@ -1478,7 +1614,7 @@ de_mid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_st
 /*
  * [3] 10.5.1.5
  */
-guint8
+guint16
 de_ms_cm_1(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -1518,7 +1654,7 @@ de_ms_cm_1(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
  * [3] 10.5.1.6 Mobile Station Classmark 2 
  * 3GPP TS 24.008 version 7.8.0 Release 7
  */
-guint8
+guint16
 de_ms_cm_2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1585,7 +1721,7 @@ de_ms_cm_2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *ad
  * [3] 10.5.1.7 Mobile Station Classmark 3
  * 3GPP TS 24.008 version 7.8.0 Release 7
  */
-guint8
+guint16
 de_ms_cm_3(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1771,7 +1907,7 @@ the mobile station supports dual carrier in the downlink during DTM
 /*
  * [3] 10.5.1.8
  */
-static guint8
+static guint16
 de_spare_nibble(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1792,7 +1928,7 @@ de_spare_nibble(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * [3] 10.5.1.9 Descriptive group or broadcast call reference
  */
-guint8
+guint16
 de_d_gb_call_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -1868,7 +2004,7 @@ de_d_gb_call_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * [3] 10.5.1.10a PD and SAPI $(CCBS)$
  */
-static guint8
+static guint16
 de_pd_sapi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -1932,7 +2068,7 @@ static const value_string gsm_a_call_prio_vals[] = {
        { 0,                    NULL }
 };
 
-static guint8
+static guint16
 de_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1951,7 +2087,7 @@ de_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *a
 /*
  * [3] 10.5.1.13 PLMN list
  */
-static guint8
+static guint16
 de_plmn_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
 {
        guint8  octs[3];
@@ -1992,7 +2128,7 @@ de_plmn_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *
        return(curr_offset - offset);
 }
 
-guint8 (*common_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
+guint16 (*common_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
        /* Common Information Elements 10.5.1 */
        de_cell_id,     /* Cell Identity */
        NULL /* handled inline */,      /* Ciphering Key Sequence Number */
index 87518a780e181ae1c002ba6600c49a25984da908..755c8237abc8ec3c7d5b9fe393631b6a10d56ed1 100644 (file)
@@ -54,7 +54,7 @@
 #include "packet-sccp.h"
 
 /* PROTOTYPES/FORWARDS */
-typedef guint8 (*elem_fcn)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+typedef guint16 (*elem_fcn)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
 typedef void (*msg_fcn)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len);
 
 typedef struct dgt_set_t
@@ -78,7 +78,7 @@ int my_dgt_tbcd_unpack(
 extern const value_string protocol_discriminator_vals[];
 extern const value_string gsm_a_pd_short_str_vals[];
 
-extern guint8 de_cld_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+extern guint16 de_cld_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
 
 /* Needed to share the packet-gsm_a_common.c functions */
 extern const value_string gsm_bssmap_elem_strings[];
@@ -273,7 +273,12 @@ extern const char* get_gsm_a_msg_string(int pdu_type, int idx);
 /*
  * Type Length Value (TLV) element dissector
  */
-extern guint8 elem_tlv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add);
+extern guint16 elem_tlv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add);
+
+/*
+ * Type Length Value (TLV-E) element dissector
+ */
+extern guint16 elem_tlv_e(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add);
 
 /*
  * Type Value (TV) element dissector
@@ -281,7 +286,7 @@ extern guint8 elem_tlv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_typ
  * Length cannot be used in these functions, big problem if a element dissector
  * is not defined for these.
  */
-extern guint8 elem_tv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add);
+extern guint16 elem_tv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add);
 
 /*
  * Type Value (TV) element dissector
@@ -290,17 +295,22 @@ extern guint8 elem_tv(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type
  * Length cannot be used in these functions, big problem if a element dissector
  * is not defined for these.
  */
-extern guint8 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add);
+extern guint16 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add);
 
 /*
  * Type (T) element dissector
  */
-extern guint8 elem_t(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add);
+extern guint16 elem_t(tvbuff_t *tvb, proto_tree *tree, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add);
 
 /*
  * Length Value (LV) element dissector
  */
-extern guint8 elem_lv(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add);
+extern guint16 elem_lv(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add);
+
+/*
+ * Length Value (LV-E) element dissector
+ */
+extern guint16 elem_lv_e(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add);
 
 /*
  * Value (V) element dissector
@@ -308,7 +318,7 @@ extern guint8 elem_lv(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, g
  * Length cannot be used in these functions, big problem if a element dissector
  * is not defined for these.
  */
-extern guint8 elem_v(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset);
+extern guint16 elem_v(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset);
 
 /*
  * Short Value (V_SHORT) element dissector
@@ -318,7 +328,7 @@ extern guint8 elem_v(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, gu
  * This is expected to be used upper nibble first, as the tables of 24.008.
  */
 
-extern guint8 elem_v_short(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset);
+extern guint16 elem_v_short(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int idx, guint32 offset);
 
 
 #define ELEM_MAND_TLV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition) \
@@ -341,6 +351,25 @@ extern guint8 elem_v_short(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int i
        if (curr_len <= 0) return; \
 }
 
+#define ELEM_MAND_TLV_E(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition) \
+{\
+       if ((consumed = elem_tlv_e(tvb, tree, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, curr_len, EMT_elem_name_addition)) > 0) \
+       { \
+               curr_offset += consumed; \
+               curr_len -= consumed; \
+       } \
+       else \
+       { \
+               proto_tree_add_text(tree, \
+                       tvb, curr_offset, 0, \
+                       "Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
+                       EMT_iei, \
+                       get_gsm_a_msg_string(EMT_pdu_type, EMT_elem_idx), \
+                       (EMT_elem_name_addition == NULL) || (EMT_elem_name_addition[0] == '\0') ? "" : EMT_elem_name_addition \
+                       ); \
+       } \
+       if (curr_len <= 0) return; \
+}
 #define ELEM_OPT_TLV(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
 {\
        if ((consumed = elem_tlv(tvb, tree, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, curr_len, EOT_elem_name_addition)) > 0) \
@@ -351,6 +380,16 @@ extern guint8 elem_v_short(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int i
        if (curr_len <= 0) return; \
 }
 
+#define ELEM_OPT_TLV_E(EOT_iei, EOT_pdu_type, EOT_elem_idx, EOT_elem_name_addition) \
+{\
+       if ((consumed = elem_tlv_e(tvb, tree, (guint8) EOT_iei, EOT_pdu_type, EOT_elem_idx, curr_offset, curr_len, EOT_elem_name_addition)) > 0) \
+       { \
+               curr_offset += consumed; \
+               curr_len -= consumed; \
+       } \
+       if (curr_len <= 0) return; \
+}
+
 #define ELEM_MAND_TV(EMT_iei, EMT_pdu_type, EMT_elem_idx, EMT_elem_name_addition) \
 {\
        if ((consumed = elem_tv(tvb, tree, (guint8) EMT_iei, EMT_pdu_type, EMT_elem_idx, curr_offset, EMT_elem_name_addition)) > 0) \
@@ -415,6 +454,20 @@ extern guint8 elem_v_short(tvbuff_t *tvb, proto_tree *tree, gint pdu_type, int i
        if (curr_len <= 0) return; \
 }
 
+#define ELEM_MAND_LV_E(EML_pdu_type, EML_elem_idx, EML_elem_name_addition) \
+{\
+       if ((consumed = elem_lv_e(tvb, tree, EML_pdu_type, EML_elem_idx, curr_offset, curr_len, EML_elem_name_addition)) > 0) \
+       { \
+               curr_offset += consumed; \
+               curr_len -= consumed; \
+       } \
+       else \
+       { \
+               /* Mandatory, but nothing we can do */ \
+       } \
+       if (curr_len <= 0) return; \
+}
+
 #define ELEM_MAND_V(EMV_pdu_type, EMV_elem_idx) \
 {\
        if ((consumed = elem_v(tvb, tree, EMV_pdu_type, EMV_elem_idx, curr_offset)) > 0) \
@@ -483,46 +536,46 @@ void dissect_bssmap_le(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
 
 void dtap_mm_mm_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len);
 
-guint8 be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len, guint8 disc);
-guint8 be_cell_id_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-guint8 be_chan_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-
-guint8 de_lai(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-guint8 de_mid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-guint8 de_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-guint8 de_bearer_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-guint8 de_bearer_cap_uplink(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-guint8 be_ganss_loc_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-guint8 be_ganss_pos_dta(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-guint8 be_ganss_ass_dta(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-
-guint8 de_ms_cm_1(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
-guint8 de_ms_cm_2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-guint8 de_ms_cm_3(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-
-guint8 de_sm_apn(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-guint8 de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-guint8 de_sm_pflow_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-
-guint8 de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-guint8 de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-guint8 de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-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_cell_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-guint8 de_rr_ch_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
-guint8 de_rr_ch_mode(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_cm_enq_mask(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
-guint8 de_rr_meas_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
-guint8 de_rr_multirate_conf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
-guint8 de_rr_sus_cau(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_rej_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
-guint8 de_d_gb_call_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
+guint16 be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len, guint8 disc);
+guint16 be_cell_id_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 be_chan_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+
+guint16 de_lai(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 de_mid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 de_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 de_bearer_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 de_bearer_cap_uplink(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 be_ganss_loc_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 be_ganss_pos_dta(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 be_ganss_ass_dta(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+
+guint16 de_ms_cm_1(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
+guint16 de_ms_cm_2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 de_ms_cm_3(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+
+guint16 de_sm_apn(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 de_sm_pflow_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+
+guint16 de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+
+guint16 de_rr_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 de_rr_cell_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 de_rr_ch_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
+guint16 de_rr_ch_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 de_rr_chnl_needed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
+guint16 de_rr_cip_mode_set(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 de_rr_cm_enq_mask(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 de_rr_meas_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
+guint16 de_rr_multirate_conf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
+guint16 de_rr_sus_cau(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+guint16 de_rr_tlli(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len);
+
+guint16 de_rej_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_);
+guint16 de_d_gb_call_ref(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);
 
index 55a90f38ec723df3b33bdfa2b0420ea46f61b859..28e804cbaec6acf1554b01a9fa1252f92a8875a7 100644 (file)
@@ -436,7 +436,7 @@ static dgt_set_t Dgt_mbcd = {
 /*
  * [3] 10.5.3.1 Authentication parameter RAND
  */
-static guint8
+static guint16
 de_auth_param_rand(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -464,7 +464,7 @@ de_auth_param_rand(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g
 /*
  * [3] 10.5.3.1.1 Authentication Parameter AUTN (UMTS authentication challenge only)
  */
-static guint8
+static guint16
 de_auth_param_autn(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -486,7 +486,7 @@ de_auth_param_autn(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g
 /*
  * [3] 10.5.3.2 Authentication Response parameter
  */
-static guint8
+static guint16
 de_auth_resp_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -514,7 +514,7 @@ de_auth_resp_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g
 /*
  * [3] 10.5.3.2.1 Authentication Response Parameter (extension) (UMTS authentication challenge only)
  */
-static guint8
+static guint16
 de_auth_resp_param_ext(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -536,7 +536,7 @@ de_auth_resp_param_ext(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint le
 /*
  * [3] 10.5.3.2.2 Authentication Failure parameter (UMTS authentication challenge only)
  */
-static guint8
+static guint16
 de_auth_fail_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -570,7 +570,7 @@ de_auth_fail_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g
 /*
  * [3] 10.5.3.5a Network Name
  */
-static guint8
+static guint16
 de_network_name(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -647,7 +647,7 @@ de_network_name(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gcha
 /* 3GPP TS 24.008
  * [3] 10.5.3.6 Reject cause
  */
-guint8
+guint16
 de_rej_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -719,7 +719,7 @@ de_rej_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gch
 /*
  * [3] 10.5.3.8 Time Zone
  */
-static guint8
+static guint16
 de_time_zone(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -755,7 +755,7 @@ de_time_zone(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gch
 /*
  * [3] 10.5.3.9 Time Zone and Time
  */
-static guint8
+static guint16
 de_time_zone_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct, oct2, oct3;
@@ -828,7 +828,7 @@ de_time_zone_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
  * [3] 10.5.3.11 LSA Identifier
  * 3GPP TS 24.008 version 6.8.0 Release 6
  */
-static guint8
+static guint16
 de_lsa_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -851,7 +851,7 @@ de_lsa_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
 /*
  * [3] 10.5.3.12 Daylight Saving Time
  */
-static guint8
+static guint16
 de_day_saving_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -894,7 +894,7 @@ de_day_saving_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g
 /*
  * 10.5.3.13 Emergency Number List 
  */
-static guint8
+static guint16
 de_emerg_num_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -910,7 +910,7 @@ de_emerg_num_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
 /*
  * [3] 10.5.4.4 Auxiliary states
  */
-static guint8
+static guint16
 de_aux_states(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -975,7 +975,7 @@ de_aux_states(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar
 /*
  * [3] 10.5.4.5 Bearer capability
  */
-guint8
+guint16
 de_bearer_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
 {
        guint8  oct;
@@ -2097,7 +2097,7 @@ bc_octet_7:
 }
 
 
-guint8
+guint16
 de_bearer_cap_uplink(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
 {
        is_uplink = IS_UPLINK_TRUE;
@@ -2109,7 +2109,7 @@ de_bearer_cap_uplink(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len,
  * [3] 10.5.4.5a Call Control Capabilities
  */
 
-static guint8
+static guint16
 de_cc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2190,7 +2190,7 @@ de_cc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
 /*
  * [3] 10.5.4.6 Call state
  */
-static guint8
+static guint16
 de_call_state(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2302,7 +2302,7 @@ const value_string gsm_a_numbering_plan_id_values[] = {
 /*
  * [3] 10.5.4.7 Called party BCD number
  */
-guint8
+guint16
 de_cld_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
 {
        guint8  *poctets;
@@ -2346,7 +2346,7 @@ de_cld_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len,
 /*
  * [3] 10.5.4.8 Called party subaddress
  */
-static guint8
+static guint16
 de_cld_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2407,7 +2407,7 @@ de_cld_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
 /* 3GPP TS 24.008
  * [3] 10.5.4.9 Calling party BCD number
  */
-static guint8
+static guint16
 de_clg_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
 {
        guint8  oct;
@@ -2495,7 +2495,7 @@ de_clg_party_bcd_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len,
 /*
  * [3] 10.5.4.10 Calling party subaddress
  */
-static guint8
+static guint16
 de_clg_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2556,7 +2556,7 @@ de_clg_party_sub_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
 /*
  * [3] 10.5.4.11 Cause
  */
-static guint8
+static guint16
 de_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
 {
        guint8  oct;
@@ -2751,7 +2751,7 @@ de_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_
  * 10.5.4.15 Facility
  */
 
-static guint8
+static guint16
 de_facility(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint fac_len, gchar *add_string _U_, int string_len _U_)
 {
        guint   saved_offset;
@@ -2802,7 +2802,7 @@ de_facility(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint fac_len, gcha
 /*
  * [3] 10.5.4.17 Keypad facility
  */
-static guint8
+static guint16
 de_keypad_facility(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
 {
        guint8  oct;
@@ -2838,7 +2838,7 @@ de_keypad_facility(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U
 /*
  * 10.5.4.18 Low layer compatibility
  */
-static guint8
+static guint16
 de_llc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2863,7 +2863,7 @@ de_llc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_st
 /*
  * [3] 10.5.4.21 Progress indicator
  */
-static guint8
+static guint16
 de_prog_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
 {
        guint8  oct;
@@ -2975,7 +2975,7 @@ de_prog_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gcha
 /*
  * [3] 10.5.4.22 Repeat indicator
  */
-static guint8
+static guint16
 de_repeat_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -3022,7 +3022,7 @@ de_repeat_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
 /*
  * 10.5.4.24 SS Version Indicator
  */
-static guint8
+static guint16
 de_ss_ver_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -3091,7 +3091,7 @@ de_ss_ver_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar
 /*
  * [5] 8.1.4.1 3GPP TS 24.011 version 6.1.0 Release 6
  */
-static guint8
+static guint16
 de_cp_user_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3119,7 +3119,7 @@ de_cp_user_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gcha
 /*
  * [5] 8.1.4.2
  */
-static guint8
+static guint16
 de_cp_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len)
 {
        guint8  oct;
@@ -3162,7 +3162,7 @@ de_cp_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gcha
        return(curr_offset - offset);
 }
 
-static guint8
+static guint16
 de_tp_sub_channel(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3207,7 +3207,7 @@ de_tp_sub_channel(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
        return(curr_offset - offset);
 }
 
-static guint8
+static guint16
 de_tp_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3227,7 +3227,7 @@ de_tp_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
        return(curr_offset - offset);
 }
 
-static guint8
+static guint16
 de_tp_loop_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3269,7 +3269,7 @@ de_tp_loop_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
        return(curr_offset - offset);
 }
 
-static guint8
+static guint16
 de_tp_loop_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3315,7 +3315,7 @@ de_tp_loop_ack(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
        return(curr_offset - offset);
 }
 
-static guint8
+static guint16
 de_tp_tested_device(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3349,7 +3349,7 @@ de_tp_tested_device(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _
        return(curr_offset - offset);
 }
 
-static guint8
+static guint16
 de_tp_pdu_description(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3373,7 +3373,7 @@ de_tp_pdu_description(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
        return(curr_offset - offset);
 }
 
-static guint8
+static guint16
 de_tp_mode_flag(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3395,7 +3395,7 @@ de_tp_mode_flag(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
        return(curr_offset - offset);
 }
 
-static guint8
+static guint16
 de_tp_egprs_mode_flag(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3417,7 +3417,7 @@ de_tp_egprs_mode_flag(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
        return(curr_offset - offset);
 }
 
-static guint8
+static guint16
 de_tp_ue_test_loop_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3466,7 +3466,7 @@ de_tp_ue_test_loop_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
        return(curr_offset - offset);
 }
 
-static guint8
+static guint16
 de_tp_ue_positioning_technology(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3491,7 +3491,7 @@ de_tp_ue_positioning_technology(tvbuff_t *tvb, proto_tree *tree, guint32 offset,
        return(curr_offset - offset);
 }
 
-static guint8
+static guint16
 de_tp_rlc_sdu_counter_value(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3507,7 +3507,7 @@ de_tp_rlc_sdu_counter_value(tvbuff_t *tvb, proto_tree *tree, guint32 offset, gui
        return(curr_offset - offset);
 }
 
-guint8 (*dtap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
+guint16 (*dtap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
        /* Mobility Management Information Elements 10.5.3 */
        de_auth_param_rand,     /* Authentication Parameter RAND */
        de_auth_param_autn,     /* Authentication Parameter AUTN (UMTS authentication challenge only) */
index d0286153e4338ad619355ef37f6e113d159de711..ea5bf39eb99fa040ba3e209502c7b33d5f41f196 100644 (file)
@@ -251,7 +251,7 @@ const       gchar pdp_str[2][20]={ "PDP-INACTIVE", "PDP-ACTIVE" };
 /*
  * [7] 10.5.5.1
  */
-static guint8
+static guint16
 de_gmm_attach_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -285,7 +285,7 @@ de_gmm_attach_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
 /*
  * [7] 10.5.5.2
  */
-static guint8
+static guint16
 de_gmm_attach_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -350,7 +350,7 @@ de_gmm_attach_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U
 /*
  * [7] 10.5.5.3
  */
-static guint8
+static guint16
 de_gmm_ciph_alg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -390,7 +390,7 @@ de_gmm_ciph_alg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * [7] 10.5.5.4
  */
-static guint8
+static guint16
 de_gmm_tmsi_stat(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -424,7 +424,7 @@ de_gmm_tmsi_stat(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * [7] 10.5.5.5
  */
-static guint8
+static guint16
 de_gmm_detach_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -539,7 +539,7 @@ static const value_string gsm_a_gmm_cn_spec_drs_cycle_len_coef_strings[] = {
        { 0x0f, "CN Specific DRX cycle length coefficient not specified by the MS" },
        { 0, NULL },
 };
-guint8
+guint16
 de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -624,7 +624,7 @@ de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * [7] 10.5.5.7
  */
-static guint8
+static guint16
 de_gmm_ftostby(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -657,7 +657,7 @@ de_gmm_ftostby(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
 /*
  * [7] 10.5.5.7
  */
-static guint8
+static guint16
 de_gmm_ftostby_h(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -693,7 +693,7 @@ de_gmm_ftostby_h(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * [7] 10.5.5.8
  */
-static guint8
+static guint16
 de_gmm_ptmsi_sig(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -714,7 +714,7 @@ de_gmm_ptmsi_sig(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * [7] 10.5.5.8a
  */
-static guint8
+static guint16
 de_gmm_ptmsi_sig2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len _U_)
 {
        guint32 curr_offset;
@@ -734,7 +734,7 @@ de_gmm_ptmsi_sig2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc
 /*
  * [7] 10.5.5.9
  */
-static guint8
+static guint16
 de_gmm_ident_type2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -769,7 +769,7 @@ de_gmm_ident_type2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U
 /*
  * [7] 10.5.5.10
  */
-static guint8
+static guint16
 de_gmm_imeisv_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -805,7 +805,7 @@ de_gmm_imeisv_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
 /*
  * [7] 10.5.5.11
  */
-static guint8
+static guint16
 de_gmm_rec_npdu_lst(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -858,7 +858,7 @@ de_gmm_rec_npdu_lst(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len,
 /*
  * [7] 10.5.5.12
  */
-guint8
+guint16
 de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -1019,7 +1019,7 @@ de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc
        else \
                add_ocetets = 0;
 
-guint8
+guint16
 de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32     curr_offset;
@@ -2386,7 +2386,7 @@ de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
 /*
  * [7] 10.5.5.14
  */
-static guint8
+static guint16
 de_gmm_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2468,7 +2468,7 @@ de_gmm_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gch
 /*
  * [7] 10.5.5.15 Routing area identification
  */
-guint8
+guint16
 de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -2512,7 +2512,7 @@ de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
 /*
  * [7] 10.5.5.17
  */
-static guint8
+static guint16
 de_gmm_update_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2549,7 +2549,7 @@ de_gmm_update_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
 /*
  * [7] 10.5.5.18
  */
-static guint8
+static guint16
 de_gmm_update_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2615,7 +2615,7 @@ de_gmm_update_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U
 /*
  * [7] 10.5.5.19
  */
-static guint8
+static guint16
 de_gmm_ac_ref_nr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2641,7 +2641,7 @@ de_gmm_ac_ref_nr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * [7] 10.5.5.19
  */
-static guint8
+static guint16
 de_gmm_ac_ref_nr_h(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2670,7 +2670,7 @@ de_gmm_ac_ref_nr_h(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U
 /*
  * [8] 10.5.5.20
  */
-static guint8
+static guint16
 de_gmm_service_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2718,7 +2718,7 @@ de_gmm_service_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _
 /*
  * [7] 10.5.5.21
  */
-static guint8
+static guint16
 de_gmm_cell_notfi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2737,7 +2737,7 @@ de_gmm_cell_notfi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
 /*
  * [7] 10.5.5.22
  */
-static guint8
+static guint16
 de_gmm_ps_lcs_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2795,7 +2795,7 @@ de_gmm_ps_lcs_cap(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
 /*
  * [7] 10.5.5.23
  */
-static guint8
+static guint16
 de_gmm_net_feat_supp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2826,7 +2826,7 @@ de_gmm_net_feat_supp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
 }
 
 /* [7] 10.5.5.24 Inter RAT information container */
-static guint8
+static guint16
 de_gmm_rat_info_container(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2850,7 +2850,7 @@ defined in 3GPP TS 25.331 [23c]. If this field includes padding bits, they are d
 /*
  * [7] 10.5.7.1
  */
-static guint8
+static guint16
 de_gc_context_stat(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2896,7 +2896,7 @@ de_gc_context_stat(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U
 /*
  * [7] 10.5.7.2
  */
-static guint8
+static guint16
 de_gc_radio_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2930,7 +2930,7 @@ de_gc_radio_prio(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * [7] 10.5.7.3
  */
-static guint8
+static guint16
 de_gc_timer(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -2973,7 +2973,7 @@ de_gc_timer(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gcha
 /*
  * [7] 10.5.7.4
  */
-static guint8
+static guint16
 de_gc_timer2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len _U_)
 {
        guint8  oct;
@@ -3014,7 +3014,7 @@ de_gc_timer2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gch
 /*
  * [7] 10.5.7.5
  */
-static guint8
+static guint16
 de_gc_radio_prio2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -3051,7 +3051,7 @@ de_gc_radio_prio2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
 /*
  * [8] 10.5.7.6 MBMS context status
  */
-static guint8
+static guint16
 de_gc_mbms_context_stat(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3092,7 +3092,7 @@ de_gc_mbms_context_stat(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
  */
 #define MAX_APN_LENGTH         50
 
-guint8
+guint16
 de_sm_apn(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3130,7 +3130,7 @@ de_sm_apn(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
 /*
  * [7] 10.5.6.2
  */
-static guint8
+static guint16
 de_sm_nsapi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len _U_)
 {
        guint8  oct;
@@ -3153,7 +3153,7 @@ de_sm_nsapi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gcha
 /*
  * [7] 10.5.6.3
  */
-static guint8
+static guint16
 de_sm_pco(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3260,7 +3260,7 @@ de_sm_pco(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
 /*
  * [7] 10.5.6.4
  */
-static guint8
+static guint16
 de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3488,7 +3488,7 @@ const value_string gsm_a_qos_traff_hdl_pri_vals[] = {
        { 0, NULL }
 };
 
-guint8
+guint16
 de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -4037,7 +4037,7 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
 /*
  * [8] 10.5.6.6 SM cause
  */
-static guint8
+static guint16
 de_sm_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len _U_)
 {
        guint8  oct;
@@ -4101,7 +4101,7 @@ de_sm_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gcha
 /*
  * [7] 10.5.6.7
  */
-static guint8
+static guint16
 de_sm_linked_ti(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -4150,7 +4150,7 @@ de_sm_linked_ti(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gcha
 /*
  * [7] 10.5.6.9
  */
-static guint8
+static guint16
 de_sm_sapi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len _U_)
 {
        guint8  oct;
@@ -4173,7 +4173,7 @@ de_sm_sapi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
 /*
  * [7] 10.5.6.10
  */
-static guint8
+static guint16
 de_sm_tear_down(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string, int string_len _U_)
 {
        guint8  oct;
@@ -4209,7 +4209,7 @@ static const value_string gsm_a_packet_flow_id_vals[] = {
        { 7,            "reserved"},
        { 0,    NULL }
 };
-guint8
+guint16
 de_sm_pflow_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -4255,7 +4255,7 @@ static const true_false_string gsm_a_tft_e_bit  = {
 };
 
 
-static guint8
+static guint16
 de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -4472,7 +4472,7 @@ de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gch
        return(curr_offset - offset);
 }
 
-guint8 (*gm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
+guint16 (*gm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
        /* GPRS Mobility Management Information Elements 10.5.5 */
        de_gmm_attach_res,      /* Attach Result */
        de_gmm_attach_type,     /* Attach Type */
index edbc3d3d7f51b208d6c29136267ee71ec3eea966..7e72fdb15d8ef98418461215c2e2aa5ff464aaa0 100644 (file)
@@ -104,7 +104,7 @@ gint ett_gsm_rp_elem[NUM_GSM_RP_ELEM];
 /*
  * [5] 8.2.3
  */
-static guint8
+static guint16
 de_rp_message_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint8  oct;
@@ -130,7 +130,7 @@ de_rp_message_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
 /*
  * [5] 8.2.5.1
  */
-static guint8
+static guint16
 de_rp_orig_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
 {
        return(de_cld_party_bcd_num(tvb, tree, offset, len, add_string, string_len));
@@ -139,7 +139,7 @@ de_rp_orig_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gcha
 /*
  * [5] 8.2.5.2
  */
-static guint8
+static guint16
 de_rp_dest_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
 {
        return(de_cld_party_bcd_num(tvb, tree, offset, len, add_string, string_len));
@@ -148,7 +148,7 @@ de_rp_dest_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gcha
 /*
  * [5] 8.2.5.3
  */
-static guint8
+static guint16
 de_rp_user_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -176,7 +176,7 @@ de_rp_user_data(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gcha
 /*
  * [5] 8.2.5.4
  */
-static guint8
+static guint16
 de_rp_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len)
 {
        guint8  oct;
@@ -251,7 +251,7 @@ de_rp_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *a
        return(curr_offset - offset);
 }
 
-guint8 (*rp_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
+guint16 (*rp_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
        /* Short Message Service Information Elements [5] 8.2 */
        de_rp_message_ref,      /* RP-Message Reference */
        de_rp_orig_addr,        /* RP-Origination Address */
index 7197e4c1eb4767c27e946aaad4cebf593a571a6e..5797a7dc3de4cd6ff0c53ecd7e913104907298cf 100644 (file)
@@ -747,7 +747,7 @@ gint ett_gsm_rr_rest_octets_elem[NUM_GSM_RR_REST_OCTETS_ELEM];
 10.5.2 Radio Resource management information elements
  * [3] 10.5.2.1a BA Range
  */
-guint8
+guint16
 de_rr_ba_range(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
    guint32 curr_offset;
@@ -914,7 +914,7 @@ static void dissect_channel_list_n_range(tvbuff_t *tvb, proto_tree *tree, guint3
        return;
 }
 
-static guint8
+static guint16
 dissect_arfcn_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1000,7 +1000,7 @@ dissect_arfcn_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g
        return(curr_offset - offset);
 }
 
-guint8
+guint16
 de_rr_cell_ch_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        return dissect_arfcn_list(tvb, tree, offset, 16, add_string, string_len);
@@ -1008,7 +1008,7 @@ de_rr_cell_ch_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
 /*
  * [3] 10.5.2.1c BA List Pref
  */
-guint8
+guint16
 de_rr_ba_list_pref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
    guint32 curr_offset;
@@ -1047,7 +1047,7 @@ de_rr_ba_list_pref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g
 /*
  * [3] 10.5.2.1d UTRAN Frequency List
  */
-guint8
+guint16
 de_rr_utran_freq_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
    guint32 curr_offset;
@@ -1092,7 +1092,7 @@ static const guint8
 convert_n_to_q[32] = {   0,   9,  17,  25,  32, 39, 46, 53, 59, 65, 71, 77, 83, 89, 95, 101,
                        106, 111, 116, 121, 126,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,   0};
 
-guint8
+guint16
 de_rr_cell_select_indic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
    proto_tree *subtree, *subtree2;
@@ -1305,7 +1305,7 @@ de_rr_cell_select_indic(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
 /*
  * [3] 10.5.2.2 Cell Description
  */
-guint8
+guint16
 de_rr_cell_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -1364,7 +1364,7 @@ static const value_string gsm_a_rr_radio_link_timeout_vals[] = {
        { 0x0F, "64" },
        { 0,    NULL } };
 
-static guint8
+static guint16
 de_rr_cell_opt_bcch(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -1401,7 +1401,7 @@ static const value_string gsm_a_rr_dtx_sacch_vals[] = {
        { 0x07, "The MS may use uplink discontinuous transmission on a TCH-F. The MS shall use uplink discontinuous transmission on TCH-H" },
        { 0,    NULL } };
 
-static guint8
+static guint16
 de_rr_cell_opt_sacch(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -1431,7 +1431,7 @@ de_rr_cell_opt_sacch(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
 /*
  * [3] 10.5.2.4 Cell Selection Parameters
  */
-static guint8
+static guint16
 de_rr_cell_sel_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -1465,7 +1465,7 @@ de_rr_cell_sel_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
  * [3] 10.5.2.4a MAC Mode and Channel Coding Requested
  * [3] 10.5.2.5 Channel Description
  */
-guint8
+guint16
 de_rr_ch_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1559,7 +1559,7 @@ de_rr_ch_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gch
 /*
  * [3] 10.5.2.5a Channel Description 2
  */
-static guint8
+static guint16
 de_rr_ch_dsc2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1674,7 +1674,7 @@ de_rr_ch_dsc2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
 /*
  * [3] 10.5.2.5c Channel Description 3
  */
-static guint8
+static guint16
 de_rr_ch_dsc3(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1753,7 +1753,7 @@ static const value_string gsm_a_rr_channel_mode_vals[] = {
        { 0,    NULL }
 };
 
-guint8
+guint16
 de_rr_ch_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1782,7 +1782,7 @@ static const value_string gsm_a_rr_channel_mode2_vals[] = {
        { 0,    NULL }
 };
 
-static guint8
+static guint16
 de_rr_ch_mode2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1798,7 +1798,7 @@ de_rr_ch_mode2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
 /*
  * [3] 10.5.2.7a UTRAN Classmark information element
  */
-static guint8
+static guint16
 de_rr_utran_cm(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
    guint32 curr_offset;
@@ -1854,7 +1854,7 @@ static const value_string gsm_a_rr_utran_cm_cng_msg_req_vals[] = {
        { 0x7,  "message including status on predefined configurations (i.e. Sequence Description) is not requested."},
        { 0,    NULL }
 };
-guint8
+guint16
 de_rr_cm_enq_mask(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1880,7 +1880,7 @@ static const value_string gsm_a_rr_channel_needed_vals[] = {
        { 0x03, "TCH/H or TCH/F (Dual rate)"},
        { 0,    NULL }
 };
-guint8
+guint16
 de_rr_chnl_needed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -1924,7 +1924,7 @@ static const value_string gsm_a_rr_sc_vals[] = {
  * bits
  * 4 3 2
  */
-guint8
+guint16
 de_rr_cip_mode_set(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -1961,7 +1961,7 @@ static const value_string gsm_a_rr_cr_vals[] = {
        { 0,    NULL }
 };
 
-static guint8
+static guint16
 de_rr_cip_mode_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2016,7 +2016,7 @@ static const value_string gsm_a_rr_cbq3_vals[] = {
        { 0,    NULL }
 };
 
-static guint8
+static guint16
 de_rr_ctrl_ch_desc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -2077,7 +2077,7 @@ static const value_string gsm_a_rr_gsm_band_vals[] = {
 };
 
 
-static guint8
+static guint16
 de_rr_dyn_arfcn_map(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2113,7 +2113,7 @@ de_rr_dyn_arfcn_map(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _
 /*
  * [3] 10.5.2.12 Frequency Channel Sequence
  */
-static guint8
+static guint16
 de_rr_freq_ch_seq(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2170,7 +2170,7 @@ static const value_string gsm_a_rr_freq_list_format_id_vals[] = {
        { 0x47, "variable bit map"},
        { 0x00, NULL }
 };
-static guint8
+static guint16
 de_rr_freq_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        return dissect_arfcn_list(tvb, tree, offset, len, add_string, string_len);
@@ -2185,7 +2185,7 @@ de_rr_freq_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gcha
  * not contain a length indicator and that it shall not be encoded in bitmap 0 format.
  */
 
- static guint8
+ static guint16
 de_rr_freq_short_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        return dissect_arfcn_list(tvb, tree, offset, 9, add_string, string_len);
@@ -2200,7 +2200,7 @@ de_rr_freq_short_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
  * except that it has a fixed length instead of a variable length and does
  * not contain a length indicator and that it shall not be encoded in bitmap 0 format.
  */
-static guint8
+static guint16
 de_rr_freq_short_list2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        return dissect_arfcn_list(tvb, tree, offset, 8, add_string, string_len);
@@ -2217,7 +2217,7 @@ static const true_false_string gsm_a_rr_gprs_resumption_ack_value  = {
        "Resumption of GPRS services not successfully acknowledged"
 };
 
-static guint8
+static guint16
 de_rr_gprs_resumption(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
    guint32 curr_offset;
@@ -2372,7 +2372,7 @@ de_rr_rest_oct_gprs_power_control_parameters(tvbuff_t *tvb, proto_tree *tree, gi
    return (curr_bit_offset - bit_offset);
 }
 
-static guint8
+static guint16
 de_rr_gprs_broadcast_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len , gchar *add_string _U_, int string_len _U_)
 {
    guint32 curr_offset;
@@ -2391,7 +2391,7 @@ de_rr_gprs_broadcast_info(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint
 /*
  * [3] 10.5.2.15 Handover Reference
  */
-static guint8
+static guint16
 de_rr_ho_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -2418,7 +2418,7 @@ de_rr_ho_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gch
  * [3] 10.5.2.16 IA Rest Octets
  */
 
-static guint8
+static guint16
 de_rr_ia_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -2449,7 +2449,7 @@ de_rr_ia_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc
  * [3] 10.5.2.17 IAR Rest Octets
  */
 
-static guint8
+static guint16
 de_rr_iar_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -2476,7 +2476,7 @@ de_rr_iar_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g
 /*
  * [3] 10.5.2.18 IAX Rest Octets
  */
-static guint8
+static guint16
 de_rr_iax_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -2506,7 +2506,7 @@ de_rr_iax_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, g
 /*
  * [3] 10.5.2.19 L2 Pseudo Length
  */
-static guint8
+static guint16
 de_rr_l2_pseudo_len(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -2630,7 +2630,7 @@ static const value_string gsm_a_rr_ncell_vals [] = {
        {7, "Neighbour cell information not available for serving cell"},
        {0, NULL}
 };
-guint8
+guint16
 de_rr_meas_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -2698,7 +2698,7 @@ de_rr_meas_res(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
 /*
  * [3] 10.5.2.21 Mobile Allocation
  */
-static guint8
+static guint16
 de_rr_mob_all(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2725,7 +2725,7 @@ de_rr_mob_all(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar
 /*
  * [3] 10.5.2.21a Mobile Time Difference
  */
-static guint8
+static guint16
 de_rr_mob_time_diff(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2856,7 +2856,7 @@ static const value_string gsm_a_rr_amr_hysteresis_vals[] = {
        { 0,    NULL }
 };
 
-guint8
+guint16
 de_rr_multirate_conf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2927,7 +2927,7 @@ de_rr_multirate_conf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
 /*
  * [3] 10.5.2.21b Multislot Allocation
  */
-static guint8
+static guint16
 de_rr_mult_all(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2952,7 +2952,7 @@ static const value_string gsm_a_rr_ext_ind_vals[] = {
        { 1,    "The information element carries only a part of the BA"},
        { 0,    NULL }
 };
-static guint8
+static guint16
 de_rr_neigh_cell_desc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2968,7 +2968,7 @@ de_rr_neigh_cell_desc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
  /*
  * [3] 10.5.2.22a Neighbour Cell Description 2
  */
-static guint8
+static guint16
 de_rr_neigh_cell_desc2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -2989,7 +2989,7 @@ de_rr_neigh_cell_desc2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint le
 /*
  * [3] 10.5.2.23 P1 Rest Octets
  */
-static guint8
+static guint16
 de_rr_p1_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
    proto_tree *subtree;
@@ -3088,7 +3088,7 @@ de_rr_p1_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gc
 /*
  * [3] 10.5.2.24 P2 Rest Octets
  */
-static guint8
+static guint16
 de_rr_p2_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 
 {
@@ -3162,7 +3162,7 @@ de_rr_p2_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
 /*
  * [3] 10.5.2.25 P3 Rest Octets
  */
-static guint8
+static guint16
 de_rr_p3_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
    proto_tree *subtree;
@@ -3220,7 +3220,7 @@ de_rr_p3_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
 /*
  * [3] 10.5.2.25a Packet Channel Description C V 3
  */
-static guint8
+static guint16
 de_rr_packet_ch_desc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3295,7 +3295,7 @@ static const value_string gsm_a_rr_dedicated_mode_or_tbf_vals[] = {
        { 7,    "This message is the first message of two in a two-message assignment of a downlink TBF to the mobile station identified in the IA Rest Octets IE"},
        { 0,    NULL }
 };
-static guint8
+static guint16
 de_rr_ded_mod_or_tbf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -3332,7 +3332,7 @@ static const value_string gsm_a_rr_page_mode_vals[] = {
        { 3,    "Same as before"},
        { 0,    NULL }
 };
-static guint8
+static guint16
 de_rr_page_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -3363,7 +3363,7 @@ de_rr_page_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * [3] 10.5.2.27 NCC Permitted
  */
-static guint8
+static guint16
 de_rr_ncc_perm(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -3434,7 +3434,7 @@ static const true_false_string gsm_a_rr_pow_cmd_fpcepc_value  = {
  * by the mobile station According to 3GPP TS 45.008.Range: 0 to 31.
  */
 
-static guint8
+static guint16
 de_rr_pow_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -3466,7 +3466,7 @@ de_rr_pow_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
 /*
  * [3] 10.5.2.28a Power Command and access type
  */
-static guint8
+static guint16
 de_rr_pow_cmd_and_acc_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -3537,7 +3537,7 @@ static const value_string gsm_a_rr_re_vals[] = {
        { 0,    NULL }
 };
 
-static guint8
+static guint16
 de_rr_rach_ctrl_param(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -3585,7 +3585,7 @@ static guint16 reduced_frame_number(guint16 fn)
        return frame;
 }
 
-static guint8
+static guint16
 de_rr_req_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -3620,7 +3620,7 @@ de_rr_req_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
 /*
  * [3] 10.5.2.31
  */
-guint8
+guint16
 de_rr_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -3673,7 +3673,7 @@ static const value_string gsm_a_rr_nch_position_vals[] = {
        { 0,    NULL }
 };
 
-static guint8
+static guint16
 de_rr_si1_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -3803,7 +3803,7 @@ static const value_string gsm_a_rr_fdd_rscpmin_vals[] = {
        { 0,    NULL }
 };
 
-static guint8
+static guint16
 de_rr_si2ter_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree, *subtree2;
@@ -4491,7 +4491,7 @@ de_rr_3g_add_meas_param_desc2(tvbuff_t *tvb, proto_tree *tree, gint bit_offset)
    return(curr_bit_offset - bit_offset);
 }
 
-static guint8
+static guint16
 de_rr_si2quater_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree, *subtree2, *subtree3;
@@ -4996,7 +4996,7 @@ static const true_false_string gsm_a_rr_si13alt_position_value = {
    "If Iu mode is supported in the cell, SYSTEM INFORMATION TYPE 13alt message is sent on BCCH Norm"
 };
 
-static guint8
+static guint16
 de_rr_si3_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -5101,7 +5101,7 @@ static const value_string gsm_a_rr_lsa_offset_vals[] = {
    { 0, NULL }
 };
 
-static guint8
+static guint16
 de_rr_si4_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree, *subtree2, *subtree3;
@@ -5280,7 +5280,7 @@ static const true_false_string gsm_a_rr_mnci_support_value = {
    "The cell does not support the distribution of MBMS NEIGHBOURING CELL INFORMATION messages"
 };
 
-static guint8
+static guint16
 de_rr_si6_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree, *subtree2;
@@ -5800,7 +5800,7 @@ static const value_string gsm_a_rr_si2n_support_vals[] = {
    { 0, NULL }
 };
 
-static guint8
+static guint16
 de_rr_si13_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree, *subtree2;
@@ -5936,7 +5936,7 @@ de_rr_si13_rest_oct(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len,
 /*
  * [3] 10.5.2.38 Starting Time
  */
-static guint8
+static guint16
 de_rr_starting_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_item *item;
@@ -5982,7 +5982,7 @@ static const true_false_string gsm_a_rr_sync_ind_nci_value  = {
        "Out of range timing advance shall trigger a handover failure procedure",
        "Out of range timing advance is ignored"
 };
-static guint8
+static guint16
 de_rr_sync_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -6004,7 +6004,7 @@ de_rr_sync_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
 /*
  * [3] 10.5.2.40 Timing Advance
  */
-static guint8
+static guint16
 de_rr_timing_adv(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -6020,7 +6020,7 @@ de_rr_timing_adv(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * [3] 10.5.2.41 Time Difference
  */
-static guint8
+static guint16
 de_rr_time_diff(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -6036,7 +6036,7 @@ de_rr_time_diff(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
  * [3] 10.5.2.41a TLLI
  * The TLLI is encoded as a binary number with a length of 4 octets. TLLI is defined in 3GPP TS 23.003
  */
-guint8
+guint16
 de_rr_tlli(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -6052,7 +6052,7 @@ de_rr_tlli(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
 /*
  * [3] 10.5.2.42 TMSI/P-TMSI
  */
-guint8
+guint16
 de_rr_tmsi_ptmsi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        proto_tree      *subtree;
@@ -6087,7 +6087,7 @@ static const value_string gsm_a_rr_target_mode_vals[] _U_ = {
        { 1,    "Group transmit mode"},
        { 0,    NULL }
 };
-static guint8
+static guint16
 de_rr_vgcs_tar_mode_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -6104,7 +6104,7 @@ de_rr_vgcs_tar_mode_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint l
 /*
  * [3] 10.5.2.42b      VGCS Ciphering Parameters
  */
-static guint8
+static guint16
 de_rr_vgcs_cip_par(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -6120,7 +6120,7 @@ de_rr_vgcs_cip_par(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U
 /*
  * [3] 10.5.2.43 Wait Indication
  */
-static guint8
+static guint16
 de_rr_wait_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -6141,7 +6141,7 @@ de_rr_wait_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
 /*
  * [3] 10.5.2.45 Extended Measurement Results
  */
-static guint8
+static guint16
 de_rr_ext_meas_result(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
    guint32 curr_offset;
@@ -6171,7 +6171,7 @@ de_rr_ext_meas_result(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
 /*
  * [3] 10.5.2.46 Extended Measurement Frequency List
  */
-static guint8
+static guint16
 de_rr_ext_meas_freq_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
    guint32 curr_offset;
@@ -6197,7 +6197,7 @@ static const value_string gsm_a_rr_suspension_cause_vals[] = {
        { 6,    "DTM not supported in the cell"},
        { 0,    NULL }
 };
-guint8
+guint16
 de_rr_sus_cau(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -6219,7 +6219,7 @@ de_rr_sus_cau(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
 /*
  * [3] 10.5.2.51 Handover To UTRAN Command
  */
-static guint8
+static guint16
 de_rr_ho_to_utran_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
    guint32 curr_offset;
@@ -6257,7 +6257,7 @@ static const true_false_string gsm_a_rr_MBMS_broadcast_value  = {
        "mobile station requires notification of broadcast MBMS services",
        "mobile station does not require notification of broadcast MBMS services"
 };
-static guint8
+static guint16
 de_rr_serv_sup(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -6293,7 +6293,7 @@ static const true_false_string gsm_a_rr_last_segment_value  = {
        "Mobile station shall perform Service Information Sending procedure on new cell.",
        "mobile station shall not perform Service Information Sending procedure on new cell."
 };
-static guint8
+static guint16
 de_rr_ded_serv_inf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -6315,7 +6315,7 @@ static const true_false_string gsm_a_rr_carrier_ind_value  = {
        "Carrier 1"
 };
 
-static guint8
+static guint16
 de_rr_carrier_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
    proto_tree *subtree;
@@ -6336,7 +6336,7 @@ de_rr_carrier_ind(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
    return(curr_offset - offset);
 }
 
-guint8 (*rr_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
+guint16 (*rr_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
        /* Radio Resource Management  Information Elements 10.5.2, most are from 10.5.1 */
 
        de_rr_ba_range,                       /* [3]  10.5.2.1a BA Range */
index 5bd3b43cdec19ca208f705f2561a2d16d89f7f81..5f00b92534f7023344221d8e7e09ade368a795ff 100644 (file)
@@ -170,7 +170,7 @@ gint ett_gsm_bsslap_elem[NUM_GSM_BSSLAP_ELEM];
 /*
  * 5.2 Timing Advance IE
  */
-static guint8
+static guint16
 de_ta(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -185,7 +185,7 @@ de_ta(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add
  * 5.12 Measurement Report IE
  */
 #if 0
-static guint8
+static guint16
 de_meas_rep(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -214,7 +214,7 @@ static const value_string gsm_bsslap_cause_vals[] = {
        { 0,    NULL }
 };
 
-static guint8
+static guint16
 de_bsslap_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -232,7 +232,7 @@ static const true_false_string gsm_bsslap_rrlp_flg_vals = {
        "Not a Positioning Command or final response." ,
        "Position Command (SMLC to BSC) or final response (BSC to SMLC)"
 };
-static guint8
+static guint16
 de_rrlp_flg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -243,7 +243,7 @@ de_rrlp_flg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gcha
 
        return(curr_offset - offset);
 }
-static guint8
+static guint16
 de_rrlp_ie(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
    guint32 curr_offset;
@@ -280,7 +280,7 @@ const value_string gsm_a_bsslap_cell_id_disc_vals[] = {
 
 
 
-static guint8
+static guint16
 de_cell_id_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -340,7 +340,7 @@ de_cell_id_list(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gcha
  * ENHANCED MEASUREMENT REPORT message in 3GPP TS 44.018 (excluding the fields:
  * "RR short PD", "Message type" and "Short layer 2 header")...
  */
-static guint8
+static guint16
 de_enh_meas_rep(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -354,7 +354,7 @@ de_enh_meas_rep(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gcha
 /*
  * 5.19 Location Area Code IE
  */
-static guint8
+static guint16
 de_lac(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -368,7 +368,7 @@ de_lac(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *ad
 /*
  * 5.21 MS Power IE
  */
-static guint8
+static guint16
 de_ms_pow(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -383,7 +383,7 @@ de_ms_pow(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar
 /* 
  * 5.22 Delta Timer IE
  */
-static guint8
+static guint16
 de_delta_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -401,7 +401,7 @@ de_delta_time(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gc
 /*
  * 5.24 Encryption Key
  */
-static guint8
+static guint16
 de_blap_enc_key(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -427,7 +427,7 @@ de_blap_enc_key(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * 5.28 Polling Repetition IE
  */
-static guint8
+static guint16
 de_poll_rep(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -444,7 +444,7 @@ de_poll_rep(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gcha
  * described in TS 44.018 (CCCH) or TS 44.060 (PCCCH) plus
  * padding bits (binary 0) as required to achieve 4 complete octets
  */
-static guint8
+static guint16
 de_pkt_ch_desc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -463,7 +463,7 @@ de_pkt_ch_desc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar
  * The Temporary Flow Identity field identifies an uplink Temporary Block Flow (TBF). 
  * This field is encoded as a binary number. Range 0 to 31
  */
-static guint8
+static guint16
 de_tfi(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -523,7 +523,7 @@ bsslap_elem_idx_t;
 */
 elem_fcn bsslap_elem_fcn[];
 
-guint8 (*bsslap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
+guint16 (*bsslap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
        /* BSS LAP Elements 5 */
        NULL,   /* Reserved */
        de_ta,  /* Timing Advance */
index 4479779e1cb181d16bc5cc2faab9d12a3ece1494..dcdfd20ec09e17c451f63404a12db435e8e37ac0 100644 (file)
@@ -225,7 +225,7 @@ gint ett_gsm_bssmap_le_elem[NUM_GSM_BSSMAP_LE_ELEM];
  * 10.3 APDU
  */
 
-static guint8
+static guint16
 de_bmaple_apdu(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -297,7 +297,7 @@ de_bmaple_apdu(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar
 /*
  * 10.8 Deciphering Keys
  */
-static guint8
+static guint16
 de_bmaple_decihp_keys(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
     gint bit_offset;
@@ -375,7 +375,7 @@ static const value_string bssmap_le_position_method_failure_diagnostic_vals[] =
     { 8, "positionMethodNotAvailableInLocaitonArea" },
     { 0, NULL}
 };
-static guint8
+static guint16
 de_bmaple_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -417,7 +417,7 @@ static const value_string bssmap_le_client_subtype[] = {
     { 0, NULL}
 };
 
-static guint8
+static guint16
 de_bmaple_client(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -444,7 +444,7 @@ de_bmaple_client(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_,
 /*
  * 10.16 LCS QoS
  */
-static guint8
+static guint16
 de_bmaple_lcs_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
     guint64 verticalCoordIndicator, velocityRequested, horizontalAccuracyIndicator, verticalAccuracyIndicator;
@@ -510,7 +510,7 @@ de_bmaple_lcs_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
 /*
  * 10.20 Positioning Data
  */
-static guint8
+static guint16
 de_bmaple_pos_dta(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        tvbuff_t *data_tvb;
@@ -545,7 +545,7 @@ de_bmaple_pos_dta(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
  * 3GPP TS 48.018 IEI and length indicator
  */
 /* Dissector for the LCS Capability element */
-static guint8
+static guint16
 be_lcs_capability(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        /* Extract the LCS Capability element and add to protocol tree */
@@ -563,7 +563,7 @@ be_lcs_capability(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_
  * message is padded with 0-bits to the nearest octet boundary.
  */
 /* Dissector for the Packet Measurement Report element */
-static guint8
+static guint16
 be_packet_meas_rep(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
     /* Extract the Packet Measurement Report element and add to protocol tree */
@@ -578,7 +578,7 @@ be_packet_meas_rep(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U
  * defined in 3GPP TS 48.071.
  */
 /* Dissector for the Measured Cell Identity List element */
-static guint8
+static guint16
 be_measured_cell_identity(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        /* Extract the Measured Cell Identity List element and add to protocol tree */
@@ -660,7 +660,7 @@ bssmap_le_elem_idx_t;
 */
 
 
-guint8 (*bssmap_le_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
+guint16 (*bssmap_le_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
        /* NOTE: The null types below are defined elsewhere. i.e in packet-gsm_a_bssmap.c */
        de_bmaple_lcs_qos,              /* 10.16 LCS QoS */
        NULL,                                   /* LCS Priority */
index bff687ee7ec6a741e2618e025b12e8060c54d475..1ea0772a817016717671898e62df113efe1ac676 100644 (file)
@@ -185,25 +185,25 @@ typedef enum
        DE_EMM_EPS_UPD_TYPE,            /* 9.9.3.12     EPS update type */
        DE_EMM_ESM_MSG_CONT,            /* 9.9.3.13     ESM message container */
        DE_EMM_GPRS_TIMER,                      /* 9.9.3.14     GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. */
-       DE_EMM_GPRS_ID_TYPE_2,          /* 9.9.3.15     Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. */
-       DE_EMM_GPRS_IMEISV_REQ,         /* 9.9.3.16     IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. */
-       DE_EMM_GPRS_KSI_AND_SEQ_NO,     /* 9.9.3.17     KSI and sequence number */
-       DE_EMM_GPRS_MS_NET_CAP,         /* 9.9.3.18     MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6]. */
+       DE_EMM_ID_TYPE_2,                       /* 9.9.3.15     Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. */
+       DE_EMM_IMEISV_REQ,                      /* 9.9.3.16     IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. */
+       DE_EMM_KSI_AND_SEQ_NO,          /* 9.9.3.17     KSI and sequence number */
+       DE_EMM_MS_NET_CAP,                      /* 9.9.3.18     MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6]. */
        DE_EMM_NAS_KEY_SET_ID,          /* 9.9.3.19     NAS key set identifier (coded inline)*/
-       DE_EMM_GPRS_NAS_SEC_ALGS,       /* 9.9.3.20     NAS security algorithms */
-       DE_EMM_GPRS_NET_NAME,           /* 9.9.3.21     Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. */
-       DE_EMM_GPRS_NONCE,                      /* 9.9.3.21a    Nonce */
-       DE_EMM_GPRS_P_TMSI,                     /* 9.9.3.22     P-TMSI, See subclause 10.5.1.4 in 3GPP TS 24.008 [6]. */
-       DE_EMM_GPRS_P_TMSI_SIGN,        /* 9.9.3.23     P-TMSI signature, See subclause 10.5.5.8 in 3GPP TS 24.008 [6]. */
+       DE_EMM_NAS_SEC_ALGS,            /* 9.9.3.20     NAS security algorithms */
+       DE_EMM_NET_NAME,                        /* 9.9.3.21     Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. */
+       DE_EMM_NONCE,                           /* 9.9.3.21a    Nonce */
+       DE_EMM_P_TMSI,                          /* 9.9.3.22     P-TMSI, See subclause 10.5.1.4 in 3GPP TS 24.008 [6]. */
+       DE_EMM_P_TMSI_SIGN,                     /* 9.9.3.23     P-TMSI signature, See subclause 10.5.5.8 in 3GPP TS 24.008 [6]. */
        DE_EMM_GPRS_RAI,                        /* 9.9.3.24     Routing area identification ,See subclause 10.5.5.15 in 3GPP TS 24.008 [6]. */
-       DE_EMM_GPRS_S_MAC,                      /* 9.9.3.25     Short MAC */
-       DE_EMM_GPRS_TZ,                         /* 9.9.3.26     Time zone, See subclause 10.5.3.8 in 3GPP TS 24.008 [6]. */
-       DE_EMM_GPRS_TZ_AND_T,           /* 9.9.3.27     Time zone and time, See subclause 10.5.3.9 in 3GPP TS 24.008 [6]. */
-       DE_EMM_GPRS_TMSI_STAT,          /* 9.9.3.27a    TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. */
-       DE_EMM_GPRS_TRAC_AREA_ID,       /* 9.9.3.28     Tracking area identity */
-       DE_EMM_GPRS_TRAC_AREA_ID_LST, /* 9.9.3.29       Tracking area identity list */
+       DE_EMM_SORT_MAC,                        /* 9.9.3.25     Short MAC */
+       DE_EMM_TZ,                                      /* 9.9.3.26     Time zone, See subclause 10.5.3.8 in 3GPP TS 24.008 [6]. */
+       DE_EMM_TZ_AND_T,                        /* 9.9.3.27     Time zone and time, See subclause 10.5.3.9 in 3GPP TS 24.008 [6]. */
+       DE_EMM_TMSI_STAT,                       /* 9.9.3.27a    TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. */
+       DE_EMM_TRAC_AREA_ID,            /* 9.9.3.28     Tracking area identity */
+       DE_EMM_TRAC_AREA_ID_LST,        /* 9.9.3.29     Tracking area identity list */
        DE_EMM_GPRS_UE_SEC_CAP,         /* 9.9.3.30     UE security capability */
-       DE_EMM_NONE                                                     /* NONE */
+       DE_EMM_NONE                                     /* NONE */
 }
 nas_emm_elem_idx_t;
 
@@ -222,7 +222,7 @@ nas_emm_elem_idx_t;
 /*
  * 9.9.3.4     Authentication response parameter
  */
-static guint8
+static guint16
 de_emm_auth_resp_par(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -239,7 +239,11 @@ de_emm_auth_resp_par(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len
  */
 /*
  * 9.9.3.6     Detach type
+ */
+/*
  * 9.9.3.6a    DRX parameter
+ */
+/*
  * 9.9.3.7     EMM cause
  */
 /*
@@ -257,7 +261,7 @@ static const value_string nas_eps_emm_EPS_attach_result_values[] = {
        { 7,    "reserved"},
        { 0, NULL }
 };
-/* Coded in line */
+/* Coded inline */
 
 /*
  * 9.9.3.9     EPS attach type
@@ -291,7 +295,7 @@ static const value_string nas_eps_emm_type_of_id_vals[] = {
        { 7,    "reserved"},
        { 0, NULL }
 };
-static guint8
+static guint16
 de_emm_eps_mid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
@@ -314,8 +318,22 @@ de_emm_eps_mid(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, g
 /*
  * 9.9.3.11    EPS update result
  * 9.9.3.12    EPS update type
+ */
+/*
  * 9.9.3.13    ESM message container
  */
+static guint16
+de_emm_esm_msg_cont(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+{
+       guint32 curr_offset;
+
+       curr_offset = offset;
+
+
+       proto_tree_add_text(tree, tvb, curr_offset, len, "Not decoded yet");
+
+       return(len);
+}
 /*
  * 9.9.3.14    GPRS timer
  * See subclause 10.5.7.3 in 3GPP TS 24.008 [6].
@@ -348,6 +366,21 @@ static const value_string nas_eps_emm_NAS_key_set_identifier_vals[] = {
 /* Coded Inline */
 /*
  * 9.9.3.20    NAS security algorithms
+ */
+static guint16
+de_emm_nas_sec_alsgs(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+{
+       guint32 curr_offset;
+
+       curr_offset = offset;
+
+
+       proto_tree_add_text(tree, tvb, curr_offset, 1 , "Not decoded yet");
+       curr_offset++;
+
+       return(curr_offset-offset);
+}
+/*
  * 9.9.3.21    Network name
  * See subclause 10.5.3.5a in 3GPP TS 24.008 [6].
  * 9.9.3.21a   Nonce
@@ -370,8 +403,8 @@ static const value_string nas_eps_emm_NAS_key_set_identifier_vals[] = {
 /*
  * 9.9.3.29    Tracking area identity list
  */
-static guint8
-de_emm_gprs_trac_area_id_lst(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+static guint16
+de_emm_trac_area_id_lst(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
 {
        guint32 curr_offset;
 
@@ -411,7 +444,7 @@ de_emm_gprs_trac_area_id_lst(tvbuff_t *tvb, proto_tree *tree, guint32 offset, gu
  * 9.9.4.14    Transaction identifier
  */
 
-guint8 (*emm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
+guint16 (*emm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) = {
        /* 9.9.3        EPS Mobility Management (EMM) information elements */
        NULL,                                           /* 9.9.3.1      Authentication failure parameter */
        NULL,                                           /* 9.9.3.2      Authentication parameter AUTN(packet-gsm_a_dtap.c) */
@@ -426,14 +459,14 @@ guint8 (*emm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint
        de_emm_eps_mid,                         /* 9.9.3.10     EPS mobile identity */
        NULL,                                           /* 9.9.3.11     EPS update result */
        NULL,                                           /* 9.9.3.12     EPS update type */
-       NULL,                                           /* 9.9.3.13     ESM message container */
+       de_emm_esm_msg_cont,            /* 9.9.3.13     ESM message container */
        NULL,                                           /* 9.9.3.14     GPRS timer ,See subclause 10.5.7.3 in 3GPP TS 24.008 [6]. */
        NULL,                                           /* 9.9.3.15     Identity type 2 ,See subclause 10.5.5.9 in 3GPP TS 24.008 [6]. */
        NULL,                                           /* 9.9.3.16     IMEISV request ,See subclause 10.5.5.10 in 3GPP TS 24.008 [6]. */
        NULL,                                           /* 9.9.3.17     KSI and sequence number */
        NULL,                                           /* 9.9.3.18     MS network capability ,See subclause 10.5.5.12 in 3GPP TS 24.008 [6]. */
        NULL,                                           /* 9.9.3.19     NAS key set identifier (Coded Inline) */
-       NULL,                                           /* 9.9.3.20     NAS security algorithms */
+       de_emm_nas_sec_alsgs,           /* 9.9.3.20     NAS security algorithms */
        NULL,                                           /* 9.9.3.21     Network name, See subclause 10.5.3.5a in 3GPP TS 24.008 [6]. */
        NULL,                                           /* 9.9.3.21a    Nonce */
        NULL,                                           /* 9.9.3.22     P-TMSI, See subclause 10.5.1.4 in 3GPP TS 24.008 [6]. */
@@ -444,7 +477,7 @@ guint8 (*emm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint
        NULL,                                           /* 9.9.3.27     Time zone and time, See subclause 10.5.3.9 in 3GPP TS 24.008 [6]. */
        NULL,                                           /* 9.9.3.27a    TMSI status, See subclause 10.5.5.4 in 3GPP TS 24.008 [6]. */
        NULL,                                           /* 9.9.3.28     Tracking area identity */
-       de_emm_gprs_trac_area_id_lst,   /* 9.9.3.29     Tracking area identity list */
+       de_emm_trac_area_id_lst,        /* 9.9.3.29     Tracking area identity list */
        NULL,                                           /* 9.9.3.30     UE security capability */
        NULL,   /* NONE */
 };
@@ -481,8 +514,9 @@ nas_emm_attach_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
        /*      T3412 value     GPRS timer 9.9.3.14     M       V       1 */
        ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER);
        /*      TAI list        Tracking area identity list 9.9.3.29    M       LV      7-97 */
-       ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_GPRS_TRAC_AREA_ID_LST, "");
+       ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID_LST, "");
        /*      ESM message container 9.9.3.13  M       LV-E    2-n */
+       ELEM_MAND_LV_E(NAS_PDU_TYPE_EMM, DE_EMM_ESM_MSG_CONT, "");
        /* 50   GUTI    EPS mobile identity 9.9.3.10    O       TLV     13 */
        /* 13   Location area identification    Location area identification 9.9.2.2    O       TV      6 */
        /* 23   MS identity     Mobile identity 9.9.2.3 O       TLV     7-10 */
@@ -495,13 +529,13 @@ nas_emm_attach_acc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
 }
 /*
  * 8.2.2       Attach complete
- * ESM message container       ESM message container 9.9.3.13  M       LV-E    2-n
+ * ESM message container       ESM message container 9.9.3.13  M       LV-E    2-n DE_EMM_ESM_MSG_CONT
  */
 /*
  * 8.2.3       Attach reject
  *
  * EMM cause   EMM cause 9.9.3.7       M       V       1
- * 78 ESM message container    ESM message container 9.9.3.13  O       TLV-E   4-n
+ * 78 ESM message container    ESM message container 9.9.3.13  O       TLV-E   4-n DE_EMM_ESM_MSG_CONT
  */
 /*
  * 8.2.4       Attach request
@@ -534,9 +568,9 @@ nas_emm_attach_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
        curr_len--;
        curr_offset++;
        /* Old GUTI or IMSI     EPS mobile identity 9.9.3.10    M       LV      5-12 */
-       ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, " - Old GUTI or IMSI");
+       ELEM_MAND_LV(NAS_PDU_TYPE_EMM, DE_EMM_EPS_MID, "");
        /* MS network capability        MS network capability 9.9.3.18  M       LV      3-9 */
-       /* ESM message container        ESM message container 9.9.3.13  M       LV-E    2-n */
+       /* ESM message container        ESM message container 9.9.3.13  M       LV-E    2-n DE_EMM_ESM_MSG_CONT*/
        /* 52 Last visited registered TAI       Tracking area identity 9.9.3.28 O       TV      6 */
        /* 5c DRX parameter     DRX parameter 9.9.3.6a  O       FFS     FFS */
        /* 13 Old location area identification  Location area identification 9.9.2.2    O       TV      6 */
@@ -663,14 +697,47 @@ nas_emm_auth_resp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
  */
 /*
  * 8.2.17      Security mode command
- *     Selected NAS security algorithms        NAS security algorithms 9.9.3.20        M       V       1
- *     NAS key set identifierASME      NAS key set identifier 9.9.3.19 M       V       1/2
- *     NAS key set identifierSGSN      NAS key set identifier 9.9.3.19 M       V       1/2
- *     Replayed UE security capabilities       UE security capability 9.9.3.30 M       LV      3-6
- * C-  IMEISV request  IMEISV request 9.9.3.16 O       TV      1
- * 55  Replayed NonceUE        Nonce 9.9.3.21a O       TV      5
- * 56  NonceMME        Nonce 9.9.3.21a O       TV      5
  */
+static void
+nas_emm_sec_mode_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len)
+{
+       proto_item *item;
+       guint32 curr_offset, bit_offset;
+       guint32 consumed;
+       guint   curr_len;
+
+       curr_offset = offset;
+       curr_len = len;
+
+       consumed = len;
+       /*      Selected NAS security algorithms        NAS security algorithms 9.9.3.20        M       V       1  */
+       ELEM_MAND_V(NAS_PDU_TYPE_EMM, DE_EMM_NAS_SEC_ALGS);
+       /*      NAS key set identifierASME      NAS key set identifier 9.9.3.19 M       V       1/2 */
+       bit_offset = curr_offset<<3;
+       proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, FALSE);
+       bit_offset++;
+       item = proto_tree_add_bits_item(tree, hf_nas_eps_emm_nas_key_set_id, tvb, bit_offset, 3, FALSE);
+       proto_item_append_text(item," - ASME");
+       bit_offset+=3;
+       /*      NAS key set identifierSGSN      NAS key set identifier 9.9.3.19 M       V       1/2 */
+       bit_offset = curr_offset<<3;
+       proto_tree_add_bits_item(tree, hf_nas_eps_spare_bits, tvb, bit_offset, 1, FALSE);
+       bit_offset++;
+       item = proto_tree_add_bits_item(tree, hf_nas_eps_emm_nas_key_set_id, tvb, bit_offset, 3, FALSE);
+       proto_item_append_text(item," - SGSN");
+       bit_offset+=3;
+
+       /* Fix up the lengths */
+       curr_len--;
+       curr_offset++;
+
+       /*      Replayed UE security capabilities       UE security capability 9.9.3.30 M       LV      3-6 */
+       /* C-   IMEISV request  IMEISV request 9.9.3.16 O       TV      1 */
+       /* 55   Replayed NonceUE        Nonce 9.9.3.21a O       TV      5 */
+       /* 56   NonceMME        Nonce 9.9.3.21a O       TV      5 */
+
+       EXTRANEOUS_DATA_CHECK(curr_len, 0);
+}
 /*
  * 8.2.18      Security mode complete
  * 23  IMEISV  Mobile identity 9.9.2.3 O       TLV     11
@@ -800,7 +867,7 @@ static void (*nas_msg_emm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset
        NULL,   /* Authentication failure */
        NULL,   /* Identity request */
        NULL,   /* Identity response */
-       NULL,   /* Security mode command */
+       nas_emm_sec_mode_cmd,   /* Security mode command */
        NULL,   /* Security mode complete */
        NULL,   /* Security mode reject */