Coverage Report

Created: 2026-07-12 07:10

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wireshark/epan/dissectors/packet-gsm_a_rr.c
Line
Count
Source
1
/* packet-gsm_a_rr.c
2
 * Routines for GSM A Interface (actually A-bis really) RR dissection - A.K.A. GSM layer 3 Radio Resource Protocol
3
 *
4
 * Copyright 2003, Michael Lum <mlum [AT] telostech.com>
5
 * In association with Telos Technology Inc.
6
 *
7
 * Added Dissection of Radio Resource Management Information Elements
8
 * and other enhancements and fixes.
9
 * Copyright 2005 - 2006, Anders Broman [AT] ericsson.com
10
 *
11
 * Added Dissection of E-UTRAN Description struct in
12
 * Cell selection indicator after release of all TCH and SDCCH IE
13
 * Lars Sundstrom X [AT] ericsson.com and Kjell Jansson [AT] ericsson.com
14
 * On Behalf of Ericsson AB
15
 *
16
 * Title        3GPP            Other
17
 *
18
 *   Reference [3]
19
 *   Mobile radio interface Layer 3 specification;
20
 *   Core network protocols;
21
 *   Stage 3
22
 *   (3GPP TS 24.008 version 4.7.0 Release 4)
23
 *   (ETSI TS 124 008 V6.8.0 (2005-03))
24
 *
25
 *   Reference [4]
26
 *   Mobile radio interface layer 3 specification;
27
 *   Radio Resource Control Protocol
28
 *   (GSM 04.18 version 8.4.1 Release 1999)
29
 *   (3GPP TS 04.18 version 8.26.0 Release 1999)
30
 *
31
 * Wireshark - Network traffic analyzer
32
 * By Gerald Combs <gerald@wireshark.org>
33
 * Copyright 1998 Gerald Combs
34
 *
35
 * SPDX-License-Identifier: GPL-2.0-or-later
36
 */
37
38
#include "config.h"
39
40
#include <epan/packet.h>
41
#include <epan/tap.h>
42
#include <epan/expert.h>
43
#include <epan/proto_data.h>
44
#include <epan/tfs.h>
45
#include <wsutil/array.h>
46
#include "packet-ber.h"
47
#include "packet-gsm_a_common.h"
48
#include "packet-gsmtap.h"
49
50
#include "packet-gsm_a_rr.h"
51
52
void proto_register_gsm_a_rr(void);
53
void proto_reg_handoff_gsm_a_rr(void);
54
55
static dissector_handle_t rrc_irat_ho_info_handle;
56
static dissector_handle_t rrc_irat_ho_to_utran_cmd_handle;
57
58
static unsigned gsm_a_rr_nri_length;
59
60
26.1k
#define PADDING_BYTE 0x2B
61
62
/* 3GPP TS 44.018 version 11.2.0 Release 11 */
63
const value_string gsm_a_dtap_msg_rr_strings[] = {
64
    { 0x3c, "Reserved" },
65
    { 0x3b, "Additional Assignment" },
66
    { 0x3f, "Immediate Assignment" },
67
    { 0x39, "Immediate Assignment Extended" },
68
    { 0x3a, "Immediate Assignment Reject" },
69
    { 0x6a, "EC-Immediate Assignment Type 1"},
70
71
    { 0x48, "DTM Assignment Failure" },
72
    { 0x49, "DTM Reject" },
73
    { 0x4a, "DTM Request" },
74
    { 0x4b, "Packet Assignment" },
75
    { 0x4c, "DTM Assignment Command" },
76
    { 0x4d, "DTM Information" },
77
    { 0x4e, "Packet Notification" },
78
79
    { 0x35, "Ciphering Mode Command" },
80
    { 0x32, "Ciphering Mode Complete" },
81
82
    { 0x30, "Configuration Change Command" },
83
    { 0x31, "Configuration Change Ack." },
84
    { 0x33, "Configuration Change Reject" },
85
86
    { 0x2e, "Assignment Command" },
87
    { 0x29, "Assignment Complete" },
88
    { 0x2f, "Assignment Failure" },
89
    { 0x2b, "Handover Command" },
90
    { 0x2c, "Handover Complete" },
91
    { 0x28, "Handover Failure" },
92
    { 0x2d, "Physical Information" },
93
94
    { 0x08, "RR-cell Change Order" },
95
    { 0x23, "PDCH Assignment Command" },
96
97
    { 0x0d, "Channel Release" },
98
    { 0x0a, "Partial Release" },
99
    { 0x0f, "Partial Release Complete" },
100
101
    { 0x21, "Paging Request Type 1" },
102
    { 0x22, "Paging Request Type 2" },
103
    { 0x24, "Paging Request Type 3" },
104
    { 0x27, "Paging Response" },
105
    { 0x20, "Notification/NCH" },
106
    { 0x25, "Reserved" },
107
    { 0x26, "Notification/Response" },
108
109
    { 0x0b, "Reserved" },
110
111
#if 0
112
/* ETSI TS 101 503 V8.5.0 Seems to give Other def for this Messages??? */
113
    { 0xc0, "Utran Classmark Change" }, CONFLICTS WITH Handover To UTRAN Command
114
    { 0xc1, "UE RAB Preconfiguration" },
115
    { 0xc2, "cdma2000 Classmark Change" },
116
#endif
117
118
    /* ETSI TS 101 503 V8.5.0 */
119
    { 0x60, "Utran Classmark Change" },
120
    { 0x62, "cdma2000 Classmark Change" },
121
    { 0x63, "Inter System to UTRAN Handover Command" },
122
    { 0x64, "Inter System to cdma2000 Handover Command" },
123
    { 0x18, "System Information Type 8" },
124
    { 0x19, "System Information Type 1" },
125
    { 0x1a, "System Information Type 2" },
126
    { 0x1b, "System Information Type 3" },
127
    { 0x1c, "System Information Type 4" },
128
    { 0x1d, "System Information Type 5" },
129
    { 0x1e, "System Information Type 6" },
130
    { 0x1f, "System Information Type 7" },
131
132
    { 0x02, "System Information Type 2bis" },
133
    { 0x03, "System Information Type 2ter" },
134
    { 0x07, "System Information Type 2quater" },
135
    { 0x05, "System Information Type 5bis" },
136
    { 0x06, "System Information Type 5ter" },
137
    { 0x04, "System Information Type 9" },
138
    { 0x00, "System Information Type 13" },
139
140
    { 0x3d, "System Information Type 16" },
141
    { 0x3e, "System Information Type 17" },
142
143
    { 0x40, "System Information Type 18" },
144
    { 0x41, "System Information Type 19" },
145
    { 0x42, "System Information Type 20" },
146
    { 0x46, "System Information Type 21" },
147
148
    { 0x10, "Channel Mode Modify" },
149
    { 0x12, "RR Status" },
150
    { 0x17, "Channel Mode Modify Acknowledge" },
151
    { 0x14, "Frequency Redefinition" },
152
    { 0x15, "Measurement Report" },
153
    { 0x16, "Classmark Change" },
154
    { 0x13, "Classmark Enquiry" },
155
    { 0x36, "Extended Measurement Report" },
156
    { 0x37, "Extended Measurement Order" },
157
    { 0x34, "GPRS Suspension Request" },
158
159
    { 0x09, "VGCS Uplink Grant" },
160
    { 0x0e, "Uplink Release" },
161
    { 0x0c, "Reserved" },
162
    { 0x2a, "Uplink Busy" },
163
    { 0x11, "Talker Indication" },
164
165
    { 0xc0, "UTRAN Classmark Change/Handover To UTRAN Command" }, /* spec conflict */
166
167
    { 0x38, "Application Information" },
168
169
    {    0, NULL }
170
};
171
172
static const value_string gsm_a_dtap_msg_rr_ec_ccch_strings[] = {
173
    /* Channel establishment messages */
174
    { 0x01, "EC-Immediate Assignment Type 2" },
175
    { 0x02, "EC-Immediate Assignment Reject" },
176
    { 0x03, "EC-Dummy" },
177
    { 0x04, "EC-Downlink Assignment" },
178
    { 0x09, "EC-Paging Request" },
179
180
    {    0, NULL }
181
};
182
183
static const value_string gsm_rr_elem_strings[] = {
184
    /* Radio Resource Management Information Elements 10.5.2, most are from 10.5.1 */
185
    { DE_RR_BA_RANGE, "BA Range" },                                     /* [3]  10.5.2.1a BA Range */
186
    { DE_RR_CELL_CH_DSC, "Cell Channel Description" },                  /* [3]  10.5.2.1b */
187
    { DE_RR_BA_LIST_PREF, "BA List Pref" },                             /* [3]  10.5.2.1c BA List Pref */
188
    { DE_RR_UTRAN_FREQ_LIST, "UTRAN Frequency List" },                  /* [3]  10.5.2.1d UTRAN Frequency List */
189
    { DE_RR_CELL_SELECT_INDIC, "Cell Selection Indicator after Release of all TCH and SDCCH" }, /* [3]  10.5.2.1e   Cell selection indicator after release of all TCH and SDCCH IE */
190
    { DE_RR_CELL_DSC, "Cell Description" },                             /* 10.5.2.2  */
191
    { DE_RR_CELL_OPT_BCCH, "Cell Options (BCCH)" },                     /* [3]  10.5.2.3    Cell Options (BCCH) */
192
    { DE_RR_CELL_OPT_SACCH, "Cell Options (SACCH)" },                   /* [3]  10.5.2.3a   Cell Options (SACCH) */
193
    { DE_RR_CELL_SEL_PARAM, "Cell Selection Parameters" },              /* [3]  10.5.2.4    Cell Selection Parameters */
194
/* [3]  10.5.2.4a   (void) */
195
    { DE_RR_CH_DSC, "Channel Description" },                            /* 10.5.2.5  */
196
    { DE_RR_CH_DSC2, "Channel Description 2" },                         /* 10.5.2.5a */
197
    { DE_RR_CH_DSC3, "Channel Description 3" },                         /* 10.5.2.5c */
198
    { DE_RR_CH_MODE, "Channel Mode" },                                  /* [3]  10.5.2.6 */
199
    { DE_RR_CH_MODE2, "Channel Mode 2" },                               /* [3]  10.5.2.7 */
200
    { DE_RR_UTRAN_CM, "UTRAN Classmark" },                              /* [3]  10.5.2.7a   */
201
/* [3]  10.5.2.7b   (void) */
202
    { DE_RR_CM_ENQ_MASK, "Classmark Enquiry Mask" },                    /* [3]  10.5.2.7c */
203
/* [3]  10.5.2.7d   GERAN Iu Mode Classmark information element */
204
    { DE_RR_CHNL_NEEDED, "Channel Needed"},                             /* [3]  10.5.2.8    */
205
    /* [3]  10.5.2.8a   (void) */
206
    { DE_RR_CHNL_REQ_DESC2, "Channel Request Description 2"},           /* [3]  10.5.2.8b   Channel Request Description 2 */
207
    /* Pos 20 */
208
    { DE_RR_CIP_MODE_SET, "Cipher Mode Setting" },                      /* [3]  10.5.2.9    */
209
    { DE_RR_CIP_MODE_RESP, "Cipher Mode Response" },                    /* [3]  10.5.2.10   */
210
    { DE_RR_CTRL_CH_DESC, "Control Channel Description" },              /* [3]  10.5.2.11   Control Channel Description */
211
    { DE_RR_DTM_INFO_DETAILS, "DTM Information Details" },              /* [3]  10.5.2.11a  DTM Information Details */
212
    { DE_RR_DYN_ARFCN_MAP, "Dynamic ARFCN Mapping" },                   /* [3]  10.5.2.11b  */
213
    { DE_RR_FREQ_CH_SEQ, "Frequency Channel Sequence" },                /* [3]  10.5.2.12   */
214
    { DE_RR_FREQ_LIST, "Frequency List" },                              /* 10.5.2.13        */
215
    { DE_RR_FREQ_SHORT_LIST, "Frequency Short List" },                  /* 10.5.2.14        */
216
    { DE_RR_FREQ_SHORT_LIST2, "Frequency Short List 2" },               /* 10.5.2.14a       */
217
/* [3]  10.5.2.14b  Group Channel Description */
218
    { DE_RR_GPRS_RESUMPTION, "GPRS Resumption" },                       /* [3]  10.5.2.14c  GPRS Resumption */
219
    { DE_RR_GPRS_BROADCAST_INFORMATION, "GPRS Broadcast Information" }, /* [3]  10.5.2.14d  GPRS broadcast information */
220
/* [3]  10.5.2.14e  Enhanced DTM CS Release Indication */
221
    { DE_RR_HO_REF, "Handover Reference" },                             /* 10.5.2.15        */
222
    { DE_RR_IA_REST_OCT, "IA Rest Octets" },                            /* [3] 10.5.2.16    */
223
    { DE_RR_IAR_REST_OCT, "IAR Rest Octets" },                          /* [3] 10.5.2.17 IAR Rest Octets */
224
    { DE_RR_IAX_REST_OCT, "IAX Rest Octets" },                          /* [3] 10.5.2.18 IAX Rest Octets */
225
    { DE_RR_L2_PSEUDO_LEN, "L2 Pseudo Length" },                        /* [3] 10.5.2.19    */
226
    { DE_RR_MEAS_RES, "Measurement Results" },                          /* [3] 10.5.2.20 Measurement Results */
227
/*
228
 * [3] 10.5.2.20a GPRS Measurement Results
229
 */
230
    { DE_RR_MOB_ALL, "Mobile Allocation" },                             /* [3] 10.5.2.21    */
231
    { DE_RR_MOB_TIME_DIFF, "Mobile Time Difference" },                  /* [3] 10.5.2.21a   */
232
    { DE_RR_MULTIRATE_CONF, "MultiRate configuration" },                /* [3] 10.5.2.21aa  */
233
    /* Pos 30 */
234
    { DE_RR_MULT_ALL, "Multislot Allocation" },                         /* [3] 10.5.2.21b   */
235
    /*
236
     * [3] 10.5.2.21c NC mode
237
     */
238
    { DE_RR_NEIGH_CELL_DESC, "Neighbour Cell Description" },            /* [3] 10.5.2.22 Neighbour Cell Description */
239
    { DE_RR_NEIGH_CELL_DESC2, "Neighbour Cell Description 2" },         /* [3] 10.5.2.22a Neighbour Cell Description 2 */
240
/*
241
 * [3] 10.5.2.22b (void)
242
 * [3] 10.5.2.22c NT/N Rest Octets */
243
    { DE_RR_P1_REST_OCT, "P1 Rest Octets" },                            /* [3] 10.5.2.23 P1 Rest Octets */
244
    { DE_RR_P2_REST_OCT, "P2 Rest Octets" },                            /* [3] 10.5.2.24 P2 Rest Octets */
245
    { DE_RR_P3_REST_OCT, "P3 Rest Octets" },                            /* [3] 10.5.2.25 P3 Rest Octets */
246
    { DE_RR_PACKET_CH_DESC, "Packet Channel Description" },             /* [3] 10.5.2.25a   */
247
    { DE_RR_DED_MOD_OR_TBF, "Dedicated mode or TBF" },                  /* [3] 10.5.2.25b */
248
    { DE_RR_PKT_UL_ASS, "Packet Uplink Assignment" },                   /* [3] 10.5.2.25c RR Packet Uplink Assignment */
249
    { DE_RR_PKT_DL_ASS, "Packet Downlink Assignment" },                 /* [3] 10.5.2.25d RR Packet Downlink Assignment */
250
    { DE_RR_PKT_DL_ASS_TYPE2, "Packet Downlink Assignment Type 2" },    /* [3] 110.5.2.25e RR Packet Downlink Assignment Type 2 */
251
    { DE_RR_PAGE_MODE, "Page Mode" },                                   /* [3] 10.5.2.26  */
252
    { DE_RR_NCC_PERM, "NCC Permitted" },                                /* [3] 10.5.2.27 NCC Permitted */
253
    { DE_RR_POW_CMD, "Power Command" },                                 /* 10.5.2.28 */
254
    { DE_RR_POW_CMD_AND_ACC_TYPE, "Power Command and access type" },    /* 10.5.2.28a */
255
    { DE_RR_RACH_CTRL_PARAM, "RACH Control Parameters" },               /* [3] 10.5.2.29 RACH Control Parameters */
256
    { DE_RR_REQ_REF, "Request Reference" },                             /* [3] 10.5.2.30 Request Reference */
257
    { DE_RR_CAUSE, "RR Cause" },                                        /* 10.5.2.31 */
258
    { DE_RR_SYNC_IND, "Synchronization Indication" },                   /* 10.5.2.39 */
259
    { DE_RR_SI1_REST_OCT, "SI 1 Rest Octets" },                         /* [3] 10.5.2.32 */
260
/* [3] 10.5.2.33 SI 2bis Rest Octets */
261
    { DE_RR_SI2TER_REST_OCT, "SI 2ter Rest Octets" },                   /* [3] 10.5.2.33a */
262
    { DE_RR_SI2QUATER_REST_OCT, "SI 2quater Rest Octets" },             /* [3] 10.5.2.33b */
263
    { DE_RR_SI3_REST_OCT, "SI 3 Rest Octets" },                         /* [3] 10.5.2.34 */
264
    { DE_RR_SI4_REST_OCT, "SI 4 Rest Octets" },                         /* [3] 10.5.2.35 */
265
    { DE_RR_SI6_REST_OCT, "SI 6 Rest Octets" },                         /* [3] 10.5.2.35a */
266
/* [3] 10.5.2.36 SI 7 Rest Octets
267
 * [3] 10.5.2.37 SI 8 Rest Octets
268
 * [3] 10.5.2.37a SI 9 Rest Octets
269
 */
270
    { DE_RR_SI13_REST_OCT, "SI 13 Rest Octets" },                       /* [3] 10.5.2.37b */
271
/* [3] 10.5.2.37c (void)
272
 * [3] 10.5.2.37d (void)
273
 * [3] 10.5.2.37e SI 16 Rest Octets
274
 * [3] 10.5.2.37f SI 17 Rest Octets
275
 * [3] 10.5.2.37g SI 19 Rest Octets
276
 * [3] 10.5.2.37h SI 18 Rest Octets
277
 * [3] 10.5.2.37i SI 20 Rest Octets */
278
    { DE_RR_SI21_REST_OCT, "SI 21 Rest Octets" },                       /* [3] 10.5.2.37m */
279
    { DE_RR_STARTING_TIME, "Starting Time" },                           /* [3] 10.5.2.38 Starting Time  */
280
    { DE_RR_TIMING_ADV, "Timing Advance" },                             /* [3] 10.5.2.40 Timing Advance */
281
    { DE_RR_TIME_DIFF, "Time Difference" },                             /* [3] 10.5.2.41 Time Difference */
282
    { DE_RR_TLLI, "TLLI" },                                             /* [3] 10.5.2.41a TLLI  */
283
    { DE_RR_TMSI_PTMSI, "TMSI/P-TMSI" },                                /* [3] 10.5.2.42 TMSI/P-TMSI */
284
    { DE_RR_VGCS_TAR_MODE_IND, "VGCS target mode Indication" },         /* [3] 10.5.2.42a */
285
    /* Pos 40 */
286
    { DE_RR_VGCS_CIP_PAR, "VGCS Ciphering Parameters" },                /* [3] 10.5.2.42b */
287
    { DE_RR_WAIT_IND, "Wait Indication" },                              /* [3] 10.5.2.43 Wait Indication */
288
/* [3] 10.5.2.44 SI10 rest octets $(ASCI)$ */
289
    { DE_RR_EXT_MEAS_RESULT, "Extended Measurement Results" },          /* [3] 10.5.2.45 Extended Measurement Results */
290
    { DE_RR_EXT_MEAS_FREQ_LIST, "Extended Measurement Frequency List" },/* [3] 10.5.2.46 Extended Measurement Frequency List */
291
    { DE_RR_SUS_CAU, "Suspension Cause" },                              /* [3] 10.5.2.47                                */
292
    { DE_RR_APDU_ID, "APDU ID" },                                       /* [3] 10.5.2.48 APDU ID */
293
    { DE_RR_APDU_FLAGS, "APDU Flags" },                                 /* [3] 10.5.2.49 APDU Flags */
294
    { DE_RR_APDU_DATA, "APDU Data" },                                   /* [3] 10.5.2.50 APDU Data */
295
    { DE_RR_HO_TO_UTRAN_CMD, "Handover to UTRAN Command" },             /* [3] 10.5.2.51 Handover To UTRAN Command */
296
/* [3] 10.5.2.52 Handover To cdma2000 Command
297
 * [3] 10.5.2.53 (void)
298
 * [3] 10.5.2.54 (void)
299
 * [3] 10.5.2.55 (void)
300
 * [3] 10.5.2.56 3G Target Cell */
301
    { DE_RR_SERV_SUP, "Service Support" },                              /* [3] 10.5.2.57    */
302
    /* 10.5.2.58 MBMS p-t-m Channel Description */
303
    { DE_RR_DED_SERV_INF, "Dedicated Service Information" },            /* [3] 10.5.2.59    */
304
/*
305
 * 10.5.2.60 MPRACH Description
306
 * 10.5.2.61 Restriction Timer
307
 * 10.5.2.62 MBMS Session Identity
308
 * 10.5.2.63 Reduced group or broadcast call reference
309
 * 10.5.2.64 Talker Priority status
310
 * 10.5.2.65 Talker Identity
311
 * 10.5.2.66 Token
312
 * 10.5.2.67 PS Cause
313
 * 10.5.2.68 VGCS AMR Configuration
314
 */
315
    { DE_RR_CARRIER_IND, "Carrier Indication" },                        /* 10.5.2.69 Carrier Indication */
316
/*
317
 * 10.5.2.70 SI10bis Rest Octets
318
 * 10.5.2.71 SI10ter Rest Octets
319
 * 10.5.2.72 Application Data
320
 * 10.5.2.73 Data Identity
321
 * 10.5.2.74 Uplink Access Indication
322
 * 10.5.2.75 Individual priorities
323
 */
324
    { DE_RR_FEATURE_INDICATOR, "Feature Indicator" },                   /* 10.5.2.76 Feature Indicator */
325
/*
326
 * 10.5.2.77 (void)
327
 * 10.5.2.78 IPA Rest Octets
328
 * 10.5.2.79 DL-DCCH-Message
329
 * 10.5.2.80 CN to MS transparent information
330
 * 10.5.2.81 PLMN Index
331
 */
332
    { DE_RR_EXTENDED_TSC_SET, "Extended TSC Set" },                     /* 10.5.2.82 Extended TSC Set */
333
    { DE_RR_EC_REQUEST_REFERENCE, "EC Request Reference" },             /* 10.5.2.83 EC Request reference */
334
    { DE_RR_EC_PKT_CH_DSC1, "EC Packet Channel Description Type 1" },   /* 10.5.2.84 EC Packet Channel Description Type 1 */
335
    { DE_RR_EC_PKT_CH_DSC2, "EC Packet Channel Description Type 2" },   /* 10.5.2.85 EC Packet Channel Description Type 2 */
336
    { DE_RR_EC_FUA, "EC Fixed Uplink Allocation"},                      /* 10.5.2.86 EC Fixed Uplink Allocation */
337
    {    0, NULL }
338
};
339
value_string_ext gsm_rr_elem_strings_ext = VALUE_STRING_EXT_INIT(gsm_rr_elem_strings);
340
341
static const char* gsm_rr_rest_octets_elem_strings[] = {
342
    /* RR Rest Octets information elements */
343
    "UTRAN FDD Description",
344
    "UTRAN TDD Description",
345
    "3G Measurement Parameters Description",
346
    "3G Additional Measurement Parameters Description",
347
    "Measurement Parameters Description",
348
    "GPRS Real Time Difference Description",
349
    "GPRS BSIC Description",
350
    "GPRS Report Priority Description",
351
    "GPRS Measurement Parameters Description",
352
    "NC Measurement Parameters",
353
    "SI2q Extension Information",
354
    "CCN Support Description",
355
    "3G Neighbour Cell Description",
356
    "FDD Cell Information Field",
357
    "TDD Cell Information Field",
358
    "GPRS 3G Measurement Parameters Description",
359
    "3G Additional Measurement Parameters Description 2",
360
    "Priority and E-UTRAN Parameters Description",
361
    "Serving Cell Priority Parameters Description",
362
    "3G Priority Parameters Description",
363
    "UTRAN Priority Parameters",
364
    "E-UTRAN Parameters Description",
365
    "E-UTRAN Neighbour Cells",
366
    "E-UTRAN Not Allowed Cells",
367
    "E-UTRAN PCID to TA mapping",
368
    "3G CSG Description",
369
    "E-UTRAN CSG Description",
370
    "Optional Selection Parameters",
371
    "GPRS Indicator",
372
    "SI4 Rest Octets_O",
373
    "SI4 Rest Octets_S",
374
    "LSA Parameters",
375
    "LSA ID Information",
376
    "PCH and NCH Info",
377
    "VBS/VGCS Options",
378
    "GPRS Mobile Allocation",
379
    "GPRS Cell Options",
380
    "GPRS Cell Options Extension Information",
381
    "GPRS Power Control Parameters",
382
    "PBCCH Description",
383
    "GSM Description",
384
    "Real Time Difference Description",
385
    "BSIC Description",
386
    "Report Priority Description",
387
    "CDMA2000 Description",
388
    "Serving cell data",
389
    "Repeated Invalid BSIC Information",
390
    "Bitmap Type Reporting",
391
    "3G Supplementary Parameters Description",
392
    "UTRAN Measurement Control Parameters",
393
    "EGPRS Packet Uplink Assignment",
394
    "Multiple Blocks Packet Downlink Assignment",
395
    "Temporary Mobile Group Identity (TMGI)",
396
    "Packet Timing Advance",
397
    "Packet Uplink Assignment",
398
    "Packet Downlink Assignment",
399
    "Second Part Packet Assignment",
400
    "REPORTING QUANTITY",
401
    "E-UTRAN Measurement Report",
402
    "E-UTRAN Description",
403
    "EAB Parameters",
404
};
405
406
407
/* RR cause value (octet 2) 3GPP TS 24.018, section 10.5.2.31 */
408
/* public symbol for packet-gsm_gsup.c */
409
static const value_string gsm_a_rr_RR_cause_vals[] = {
410
    {    0, "Normal event"},
411
    {    1, "Abnormal release, unspecified"},
412
    {    2, "Abnormal release, channel unacceptable"},
413
    {    3, "Abnormal release, timer expired"},
414
    {    4, "Abnormal release, no activity on the radio path"},
415
    {    5, "Preemptive release"},
416
    {    6, "UTRAN configuration unknown"},
417
    {    8, "Handover impossible, timing advance out of range"},
418
    {    9, "Channel mode unacceptable"},
419
    {   10, "Frequency not implemented"},
420
    {   11, "Originator or talker leaving group call area"},
421
    {   12, "Lower layer failure"},
422
    { 0x41, "Call already cleared"},
423
    { 0x5f, "Semantically incorrect message"},
424
    { 0x60, "Invalid mandatory information"},
425
    { 0x61, "Message type non-existent or not implemented"},
426
    { 0x62, "Message type not compatible with protocol state"},
427
    { 0x64, "Conditional IE error"},
428
    { 0x65, "No cell allocation available"},
429
    { 0x6f, "Protocol error unspecified"},
430
    { 0, NULL }
431
};
432
433
static const value_string gsm_a_rr_algorithm_identifier_vals[] = {
434
    { 0, "Cipher with algorithm A5/1"},
435
    { 1, "Cipher with algorithm A5/2"},
436
    { 2, "Cipher with algorithm A5/3"},
437
    { 3, "Cipher with algorithm A5/4"},
438
    { 4, "Cipher with algorithm A5/5"},
439
    { 5, "Cipher with algorithm A5/6"},
440
    { 6, "Cipher with algorithm A5/7"},
441
    { 7, "Reserved"},
442
    { 0, NULL }
443
};
444
445
static const value_string gsm_a_rr_ec_cc_vals[] = {
446
    {0x00, "Coverage Class 1"},
447
    {0x01, "Coverage Class 2"},
448
    {0x02, "Coverage Class 3"},
449
    {0x03, "Coverage Class 4"},
450
    {0, NULL }
451
};
452
453
15
#define DTAP_PD_MASK            0x0f
454
15
#define DTAP_SKIP_MASK          0xf0
455
15
#define DTAP_TI_MASK            DTAP_SKIP_MASK
456
30
#define DTAP_TIE_PRES_MASK      0x07                    /* after TI shifted to right */
457
#define DTAP_TIE_MASK           0x7f
458
459
48.1k
#define DTAP_RR_IEI_MASK        0xff
460
461
/* Initialize the protocol and registered fields */
462
static int proto_a_rr;
463
static int proto_a_ccch;
464
static int proto_a_ec_ccch;
465
static int proto_a_sacch;
466
static int proto_a_rach;
467
468
static int hf_gsm_a_dtap_msg_rr_type;
469
static int hf_gsm_a_dtap_msg_rr_ec_ccch_type;
470
471
int hf_gsm_a_rr_elem_id;
472
473
static int hf_gsm_a_rr_short_pd_msg_type;
474
static int hf_gsm_a_rr_short_pd;
475
static int hf_gsm_a_rr_short_l2_header;
476
477
478
static int hf_gsm_a_rr_bcc;
479
static int hf_gsm_a_rr_ncc;
480
static int hf_gsm_a_rr_bcch_arfcn;
481
static int hf_gsm_a_rr_range_nb;
482
static int hf_gsm_a_rr_range_lower;
483
static int hf_gsm_a_rr_range_higher;
484
static int hf_gsm_a_rr_ba_freq;
485
static int hf_gsm_a_rr_ho_ref_val;
486
static int hf_gsm_a_rr_L2_pseudo_len;
487
static int hf_gsm_a_rr_ba_used;
488
static int hf_gsm_a_rr_dtx_used;
489
static int hf_gsm_a_rr_3g_ba_used;
490
static int hf_gsm_a_rr_meas_valid;
491
static int hf_gsm_a_rr_rxlev_full_serv_cell;
492
static int hf_gsm_a_rr_rxlev_sub_serv_cell;
493
static int hf_gsm_a_rr_si23_ba_used;
494
static int hf_gsm_a_rr_rxqual_full_serv_cell;
495
static int hf_gsm_a_rr_rxqual_sub_serv_cell;
496
static int hf_gsm_a_rr_no_ncell_m;
497
static int hf_gsm_a_rr_rxlev_ncell;
498
static int hf_gsm_a_rr_bcch_freq_ncell;
499
static int hf_gsm_a_rr_bsic_ncell;
500
static int hf_gsm_a_rr_mobile_time_difference;
501
static int hf_gsm_a_rr_pow_cmd_atc;
502
static int hf_gsm_a_rr_pow_cmd_epc;
503
static int hf_gsm_a_rr_page_mode;
504
static int hf_gsm_a_rr_dedicated_mode_or_tbf;
505
static int hf_gsm_a_rr_pow_cmd_fpcepc;
506
static int hf_gsm_a_rr_pow_cmd_powlev;
507
static int hf_gsm_a_rr_sync_ind_nci;
508
static int hf_gsm_a_rr_sync_ind_rot;
509
static int hf_gsm_a_rr_sync_ind_si;
510
static int hf_gsm_a_rr_format_id;
511
static int hf_gsm_a_rr_format_id2;
512
static int hf_gsm_a_rr_channel_mode;
513
static int hf_gsm_a_rr_channel_mode2;
514
static int hf_gsm_a_rr_sc;
515
static int hf_gsm_a_rr_algorithm_id;
516
static int hf_gsm_a_rr_cr;
517
static int hf_gsm_a_rr_multirate_speech_ver;
518
static int hf_gsm_a_rr_NCSB;
519
static int hf_gsm_a_rr_ICMI;
520
static int hf_gsm_a_rr_start_mode;
521
static int hf_gsm_a_rr_timing_adv;
522
static int hf_gsm_a_rr_time_diff;
523
static int hf_gsm_a_rr_tlli;
524
static int hf_gsm_a_rr_nri;
525
static int hf_gsm_a_rr_target_mode;
526
static int hf_gsm_a_rr_wait_indication;
527
static int hf_gsm_a_rr_seq_code;
528
static int hf_gsm_a_rr_group_cipher_key_number;
529
static int hf_gsm_a_rr_MBMS_multicast;
530
static int hf_gsm_a_rr_MBMS_broadcast;
531
static int hf_gsm_a_rr_last_segment;
532
static int hf_gsm_a_rr_carrier_ind;
533
static int hf_gsm_a_rr_ra;
534
static int hf_gsm_a_rr_T1prim;
535
static int hf_gsm_a_rr_T3;
536
static int hf_gsm_a_rr_T2;
537
static int hf_gsm_a_rr_tbf_T1prim;
538
static int hf_gsm_a_rr_tbf_T3;
539
static int hf_gsm_a_rr_tbf_T2;
540
static int hf_gsm_a_rr_rfn;
541
static int hf_gsm_a_rr_RR_cause;
542
static int hf_gsm_a_rr_cm_cng_msg_req;
543
static int hf_gsm_a_rr_utran_cm_cng_msg_req;
544
static int hf_gsm_a_rr_cdma2000_cm_cng_msg_req;
545
static int hf_gsm_a_rr_geran_iu_cm_cng_msg_req;
546
int hf_gsm_a_rr_chnl_needed_ch1;
547
static int hf_gsm_a_rr_chnl_needed_ch2;
548
static int hf_gsm_a_rr_chnl_needed_ch3;
549
static int hf_gsm_a_rr_chnl_needed_ch4;
550
static int hf_gsm_a_rr_pkt_estab_cause;
551
static int hf_gsm_a_rr_peak_throughput_class;
552
static int hf_gsm_a_rr_radio_priority;
553
static int hf_gsm_a_rr_llc_pdu_type;
554
static int hf_gsm_a_rr_rlc_octet_count;
555
static int hf_gsm_a_rr_rlc_non_pers_mode_cap;
556
static int hf_gsm_a_rr_reduced_latency_cap;
557
static int hf_gsm_a_rr_ul_egprs2;
558
static int hf_gsm_a_rr_dl_egprs2;
559
static int hf_gsm_a_rr_emst_ms_cap;
560
static int hf_gsm_a_rr_suspension_cause;
561
static int hf_gsm_a_rr_apdu_id;
562
static int hf_gsm_a_rr_apdu_flags_cr;
563
static int hf_gsm_a_rr_apdu_flags_fs;
564
static int hf_gsm_a_rr_apdu_flags_ls;
565
static int hf_gsm_a_rr_apdu_data;
566
static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b8;
567
static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b7;
568
static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b6;
569
static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b5;
570
static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b4;
571
static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b3;
572
static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b2;
573
static int hf_gsm_a_rr_set_of_amr_codec_modes_v1_b1;
574
static int hf_gsm_a_rr_set_of_amr_codec_modes_v2_b5;
575
static int hf_gsm_a_rr_set_of_amr_codec_modes_v2_b4;
576
static int hf_gsm_a_rr_set_of_amr_codec_modes_v2_b3;
577
static int hf_gsm_a_rr_set_of_amr_codec_modes_v2_b2;
578
static int hf_gsm_a_rr_set_of_amr_codec_modes_v2_b1;
579
static int hf_gsm_a_rr_amr_threshold;
580
static int hf_gsm_a_rr_amr_hysteresis;
581
static int hf_gsm_a_rr_pwrc;
582
static int hf_gsm_a_rr_dtx_bcch;
583
static int hf_gsm_a_rr_dtx_sacch;
584
static int hf_gsm_a_rr_radio_link_timeout;
585
static int hf_gsm_a_rr_cell_reselect_hyst;
586
static int hf_gsm_a_rr_ms_txpwr_max_cch;
587
static int hf_gsm_a_rr_acs;
588
static int hf_gsm_a_rr_neci;
589
static int hf_gsm_a_rr_rxlev_access_min;
590
static int hf_gsm_a_rr_mscr;
591
static int hf_gsm_a_rr_att;
592
static int hf_gsm_a_rr_ccch_conf;
593
static int hf_gsm_a_rr_cbq3;
594
static int hf_gsm_a_rr_bs_pa_mfrms;
595
static int hf_gsm_a_rr_bs_ag_blks_res;
596
int hf_gsm_a_rr_t3212;
597
static int hf_gsm_a_rr_gsm_band;
598
static int hf_gsm_a_rr_arfcn_first;
599
static int hf_gsm_a_rr_band_offset;
600
static int hf_gsm_a_rr_arfcn_range;
601
static int hf_gsm_a_rr_lowest_arfcn;
602
static int hf_gsm_a_rr_inc_skip_arfcn;
603
static int hf_gsm_a_rr_gprs_resumption_ack;
604
static int hf_gsm_a_rr_ext_ind;
605
static int hf_gsm_a_rr_ba_ind;
606
static int hf_gsm_a_rr_multiband_reporting;
607
static int hf_gsm_a_rr_ncc_permitted;
608
static int hf_gsm_a_rr_max_retrans;
609
static int hf_gsm_a_rr_tx_integer;
610
static int hf_gsm_a_rr_cell_barr_access;
611
static int hf_gsm_a_rr_re;
612
static int hf_gsm_a_rr_acc;
613
static int hf_gsm_a_rr_nch_position;
614
static int hf_gsm_a_rr_si2ter_mp_change_mark;
615
static int hf_gsm_a_rr_si2ter_3g_change_mark;
616
static int hf_gsm_a_rr_si2ter_index;
617
static int hf_gsm_a_rr_si2ter_count;
618
static int hf_gsm_a_rr_fdd_uarfcn;
619
static int hf_gsm_a_rr_bandwidth_fdd;
620
static int hf_gsm_a_rr_tdd_uarfcn;
621
static int hf_gsm_a_rr_bandwidth_tdd;
622
static int hf_gsm_a_rr_arfcn;
623
static int hf_gsm_a_rr_bsic;
624
static int hf_gsm_a_rr_qsearch_i;
625
static int hf_gsm_a_rr_fdd_qoffset;
626
static int hf_gsm_a_rr_fdd_qmin;
627
static int hf_gsm_a_rr_tdd_qoffset;
628
static int hf_gsm_a_rr_fdd_qmin_offset;
629
static int hf_gsm_a_rr_fdd_rscpmin;
630
static int hf_gsm_a_rr_3g_ba_ind;
631
static int hf_gsm_a_rr_mp_change_mark;
632
static int hf_gsm_a_rr_si2quater_index;
633
static int hf_gsm_a_rr_si2quater_count;
634
static int hf_gsm_a_rr_si21_change_mark;
635
static int hf_gsm_a_rr_si21_index;
636
static int hf_gsm_a_rr_si21_count;
637
static int hf_gsm_a_rr_gsm_report_type;
638
static int hf_gsm_a_rr_serving_band_reporting;
639
static int hf_gsm_a_rr_frequency_scrolling;
640
static int hf_gsm_a_rr_rep_priority;
641
static int hf_gsm_a_rr_report_type;
642
static int hf_gsm_a_rr_reporting_rate;
643
static int hf_gsm_a_rr_invalid_bsic_reporting;
644
static int hf_gsm_a_rr_scale_ord;
645
static int hf_gsm_a_rr_900_reporting_offset;
646
static int hf_gsm_a_rr_900_reporting_threshold;
647
static int hf_gsm_a_rr_1800_reporting_offset;
648
static int hf_gsm_a_rr_1800_reporting_threshold;
649
static int hf_gsm_a_rr_400_reporting_offset;
650
static int hf_gsm_a_rr_400_reporting_threshold;
651
static int hf_gsm_a_rr_1900_reporting_offset;
652
static int hf_gsm_a_rr_1900_reporting_threshold;
653
static int hf_gsm_a_rr_850_reporting_offset;
654
static int hf_gsm_a_rr_850_reporting_threshold;
655
static int hf_gsm_a_rr_network_control_order;
656
static int hf_gsm_a_rr_nc_non_drx_period;
657
static int hf_gsm_a_rr_nc_reporting_period_i;
658
static int hf_gsm_a_rr_nc_reporting_period_t;
659
static int hf_gsm_a_rr_index_start_3g;
660
static int hf_gsm_a_rr_absolute_index_start_emr;
661
static int hf_gsm_a_rr_qsearch_c_initial;
662
static int hf_gsm_a_rr_fdd_rep_quant;
663
static int hf_gsm_a_rr_fdd_multirat_reporting;
664
static int hf_gsm_a_rr_tdd_multirat_reporting;
665
static int hf_gsm_a_rr_qsearch_p;
666
static int hf_gsm_a_rr_3g_search_prio;
667
static int hf_gsm_a_rr_fdd_reporting_offset;
668
static int hf_gsm_a_rr_fdd_reporting_threshold_rscp;
669
static int hf_gsm_a_rr_fdd_reporting_threshold_ecn0;
670
static int hf_gsm_a_rr_tdd_reporting_offset;
671
static int hf_gsm_a_rr_tdd_reporting_threshold_rscp;
672
static int hf_gsm_a_rr_tdd_reporting_threshold_ecn0;
673
static int hf_gsm_a_rr_fdd_reporting_threshold_2;
674
static int hf_gsm_a_rr_3g_ccn_active;
675
static int hf_gsm_a_rr_700_reporting_offset;
676
static int hf_gsm_a_rr_700_reporting_threshold;
677
static int hf_gsm_a_rr_810_reporting_offset;
678
static int hf_gsm_a_rr_810_reporting_threshold;
679
static int hf_gsm_a_rr_cbq;
680
static int hf_gsm_a_rr_cell_reselect_offset;
681
static int hf_gsm_a_rr_temporary_offset;
682
static int hf_gsm_a_rr_penalty_time;
683
static int hf_gsm_a_rr_gprs_ra_colour;
684
static int hf_gsm_a_rr_si13_position;
685
static int hf_gsm_a_rr_power_offset;
686
static int hf_gsm_a_rr_si2quater_position;
687
static int hf_gsm_a_rr_si13alt_position;
688
static int hf_gsm_a_rr_si21_position;
689
static int hf_gsm_a_rr_prio_thr;
690
static int hf_gsm_a_rr_lsa_offset;
691
static int hf_gsm_a_rr_cell_id;
692
static int hf_gsm_a_rr_paging_channel_restructuring;
693
static int hf_gsm_a_rr_nln_sacch;
694
static int hf_gsm_a_rr_nln_status_sacch;
695
static int hf_gsm_a_rr_nln_pch;
696
static int hf_gsm_a_rr_nln_status_pch;
697
static int hf_gsm_a_rr_vbs_vgcs_inband_notifications;
698
static int hf_gsm_a_rr_vbs_vgcs_inband_pagings;
699
static int hf_gsm_a_rr_rac;
700
static int hf_gsm_a_rr_max_lapdm;
701
static int hf_gsm_a_rr_gprs_ms_txpwr_max_ccch;
702
static int hf_gsm_a_rr_dedicated_mode_mbms_notification_support;
703
static int hf_gsm_a_rr_mnci_support;
704
static int hf_gsm_a_rr_amr_config;
705
static int hf_gsm_a_rr_bcch_change_mark;
706
static int hf_gsm_a_rr_si_change_field;
707
static int hf_gsm_a_rr_si13_change_mark;
708
static int hf_gsm_a_rr_hsn;
709
static int hf_gsm_a_rr_rfl_number;
710
static int hf_gsm_a_rr_arfcn_index;
711
static int hf_gsm_a_rr_ma_length;
712
static int hf_gsm_a_rr_psi1_repeat_period;
713
static int hf_gsm_a_rr_pbcch_pb;
714
static int hf_gsm_a_rr_pbcch_tsc;
715
static int hf_gsm_a_rr_pbcch_tn;
716
static int hf_gsm_a_rr_spgc_ccch_sup;
717
static int hf_gsm_a_rr_priority_access_thr;
718
static int hf_gsm_a_rr_nmo;
719
static int hf_gsm_a_rr_t3168;
720
static int hf_gsm_a_rr_t3192;
721
static int hf_gsm_a_rr_drx_timer_max;
722
static int hf_gsm_a_rr_access_burst_type;
723
static int hf_gsm_a_rr_control_ack_type;
724
static int hf_gsm_a_rr_bs_cv_max;
725
static int hf_gsm_a_rr_pan_dec;
726
static int hf_gsm_a_rr_pan_inc;
727
static int hf_gsm_a_rr_pan_max;
728
static int hf_gsm_a_rr_egprs_packet_channel_request;
729
static int hf_gsm_a_rr_bep_period;
730
static int hf_gsm_a_rr_pfc_feature_mode;
731
static int hf_gsm_a_rr_dtm_support;
732
static int hf_gsm_a_rr_bss_paging_coordination;
733
static int hf_gsm_a_rr_ccn_active;
734
static int hf_gsm_a_rr_nw_ext_utbf;
735
static int hf_gsm_a_rr_multiple_tbf_capability;
736
static int hf_gsm_a_rr_ext_utbf_no_data;
737
static int hf_gsm_a_rr_dtm_enhancements_capability;
738
static int hf_gsm_a_rr_reduced_latency_access;
739
static int hf_gsm_a_rr_alpha;
740
static int hf_gsm_a_rr_t_avg_w;
741
static int hf_gsm_a_rr_t_avg_t;
742
static int hf_gsm_a_rr_pc_meas_chan;
743
static int hf_gsm_a_rr_n_avg_i;
744
static int hf_gsm_a_rr_sgsnr;
745
static int hf_gsm_a_rr_si_status_ind;
746
static int hf_gsm_a_rr_lb_ms_txpwr_max_cch;
747
static int hf_gsm_a_rr_si2n_support;
748
static int hf_gsm_a_rr_mi_index;
749
static int hf_gsm_a_rr_mi_count;
750
static int hf_gsm_a_rr_3g_wait;
751
static int hf_gsm_a_rr_qsearch_c;
752
static int hf_gsm_a_rr_bsic_seen;
753
static int hf_gsm_a_rr_scale;
754
static int hf_gsm_a_rr_mean_bep_gmsk;
755
static int hf_gsm_a_rr_mean_cv_bep;
756
static int hf_gsm_a_rr_nbr_rcvd_blocks;
757
static int hf_gsm_a_rr_reporting_quantity;
758
static int hf_gsm_a_rr_extended_ra;
759
static int hf_gsm_a_rr_access_tech_type;
760
static int hf_gsm_a_rr_tfi_assignment;
761
static int hf_gsm_a_rr_polling;
762
static int hf_gsm_a_rr_usf;
763
static int hf_gsm_a_rr_usf_granularity;
764
static int hf_gsm_a_rr_p0;
765
static int hf_gsm_a_rr_pr_mode;
766
static int hf_gsm_a_rr_egprs_mcs;
767
static int hf_gsm_a_rr_tlli_block_channel_coding;
768
static int hf_gsm_a_rr_bep_period2;
769
static int hf_gsm_a_rr_resegment;
770
static int hf_gsm_a_rr_egprs_window_size;
771
static int hf_gsm_a_rr_gamma;
772
static int hf_gsm_a_rr_timing_adv_index;
773
static int hf_gsm_a_rr_timing_adv_timeslot_num;
774
static int hf_gsm_a_rr_tbf_starting_time;
775
static int hf_gsm_a_rr_num_of_radio_block_allocated;
776
static int hf_gsm_a_rr_pfi;
777
static int hf_gsm_a_rr_mbms_service_id;
778
static int hf_gsm_a_rr_ms_id;
779
static int hf_gsm_a_rr_gprs_cs;
780
static int hf_gsm_a_rr_rlc_mode;
781
static int hf_gsm_a_rr_ta_valid;
782
static int hf_gsm_a_rr_link_quality_meas_mode;
783
static int hf_gsm_a_rr_emr_bitmap_length;
784
static int hf_gsm_a_rr_eutran_mr_n_eutran;
785
static int hf_gsm_a_rr_eutran_mr_freq_idx;
786
static int hf_gsm_a_rr_eutran_mr_cell_id;
787
static int hf_gsm_a_rr_eutran_mr_rpt_quantity;
788
static int hf_gsm_a_rr_ma_channel_set;
789
static int hf_n_range_orig_arfcn;
790
static int hf_gsm_a_rr_reported_timeslots;
791
static int hf_gsm_a_rr_tsh;
792
static int hf_gsm_a_rr_rtti_usf_mode;
793
static int hf_gsm_a_rr_pdch_pair_indic;
794
static int hf_gsm_a_rr_additional_usf;
795
static int hf_gsm_a_rr_usf_2;
796
static int hf_gsm_a_rr_additional_usf_2;
797
static int hf_gsm_a_rr_npm_transfer_time;
798
static int hf_gsm_a_rr_event_based_fanr;
799
static int hf_gsm_a_rr_dl_egprs_level;
800
static int hf_gsm_a_rr_eab_auth_mask;
801
static int hf_gsm_a_eab_subcategory;
802
803
/* Generated from convert_proto_tree_add_text.pl */
804
static int hf_gsm_a_rr_cell_parameter;
805
static int hf_gsm_a_rr_len_indicator_ms_id;
806
static int hf_gsm_a_rr_neighbour_cell_list_index;
807
static int hf_gsm_a_rr_mcc;
808
static int hf_gsm_a_rr_pcid_pattern;
809
static int hf_gsm_a_rr_where;
810
static int hf_gsm_a_rr_ba_index_start_bsic;
811
static int hf_gsm_a_rr_bitmap;
812
static int hf_gsm_a_rr_extension_length;
813
static int hf_gsm_a_rr_scrambling_code;
814
static int hf_gsm_a_rr_mnc;
815
static int hf_gsm_a_rr_nr_of_fdd_cells;
816
static int hf_gsm_a_rr_ba_index_start_rtd_present;
817
static int hf_gsm_a_rr_sync_case_tstd;
818
static int hf_gsm_a_rr_hopping_channel_maio;
819
static int hf_gsm_a_rr_hopping_channel_ma_num_ind;
820
static int hf_gsm_a_rr_hopping_channel_change_mark_1;
821
static int hf_gsm_a_rr_hopping_channel;
822
static int hf_gsm_a_rr_rxlev_carrier;
823
static int hf_gsm_a_rr_mobile_network_code;
824
static int hf_gsm_a_rr_packet_channel_type;
825
static int hf_gsm_a_rr_timeslot;
826
static int hf_gsm_a_rr_lsa_id;
827
static int hf_gsm_a_rr_ciphering_key_seq_num;
828
static int hf_gsm_a_rr_diversity;
829
static int hf_gsm_a_rr_maio;
830
static int hf_gsm_a_rr_mobile_country_code;
831
static int hf_gsm_a_rr_short_lsa_id;
832
static int hf_gsm_a_rr_number_remaining_bsic;
833
static int hf_gsm_a_rr_number_cells;
834
static int hf_gsm_a_rr_padding;
835
static int hf_gsm_a_rr_training_sequence;
836
static int hf_gsm_a_rr_psc_pattern_present;
837
static int hf_gsm_a_rr_nr_of_tdd_cells;
838
static int hf_gsm_a_rr_message_elements;
839
static int hf_gsm_a_rr_bitmap_length;
840
static int hf_gsm_a_rr_diversity_tdd;
841
static int hf_gsm_a_rr_spare;
842
static int hf_gsm_a_rr_single_channel_arfcn;
843
static int hf_gsm_a_rr_rtd_index;
844
static int hf_gsm_a_rr_arfcn_list;
845
static int hf_gsm_a_rr_da_list;
846
static int hf_gsm_a_rr_ua_list;
847
static int hf_gsm_a_rr_field_bit_long;
848
static int hf_gsm_a_rr_ma_bitmap;
849
static int hf_gsm_a_rr_inc_arfcn_bitmap;
850
static int hf_gsm_a_rr_ccn_supported;
851
static int hf_gsm_a_rr_pbcch_use_bcch;
852
static int hf_gsm_a_rr_ia_rest_oct_reserved;
853
static int hf_gsm_a_rr_tch_facch_sacchm;
854
static int hf_gsm_a_rr_tch_facch_sacchf;
855
static int hf_gsm_a_rr_tch_facch_sacchm_bi;
856
static int hf_gsm_a_rr_tch_acch;
857
static int hf_gsm_a_rr_sdcch4_sdcchc4_cbch;
858
static int hf_gsm_a_rr_sdcch8_sdcchc8_cbch;
859
static int hf_gsm_a_rr_tch_facchf_sacchm_bi;
860
static int hf_gsm_a_rr_tch_facchf_sacchm_uni;
861
static int hf_gsm_a_rr_tchf_acchs;
862
static int hf_gsm_a_rr_unknown_channel_info;
863
static int hf_gsm_a_rr_subchannel;
864
static int hf_gsm_a_rr_w_elements;
865
static int hf_gsm_a_rr_ra_est_cause;
866
static int hf_gsm_a_rr_ra_rand_ref;
867
868
869
/* gsm_rr_csn_flag() fields */
870
static int hf_gsm_a_rr_fdd_repeat_freq;
871
static int hf_gsm_a_rr_tdd_repeat_freq;
872
static int hf_gsm_a_rr_repeat_range_limit;
873
static int hf_gsm_a_rr_repeat_ba_frequency;
874
static int hf_gsm_a_rr_repeat_gsm_desc;
875
static int hf_gsm_a_rr_band_indicator;
876
static int hf_gsm_a_rr_repeat_utran_fdd_desc;
877
static int hf_gsm_a_rr_bandwidth_fdd_present;
878
static int hf_gsm_a_rr_fdd_cell_info_present;
879
static int hf_gsm_a_rr_fdd_indic0;
880
static int hf_gsm_a_rr_repeat_utran_tdd_desc;
881
static int hf_gsm_a_rr_bandwidth_tdd_present;
882
static int hf_gsm_a_rr_tdd_cell_info_present;
883
static int hf_gsm_a_rr_tdd_indic0;
884
static int hf_gsm_a_rr_pfi_present;
885
static int hf_gsm_a_rr_msms_procedures;
886
static int hf_gsm_a_rr_repeat_dynamic_arfcn_mapping;
887
static int hf_gsm_a_rr_pan_bits_present;
888
static int hf_gsm_a_rr_optional_extensions_present;
889
static int hf_gsm_a_rr_egprs_supported;
890
static int hf_gsm_a_rr_access_tech_req;
891
static int hf_gsm_a_rr_repeated_umts_tdd_neighbour_cells;
892
static int hf_gsm_a_rr_cdma2000_reporting_threshold;
893
static int hf_gsm_a_rr_ccn_support_description;
894
static int hf_gsm_a_rr_eutran_tdd_measurement_report_offset_present;
895
static int hf_gsm_a_rr_3g_wait_present;
896
static int hf_gsm_a_rr_packet_discriminator_bit;
897
static int hf_gsm_a_rr_3g_measurement_control_parameters_description;
898
static int hf_gsm_a_rr_bts_power_control_mode;
899
static int hf_gsm_a_rr_fdd_reporting_threshold_2_present;
900
static int hf_gsm_a_rr_gprs_measurement_parameters_description;
901
static int hf_gsm_a_rr_repeated_earfcn;
902
static int hf_gsm_a_rr_repeated_pcid_group;
903
static int hf_gsm_a_rr_repeating_pcid_group;
904
static int hf_gsm_a_rr_tfi_allocation_type;
905
static int hf_gsm_a_rr_fdd_cell_info_param_value0;
906
static int hf_gsm_a_rr_bsic_description;
907
static int hf_gsm_a_rr_maio_present;
908
static int hf_gsm_a_rr_eutran_pcid_bitmap_group_present;
909
static int hf_gsm_a_rr_repeated_utran_frequency_index;
910
static int hf_gsm_a_rr_timing_adv_present;
911
static int hf_gsm_a_rr_eutran_tdd_reporting;
912
static int hf_gsm_a_rr_eutran_reporting;
913
static int hf_gsm_a_rr_eutran_csg_description;
914
static int hf_gsm_a_rr_pcid_pattern_present;
915
static int hf_gsm_a_rr_later_r97_version_reserved_bit;
916
static int hf_gsm_a_rr_utran_fdd_description_earlier_version_bit_reserved1;
917
static int hf_gsm_a_rr_3g_priority_parameters_description;
918
static int hf_gsm_a_rr_serving_cell_priority_parameters_description;
919
static int hf_gsm_a_rr_850_reporting_present;
920
static int hf_gsm_a_rr_tfi_assignment_present;
921
static int hf_gsm_a_rr_p0_present;
922
static int hf_gsm_a_rr_early_r97_version_reserved_bit;
923
static int hf_gsm_a_rr_tdd_reporting_parameters;
924
static int hf_gsm_a_rr_eutran_tdd_reporting_present;
925
static int hf_gsm_a_rr_repeated_eutran_neighbour_cells;
926
static int hf_gsm_a_rr_eutran_tdd_reporting_offset_present;
927
static int hf_gsm_a_rr_bitmap_type_reporting;
928
static int hf_gsm_a_rr_gprs_mobile_allocation;
929
static int hf_gsm_a_rr_default_utran_priority_parameters;
930
static int hf_gsm_a_rr_tfi_multiblock;
931
static int hf_gsm_a_rr_hopping_case;
932
static int hf_gsm_a_rr_repeated_umts_tdd_neighbour_cells_earlier_version_bit_reserved;
933
static int hf_gsm_a_rr_gprs_3g_measurement_parameters_description;
934
static int hf_gsm_a_rr_nc_measurement_parameters;
935
static int hf_gsm_a_rr_lb_ms_txpwr_max_cch_present;
936
static int hf_gsm_a_rr_810_reporting;
937
static int hf_gsm_a_rr_thresh_utran_low_present;
938
static int hf_gsm_a_rr_pbcch;
939
static int hf_gsm_a_rr_packet_downlink_assignment;
940
static int hf_gsm_a_rr_repeated_csg_pci_split;
941
static int hf_gsm_a_rr_700_reporting;
942
static int hf_gsm_a_rr_fdd_reporting_parameters;
943
static int hf_gsm_a_rr_compressed_inter_rat_handover_info;
944
static int hf_gsm_a_rr_rtd12;
945
static int hf_gsm_a_rr_utran_tdd_description;
946
static int hf_gsm_a_rr_3g_csg_desc_technology;
947
static int hf_gsm_a_rr_reporting_quantity_present;
948
static int hf_gsm_a_rr_absolute_index_start_emr_present;
949
static int hf_gsm_a_rr_downlink_uplink;
950
static int hf_gsm_a_rr_extended_ra_present;
951
static int hf_gsm_a_rr_downlink_uplink_discriminator_bit;
952
static int hf_gsm_a_rr_timing_advance_index_timeslot;
953
static int hf_gsm_a_rr_3g_reporting_quantity;
954
static int hf_gsm_a_rr_additional_rtd;
955
static int hf_gsm_a_rr_repeated_umts_fdd_neighbour_cells;
956
static int hf_gsm_a_rr_1800_reporting_present;
957
static int hf_gsm_a_rr_repeated_eutran_pcid_ta_mapping;
958
static int hf_gsm_a_rr_arfcn_index_list;
959
static int hf_gsm_a_rr_tdd_multirat_reporting_present;
960
static int hf_gsm_a_rr_eutran_reporting_quantity;
961
static int hf_gsm_a_rr_repeated_eutran_not_allowed_cells;
962
static int hf_gsm_a_rr_si13_change_mark_present;
963
static int hf_gsm_a_rr_eutran_fdd_reporting_present;
964
static int hf_gsm_a_rr_hopping_flag;
965
static int hf_gsm_a_call_prio_present;
966
static int hf_gsm_a_rr_repeated_umts_fdd_neighbour_cells_earlier_version_bit_reserved;
967
static int hf_gsm_a_rr_fdd_multirat_reporting_present;
968
static int hf_gsm_a_rr_repeated_eutran_measurement_control_parameters;
969
static int hf_gsm_a_rr_timing_adv_index_present;
970
static int hf_gsm_a_rr_real_time_difference_description;
971
static int hf_gsm_a_rr_tdd_cell_info_param_value0;
972
static int hf_gsm_a_rr_gprs_report_priority_description;
973
static int hf_gsm_a_rr_eutran_fdd_reporting_threshold_2_present;
974
static int hf_gsm_a_rr_timing_advance_index;
975
static int hf_gsm_a_rr_utran_fdd_description;
976
static int hf_gsm_a_rr_repeated_rtd;
977
static int hf_gsm_a_rr_fdd_reporting_offset_present;
978
static int hf_gsm_a_rr_mcc_mnc_parameters;
979
static int hf_gsm_a_rr_packet_uplink_assignment;
980
static int hf_gsm_a_rr_utran_frequency_index_present;
981
static int hf_gsm_a_rr_earlier_version_reserved_bit;
982
static int hf_gsm_a_rr_psc_present;
983
static int hf_gsm_a_rr_serving_cell_data;
984
static int hf_gsm_a_rr_utran_tdd_description_earlier_version_bit_reserved2;
985
static int hf_gsm_a_rr_repeated_rtd_frequency;
986
static int hf_gsm_a_rr_pr_mode_present;
987
static int hf_gsm_a_rr_eutran_default_measurement_control_eutran_present;
988
static int hf_gsm_a_rr_3g_additional_measurement_parameters_description_2;
989
static int hf_gsm_a_rr_e_utran_measurement_report;
990
static int hf_gsm_a_rr_3g_neighbour_cell_description;
991
static int hf_gsm_a_rr_400_reporting_present;
992
static int hf_gsm_a_rr_gamma_present;
993
static int hf_gsm_a_rr_additional_lsa_id;
994
static int hf_gsm_a_rr_tdd_information;
995
static int hf_gsm_a_rr_utran_priority_present;
996
static int hf_gsm_a_rr_utran_qrxlevmin_present;
997
static int hf_gsm_a_rr_repeated_csg_fdd_uarfcn;
998
static int hf_gsm_a_rr_arfcn_present;
999
static int hf_gsm_a_rr_cdma2000_multirat_reporting;
1000
static int hf_gsm_a_rr_si13alt_position_present;
1001
static int hf_gsm_a_rr_3g_csg_description;
1002
static int hf_gsm_a_rr_rtd;
1003
static int hf_gsm_a_rr_tbf_starting_time_present;
1004
static int hf_gsm_a_rr_eutran_fdd_reporting;
1005
static int hf_gsm_a_rr_nc_periods;
1006
static int hf_gsm_a_rr_index_start_3g_present;
1007
static int hf_gsm_a_rr_repeated_pcid;
1008
static int hf_gsm_a_rr_repeated_invalid_bsic_information;
1009
static int hf_gsm_a_rr_repeated_utran_measurement_control_parameters_struct;
1010
static int hf_gsm_a_rr_repeated_utran_priority_parameters;
1011
static int hf_gsm_a_rr_measurement_parameters_description;
1012
static int hf_gsm_a_rr_bep_period2_present;
1013
static int hf_gsm_a_rr_serving_reporting_present;
1014
static int hf_gsm_a_rr_alpha_present;
1015
static int hf_gsm_a_rr_psc_pattern;
1016
static int hf_gsm_a_rr_second_packet_assignment_discriminator_bit;
1017
static int hf_gsm_a_rr_lsa_id_type;
1018
static int hf_gsm_a_rr_fdd_parameters;
1019
static int hf_gsm_a_rr_gprs_real_time_difference_description;
1020
static int hf_gsm_a_rr_repeated_eutran_frequency_index;
1021
static int hf_gsm_a_rr_3g_additional_measurement_parameters_description;
1022
static int hf_gsm_a_rr_eutran_measurement_parameters_description;
1023
static int hf_gsm_a_rr_mbms_assignment;
1024
static int hf_gsm_a_rr_ms_parameters;
1025
static int hf_gsm_a_rr_utran_fdd_description_earlier_version_bit_reserved2;
1026
static int hf_gsm_a_rr_3g_measurement_parameters_description;
1027
static int hf_gsm_a_rr_eutran_priority_present;
1028
static int hf_gsm_a_rr_1900_reporting_present;
1029
static int hf_gsm_a_rr_3g_measurement_control_parameters_description_struct;
1030
static int hf_gsm_a_rr_eutran_parameters_description;
1031
static int hf_gsm_a_rr_rtd6;
1032
static int hf_gsm_a_rr_thresh_eutran_low_present;
1033
static int hf_gsm_a_rr_allocation_type;
1034
static int hf_gsm_a_rr_additional_rtd_struct;
1035
static int hf_gsm_a_rr_additional_information_for_3x_auxiliary_pilot;
1036
static int hf_gsm_a_rr_fdd_information;
1037
static int hf_gsm_a_rr_future_extensions_of_the_2g_parameters;
1038
static int hf_gsm_a_rr_ba_index_start_rtd;
1039
static int hf_gsm_a_rr_utran_tdd_description_earlier_version_bit_reserved1;
1040
static int hf_gsm_a_rr_eutran_fdd_reporting_threshold;
1041
static int hf_gsm_a_rr_measurement_control_parameters_description;
1042
static int hf_gsm_a_rr_eutran_measurement_bandwidth_present;
1043
static int hf_gsm_a_rr_eutran_tdd_reporting_threshold_2_present;
1044
static int hf_gsm_a_rr_eutran_earfcn_present;
1045
static int hf_gsm_a_rr_eutran_qrxlevmin_present;
1046
static int hf_gsm_a_rr_ba_index_start_bsic_present;
1047
static int hf_gsm_a_rr_gprs_bsic_description;
1048
static int hf_gsm_a_rr_group_channel_description;
1049
static int hf_gsm_a_rr_cdma2000_description;
1050
static int hf_gsm_a_rr_si_2quater_extension_information;
1051
static int hf_gsm_a_rr_3g_supplementary_parameters_description;
1052
static int hf_gsm_a_rr_priority_and_eutran_param_description;
1053
static int hf_gsm_a_rr_multiband_reporting_present;
1054
static int hf_gsm_a_rr_report_priority_description;
1055
static int hf_gsm_a_rr_tdd_reporting_offset_present;
1056
static int hf_gsm_a_rr_amr_config_present;
1057
static int hf_gsm_a_rr_rand_bit_stream_ind;
1058
static int hf_gsm_a_rr_900_reporting_present;
1059
static int hf_gsm_a_rr_rfl_number_present;
1060
static int hf_gsm_a_rr_eutran_fdd_reporting_offset_present;
1061
static int hf_gsm_a_rr_repeated_csg_psc_split_struct;
1062
static int hf_gsm_a_rr_gprs_eutran_measurement_parameters_description;
1063
static int hf_gsm_a_rr_tdd_parameters;
1064
static int hf_gsm_a_rr_repeat_eutran_desc;
1065
static int hf_gsm_a_rr_peo_dsc_and_rcc_present;
1066
static int hf_gsm_a_rr_c1_delta_present;
1067
static int hf_gsm_a_rr_ul_xtti_tbf_assignment;
1068
static int hf_gsm_a_rr_dl_xtti_tbf_assignment;
1069
static int hf_gsm_a_rr_fanr_act_state;
1070
static int hf_gsm_a_rr_encoding_selection;
1071
static int hf_gsm_a_rr_nof_pdch_pairs;
1072
static int hf_gsm_a_rr_npm_transfer_time_present;
1073
static int hf_gsm_a_rr_eab_parameters;
1074
1075
/* gsm_rr_csn_HL_flag() fields */
1076
static int hf_gsm_a_rr_selection_parameters;
1077
static int hf_gsm_a_rr_break_indicator;
1078
static int hf_gsm_a_rr_si13_contents;
1079
static int hf_gsm_a_rr_additions_in_rel_9;
1080
static int hf_gsm_a_rr_lsa_id_information;
1081
static int hf_gsm_a_rr_si2quater_indicator;
1082
static int hf_gsm_a_rr_si21_indicator;
1083
static int hf_gsm_a_rr_additions_in_rel_4;
1084
static int hf_gsm_a_call_prio4;
1085
static int hf_gsm_a_rr_gprs_ms_txpwr_max_ccch_present;
1086
static int hf_gsm_a_rr_vbs_vgcs_options;
1087
static int hf_gsm_a_rr_si4_rest_octets_s;
1088
static int hf_gsm_a_call_prio1;
1089
static int hf_gsm_a_rr_si2ter_mp_change_mark_present;
1090
static int hf_gsm_a_rr_gprs_indicator;
1091
static int hf_gsm_a_rr_nln_pch_present;
1092
static int hf_gsm_a_rr_early_classmark_sending;
1093
static int hf_gsm_a_rr_chnl_needed_ch3and4;
1094
static int hf_gsm_a_rr_additions_in_rel_5;
1095
static int hf_gsm_a_rr_group_call_information;
1096
static int hf_gsm_a_rr_lsa_parameters;
1097
static int hf_gsm_a_rr_first_discriminator_bit;
1098
static int hf_gsm_a_rr_packet_paging_procedure_3;
1099
static int hf_gsm_a_rr_packet_paging_procedure_1;
1100
static int hf_gsm_a_rr_chnl_needed_ch3_present;
1101
static int hf_gsm_a_rr_power_offset_present;
1102
static int hf_gsm_a_call_prio2;
1103
static int hf_gsm_a_rr_additions_in_rel_6;
1104
static int hf_gsm_a_rr_packet_paging_procedure_2;
1105
static int hf_gsm_a_rr_3g_early_classmark_sending_restriction;
1106
static int hf_gsm_a_rr_scheduling_if_and_where;
1107
static int hf_gsm_a_rr_packet_page_indication_1;
1108
static int hf_gsm_a_rr_cbq3_present;
1109
static int hf_gsm_a_rr_second_discriminator_bit;
1110
static int hf_gsm_a_call_prio3;
1111
static int hf_gsm_a_rr_additions_in_release_6_present;
1112
static int hf_gsm_a_rr_system_information_type_2ter;
1113
static int hf_gsm_a_rr_a_compressed_inter_rat_handover_info;
1114
static int hf_gsm_a_rr_additions_in_rel_8;
1115
static int hf_gsm_a_rr_dtm;
1116
static int hf_gsm_a_rr_pch_and_nch_info;
1117
static int hf_gsm_a_rr_cell_id_present;
1118
static int hf_gsm_a_rr_additions_in_r99;
1119
static int hf_gsm_a_rr_mbms_procedures;
1120
static int hf_gsm_a_rr_nch_position_present;
1121
static int hf_gsm_a_rr_additions_in_rel_7;
1122
static int hf_gsm_a_rr_packet_page_indication_2;
1123
static int hf_gsm_a_rr_multiple_tbf_procedures;
1124
static int hf_gsm_a_rr_additions_in_rel_10;
1125
static int hf_gsm_a_rr_additions_in_rel_13;
1126
static int hf_gsm_a_rr_si_change_alt;
1127
1128
/* Additions in Rel-8 */
1129
static int hf_gsm_a_rr_3g_priority_param_desc_utran_start;
1130
static int hf_gsm_a_rr_3g_priority_param_desc_utran_stop;
1131
static int hf_gsm_a_rr_3g_priority_param_desc_default_utran_prio;
1132
static int hf_gsm_a_rr_3g_priority_param_desc_default_threshold_utran;
1133
static int hf_gsm_a_rr_3g_priority_param_desc_default_utran_qrxlevmin;
1134
static int hf_gsm_a_rr_utran_frequency_index;
1135
static int hf_gsm_a_rr_utran_priority;
1136
static int hf_gsm_a_rr_thresh_utran_high;
1137
static int hf_gsm_a_rr_thresh_utran_low;
1138
static int hf_gsm_a_rr_utran_qrxlevmin;
1139
static int hf_gsm_a_rr_eutran_ccn_active;
1140
static int hf_gsm_a_rr_eutran_start;
1141
static int hf_gsm_a_rr_eutran_stop;
1142
static int hf_gsm_a_rr_qsearch_c_eutran_initial;
1143
static int hf_gsm_a_rr_eutran_multirat_reporting;
1144
static int hf_gsm_a_rr_eutran_fdd_reporting_threshold_rsrp;
1145
static int hf_gsm_a_rr_eutran_fdd_reporting_threshold_rsrq;
1146
static int hf_gsm_a_rr_eutran_fdd_reporting_threshold_2;
1147
static int hf_gsm_a_rr_eutran_fdd_reporting_offset;
1148
static int hf_gsm_a_rr_eutran_tdd_reporting_threshold_rsrp;
1149
static int hf_gsm_a_rr_eutran_tdd_reporting_threshold_rsrq;
1150
static int hf_gsm_a_rr_eutran_tdd_reporting_threshold_2;
1151
static int hf_gsm_a_rr_eutran_tdd_reporting_offset;
1152
static int hf_gsm_a_rr_eutran_fdd_measurement_report_offset;
1153
static int hf_gsm_a_rr_eutran_tdd_measurement_report_offset;
1154
static int hf_gsm_a_rr_reporting_granularity;
1155
static int hf_gsm_a_rr_eutran_default_measurement_control_eutran;
1156
static int hf_gsm_a_rr_eutran_measurement_control_eutran;
1157
static int hf_gsm_a_rr_qsearch_p_eutran;
1158
static int hf_gsm_a_rr_serving_cell_priority_param_geran_priority;
1159
static int hf_gsm_a_rr_serving_cell_priority_param_thresh_prio_search;
1160
static int hf_gsm_a_rr_serving_cell_priority_param_thresh_gsm_low;
1161
static int hf_gsm_a_rr_serving_cell_priority_param_h_prio;
1162
static int hf_gsm_a_rr_serving_cell_priority_param_t_reselection;
1163
static int hf_gsm_a_rr_eutran_earfcn;
1164
static int hf_gsm_a_rr_eutran_measurement_bandwidth;
1165
static int hf_gsm_a_rr_eutran_priority;
1166
static int hf_gsm_a_rr_thresh_eutran_high;
1167
static int hf_gsm_a_rr_thresh_eutran_low;
1168
static int hf_gsm_a_rr_eutran_qrxlevmin;
1169
static int hf_gsm_a_rr_eutran_pcid_present;
1170
static int hf_gsm_a_rr_eutran_pcid;
1171
static int hf_gsm_a_rr_eutran_pcid_bitmap_group;
1172
static int hf_gsm_a_rr_eutran_pcid_pattern_length;
1173
/* static int hf_gsm_a_rr_eutran_pcid_pattern; */
1174
static int hf_gsm_a_rr_eutran_pcid_pattern_sense;
1175
static int hf_gsm_a_rr_eutran_frequency_index;
1176
static int hf_gsm_a_rr_psc;
1177
static int hf_gsm_a_rr_utran_psc_pattern_length;
1178
static int hf_gsm_a_rr_utran_psc_pattern_sense;
1179
static int hf_gsm_a_rr_utran_csg_fdd_uarfcn;
1180
static int hf_gsm_a_rr_utran_csg_tdd_uarfcn;
1181
static int hf_gsm_a_rr_csg_earfcn;
1182
static int hf_gsm_a_rr_3g_control_param_desc_meas_ctrl_utran;
1183
static int hf_gsm_a_rr_peo_bcch_change_mark;
1184
static int hf_gsm_a_rr_feat_ind_cs_ir;
1185
static int hf_gsm_a_rr_feat_ind_ps_ir;
1186
1187
/* Additions for EC-GSM-IoT rel. 13 */
1188
static int hf_gsm_a_rr_ec_qhfi;
1189
static int hf_gsm_a_rr_ec_dl_cc;
1190
static int hf_gsm_a_rr_ec_ul_cc;
1191
static int hf_gsm_a_rr_tsc_set;
1192
static int hf_gsm_a_rr_ec_tsc;
1193
static int hf_gsm_a_rr_ec_ma_number;
1194
1195
static int hf_gsm_a_rr_ec_enhanced_access_burst;
1196
static int hf_gsm_a_rr_ec_starting_ul_timeslot;
1197
static int hf_gsm_a_rr_ec_starting_dl_timeslot;
1198
static int hf_gsm_a_rr_ec_starting_dl_timeslot_offset;
1199
static int hf_gsm_a_rr_ec_starting_ul_timeslot_offset;
1200
static int hf_gsm_a_rr_ec_overlaid_cdma_code;
1201
static int hf_gsm_a_rr_ec_mcs_exist;
1202
static int hf_gsm_a_rr_ec_start_first_ul_data_block;
1203
static int hf_gsm_a_rr_ec_fua_gap_list;
1204
static int hf_gsm_a_rr_ec_start_fn_next_data_block_exist;
1205
static int hf_gsm_a_rr_ec_start_fn_next_data_block;
1206
1207
static int hf_gsm_a_rr_ec_used_dl_cc;
1208
static int hf_gsm_a_rr_ec_page_extension_exist;
1209
static int hf_gsm_a_rr_ec_page_extension;
1210
static int hf_gsm_a_rr_ec_last_tdma_frame;
1211
static int hf_gsm_a_rr_ec_echoed_random_bits;
1212
1213
static int hf_gsm_a_rr_ec_wait_timer;
1214
static int hf_gsm_a_rr_ec_req_ref_2_present;
1215
static int hf_gsm_a_rr_ec_req_ref_3_present;
1216
1217
static int hf_gsm_a_rr_ec_ptmsi_imsi_select;
1218
static int hf_gsm_a_rr_ec_imsi_digits;
1219
static int hf_gsm_a_rr_ec_imsi;
1220
static int hf_gsm_a_rr_ec_mobile_identity_2_exist;
1221
1222
static int hf_gsm_a_rr_ec_cc1_timeslot_multiplier;
1223
static int hf_gsm_a_rr_ec_alpha_enable;
1224
1225
static int hf_gsm_a_rr_rcc;
1226
static int hf_gsm_a_rr_implicit_reject_cs;
1227
static int hf_gsm_a_rr_implicit_reject_ps;
1228
static int hf_gsm_a_rr_peo_dsc;
1229
static int hf_gsm_a_rr_c1_delta_min;
1230
static int hf_gsm_a_rr_c1_delta_max;
1231
1232
static int hf_gsm_a_rr_cs_tsc_set;
1233
static int hf_gsm_a_rr_ps_sd_tsc_ass;
1234
static int hf_gsm_a_rr_ps_pd_tsc_set;
1235
static int hf_gsm_a_rr_ps_sd_tsc_set;
1236
static int hf_gsm_a_rr_ps_sd_tsc_val;
1237
1238
/* Initialize the subtree pointers */
1239
static int ett_ccch_msg;
1240
static int ett_rach_msg;
1241
static int ett_ec_ccch_msg;
1242
static int ett_ccch_oct_1;
1243
static int ett_sacch_msg;
1244
static int ett_apdu;
1245
1246
static expert_field ei_gsm_a_rr_ie_overrun;
1247
static expert_field ei_gsm_a_rr_ie_underrun;
1248
static expert_field ei_gsm_a_rr_data_not_dissected;
1249
static expert_field ei_gsm_a_rr_unknown_version;
1250
static expert_field ei_gsm_a_rr_extraneous_data;
1251
static expert_field ei_gsm_a_rr_missing_mandatory_element;
1252
1253
static dissector_handle_t rrlp_dissector;
1254
1255
1256
1.36k
#define NUM_GSM_RR_ELEM array_length(gsm_rr_elem_strings)
1257
int ett_gsm_rr_elem[NUM_GSM_RR_ELEM];
1258
1259
typedef enum
1260
{
1261
    /* RR Rest Octets information elements */
1262
    DE_RR_REST_OCTETS_UTRAN_FDD_DESC,
1263
    DE_RR_REST_OCTETS_UTRAN_TDD_DESC,
1264
    DE_RR_REST_OCTETS_3G_MEAS_PARAM_DESC,
1265
    DE_RR_REST_OCTETS_3G_ADD_MEAS_PARAM_DESC,
1266
    DE_RR_REST_OCTETS_MEAS_PARAM_DESC,
1267
    DE_RR_REST_OCTETS_GPRS_RTD_DESC,
1268
    DE_RR_REST_OCTETS_GPRS_BSIC_DESC,
1269
    DE_RR_REST_OCTETS_GPRS_REPORT_PRIO_DESC,
1270
    DE_RR_REST_OCTETS_GPRS_MEAS_PARAM_DESC,
1271
    DE_RR_REST_OCTETS_NC_MEAS_PARAM,
1272
    DE_RR_REST_OCTETS_SI2Q_EXT_INFO,
1273
    DE_RR_REST_OCTETS_CCN_SUPPORT_DESC,
1274
    DE_RR_REST_OCTETS_3G_NEIGH_CELL_DESC,
1275
    DE_RR_REST_OCTETS_FDD_CELL_INFORMATION_FIELD,
1276
    DE_RR_REST_OCTETS_TDD_CELL_INFORMATION_FIELD,
1277
    DE_RR_REST_OCTETS_GPRS_3G_MEAS_PARAM_DESC,
1278
    DE_RR_REST_OCTETS_3G_ADD_MEAS_PARAM_DESC2,
1279
    DE_RR_REST_OCTETS_PRIORITY_AND_EUTRAN_PARAM_DESC,
1280
    DE_RR_REST_OCTETS_SERVING_CELL_PRIORITY_PARAM_DESC,
1281
    DE_RR_REST_OCTETS_3G_PRIORITY_PARAM_DESC,
1282
    DE_RR_REST_OCTETS_UTRAN_PRIO_PARAM,
1283
    DE_RR_REST_OCTETS_EUTRAN_PARAM_DESC,
1284
    DE_RR_REST_OCTETS_EUTRAN_NEIGHBOUR_CELLS,
1285
    DE_RR_REST_OCTETS_EUTRAN_NOT_ALLOWED_CELLS,
1286
    DE_RR_REST_OCTETS_EUTRAN_PCID_TO_TA_MAPPING,
1287
    DE_RR_REST_OCTETS_3G_CSG_DESC,
1288
    DE_RR_REST_OCTETS_EUTRAN_CSG_DESC,
1289
    DE_RR_REST_OCTETS_OPTIONAL_SEL_PARAM,
1290
    DE_RR_REST_OCTETS_GPRS_INDICATOR,
1291
    DE_RR_REST_OCTETS_SI4_REST_OCTETS_O,
1292
    DE_RR_REST_OCTETS_SI4_REST_OCTETS_S,
1293
    DE_RR_REST_OCTETS_LSA_PARAMETERS,
1294
    DE_RR_REST_OCTETS_LSA_ID_INFO,
1295
    DE_RR_REST_OCTETS_PCH_AND_NCH_INFO,
1296
    DE_RR_REST_OCTETS_VBS_VGCS_OPTIONS,
1297
    DE_RR_REST_OCTETS_GPRS_MOBILE_ALLOC,
1298
    DE_RR_REST_OCTETS_GPRS_CELL_OPTIONS,
1299
    DE_RR_REST_OCTETS_GPRS_CELL_OPTIONS_EXT_INFO,
1300
    DE_RR_REST_OCTETS_GPRS_POWER_CONTROL_PARAMS,
1301
    DE_RR_REST_OCTETS_PBCCH_DESC,
1302
    DE_RR_REST_OCTETS_GSM_DESC,
1303
    DE_RR_REST_OCTETS_RTD_DESC,
1304
    DE_RR_REST_OCTETS_BSIC_DESC,
1305
    DE_RR_REST_OCTETS_REPORT_PRIO_DESC,
1306
    DE_RR_REST_OCTETS_CDMA2000_DESC,
1307
    DE_RR_REST_OCTETS_SERVING_CELL_DATA,
1308
    DE_RR_REST_OCTETS_REPEAT_INV_BSIC_INFO,
1309
    DE_RR_REST_OCTETS_BITMAP_TYPE_REPORTING,
1310
    DE_RR_REST_OCTETS_3G_SUPPLEMENTARY_PARAM_DESC,
1311
    DE_RR_REST_OCTETS_UTRAN_MEASUREMENT_CONTROL_PARAM_DESC,
1312
    DE_RR_REST_OCTETS_EGPRS_PACKET_UPLINK_ASSIGNMENT,
1313
    DE_RR_REST_OCTETS_MULTIPLE_BLOCKS_PACKET_DOWNLINK_ASSIGNMENT,
1314
    DE_RR_REST_OCTETS_TMGI,
1315
    DE_RR_REST_OCTETS_PACKET_TIMING_ADVANCE,
1316
    DE_RR_REST_OCTETS_PACKET_UPLINK_ASSIGNMENT,
1317
    DE_RR_REST_OCTETS_PACKET_DOWNLINK_ASSIGNMENT,
1318
    DE_RR_REST_OCTETS_SECOND_PART_PACKET_ASSIGNMENT,
1319
    DE_RR_REST_OCTETS_REPORTING_QUANTITY,
1320
    DE_RR_REST_OCTETS_EUTRAN_MEASUREMENT_REPORT,
1321
    DE_RR_REST_OCTETS_EUTRAN_DESC,
1322
    DE_RR_REST_OCTETS_EAB_PARAM_DESC,
1323
    DE_RR_REST_OCTETS_NONE
1324
}
1325
rr_rest_octets_elem_idx_t;
1326
1327
930
#define NUM_GSM_RR_REST_OCTETS_ELEM array_length(gsm_rr_rest_octets_elem_strings)
1328
static int ett_gsm_rr_rest_octets_elem[NUM_GSM_RR_REST_OCTETS_ELEM];
1329
1330
/* True/False flags specifically for gsm_rr_csn_flag */
1331
static const true_false_string tfs_tfi_multi_block_allocation_present = {"TFI Assignment Present", "Multi Block Allocation Present"};
1332
static const true_false_string tfs_fixed_dynamic_allocation = {"Fixed Allocation (not to be used after Rel-4)", "Dynamic Allocation (mandatory after Rel-4)"};
1333
static const true_false_string tfs_mode_b_mode_a = {"Mode B (not to be used after Rel-4)", "Mode A (mandatory after Rel-4)"};
1334
static const true_false_string tfs_downlink_assignment = {"Default 0 bit", "Reserved Value"};
1335
static const true_false_string tfs_non_distribution_distribution = {"(Non-distribution)", "(Distribution)"};
1336
static const true_false_string tfs_normal_single_block = {"Normal", "Single Block"};
1337
static const true_false_string tfs_early_r97_version_later_than_r97_version = {"Early R97 version", "Later than R97 version"};
1338
static const true_false_string tfs_later_than_r97_version_early_r97_version = {"Later than R97 version", "Early R97 version"};
1339
static const true_false_string tfs_earlier_version_current_version = {"Earlier version", "Current version"};
1340
static const true_false_string tfs_downlink_uplink_discriminator_bit = {"Reserved for future use", "EGPRS Packet Uplink Assignment or Multiple blocks Packet Downlink Assignment"};
1341
static const true_false_string tfs_downlink_uplink_assign = {"Multiple blocks Packet Downlink Assignment", "EGPRS Packet Uplink Assignment"};
1342
static const true_false_string tfs_second_part_packet_assignment = {"Second Part Packet Assignment", "Packet Assignment"};
1343
static const true_false_string tfs_packet_downlink_uplink_assignment = {"Packet Downlink Assignment", "Packet Uplink Assignment"};
1344
static const true_false_string tfs_shall_be_shall_not_be_used = {"Shall be used", "Shall not be used"};
1345
static const true_false_string tfs_current_version_earlier_version = {"Current version", "Earlier version"};
1346
static const true_false_string tfs_member_not_member_of_set = {"is a member of the set", "is not a member of the set"};
1347
static const true_false_string tfs_not_present_present = {"Not Present", "Present"};
1348
static const true_false_string tfs_rsrq_rsrp = {"RSRQ", "RSRP"};
1349
static const true_false_string tfs_3_bit_6_bit = {"3 bit", "6 bit"};
1350
static const true_false_string tfs_tdd_fdd = {"TDD", "FDD"};
1351
static const true_false_string tfs_ec_no_rscp = {"Ec/No", "RSCP"};
1352
static const true_false_string tfs_short_lsa_id_lsa_id = {"Short LSA ID", "LSA ID"};
1353
static const true_false_string tfs_present_not_present_in_cell = {"Present In Cell", "Not Present In Cell"};
1354
static const true_false_string tfs_ec_ptmsi_imsi = {"IMSI", "P-TMSI"};
1355
1356
/* this function is used for dissecting the 0/1 presence flags in CSN.1 coded IEs */
1357
static bool gsm_rr_csn_flag(tvbuff_t *tvb, proto_tree *tree, int bit_offset, int hf_bit)
1358
73.9k
{
1359
73.9k
    uint8_t bit_mask        = 0x80 >> (bit_offset % 8);
1360
73.9k
    uint8_t value           = tvb_get_uint8(tvb, bit_offset >> 3);
1361
1362
73.9k
    proto_tree_add_bits_item(tree, hf_bit, tvb, bit_offset, 1, ENC_NA);
1363
73.9k
    return ((value & bit_mask) != 0);
1364
73.9k
}
1365
1366
static const true_false_string tfs_break_indicator = {"Additional parameters \"SI4 Rest Octets_S\" are sent in SYSTEM INFORMATION TYPE 7 and 8",
1367
                                                      "Additional parameters \"SI4 Rest Octets_S\" are not sent in SYSTEM INFORMATION TYPE 7 and 8"};
1368
static const true_false_string tfs_for_gprs_for_rr_connection_establishment = {"For GPRS", "For RR connection establishment"};
1369
static const true_false_string tfs_3g_early_classmark_sending_restriction = {"The sending of UTRAN,CDMA2000 and GERAN IU MODE CLASSMARK CHANGE messages are controlled by the Early Classmark Sending Control parameter",
1370
                                                                             "Neither UTRAN, CDMA2000 nor GERAN IU MODE CLASSMARK CHANGE message shall be sent with the Early classmark sending"};
1371
static const true_false_string tfs_supported_in_serving_cell_not_supported_in_serving_cell = {"Supported in Serving cell", "Not Supported in Serving cell"};
1372
1373
static int de_rr_eutran_not_allowed_cells(tvbuff_t *tvb, proto_tree *tree, int bit_offset);
1374
1375
/* this function is used for dissecting the H/L presence flags in CSN.1 coded IEs"
1376
   If truncation ( 44.018 section 8.9) is allowed, truncation_length is set to the actual bit length of the CSN.1 string,
1377
   otherwise it is set to 0 */
1378
/* coverity[+no_checked_return] */
1379
static bool gsm_rr_csn_HL_flag(tvbuff_t *tvb, proto_tree *tree, unsigned truncation_length, unsigned bit_offset, int hf_bit)
1380
11.2k
{
1381
11.2k
    uint8_t bit_mask        = 0x80 >> (bit_offset % 8);
1382
11.2k
    uint8_t value           = PADDING_BYTE;
1383
11.2k
    char   bits_str[]      = {".... .... = "};
1384
11.2k
    uint8_t offset_in_octet = bit_offset % 8;
1385
11.2k
    proto_item* ti;
1386
1387
11.2k
    if (truncation_length)
1388
3.52k
    {
1389
3.52k
       if (bit_offset < truncation_length)
1390
3.24k
       {
1391
          /* there should be some real data to fetch */
1392
3.24k
          value = tvb_get_uint8(tvb, bit_offset >> 3)^PADDING_BYTE;
1393
3.24k
       }
1394
285
       else
1395
285
       {
1396
          /* implicit L bit */
1397
285
          ti = proto_tree_add_boolean(tree, hf_bit, tvb, truncation_length>>3, 1, false);
1398
285
          proto_item_prepend_text(ti, "(implicit L bit)");
1399
285
          return false;
1400
285
       }
1401
3.52k
    }
1402
7.69k
    else
1403
7.69k
    {
1404
       /* if truncation_length == 0, then don't check for truncation*/
1405
7.69k
       value = tvb_get_uint8(tvb, bit_offset >> 3)^PADDING_BYTE;
1406
7.69k
    }
1407
1408
10.9k
    if (value & bit_mask)
1409
5.40k
    {
1410
5.40k
        bits_str[offset_in_octet + (offset_in_octet / 4)] = 'H';
1411
5.40k
        ti = proto_tree_add_boolean(tree, hf_bit, tvb, bit_offset>>3, 1, true);
1412
5.40k
        proto_item_prepend_text(ti, "%s", bits_str);
1413
5.40k
        return true;
1414
5.40k
    }
1415
5.53k
    else
1416
5.53k
    {
1417
5.53k
        bits_str[offset_in_octet + (offset_in_octet / 4)] = 'L';
1418
5.53k
        ti = proto_tree_add_boolean(tree, hf_bit, tvb, bit_offset>>3, 1, false);
1419
5.53k
        proto_item_prepend_text(ti, "%s", bits_str);
1420
5.53k
        return false;
1421
5.53k
    }
1422
10.9k
}
1423
1424
/*
1425
10.5.2 Radio Resource management information elements
1426
 * [3] 10.5.2.1a BA Range
1427
 */
1428
static uint16_t
1429
de_rr_ba_range(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
1430
3
{
1431
3
    uint32_t curr_offset;
1432
3
    int     bit_offset;
1433
3
    uint8_t value;
1434
1435
3
    curr_offset = offset;
1436
3
    proto_tree_add_item(tree, hf_gsm_a_rr_range_nb, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1437
3
    value = tvb_get_uint8(tvb, curr_offset);
1438
3
    curr_offset += 1;
1439
3
    bit_offset = curr_offset << 3;
1440
14
    while (value)
1441
11
    {
1442
11
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_range_lower, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
1443
11
        bit_offset += 10;
1444
11
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_range_higher, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
1445
11
        bit_offset += 10;
1446
11
        value -= 1;
1447
11
    }
1448
1449
3
    curr_offset += len - 1;
1450
3
    return (curr_offset - offset);
1451
3
}
1452
1453
/*
1454
 * [3] 10.5.2.1b Cell Channel Description
1455
 */
1456
1457
203k
#define ARFCN_MAX 1024 /* total number of ARFCNs defined */
1458
1459
static void display_channel_list(uint8_t *list, tvbuff_t *tvb, proto_tree *tree, uint32_t offset, unsigned len)
1460
199
{
1461
199
    int         arfcn;
1462
199
    proto_item *ti = NULL;
1463
1464
199
    ti = proto_tree_add_bytes_format(tree, hf_gsm_a_rr_arfcn_list, tvb, offset, len, NULL, "List of ARFCNs =");
1465
203k
    for (arfcn=0; arfcn<ARFCN_MAX; arfcn++) {
1466
203k
        if (list[arfcn])
1467
1.56k
            proto_item_append_text(ti, " %d", arfcn);
1468
203k
    }
1469
1470
199
    return;
1471
199
}
1472
1473
/**
1474
 * Checks that the remaining "rest octets" all contain the default padding value.
1475
 * If not, it can be assumed that there is a protocol extension
1476
 * that we don't handle,
1477
 * or a malformed PDU.
1478
 *
1479
 * bit_offset: bit offset in TVB of first bit to be examined
1480
 * octet_len:  total length of buffer
1481
 * pattern:    padding pattern (usually 0x2b or 0x00)
1482
 */
1483
static void gsm_rr_padding_bits(proto_tree* tree, tvbuff_t* tvb,
1484
                                uint16_t bit_offset, uint8_t octet_len,
1485
                                const uint8_t pattern)
1486
3.39k
{
1487
3.39k
    unsigned i;
1488
3.39k
    bool non_padding_found = false;
1489
3.39k
    uint8_t  octet_offset      = bit_offset >> 3;
1490
1491
3.39k
    if ((octet_len << 3) > bit_offset)
1492
3.12k
    {
1493
        /* there is spare room, check the first padding octet */
1494
3.12k
        uint8_t bit_mask = 0xFF >> (bit_offset & 0x07);
1495
3.12k
        if ((tvb_get_uint8(tvb, octet_offset) & bit_mask) != (pattern & bit_mask))
1496
2.93k
        {
1497
2.93k
               non_padding_found = true;
1498
2.93k
        }
1499
189
        else
1500
189
        {
1501
554
           for (i=octet_offset+1; (i<octet_len) && !non_padding_found; i++)
1502
365
           {
1503
365
               if (tvb_get_uint8(tvb, i) != pattern)
1504
162
                   non_padding_found = true;
1505
365
           }
1506
189
        }
1507
1508
3.12k
        if (non_padding_found)
1509
3.10k
        {
1510
            /* there is something here we don't understand */
1511
3.10k
            proto_tree_add_bytes_format_value(tree, hf_gsm_a_rr_padding, tvb, octet_offset, -1, NULL, "Unknown extension detected or malformed PDU (Not decoded)");
1512
3.10k
        }
1513
27
        else
1514
27
        {
1515
27
            proto_tree_add_bytes_format_value(tree, hf_gsm_a_rr_padding, tvb, octet_offset, -1, NULL, "default padding");
1516
27
        }
1517
3.12k
    }
1518
271
    else
1519
271
    {
1520
271
       proto_tree_add_bytes_format(tree, hf_gsm_a_rr_padding, tvb, 0, 0, NULL, "No space for padding bits");
1521
271
    }
1522
3.39k
}
1523
1524
static int greatest_power_of_2_lesser_or_equal_to(int idx)
1525
13.8k
{
1526
13.8k
    int j = 1;
1527
39.1k
    do {
1528
39.1k
        j <<= 1;
1529
39.1k
    } while (j <= idx);
1530
13.8k
    j >>= 1;
1531
13.8k
    return j;
1532
13.8k
}
1533
1534
int f_k(int k, int *w, int range)
1535
4.70k
{
1536
4.70k
    int idx, n, j;
1537
1538
4.70k
    idx    = k;
1539
4.70k
    range -= 1;
1540
4.70k
    range  = range/greatest_power_of_2_lesser_or_equal_to(idx);
1541
4.70k
    n      = w[idx]-1;
1542
1543
13.8k
    while (idx>1) {
1544
9.10k
        j = greatest_power_of_2_lesser_or_equal_to(idx);
1545
9.10k
        range = 2*range+1;
1546
9.10k
        if ((2*idx) < 3*j){ /* left child */
1547
5.19k
            idx -= j/2;
1548
5.19k
            n = (n+w[idx]-1+((range-1)/2)+1)%range;
1549
5.19k
        }
1550
3.91k
        else { /* right child */
1551
3.91k
            idx -= j;
1552
3.91k
            n = (n+w[idx]-1+1)%range;
1553
3.91k
        }
1554
9.10k
    }
1555
1556
4.70k
    return (n+1)%1024;
1557
4.70k
}
1558
1559
static void dissect_channel_list_n_range(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, int range)
1560
372
{
1561
372
    int         curr_offset = offset, bit_offset, f0, w[64], wsize, i;
1562
372
    int         octet, nwi  = 1, jwi=0, imax, iused, arfcn;
1563
372
    uint8_t     list[1024];
1564
372
    uint64_t    arfcn_orig;
1565
372
    proto_tree *subtree;
1566
1567
372
    memset((void*)list,0,sizeof(list));
1568
1569
372
    subtree = proto_tree_add_subtree_format(tree,tvb, curr_offset, len,
1570
372
                                            ett_gsm_rr_elem[DE_RR_NEIGH_CELL_DESC], NULL, "Range %d format", range);
1571
1572
372
    octet = tvb_get_uint8(tvb, curr_offset);
1573
372
    if (range == 1024) {
1574
189
        f0 = (octet>>2)&1;
1575
189
        if (f0)
1576
87
            list[0] = 1;
1577
189
        arfcn_orig = 0;
1578
189
        wsize = 10;
1579
189
        imax = 16;
1580
189
        bit_offset = curr_offset*8 + 6;
1581
189
    }
1582
183
    else {
1583
183
        bit_offset = curr_offset*8 + 7;
1584
183
        proto_tree_add_bits_ret_val(subtree, hf_n_range_orig_arfcn, tvb, bit_offset, 10, &arfcn_orig, ENC_BIG_ENDIAN);
1585
183
        bit_offset+=10;
1586
1587
        /* N.B. cannot go out of bounds as read only 10 bits */
1588
183
        list[arfcn_orig] = 1;
1589
1590
183
        switch (range) {
1591
71
        case 512:
1592
71
            wsize=9;
1593
71
            imax = 17;
1594
71
            break;
1595
30
        case 256:
1596
30
            wsize=8;
1597
30
            imax = 21;
1598
30
            break;
1599
74
        case 128:
1600
74
            wsize=7;
1601
74
            imax = 28;
1602
74
            break;
1603
0
        default:
1604
0
            DISSECTOR_ASSERT_NOT_REACHED();
1605
183
        }
1606
183
    }
1607
364
    iused = imax;   /* in case the list is actually full */
1608
1609
    /* extract the variable size w[] elements */
1610
5.55k
    for (i=1; i<=imax; i++) {
1611
5.18k
        w[i] = tvb_get_bits32(tvb, bit_offset, wsize, ENC_BIG_ENDIAN);
1612
5.18k
        proto_tree_add_bytes_format(subtree, hf_gsm_a_rr_w_elements, tvb, bit_offset>>3, ((bit_offset+wsize-1)>>3) - (bit_offset>>3) + 1 , NULL, "%s W(%d): %d",
1613
5.18k
                            decode_bits_in_field(pinfo->pool, bit_offset, wsize, w[i], ENC_BIG_ENDIAN),
1614
5.18k
                            i,
1615
5.18k
                            w[i]);
1616
5.18k
        bit_offset += wsize;
1617
5.18k
        curr_offset = bit_offset>>3;
1618
1619
5.18k
        if ((iused == imax) && (w[i] == 0) ) {
1620
227
            iused = i - 1;
1621
227
        }
1622
5.18k
        if ((curr_offset-offset)>len) {
1623
0
            iused = i - 1;
1624
0
            break;
1625
0
        }
1626
5.18k
        if (++jwi == nwi) {       /* check if the number of wi at this wsize has been extracted */
1627
1.14k
            jwi = 0;            /* reset the count of wi at this size */
1628
1.14k
            nwi <<= 1;          /* get twice as many of the next size */
1629
1.14k
            wsize--;            /* make the next size 1 bit smaller */
1630
1.14k
        }
1631
5.18k
    }
1632
1633
1.80k
    for (i=1; i<=iused; i++) {
1634
1.43k
        arfcn = (f_k(i, w, range) + arfcn_orig)%1024;
1635
1.43k
        list[arfcn] = 1;
1636
1.43k
    }
1637
1638
364
    display_channel_list(list, tvb, tree, offset, curr_offset-offset);
1639
1640
364
    return;
1641
372
}
1642
1643
static uint16_t
1644
dissect_arfcn_list_core(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_, uint8_t format)
1645
1.80k
{
1646
1.80k
    uint32_t    curr_offset, byte;
1647
1.80k
    uint8_t     oct,bit;
1648
1.80k
    uint16_t    arfcn;
1649
1.80k
    proto_item *item;
1650
1651
1.80k
    curr_offset = offset;
1652
1653
1.80k
    if ((format & 0xc0) == 0x00)
1654
1.09k
    {
1655
        /* bit map 0 */
1656
1.09k
        item = proto_tree_add_bytes_format(tree, hf_gsm_a_rr_arfcn_list, tvb, curr_offset, len, NULL, "List of ARFCNs =");
1657
1.09k
        bit = 4;
1658
1.09k
        arfcn = 125;
1659
8.61k
        for (byte = 0; byte <= len-1; byte++)
1660
7.52k
        {
1661
7.52k
            oct = tvb_get_uint8(tvb, curr_offset);
1662
65.8k
            while (bit-- != 0)
1663
58.3k
            {
1664
58.3k
                arfcn--;
1665
58.3k
                if (((oct >> bit) & 1) == 1)
1666
22.8k
                {
1667
22.8k
                    proto_item_append_text(item," %d",arfcn);
1668
22.8k
                }
1669
58.3k
            }
1670
7.52k
            bit = 8;
1671
7.52k
            curr_offset++;
1672
7.52k
        }
1673
1.09k
    }
1674
717
    else if ((format & 0xc8) == 0x80)
1675
189
    {
1676
        /* 1024 range */
1677
189
        dissect_channel_list_n_range(tvb, tree, pinfo, curr_offset, len, 1024);
1678
189
        curr_offset = curr_offset + len;
1679
189
    }
1680
528
    else if ((format & 0xce) == 0x88)
1681
77
    {
1682
        /* 512 range */
1683
77
        dissect_channel_list_n_range(tvb, tree, pinfo, curr_offset, len, 512);
1684
77
        curr_offset = curr_offset + len;
1685
77
    }
1686
451
    else if ((format & 0xce) == 0x8a)
1687
30
    {
1688
        /* 256 range */
1689
30
        dissect_channel_list_n_range(tvb, tree, pinfo, curr_offset, len, 256);
1690
30
        curr_offset = curr_offset + len;
1691
30
    }
1692
421
    else if ((format & 0xce) == 0x8c)
1693
76
    {
1694
        /* 128 range */
1695
76
        dissect_channel_list_n_range(tvb, tree, pinfo, curr_offset, len, 128);
1696
76
        curr_offset = curr_offset + len;
1697
76
    }
1698
345
    else if ((format & 0xce) == 0x8e)
1699
42
    {
1700
        /* variable bit map */
1701
42
        arfcn = ((format & 0x01) << 9) | (tvb_get_uint8(tvb, curr_offset+1) << 1) | ((tvb_get_uint8(tvb, curr_offset + 2) & 0x80) >> 7);
1702
42
        item = proto_tree_add_bytes_format(tree, hf_gsm_a_rr_arfcn_list, tvb, curr_offset, len, NULL, "List of ARFCNs = %d",arfcn);
1703
42
        curr_offset = curr_offset + 2;
1704
42
        bit = 7;
1705
567
        for (byte = 0; byte <= len-3; byte++)
1706
525
        {
1707
525
            oct = tvb_get_uint8(tvb, curr_offset);
1708
4.68k
            while (bit-- != 0)
1709
4.16k
            {
1710
4.16k
                arfcn++;
1711
4.16k
                if (((oct >> bit) & 1) == 1)
1712
2.01k
                {
1713
2.01k
                    proto_item_append_text(item," %d",arfcn % 1024);
1714
2.01k
                }
1715
4.16k
            }
1716
525
            bit = 8;
1717
525
            curr_offset++;
1718
525
        }
1719
42
    }
1720
1721
1.80k
    return curr_offset - offset;
1722
1.80k
}
1723
1724
/*
1725
 * Format ID is in bits:
1726
 * 128 127 124 123 122 (hf_gsm_a_rr_format_id)
1727
 */
1728
static uint16_t
1729
dissect_arfcn_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
1730
1.19k
{
1731
1.19k
    uint32_t curr_offset;
1732
1.19k
    uint8_t oct;
1733
1734
1.19k
    curr_offset = offset;
1735
1736
1.19k
    oct = tvb_get_uint8(tvb, curr_offset);
1737
1738
    /* FORMAT-ID, Format Identifier (part of octet 3)*/
1739
1.19k
    proto_tree_add_item(tree, hf_gsm_a_rr_format_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1740
1741
1.19k
    curr_offset += dissect_arfcn_list_core(tvb, tree, pinfo, offset, len, add_string, string_len, oct);
1742
1743
1.19k
    return curr_offset - offset;
1744
1.19k
}
1745
1746
/*
1747
 * Format ID is in bits:
1748
 * 128 124 123 122 (hf_gsm_a_rr_format_id2)
1749
 */
1750
static uint16_t
1751
dissect_arfcn_list2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
1752
616
{
1753
616
    uint32_t curr_offset;
1754
616
    uint8_t oct;
1755
1756
616
    curr_offset = offset;
1757
1758
    /* Turn bit 127 off, in order to reuse the ARFCN dissection code */
1759
616
    oct = tvb_get_uint8(tvb, curr_offset) & 0xbf;
1760
1761
    /* FORMAT-ID, Format Identifier (part of octet 3)*/
1762
616
    proto_tree_add_item(tree, hf_gsm_a_rr_format_id2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1763
1764
616
    curr_offset += dissect_arfcn_list_core(tvb, tree, pinfo, offset, len, add_string, string_len, oct);
1765
1766
616
    return curr_offset - offset;
1767
616
}
1768
1769
static uint16_t
1770
de_rr_cell_ch_dsc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
1771
162
{
1772
162
    return dissect_arfcn_list(tvb, tree, pinfo, offset, 16, add_string, string_len);
1773
162
}
1774
/*
1775
 * [3] 10.5.2.1c BA List Pref
1776
 */
1777
static uint16_t
1778
de_rr_ba_list_pref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
1779
2
{
1780
2
    unsigned bit_offset;
1781
1782
2
    bit_offset = offset << 3;
1783
3
    while (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_repeat_range_limit))
1784
1
    {
1785
1
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_range_lower, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
1786
1
        bit_offset += 10;
1787
1
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_range_higher, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
1788
1
        bit_offset += 10;
1789
1
    }
1790
3
    while (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_repeat_ba_frequency))
1791
1
    {
1792
1
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_ba_freq, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
1793
1
        bit_offset += 10;
1794
1
    }
1795
1796
2
    if (((bit_offset + 7) >> 3) > (offset + len))
1797
0
    {
1798
0
       expert_add_info(pinfo, proto_tree_get_parent(tree), &ei_gsm_a_rr_ie_overrun);
1799
0
    }
1800
2
    else if ((bit_offset >> 3) < (offset + len))
1801
2
    {
1802
2
       expert_add_info(pinfo, proto_tree_get_parent(tree), &ei_gsm_a_rr_ie_underrun);
1803
2
    }
1804
2
    return len;
1805
2
}
1806
1807
/*
1808
 * [3] 10.5.2.1d UTRAN Frequency List
1809
 */
1810
static uint16_t
1811
de_rr_utran_freq_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
1812
3
{
1813
3
    unsigned bit_offset;
1814
1815
    /* < UTRAN Freq List >::=
1816
     * < LENGTH OF UTRAN FREQ LIST : bit (8) > -- length following in octets
1817
     * { 1 < FDD_ARFCN > : bit (14) } ** 0 -- FDD frequencies
1818
     * { 1 < TDD_ARFCN > : bit (14) } ** 0 -- TDD frequencies
1819
     * <spare bit>**;
1820
     * Spare bits in the end of the field are used to fill the last octet.
1821
     */
1822
3
    bit_offset = offset << 3;
1823
3
    while (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_fdd_repeat_freq))
1824
0
    {
1825
0
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_fdd_uarfcn, tvb, bit_offset, 14, ENC_BIG_ENDIAN);
1826
0
        bit_offset += 14;
1827
0
    }
1828
6
    while (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_tdd_repeat_freq))
1829
3
    {
1830
3
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_tdd_uarfcn, tvb, bit_offset, 14, ENC_BIG_ENDIAN);
1831
3
        bit_offset += 14;
1832
3
    }
1833
1834
3
    if (((bit_offset + 7) >> 3) > (offset + len))
1835
0
    {
1836
0
       expert_add_info(pinfo, proto_tree_get_parent(tree), &ei_gsm_a_rr_ie_overrun);
1837
0
    }
1838
3
    else if ((bit_offset >> 3) < (offset + len))
1839
3
    {
1840
3
       expert_add_info(pinfo, proto_tree_get_parent(tree), &ei_gsm_a_rr_ie_underrun);
1841
3
    }
1842
3
    return (len);
1843
3
}
1844
1845
/*
1846
 * [3] 10.5.2.1e Cell selection indicator after release of all TCH and SDCCH
1847
 */
1848
static const uint8_t
1849
convert_n_to_p[32] = {   0, 10, 19, 28, 36, 44, 52, 60, 67, 74, 81, 88, 95, 102, 109, 116,
1850
                       122,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,   0,   0,   0};
1851
1852
static const uint8_t
1853
convert_n_to_q[32] = {   0,   9,  17,  25,  32, 39, 46, 53, 59, 65, 71, 77, 83, 89, 95, 101,
1854
                       106, 111, 116, 121, 126,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,   0};
1855
static const true_false_string tfs_1900_1800 = { "1900", "1800" };
1856
1857
static uint16_t
1858
de_rr_cell_select_indic(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
1859
5
{
1860
5
    proto_tree *subtree, *subtree2;
1861
5
    proto_item *item;
1862
5
    uint32_t    curr_offset;
1863
5
    int         bit_offset, bit_offset_sav, idx, xdd_cell_info, wsize, nwi, jwi, w[64], i, iused, xdd_indic0;
1864
5
    uint8_t     value;
1865
1866
5
    curr_offset = offset;
1867
5
    bit_offset  = curr_offset << 3;
1868
5
    value = tvb_get_bits8(tvb,bit_offset,3);
1869
5
    bit_offset += 3;
1870
5
    switch (value)
1871
5
    {
1872
1
    case 0: /* GSM Description */
1873
1
        bit_offset_sav = bit_offset;
1874
1
        subtree = proto_tree_add_subtree(tree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_GSM_DESC], &item,
1875
1
                                   gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_GSM_DESC]);
1876
1
        while (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_repeat_gsm_desc))
1877
0
        {
1878
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_band_indicator, tvb, bit_offset++, 1, ENC_NA);
1879
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_arfcn, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
1880
0
            bit_offset += 10;
1881
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_bsic, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
1882
0
            bit_offset += 6;
1883
0
        }
1884
1
        proto_item_set_len(item,((bit_offset>>3) - (bit_offset_sav>>3) + 1));
1885
1
        break;
1886
2
    case 1: /* UTRAN FDD Description */
1887
2
        bit_offset_sav = bit_offset;
1888
2
        subtree = proto_tree_add_subtree(tree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_UTRAN_FDD_DESC], &item,
1889
2
                                   gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_FDD_DESC]);
1890
3
        while (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_repeat_utran_fdd_desc))
1891
1
        {
1892
1
            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_bandwidth_fdd_present))
1893
0
            {
1894
0
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_bandwidth_fdd, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
1895
0
                bit_offset += 3;
1896
0
            }
1897
1
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_fdd_uarfcn, tvb, bit_offset, 14, ENC_BIG_ENDIAN);
1898
1
            bit_offset += 14;
1899
1
            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_fdd_cell_info_present))
1900
1
            {
1901
1
                xdd_indic0 = gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_fdd_indic0);
1902
1
                idx = tvb_get_bits8(tvb,bit_offset,5);
1903
1
                proto_tree_add_uint(subtree, hf_gsm_a_rr_nr_of_fdd_cells, tvb, bit_offset>>3, 1, idx);
1904
1
                bit_offset += 5;
1905
1
                idx = convert_n_to_p[idx];
1906
1
                subtree2 = proto_tree_add_subtree(subtree,tvb, bit_offset>>3, (idx>>3)+1,
1907
1
                                            ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_FDD_CELL_INFORMATION_FIELD], NULL,
1908
1
                                            gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_FDD_DESC]);
1909
1
                proto_tree_add_bytes_format(subtree2, hf_gsm_a_rr_field_bit_long, tvb, bit_offset>>3, (idx>>3)+1, NULL, "Field is %d bits long", idx);
1910
1
                if (xdd_indic0)
1911
0
                {
1912
0
                    proto_tree_add_uint(subtree2, hf_gsm_a_rr_scrambling_code, tvb, bit_offset>>3, 0, 0);
1913
0
                    proto_tree_add_uint(subtree2, hf_gsm_a_rr_diversity, tvb, bit_offset>>3, 0, 0);
1914
0
                }
1915
1
                if (idx)
1916
0
                {
1917
0
                    wsize = 10;
1918
0
                    nwi = 1;
1919
0
                    jwi = 0;
1920
0
                    i = 1;
1921
1922
0
                    while (idx > 0)
1923
0
                    {
1924
0
                        w[i] = tvb_get_bits32(tvb, bit_offset, wsize, ENC_BIG_ENDIAN);
1925
0
                        bit_offset += wsize;
1926
0
                        idx -= wsize;
1927
0
                        if (w[i] == 0)
1928
0
                        {
1929
0
                            idx = 0;
1930
0
                            break;
1931
0
                        }
1932
0
                        if (++jwi == nwi)
1933
0
                        {
1934
0
                            jwi = 0;
1935
0
                            nwi <<= 1;
1936
0
                            wsize--;
1937
0
                        }
1938
0
                        i++;
1939
0
                    }
1940
0
                    if (idx < 0)
1941
0
                    {
1942
0
                        bit_offset += idx;
1943
0
                    }
1944
0
                    iused = i-1;
1945
1946
0
                    for (i=1; i <= iused; i++)
1947
0
                    {
1948
0
                        xdd_cell_info = f_k(i, w, 1024);
1949
0
                        proto_tree_add_uint(subtree2, hf_gsm_a_rr_scrambling_code, tvb, bit_offset>>3, 0, xdd_cell_info & 0x01FF);
1950
0
                        proto_tree_add_uint(subtree2, hf_gsm_a_rr_diversity, tvb, bit_offset>>3, 0, (xdd_cell_info >> 9) & 0x01);
1951
0
                    }
1952
0
                }
1953
1
            }
1954
1
        }
1955
2
        proto_item_set_len(item,((bit_offset>>3) - (bit_offset_sav>>3) + 1));
1956
2
        break;
1957
0
    case 2: /* UTRAN TDD Description */
1958
0
        bit_offset_sav = bit_offset;
1959
0
        subtree = proto_tree_add_subtree(tree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_UTRAN_TDD_DESC], &item,
1960
0
                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_TDD_DESC]);
1961
1962
0
        while (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_repeat_utran_tdd_desc))
1963
0
        {
1964
0
            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_bandwidth_tdd_present))
1965
0
            {
1966
0
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_bandwidth_tdd, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
1967
0
                bit_offset += 3;
1968
0
            }
1969
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tdd_uarfcn, tvb, bit_offset, 14, ENC_BIG_ENDIAN);
1970
0
            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_tdd_cell_info_present))
1971
0
            {
1972
0
                xdd_indic0 = gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_tdd_indic0);
1973
0
                idx = tvb_get_bits8(tvb,bit_offset,5);
1974
0
                proto_tree_add_uint(subtree, hf_gsm_a_rr_nr_of_tdd_cells, tvb, bit_offset>>3, 1, idx);
1975
0
                bit_offset += 5;
1976
0
                idx = convert_n_to_q[idx];
1977
0
                subtree2 = proto_tree_add_subtree(subtree,tvb, bit_offset>>3, (idx>>3)+1,
1978
0
                                            ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_TDD_CELL_INFORMATION_FIELD], NULL,
1979
0
                                            gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_TDD_DESC]);
1980
0
                proto_tree_add_bytes_format(subtree2, hf_gsm_a_rr_field_bit_long, tvb, bit_offset>>3, (idx>>3)+1, NULL, "Field is %d bits long", idx);
1981
0
                if (xdd_indic0)
1982
0
                {
1983
0
                    proto_tree_add_uint(subtree2, hf_gsm_a_rr_cell_parameter, tvb, bit_offset>>3, 0, 0);
1984
0
                    proto_tree_add_uint(subtree2, hf_gsm_a_rr_sync_case_tstd, tvb, bit_offset>>3, 0, 0);
1985
0
                    proto_tree_add_uint(subtree2, hf_gsm_a_rr_diversity_tdd, tvb, bit_offset>>3, 0, 0);
1986
0
                }
1987
0
                if (idx)
1988
0
                {
1989
0
                    wsize = 9;
1990
0
                    nwi = 1;
1991
0
                    jwi = 0;
1992
0
                    i = 1;
1993
1994
0
                    while (idx > 0)
1995
0
                    {
1996
0
                        w[i] = tvb_get_bits32(tvb, bit_offset, wsize, ENC_BIG_ENDIAN);
1997
0
                        bit_offset += wsize;
1998
0
                        idx -= wsize;
1999
0
                        if (w[i]  ==  0)
2000
0
                        {
2001
0
                            idx = 0;
2002
0
                            break;
2003
0
                        }
2004
0
                        if (++jwi == nwi)
2005
0
                        {
2006
0
                            jwi = 0;
2007
0
                            nwi <<= 1;
2008
0
                            wsize--;
2009
0
                        }
2010
0
                        i++;
2011
0
                    }
2012
0
                    if (idx < 0)
2013
0
                    {
2014
0
                        bit_offset += idx;
2015
0
                    }
2016
0
                    iused = i-1;
2017
2018
0
                    for (i=1; i <= iused; i++)
2019
0
                    {
2020
0
                        xdd_cell_info = f_k(i, w, 512);
2021
0
                        proto_tree_add_uint(subtree2, hf_gsm_a_rr_cell_parameter, tvb, bit_offset>>3, 0, xdd_cell_info & 0x07F);
2022
0
                        proto_tree_add_uint(subtree2, hf_gsm_a_rr_sync_case_tstd, tvb, bit_offset>>3, 0, (xdd_cell_info >> 7) & 0x01);
2023
0
                        proto_tree_add_uint(subtree2, hf_gsm_a_rr_diversity_tdd, tvb, bit_offset>>3, 0, (xdd_cell_info >> 8) & 0x01);
2024
0
                    }
2025
0
                }
2026
0
            }
2027
0
        }
2028
0
        proto_item_set_len(item,((bit_offset>>3) - (bit_offset_sav>>3) + 1));
2029
0
        break;
2030
1
      case 3: /* E-UTRAN Description */
2031
2032
1
        bit_offset_sav = bit_offset;
2033
1
        subtree = proto_tree_add_subtree(tree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_EUTRAN_DESC], &item,
2034
1
                                         gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_EUTRAN_DESC]);
2035
2036
1
        while (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_repeat_eutran_desc))
2037
0
        {
2038
            /* EARFCN */
2039
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_earfcn, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
2040
0
            bit_offset += 16;
2041
2042
            /* Measurement Bandwidth */
2043
0
            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_eutran_measurement_bandwidth_present))
2044
0
            {
2045
0
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_measurement_bandwidth, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
2046
0
                bit_offset += 3;
2047
0
            }
2048
2049
            /* Repeated E-UTRAN Not Allowed Cells */
2050
0
            while (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_repeated_eutran_not_allowed_cells))
2051
0
            {
2052
0
                bit_offset += de_rr_eutran_not_allowed_cells(tvb, subtree, bit_offset);
2053
0
            }
2054
2055
            /* TARGET PCID */
2056
0
            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_eutran_pcid_present))
2057
0
            {
2058
0
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_pcid, tvb, bit_offset, 9, ENC_BIG_ENDIAN);
2059
0
                bit_offset += 9;
2060
0
            }
2061
0
        }
2062
1
        proto_item_set_len(item,((bit_offset>>3) - (bit_offset_sav>>3) + 1));
2063
1
        break;
2064
2065
1
    default:
2066
1
        break;
2067
5
    }
2068
2069
4
    curr_offset += len;
2070
4
    return (curr_offset - offset);
2071
5
}
2072
2073
/*
2074
 * [3] 10.5.2.2 Cell Description
2075
 */
2076
uint16_t
2077
de_rr_cell_dsc(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2078
374
{
2079
374
    uint32_t curr_offset;
2080
374
    uint16_t bcch_arfcn;
2081
2082
374
    curr_offset = offset;
2083
2084
374
    proto_tree_add_item(subtree, hf_gsm_a_rr_ncc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2085
374
    proto_tree_add_item(subtree, hf_gsm_a_rr_bcc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2086
374
    bcch_arfcn = (tvb_get_uint8(tvb,curr_offset) & 0xc0) << 2;
2087
374
    bcch_arfcn = bcch_arfcn | tvb_get_uint8(tvb,curr_offset+1);
2088
374
    proto_tree_add_uint(subtree, hf_gsm_a_rr_bcch_arfcn , tvb, curr_offset, 2, bcch_arfcn );
2089
2090
374
    curr_offset = curr_offset + 2;
2091
2092
374
    return curr_offset - offset;
2093
374
}
2094
2095
/*
2096
 * [3] 10.5.2.3 Cell Options (BCCH)
2097
 */
2098
static const value_string gsm_a_rr_dtx_bcch_vals[] = {
2099
    { 0x00, "The MSs may use uplink discontinuous transmission" },
2100
    { 0x01, "The MSs shall use uplink discontinuous transmission" },
2101
    { 0x02, "The MSs shall not use uplink discontinuous transmission" },
2102
    { 0x03, "Reserved" },
2103
    {    0, NULL } };
2104
2105
static const value_string gsm_a_rr_radio_link_timeout_vals[] = {
2106
    { 0x00, "4" },
2107
    { 0x01, "8" },
2108
    { 0x02, "12" },
2109
    { 0x03, "16" },
2110
    { 0x04, "20" },
2111
    { 0x05, "24" },
2112
    { 0x06, "28" },
2113
    { 0x07, "32" },
2114
    { 0x08, "36" },
2115
    { 0x09, "40" },
2116
    { 0x0A, "44" },
2117
    { 0x0B, "48" },
2118
    { 0x0C, "52" },
2119
    { 0x0D, "56" },
2120
    { 0x0E, "60" },
2121
    { 0x0F, "64" },
2122
    {    0, NULL } };
2123
2124
static uint16_t
2125
de_rr_cell_opt_bcch(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2126
176
{
2127
176
    uint32_t curr_offset;
2128
2129
176
    curr_offset = offset;
2130
2131
176
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pwrc, tvb, (curr_offset<<3)+1, 1, ENC_BIG_ENDIAN);
2132
176
    proto_tree_add_item(subtree, hf_gsm_a_rr_dtx_bcch, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2133
176
    proto_tree_add_item(subtree, hf_gsm_a_rr_radio_link_timeout, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2134
2135
176
    curr_offset = curr_offset + 1;
2136
2137
176
    return curr_offset - offset;
2138
176
}
2139
2140
/*
2141
 * [3] 10.5.2.3a Cell Options (SACCH)
2142
 */
2143
static const value_string gsm_a_rr_dtx_sacch_vals[] = {
2144
    { 0x00, "The MS may use uplink discontinuous transmission on a TCH-F. The MS shall not use uplink discontinuous transmission on TCH-H" },
2145
    { 0x01, "The MS shall use uplink discontinuous transmission on a TCH-F. The MS shall not use uplink discontinuous transmission on TCH-H" },
2146
    { 0x02, "The MS shall not use uplink discontinuous transmission on a TCH-F. The MS shall not use uplink discontinuous transmission on TCH-H" },
2147
    { 0x03, "The MS shall use uplink discontinuous transmission on a TCH-F. The MS may use uplink discontinuous transmission on TCH-H" },
2148
    { 0x04, "The MS may use uplink discontinuous transmission on a TCH-F. The MS may use uplink discontinuous transmission on TCH-H" },
2149
    { 0x05, "The MS shall use uplink discontinuous transmission on a TCH-F. The MS shall use uplink discontinuous transmission on TCH-H" },
2150
    { 0x06, "The MS shall not use uplink discontinuous transmission on a TCH-F. The MS shall use uplink discontinuous transmission on TCH-H" },
2151
    { 0x07, "The MS may use uplink discontinuous transmission on a TCH-F. The MS shall use uplink discontinuous transmission on TCH-H" },
2152
    {    0, NULL } };
2153
2154
static const crumb_spec_t gsm_a_rr_dtx_sacch_crumbs[] = {
2155
    { 0, 1}, /* B8 */
2156
    { 2, 2}, /* B6 - B5 */
2157
    { 0, 0}
2158
};
2159
2160
static uint16_t
2161
de_rr_cell_opt_sacch(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2162
130
{
2163
130
    uint32_t curr_offset;
2164
2165
130
    curr_offset = offset;
2166
2167
2168
130
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pwrc, tvb, (curr_offset<<3)+1, 1, ENC_BIG_ENDIAN);
2169
    /* DTX is a split field in bits 8, 6 and 5 */
2170
130
    proto_tree_add_split_bits_item_ret_val(subtree, hf_gsm_a_rr_dtx_sacch, tvb, (curr_offset<<3), gsm_a_rr_dtx_sacch_crumbs, NULL);
2171
130
    proto_tree_add_item(subtree, hf_gsm_a_rr_radio_link_timeout, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2172
2173
130
    curr_offset = curr_offset + 1;
2174
2175
130
    return curr_offset - offset;
2176
130
}
2177
2178
/*
2179
 * [3] 10.5.2.4 Cell Selection Parameters
2180
 */
2181
static uint16_t
2182
de_rr_cell_sel_param(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2183
553
{
2184
553
    uint32_t curr_offset;
2185
2186
553
    curr_offset = offset;
2187
2188
553
    proto_tree_add_item(subtree, hf_gsm_a_rr_cell_reselect_hyst, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2189
553
    proto_tree_add_item(subtree, hf_gsm_a_rr_ms_txpwr_max_cch, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2190
2191
553
    curr_offset = curr_offset + 1;
2192
2193
553
    proto_tree_add_item(subtree, hf_gsm_a_rr_acs, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2194
553
    proto_tree_add_item(subtree, hf_gsm_a_rr_neci, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2195
553
    proto_tree_add_item(subtree, hf_gsm_a_rr_rxlev_access_min, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2196
2197
553
    curr_offset = curr_offset + 1;
2198
2199
553
    return curr_offset - offset;
2200
553
}
2201
2202
/*
2203
 * [3] 10.5.2.4a MAC Mode and Channel Coding Requested
2204
 * [3] 10.5.2.5 Channel Description
2205
 */
2206
uint16_t
2207
de_rr_ch_dsc(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2208
800
{
2209
800
    uint32_t     curr_offset;
2210
800
    uint8_t      oct8,subchannel;
2211
800
    uint16_t     arfcn, hsn, maio;
2212
800
    int hf_subchannel;
2213
2214
800
    curr_offset = offset;
2215
2216
    /* Octet 2 */
2217
800
    oct8 = tvb_get_uint8(tvb, curr_offset);
2218
2219
800
    if ((oct8 & 0xf8) == 0x08)
2220
107
    {
2221
107
        proto_tree_add_item(subtree, hf_gsm_a_rr_tchf_acchs, tvb, curr_offset, 1, ENC_NA);
2222
107
    }
2223
693
    else
2224
693
    {
2225
693
        if ((oct8 & 0xf0) == 0x10)
2226
163
        {
2227
163
            hf_subchannel = hf_gsm_a_rr_tch_acch;
2228
163
            subchannel = ((oct8 & 0x08)>>3);
2229
163
        }
2230
530
        else if ((oct8 & 0xe0) == 0x20)
2231
130
        {
2232
130
            hf_subchannel = hf_gsm_a_rr_sdcch4_sdcchc4_cbch;
2233
130
            subchannel = ((oct8 & 0x18)>>3);
2234
130
        }
2235
400
        else if ((oct8 & 0xc0) == 0x40)
2236
167
        {
2237
167
            hf_subchannel = hf_gsm_a_rr_sdcch8_sdcchc8_cbch;
2238
167
            subchannel = ((oct8 & 0x38)>>3);
2239
233
        } else {
2240
233
            hf_subchannel = hf_gsm_a_rr_unknown_channel_info;
2241
233
            subchannel = oct8;
2242
233
        }
2243
2244
693
        proto_tree_add_item(subtree, hf_subchannel, tvb, curr_offset, 1, ENC_NA);
2245
693
        proto_tree_add_uint(subtree, hf_gsm_a_rr_subchannel, tvb, curr_offset, 1, subchannel);
2246
693
    }
2247
2248
800
    proto_tree_add_item(subtree, hf_gsm_a_rr_timeslot, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2249
2250
800
    curr_offset +=1;
2251
2252
    /* Octet 3 */
2253
800
    oct8 = tvb_get_uint8(tvb, curr_offset);
2254
800
    proto_tree_add_item(subtree, hf_gsm_a_rr_training_sequence, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2255
2256
800
    proto_tree_add_item(subtree, hf_gsm_a_rr_hopping_channel, tvb, curr_offset, 1, ENC_NA);
2257
800
    if ((oct8 & 0x10) == 0x10)
2258
323
    {
2259
        /* Hopping sequence */
2260
323
        maio = ((oct8 & 0x0f)<<2) | ((tvb_get_uint8(tvb,curr_offset+1) & 0xc0) >> 6);
2261
323
        hsn = (tvb_get_uint8(tvb,curr_offset+1) & 0x3f);
2262
2263
323
        proto_tree_add_uint(subtree, hf_gsm_a_rr_hopping_channel_maio, tvb, curr_offset, 2, maio);
2264
323
        proto_tree_add_uint(subtree, hf_gsm_a_rr_hsn, tvb, curr_offset, 2, hsn);
2265
323
    }
2266
477
    else
2267
477
    {
2268
        /* single ARFCN */
2269
477
        arfcn = ((oct8 & 0x03) << 8) | tvb_get_uint8(tvb,curr_offset+1);
2270
2271
477
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_spare, tvb, (curr_offset<<3)+4, 2, ENC_NA);
2272
477
        proto_tree_add_uint(subtree, hf_gsm_a_rr_single_channel_arfcn, tvb, curr_offset, 2, arfcn);
2273
477
    }
2274
2275
800
    curr_offset = curr_offset + 2;
2276
2277
800
    return curr_offset - offset;
2278
800
}
2279
/*
2280
 * [3] 10.5.2.5a Channel Description 2
2281
 */
2282
static uint16_t
2283
de_rr_ch_dsc2(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2284
966
{
2285
966
    uint32_t     curr_offset;
2286
966
    uint8_t      oct8,subchannel;
2287
966
    uint16_t     arfcn, hsn, maio;
2288
966
    int hf_subchannel;
2289
2290
966
    curr_offset = offset;
2291
2292
    /* Octet 2 */
2293
966
    oct8 = tvb_get_uint8(tvb, curr_offset);
2294
2295
966
    if ((oct8 & 0xf8) == 0x0)
2296
132
    {
2297
132
        proto_tree_add_item(subtree, hf_gsm_a_rr_tch_facch_sacchm, tvb, curr_offset, 1, ENC_NA);
2298
132
    }
2299
834
    else if ((oct8 & 0xf8) == 0x08)
2300
40
    {
2301
40
        proto_tree_add_item(subtree, hf_gsm_a_rr_tch_facch_sacchf, tvb, curr_offset, 1, ENC_NA);
2302
40
    }
2303
794
    else if ((oct8 & 0xf8) == 0xf0)
2304
10
    {
2305
10
        proto_tree_add_item(subtree, hf_gsm_a_rr_tch_facch_sacchm_bi, tvb, curr_offset, 1, ENC_NA);
2306
10
    }
2307
784
    else
2308
784
    {
2309
784
        if ((oct8 & 0xf0) == 0x10)
2310
291
        {
2311
291
            hf_subchannel = hf_gsm_a_rr_tch_acch;
2312
291
            subchannel = ((oct8 & 0x08)>>3);
2313
291
        }
2314
493
        else if ((oct8 & 0xe0) == 0x20)
2315
140
        {
2316
140
            hf_subchannel = hf_gsm_a_rr_sdcch4_sdcchc4_cbch;
2317
140
            subchannel = ((oct8 & 0x18)>>3);
2318
140
        }
2319
353
        else if ((oct8 & 0xc0) == 0x40)
2320
81
        {
2321
81
            hf_subchannel = hf_gsm_a_rr_sdcch8_sdcchc8_cbch;
2322
81
            subchannel = ((oct8 % 0x38)>>3);
2323
81
        }
2324
272
        else if ((oct8 & 0xc0) == 0x80)
2325
119
        {
2326
119
            hf_subchannel = hf_gsm_a_rr_tch_facchf_sacchm_bi;
2327
119
            subchannel = ((oct8 % 0x38)>>3);
2328
119
        }
2329
153
        else if ((oct8 & 0xe0) == 0xc0)
2330
107
        {
2331
107
            hf_subchannel = hf_gsm_a_rr_tch_facchf_sacchm_uni;
2332
107
            subchannel = ((oct8 % 0x38)>>3);
2333
107
        } else {
2334
46
            hf_subchannel = hf_gsm_a_rr_unknown_channel_info;
2335
46
            subchannel = oct8;
2336
46
        }
2337
784
        proto_tree_add_item(subtree, hf_subchannel, tvb, curr_offset, 1, ENC_NA);
2338
784
        proto_tree_add_uint(subtree, hf_gsm_a_rr_subchannel, tvb, curr_offset, 1, subchannel);
2339
784
    }
2340
2341
966
    proto_tree_add_item(subtree, hf_gsm_a_rr_timeslot, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2342
2343
966
    curr_offset +=1;
2344
2345
    /* Octet 3 */
2346
966
    oct8 = tvb_get_uint8(tvb, curr_offset);
2347
966
    proto_tree_add_item(subtree, hf_gsm_a_rr_training_sequence, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2348
2349
966
    proto_tree_add_item(subtree, hf_gsm_a_rr_hopping_channel, tvb, curr_offset, 1, ENC_NA);
2350
966
    if ((oct8 & 0x10) == 0x10)
2351
513
    {
2352
        /* Hopping sequence */
2353
513
        maio = ((oct8 & 0x0f)<<2) | ((tvb_get_uint8(tvb,curr_offset+1) & 0xc0) >> 6);
2354
513
        hsn = (tvb_get_uint8(tvb,curr_offset+1) & 0x3f);
2355
2356
513
        proto_tree_add_uint(subtree, hf_gsm_a_rr_hopping_channel_maio, tvb, curr_offset, 2, maio);
2357
513
        proto_tree_add_uint(subtree, hf_gsm_a_rr_hsn, tvb, curr_offset, 2, hsn);
2358
513
    }
2359
453
    else
2360
453
    {
2361
        /* single ARFCN */
2362
453
        arfcn = ((oct8 & 0x03) << 8) | tvb_get_uint8(tvb,curr_offset+1);
2363
2364
453
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_spare, tvb, (curr_offset<<3)+4, 2, ENC_NA);
2365
453
        proto_tree_add_uint(subtree, hf_gsm_a_rr_single_channel_arfcn, tvb, curr_offset, 2, arfcn);
2366
453
    }
2367
2368
966
    curr_offset = curr_offset + 2;
2369
2370
966
    return curr_offset - offset;
2371
966
}
2372
2373
/*
2374
 * [3] 10.5.2.5c Channel Description 3
2375
 */
2376
static uint16_t
2377
de_rr_ch_dsc3(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2378
4
{
2379
4
    uint32_t     curr_offset;
2380
4
    uint8_t      oct8;
2381
4
    uint16_t     arfcn, hsn, maio;
2382
2383
4
    curr_offset = offset;
2384
2385
    /* Octet 2 */
2386
4
    oct8 = tvb_get_uint8(tvb, curr_offset);
2387
4
    proto_tree_add_item(subtree, hf_gsm_a_rr_training_sequence, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2388
2389
4
    proto_tree_add_item(subtree, hf_gsm_a_rr_hopping_channel, tvb, curr_offset, 1, ENC_NA);
2390
4
    if ((oct8 & 0x10) == 0x10)
2391
1
    {
2392
        /* Hopping sequence */
2393
1
        maio = ((oct8 & 0x0f)<<2) | ((tvb_get_uint8(tvb,curr_offset+1) & 0xc0) >> 6);
2394
1
        hsn = (tvb_get_uint8(tvb,curr_offset+1) & 0x3f);
2395
2396
1
        proto_tree_add_uint(subtree, hf_gsm_a_rr_hopping_channel_maio, tvb, curr_offset, 2, maio);
2397
1
        proto_tree_add_uint(subtree, hf_gsm_a_rr_hsn, tvb, curr_offset, 2, hsn);
2398
1
    }
2399
3
    else
2400
3
    {
2401
        /* single ARFCN */
2402
3
        arfcn = ((oct8 & 0x03) << 8) | tvb_get_uint8(tvb,curr_offset+1);
2403
2404
3
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_spare, tvb, (curr_offset<<3)+4, 2, ENC_NA);
2405
3
        proto_tree_add_uint(subtree, hf_gsm_a_rr_single_channel_arfcn, tvb, curr_offset, 2, arfcn);
2406
3
    }
2407
2408
4
    curr_offset = curr_offset + 2;
2409
2410
4
    return curr_offset - offset;
2411
4
}
2412
2413
/*
2414
 * [3] 10.5.2.6 Channel Mode
2415
 */
2416
/* Channel Mode  */
2417
static const value_string gsm_a_rr_channel_mode_vals[] = {
2418
    { 0x00, "signalling only"},
2419
    { 0x01, "speech full rate or half rate version 1 (GSM FR or GSM HR)"},
2420
    { 0xc1, "speech full rate or half rate version 1 (GSM FR or GSM HR) in VAMOS mode" },
2421
    { 0x21, "speech full rate or half rate version 2 (GSM EFR)"},
2422
    { 0xC2, "speech full rate or half rate version 2 (GSM EFR) in VAMOS mode"},
2423
    { 0x41, "speech full rate or half rate version 3 (FR AMR or HR AMR)"},
2424
    { 0xc3, "speech full rate or half rate version 3 (FR AMR or HR AMR) in VAMOS mode"},
2425
    { 0x81, "speech full rate or half rate version 4 (OFR AMR-WB or OHR AMR-WB)"},
2426
    { 0x82, "speech full rate or half rate version 5 (FR AMR-WB )"},
2427
    { 0xc5, "speech full rate or half rate version 5 (FR AMR-WB ) in VAMOS mode"},
2428
    { 0x83, "speech full rate or half rate version 6 (OHR AMR )"},
2429
    { 0x61, "data, 43.5 kbit/s (downlink)+14.5 kbps (uplink)"},
2430
    { 0x62, "data, 29.0 kbit/s (downlink)+14.5 kbps (uplink)"},
2431
    { 0x64, "data, 43.5 kbit/s (downlink)+29.0 kbps (uplink)"},
2432
    { 0x67, "data, 14.5 kbit/s (downlink)+43.5 kbps (uplink)"},
2433
    { 0x65, "data, 14.5 kbit/s (downlink)+29.0 kbps (uplink)"},
2434
    { 0x66, "data, 29.0 kbit/s (downlink)+43.5 kbps (uplink)"},
2435
    { 0x27, "data, 43.5 kbit/s radio interface rate"},
2436
    { 0x63, "data, 32.0 kbit/s radio interface rate"},
2437
    { 0x43, "data, 29.0 kbit/s radio interface rate"},
2438
    { 0x0f, "data, 14.5 kbit/s radio interface rate"},
2439
    { 0x03, "data, 12.0 kbit/s radio interface rate"},
2440
    { 0x0b, "data, 6.0 kbit/s radio interface rate"},
2441
    { 0x13, "data, 3.6 kbit/s radio interface rate"},
2442
    { 0x10, "data, 64.0 kbit/s Transparent Data Bearer"},
2443
    {    0, NULL }
2444
};
2445
2446
uint16_t
2447
de_rr_ch_mode(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2448
634
{
2449
634
    uint32_t curr_offset;
2450
2451
634
    curr_offset = offset;
2452
2453
634
    proto_tree_add_item(tree, hf_gsm_a_rr_channel_mode, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2454
2455
634
    curr_offset = curr_offset + 1;
2456
2457
634
    return curr_offset - offset;
2458
634
}
2459
/*
2460
 * [3] 10.5.2.7 Channel Mode 2
2461
 */
2462
2463
static const value_string gsm_a_rr_channel_mode2_vals[] = {
2464
    { 0x00, "signalling only"},
2465
    { 0x05, "speech half rate version 1(GSM HR)"},
2466
    { 0x25, "speech half rate version 2(GSM EFR)"},
2467
    { 0x45, "speech half rate version 3(HR AMR)"},
2468
    { 0x85, "speech half rate version 4(OHR AMR-WB)"},
2469
    { 0x06, "speech half rate version 6(OHR AMR )"},
2470
    { 0x0f, "data, 6.0 kbit/s radio interface rate"},
2471
    { 0x17, "data, 3.6 kbit/s radio interface rate"},
2472
    {    0, NULL }
2473
};
2474
2475
static uint16_t
2476
de_rr_ch_mode2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2477
6
{
2478
6
    uint32_t curr_offset;
2479
2480
6
    curr_offset = offset;
2481
2482
6
    proto_tree_add_item(tree, hf_gsm_a_rr_channel_mode2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2483
2484
6
    curr_offset = curr_offset + 1;
2485
2486
6
    return curr_offset - offset;
2487
6
}
2488
/*
2489
 * [3] 10.5.2.7a UTRAN Classmark information element
2490
 */
2491
static uint16_t
2492
de_rr_utran_cm(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
2493
170
{
2494
170
    uint32_t  curr_offset;
2495
170
    tvbuff_t *rrc_irat_ho_info_tvb;
2496
2497
170
    curr_offset = offset;
2498
170
    if (len)
2499
170
    {
2500
170
        rrc_irat_ho_info_tvb = tvb_new_subset_length(tvb, curr_offset, len);
2501
170
        if (rrc_irat_ho_info_handle)
2502
170
            call_dissector(rrc_irat_ho_info_handle, rrc_irat_ho_info_tvb, pinfo, tree);
2503
170
    }
2504
2505
170
    curr_offset += len;
2506
170
    return curr_offset - offset;
2507
170
}
2508
2509
/*
2510
 * [3] 10.5.2.7b (void)
2511
 */
2512
2513
/*
2514
 * [3] 10.5.2.7c Classmark Enquiry Mask
2515
 * Bit 8:
2516
 * 0    CLASSMARK CHANGE message is requested
2517
 * 1    CLASSMARK CHANGE message is not requested
2518
 * Bits 7-5 . 5
2519
 * 000  UTRAN CLASSMARK CHANGE message including status on predefined configurations (i.e. Sequence Description) is requested
2520
 * 111  UTRAN CLASSMARK CHANGE message including status on predefined configurations (i.e. Sequence Description) is not requested.
2521
 * All other values shall not be sent. If received, they shall be interpreted as '000'.
2522
 * Bit 4:
2523
 * 0    CDMA2000 CLASSMARK CHANGE message requested
2524
 * 1    CDMA2000 CLASSMARK CHANGE message not requested.
2525
 * Bit 3:
2526
 * 0    GERAN IU MODE CLASSMARK CHANGE message requested
2527
 * 1    GERAN IU MODE CLASSMARK CHANGE message not requested.
2528
 * Bits 2 - 1: spare(0).
2529
 */
2530
static const true_false_string gsm_a_msg_req_value  = {
2531
    "message is not requested",
2532
    "message is requested"
2533
};
2534
2535
static const value_string gsm_a_rr_utran_cm_cng_msg_req_vals[] = {
2536
    { 0x0, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
2537
    { 0x1, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
2538
    { 0x2, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
2539
    { 0x3, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
2540
    { 0x4, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
2541
    { 0x5, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
2542
    { 0x6, "message including status on predefined configurations (i.e. Sequence Description) is requested"},
2543
    { 0x7, "message including status on predefined configurations (i.e. Sequence Description) is not requested."},
2544
    {   0, NULL }
2545
};
2546
uint16_t
2547
de_rr_cm_enq_mask(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2548
67
{
2549
67
    uint32_t curr_offset;
2550
2551
67
    curr_offset = offset;
2552
2553
67
    proto_tree_add_item(tree, hf_gsm_a_rr_cm_cng_msg_req, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2554
67
    proto_tree_add_item(tree, hf_gsm_a_rr_utran_cm_cng_msg_req, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2555
67
    proto_tree_add_item(tree, hf_gsm_a_rr_cdma2000_cm_cng_msg_req, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2556
67
    proto_tree_add_item(tree, hf_gsm_a_rr_geran_iu_cm_cng_msg_req, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2557
2558
67
    curr_offset = curr_offset + 1;
2559
2560
67
    return curr_offset - offset;
2561
67
}
2562
/*
2563
 * [3] 10.5.2.8 Channel Needed
2564
 */
2565
static const value_string gsm_a_rr_channel_needed_vals[] = {
2566
    { 0x00, "Any channel"},
2567
    { 0x01, "SDCCH"},
2568
    { 0x02, "TCH/F (Full rate)"},
2569
    { 0x03, "TCH/H or TCH/F (Dual rate)"},
2570
    {    0, NULL }
2571
};
2572
uint16_t
2573
de_rr_chnl_needed(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2574
718
{
2575
718
    uint32_t curr_offset;
2576
718
    int     bit_offset;
2577
2578
718
    curr_offset = offset;
2579
718
    if (RIGHT_NIBBLE == len)
2580
0
        bit_offset = 4;
2581
718
    else
2582
718
        bit_offset = 0;
2583
2584
718
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_chnl_needed_ch1, tvb, (curr_offset<<3)+bit_offset+2, 2, ENC_BIG_ENDIAN);
2585
718
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_chnl_needed_ch2, tvb, (curr_offset<<3)+bit_offset, 2, ENC_BIG_ENDIAN);
2586
2587
718
    curr_offset = curr_offset + 1;
2588
2589
718
    return curr_offset - offset;
2590
718
}
2591
/*
2592
 * [3] 10.5.2.8a Channel Request Description
2593
 */
2594
2595
 /*
2596
 * [3] 10.5.2.8b Channel Request Description 2
2597
 */
2598
static const value_string gsm_a_rr_pkt_estab_cause_vals[] = {
2599
    { 0x00, "User Data"},
2600
    { 0x01, "Page Response"},
2601
    { 0x02, "Cell Update"},
2602
    { 0x03, "Mobility Management procedure"},
2603
    {    0, NULL }
2604
};
2605
static const value_string gsm_a_rr_radio_priority_vals[] = {
2606
    { 0x00, "1"},
2607
    { 0x01, "2"},
2608
    { 0x02, "3"},
2609
    { 0x03, "4"},
2610
    {    0, NULL }
2611
};
2612
static const true_false_string gsm_a_rr_llc_pdu_type_value = {
2613
    "LLC PDU is not SACK or ACK",
2614
    "LLC PDU is SACK or ACK"
2615
};
2616
static const true_false_string gsm_a_rr_reduced_latency_cap_value = {
2617
    "The mobile station supports Reduced TTI configurations and Fast Ack/Nack Reporting",
2618
    "The mobile station does not support Reduced TTI configurations and Fast Ack/Nack Reporting"
2619
};
2620
static const value_string gsm_a_rr_egprs2_vals[] = {
2621
    { 0x00, "The mobile station does not support either EGPRS2-A or EGPRS2-B"},
2622
    { 0x01, "The mobile station supports EGPRS2-A"},
2623
    { 0x02, "The mobile station supports both EGPRS2-A and EGPRS2-B"},
2624
    {    0, NULL }
2625
};
2626
static uint16_t
2627
de_rr_chnl_req_desc2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
2628
90
{
2629
90
    uint32_t bit_offset = offset << 3;
2630
2631
90
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_pkt_estab_cause, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2632
90
    bit_offset += 2;
2633
90
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_peak_throughput_class, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
2634
90
    bit_offset += 4;
2635
90
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_radio_priority, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2636
90
    bit_offset += 2;
2637
90
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_rlc_mode, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2638
90
    bit_offset += 1;
2639
90
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_llc_pdu_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2640
90
    bit_offset += 1;
2641
90
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_rlc_octet_count, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
2642
90
    bit_offset += 16;
2643
90
    if (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_pfi_present)) {
2644
26
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_pfi, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
2645
26
        bit_offset += 7;
2646
26
    }
2647
90
    (void) gsm_rr_csn_HL_flag(tvb, tree, 0, bit_offset++, hf_gsm_a_rr_multiple_tbf_procedures);
2648
90
    bit_offset += 1;
2649
90
    if (gsm_rr_csn_HL_flag(tvb, tree, (offset+len)<<3, bit_offset++, hf_gsm_a_rr_additions_in_rel_7)) {
2650
22
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_rlc_non_pers_mode_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2651
22
        bit_offset += 1;
2652
22
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_reduced_latency_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2653
22
        bit_offset += 1;
2654
22
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_ul_egprs2, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2655
22
        bit_offset += 2;
2656
22
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_dl_egprs2, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2657
22
        bit_offset += 2;
2658
22
        if (gsm_rr_csn_HL_flag(tvb, tree, (offset+len)<<3, bit_offset++, hf_gsm_a_rr_additions_in_rel_9)) {
2659
4
            proto_tree_add_bits_item(tree, hf_gsm_a_rr_emst_ms_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2660
            /*bit_offset += 1;*/
2661
4
        }
2662
22
    }
2663
2664
90
    return len;
2665
90
}
2666
2667
/*
2668
 * [3] 10.5.2.9 Cipher Mode Setting
2669
 */
2670
/* SC (octet 1) */
2671
static const value_string gsm_a_rr_sc_vals[] = {
2672
    { 0, "No ciphering"},
2673
    { 1, "Start ciphering"},
2674
    { 0, NULL }
2675
};
2676
/* algorithm identifier
2677
 * If SC=1 then:
2678
 * bits
2679
 * 4 3 2
2680
 */
2681
uint16_t
2682
de_rr_cip_mode_set(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
2683
234
{
2684
234
    uint32_t curr_offset;
2685
234
    int     bit_offset;
2686
234
    uint64_t value;
2687
2688
234
    curr_offset = offset;
2689
2690
    /* Cipher Mode Setting
2691
     * Note: The coding of fields SC and algorithm identifier is defined in [44.018]
2692
     * as part of the Cipher Mode Setting IE.
2693
     */
2694
234
    if (RIGHT_NIBBLE == len)
2695
159
        bit_offset = 4;
2696
75
    else
2697
75
        bit_offset = 0;
2698
2699
234
    proto_tree_add_bits_ret_val(tree, hf_gsm_a_rr_sc, tvb, (curr_offset<<3)+bit_offset+3, 1, &value, ENC_BIG_ENDIAN);
2700
234
    if (value == 1){ /* Start ciphering */
2701
        /* algorithm identifier */
2702
143
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_algorithm_id, tvb, (curr_offset<<3)+bit_offset, 3, ENC_BIG_ENDIAN);
2703
143
    }
2704
234
    curr_offset = curr_offset + 1;
2705
2706
234
    return curr_offset - offset;
2707
234
}
2708
/*
2709
 * [3] 10.5.2.10 Cipher Response
2710
 */
2711
/* CR (octet 1) */
2712
static const value_string gsm_a_rr_cr_vals[] = {
2713
    { 0, "IMEISV shall not be included"},
2714
    { 1, "IMEISV shall be included"},
2715
    { 0, NULL }
2716
};
2717
2718
static uint16_t
2719
de_rr_cip_mode_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
2720
134
{
2721
134
    uint32_t curr_offset;
2722
134
    int     bit_offset;
2723
2724
134
    curr_offset = offset;
2725
134
    if (RIGHT_NIBBLE == len)
2726
0
        bit_offset = 4;
2727
134
    else
2728
134
        bit_offset = 0;
2729
2730
    /* Cipher Mode Response
2731
     * Note: The coding of field CR is defined in [44.018]
2732
     * as part of the Cipher Mode Response IE.
2733
     */
2734
134
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_cr, tvb, (curr_offset<<3)+bit_offset+3, 1, ENC_BIG_ENDIAN);
2735
134
    curr_offset = curr_offset + 1;
2736
2737
134
    return curr_offset - offset;
2738
134
}
2739
/* [3] 10.5.2.11 Control Channel Description */
2740
2741
static const value_string gsm_a_rr_mscr_vals[] = {
2742
    { 0, "MSC is Release '98 or older"},
2743
    { 1, "MSC is Release '99 onwards"},
2744
    { 0, NULL }
2745
};
2746
2747
static const value_string gsm_a_rr_att_vals[] = {
2748
    { 0, "MSs in the cell are not allowed to apply IMSI attach and detach procedure"},
2749
    { 1, "MSs in the cell shall apply IMSI attach and detach procedure"},
2750
    { 0, NULL }
2751
};
2752
2753
static const value_string gsm_a_rr_ccch_conf_vals[] = {
2754
    { 0, "1 basic physical channel used for CCCH, not combined with SDCCHs"},
2755
    { 1, "1 basic physical channel used for CCCH, combined with SDCCHs"},
2756
    { 2, "2 basic physical channels used for CCCH, not combined with SDCCHs"},
2757
    { 3, "Reserved"},
2758
    { 4, "3 basic physical channels used for CCCH, not combined with SDCCHs"},
2759
    { 5, "Reserved"},
2760
    { 6, "4 basic physical channels used for CCCH, not combined with SDCCHs"},
2761
    { 7, "Reserved"},
2762
    { 0, NULL }
2763
};
2764
2765
static const value_string gsm_a_rr_cbq3_vals[] = {
2766
    { 0, "Iu mode not supported"},
2767
    { 1, "Iu mode capable MSs barred"},
2768
    { 2, "Iu mode supported, cell not barred"},
2769
    { 3, "Iu mode supported, cell not barred. The network shall not use this value"},
2770
    { 0, NULL }
2771
};
2772
2773
static uint16_t
2774
de_rr_ctrl_ch_desc(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2775
179
{
2776
179
    uint8_t oct;
2777
179
    uint32_t curr_offset;
2778
2779
179
    curr_offset = offset;
2780
2781
179
    proto_tree_add_item(subtree, hf_gsm_a_rr_mscr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2782
179
    proto_tree_add_item(subtree, hf_gsm_a_rr_att, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2783
179
    proto_tree_add_item(subtree, hf_gsm_a_rr_bs_ag_blks_res, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2784
179
    proto_tree_add_item(subtree, hf_gsm_a_rr_ccch_conf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2785
2786
179
    curr_offset = curr_offset + 1;
2787
179
    oct = tvb_get_uint8(tvb, curr_offset);
2788
2789
179
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_cbq3, tvb, (curr_offset<<3)+1, 2, ENC_BIG_ENDIAN);
2790
179
    proto_tree_add_uint(subtree, hf_gsm_a_rr_bs_pa_mfrms, tvb, curr_offset, 1, (oct&0x07)+2);
2791
2792
179
    curr_offset = curr_offset + 1;
2793
2794
179
    proto_tree_add_item(subtree, hf_gsm_a_rr_t3212, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2795
2796
179
    curr_offset = curr_offset + 1;
2797
2798
179
    return curr_offset - offset;
2799
179
}
2800
2801
/* [3] 10.5.2.11a  DTM Information Details
2802
 */
2803
static const true_false_string tfs_supported_not_supported_by_cell = { "Supported by cell", "Not supported by cell" };
2804
2805
static uint16_t
2806
de_rr_dtm_info_details(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
2807
85
{
2808
85
    uint32_t bit_offset = offset << 3;
2809
2810
85
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_max_lapdm, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
2811
85
    bit_offset += 3;
2812
85
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_gprs_ms_txpwr_max_ccch, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
2813
85
    bit_offset += 5;
2814
85
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_cell_id, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
2815
85
    bit_offset += 16;
2816
85
    if (gsm_rr_csn_HL_flag(tvb, tree, (offset+len)<<3, bit_offset++, hf_gsm_a_rr_additions_in_rel_6)) {
2817
24
        if (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_msms_procedures)) {
2818
10
            proto_tree_add_bits_item(tree, hf_gsm_a_rr_dedicated_mode_mbms_notification_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2819
10
            bit_offset += 1;
2820
10
            proto_tree_add_bits_item(tree, hf_gsm_a_rr_mnci_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2821
            /*bit_offset += 1;*/
2822
10
        }
2823
24
    }
2824
2825
85
    return len;
2826
85
}
2827
2828
/*
2829
 * [3] 10.5.2.11b  Dynamic ARFCN Mapping
2830
 */
2831
static const value_string gsm_a_rr_gsm_band_vals[] = {
2832
    {  0, "GSM 750"},
2833
    {  1, "DCS 1800"},
2834
    {  2, "PCS 1900"},
2835
    {  3, "GSM T 380"},
2836
    {  4, "GSM T 410"},
2837
    {  5, "GSM T 900"},
2838
    {  6, "GSM 710"},
2839
    {  7, "GSM T 810"},
2840
    {  8, "Reserved"},
2841
    {  9, "Reserved"},
2842
    { 10, "Reserved"},
2843
    { 11, "Reserved"},
2844
    { 12, "Reserved"},
2845
    { 13, "Reserved"},
2846
    { 14, "Reserved"},
2847
    { 15, "Reserved"},
2848
    {  0, NULL }
2849
};
2850
2851
2852
static uint16_t
2853
de_rr_dyn_arfcn_map(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
2854
1
{
2855
1
    unsigned bit_offset;
2856
2857
1
    bit_offset = offset << 3;
2858
2859
1
    while (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_repeat_dynamic_arfcn_mapping))
2860
0
    {
2861
0
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_gsm_band, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
2862
0
        bit_offset += 4;
2863
0
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_arfcn_first, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
2864
0
        bit_offset += 10;
2865
0
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_band_offset, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
2866
0
        bit_offset += 10;
2867
0
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_arfcn_range, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
2868
0
        bit_offset += 7;
2869
0
    }
2870
2871
1
    if (((bit_offset + 7) >> 3) > (offset + len))
2872
0
    {
2873
0
       expert_add_info(pinfo, proto_tree_get_parent(tree), &ei_gsm_a_rr_ie_overrun);
2874
0
    }
2875
1
    else if ((bit_offset >> 3) < (offset + len))
2876
1
    {
2877
1
       expert_add_info(pinfo, proto_tree_get_parent(tree), &ei_gsm_a_rr_ie_underrun);
2878
1
    }
2879
1
    return len;
2880
1
}
2881
/*
2882
 * [3] 10.5.2.12 Frequency Channel Sequence
2883
 */
2884
static uint16_t
2885
de_rr_freq_ch_seq(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2886
7
{
2887
7
    uint32_t curr_offset;
2888
7
    int     bit_offset, i;
2889
2890
7
    curr_offset = offset;
2891
2892
7
    proto_tree_add_item(tree, hf_gsm_a_rr_lowest_arfcn, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2893
7
    curr_offset += 1;
2894
7
    bit_offset = curr_offset << 3;
2895
65
    for (i=0; i<16; i++)
2896
58
    {
2897
58
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_inc_skip_arfcn, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
2898
58
        bit_offset += 4;
2899
58
    }
2900
2901
7
    curr_offset = curr_offset + 8;
2902
2903
7
    return curr_offset - offset;
2904
7
}
2905
2906
/*
2907
 * [3] 10.5.2.13 Frequency List
2908
 */
2909
/*
2910
 * [3] 10.5.2.13 Frequency List
2911
 *
2912
 * Bit Bit Bit Bit Bit format notation
2913
 * 8 7  4 3 2
2914
 * 0 0  X X X bit map 0
2915
 * 1 0  0 X X 1024 range
2916
 * 1 0  1 0 0 512 range
2917
 * 1 0  1 0 1 256 range
2918
 * 1 0  1 1 0 128 range
2919
 * 1 0  1 1 1 variable bit map
2920
 */
2921
/* The mask 0xce (1100 1110) will produce the result 0110 0111*/
2922
static const value_string gsm_a_rr_freq_list_format_id_vals[] = {
2923
    { 0x00, "bit map 0"},
2924
    { 0x02, "bit map 0"},
2925
    { 0x04, "bit map 0"},
2926
    { 0x06, "bit map 0"},
2927
    { 0x08, "bit map 0"},
2928
    { 0x0a, "bit map 0"},
2929
    { 0x0c, "bit map 0"},
2930
    { 0x0e, "bit map 0"},
2931
    { 0x40, "1024 range"},
2932
    { 0x41, "1024 range"},
2933
    { 0x42, "1024 range"},
2934
    { 0x43, "1024 range"},
2935
    { 0x44, "512 range"},
2936
    { 0x45, "256 range"},
2937
    { 0x46, "128 range"},
2938
    { 0x47, "variable bit map"},
2939
    { 0x00, NULL }
2940
};
2941
2942
static uint16_t
2943
de_rr_freq_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
2944
11
{
2945
11
    return dissect_arfcn_list(tvb, tree, pinfo, offset, len, add_string, string_len);
2946
11
}
2947
/*
2948
 * [3] 10.5.2.14 Frequency Short List
2949
 *
2950
 *The Frequency Short List information element is a type 3 information element of 10 octet length.
2951
 *
2952
 * This element is encoded exactly as the Frequency List information element,
2953
 * except that it has a fixed length instead of a variable length and does
2954
 * not contain a length indicator and that it shall not be encoded in bitmap 0 format.
2955
 */
2956
2957
 static uint16_t
2958
de_rr_freq_short_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2959
16
 {
2960
16
     return dissect_arfcn_list(tvb, tree, pinfo, offset, 9, add_string, string_len);
2961
16
 }
2962
2963
/*
2964
 * [3] 10.5.2.14a Frequency Short List 2
2965
 *
2966
 * The Frequency Short List information element is a type 3 information element of 8 octet length.
2967
 *
2968
 * This element is encoded exactly as the Frequency List information element,
2969
 * except that it has a fixed length instead of a variable length and does
2970
 * not contain a length indicator and that it shall not be encoded in bitmap 0 format.
2971
 */
2972
static uint16_t
2973
de_rr_freq_short_list2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2974
0
{
2975
0
    return dissect_arfcn_list(tvb, tree, pinfo, offset, 8, add_string, string_len);
2976
0
}
2977
/*
2978
 * [3] 10.5.2.14b Group Channel Description
2979
 */
2980
2981
/*
2982
 * [3] 10.5.2.14c GPRS Resumption
2983
 */
2984
static const true_false_string gsm_a_rr_gprs_resumption_ack_value  = {
2985
    "Resumption of GPRS services successfully acknowledged",
2986
    "Resumption of GPRS services not successfully acknowledged"
2987
};
2988
2989
static uint16_t
2990
de_rr_gprs_resumption(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2991
24
{
2992
24
    uint32_t curr_offset;
2993
2994
24
    curr_offset = offset;
2995
2996
24
    proto_tree_add_item(tree, hf_gsm_a_rr_gprs_resumption_ack, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2997
24
    curr_offset += 1;
2998
2999
24
    return (curr_offset - offset);
3000
24
}
3001
3002
/*
3003
 * [3] 10.5.2.14d GPRS broadcast information
3004
 */
3005
#define GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(x) \
3006
1.56k
    {                                                \
3007
1.56k
        curr_bit_offset += x;                        \
3008
1.56k
        value -= x;                                  \
3009
1.56k
        if (value <= 0)                              \
3010
1.56k
        {                                            \
3011
66
            goto end;                                \
3012
66
        }                                            \
3013
1.56k
    }
3014
3015
static int
3016
de_rr_rest_oct_gprs_cell_options(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
3017
433
{
3018
433
    proto_tree *subtree, *subtree2;
3019
433
    proto_item *item, *item2;
3020
433
    int         curr_bit_offset, curr_bit_offset_sav;
3021
433
    int16_t     value;
3022
3023
433
    curr_bit_offset = bit_offset;
3024
3025
433
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1,
3026
433
                    ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_GPRS_CELL_OPTIONS], &item,
3027
433
                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_GPRS_CELL_OPTIONS]);
3028
433
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_nmo, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
3029
433
    curr_bit_offset += 2;
3030
433
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_t3168, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
3031
433
    curr_bit_offset += 3;
3032
433
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_t3192, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
3033
433
    curr_bit_offset += 3;
3034
433
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_drx_timer_max, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
3035
433
    curr_bit_offset += 3;
3036
433
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_access_burst_type, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3037
433
    curr_bit_offset += 1;
3038
433
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_control_ack_type, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3039
433
    curr_bit_offset += 1;
3040
433
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_bs_cv_max, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3041
433
    curr_bit_offset += 4;
3042
433
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_pan_bits_present))
3043
170
    {
3044
170
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pan_dec, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
3045
170
        curr_bit_offset += 3;
3046
170
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pan_inc, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
3047
170
        curr_bit_offset += 3;
3048
170
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pan_max, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
3049
170
        curr_bit_offset += 3;
3050
170
    }
3051
433
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_optional_extensions_present))
3052
156
    { /* Optional extension information */
3053
156
        curr_bit_offset_sav = curr_bit_offset;
3054
156
        subtree2 = proto_tree_add_subtree(subtree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_GPRS_CELL_OPTIONS_EXT_INFO], &item2,
3055
156
                                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_GPRS_CELL_OPTIONS_EXT_INFO]);
3056
156
        value = (int16_t)tvb_get_bits8(tvb,curr_bit_offset,6);
3057
156
        proto_tree_add_uint(subtree2, hf_gsm_a_rr_extension_length, tvb, curr_bit_offset>>3, 1, value);
3058
156
        curr_bit_offset += 6;
3059
156
        value += 1;
3060
156
        proto_item_set_len(item2,((curr_bit_offset+value)>>3) - (curr_bit_offset_sav>>3)+1);
3061
156
        if (gsm_rr_csn_flag(tvb, subtree2, curr_bit_offset, hf_gsm_a_rr_egprs_supported))
3062
63
        {
3063
63
            GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(1);
3064
60
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_egprs_packet_channel_request, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3065
60
            GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(1);
3066
57
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_bep_period, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3067
57
            GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(4);
3068
51
        }
3069
93
        else
3070
93
        {
3071
93
            GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(1);
3072
85
        }
3073
136
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_pfc_feature_mode, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3074
136
        GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(1);
3075
133
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_dtm_support, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3076
133
        GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(1);
3077
131
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_bss_paging_coordination, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3078
131
        GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(1);
3079
        /* Rel 4 extension */
3080
129
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_ccn_active, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3081
129
        GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(1);
3082
123
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_nw_ext_utbf, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3083
123
        GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(1);
3084
        /* Rel 6 extension */
3085
119
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_multiple_tbf_capability, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3086
119
        GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(1);
3087
114
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_ext_utbf_no_data, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3088
114
        GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(1);
3089
112
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_dtm_enhancements_capability, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3090
112
        GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(1);
3091
105
        if (gsm_rr_csn_flag(tvb, subtree2, curr_bit_offset, hf_gsm_a_rr_msms_procedures))
3092
53
        {
3093
53
            GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(1);
3094
50
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_dedicated_mode_mbms_notification_support, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3095
50
            GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(1);
3096
46
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_mnci_support, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3097
46
            GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(1);
3098
44
        }
3099
52
        else
3100
52
        {
3101
52
            GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(1);
3102
49
        }
3103
        /* Rel 7 extension */
3104
93
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_reduced_latency_access, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3105
93
        GPRS_CELL_OPTIONS_CHECK_REMAINING_EXT_LEN(1);
3106
        /* Remaining (undecoded?) extensions */
3107
90
        curr_bit_offset += value;
3108
90
    }
3109
390
    end:
3110
390
        proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
3111
3112
390
        return (curr_bit_offset - bit_offset);
3113
433
}
3114
3115
static int
3116
de_rr_rest_oct_gprs_power_control_parameters(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
3117
390
{
3118
390
    proto_tree *subtree;
3119
390
    proto_item *item;
3120
390
    int         curr_bit_offset;
3121
3122
390
    curr_bit_offset = bit_offset;
3123
3124
390
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_GPRS_POWER_CONTROL_PARAMS], &item,
3125
390
        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_GPRS_POWER_CONTROL_PARAMS]);
3126
390
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_alpha, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3127
390
    curr_bit_offset += 4;
3128
390
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_t_avg_w, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
3129
390
    curr_bit_offset += 5;
3130
390
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_t_avg_t, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
3131
390
    curr_bit_offset += 5;
3132
390
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pc_meas_chan, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3133
390
    curr_bit_offset += 1;
3134
390
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_n_avg_i, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3135
390
    curr_bit_offset += 4;
3136
390
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
3137
3138
390
    return (curr_bit_offset - bit_offset);
3139
390
}
3140
3141
static uint16_t
3142
de_rr_gprs_broadcast_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len , char *add_string _U_, int string_len _U_)
3143
219
{
3144
219
    uint32_t curr_offset;
3145
219
    int     bit_offset;
3146
3147
219
    curr_offset = offset;
3148
219
    bit_offset = curr_offset << 3;
3149
3150
219
    bit_offset += de_rr_rest_oct_gprs_cell_options(tvb, tree, bit_offset);
3151
219
    /*bit_offset += */de_rr_rest_oct_gprs_power_control_parameters(tvb, tree, bit_offset);
3152
219
    curr_offset += len;
3153
3154
219
    return (curr_offset - offset);
3155
219
}
3156
3157
/*
3158
 * [3] 10.5.2.15 Handover Reference
3159
 */
3160
static uint16_t
3161
de_rr_ho_ref(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3162
216
{
3163
216
    uint32_t curr_offset;
3164
3165
216
    curr_offset = offset;
3166
3167
    /* Handover reference value */
3168
216
    proto_tree_add_item(subtree, hf_gsm_a_rr_ho_ref_val, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3169
3170
216
    curr_offset = curr_offset + 1;
3171
3172
216
    return curr_offset - offset;
3173
216
}
3174
3175
static const value_string gsm_a_access_tech_type_vals[] = {
3176
    { 0, "GSM P"},
3177
    { 1, "GSM E --note that GSM E covers GSM P"},
3178
    { 2, "GSM R --note that GSM R covers GSM E and GSM P"},
3179
    { 3, "GSM 1800"},
3180
    { 4, "GSM 1900"},
3181
    { 5, "GSM 450"},
3182
    { 6, "GSM 480"},
3183
    { 7, "GSM 850"},
3184
    { 8, "GSM 750"},
3185
    { 9, "GSM T 380"},
3186
    { 10, "GSM T 410"},
3187
    { 11, "GSM T 900"},
3188
    { 12, "GSM 710"},
3189
    { 13, "GSM T 810"},
3190
    { 14, "reserved"},
3191
    { 15, "Indicates the presence of a list of Additional access technologies"},
3192
    { 0, NULL }
3193
};
3194
3195
3196
static const value_string gsm_a_egprs_mcs_vals[] = {
3197
    { 0, "MCS-1"},
3198
    { 1, "MCS-2"},
3199
    { 2, "MCS-3"},
3200
    { 3, "MCS-4"},
3201
    { 4, "MCS-5"},
3202
    { 5, "MCS-6"},
3203
    { 6, "MCS-7"},
3204
    { 7, "MCS-8"},
3205
    { 8, "MCS-9"},
3206
    { 9, "MCS-5-7"},
3207
    { 10, "MCS-6-9"},
3208
    { 11, "reserved"},
3209
    { 0, NULL }
3210
};
3211
3212
static const value_string gsm_a_gprs_cs_vals[] = {
3213
    { 0, "CS-1"},
3214
    { 1, "CS-2"},
3215
    { 2, "CS-3"},
3216
    { 3, "CS-4"},
3217
    { 0, NULL }
3218
};
3219
3220
3221
static const true_false_string gsm_a_tlli_block_channel_coding_vals = {
3222
    "mobile station shall use coding scheme as specified by the corresponding CHANNEL CODING COMMAND or EGPRS CHANNEL CODING COMMAND field",
3223
    "mobile station shall use CS-1 in GPRS TBF mode or MCS-1 in EGPRS TBF mode"
3224
};
3225
3226
static const true_false_string gsm_a_resegment_vals = {
3227
    "Retransmitted RLC data blocks shall be re-segmented according to commanded MCS",
3228
    "Retransmitted RLC data blocks shall not be re-segmented"
3229
};
3230
3231
static const true_false_string gsm_a_polling_vals = {
3232
    "MS shall send a PACKET CONTROL ACKNOWLEDGEMENT message in the uplink block specified by TBF Starting Time, on the assigned PDCH",
3233
    "no action is required from MS"
3234
};
3235
3236
static const true_false_string gsm_a_usf_granularity_vals = {
3237
    "the mobile station shall transmit four consecutive RLC/MAC blocks",
3238
    "the mobile station shall transmit one RLC/MAC block"
3239
};
3240
3241
static const true_false_string gsm_a_rlc_mode_vals = {
3242
    "RLC unacknowledged mode",
3243
    "RLC acknowledged mode"
3244
};
3245
3246
static const true_false_string gsm_a_ta_valid_vals = {
3247
    "the timing advance value is valid",
3248
    "the timing advance value is not valid"
3249
};
3250
3251
3252
3253
static const value_string gsm_a_egprs_windows_size_vals[] = {
3254
    { 0, "64"},
3255
    { 1, "96"},
3256
    { 2, "128"},
3257
    { 3, "160"},
3258
    { 4, "192"},
3259
    { 5, "224"},
3260
    { 6, "256"},
3261
    { 7, "288"},
3262
    { 8, "320"},
3263
    { 9, "352"},
3264
    { 10, "384"},
3265
    { 11, "416"},
3266
    { 12, "448"},
3267
    { 13, "480"},
3268
    { 14, "512"},
3269
    { 15, "544"},
3270
    { 16, "576"},
3271
    { 17, "608"},
3272
    { 18, "640"},
3273
    { 19, "672"},
3274
    { 20, "704"},
3275
    { 21, "736"},
3276
    { 22, "768"},
3277
    { 23, "800"},
3278
    { 24, "832"},
3279
    { 25, "864"},
3280
    { 26, "896"},
3281
    { 27, "928"},
3282
    { 28, "960"},
3283
    { 29, "992"},
3284
    { 30, "1024"},
3285
    { 31, "reserved"},
3286
    { 0, NULL }
3287
};
3288
3289
static void fmt_2db_units(char *label, uint32_t val)
3290
186
{
3291
186
    snprintf(label, ITEM_LABEL_LENGTH, "%u dB (%u)", val * 2, val);
3292
186
}
3293
3294
3295
static const value_string gsm_a_link_quality_meas_mode_vals[] = {
3296
    {  0, "The MS shall not report either interference measurements or per slot BEP measurements"},
3297
    {  1, "The MS shall report available interference measurements for timeslots 0 through 7"},
3298
    {  2, "The MS shall report mean BEP on each assigned time slot ... No interference measurements shall be reported..."},
3299
    {  3, "The MS shall report mean BEP on each assigned time slot ... In addition to mean BEP, the MS shall report interference measurements for no more than four time slots..."},
3300
    {  0, NULL }
3301
};
3302
3303
static const true_false_string gsm_a_rr_ul_xtti_tbf_assignment_vals = {
3304
    "An uplink BTTI TBF is assigned",
3305
    "An uplink RTTI TBF is assigned"
3306
     };
3307
3308
static const true_false_string gsm_a_rr_dl_xtti_tbf_assignment_vals = {
3309
    "An downlink BTTI TBF is assigned",
3310
    "An downlink RTTI TBF is assigned"
3311
     };
3312
3313
static const true_false_string gsm_a_rr_fanr_act_state_vals = {
3314
    "FANR is not activated for the assigned TBF",
3315
    "FANR is activated for the assigned TBF"
3316
     };
3317
3318
static const true_false_string gsm_a_rr_encoding_selection_vals = {
3319
    "SSN - based encoding is selected",
3320
    "Time - based encoding is selected"
3321
     };
3322
3323
static const true_false_string gsm_a_rr_nof_pdch_pairs_vals = {
3324
    "One PDCH Pair assigned",
3325
    "Two PDCH Pairs assigned"
3326
     };
3327
3328
static const value_string gsm_a_rr_rtti_usf_mode_vals[] = {
3329
    { 0, "BTTI USF Mode is used" },
3330
    { 1, "RTTI USF Mode is used" },
3331
    { 0, NULL }
3332
};
3333
3334
static const value_string gsm_a_rr_pdch_pair_indic_vals[] = {
3335
    { 0x0, "uplink PDCH pair: [i, i + 1] | downlink PDCH pair: [i, i + 1]" },
3336
    { 0x1, "uplink PDCH pair: [i, i + 1] | downlink PDCH pair: [i - 1, i]" },
3337
    { 0x2, "uplink PDCH pair: [i, i + 1] | downlink PDCH pair: [i - 2, i]" },
3338
    { 0x3, "uplink PDCH pair: [i, i + 2] | downlink PDCH pair: [i - 1, i]" },
3339
    { 0x4, "uplink PDCH pairs: [i, i + 1], [i + 2, i + 3] | downlink PDCH pairs: [i, i + 1], [i + 2, i + 3]" },
3340
    { 0x5, "not used" },
3341
    { 0x6, "not used" },
3342
    { 0x7, "not used" },
3343
    { 0, NULL }
3344
};
3345
3346
static const value_string gsm_a_rr_egprs_level_vals[] = {
3347
    { 0x0, "EGPRS" },
3348
    { 0x1, "EGPRS2 - A" },
3349
    { 0x2, "EGPRS2 - B" },
3350
    { 0x3, "reserved" },
3351
    { 0, NULL }
3352
};
3353
3354
static const value_string gsm_a_rr_event_based_fanr_vals[] = {
3355
    { 0, "The MS shall not use event - based FANR" },
3356
    { 1, "The MS shall use event - based FANR" },
3357
    { 0, NULL }
3358
};
3359
3360
static uint16_t
3361
de_tbf_starting_time(tvbuff_t *tvb, proto_tree *tree, uint32_t bit_offset)
3362
45
{
3363
45
    proto_item *item;
3364
45
    uint32_t    curr_bit_offset;
3365
45
    uint16_t    rfn, t;
3366
45
    uint64_t    t1, t2, t3;
3367
3368
45
    curr_bit_offset = bit_offset;
3369
3370
45
    proto_tree_add_bits_ret_val(tree, hf_gsm_a_rr_tbf_T1prim, tvb, curr_bit_offset, 5, &t1, ENC_BIG_ENDIAN);
3371
45
    curr_bit_offset += 5;
3372
45
    proto_tree_add_bits_ret_val(tree, hf_gsm_a_rr_tbf_T3, tvb, curr_bit_offset, 6, &t3, ENC_BIG_ENDIAN);
3373
45
    curr_bit_offset += 6;
3374
45
    proto_tree_add_bits_ret_val(tree, hf_gsm_a_rr_tbf_T2, tvb, curr_bit_offset, 5, &t2, ENC_BIG_ENDIAN);
3375
45
    curr_bit_offset += 5;
3376
3377
3378
    /* great care needed with signed/unsigned - -1 in unsigned is 0xffff, which mod(26) is not what you think !!! */
3379
45
    t = (26 + t3 - t2) % 26;
3380
45
    rfn = (uint16_t)((51 * t) + t3 + (51 * 26 * t1));
3381
3382
45
    item = proto_tree_add_uint(tree, hf_gsm_a_rr_tbf_starting_time, tvb, bit_offset >> 3, ((curr_bit_offset - bit_offset) >> 3) + 1, rfn);
3383
45
    proto_item_set_generated(item);
3384
45
    return curr_bit_offset - bit_offset;
3385
45
}
3386
3387
static int
3388
de_rr_ia_rest_oct_egprs_packet_uplink_assignment(tvbuff_t *tvb, proto_tree *tree, int bit_offset, unsigned bit_len)
3389
24
{
3390
24
    proto_tree *subtree;
3391
24
    proto_item *item;
3392
24
    unsigned    curr_bit_offset;
3393
3394
24
    curr_bit_offset = bit_offset;
3395
3396
24
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_EGPRS_PACKET_UPLINK_ASSIGNMENT], &item,
3397
24
        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_EGPRS_PACKET_UPLINK_ASSIGNMENT]);
3398
24
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_extended_ra, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
3399
24
    curr_bit_offset += 5;
3400
49
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_access_tech_req))
3401
25
    {
3402
25
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_access_tech_type, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3403
25
        curr_bit_offset += 4;
3404
25
    }
3405
3406
24
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_tfi_multiblock))
3407
14
    {
3408
14
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tfi_assignment, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
3409
14
        curr_bit_offset += 5;
3410
14
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_polling, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3411
14
        curr_bit_offset += 1;
3412
14
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_tfi_allocation_type))
3413
7
        {
3414
7
           int8_t bitmap_len = tvb_get_bits8(tvb, curr_bit_offset, 5);
3415
7
           int32_t bitmap;
3416
7
           proto_tree_add_uint(tree, hf_gsm_a_rr_bitmap_length, tvb, curr_bit_offset>>3, 1+((curr_bit_offset+5)>>3) - (curr_bit_offset>>3), bitmap_len);
3417
7
           curr_bit_offset += 5;
3418
7
           bitmap = tvb_get_bits32(tvb, curr_bit_offset, bitmap_len, ENC_BIG_ENDIAN);
3419
7
           proto_tree_add_uint(tree, hf_gsm_a_rr_bitmap, tvb, curr_bit_offset>>3, 1+((curr_bit_offset+bitmap_len)>>3) - (curr_bit_offset>>3), bitmap);
3420
7
           curr_bit_offset += bitmap_len;
3421
7
           if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_p0_present))
3422
4
           {
3423
4
               proto_tree_add_bits_item(subtree, hf_gsm_a_rr_p0, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3424
4
               curr_bit_offset += 4;
3425
4
               proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pr_mode, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3426
4
               curr_bit_offset += 1;
3427
4
           }
3428
7
        }
3429
7
        else
3430
7
        {
3431
7
           proto_tree_add_bits_item(subtree, hf_gsm_a_rr_usf, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
3432
7
           curr_bit_offset += 3;
3433
7
           proto_tree_add_bits_item(subtree, hf_gsm_a_rr_usf_granularity, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3434
7
           curr_bit_offset += 1;
3435
7
           if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_p0_present))
3436
1
           {
3437
1
               proto_tree_add_bits_item(subtree, hf_gsm_a_rr_p0, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3438
1
               curr_bit_offset += 4;
3439
1
               proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pr_mode, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3440
1
               curr_bit_offset += 1;
3441
1
           }
3442
7
        }
3443
3444
14
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_egprs_mcs, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3445
14
        curr_bit_offset += 4;
3446
14
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tlli_block_channel_coding, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3447
14
        curr_bit_offset += 1;
3448
14
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_bep_period2_present))
3449
6
        {
3450
6
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_bep_period2, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3451
6
            curr_bit_offset += 4;
3452
6
        }
3453
14
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_resegment, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3454
14
        curr_bit_offset += 1;
3455
14
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_egprs_window_size, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
3456
14
        curr_bit_offset += 5;
3457
14
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_alpha_present))
3458
6
        {
3459
6
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_alpha, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3460
6
            curr_bit_offset += 4;
3461
6
        }
3462
14
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_gamma, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
3463
14
        curr_bit_offset += 5;
3464
14
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_timing_adv_index_present))
3465
6
        {
3466
6
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_timing_adv_index, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3467
6
            curr_bit_offset += 4;
3468
6
        }
3469
14
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_tbf_starting_time_present))
3470
6
        {
3471
6
            curr_bit_offset += de_tbf_starting_time(tvb, subtree, curr_bit_offset);
3472
6
        }
3473
        /* Null breakpoint */
3474
14
        if (curr_bit_offset < bit_len)
3475
11
             {
3476
11
            if (gsm_rr_csn_HL_flag(tvb, subtree, 0, curr_bit_offset++, hf_gsm_a_rr_additions_in_rel_7))
3477
8
                 {
3478
8
                if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_ul_xtti_tbf_assignment))
3479
5
                     {
3480
5
                    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_fanr_act_state))
3481
5
                         {
3482
5
                        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_encoding_selection))
3483
2
                             {
3484
2
                            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_reported_timeslots, tvb, curr_bit_offset, 8, ENC_BIG_ENDIAN);
3485
2
                            curr_bit_offset += 8;
3486
2
                            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tsh, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
3487
2
                            curr_bit_offset += 2;
3488
2
                            }
3489
5
                        }
3490
5
                    }
3491
3
                else
3492
3
                     {
3493
3
                    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rtti_usf_mode, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3494
3
                    curr_bit_offset += 1;
3495
3
                    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pdch_pair_indic, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
3496
3
                    curr_bit_offset += 3;
3497
3498
3
                    if (hf_gsm_a_rr_rtti_usf_mode > 0)
3499
3
                         {
3500
3
                        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_additional_usf, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
3501
3
                        curr_bit_offset += 3;
3502
3
                        }
3503
3
                    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_nof_pdch_pairs))
3504
1
                         {
3505
1
                        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_usf_2, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
3506
1
                        curr_bit_offset += 3;
3507
3508
1
                        if (hf_gsm_a_rr_rtti_usf_mode > 0)
3509
1
                             {
3510
1
                            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_additional_usf_2, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
3511
1
                            curr_bit_offset += 3;
3512
1
                            }
3513
1
                        }
3514
3
                    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_encoding_selection))
3515
0
                         {
3516
0
                        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_reported_timeslots, tvb, curr_bit_offset, 8, ENC_BIG_ENDIAN);
3517
0
                        curr_bit_offset += 8;
3518
0
                        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tsh, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
3519
0
                        curr_bit_offset += 2;
3520
0
                        }
3521
3
                    }
3522
8
                }
3523
11
            }
3524
14
    }
3525
10
    else  /*  Multi Block Allocation */
3526
10
    {
3527
10
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_alpha_present))
3528
2
        {
3529
2
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_alpha, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3530
2
            curr_bit_offset += 4;
3531
2
        }
3532
10
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_gamma, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
3533
10
        curr_bit_offset += 5;
3534
10
        curr_bit_offset += de_tbf_starting_time(tvb, subtree, curr_bit_offset);
3535
10
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_num_of_radio_block_allocated, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
3536
10
        curr_bit_offset += 2;
3537
10
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_p0_present))
3538
4
        {
3539
4
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_p0, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3540
4
            curr_bit_offset += 4;
3541
4
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_bts_power_control_mode, tvb, curr_bit_offset++, 1, ENC_NA);
3542
4
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pr_mode, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3543
4
            curr_bit_offset += 1;
3544
4
        }
3545
3546
        /* Null breakpoint */
3547
10
        if (curr_bit_offset < bit_len)
3548
6
        {
3549
6
           if (gsm_rr_csn_HL_flag(tvb,subtree, 0,curr_bit_offset++, hf_gsm_a_rr_additions_in_rel_7))
3550
4
           {
3551
4
               if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_pfi_present))
3552
1
               {
3553
1
                   proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pfi, tvb, curr_bit_offset, 7, ENC_BIG_ENDIAN);
3554
1
                   curr_bit_offset += 7;
3555
1
               }
3556
4
           }
3557
6
        }
3558
10
    }
3559
24
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
3560
3561
24
    return (curr_bit_offset - bit_offset);
3562
24
}
3563
3564
3565
static int
3566
de_rr_ia_rest_oct_tmgi(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
3567
2
{
3568
2
    proto_tree *subtree;
3569
2
    proto_item *item;
3570
2
    int         curr_bit_offset;
3571
2
    uint16_t    value16;
3572
2
    char        mcc[4];
3573
2
    char        mnc[4];
3574
3575
2
    curr_bit_offset = bit_offset;
3576
3577
2
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_TMGI], &item,
3578
2
                                                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_TMGI]);
3579
3580
2
    if (0 == gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_mcc_mnc_parameters))   /*  without MCC and MNC parameters */
3581
1
    {
3582
1
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_mbms_service_id, tvb, curr_bit_offset, 24, ENC_BIG_ENDIAN);
3583
1
        curr_bit_offset += 24;
3584
1
    }
3585
1
    else   /* with MCC and MNC parameters */
3586
1
    {
3587
1
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_mbms_service_id, tvb, curr_bit_offset, 24, ENC_BIG_ENDIAN);
3588
1
        curr_bit_offset += 24;
3589
3590
1
        value16 = tvb_get_bits16(tvb,curr_bit_offset,12,ENC_BIG_ENDIAN);
3591
1
        mcc[0] = '0' + ((value16>>8)&0xf);
3592
1
        mcc[1] = '0' + ((value16>>4)&0xf);
3593
1
        mcc[2] = '0' + ((value16   )&0xf);
3594
1
        mcc[3] = '\0';
3595
1
        proto_tree_add_string(tree, hf_gsm_a_rr_mobile_country_code, tvb, curr_bit_offset>>3, 12, mcc);
3596
1
        curr_bit_offset += 12;
3597
3598
1
        value16 = tvb_get_bits16(tvb,curr_bit_offset,12,ENC_BIG_ENDIAN);
3599
1
        mnc[0] = '0' + ((value16>>8)&0xf);
3600
1
        mnc[1] = '0' + ((value16>>4)&0xf);
3601
1
        mnc[2] = '0' + ((value16   )&0xf);
3602
1
        mnc[3] = '\0';
3603
1
        proto_tree_add_string(tree, hf_gsm_a_rr_mobile_network_code, tvb, curr_bit_offset>>3, 12, mnc);
3604
1
        curr_bit_offset += 12;
3605
1
    }
3606
2
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
3607
3608
2
    return (curr_bit_offset - bit_offset);
3609
2
}
3610
3611
3612
3613
static int
3614
de_rr_ia_rest_oct_packet_timing_advance(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
3615
3
{
3616
3
    proto_tree *subtree;
3617
3
    proto_item *item;
3618
3
    int         curr_bit_offset;
3619
3620
3621
3
    curr_bit_offset = bit_offset;
3622
3623
3
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_PACKET_TIMING_ADVANCE], &item,
3624
3
                                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_PACKET_TIMING_ADVANCE]);
3625
3626
3
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_timing_adv_present))
3627
2
    {
3628
2
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_timing_adv, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
3629
2
        curr_bit_offset += 6;
3630
2
    }
3631
3632
3
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_timing_advance_index_timeslot))
3633
1
    {
3634
1
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_timing_adv_index, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3635
1
        curr_bit_offset += 4;
3636
1
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_timing_adv_timeslot_num, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
3637
1
        curr_bit_offset += 3;
3638
1
    }
3639
3
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
3640
3641
3
    return (curr_bit_offset - bit_offset);
3642
3
}
3643
3644
3645
3646
static int
3647
de_rr_ia_rest_oct_multiple_blocks_packet_downlink_assignment(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
3648
8
{
3649
8
    proto_tree *subtree;
3650
8
    proto_item *item;
3651
8
    int         curr_bit_offset;
3652
8
    uint8_t     value;
3653
3654
8
    curr_bit_offset = bit_offset;
3655
3656
8
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_MULTIPLE_BLOCKS_PACKET_DOWNLINK_ASSIGNMENT], &item,
3657
8
                                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_MULTIPLE_BLOCKS_PACKET_DOWNLINK_ASSIGNMENT]);
3658
3659
8
    curr_bit_offset += de_tbf_starting_time(tvb, subtree, curr_bit_offset);
3660
8
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_num_of_radio_block_allocated, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3661
8
    curr_bit_offset += 4;
3662
3663
8
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_packet_downlink_assignment))
3664
5
    {
3665
5
        if (0 == gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_mbms_assignment))
3666
2
        {/* MBMS Assignment (Distribution) */
3667
2
            curr_bit_offset += de_rr_ia_rest_oct_tmgi(tvb, tree, curr_bit_offset);
3668
2
        }
3669
3
        else   /* MBMS Assignment (Non-distribution) */
3670
3
        {
3671
3
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tlli, tvb, curr_bit_offset, 32, ENC_BIG_ENDIAN);
3672
3
            curr_bit_offset += 32;
3673
3
            if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_ms_parameters))
3674
3
            {
3675
3
                value = tvb_get_bits8(tvb,curr_bit_offset,2);
3676
3
                proto_tree_add_uint(tree, hf_gsm_a_rr_len_indicator_ms_id, tvb, curr_bit_offset>>3, 2, value);
3677
3
                curr_bit_offset += 2;
3678
3679
3
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ms_id, tvb, curr_bit_offset, value+1, ENC_BIG_ENDIAN);
3680
3
                curr_bit_offset += value+1;
3681
3
                curr_bit_offset += de_rr_ia_rest_oct_packet_timing_advance(tvb, tree, curr_bit_offset);
3682
3
                if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_alpha_present))
3683
2
                {
3684
2
                    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_alpha, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3685
2
                    curr_bit_offset += 4;
3686
2
                    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_gamma_present))
3687
0
                    {
3688
0
                        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_gamma, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
3689
0
                        curr_bit_offset += 5;
3690
0
                    }
3691
2
                }
3692
3
            }
3693
3
        }
3694
5
    }
3695
8
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
3696
3697
8
    return (curr_bit_offset - bit_offset);
3698
8
}
3699
3700
3701
3702
3703
static int
3704
de_rr_ia_rest_oct_packet_uplink_assignment(tvbuff_t *tvb, proto_tree *tree, int bit_offset, unsigned bit_len)
3705
21
{
3706
21
    proto_tree *subtree;
3707
21
    proto_item *item;
3708
21
    unsigned    curr_bit_offset;
3709
3710
21
    curr_bit_offset = bit_offset;
3711
3712
21
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_PACKET_UPLINK_ASSIGNMENT], &item,
3713
21
                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_PACKET_UPLINK_ASSIGNMENT]);
3714
3715
21
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_packet_uplink_assignment))
3716
8
    {
3717
8
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tfi_assignment, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
3718
8
        curr_bit_offset += 5;
3719
8
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_polling, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3720
8
        curr_bit_offset += 1;
3721
8
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_allocation_type))
3722
3
        {
3723
3
           int8_t bitmap_len = tvb_get_bits8(tvb, curr_bit_offset, 5);
3724
3
           int32_t bitmap;
3725
3
           proto_tree_add_uint(tree, hf_gsm_a_rr_bitmap_length, tvb, curr_bit_offset>>3, 1+((curr_bit_offset+5)>>3) - (curr_bit_offset>>3), bitmap_len);
3726
3
           curr_bit_offset += 5;
3727
3
           bitmap = tvb_get_bits32(tvb, curr_bit_offset, bitmap_len, ENC_BIG_ENDIAN);
3728
3
           proto_tree_add_uint(tree, hf_gsm_a_rr_bitmap, tvb, curr_bit_offset>>3, 1+((curr_bit_offset+bitmap_len)>>3) - (curr_bit_offset>>3), bitmap);
3729
3
           curr_bit_offset += bitmap_len;
3730
3
           if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_p0_present))
3731
2
           {
3732
2
               proto_tree_add_bits_item(subtree, hf_gsm_a_rr_p0, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3733
2
               curr_bit_offset += 4;
3734
2
               proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pr_mode, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3735
2
               curr_bit_offset += 1;
3736
2
           }
3737
3
        }
3738
5
        else
3739
5
        {
3740
5
           proto_tree_add_bits_item(subtree, hf_gsm_a_rr_usf, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
3741
5
           curr_bit_offset += 3;
3742
5
           proto_tree_add_bits_item(subtree, hf_gsm_a_rr_usf_granularity, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3743
5
           curr_bit_offset += 1;
3744
5
           if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_p0_present))
3745
3
           {
3746
3
               proto_tree_add_bits_item(subtree, hf_gsm_a_rr_p0, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3747
3
               curr_bit_offset += 4;
3748
3
               proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pr_mode, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3749
3
               curr_bit_offset += 1;
3750
3
           }
3751
5
        }
3752
8
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_gprs_cs, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
3753
8
        curr_bit_offset += 2;
3754
8
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tlli_block_channel_coding, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3755
8
        curr_bit_offset += 1;
3756
8
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_alpha_present))
3757
4
        {
3758
4
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_alpha, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3759
4
            curr_bit_offset += 4;
3760
4
        }
3761
8
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_gamma, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
3762
8
        curr_bit_offset += 5;
3763
8
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_timing_advance_index))
3764
2
        {
3765
2
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_timing_adv_index, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3766
2
            curr_bit_offset += 4;
3767
2
        }
3768
8
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_tbf_starting_time_present))
3769
4
        {
3770
4
           curr_bit_offset += de_tbf_starting_time(tvb, subtree, curr_bit_offset);
3771
4
        }
3772
8
    }
3773
13
    else  /* Single Block Allocation */
3774
13
    {
3775
13
       if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_alpha_present))
3776
7
        {
3777
7
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_alpha, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3778
7
            curr_bit_offset += 4;
3779
7
        }
3780
13
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_gamma, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
3781
13
        curr_bit_offset += 5;
3782
        /* fixed bits '01' */
3783
13
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_early_r97_version_reserved_bit, tvb, curr_bit_offset++, 1, ENC_NA);
3784
13
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_later_r97_version_reserved_bit, tvb, curr_bit_offset++, 1, ENC_NA);
3785
13
        curr_bit_offset += de_tbf_starting_time(tvb, subtree, curr_bit_offset);
3786
13
        if (gsm_rr_csn_HL_flag(tvb,subtree, 0,curr_bit_offset++, hf_gsm_a_rr_p0_present))
3787
5
        {
3788
5
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_p0, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3789
5
            curr_bit_offset += 4;
3790
            /* The value '1' was allocated in an earlier version of the protocol and shall not be used */
3791
5
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_earlier_version_reserved_bit, tvb, curr_bit_offset++, 1, ENC_NA);
3792
5
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pr_mode, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3793
5
            curr_bit_offset += 1;
3794
5
        }
3795
13
    }
3796
3797
    /* Null breakpoint */
3798
21
    if (curr_bit_offset < bit_len)
3799
17
    {
3800
17
       if (gsm_rr_csn_HL_flag(tvb,subtree, 0,curr_bit_offset++, hf_gsm_a_rr_additions_in_r99))
3801
12
       {
3802
12
           if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_extended_ra_present))
3803
4
           {
3804
4
               proto_tree_add_bits_item(subtree, hf_gsm_a_rr_extended_ra, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
3805
4
               curr_bit_offset += 5;
3806
4
           }
3807
12
       }
3808
17
    }
3809
3810
    /* Null breakpoint */
3811
21
    if (curr_bit_offset < bit_len)
3812
17
    {
3813
17
       if (gsm_rr_csn_HL_flag(tvb,subtree, 0,curr_bit_offset++, hf_gsm_a_rr_additions_in_rel_6))
3814
9
       {
3815
9
           if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_pfi_present))
3816
5
           {
3817
5
               proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pfi, tvb, curr_bit_offset, 7, ENC_BIG_ENDIAN);
3818
5
               curr_bit_offset += 7;
3819
5
           }
3820
9
       }
3821
17
    }
3822
21
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
3823
3824
21
    return (curr_bit_offset - bit_offset);
3825
21
}
3826
3827
3828
static int
3829
de_rr_ia_rest_oct_packet_downlink_assignment(tvbuff_t *tvb, proto_tree *tree, unsigned bit_offset, unsigned bit_len)
3830
14
{
3831
14
    proto_tree *subtree;
3832
14
    proto_item *item;
3833
14
    unsigned    curr_bit_offset;
3834
3835
14
    curr_bit_offset = bit_offset;
3836
3837
14
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_PACKET_DOWNLINK_ASSIGNMENT], &item,
3838
14
                                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_PACKET_DOWNLINK_ASSIGNMENT]);
3839
3840
14
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tlli, tvb, curr_bit_offset, 32, ENC_BIG_ENDIAN);
3841
14
    curr_bit_offset += 32;
3842
3843
14
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_tfi_assignment_present))
3844
6
    {
3845
6
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tfi_assignment, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
3846
6
        curr_bit_offset += 5;
3847
6
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rlc_mode, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3848
6
        curr_bit_offset += 1;
3849
6
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_alpha_present))
3850
2
        {
3851
2
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_alpha, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3852
2
            curr_bit_offset += 4;
3853
2
        }
3854
6
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_gamma, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
3855
6
        curr_bit_offset += 5;
3856
6
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_polling, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3857
6
        curr_bit_offset += 1;
3858
6
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ta_valid, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3859
6
        curr_bit_offset += 1;
3860
6
    }
3861
14
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_timing_advance_index))
3862
5
    {
3863
5
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_timing_adv_index, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3864
5
        curr_bit_offset += 4;
3865
5
    }
3866
14
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_tbf_starting_time_present))
3867
4
    {
3868
4
       curr_bit_offset += de_tbf_starting_time(tvb, subtree, curr_bit_offset);
3869
4
    }
3870
14
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_p0_present))
3871
6
    {
3872
6
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_p0, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3873
6
        curr_bit_offset += 4;
3874
6
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pr_mode_present, tvb, curr_bit_offset++, 1, ENC_NA);
3875
6
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pr_mode, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3876
6
        curr_bit_offset += 1;
3877
6
    }
3878
3879
    /* Null breakpoint */
3880
14
    if (curr_bit_offset < bit_len)
3881
10
    {
3882
10
       if (gsm_rr_csn_HL_flag(tvb,subtree, 0,curr_bit_offset++, hf_gsm_a_rr_additions_in_r99))
3883
5
       {
3884
5
           proto_tree_add_bits_item(subtree, hf_gsm_a_rr_egprs_window_size, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
3885
5
           curr_bit_offset += 5;
3886
5
           proto_tree_add_bits_item(subtree, hf_gsm_a_rr_link_quality_meas_mode, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
3887
5
           curr_bit_offset += 2;
3888
5
           if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_bep_period2_present))
3889
1
           {
3890
1
               proto_tree_add_bits_item(subtree, hf_gsm_a_rr_bep_period2, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
3891
1
               curr_bit_offset += 4;
3892
1
           }
3893
5
       }
3894
10
    }
3895
3896
    /* Null breakpoint */
3897
14
    if (curr_bit_offset < bit_len)
3898
10
    {
3899
10
       if (gsm_rr_csn_HL_flag(tvb,subtree, 0, curr_bit_offset++, hf_gsm_a_rr_additions_in_rel_6))
3900
7
       {
3901
7
           if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_pfi_present))
3902
4
           {
3903
4
               proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pfi, tvb, curr_bit_offset, 7, ENC_BIG_ENDIAN);
3904
4
               curr_bit_offset += 7;
3905
4
           }
3906
7
       }
3907
10
    }
3908
3909
    /* Null breakpoint */
3910
14
    if (curr_bit_offset < bit_len)
3911
10
    {
3912
10
        if (gsm_rr_csn_HL_flag(tvb, subtree, 0, curr_bit_offset++, hf_gsm_a_rr_additions_in_rel_7))
3913
4
        {
3914
3915
4
            if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_npm_transfer_time_present))
3916
1
            {
3917
1
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_npm_transfer_time, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
3918
1
                curr_bit_offset += 5;
3919
1
            }
3920
3921
4
            if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_dl_xtti_tbf_assignment))
3922
3
            {
3923
3
                if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_fanr_act_state))
3924
2
                {
3925
2
                    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_event_based_fanr, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3926
2
                    curr_bit_offset += 1;
3927
2
                }
3928
3
            }
3929
1
            else
3930
1
            {
3931
1
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_event_based_fanr, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
3932
1
                curr_bit_offset += 1;
3933
1
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pdch_pair_indic, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
3934
1
                curr_bit_offset += 3;
3935
1
            }
3936
3937
4
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_dl_egprs_level, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
3938
4
            curr_bit_offset += 2;
3939
4
        }
3940
10
    }
3941
3942
14
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
3943
3944
14
    return (curr_bit_offset - bit_offset);
3945
14
}
3946
3947
static int
3948
de_rr_ia_rest_oct_second_part_packet_assignment(tvbuff_t *tvb, proto_tree *tree, unsigned bit_offset, unsigned bit_len)
3949
11
{
3950
11
    proto_tree *subtree;
3951
11
    proto_item *item;
3952
11
    unsigned    curr_bit_offset;
3953
3954
11
    curr_bit_offset = bit_offset;
3955
3956
11
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_SECOND_PART_PACKET_ASSIGNMENT], &item,
3957
11
                                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_SECOND_PART_PACKET_ASSIGNMENT]);
3958
3959
    /* Null breakpoint */
3960
11
    if (curr_bit_offset < bit_len)
3961
10
    {
3962
10
       if (gsm_rr_csn_HL_flag(tvb,subtree, 0,curr_bit_offset++, hf_gsm_a_rr_additions_in_r99))
3963
5
       {
3964
5
           if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_extended_ra_present))
3965
3
           {
3966
3
               proto_tree_add_bits_item(subtree, hf_gsm_a_rr_extended_ra, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
3967
3
               curr_bit_offset += 5;
3968
3
           }
3969
5
       }
3970
10
    }
3971
11
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
3972
3973
11
    return (curr_bit_offset - bit_offset);
3974
11
}
3975
3976
3977
/*
3978
 * [3] 10.5.2.16 IA Rest Octets
3979
 */
3980
3981
static const value_string gsm_a_rr_implicit_reject_cs_vals[] = {
3982
    {0, "An implicit reject is not indicated for the CS domain"},
3983
    {1, "An implicit reject is indicated for the CS domain"},
3984
    {0, NULL}
3985
};
3986
3987
static const value_string gsm_a_rr_implicit_reject_ps_vals[] = {
3988
    {0, "An implicit reject is not indicated for the PS domain"},
3989
    {1, "An implicit reject is indicated for the PS domain"},
3990
    {0, NULL}
3991
};
3992
3993
static uint16_t
3994
de_rr_ia_rest_oct(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3995
120
{
3996
120
    proto_item *item;
3997
120
    uint32_t    curr_offset;
3998
120
    int         bit_offset;
3999
120
    int         length;
4000
120
    uint64_t    ma_length;
4001
120
    uint8_t     tvb_len = tvb_reported_length(tvb);
4002
120
    uint16_t    bit_len = tvb_len << 3;
4003
4004
120
    curr_offset = offset;
4005
4006
120
    bit_offset = curr_offset << 3;
4007
120
    if (0 == gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_first_discriminator_bit))
4008
60
    {
4009
60
        if (0 == gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_second_discriminator_bit))
4010
22
        {
4011
           /* LL */
4012
22
           (void) gsm_rr_csn_HL_flag(tvb, subtree, 0,bit_offset++, hf_gsm_a_rr_a_compressed_inter_rat_handover_info);
4013
4014
22
           if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_additions_in_rel_13))
4015
5
            {
4016
5
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_implicit_reject_ps, tvb, bit_offset++, 1, ENC_BIG_ENDIAN);
4017
5
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_peo_bcch_change_mark, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
4018
5
                bit_offset += 2;
4019
5
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rcc, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
4020
5
                bit_offset += 3;
4021
5
            }
4022
22
        }
4023
38
        else   /* LH */
4024
38
        {
4025
38
            if (0 == gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_downlink_uplink_discriminator_bit))
4026
32
            {
4027
32
                if (0 == gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_downlink_uplink))
4028
24
                {
4029
24
                    bit_offset += de_rr_ia_rest_oct_egprs_packet_uplink_assignment(tvb, subtree, bit_offset, bit_len);
4030
24
                    if (bit_offset == bit_len) /* This IE may be the last one */
4031
0
                        return tvb_len - offset;
4032
24
                }
4033
8
                else
4034
8
                {
4035
8
                    bit_offset += de_rr_ia_rest_oct_multiple_blocks_packet_downlink_assignment(tvb, subtree, bit_offset);
4036
8
                    if (bit_offset == bit_len) /* This IE may be the last one */
4037
0
                        return tvb_len - offset;
4038
8
                }
4039
32
            }
4040
6
            else
4041
6
            {
4042
6
                proto_tree_add_item(subtree, hf_gsm_a_rr_ia_rest_oct_reserved, tvb, bit_offset>>3, 1, ENC_NA);
4043
6
            }
4044
38
            if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_additions_in_rel_13))
4045
17
            {
4046
17
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_implicit_reject_ps, tvb, bit_offset++, 1, ENC_BIG_ENDIAN);
4047
17
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_peo_bcch_change_mark, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
4048
17
                bit_offset += 2;
4049
17
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rcc, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
4050
17
                bit_offset += 3;
4051
17
         }
4052
4053
38
        }
4054
60
    }
4055
60
    else
4056
60
    {
4057
60
        if (0 == gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_second_discriminator_bit))
4058
14
        {
4059
           /* HL */
4060
14
            proto_tree_add_bits_ret_val(subtree, hf_gsm_a_rr_ma_length, tvb, bit_offset, 6, &ma_length, ENC_BIG_ENDIAN);
4061
14
            bit_offset += 6;
4062
            /* Frequency Parameters, before time */
4063
14
            if (ma_length>0)
4064
12
            {
4065
                /* two '0' bits */
4066
12
                bit_offset += 2;
4067
12
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_maio, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
4068
12
                bit_offset += 6;
4069
12
                length = (int)ma_length;
4070
12
                item = proto_tree_add_bytes_format(subtree, hf_gsm_a_rr_ma_bitmap, tvb, bit_offset>>3, (length>>3)-1, NULL, "MA Bitmap: ");
4071
12
                length = (length-1)*8;
4072
1.31k
                while (length)
4073
1.30k
                {
4074
1.30k
                    proto_item_append_text(item,"%d",tvb_get_bits8(tvb,bit_offset,1));
4075
1.30k
                    bit_offset += 1;
4076
1.30k
                    length -= 1;
4077
1.30k
                }
4078
12
            }
4079
14
            (void) gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_a_compressed_inter_rat_handover_info);
4080
4081
14
            if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_additions_in_rel_13))
4082
3
            {
4083
3
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_implicit_reject_ps, tvb, bit_offset++, 1, ENC_BIG_ENDIAN);
4084
3
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_peo_bcch_change_mark, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
4085
3
                bit_offset += 2;
4086
3
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rcc, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
4087
3
                bit_offset += 3;
4088
3
            }
4089
14
        }
4090
46
        else   /* HH */
4091
46
        {
4092
46
            if (0 == gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_second_packet_assignment_discriminator_bit))
4093
35
            {
4094
35
                if (0 == gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_packet_discriminator_bit))
4095
21
                {
4096
                      /* 00  < Packet Uplink Assignment > */
4097
21
                    bit_offset += de_rr_ia_rest_oct_packet_uplink_assignment(tvb, subtree, bit_offset, bit_len);
4098
21
                    if (bit_offset == bit_len) /* This IE may be the last one */
4099
2
                        return tvb_len - offset;
4100
21
                }
4101
14
                else  /*  01     < Packet Downlink Assignment >  */
4102
14
                {
4103
14
                    bit_offset += de_rr_ia_rest_oct_packet_downlink_assignment(tvb, subtree, bit_offset, bit_len);
4104
14
                    if (bit_offset == bit_len) /* This IE may be the last one */
4105
0
                        return tvb_len - offset;
4106
14
                }
4107
35
            }
4108
11
            else  /*  1       < Second Part Packet Assignment >   */
4109
11
            {
4110
11
                bit_offset += de_rr_ia_rest_oct_second_part_packet_assignment(tvb, subtree, bit_offset, bit_len);
4111
11
                if (bit_offset == bit_len) /* This IE may be the last one */
4112
0
                    return tvb_len - offset;
4113
11
            }
4114
44
            if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_additions_in_rel_10))
4115
23
            {
4116
23
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_implicit_reject_cs, tvb, bit_offset++, 1, ENC_BIG_ENDIAN);
4117
23
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_implicit_reject_ps, tvb, bit_offset++, 1, ENC_BIG_ENDIAN);
4118
23
            }
4119
4120
44
            if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_additions_in_rel_13))
4121
22
            {
4122
22
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_peo_bcch_change_mark, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
4123
22
                bit_offset += 2;
4124
22
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rcc, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
4125
22
                bit_offset += 3;
4126
22
            }
4127
44
        }
4128
60
    }
4129
118
    gsm_rr_padding_bits(subtree, tvb, bit_offset, tvb_len, PADDING_BYTE);
4130
118
    return tvb_len - offset;
4131
120
}
4132
4133
/*
4134
 * [3] 10.5.2.17 IAR Rest Octets
4135
 */
4136
4137
static uint16_t
4138
de_rr_iar_rest_oct(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4139
92
{
4140
92
    uint32_t curr_bit_offset;
4141
92
    uint8_t i;
4142
92
    uint8_t ra_count = 0;
4143
92
    uint8_t tvb_len = tvb_reported_length(tvb);
4144
4145
92
    curr_bit_offset = offset << 3;
4146
4147
457
    for (i = 0; i < 4; i++)
4148
365
    {
4149
365
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_extended_ra_present))
4150
132
        {
4151
132
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_extended_ra, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
4152
132
            curr_bit_offset += 5;
4153
132
            ra_count += 1;
4154
132
        }
4155
365
    }
4156
92
    if (ra_count < 4){
4157
80
        if (gsm_rr_csn_HL_flag(tvb, subtree, 0, curr_bit_offset++, hf_gsm_a_rr_additions_in_rel_13))
4158
36
        {
4159
36
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rcc, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
4160
36
            curr_bit_offset += 3;
4161
36
        }
4162
80
    }
4163
4164
92
    gsm_rr_padding_bits(subtree, tvb, curr_bit_offset, tvb_len, PADDING_BYTE);
4165
92
    return tvb_len - offset;
4166
92
}
4167
4168
/*
4169
 * [3] 10.5.2.18 IAX Rest Octets
4170
 */
4171
static uint16_t
4172
de_rr_iax_rest_oct(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4173
20
{
4174
20
    uint32_t curr_bit_offset;
4175
20
    uint8_t tvb_len = tvb_reported_length(tvb);
4176
4177
20
    curr_bit_offset = offset<<3;
4178
4179
20
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_compressed_inter_rat_handover_info, tvb, curr_bit_offset++, 1, ENC_NA);
4180
4181
20
    if (gsm_rr_csn_HL_flag(tvb, subtree, 0, curr_bit_offset++, hf_gsm_a_rr_additions_in_rel_13))
4182
7
    {
4183
7
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rcc, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
4184
7
        curr_bit_offset += 3;
4185
7
    }
4186
4187
20
    gsm_rr_padding_bits(subtree, tvb, curr_bit_offset, tvb_len, PADDING_BYTE);
4188
20
    return tvb_len - offset;
4189
20
}
4190
4191
/*
4192
 * [3] 10.5.2.19 L2 Pseudo Length
4193
 */
4194
static uint16_t
4195
de_rr_l2_pseudo_len(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4196
7
{
4197
7
    uint32_t curr_offset;
4198
4199
7
    curr_offset = offset;
4200
4201
    /* L2 Pseudo Length value */
4202
7
    proto_tree_add_item(subtree, hf_gsm_a_rr_L2_pseudo_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4203
4204
7
    curr_offset = curr_offset + 1;
4205
4206
7
    return curr_offset - offset;
4207
7
}
4208
4209
/*
4210
 *
4211
 * 44.018 10.5.2.20 Measurement Results
4212
 */
4213
static const true_false_string gsm_a_rr_dtx_vals  = {
4214
    "DTX was used",
4215
    "DTX was not used"
4216
};
4217
4218
4219
static const true_false_string gsm_a_rr_mv_vals  = {
4220
    "The measurement results are not valid",
4221
    "The measurement results are valid"
4222
};
4223
4224
static const value_string gsm_a_rr_ncell_vals [] = {
4225
    {0, "No neighbour cell measurement result"},
4226
    {1, "1 neighbour cell measurement result"},
4227
    {2, "2 neighbour cell measurement result"},
4228
    {3, "3 neighbour cell measurement result"},
4229
    {4, "4 neighbour cell measurement result"},
4230
    {5, "5 neighbour cell measurement result"},
4231
    {6, "6 neighbour cell measurement result"},
4232
    {7, "Neighbour cell information not available for serving cell"},
4233
    {0, NULL}
4234
};
4235
/*
4236
< Measurement Results Contents > ::=
4237
    { < BA_USED : bit (1) >
4238
        < DTX_USED : bit (1) >
4239
        < RXLEV_FULL_SERVING_CELL : bit (6) >
4240
        < 3G_BA_USED : bit (1) >
4241
        < MEAS_VALID : bit (1) >
4242
        < RXLEV_SUB_SERVING_CELL : bit (6) >
4243
        < SI23_BA_USED : bit (1) >
4244
        < RXQUAL_FULL_SERVING_CELL : bit (3) >
4245
        < RXQUAL_SUB_SERVING_CELL : bit (3) >
4246
        {
4247
            < NO_NCELL_M : { bit (3) := 111 } >
4248
            0**     -- Padding with zeroes
4249
        } |
4250
        {
4251
            < NO_NCELL_M : { bit (3) exclude 111 } >
4252
            { < NCELL Report : < NCELL Report struct >> } * val (NO_NCELL_M)
4253
            { null | 0**      -- Padding with zeroes
4254
                | 1 < UTRAN_CSG_Measurement_Report : < UTRAN_CSG_Measurement_Report IE > >
4255
                { null | 0** }  -- Padding with zeroes
4256
            }
4257
        }
4258
    } & octet (16) ;
4259
< NCELL Report struct > ::=
4260
    < RXLEV-NCELL: bit (6) >
4261
    < BCCH-FREQ-NCELL : bit (5) >
4262
    < BSIC-NCELL : bit (6) > ;
4263
4264
*/
4265
uint16_t
4266
de_rr_meas_res(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4267
126
{
4268
126
    int     bit_offset;
4269
126
    uint64_t no_ncell_m;
4270
4271
126
    bit_offset = offset << 3;
4272
    /* 2nd octet */
4273
    /* BA-USED */
4274
126
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ba_used, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4275
126
    bit_offset++;
4276
    /* DTX USED */
4277
126
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_dtx_used, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4278
126
    bit_offset++;
4279
    /* RXLEV-FULL-SERVING-CELL */
4280
126
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rxlev_full_serv_cell, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
4281
126
    bit_offset += 6;
4282
4283
    /* 3rd octet */
4284
    /* 3G-BA-USED */
4285
126
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_3g_ba_used, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4286
126
    bit_offset++;
4287
    /* MEAS-VALID */
4288
126
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_meas_valid, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4289
126
    bit_offset++;
4290
    /* RXLEV-SUB-SERVING-CELL */
4291
126
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rxlev_sub_serv_cell, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
4292
126
    bit_offset += 6;
4293
4294
    /* 4th octet */
4295
    /* SI23_BA_USED */
4296
126
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si23_ba_used, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4297
126
    bit_offset++;
4298
    /* RXQUAL-FULL-SERVING-CELL */
4299
126
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rxqual_full_serv_cell, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
4300
126
    bit_offset += 3;
4301
4302
    /* RXQUAL-SUB-SERVING-CELL */
4303
126
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rxqual_sub_serv_cell, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
4304
126
    bit_offset += 3;
4305
    /* NO-NCELL-M */
4306
126
    proto_tree_add_bits_ret_val(subtree, hf_gsm_a_rr_no_ncell_m, tvb, bit_offset, 3, &no_ncell_m, ENC_BIG_ENDIAN);
4307
126
    bit_offset += 3;
4308
126
    if (no_ncell_m == 7) /* No neighbour cell information available) */
4309
8
        no_ncell_m = 0;
4310
448
    while (no_ncell_m)
4311
322
    {
4312
322
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rxlev_ncell, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
4313
322
        bit_offset += 6;
4314
322
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_bcch_freq_ncell, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
4315
322
        bit_offset += 5;
4316
322
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_bsic_ncell, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
4317
322
        bit_offset += 6;
4318
322
        no_ncell_m -= 1;
4319
322
    }
4320
4321
    /* The Measurement Results is a type 3 information element with 17 octets length.
4322
     * Thus the value part is 17 - 1 == 16 octets long.  Unused bits are set to zero. */
4323
126
    gsm_rr_padding_bits(subtree, tvb, bit_offset, 16, 0x00);
4324
4325
126
    return 16;
4326
126
}
4327
4328
/*
4329
 * [3] 10.5.2.20a GPRS Measurement Results
4330
 */
4331
/*
4332
 * [3] 10.5.2.21 Mobile Allocation
4333
 */
4334
uint16_t
4335
de_rr_mob_all(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4336
380
{
4337
380
    uint32_t    curr_offset;
4338
380
    proto_item *item;
4339
380
    int         i, j;
4340
380
    uint8_t     value;
4341
4342
380
    curr_offset = offset;
4343
4344
380
    item = proto_tree_add_bytes_format(tree, hf_gsm_a_rr_inc_arfcn_bitmap, tvb, curr_offset, len, NULL,
4345
380
                                        "Bitmap of increasing ARFCNs included in the Mobile Allocation: ");
4346
8.27k
    for(i=len; i>0; i--)
4347
7.89k
    {
4348
7.89k
        value = tvb_get_uint8(tvb,curr_offset+i-1);
4349
71.0k
        for (j=0; j<8; j++)
4350
63.1k
        {
4351
63.1k
            proto_item_append_text(item,"%d",(value>>j)&0x01);
4352
63.1k
        }
4353
7.89k
    }
4354
4355
380
    curr_offset = curr_offset + len;
4356
380
    return curr_offset - offset;
4357
380
}
4358
4359
/*
4360
 * [3] 10.5.2.21a Mobile Time Difference
4361
 */
4362
static uint16_t
4363
de_rr_mob_time_diff(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4364
1
{
4365
1
    uint32_t curr_offset;
4366
4367
1
    curr_offset = offset;
4368
4369
1
    proto_tree_add_item(tree, hf_gsm_a_rr_mobile_time_difference, tvb, curr_offset, len, ENC_BIG_ENDIAN);
4370
4371
1
    curr_offset = curr_offset + len;
4372
1
    return curr_offset - offset;
4373
4374
1
}
4375
/*
4376
 * [3] 10.5.2.21aa MultiRate configuration
4377
 */
4378
/*    Multirate speech version Octet 3 Bits 8 7 6 */
4379
static const value_string multirate_speech_ver_vals[] = {
4380
    { 1, "Adaptive Multirate speech version 1"},
4381
    { 2, "Adaptive Multirate speech version 2"},
4382
    { 0, NULL }
4383
};
4384
/* Bit 5  NSCB: Noise Suppression Control Bit */
4385
static const value_string NSCB_vals[] = {
4386
    { 0, "Noise Suppression can be used (default)"},
4387
    { 1, "Noise Suppression shall be turned off"},
4388
    { 0, NULL }
4389
};
4390
/* Bit 4 ICMI: Initial Codec Mode Indicator */
4391
static const value_string ICMI_vals[] = {
4392
    { 0, "The initial codec mode is defined by the implicit rule provided in 3GPP TS 05.09"},
4393
    { 1, "The initial codec mode is defined by the Start Mode field"},
4394
    { 0, NULL }
4395
};
4396
/*
4397
Table 10.5.2.21aa.2: Set of adaptive multirate codec modes field (octet 4)
4398
for the Multirate speech version 1
4399
*/
4400
static const true_false_string gsm_a_rr_set_of_amr_codec_modes  = {
4401
    "is part of the subset",
4402
    "is not part of the subset"
4403
};
4404
4405
static const value_string gsm_a_rr_amr_threshold_vals[] = {
4406
    {  0, "0.0 dB"},
4407
    {  1, "0.5 dB"},
4408
    {  2, "1.0 dB"},
4409
    {  3, "1.5 dB"},
4410
    {  4, "2.0 dB"},
4411
    {  5, "2.5 dB"},
4412
    {  6, "3.0 dB"},
4413
    {  7, "3.5 dB"},
4414
    {  8, "4.0 dB"},
4415
    {  9, "4.5 dB"},
4416
    { 10, "5.0 dB"},
4417
    { 11, "5.5 dB"},
4418
    { 12, "6.0 dB"},
4419
    { 13, "6.5 dB"},
4420
    { 14, "7.0 dB"},
4421
    { 15, "7.5 dB"},
4422
    { 16, "8.0 dB"},
4423
    { 17, "8.5 dB"},
4424
    { 18, "9.0 dB"},
4425
    { 19, "9.5 dB"},
4426
    { 20, "10.0 dB"},
4427
    { 21, "10.5 dB"},
4428
    { 22, "11.0 dB"},
4429
    { 23, "11.5 dB"},
4430
    { 24, "12.0 dB"},
4431
    { 25, "12.5 dB"},
4432
    { 26, "13.0 dB"},
4433
    { 27, "13.5 dB"},
4434
    { 28, "14.0 dB"},
4435
    { 29, "14.5 dB"},
4436
    { 30, "15.0 dB"},
4437
    { 31, "15.5 dB"},
4438
    { 32, "16.0 dB"},
4439
    { 33, "16.5 dB"},
4440
    { 34, "17.0 dB"},
4441
    { 35, "17.5 dB"},
4442
    { 36, "18.0 dB"},
4443
    { 37, "18.5 dB"},
4444
    { 38, "19.0 dB"},
4445
    { 39, "19.5 dB"},
4446
    { 40, "20.0 dB"},
4447
    { 41, "20.5 dB"},
4448
    { 42, "21.0 dB"},
4449
    { 43, "21.5 dB"},
4450
    { 44, "22.0 dB"},
4451
    { 45, "22.5 dB"},
4452
    { 46, "23.0 dB"},
4453
    { 47, "23.5 dB"},
4454
    { 48, "24.0 dB"},
4455
    { 49, "24.5 dB"},
4456
    { 50, "25.0 dB"},
4457
    { 51, "25.5 dB"},
4458
    { 52, "26.0 dB"},
4459
    { 53, "26.5 dB"},
4460
    { 54, "27.0 dB"},
4461
    { 55, "27.5 dB"},
4462
    { 56, "28.0 dB"},
4463
    { 57, "28.5 dB"},
4464
    { 58, "29.0 dB"},
4465
    { 59, "29.5 dB"},
4466
    { 60, "30.0 dB"},
4467
    { 61, "30.5 dB"},
4468
    { 62, "31.0 dB"},
4469
    { 63, "31.5 dB"},
4470
    { 0, NULL }
4471
};
4472
4473
static value_string_ext gsm_a_rr_amr_threshold_vals_ext = VALUE_STRING_EXT_INIT(gsm_a_rr_amr_threshold_vals);
4474
4475
static const value_string gsm_a_rr_amr_hysteresis_vals[] = {
4476
    {  0, "0.0 dB"},
4477
    {  1, "0.5 dB"},
4478
    {  2, "1.0 dB"},
4479
    {  3, "1.5 dB"},
4480
    {  4, "2.0 dB"},
4481
    {  5, "2.5 dB"},
4482
    {  6, "3.0 dB"},
4483
    {  7, "3.5 dB"},
4484
    {  8, "4.0 dB"},
4485
    {  9, "4.5 dB"},
4486
    { 10, "5.0 dB"},
4487
    { 11, "5.5 dB"},
4488
    { 12, "6.0 dB"},
4489
    { 13, "6.5 dB"},
4490
    { 14, "7.0 dB"},
4491
    { 15, "7.5 dB"},
4492
    { 0, NULL }
4493
};
4494
4495
uint16_t
4496
de_rr_multirate_conf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4497
68
{
4498
68
    uint32_t curr_offset;
4499
68
    uint8_t oct;
4500
68
    int     bit_offset, remaining_length, nb_of_params;
4501
68
    proto_item* ver_item;
4502
4503
68
    curr_offset = offset;
4504
4505
68
    ver_item = proto_tree_add_item(tree, hf_gsm_a_rr_multirate_speech_ver, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4506
68
    proto_tree_add_item(tree, hf_gsm_a_rr_NCSB, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4507
68
    proto_tree_add_item(tree, hf_gsm_a_rr_ICMI, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4508
    /* The initial codec mode is coded as in 3GPP TS 45.009 */
4509
68
    proto_tree_add_item(tree, hf_gsm_a_rr_start_mode, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4510
68
    oct = ( tvb_get_uint8(tvb,curr_offset) &0xe0 ) >> 5;
4511
68
    curr_offset++;
4512
68
    switch ( oct){
4513
45
    case 1:
4514
        /* Adaptive Multirate speech version 1 */
4515
        /* Set of AMR codec modes */
4516
45
        proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b8, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4517
45
        proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4518
45
        proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4519
45
        proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4520
45
        proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4521
45
        proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4522
45
        proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4523
45
        proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v1_b1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4524
45
        curr_offset++;
4525
4526
45
        remaining_length = len-2;
4527
45
        break;
4528
7
    case 2:
4529
        /* Adaptive Multirate speech version 2 */
4530
7
        proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v2_b5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4531
7
        proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v2_b4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4532
7
        proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v2_b3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4533
7
        proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v2_b2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4534
7
        proto_tree_add_item(tree, hf_gsm_a_rr_set_of_amr_codec_modes_v2_b1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4535
7
        curr_offset++;
4536
4537
7
        remaining_length = len-2;
4538
7
        break;
4539
16
    default:
4540
16
        expert_add_info(pinfo, ver_item, &ei_gsm_a_rr_unknown_version);
4541
16
        proto_tree_add_expert_format(tree, pinfo, &ei_gsm_a_rr_data_not_dissected, tvb, curr_offset, len-1, "Data (Not decoded)");
4542
16
        remaining_length = 0;
4543
16
        break;
4544
68
    }
4545
4546
60
    if (remaining_length)
4547
51
    {
4548
51
        bit_offset = (curr_offset<<3) + 2;
4549
51
        nb_of_params = remaining_length - 1;
4550
2.13k
        while (nb_of_params)
4551
2.08k
        {
4552
2.08k
            proto_tree_add_bits_item(tree, hf_gsm_a_rr_amr_threshold, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
4553
2.08k
            bit_offset += 6;
4554
2.08k
            proto_tree_add_bits_item(tree, hf_gsm_a_rr_amr_hysteresis, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
4555
2.08k
            bit_offset += 4;
4556
2.08k
            nb_of_params -= 1;
4557
2.08k
        }
4558
51
    }
4559
4560
60
    curr_offset = offset + len;
4561
60
    return curr_offset - offset;
4562
4563
68
}
4564
/*
4565
 * [3] 10.5.2.21b Multislot Allocation
4566
 */
4567
static uint16_t
4568
de_rr_mult_all(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4569
319
{
4570
319
    proto_item *item;
4571
319
    uint32_t    curr_offset;
4572
319
    uint8_t     oct;
4573
319
    uint8_t     i;
4574
4575
319
    curr_offset = offset;
4576
4577
319
    oct = tvb_get_uint8(tvb, curr_offset);
4578
319
    item = proto_tree_add_uint_format(tree, hf_gsm_a_rr_da_list, tvb, curr_offset, 1, oct, "List of DA:");
4579
4580
319
    curr_offset++;
4581
2.51k
    for( i=0;i<7;i++ )
4582
2.19k
    {
4583
2.19k
        if( (oct>>i) & 1 )
4584
750
        {
4585
750
            proto_item_append_text(item," DA%d",i+1);
4586
750
        }
4587
2.19k
    }
4588
4589
319
    if( oct & 0x80 )  /* octet 3a present */
4590
95
    {
4591
95
        oct = tvb_get_uint8(tvb, curr_offset);
4592
95
        item = proto_tree_add_uint_format(tree, hf_gsm_a_rr_ua_list, tvb, curr_offset, 1, oct, "List of UA:");
4593
95
        curr_offset++;
4594
739
        for( i=0;i<7;i++ )
4595
644
        {
4596
644
            if( (oct>>i) & 1 )
4597
245
            {
4598
245
                proto_item_append_text(item," UA%d",i+1);
4599
245
            }
4600
644
        }
4601
95
    }
4602
4603
4.34k
    while ( curr_offset < offset + len )
4604
4.03k
    {
4605
4.03k
        proto_tree_add_item(tree, hf_gsm_a_rr_ma_channel_set, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4606
4.03k
        curr_offset++;
4607
4.03k
    }
4608
4609
319
    return curr_offset - offset;
4610
4611
319
}
4612
/*
4613
 * [3] 10.5.2.21c NC mode
4614
 */
4615
4616
 /*
4617
 * [3] 10.5.2.22 Neighbour Cell Description
4618
 */
4619
static const value_string gsm_a_rr_ext_ind_vals[] = {
4620
    { 0, "The information element carries the complete BA"},
4621
    { 1, "The information element carries only a part of the BA"},
4622
    { 0, NULL }
4623
};
4624
static uint16_t
4625
de_rr_neigh_cell_desc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4626
930
{
4627
930
    uint32_t curr_offset;
4628
4629
930
    curr_offset = offset;
4630
4631
930
    proto_tree_add_item(tree, hf_gsm_a_rr_ext_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4632
930
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ba_ind, tvb, (curr_offset<<3)+3, 1, ENC_BIG_ENDIAN);
4633
4634
930
    return dissect_arfcn_list(tvb, tree, pinfo, offset, 16, add_string, string_len);
4635
930
}
4636
4637
 /*
4638
 * [3] 10.5.2.22a Neighbour Cell Description 2
4639
 */
4640
static uint16_t
4641
de_rr_neigh_cell_desc2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4642
616
{
4643
616
    uint32_t curr_offset;
4644
4645
616
    curr_offset = offset;
4646
4647
616
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_multiband_reporting, tvb, (curr_offset<<3)+1, 2, ENC_BIG_ENDIAN);
4648
616
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ba_ind, tvb, (curr_offset<<3)+3, 1, ENC_BIG_ENDIAN);
4649
4650
616
    return dissect_arfcn_list2(tvb, tree, pinfo, offset, 16, add_string, string_len);
4651
616
}
4652
4653
/*
4654
 * [3] 10.5.2.22b (void)
4655
 * [3] 10.5.2.22c NT/N Rest Octets
4656
 */
4657
4658
/*
4659
 * [3] 10.5.2.23 P1 Rest Octets
4660
 */
4661
static uint16_t
4662
de_rr_p1_rest_oct(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4663
36
{
4664
36
    proto_item *item2;
4665
36
    uint32_t    curr_offset, value;
4666
36
    int         bit_offset, bit_offset_sav;
4667
36
    uint8_t     tvb_len = tvb_reported_length(tvb);
4668
36
    uint16_t    bit_len = tvb_len << 3;
4669
4670
36
    curr_offset = offset;
4671
36
    bit_offset = curr_offset << 3;
4672
4673
36
    if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_rr_nln_pch_present))
4674
9
    {
4675
9
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_nln_pch, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
4676
9
        bit_offset += 2;
4677
9
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_nln_status_pch, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4678
9
        bit_offset += 1;
4679
9
    }
4680
36
    if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_call_prio1))
4681
7
    {
4682
7
        item2 = proto_tree_add_bits_item(subtree, hf_gsm_a_call_prio, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
4683
7
        bit_offset += 3;
4684
7
        proto_item_append_text(item2, " for Mobile Identity 1");
4685
7
    }
4686
36
    if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_call_prio2))
4687
28
    {
4688
28
        item2 = proto_tree_add_bits_item(subtree, hf_gsm_a_call_prio, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
4689
28
        bit_offset += 3;
4690
28
        proto_item_append_text(item2, " for Mobile Identity 2");
4691
28
    }
4692
36
    if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_rr_group_call_information))
4693
23
    { /* Group Call Information */
4694
23
        bit_offset_sav = bit_offset;
4695
23
        bit_offset += 36;
4696
23
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_group_channel_description))
4697
6
        { /* Group Channel Description */
4698
6
            bit_offset += 24;
4699
6
            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_hopping_case))
4700
2
            { /* Hopping case */
4701
2
                if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_hopping_flag))
4702
1
                {
4703
1
                    bit_offset += 64;
4704
1
                }
4705
1
                else
4706
1
                {
4707
1
                    value = tvb_get_bits8(tvb,bit_offset,8);
4708
1
                    bit_offset += 8 + (value<<3);
4709
1
                }
4710
2
            }
4711
6
        }
4712
23
        proto_tree_add_expert_format(subtree, pinfo, &ei_gsm_a_rr_data_not_dissected, tvb, bit_offset_sav>>3, (bit_offset-bit_offset_sav)>>3,
4713
23
                    "Group Call Information: Data(Not decoded)");
4714
23
    }
4715
36
    (void) gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_rr_packet_page_indication_1);
4716
36
    (void) gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_rr_packet_page_indication_2);
4717
4718
    /* Truncation allowed (see 44.018 section 8.9) */
4719
4720
36
    gsm_rr_padding_bits(subtree, tvb, bit_offset, tvb_len, PADDING_BYTE);
4721
36
    return tvb_len - offset;
4722
36
}
4723
4724
/*
4725
 * [3] 10.5.2.24 P2 Rest Octets
4726
 */
4727
static uint16_t
4728
de_rr_p2_rest_oct(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4729
4730
88
{
4731
88
    proto_item *item2;
4732
88
    uint32_t    curr_offset;
4733
88
    int         bit_offset;
4734
88
    uint8_t     tvb_len = tvb_reported_length(tvb);
4735
88
    uint16_t    bit_len = tvb_len << 3;
4736
4737
88
    curr_offset = offset;
4738
88
    bit_offset = curr_offset << 3;
4739
4740
88
    if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_rr_chnl_needed_ch3_present))
4741
39
    {
4742
39
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_chnl_needed_ch3, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
4743
39
        bit_offset += 2;
4744
39
    }
4745
88
    if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len ,bit_offset++, hf_gsm_a_rr_nln_pch_present))
4746
34
    {
4747
34
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_nln_pch, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
4748
34
        bit_offset += 2;
4749
34
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_nln_status_pch, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4750
34
        bit_offset += 1;
4751
34
    }
4752
88
    if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_call_prio1))
4753
47
    {
4754
47
       item2 = proto_tree_add_bits_item(subtree, hf_gsm_a_call_prio, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
4755
47
       bit_offset += 3;
4756
47
       proto_item_append_text(item2, " for Mobile Identity 1");
4757
47
    }
4758
88
    if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_call_prio2))
4759
47
    {
4760
47
        item2 = proto_tree_add_bits_item(subtree, hf_gsm_a_call_prio, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
4761
47
        bit_offset += 3;
4762
47
        proto_item_append_text(item2, " for Mobile Identity 2");
4763
47
    }
4764
88
    if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_call_prio3))
4765
33
    {
4766
33
        item2 = proto_tree_add_bits_item(subtree, hf_gsm_a_call_prio, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
4767
33
        bit_offset += 3;
4768
33
        proto_item_append_text(item2, " for Mobile Identity 3");
4769
33
    }
4770
88
    (void) gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_rr_packet_paging_procedure_1);
4771
88
    (void) gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_rr_packet_paging_procedure_2);
4772
88
    (void) gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_rr_packet_paging_procedure_3);
4773
4774
4775
88
    if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_rr_additions_in_release_6_present))
4776
35
    { /* Additions in release 6 */
4777
35
        bit_offset += 1;
4778
35
        proto_tree_add_expert_format_remaining(subtree, pinfo, &ei_gsm_a_rr_data_not_dissected, tvb, bit_offset>>3, "Additions in Release 6: Data (Not decoded)");
4779
35
    }
4780
4781
    /* Truncation allowed (see 44.018 section 8.9 */
4782
88
    gsm_rr_padding_bits(subtree, tvb, bit_offset, tvb_len, PADDING_BYTE);
4783
88
    return tvb_len - offset;
4784
88
}
4785
4786
/*
4787
 * [3] 10.5.2.25 P3 Rest Octets
4788
 */
4789
static uint16_t
4790
de_rr_p3_rest_oct(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4791
48
{
4792
48
    proto_item *item2;
4793
48
    uint32_t    curr_offset;
4794
48
    int         bit_offset;
4795
48
    uint8_t     tvb_len = tvb_reported_length(tvb);
4796
48
    uint16_t    bit_len = tvb_len << 3;
4797
4798
48
    curr_offset = offset;
4799
48
    bit_offset = curr_offset << 3;
4800
4801
48
    if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_rr_chnl_needed_ch3and4))
4802
21
    {
4803
21
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_chnl_needed_ch3, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
4804
21
        bit_offset += 2;
4805
21
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_chnl_needed_ch4, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
4806
21
        bit_offset += 2;
4807
21
    }
4808
48
    if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_rr_nln_pch_present))
4809
23
    {
4810
23
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_nln_pch, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
4811
23
        bit_offset += 2;
4812
23
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_nln_status_pch, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4813
23
        bit_offset += 1;
4814
23
    }
4815
48
    if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_call_prio1))
4816
25
    {
4817
25
        item2 = proto_tree_add_bits_item(subtree, hf_gsm_a_call_prio, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
4818
25
        bit_offset += 3;
4819
25
        proto_item_append_text(item2, " for Mobile Identity 1");
4820
25
    }
4821
48
    if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_call_prio2))
4822
25
    {
4823
25
        item2 = proto_tree_add_bits_item(subtree, hf_gsm_a_call_prio, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
4824
25
        bit_offset += 3;
4825
25
        proto_item_append_text(item2, " for Mobile Identity 2");
4826
25
    }
4827
48
    if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_call_prio3))
4828
28
    {
4829
28
        item2 = proto_tree_add_bits_item(subtree, hf_gsm_a_call_prio, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
4830
28
        bit_offset += 3;
4831
28
        proto_item_append_text(item2, " for Mobile Identity 3");
4832
28
    }
4833
48
    if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_call_prio4))
4834
29
    {
4835
29
        item2 = proto_tree_add_bits_item(subtree, hf_gsm_a_call_prio, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
4836
29
        bit_offset += 3;
4837
29
        proto_item_append_text(item2, " for Mobile Identity 4");
4838
29
    }
4839
4840
    /* Truncation allowed (see 44.018 section 8.9 */
4841
48
    gsm_rr_padding_bits(subtree, tvb, bit_offset, tvb_len, PADDING_BYTE);
4842
48
    return tvb_len - offset;
4843
48
}
4844
4845
/*
4846
 * [3] 10.5.2.25a Packet Channel Description C V 3
4847
 */
4848
static uint16_t
4849
de_rr_packet_ch_desc(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4850
32
{
4851
32
    uint32_t     curr_offset = offset;
4852
32
    uint32_t      oct8;
4853
32
    uint8_t       second_oct8;
4854
4855
    /* Octet 2 */
4856
    /* Channel Type */
4857
32
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_packet_channel_type, tvb, (curr_offset<<3), 5, ENC_NA);
4858
    /* TN */
4859
32
    proto_tree_add_item(subtree, hf_gsm_a_rr_timeslot, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4860
4861
32
    curr_offset +=1;
4862
4863
    /* Octet 3 */
4864
32
    proto_tree_add_item_ret_uint(subtree, hf_gsm_a_rr_training_sequence, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &oct8);
4865
32
    if ((oct8 & 0x10) == 0x10)
4866
0
    {
4867
        /* Hopping sequence */
4868
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_hopping_channel_maio, tvb, (curr_offset<<3)+4, 6, ENC_NA);
4869
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_hsn, tvb, (curr_offset<<3)+10, 6, ENC_NA);
4870
4871
0
        curr_offset = curr_offset + 2;
4872
0
    }
4873
32
    else
4874
32
    {
4875
32
        if ((oct8 & 0x08) == 0x08)
4876
0
        {
4877
0
            second_oct8 = tvb_get_uint8(tvb, curr_offset+1);
4878
4879
            /* indirect encoding of hopping RF channel configuration */
4880
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_spare, tvb, (curr_offset<<3)+5, 1, ENC_NA);
4881
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_hopping_channel_maio, tvb, (curr_offset<<3)+6, 6, ENC_NA);
4882
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_hopping_channel_ma_num_ind, tvb, (curr_offset<<3)+12, 1, ENC_NA);
4883
4884
0
            if( (second_oct8 & 0x04) == 0x04 )
4885
0
            {
4886
0
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_hopping_channel_change_mark_1, tvb, (curr_offset<<3)+14, 2, ENC_NA);
4887
0
            }
4888
0
            else
4889
0
            {
4890
0
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_spare, tvb, (curr_offset<<3)+14, 2, ENC_NA);
4891
0
            }
4892
0
            curr_offset = curr_offset + 2;
4893
0
        }
4894
32
        else
4895
32
        {
4896
            /* non-hopping RF channel configuration */
4897
32
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_spare, tvb, (curr_offset<<3)+5, 1, ENC_NA);
4898
32
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_single_channel_arfcn, tvb, (curr_offset<<3)+6, 10, ENC_NA);
4899
32
            curr_offset = curr_offset + 2;
4900
32
        }
4901
32
    }
4902
4903
32
    return curr_offset - offset;
4904
4905
32
}
4906
/*
4907
 * [3] 10.5.2.25b Dedicated mode or TBF
4908
 */
4909
4910
static const value_string gsm_a_rr_dedicated_mode_or_tbf_vals[] = {
4911
    { 0, "This message assigns a dedicated mode resource"},
4912
    { 1, "This message assigns an uplink TBF or is the second message of two in a two-message assignment of an uplink or downlink TBF"},
4913
    { 2, "Not used"},
4914
    { 3, "This message assigns a downlink TBF to the mobile station identified in the IA Rest Octets IE"},
4915
    { 4, "Not used"},
4916
    { 5, "This message is the first message of two in a two-message assignment of an uplink TBF"},
4917
    { 6, "Not used"},
4918
    { 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"},
4919
    { 0, NULL }
4920
};
4921
static uint16_t
4922
de_rr_ded_mod_or_tbf(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4923
214
{
4924
214
    uint32_t curr_offset;
4925
4926
214
    curr_offset = offset;
4927
4928
214
    proto_tree_add_item(subtree, hf_gsm_a_rr_dedicated_mode_or_tbf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4929
4930
214
    curr_offset += 1;
4931
4932
214
    return curr_offset - offset;
4933
214
}
4934
/*
4935
 * [3] 10.5.2.25c RR Packet Uplink Assignment
4936
 */
4937
static uint16_t
4938
de_rr_pkt_ul_ass(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4939
1
{
4940
1
    uint32_t curr_offset = offset;
4941
4942
1
    proto_tree_add_expert(subtree, pinfo, &ei_gsm_a_rr_data_not_dissected, tvb, curr_offset, len);
4943
4944
1
    return len;
4945
1
}
4946
4947
/*
4948
 * [3] 10.5.2.25d RR Packet Downlink Assignment
4949
 */
4950
static uint16_t
4951
de_rr_pkt_dl_ass(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4952
1
{
4953
1
    uint32_t curr_offset = offset;
4954
4955
1
    proto_tree_add_expert(subtree, pinfo, &ei_gsm_a_rr_data_not_dissected, tvb, curr_offset, len);
4956
4957
1
    return len;
4958
1
}
4959
4960
/*
4961
 * [3] 10.5.2.25e RR Packet Downlink Assignment Type 2
4962
 */
4963
static uint16_t
4964
de_rr_pkt_dl_ass_type2(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4965
1
{
4966
1
    uint32_t curr_offset = offset;
4967
4968
1
    proto_tree_add_expert(subtree, pinfo, &ei_gsm_a_rr_data_not_dissected, tvb, curr_offset, len);
4969
4970
1
    return len;
4971
1
}
4972
4973
/*
4974
 * [3] 10.5.2.26 Page Mode
4975
 */
4976
4977
static const value_string gsm_a_rr_page_mode_vals[] = {
4978
    { 0, "Normal paging"},
4979
    { 1, "Extended paging"},
4980
    { 2, "Paging reorganization"},
4981
    { 3, "Same as before"},
4982
    { 0, NULL }
4983
};
4984
static uint16_t
4985
de_rr_page_mode(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4986
1.30k
{
4987
1.30k
    uint32_t curr_offset;
4988
4989
1.30k
    curr_offset = offset;
4990
4991
1.30k
    proto_tree_add_item(subtree, hf_gsm_a_rr_page_mode, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4992
4993
1.30k
    curr_offset += 1;
4994
4995
1.30k
    return curr_offset - offset;
4996
1.30k
}
4997
/*
4998
 * [3] 10.5.2.26a (void)
4999
 * [3] 10.5.2.26b (void)
5000
 * [3] 10.5.2.26c (void)
5001
 * [3] 10.5.2.26d (void)
5002
 */
5003
/*
5004
 * [3] 10.5.2.27 NCC Permitted
5005
 */
5006
static uint16_t
5007
de_rr_ncc_perm(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
5008
267
{
5009
267
    uint32_t curr_offset;
5010
5011
267
    curr_offset = offset;
5012
5013
267
    proto_tree_add_item(subtree, hf_gsm_a_rr_ncc_permitted, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5014
5015
267
    curr_offset = curr_offset + 1;
5016
5017
267
    return curr_offset - offset;
5018
267
}
5019
/*
5020
 * [3] 10.5.2.28 Power Command
5021
 *
5022
 *
5023
 * ATC (Access Type Control) (octet 2)Bit 8
5024
 * 0    Sending of Handover access is mandatory
5025
 * 1    Sending of Handover access is optional
5026
 */
5027
static const true_false_string gsm_a_rr_pow_cmd_atc_value  = {
5028
    "Sending of Handover access is optional",
5029
    "Sending of Handover access is mandatory"
5030
};
5031
/*
5032
 *  The EPC mode field (octet 2) indicates whether the assigned channel(s)
5033
 *  shall be in enhanced power control (EPC) mode. It is only valid for channels
5034
 *  on which EPC may be used. It is coded as follows:
5035
*/
5036
static const true_false_string gsm_a_rr_pow_cmd_epc_value  = {
5037
    "Channel(s) in EPC mode",
5038
    "Channel(s) not in EPC mode"
5039
};
5040
/*
5041
 * FPC_EPC (octet 2)
5042
 * The FPC_EPC field (octet 2) has different interpretation depending
5043
 *              on the channel mode     of the assigned channel (s) and the value
5044
 *              of the EPC mode field.
5045
 * If the channel mode is such that fast power control (FPC) may be
5046
 *              used, the FPC_EPC field indicates whether Fast Measurement
5047
 *              Reporting and Power Control mechanism is used.
5048
 *              It is coded as follows:
5049
 * Value 0      FPC not in use
5050
 *       1      FPC in use
5051
 * If the channel mode is such that EPC may be used and the EPC mode
5052
 *              field indicates that the channel is in EPC mode, the FPC_EPC
5053
 *              field indicates whether EPC shall be used for uplink power control.
5054
 * It is coded as follows:
5055
 * Value 0      EPC not in use for uplink power control
5056
 *       1      EPC in use for uplink power control
5057
 *
5058
 */
5059
static const true_false_string gsm_a_rr_pow_cmd_fpcepc_value  = {
5060
    "FPC in use/EPC in use for uplink power control",
5061
    "FPC not in use/EPC not in use for uplink power control"
5062
};
5063
5064
/*
5065
 * Power level (octet 2)The power level field is coded as the binaryRepresentation
5066
 * of the "power control level", see 3GPP TS 3GPP TS 45.005. This value shall be used
5067
 * by the mobile station According to 3GPP TS 45.008.Range: 0 to 31.
5068
 */
5069
5070
static uint16_t
5071
de_rr_pow_cmd(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
5072
318
{
5073
318
    uint32_t curr_offset;
5074
5075
318
    curr_offset = offset;
5076
5077
318
    proto_tree_add_item(subtree, hf_gsm_a_b8spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5078
    /*EPC mode */
5079
318
    proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_epc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5080
    /*FPC_EPC*/
5081
318
    proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_fpcepc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5082
    /*POWER LEVEL*/
5083
318
    proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_powlev, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5084
5085
318
    curr_offset = curr_offset + 1;
5086
5087
318
    return curr_offset - offset;
5088
318
}
5089
5090
/*
5091
 * [3] 10.5.2.28a Power Command and access type
5092
 */
5093
static uint16_t
5094
de_rr_pow_cmd_and_acc_type(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
5095
177
{
5096
177
    uint32_t curr_offset;
5097
5098
177
    curr_offset = offset;
5099
5100
    /*ATC */
5101
177
    proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_atc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5102
    /*EPC mode */
5103
177
    proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_epc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5104
    /*FPC_EPC*/
5105
177
    proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_fpcepc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5106
    /*POWER LEVEL*/
5107
177
    proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_powlev, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5108
5109
177
    curr_offset = curr_offset + 1;
5110
5111
177
    return curr_offset - offset;
5112
177
}
5113
/*
5114
 * [3] 10.5.2.29 RACH Control Parameters
5115
 */
5116
5117
static const value_string gsm_a_rr_max_retrans_vals[] = {
5118
    {  0, "Maximum 1 retransmission"},
5119
    {  1, "Maximum 2 retransmissions"},
5120
    {  2, "Maximum 4 retransmissions"},
5121
    {  3, "Maximum 7 retransmissions"},
5122
    {  0, NULL }
5123
};
5124
5125
static const value_string gsm_a_rr_tx_integer_vals[] = {
5126
    {  0, "3 slots used to spread transmission"},
5127
    {  1, "4 slots used to spread transmission"},
5128
    {  2, "5 slots used to spread transmission"},
5129
    {  3, "6 slots used to spread transmission"},
5130
    {  4, "7 slots used to spread transmission"},
5131
    {  5, "8 slots used to spread transmission"},
5132
    {  6, "9 slots used to spread transmission"},
5133
    {  7, "10 slots used to spread transmission"},
5134
    {  8, "11 slots used to spread transmission"},
5135
    {  9, "12 slots used to spread transmission"},
5136
    { 10, "14 slots used to spread transmission"},
5137
    { 11, "16 slots used to spread transmission"},
5138
    { 12, "20 slots used to spread transmission"},
5139
    { 13, "25 slots used to spread transmission"},
5140
    { 14, "32 slots used to spread transmission"},
5141
    { 15, "50 slots used to spread transmission"},
5142
    {  0, NULL }
5143
};
5144
static const value_string gsm_a_rr_cell_barr_access_vals[] = {
5145
    {  0, "The cell is not barred"},
5146
    {  1, "The cell is barred"},
5147
    {  0, NULL }
5148
};
5149
static const value_string gsm_a_rr_re_vals[] = {
5150
    {  0, "Call Reestablishment allowed in the cell"},
5151
    {  1, "Call Reestablishment not allowed in the cell"},
5152
    {  0, NULL }
5153
};
5154
5155
static uint16_t
5156
de_rr_rach_ctrl_param(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
5157
1.01k
{
5158
1.01k
    uint32_t curr_offset;
5159
5160
1.01k
    curr_offset = offset;
5161
5162
1.01k
    proto_tree_add_item(subtree, hf_gsm_a_rr_max_retrans, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5163
1.01k
    proto_tree_add_item(subtree, hf_gsm_a_rr_tx_integer, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5164
1.01k
    proto_tree_add_item(subtree, hf_gsm_a_rr_cell_barr_access, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5165
1.01k
    proto_tree_add_item(subtree, hf_gsm_a_rr_re, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5166
1.01k
    curr_offset = curr_offset + 1;
5167
5168
1.01k
    proto_tree_add_item(subtree, hf_gsm_a_rr_acc, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
5169
5170
1.01k
    curr_offset = curr_offset + 2;
5171
5172
1.01k
    return curr_offset - offset;
5173
1.01k
}
5174
/*
5175
 * [3] 10.5.2.30 Request Reference M V 3
5176
 */
5177
uint16_t parse_reduced_frame_number(tvbuff_t *tvb, const int offset)
5178
1.20k
{
5179
    /* great care needed with signed/unsigned - -1 in unsigned is 0xffff, which mod(26) is not what you think !!! */
5180
1.20k
    int16_t t2, t3, t;
5181
1.20k
    uint16_t frame, t1;
5182
1.20k
    uint16_t fn;
5183
5184
1.20k
    fn = tvb_get_ntohs(tvb, offset);
5185
5186
1.20k
    t1 = (fn >> 11) & 0x1f;
5187
1.20k
    t2 = (fn >> 0) & 0x1f;
5188
1.20k
    t3 = (fn >> 5) & 0x3f;
5189
5190
1.20k
    t = (t3-t2)%26;
5191
1.20k
    if (t<0)
5192
482
        t += 26;
5193
5194
1.20k
    frame = 51*(unsigned)t+(unsigned)t3+51*26*t1;
5195
5196
1.20k
    return frame;
5197
1.20k
}
5198
5199
static uint16_t
5200
de_rr_req_ref(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
5201
1.14k
{
5202
1.14k
    proto_item *item;
5203
1.14k
    uint32_t    curr_offset;
5204
1.14k
    uint16_t    rfn;
5205
5206
1.14k
    curr_offset = offset;
5207
5208
1.14k
    proto_tree_add_item(subtree, hf_gsm_a_rr_ra, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5209
1.14k
    curr_offset++;
5210
1.14k
    rfn = parse_reduced_frame_number(tvb, curr_offset);
5211
1.14k
    proto_tree_add_item(subtree, hf_gsm_a_rr_T1prim, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5212
1.14k
    proto_tree_add_item(subtree, hf_gsm_a_rr_T3, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
5213
1.14k
    curr_offset++;
5214
1.14k
    proto_tree_add_item(subtree, hf_gsm_a_rr_T2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5215
1.14k
    curr_offset++;
5216
1.14k
    item = proto_tree_add_uint(subtree, hf_gsm_a_rr_rfn, tvb, curr_offset-2, 2, rfn);
5217
1.14k
    proto_item_set_generated(item);
5218
5219
1.14k
    return curr_offset - offset;
5220
1.14k
}
5221
/*
5222
 * [3] 10.5.2.31
5223
 */
5224
uint16_t
5225
de_rr_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
5226
1.29k
{
5227
1.29k
    uint32_t curr_offset;
5228
5229
1.29k
    curr_offset = offset;
5230
5231
1.29k
    proto_tree_add_item(tree, hf_gsm_a_rr_RR_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5232
5233
1.29k
    curr_offset++;
5234
5235
1.29k
    return curr_offset - offset;
5236
1.29k
}
5237
5238
/*
5239
 * [3] 10.5.2.32 SI 1 Rest Octets
5240
 */
5241
static const value_string gsm_a_rr_nch_position_vals[] = {
5242
    { 0, "No of blocks = 1 and Number of first block = 0"},
5243
    { 1, "No of blocks = 1 and Number of first block = 1"},
5244
    { 2, "No of blocks = 1 and Number of first block = 2"},
5245
    { 3, "No of blocks = 1 and Number of first block = 3"},
5246
    { 4, "No of blocks = 1 and Number of first block = 4"},
5247
    { 5, "No of blocks = 1 and Number of first block = 5"},
5248
    { 6, "No of blocks = 1 and Number of first block = 6"},
5249
    { 7, "No of blocks = 1 and Number of first block = 0"},
5250
    { 8, "No of blocks = 2 and Number of first block = 1"},
5251
    { 9, "No of blocks = 2 and Number of first block = 2"},
5252
    {10, "No of blocks = 2 and Number of first block = 3"},
5253
    {11, "No of blocks = 2 and Number of first block = 4"},
5254
    {12, "No of blocks = 2 and Number of first block = 5"},
5255
    {13, "No of blocks = 3 and Number of first block = 0"},
5256
    {14, "No of blocks = 3 and Number of first block = 1"},
5257
    {15, "No of blocks = 3 and Number of first block = 2"},
5258
    {16, "No of blocks = 3 and Number of first block = 3"},
5259
    {17, "No of blocks = 3 and Number of first block = 4"},
5260
    {18, "No of blocks = 4 and Number of first block = 0"},
5261
    {19, "No of blocks = 4 and Number of first block = 1"},
5262
    {20, "No of blocks = 4 and Number of first block = 2"},
5263
    {21, "No of blocks = 4 and Number of first block = 3"},
5264
    {22, "No of blocks = 5 and Number of first block = 0"},
5265
    {23, "No of blocks = 5 and Number of first block = 1"},
5266
    {24, "No of blocks = 5 and Number of first block = 2"},
5267
    {25, "No of blocks = 6 and Number of first block = 0"},
5268
    {26, "No of blocks = 6 and Number of first block = 1"},
5269
    {27, "No of blocks = 7 and Number of first block = 0"},
5270
    {28, "Reserved"},
5271
    {29, "Reserved"},
5272
    {30, "Reserved"},
5273
    {31, "Reserved"},
5274
    { 0, NULL }
5275
};
5276
5277
static uint16_t
5278
de_rr_si1_rest_oct(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
5279
119
{
5280
119
    uint32_t curr_offset;
5281
119
    int     bit_offset;
5282
119
    uint8_t tvb_len = tvb_reported_length(tvb);
5283
5284
119
    curr_offset = offset;
5285
119
    bit_offset = curr_offset << 3;
5286
5287
119
    if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_nch_position_present))
5288
34
    {
5289
34
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_nch_position, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
5290
34
        bit_offset += 5;
5291
34
    }
5292
119
    (void) gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_band_indicator);
5293
5294
119
    gsm_rr_padding_bits(subtree, tvb, bit_offset, tvb_len, PADDING_BYTE);
5295
119
    return tvb_len - offset;
5296
119
}
5297
5298
/*
5299
 * [3] 10.5.2.33 SI 2bis Rest Octets
5300
 */
5301
5302
/*
5303
 * [3] 10.5.2.33a SI 2ter Rest Octets
5304
 */
5305
static const value_string gsm_a_rr_qsearch_x_vals[] = {
5306
    { 0, "-98 dBm"},
5307
    { 1, "-94 dBm"},
5308
    { 2, "-90 dBm"},
5309
    { 3, "-86 dBm"},
5310
    { 4, "-82 dBm"},
5311
    { 5, "-78 dBm"},
5312
    { 6, "-74 dBm"},
5313
    { 7, "Always"},
5314
    { 8, "-78 dBm"},
5315
    { 9, "-74 dBm"},
5316
    {10, "-70 dBm"},
5317
    {11, "-66 dBm"},
5318
    {12, "-62 dBm"},
5319
    {13, "-58 dBm"},
5320
    {14, "-54 dBm"},
5321
    {15, "Never"},
5322
    { 0, NULL }
5323
};
5324
5325
static const value_string gsm_a_rr_xdd_qoffset_vals[] = {
5326
    { 0, "always select a cell if acceptable"},
5327
    { 1, "-28 dB"},
5328
    { 2, "-24 dB"},
5329
    { 3, "-20 dB"},
5330
    { 4, "-16 dB"},
5331
    { 5, "-12 dB"},
5332
    { 6, "-8 dB"},
5333
    { 7, "-4 dB"},
5334
    { 8, "0 dB"},
5335
    { 9, "4 dB"},
5336
    {10, "8 dB"},
5337
    {11, "12 dB"},
5338
    {12, "16 dB"},
5339
    {13, "20 dB"},
5340
    {14, "24 dB"},
5341
    {15, "28 dB"},
5342
    { 0, NULL }
5343
};
5344
5345
static const value_string gsm_a_rr_fdd_qmin_vals[] = {
5346
    { 0, "-20 dB"},
5347
    { 1, "-6 dB"},
5348
    { 2, "-18 dB"},
5349
    { 3, "-8 dB"},
5350
    { 4, "-16 dB"},
5351
    { 5, "-10 dB"},
5352
    { 6, "-14 dB"},
5353
    { 7, "-12 dB"},
5354
    { 0, NULL }
5355
};
5356
5357
static const value_string gsm_a_rr_fdd_qmin_offset_vals[] = {
5358
    { 0, "0 dB"},
5359
    { 1, "2 dB"},
5360
    { 2, "4 dB"},
5361
    { 3, "6 dB"},
5362
    { 4, "8 dB"},
5363
    { 5, "10 dB"},
5364
    { 6, "12 dB"},
5365
    { 7, "14 dB"},
5366
    { 0, NULL }
5367
};
5368
5369
static const value_string gsm_a_rr_fdd_rscpmin_vals[] = {
5370
    { 0, "-114 dBm"},
5371
    { 1, "-112 dBm"},
5372
    { 2, "-110 dBm"},
5373
    { 3, "-108 dBm"},
5374
    { 4, "-106 dBm"},
5375
    { 5, "-104 dBm"},
5376
    { 6, "-102 dBm"},
5377
    { 7, "-100 dBm"},
5378
    { 8, "-98 dBm"},
5379
    { 9, "-96 dBm"},
5380
    {10, "-94 dBm"},
5381
    {11, "-92 dBm"},
5382
    {12, "-90 dBm"},
5383
    {13, "-88 dBm"},
5384
    {14, "-86 dBm"},
5385
    {15, "-84 dBm"},
5386
    { 0, NULL }
5387
};
5388
5389
static uint16_t
5390
de_rr_si2ter_rest_oct(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
5391
180
{
5392
180
    proto_tree *subtree2;
5393
180
    proto_item *item2;
5394
180
    uint32_t    curr_offset;
5395
180
    int         bit_offset, bit_offset_sav;
5396
180
    uint8_t     tvb_len = tvb_reported_length(tvb);
5397
180
    uint16_t    bit_len = tvb_len << 3;
5398
5399
180
    curr_offset = offset;
5400
180
    bit_offset = curr_offset<<3;
5401
5402
180
    if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_si2ter_mp_change_mark_present))
5403
103
    {
5404
103
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si2ter_mp_change_mark, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
5405
103
        bit_offset += 1;
5406
103
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si2ter_3g_change_mark, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
5407
103
        bit_offset += 1;
5408
103
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si2ter_index, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
5409
103
        bit_offset += 3;
5410
103
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si2ter_count, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
5411
103
        bit_offset += 3;
5412
103
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_utran_fdd_description))
5413
60
        { /* UTRAN FDD Description */
5414
60
            bit_offset_sav = bit_offset;
5415
60
            subtree2 = proto_tree_add_subtree(subtree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_UTRAN_FDD_DESC], &item2,
5416
60
                                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_FDD_DESC]);
5417
60
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_utran_fdd_description_earlier_version_bit_reserved1, tvb, bit_offset++, 1, ENC_NA);
5418
60
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_utran_fdd_description_earlier_version_bit_reserved2, tvb, bit_offset++, 1, ENC_NA);
5419
60
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_fdd_uarfcn, tvb, bit_offset, 14, ENC_BIG_ENDIAN);
5420
60
            bit_offset += 14;
5421
60
            if (gsm_rr_csn_flag(tvb, subtree2, bit_offset++, hf_gsm_a_rr_bandwidth_fdd_present))
5422
24
            {
5423
24
                proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_bandwidth_fdd, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
5424
24
                bit_offset += 3;
5425
24
            }
5426
60
            proto_item_set_len(item2,(bit_offset>>3) - (bit_offset_sav>>3)+1);
5427
60
        }
5428
103
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_utran_tdd_description))
5429
58
        { /* UTRAN TDD Description */
5430
58
            bit_offset_sav = bit_offset;
5431
58
            subtree2 = proto_tree_add_subtree(subtree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_UTRAN_TDD_DESC], &item2,
5432
58
                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_TDD_DESC]);
5433
58
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_utran_tdd_description_earlier_version_bit_reserved1, tvb, bit_offset++, 1, ENC_NA);
5434
58
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_utran_tdd_description_earlier_version_bit_reserved2, tvb, bit_offset++, 1, ENC_NA);
5435
58
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_tdd_uarfcn, tvb, bit_offset, 14, ENC_BIG_ENDIAN);
5436
58
            bit_offset += 14;
5437
58
            if (gsm_rr_csn_flag(tvb, subtree2, bit_offset++, hf_gsm_a_rr_bandwidth_tdd_present))
5438
31
            {
5439
31
                proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_bandwidth_tdd, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
5440
31
                bit_offset += 3;
5441
31
            }
5442
58
            proto_item_set_len(item2,(bit_offset>>3) - (bit_offset_sav>>3)+1);
5443
58
        }
5444
103
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_3g_measurement_parameters_description))
5445
56
        { /* 3G Measurement Parameters Description */
5446
56
            bit_offset_sav = bit_offset;
5447
56
            subtree2 = proto_tree_add_subtree(subtree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_3G_MEAS_PARAM_DESC], &item2,
5448
56
                                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_3G_MEAS_PARAM_DESC]);
5449
56
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_qsearch_i, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
5450
56
            bit_offset += 4;
5451
56
            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_fdd_parameters))
5452
21
            {
5453
21
                proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_fdd_qoffset, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
5454
21
                bit_offset += 4;
5455
21
                proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_fdd_qmin, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
5456
21
                bit_offset += 3;
5457
21
            }
5458
56
            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_tdd_parameters))
5459
21
            {
5460
21
                proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_tdd_qoffset, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
5461
21
                bit_offset += 4;
5462
21
            }
5463
56
            proto_item_set_len(item2,(bit_offset>>3) - (bit_offset_sav>>3)+1);
5464
56
        }
5465
        /* Null breakpoint */
5466
103
        if (bit_len - bit_offset > 0)
5467
87
        {
5468
            /* There is still room left in the Rest Octets IE */
5469
87
            if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_additions_in_rel_5))
5470
59
            { /* Additions in release R5 */
5471
59
                if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_3g_additional_measurement_parameters_description))
5472
34
                { /* 3G Additional Measurement Parameters Description */
5473
34
                    bit_offset_sav = bit_offset;
5474
34
                    subtree2 = proto_tree_add_subtree(subtree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_3G_ADD_MEAS_PARAM_DESC], &item2,
5475
34
                                                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_3G_ADD_MEAS_PARAM_DESC]);
5476
34
                    proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_fdd_qmin_offset, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
5477
34
                    bit_offset += 3;
5478
34
                    proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_fdd_rscpmin, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
5479
34
                    bit_offset += 4;
5480
34
                    proto_item_set_len(item2,(bit_offset>>3) - (bit_offset_sav>>3)+1);
5481
34
                }
5482
59
            }
5483
87
        }
5484
103
    }
5485
180
    gsm_rr_padding_bits(subtree, tvb, bit_offset, tvb_len, PADDING_BYTE);
5486
180
    return tvb_len - offset;
5487
180
}
5488
5489
/*
5490
 * [3] 10.5.2.33b SI 2quater Rest Octets
5491
 */
5492
static const true_false_string gsm_a_rr_gsm_report_type_value = {
5493
    "The MS shall use the Measurement Report message for reporting",
5494
    "The MS shall use the Enhanced Measurement Report message for reporting if at least one BSIC is allocated to each BA (list) frequency. Otherwise, the Measurement Report message shall be used"
5495
};
5496
5497
static const true_false_string gsm_a_rr_frequency_scrolling_value = {
5498
    "Next BSIC in the structure relates to the subsequent frequency in the BA(list)",
5499
    "Next BSIC in the structure relates to the same frequency in the BA(list)"
5500
};
5501
5502
static const true_false_string gsm_a_rr_rep_priority_value = {
5503
    "High reporting priority",
5504
    "Normal reporting priority"
5505
};
5506
5507
static const true_false_string gsm_a_rr_report_type_value = {
5508
    "The MS shall use the PACKET MEASUREMENT REPORT message for reporting",
5509
    "The MS shall use the PACKET ENHANCED MEASUREMENT REPORT message for reporting"
5510
};
5511
5512
static const true_false_string gsm_a_rr_reporting_rate_value = {
5513
    "Reduced reporting rate allowed",
5514
    "Normal reporting rate"
5515
};
5516
5517
static const true_false_string gsm_a_rr_invalid_bsic_reporting_value = {
5518
    "Report on cells with invalid BSIC and allowed NCC part of BSIC is allowed",
5519
    "Report on cells with invalid BSIC and allowed NCC part of BSIC is not allowed"
5520
};
5521
5522
static const value_string gsm_a_rr_scale_ord_vals[] = {
5523
    { 0, "An offset of 0 dB shall be used for the reported RXLEV values"},
5524
    { 1, "An offset of 10 dB shall be used for the reported RXLEV values"},
5525
    { 2, "An automatic offset shall be used for the reported RXLEV values"},
5526
    { 0, NULL }
5527
};
5528
5529
static const value_string gsm_a_rr_xxx_reporting_offset_vals[] = {
5530
    { 0, "Apply an offset of 0 dB to the reported value when prioritising the cells for reporting"},
5531
    { 1, "Apply an offset of 6 dB to the reported value when prioritising the cells for reporting"},
5532
    { 2, "Apply an offset of 12 dB to the reported value when prioritising the cells for reporting"},
5533
    { 3, "Apply an offset of 18 dB to the reported value when prioritising the cells for reporting"},
5534
    { 4, "Apply an offset of 24 dB to the reported value when prioritising the cells for reporting"},
5535
    { 5, "Apply an offset of 30 dB to the reported value when prioritising the cells for reporting"},
5536
    { 6, "Apply an offset of 36 dB to the reported value when prioritising the cells for reporting"},
5537
    { 7, "Apply an offset of 42 dB to the reported value when prioritising the cells for reporting"},
5538
    { 0, NULL }
5539
};
5540
5541
/* The TS 45.008 is not that clear, but it should be understood: threshold = minimum reported value + 6 * resolution
5542
 * The minimum reported value, resolution is, for the different access technologies:
5543
 *  GSM:        -111 dBm, 1 dBm
5544
 *  WCDMA/RSCP: -116 dBm, 1 dBm
5545
 *  WCDMA/EcN0: -24.5 dB, 0.5 dB
5546
 *  LTE/RSRP:   -140 dBm, 1 dB
5547
 *  LTE/RSRQ:   -19.5 dB, 0.5 dB
5548
 */
5549
static const value_string gsm_a_rr_gsm_reporting_threshold_vals[] = {
5550
    { 0, "Apply priority reporting if the reported value is above -111 dBm"},
5551
    { 1, "Apply priority reporting if the reported value is above -105 dBm"},
5552
    { 2, "Apply priority reporting if the reported value is above -99 dBm"},
5553
    { 3, "Apply priority reporting if the reported value is above -93 dBm"},
5554
    { 4, "Apply priority reporting if the reported value is above -87 dBm"},
5555
    { 5, "Apply priority reporting if the reported value is above -81 dBm"},
5556
    { 6, "Apply priority reporting if the reported value is above -75 dBm"},
5557
    { 7, "Never apply priority reporting"},
5558
    { 0, NULL }
5559
};
5560
5561
static const value_string gsm_a_rr_wcdma_rscp_reporting_threshold_vals[] = {
5562
    { 0, "Apply priority reporting if the reported value is above -116 dBm"},
5563
    { 1, "Apply priority reporting if the reported value is above -110 dBm"},
5564
    { 2, "Apply priority reporting if the reported value is above -104 dBm"},
5565
    { 3, "Apply priority reporting if the reported value is above -98 dBm"},
5566
    { 4, "Apply priority reporting if the reported value is above -92 dBm"},
5567
    { 5, "Apply priority reporting if the reported value is above -86 dBm"},
5568
    { 6, "Apply priority reporting if the reported value is above -80 dBm"},
5569
    { 7, "Never apply priority reporting"},
5570
    { 0, NULL }
5571
};
5572
5573
static const value_string gsm_a_rr_wcdma_ecn0_reporting_threshold_vals[] = {
5574
    { 0, "Apply priority reporting if the reported value is above -24.5 dB"},
5575
    { 1, "Apply priority reporting if the reported value is above -21.5 dB"},
5576
    { 2, "Apply priority reporting if the reported value is above -17.5 dB"},
5577
    { 3, "Apply priority reporting if the reported value is above -14.5 dB"},
5578
    { 4, "Apply priority reporting if the reported value is above -11.5 dB"},
5579
    { 5, "Apply priority reporting if the reported value is above -8.5 dB"},
5580
    { 6, "Apply priority reporting if the reported value is above -5.5 dB"},
5581
    { 7, "Never apply priority reporting"},
5582
    { 0, NULL }
5583
};
5584
5585
static const value_string gsm_a_rr_lte_rsrp_reporting_threshold_vals[] = {
5586
    { 0, "Apply priority reporting if the reported value is above -140 dBm"},
5587
    { 1, "Apply priority reporting if the reported value is above -134 dBm"},
5588
    { 2, "Apply priority reporting if the reported value is above -128 dBm"},
5589
    { 3, "Apply priority reporting if the reported value is above -122 dBm"},
5590
    { 4, "Apply priority reporting if the reported value is above -116 dBm"},
5591
    { 5, "Apply priority reporting if the reported value is above -110 dBm"},
5592
    { 6, "Apply priority reporting if the reported value is above -104 dBm"},
5593
    { 7, "Never apply priority reporting"},
5594
    { 0, NULL }
5595
};
5596
5597
static const value_string gsm_a_rr_lte_rsrq_reporting_threshold_vals[] = {
5598
    { 0, "Apply priority reporting if the reported value is above -19.5 dB"},
5599
    { 1, "Apply priority reporting if the reported value is above -16.5 dB"},
5600
    { 2, "Apply priority reporting if the reported value is above -13.5 dB"},
5601
    { 3, "Apply priority reporting if the reported value is above -10.5 dB"},
5602
    { 4, "Apply priority reporting if the reported value is above -7.5 dB"},
5603
    { 5, "Apply priority reporting if the reported value is above -4.5 dB"},
5604
    { 6, "Apply priority reporting if the reported value is above -1.5 dB"},
5605
    { 7, "Never apply priority reporting"},
5606
    { 0, NULL }
5607
};
5608
5609
static const value_string gsm_a_rr_network_control_order_vals[] = {
5610
    { 0, "NC0"},
5611
    { 1, "NC1"},
5612
    { 2, "NC2"},
5613
    { 3, "NC0"},
5614
    { 0, NULL }
5615
};
5616
5617
static const value_string gsm_a_rr_nc_non_drx_period_vals[] = {
5618
    { 0, "No non-DRX mode after a measurement report has been sent"},
5619
    { 1, "0,24 s"},
5620
    { 2, "0,48 s"},
5621
    { 3, "0.72 s"},
5622
    { 4, "0.96 s"},
5623
    { 5, "1.20 s"},
5624
    { 6, "1.44 s"},
5625
    { 7, "1.92 s"},
5626
    { 0, NULL }
5627
};
5628
5629
static const value_string gsm_a_rr_nc_reporting_period_x_vals[] = {
5630
    { 0, "0.48 s"},
5631
    { 1, "0.96 s"},
5632
    { 2, "1.92 s"},
5633
    { 3, "3.84 s"},
5634
    { 4, "7.68 s"},
5635
    { 5, "15.36 s"},
5636
    { 6, "30.72 s"},
5637
    { 7, "61.44 s"},
5638
    { 0, NULL }
5639
};
5640
5641
static const true_false_string gsm_a_rr_qsearch_c_initial_value = {
5642
    "Always",
5643
    "use Qsearch I"
5644
};
5645
5646
static const true_false_string gsm_a_rr_fdd_rep_quant_value = {
5647
    "Ec/No",
5648
    "RSCP"
5649
};
5650
5651
static const true_false_string gsm_a_rr_3g_search_prio_value = {
5652
    "3G cells may be searched when BSIC decoding is required",
5653
    "3G cells may not be searched when BSIC decoding is required"
5654
};
5655
5656
static const true_false_string gsm_a_rr_3g_ccn_active_value = {
5657
    "CCN towards 3G cells is enabled in the cell",
5658
    "CCN towards 3G cells is disabled in the cell"
5659
};
5660
5661
static int
5662
de_rr_si2quater_meas_info_utran_fdd_desc(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
5663
214
{
5664
214
    proto_tree *subtree, *subtree2;
5665
214
    proto_item *item, *item2;
5666
214
    int         curr_bit_offset, idx;
5667
214
    int         xdd_cell_info, wsize, nwi, jwi, w[64], i, iused, xdd_indic0;
5668
5669
214
    curr_bit_offset = bit_offset;
5670
5671
214
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_UTRAN_FDD_DESC], &item,
5672
214
                            gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_FDD_DESC]);
5673
214
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_bandwidth_fdd_present))
5674
66
    {
5675
66
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_bandwidth_fdd, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
5676
66
        curr_bit_offset += 3;
5677
66
    }
5678
1.19k
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_umts_fdd_neighbour_cells))
5679
976
    {
5680
976
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_repeated_umts_fdd_neighbour_cells_earlier_version_bit_reserved, tvb, curr_bit_offset++, 1, ENC_NA);
5681
976
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_fdd_uarfcn, tvb, curr_bit_offset, 14, ENC_BIG_ENDIAN);
5682
976
        curr_bit_offset += 14;
5683
976
        xdd_indic0 = gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_fdd_cell_info_param_value0);
5684
976
        idx = tvb_get_bits8(tvb,curr_bit_offset,5);
5685
976
        proto_tree_add_uint(subtree, hf_gsm_a_rr_nr_of_fdd_cells, tvb, curr_bit_offset>>3, 1, idx);
5686
976
        curr_bit_offset += 5;
5687
976
        idx = convert_n_to_p[idx];
5688
976
        subtree2 = proto_tree_add_subtree(subtree,tvb, curr_bit_offset>>3, (idx>>3)+1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_FDD_CELL_INFORMATION_FIELD], &item2,
5689
976
                                            gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_FDD_DESC]);
5690
976
        proto_tree_add_bytes_format(subtree2, hf_gsm_a_rr_field_bit_long, tvb, curr_bit_offset>>3, (idx>>3)+1, NULL, "Field is %d bits long", idx);
5691
976
        if (xdd_indic0)
5692
856
        {
5693
856
            proto_tree_add_uint(subtree2, hf_gsm_a_rr_scrambling_code, tvb, curr_bit_offset>>3, 0, 0);
5694
856
            proto_tree_add_uint(subtree2, hf_gsm_a_rr_diversity, tvb, curr_bit_offset>>3, 0, 0);
5695
856
        }
5696
976
        if (idx)
5697
270
        {
5698
270
            wsize = 10;
5699
270
            nwi = 1;
5700
270
            jwi = 0;
5701
270
            i = 1;
5702
5703
1.74k
            while (idx > 0)
5704
1.49k
            {
5705
1.49k
                w[i] = tvb_get_bits32(tvb, curr_bit_offset, wsize, ENC_BIG_ENDIAN);
5706
1.49k
                curr_bit_offset += wsize;
5707
1.49k
                idx -= wsize;
5708
1.49k
                if (w[i] == 0)
5709
19
                {
5710
19
                    idx = 0;
5711
19
                    break;
5712
19
                }
5713
1.47k
                if (++jwi == nwi)
5714
540
                {
5715
540
                    jwi = 0;
5716
540
                    nwi <<= 1;
5717
540
                    wsize--;
5718
540
                }
5719
1.47k
                i++;
5720
1.47k
            }
5721
270
            if (idx < 0)
5722
0
            {
5723
0
                curr_bit_offset += idx;
5724
0
            }
5725
270
            iused = i-1;
5726
5727
1.74k
            for (i=1; i <= iused; i++)
5728
1.47k
            {
5729
1.47k
                xdd_cell_info = f_k(i, w, 1024);
5730
1.47k
                proto_tree_add_uint(subtree2, hf_gsm_a_rr_scrambling_code, tvb, curr_bit_offset>>3, 0, xdd_cell_info & 0x01FF);
5731
1.47k
                proto_tree_add_uint(subtree2, hf_gsm_a_rr_diversity, tvb, curr_bit_offset>>3, 0, (xdd_cell_info >> 9) & 0x01);
5732
1.47k
            }
5733
270
        }
5734
976
    }
5735
214
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
5736
5737
214
    return (curr_bit_offset - bit_offset);
5738
214
}
5739
5740
static int
5741
de_rr_si2quater_meas_info_utran_tdd_desc(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
5742
170
{
5743
170
    proto_tree *subtree, *subtree2;
5744
170
    proto_item *item;
5745
170
    int         curr_bit_offset, idx;
5746
170
    int         xdd_cell_info, wsize, nwi, jwi, w[64], i, iused, xdd_indic0;
5747
5748
170
    curr_bit_offset = bit_offset;
5749
5750
170
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_UTRAN_TDD_DESC], &item,
5751
170
                                gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_TDD_DESC]);
5752
170
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_bandwidth_tdd_present))
5753
48
    {
5754
48
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_bandwidth_tdd, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
5755
48
        curr_bit_offset += 3;
5756
48
    }
5757
860
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_umts_tdd_neighbour_cells))
5758
690
    {
5759
690
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_repeated_umts_tdd_neighbour_cells_earlier_version_bit_reserved, tvb, curr_bit_offset++, 1, ENC_NA);
5760
690
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tdd_uarfcn, tvb, curr_bit_offset, 14, ENC_BIG_ENDIAN);
5761
690
        curr_bit_offset += 14;
5762
690
        xdd_indic0 = gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_tdd_cell_info_param_value0);
5763
690
        idx = tvb_get_bits8(tvb,curr_bit_offset,5);
5764
690
        proto_tree_add_uint(subtree, hf_gsm_a_rr_nr_of_tdd_cells, tvb, curr_bit_offset>>3, 1, idx);
5765
690
        curr_bit_offset += 5;
5766
690
        idx = convert_n_to_q[idx];
5767
690
        subtree2 = proto_tree_add_subtree(subtree,tvb, curr_bit_offset>>3, (idx>>3)+1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_TDD_CELL_INFORMATION_FIELD], &item,
5768
690
                                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_TDD_DESC]);
5769
690
        proto_tree_add_bytes_format(subtree2, hf_gsm_a_rr_field_bit_long, tvb, curr_bit_offset>>3, (idx>>3)+1, NULL, "Field is %d bits long", idx);
5770
690
        if (xdd_indic0)
5771
618
        {
5772
618
            proto_tree_add_uint(subtree2, hf_gsm_a_rr_cell_parameter, tvb, curr_bit_offset>>3, 0, 0);
5773
618
            proto_tree_add_uint(subtree2, hf_gsm_a_rr_sync_case_tstd, tvb, curr_bit_offset>>3, 0, 0);
5774
618
            proto_tree_add_uint(subtree2, hf_gsm_a_rr_diversity_tdd, tvb, curr_bit_offset>>3, 0, 0);
5775
618
        }
5776
690
        if (idx)
5777
170
        {
5778
170
            wsize = 9;
5779
170
            nwi = 1;
5780
170
            jwi = 0;
5781
170
            i = 1;
5782
5783
1.88k
            while (idx > 0)
5784
1.75k
            {
5785
1.75k
                w[i] = tvb_get_bits32(tvb, curr_bit_offset, wsize, ENC_BIG_ENDIAN);
5786
1.75k
                curr_bit_offset += wsize;
5787
1.75k
                idx -= wsize;
5788
1.75k
                if (w[i] == 0)
5789
40
                {
5790
40
                    idx = 0;
5791
40
                    break;
5792
40
                }
5793
1.71k
                if (++jwi == nwi)
5794
485
                {
5795
485
                    jwi = 0;
5796
485
                    nwi <<= 1;
5797
485
                    wsize--;
5798
485
                }
5799
1.71k
                i++;
5800
1.71k
            }
5801
170
            if (idx < 0)
5802
0
            {
5803
0
                curr_bit_offset += idx;
5804
0
            }
5805
170
            iused = i-1;
5806
5807
1.88k
            for (i=1; i <= iused; i++)
5808
1.71k
            {
5809
1.71k
                xdd_cell_info = f_k(i, w, 512);
5810
1.71k
                proto_tree_add_uint(subtree2, hf_gsm_a_rr_cell_parameter, tvb, curr_bit_offset>>3, 0, xdd_cell_info & 0x07F);
5811
1.71k
                proto_tree_add_uint(subtree2, hf_gsm_a_rr_sync_case_tstd, tvb, curr_bit_offset>>3, 0, (xdd_cell_info >> 7) & 0x01);
5812
1.71k
                proto_tree_add_uint(subtree2, hf_gsm_a_rr_diversity_tdd, tvb, curr_bit_offset>>3, 0, (xdd_cell_info >> 8) & 0x01);
5813
1.71k
            }
5814
170
        }
5815
690
    }
5816
170
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
5817
5818
170
    return (curr_bit_offset - bit_offset);
5819
170
}
5820
5821
static int
5822
de_rr_rtd_desc(tvbuff_t *tvb, proto_tree *tree, int bit_offset, rr_rest_octets_elem_idx_t id)
5823
328
{
5824
328
    proto_tree *subtree;
5825
328
    proto_item *item;
5826
328
    int         curr_bit_offset, idx;
5827
328
    uint8_t     value;
5828
5829
328
    curr_bit_offset = bit_offset;
5830
5831
328
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[id], &item,
5832
328
                                    gsm_rr_rest_octets_elem_strings[id]);
5833
328
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_rtd6))
5834
210
    {
5835
210
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_ba_index_start_rtd_present))
5836
151
        {
5837
151
            idx = tvb_get_bits8(tvb,curr_bit_offset,5);
5838
151
            proto_tree_add_uint(subtree, hf_gsm_a_rr_ba_index_start_rtd, tvb, curr_bit_offset>>3, 1, idx);
5839
151
            curr_bit_offset += 5;
5840
151
        }
5841
59
        else
5842
59
            idx = 0;
5843
5844
210
        value = gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_rtd);
5845
827
        while (value == 0)
5846
617
        { /* all the RTDs on the first frequency */
5847
617
            proto_tree_add_uint_format(subtree, hf_gsm_a_rr_rtd_index, tvb, curr_bit_offset>>3, 1, tvb_get_bits8(tvb,curr_bit_offset,6),
5848
617
                "RTD index %d: %d TDMA frame(s) modulo 51 TDMA frames", idx, tvb_get_bits8(tvb,curr_bit_offset,6));
5849
617
            curr_bit_offset += 6;
5850
617
            value = gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_additional_rtd);
5851
617
        }
5852
5853
210
        value = gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_additional_rtd_struct);
5854
909
        while(value == 0)
5855
699
        { /* all other frequencies */
5856
699
            idx += 1;
5857
699
            value = gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_rtd);
5858
2.23k
            while (value == 0)
5859
1.53k
            { /* all the RTDs on the first frequency */
5860
1.53k
                proto_tree_add_uint_format(subtree, hf_gsm_a_rr_rtd_index, tvb, curr_bit_offset>>3, 1, tvb_get_bits8(tvb,curr_bit_offset,6),
5861
1.53k
                            "RTD index %d: %d TDMA frame(s) modulo 51 TDMA frames", idx, tvb_get_bits8(tvb,curr_bit_offset,6));
5862
1.53k
                curr_bit_offset += 6;
5863
1.53k
                value = gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_additional_rtd);
5864
1.53k
            }
5865
699
            value = gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_additional_rtd_struct);
5866
699
        }
5867
210
    }
5868
328
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_rtd12))
5869
176
    {
5870
176
       if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_rtd12))
5871
83
       {
5872
83
           if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_ba_index_start_rtd_present))
5873
45
           {
5874
45
               idx = tvb_get_bits8(tvb,curr_bit_offset,5);
5875
45
               proto_tree_add_uint(subtree, hf_gsm_a_rr_ba_index_start_rtd, tvb, curr_bit_offset>>3, 1, idx);
5876
45
               curr_bit_offset += 5;
5877
45
           }
5878
38
           else
5879
38
               idx = 0;
5880
5881
319
           while (0 == gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_rtd))
5882
236
           { /* all the RTDs on the first frequency */
5883
236
               proto_tree_add_uint_format(subtree, hf_gsm_a_rr_rtd_index, tvb, curr_bit_offset>>3, 2, tvb_get_bits16(tvb,curr_bit_offset,12,ENC_BIG_ENDIAN),
5884
236
                        "RTD index %d: %d/64 TDMA frame(s) modulo 51 TDMA frames", idx, tvb_get_bits16(tvb,curr_bit_offset,12,ENC_BIG_ENDIAN));
5885
236
               curr_bit_offset += 12;
5886
236
           }
5887
5888
276
           while(0 == gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_rtd_frequency))
5889
193
           { /* all other frequencies */
5890
193
               idx += 1;
5891
571
               while (0 == gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_rtd))
5892
378
               { /* all the RTDs on the first frequency */
5893
378
                   proto_tree_add_uint_format(subtree, hf_gsm_a_rr_rtd_index, tvb, curr_bit_offset>>3, 2, tvb_get_bits16(tvb,curr_bit_offset,12,ENC_BIG_ENDIAN),
5894
378
                        "RTD index %d: %d/64 TDMA frame(s) modulo 51 TDMA frames", idx, tvb_get_bits16(tvb,curr_bit_offset,12,ENC_BIG_ENDIAN));
5895
378
                   curr_bit_offset += 12;
5896
378
               }
5897
193
           }
5898
83
       }
5899
176
    }
5900
328
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
5901
5902
328
    return (curr_bit_offset - bit_offset);
5903
328
}
5904
5905
static int
5906
de_rr_bsic_desc(tvbuff_t *tvb, proto_tree *tree, int bit_offset, rr_rest_octets_elem_idx_t id)
5907
334
{
5908
334
    proto_tree *subtree;
5909
334
    proto_item *item;
5910
334
    int         curr_bit_offset, idx;
5911
5912
334
    curr_bit_offset = bit_offset;
5913
334
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[id], &item, gsm_rr_rest_octets_elem_strings[id]);
5914
334
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_ba_index_start_bsic_present))
5915
217
    {
5916
217
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ba_index_start_bsic, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
5917
217
        curr_bit_offset += 5;
5918
217
    }
5919
334
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_bsic, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
5920
334
    curr_bit_offset += 6;
5921
334
    idx = tvb_get_bits8(tvb,curr_bit_offset,7);
5922
334
    proto_tree_add_uint(subtree, hf_gsm_a_rr_number_remaining_bsic, tvb, curr_bit_offset>>3, 1, idx);
5923
334
    curr_bit_offset += 7;
5924
5.53k
    while (idx)
5925
5.20k
    {
5926
5.20k
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_frequency_scrolling, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
5927
5.20k
        curr_bit_offset += 1;
5928
5.20k
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_bsic, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
5929
5.20k
        curr_bit_offset += 6;
5930
5.20k
        idx -= 1;
5931
5.20k
    }
5932
334
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
5933
5934
334
    return curr_bit_offset - bit_offset;
5935
334
}
5936
5937
static int
5938
de_rr_report_priority_desc(tvbuff_t *tvb, proto_tree *tree, int bit_offset, rr_rest_octets_elem_idx_t id)
5939
188
{
5940
188
    proto_tree *subtree;
5941
188
    proto_item *item;
5942
188
    int         curr_bit_offset, idx;
5943
5944
188
    curr_bit_offset = bit_offset;
5945
5946
188
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[id], &item,
5947
188
                                gsm_rr_rest_octets_elem_strings[id]);
5948
188
    idx = tvb_get_bits8(tvb,curr_bit_offset,7);
5949
188
    proto_tree_add_uint(subtree, hf_gsm_a_rr_number_cells, tvb, curr_bit_offset>>3, 1, idx);
5950
188
    curr_bit_offset += 7;
5951
11.8k
    while (idx)
5952
11.6k
    {
5953
11.6k
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rep_priority, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
5954
11.6k
        curr_bit_offset += 1;
5955
11.6k
        idx -= 1;
5956
11.6k
    }
5957
188
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
5958
5959
188
    return curr_bit_offset - bit_offset;
5960
188
}
5961
5962
static int
5963
de_rr_meas_param_desc(tvbuff_t *tvb, proto_tree *tree, int bit_offset, rr_rest_octets_elem_idx_t id)
5964
172
{
5965
172
    proto_tree *subtree;
5966
172
    proto_item *item;
5967
172
    int         curr_bit_offset;
5968
5969
172
    curr_bit_offset = bit_offset;
5970
172
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[id], &item, gsm_rr_rest_octets_elem_strings[id]);
5971
172
    if (id == DE_RR_REST_OCTETS_GPRS_MEAS_PARAM_DESC)
5972
172
    {
5973
172
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_report_type, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
5974
172
        curr_bit_offset += 1;
5975
172
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_reporting_rate, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
5976
172
        curr_bit_offset +=1;
5977
172
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_invalid_bsic_reporting, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
5978
172
        curr_bit_offset +=1;
5979
172
    }
5980
172
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_multiband_reporting_present))
5981
88
    {
5982
88
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_multiband_reporting, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
5983
88
        curr_bit_offset += 2;
5984
88
    }
5985
172
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_serving_reporting_present))
5986
77
    {
5987
77
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_serving_band_reporting, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
5988
77
        curr_bit_offset += 2;
5989
77
    }
5990
172
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_scale_ord, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
5991
172
    curr_bit_offset += 2;
5992
172
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_900_reporting_present))
5993
102
    {
5994
102
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_900_reporting_offset, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
5995
102
        curr_bit_offset += 3;
5996
102
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_900_reporting_threshold, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
5997
102
        curr_bit_offset += 3;
5998
102
    }
5999
172
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_1800_reporting_present))
6000
95
    {
6001
95
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_1800_reporting_offset, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6002
95
        curr_bit_offset += 3;
6003
95
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_1800_reporting_threshold, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6004
95
        curr_bit_offset += 3;
6005
95
    }
6006
172
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_400_reporting_present))
6007
81
    {
6008
81
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_400_reporting_offset, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6009
81
        curr_bit_offset += 3;
6010
81
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_400_reporting_threshold, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6011
81
        curr_bit_offset += 3;
6012
81
    }
6013
172
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_1900_reporting_present))
6014
84
    {
6015
84
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_1900_reporting_offset, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6016
84
        curr_bit_offset += 3;
6017
84
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_1900_reporting_threshold, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6018
84
        curr_bit_offset += 3;
6019
84
    }
6020
172
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_850_reporting_present))
6021
84
    {
6022
84
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_850_reporting_offset, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6023
84
        curr_bit_offset += 3;
6024
84
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_850_reporting_threshold, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6025
84
        curr_bit_offset += 3;
6026
84
    }
6027
172
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
6028
6029
172
    return curr_bit_offset - bit_offset;
6030
172
}
6031
6032
static int
6033
de_rr_3g_add_meas_param_desc2(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
6034
193
{
6035
193
    proto_tree *subtree;
6036
193
    proto_item *item;
6037
193
    int         curr_bit_offset;
6038
6039
193
    curr_bit_offset = bit_offset;
6040
193
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_3G_ADD_MEAS_PARAM_DESC2], &item,
6041
193
                                gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_3G_ADD_MEAS_PARAM_DESC2]);
6042
193
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_fdd_reporting_threshold_2_present))
6043
45
    {
6044
45
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_fdd_reporting_threshold_2, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
6045
45
        curr_bit_offset += 6;
6046
45
    }
6047
193
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
6048
6049
193
    return curr_bit_offset - bit_offset;
6050
193
}
6051
6052
/* Additions in Rel-8 */
6053
static const true_false_string priority_utran_start = {
6054
    "This is the first instance of the message",
6055
    "This is not the first instance of the message"
6056
};
6057
6058
static const true_false_string priority_utran_stop = {
6059
    "This is the last instance of the message",
6060
    "This is not the last instance of the message"
6061
};
6062
6063
static const true_false_string eutran_ccn_active = {
6064
    "CCN towards E-UTRAN cells is enabled in the cell",
6065
    "The broadcast E-UTRAN_CCN_ACTIVE parameter shall apply if applicable. Otherwise, CCN towards E-UTRAN cells is disabled in the cell"
6066
};
6067
6068
#if 0
6069
static const true_false_string eutran_rep_quant = {
6070
    "RSRQ",
6071
    "RSRP"
6072
};
6073
#endif
6074
6075
static const value_string gsm_a_rr_pcid_psc_pattern_length[] = {
6076
    { 0, "1"},
6077
    { 1, "2"},
6078
    { 2, "3"},
6079
    { 3, "4"},
6080
    { 4, "5"},
6081
    { 5, "6"},
6082
    { 6, "7"},
6083
    { 7, "8"},
6084
    { 0, NULL }
6085
};
6086
6087
static const value_string gsm_a_rr_eutran_measurement_bandwidth[] = {
6088
    { 0, "NRB = 6"},
6089
    { 1, "NRB = 15"},
6090
    { 2, "NRB = 25"},
6091
    { 3, "NRB = 50"},
6092
    { 4, "NRB = 75"},
6093
    { 5, "NRB = 100"},
6094
    { 6, "Reserved for future use"},
6095
    { 7, "Reserved for future use"},
6096
    { 0, NULL }
6097
};
6098
6099
static const value_string gsm_a_rr_serving_cell_thresh_gsm_low[] = {
6100
    { 0, "0 dB"},
6101
    { 1, "2 dB"},
6102
    { 2, "4 dB"},
6103
    { 3, "6 dB"},
6104
    { 4, "8 dB"},
6105
    { 5, "10 dB"},
6106
    { 6, "12 dB"},
6107
    { 7, "14 dB"},
6108
    { 8, "16 dB"},
6109
    { 9, "18 dB"},
6110
    {10, "20 dB"},
6111
    {11, "22 dB"},
6112
    {12, "24 dB"},
6113
    {13, "26 dB"},
6114
    {14, "28 dB"},
6115
    {15, "Always allowed"},
6116
    { 0, NULL }
6117
};
6118
6119
static const value_string gsm_a_rr_serving_cell_thresh_priority_search[] = {
6120
    { 0, "-98 dBm"},
6121
    { 1, "-95 dBm"},
6122
    { 2, "-92 dBm"},
6123
    { 3, "-89 dBm"},
6124
    { 4, "-86 dBm"},
6125
    { 5, "-83 dBm"},
6126
    { 6, "-80 dBm"},
6127
    { 7, "-77 dBm"},
6128
    { 8, "-74 dBm"},
6129
    { 9, "-71 dBm"},
6130
    {10, "-68 dBm"},
6131
    {11, "-65 dBm"},
6132
    {12, "-62 dBm"},
6133
    {13, "-59 dBm"},
6134
    {14, "-56 dBm"},
6135
    {15, "Always search"},
6136
    { 0, NULL }
6137
};
6138
6139
static const value_string gsm_a_rr_utran_qrxlevmin[] = {
6140
    { 0, "-119 dBm"},
6141
    { 1, "-117 dBm"},
6142
    { 2, "-115 dBm"},
6143
    { 3, "-113 dBm"},
6144
    { 4, "-111 dBm"},
6145
    { 5, "-109 dBm"},
6146
    { 6, "-107 dBm"},
6147
    { 7, "-105 dBm"},
6148
    { 8, "-103 dBm"},
6149
    { 9, "-101 dBm"},
6150
    {10, "-99 dBm"},
6151
    {11, "-97 dBm"},
6152
    {12, "-95 dBm"},
6153
    {13, "-93 dBm"},
6154
    {14, "-91 dBm"},
6155
    {15, "-89 dBm"},
6156
    {16, "-87 dBm"},
6157
    {17, "-85 dBm"},
6158
    {18, "-83 dBm"},
6159
    {19, "-81 dBm"},
6160
    {20, "-79 dBm"},
6161
    {21, "-77 dBm"},
6162
    {22, "-75 dBm"},
6163
    {23, "-73 dBm"},
6164
    {24, "-71 dBm"},
6165
    {25, "-69 dBm"},
6166
    {26, "-67 dBm"},
6167
    {27, "-65 dBm"},
6168
    {28, "-63 dBm"},
6169
    {29, "-61 dBm"},
6170
    {30, "-59 dBm"},
6171
    {31, "-57 dBm"},
6172
    { 0, NULL }
6173
};
6174
6175
static const value_string gsm_a_rr_thresh_utran_eutran_high_low[] = {
6176
    { 0, "0 dB"},
6177
    { 1, "2 dB"},
6178
    { 2, "4 dB"},
6179
    { 3, "6 dB"},
6180
    { 4, "8 dB"},
6181
    { 5, "10 dB"},
6182
    { 6, "12 dB"},
6183
    { 7, "14 dB"},
6184
    { 8, "16 dB"},
6185
    { 9, "18 dB"},
6186
    {10, "20 dB"},
6187
    {11, "22 dB"},
6188
    {12, "24 dB"},
6189
    {13, "26 dB"},
6190
    {14, "28 dB"},
6191
    {15, "30 dB"},
6192
    {16, "32 dB"},
6193
    {17, "34 dB"},
6194
    {18, "36 dB"},
6195
    {19, "38 dB"},
6196
    {20, "40 dB"},
6197
    {21, "42 dB"},
6198
    {22, "44 dB"},
6199
    {23, "46 dB"},
6200
    {24, "48 dB"},
6201
    {25, "50 dB"},
6202
    {26, "52 dB"},
6203
    {27, "54 dB"},
6204
    {28, "56 dB"},
6205
    {29, "58 dB"},
6206
    {30, "60 dB"},
6207
    {31, "62 dB"},
6208
    { 0, NULL }
6209
};
6210
6211
static const value_string gsm_a_rr_eutran_qrxlevmin[] = {
6212
    { 0, "-140 dBm"},
6213
    { 1, "-138 dBm"},
6214
    { 2, "-136 dBm"},
6215
    { 3, "-134 dBm"},
6216
    { 4, "-132 dBm"},
6217
    { 5, "-130 dBm"},
6218
    { 6, "-128 dBm"},
6219
    { 7, "-126 dBm"},
6220
    { 8, "-124 dBm"},
6221
    { 9, "-122 dBm"},
6222
    {10, "-120 dBm"},
6223
    {11, "-118 dBm"},
6224
    {12, "-116 dBm"},
6225
    {13, "-114 dBm"},
6226
    {14, "-112 dBm"},
6227
    {15, "-110 dBm"},
6228
    {16, "-108 dBm"},
6229
    {17, "-106 dBm"},
6230
    {18, "-104 dBm"},
6231
    {19, "-102 dBm"},
6232
    {20, "-100 dBm"},
6233
    {21, "-98 dBm"},
6234
    {22, "-96 dBm"},
6235
    {23, "-94 dBm"},
6236
    {24, "-92 dBm"},
6237
    {25, "-90 dBm"},
6238
    {26, "-88 dBm"},
6239
    {27, "-86 dBm"},
6240
    {28, "-84 dBm"},
6241
    {29, "-82 dBm"},
6242
    {30, "-80 dBm"},
6243
    {31, "-78 dBm"},
6244
    { 0, NULL }
6245
};
6246
6247
static const value_string gsm_a_rr_serving_cell_priority_param_h_prio[] = {
6248
    { 0, "disabled"},
6249
    { 1, "5 dB"},
6250
    { 2, "4 dB"},
6251
    { 3, "3 dB"},
6252
    { 0, NULL }
6253
};
6254
6255
static const value_string gsm_a_rr_serving_cell_priority_param_t_reselection[] = {
6256
    { 0, "5 s"},
6257
    { 1, "10 s"},
6258
    { 2, "15 s"},
6259
    { 3, "20 s"},
6260
    { 0, NULL }
6261
};
6262
6263
static const value_string gsm_a_rr_qsearch_c_eutran_initial[] = {
6264
    { 0, "search if signal is below -98 dBm"},
6265
    { 1, "search if signal is below -94 dBm"},
6266
    { 2, "search if signal is below -90 dBm"},
6267
    { 3, "search if signal is below -86 dBm"},
6268
    { 4, "search if signal is below -82 dBm"},
6269
    { 5, "search if signal is below -78 dBm"},
6270
    { 6, "search if signal is below -74 dBm"},
6271
    { 7, "always search"},
6272
    { 8, "search is signal is above -78 dBm"},
6273
    { 9, "search is signal is above -74 dBm"},
6274
    {10, "search is signal is above -70 dBm"},
6275
    {11, "search is signal is above -66 dBm"},
6276
    {12, "search is signal is above -62 dBm"},
6277
    {13, "search is signal is above -58 dBm"},
6278
    {14, "search is signal is above -54 dBm"},
6279
    {15, "never search"},
6280
    { 0, NULL }
6281
};
6282
6283
static const true_false_string gsm_a_rr_pcid_pattern_sense = {
6284
    "The group of identified cells are the one not belonging to the PCID_BITMAP_GROUP",
6285
    "The group of identified cells are the one identified by the PCID_BITMAP_GROUP"
6286
};
6287
6288
static const true_false_string measurement_control_utran = {
6289
    "Frequency-specific search enabled: use Qsearch_C_E-UTRAN if received, otherwise use Qsearch_C_EUTRAN_Initial",
6290
    "Frequency-specific search enabled: Never search"
6291
};
6292
6293
static const true_false_string measurement_control_eutran = {
6294
    "Frequency-specific search enabled: use Qsearch_C if received, otherwise use Qsearch_C_Initial",
6295
    "Frequency-specific search enabled: Never search"
6296
};
6297
6298
static int
6299
de_rr_3g_priority_param_desc(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
6300
207
{
6301
207
    proto_tree *subtree;
6302
207
    proto_item *item;
6303
207
    int         curr_bit_offset;
6304
6305
207
    curr_bit_offset = bit_offset;
6306
207
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_3G_PRIORITY_PARAM_DESC], &item,
6307
207
                                gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_3G_PRIORITY_PARAM_DESC]);
6308
6309
207
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_3g_priority_param_desc_utran_start, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
6310
207
    curr_bit_offset += 1;
6311
207
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_3g_priority_param_desc_utran_stop, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
6312
207
    curr_bit_offset += 1;
6313
6314
207
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_default_utran_priority_parameters))
6315
67
    {
6316
67
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_3g_priority_param_desc_default_utran_prio, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6317
67
        curr_bit_offset += 3;
6318
67
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_3g_priority_param_desc_default_threshold_utran, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
6319
67
        curr_bit_offset += 5;
6320
67
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_3g_priority_param_desc_default_utran_qrxlevmin, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
6321
67
        curr_bit_offset += 5;
6322
67
    }
6323
    /* Repeated UTRAN Priority Parameters */
6324
958
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_utran_priority_parameters))
6325
751
    {
6326
751
        proto_tree *subtree_rep_utran_prio;
6327
751
        proto_item *item_rep_utran_prio;
6328
751
        int rep_utran_prio_bit_offset = curr_bit_offset;
6329
6330
751
        subtree_rep_utran_prio = proto_tree_add_subtree(subtree, tvb, curr_bit_offset>>3, 1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_UTRAN_PRIO_PARAM], &item_rep_utran_prio,
6331
751
                                                gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_PRIO_PARAM]);
6332
6333
2.32k
        while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_utran_frequency_index_present))
6334
1.57k
        {
6335
1.57k
            proto_tree_add_bits_item(subtree_rep_utran_prio, hf_gsm_a_rr_utran_frequency_index, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
6336
1.57k
            curr_bit_offset += 5;
6337
1.57k
        }
6338
6339
751
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_utran_priority_present))
6340
647
        {
6341
647
            proto_tree_add_bits_item(subtree_rep_utran_prio, hf_gsm_a_rr_utran_priority, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6342
647
            curr_bit_offset += 3;
6343
647
        }
6344
751
        proto_tree_add_bits_item(subtree_rep_utran_prio, hf_gsm_a_rr_thresh_utran_high, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
6345
751
        curr_bit_offset += 5;
6346
6347
751
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_thresh_utran_low_present))
6348
417
        {
6349
417
            proto_tree_add_bits_item(subtree_rep_utran_prio, hf_gsm_a_rr_thresh_utran_low, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
6350
417
            curr_bit_offset += 5;
6351
417
        }
6352
6353
751
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_utran_qrxlevmin_present))
6354
371
        {
6355
371
            proto_tree_add_bits_item(subtree_rep_utran_prio, hf_gsm_a_rr_utran_qrxlevmin, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
6356
371
            curr_bit_offset += 5;
6357
371
        }
6358
751
        proto_item_set_len(item_rep_utran_prio, (curr_bit_offset>>3) - (rep_utran_prio_bit_offset>>3)+1);
6359
751
    }
6360
207
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
6361
6362
207
    return curr_bit_offset - bit_offset;
6363
207
}
6364
6365
static int
6366
de_rr_eutran_neighbour_cells(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
6367
692
{
6368
692
    proto_tree *subtree;
6369
692
    proto_item *item;
6370
692
    int         curr_bit_offset;
6371
6372
692
    curr_bit_offset = bit_offset;
6373
692
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_EUTRAN_NEIGHBOUR_CELLS], &item,
6374
692
                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_EUTRAN_NEIGHBOUR_CELLS]);
6375
6376
1.90k
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_eutran_earfcn_present))
6377
1.21k
    {
6378
1.21k
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_earfcn, tvb, curr_bit_offset, 16, ENC_BIG_ENDIAN);
6379
1.21k
        curr_bit_offset += 16;
6380
6381
1.21k
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_eutran_measurement_bandwidth_present))
6382
823
        {
6383
823
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_measurement_bandwidth, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6384
823
            curr_bit_offset += 3;
6385
823
        }
6386
1.21k
    }
6387
6388
692
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_eutran_priority_present))
6389
515
    {
6390
515
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_priority, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6391
515
        curr_bit_offset += 3;
6392
515
    }
6393
692
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_thresh_eutran_high, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
6394
692
    curr_bit_offset += 5;
6395
6396
692
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_thresh_eutran_low_present))
6397
415
    {
6398
415
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_thresh_eutran_low, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
6399
415
        curr_bit_offset += 5;
6400
415
    }
6401
6402
692
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_eutran_qrxlevmin_present))
6403
304
    {
6404
304
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_qrxlevmin, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
6405
304
        curr_bit_offset += 5;
6406
304
    }
6407
692
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
6408
6409
692
    return curr_bit_offset - bit_offset;
6410
692
}
6411
6412
static int
6413
de_rr_eutran_neighbour_cells_mi(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
6414
0
{
6415
0
    proto_tree *subtree;
6416
0
    proto_item *item;
6417
0
    int         curr_bit_offset;
6418
6419
0
    curr_bit_offset = bit_offset;
6420
0
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_EUTRAN_NEIGHBOUR_CELLS], &item,
6421
0
                                            gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_EUTRAN_NEIGHBOUR_CELLS]);
6422
6423
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_earfcn, tvb, curr_bit_offset, 16, ENC_BIG_ENDIAN);
6424
0
    curr_bit_offset += 16;
6425
0
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_earfcn))
6426
0
    {
6427
0
       proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_earfcn, tvb, curr_bit_offset, 16, ENC_BIG_ENDIAN);
6428
0
       curr_bit_offset += 16;
6429
0
    }
6430
0
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_eutran_measurement_bandwidth_present))
6431
0
    {
6432
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_measurement_bandwidth, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6433
0
        curr_bit_offset += 3;
6434
0
    }
6435
0
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
6436
6437
0
    return curr_bit_offset - bit_offset;
6438
0
}
6439
6440
static int
6441
de_rr_eutran_pcid(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
6442
3.80k
{
6443
3.80k
    int         curr_bit_offset = bit_offset;
6444
3.80k
    proto_item *item;
6445
6446
6.65k
    while (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_repeated_pcid))
6447
2.85k
    {
6448
2.85k
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_pcid, tvb, curr_bit_offset, 9, ENC_BIG_ENDIAN);
6449
2.85k
        curr_bit_offset += 9;
6450
2.85k
    }
6451
6452
3.80k
    if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_eutran_pcid_bitmap_group_present))
6453
1.99k
    {
6454
1.99k
        int i;
6455
1.99k
        uint8_t bitmap = tvb_get_bits8(tvb,curr_bit_offset,6);
6456
1.99k
        item = proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_pcid_bitmap_group, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
6457
1.99k
        if (bitmap > 0)
6458
1.98k
        {
6459
1.98k
            proto_item_append_text(item, ": Cells IDs addressed by the bitmap:");
6460
1.98k
        }
6461
13.9k
        for (i = 0; i < 6; i++)
6462
11.9k
        {
6463
11.9k
            if ((1 << i) & bitmap)
6464
6.54k
            {
6465
6.54k
                if ( i != 0)
6466
5.15k
                {
6467
5.15k
                    proto_item_append_text(item, ",");
6468
5.15k
                }
6469
6.54k
                proto_item_append_text(item, " %d to %d",i*84, (i+1)*84 - 1);
6470
6.54k
            }
6471
11.9k
        }
6472
1.99k
        curr_bit_offset += 6;
6473
1.99k
    }
6474
7.43k
    while (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_pcid_pattern_present))
6475
3.63k
    {
6476
3.63k
        int pcid_pattern_length;
6477
3.63k
        int pcid_pattern;
6478
3.63k
        int pattern_lower_bound, pattern_upper_bound;
6479
3.63k
        int i;
6480
6481
3.63k
        pcid_pattern_length = tvb_get_bits8(tvb,curr_bit_offset,3) + 1;
6482
3.63k
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_pcid_pattern_length, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6483
3.63k
        curr_bit_offset += 3;
6484
3.63k
        pcid_pattern = tvb_get_bits8(tvb,curr_bit_offset, pcid_pattern_length);
6485
6486
3.63k
        item = proto_tree_add_uint(tree, hf_gsm_a_rr_pcid_pattern, tvb, curr_bit_offset>>3, 1, pcid_pattern);
6487
6488
3.63k
        pattern_lower_bound = pcid_pattern << (9 - pcid_pattern_length);
6489
3.63k
        pattern_upper_bound = pattern_lower_bound;
6490
16.4k
        for (i = 0; i < (9-pcid_pattern_length); i++)
6491
12.8k
        {
6492
12.8k
            pattern_upper_bound |= 1 << i;
6493
12.8k
        }
6494
3.63k
        proto_item_append_text(item, ": Cells IDs addressed by the pattern: %d to %d", pattern_lower_bound, pattern_upper_bound);
6495
6496
3.63k
        curr_bit_offset += pcid_pattern_length;
6497
3.63k
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_pcid_pattern_sense, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
6498
3.63k
        curr_bit_offset += 1;
6499
3.63k
    }
6500
6501
3.80k
    return curr_bit_offset - bit_offset;
6502
3.80k
}
6503
6504
static int
6505
de_rr_eutran_not_allowed_cells(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
6506
440
{
6507
440
    proto_tree *subtree;
6508
440
    proto_item *item;
6509
440
    int         curr_bit_offset;
6510
6511
440
    curr_bit_offset = bit_offset;
6512
440
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_EUTRAN_NOT_ALLOWED_CELLS], &item,
6513
440
                                gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_EUTRAN_NOT_ALLOWED_CELLS]);
6514
6515
    /* dissect PCID group */
6516
440
    curr_bit_offset += de_rr_eutran_pcid(tvb, subtree, curr_bit_offset);
6517
6518
1.71k
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_eutran_frequency_index))
6519
1.27k
    {
6520
1.27k
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_frequency_index, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6521
1.27k
        curr_bit_offset += 3;
6522
1.27k
    }
6523
440
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
6524
6525
440
    return curr_bit_offset - bit_offset;
6526
440
}
6527
6528
static int
6529
de_rr_eutran_pcid_to_ta_mapping(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
6530
861
{
6531
861
    proto_tree *subtree;
6532
861
    proto_item *item;
6533
861
    int         curr_bit_offset;
6534
6535
861
    curr_bit_offset = bit_offset;
6536
861
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_EUTRAN_PCID_TO_TA_MAPPING], &item,
6537
861
                                gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_EUTRAN_PCID_TO_TA_MAPPING]);
6538
6539
3.61k
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeating_pcid_group))
6540
2.75k
    {
6541
        /* dissect PCID group */
6542
2.75k
        curr_bit_offset += de_rr_eutran_pcid(tvb, subtree, curr_bit_offset);
6543
2.75k
    }
6544
861
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
6545
6546
861
    return curr_bit_offset - bit_offset;
6547
861
}
6548
6549
static int
6550
de_rr_eutran_measurement_param_desc(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
6551
100
{
6552
100
    int         curr_bit_offset;
6553
100
    proto_item *item;
6554
100
    uint8_t     rep_quant, rep_thresh;
6555
6556
100
    curr_bit_offset = bit_offset;
6557
6558
    /* E-UTRAN Measurement Parameters Description */
6559
100
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_qsearch_c_eutran_initial, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
6560
100
    curr_bit_offset += 4;
6561
100
    rep_quant = gsm_rr_csn_flag(tvb, tree, curr_bit_offset, hf_gsm_a_rr_eutran_reporting_quantity);
6562
100
    curr_bit_offset += 1;
6563
100
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_multirat_reporting, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
6564
100
    curr_bit_offset += 2;
6565
6566
6567
100
    if (!gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_eutran_reporting))
6568
29
    {
6569
29
        if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_eutran_fdd_reporting_present))
6570
18
        {
6571
18
            if (rep_quant == 0)
6572
10
            {
6573
10
                proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_fdd_reporting_threshold_rsrp, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6574
10
            }
6575
8
            else
6576
8
            {
6577
8
                proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_fdd_reporting_threshold_rsrq, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6578
8
            }
6579
18
            curr_bit_offset += 3;
6580
6581
18
            if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_eutran_fdd_reporting_threshold_2_present))
6582
10
            {
6583
10
                item = proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_fdd_reporting_threshold_2, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
6584
10
                rep_thresh = tvb_get_bits8(tvb,curr_bit_offset, 6);
6585
10
                if (rep_quant == 0)
6586
3
                {
6587
3
                    proto_item_append_text(item, " (%.1f dB)", (float)rep_thresh/2 - 19.5);
6588
3
                }
6589
7
                else
6590
7
                {
6591
7
                    proto_item_append_text(item, " (%d dBm)", rep_thresh - 140);
6592
7
                }
6593
10
                curr_bit_offset += 6;
6594
10
            }
6595
18
            if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_eutran_fdd_reporting_offset_present))
6596
7
            {
6597
7
                proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_fdd_reporting_offset, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6598
6599
7
                curr_bit_offset += 3;
6600
7
            }
6601
18
        }
6602
6603
29
        if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_eutran_tdd_reporting_present))
6604
16
        {
6605
16
            if (rep_quant == 0)
6606
10
            {
6607
10
                proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_tdd_reporting_threshold_rsrp, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6608
10
            }
6609
6
            else
6610
6
            {
6611
6
                proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_tdd_reporting_threshold_rsrq, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6612
6
            }
6613
16
            curr_bit_offset += 3;
6614
6615
16
            if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_eutran_tdd_reporting_threshold_2_present))
6616
7
            {
6617
7
                item = proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_tdd_reporting_threshold_2, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
6618
7
                rep_thresh = tvb_get_bits8(tvb,curr_bit_offset, 6);
6619
7
                if (rep_quant == 0)
6620
2
                {
6621
2
                    proto_item_append_text(item, " (%.1f dB)", (float)rep_thresh/2 - 19.5);
6622
2
                }
6623
5
                else
6624
5
                {
6625
5
                    proto_item_append_text(item, " (%d dBm)", rep_thresh - 140);
6626
5
                }
6627
7
                curr_bit_offset += 6;
6628
7
            }
6629
16
            if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_eutran_tdd_reporting_offset_present))
6630
3
            {
6631
3
                proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_tdd_reporting_offset, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6632
6633
3
                curr_bit_offset += 3;
6634
3
            }
6635
16
        }
6636
29
    }
6637
71
    else
6638
71
    {
6639
71
        if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_eutran_fdd_reporting_threshold))
6640
47
        {
6641
47
            item = proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_fdd_measurement_report_offset, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
6642
47
            rep_thresh = tvb_get_bits8(tvb,curr_bit_offset, 6);
6643
47
            if (rep_quant == 0)
6644
31
            {
6645
31
                proto_item_append_text(item, " (%d dBm)", rep_thresh - 140);
6646
31
            }
6647
16
            else
6648
16
            {
6649
16
                proto_item_append_text(item, " (%.1f dB)", (float)rep_thresh/2 - 19.5);
6650
16
            }
6651
47
            curr_bit_offset += 6;
6652
6653
47
            if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_eutran_fdd_reporting_threshold_2_present))
6654
37
            {
6655
37
                item = proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_fdd_reporting_threshold_2, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
6656
37
                rep_thresh = tvb_get_bits8(tvb,curr_bit_offset, 6);
6657
37
                if (rep_quant == 0)
6658
24
                {
6659
24
                    proto_item_append_text(item, " (%.1f dB)", (float)rep_thresh/2 - 19.5);
6660
24
                }
6661
13
                else
6662
13
                {
6663
13
                    proto_item_append_text(item, " (%d dBm)", rep_thresh - 140);
6664
13
                }
6665
37
                curr_bit_offset += 6;
6666
37
            }
6667
47
            if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_eutran_fdd_reporting_offset_present))
6668
16
            {
6669
16
                proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_fdd_reporting_offset, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6670
16
                curr_bit_offset += 3;
6671
16
            }
6672
47
        }
6673
6674
71
        if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_eutran_tdd_measurement_report_offset_present))
6675
47
        {
6676
47
            item = proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_tdd_measurement_report_offset, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
6677
47
            rep_thresh = tvb_get_bits8(tvb,curr_bit_offset, 6);
6678
47
            if (rep_quant == 0)
6679
38
            {
6680
38
                proto_item_append_text(item, " (%d dBm)", rep_thresh - 140);
6681
38
            }
6682
9
            else
6683
9
            {
6684
9
                proto_item_append_text(item, " (%.1f dB)", (float)rep_thresh/2 - 19.5);
6685
9
            }
6686
47
            curr_bit_offset += 6;
6687
6688
47
            if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_eutran_tdd_reporting_threshold_2_present))
6689
7
            {
6690
7
                item = proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_tdd_reporting_threshold_2, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
6691
7
                rep_thresh = tvb_get_bits8(tvb,curr_bit_offset, 6);
6692
7
                if (rep_quant == 0)
6693
3
                {
6694
3
                    proto_item_append_text(item, " (%.1f dB)", (float)rep_thresh/2 - 19.5);
6695
3
                }
6696
4
                else
6697
4
                {
6698
4
                    proto_item_append_text(item, " (%d dBm)", rep_thresh - 140);
6699
4
                }
6700
7
                curr_bit_offset += 6;
6701
7
            }
6702
47
            if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_eutran_tdd_reporting_offset_present))
6703
43
            {
6704
43
                proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_tdd_reporting_offset, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6705
43
                curr_bit_offset += 3;
6706
43
            }
6707
47
        }
6708
71
        item = proto_tree_add_bits_item(tree, hf_gsm_a_rr_reporting_granularity, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
6709
71
        if (rep_quant == 0)
6710
44
        {
6711
44
            proto_item_append_text(item, " (%d dB step)", 2 + tvb_get_bits8(tvb,curr_bit_offset,1));
6712
44
        }
6713
27
        else
6714
27
        {
6715
27
            proto_item_append_text(item, " (%d dB step)", 1 + tvb_get_bits8(tvb,curr_bit_offset,1));
6716
27
        }
6717
71
        curr_bit_offset += 1;
6718
71
    }
6719
6720
100
    return curr_bit_offset - bit_offset;
6721
100
}
6722
6723
static int
6724
de_rr_eutran_param_desc(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
6725
194
{
6726
194
    proto_tree *subtree;
6727
194
    proto_item *item;
6728
194
    int         curr_bit_offset;
6729
194
    uint8_t     rep_quant = 0, rep_thresh = 0;
6730
6731
194
    curr_bit_offset = bit_offset;
6732
194
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_EUTRAN_PARAM_DESC], &item,
6733
194
                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_EUTRAN_PARAM_DESC]);
6734
6735
194
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_ccn_active, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
6736
194
    curr_bit_offset += 1;
6737
194
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_start, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
6738
194
    curr_bit_offset += 1;
6739
194
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_stop, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
6740
194
    curr_bit_offset += 1;
6741
6742
194
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_eutran_measurement_parameters_description))
6743
100
    {
6744
        /* E-UTRAN Measurement Parameters Description */
6745
100
        curr_bit_offset += de_rr_eutran_measurement_param_desc(tvb, subtree, curr_bit_offset);
6746
100
    }
6747
6748
194
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_gprs_eutran_measurement_parameters_description))
6749
93
    {
6750
        /* GPRS E-UTRAN Measurement Parameters Description */
6751
93
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_qsearch_p_eutran, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
6752
93
        curr_bit_offset += 4;
6753
93
        rep_quant = gsm_rr_csn_flag(tvb, subtree, curr_bit_offset, hf_gsm_a_rr_eutran_reporting_quantity);
6754
93
        curr_bit_offset++;
6755
93
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_multirat_reporting, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
6756
93
        curr_bit_offset += 2;
6757
6758
93
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_eutran_fdd_reporting))
6759
73
        {
6760
73
            if (rep_quant == 0)
6761
54
            {
6762
54
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_fdd_reporting_threshold_rsrp, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6763
54
            }
6764
19
            else
6765
19
            {
6766
19
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_fdd_reporting_threshold_rsrq, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6767
19
            }
6768
73
            curr_bit_offset += 3;
6769
6770
73
            if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_eutran_fdd_reporting_threshold_2_present))
6771
54
            {
6772
54
                item = proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_fdd_reporting_threshold_2, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
6773
54
                rep_thresh = tvb_get_bits8(tvb,curr_bit_offset, 6);
6774
54
                if (rep_quant == 0)
6775
43
                {
6776
43
                    proto_item_append_text(item, " (%.1f dB)", (float)rep_thresh/2 - 19.5);
6777
43
                }
6778
11
                else
6779
11
                {
6780
11
                    proto_item_append_text(item, " (%d dBm)", rep_thresh - 140);
6781
11
                }
6782
54
                curr_bit_offset += 6;
6783
54
            }
6784
73
            if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_eutran_fdd_reporting_offset_present))
6785
55
            {
6786
55
                item = proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_fdd_reporting_offset, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6787
55
                curr_bit_offset += 3;
6788
55
            }
6789
73
        }
6790
6791
93
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_eutran_tdd_reporting))
6792
47
        {
6793
47
            if (rep_quant == 0)
6794
29
            {
6795
29
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_tdd_reporting_threshold_rsrp, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6796
29
            }
6797
18
            else
6798
18
            {
6799
18
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_tdd_reporting_threshold_rsrq, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6800
18
            }
6801
47
            curr_bit_offset += 3;
6802
6803
47
            if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_eutran_tdd_reporting_threshold_2_present))
6804
26
            {
6805
26
                item = proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_tdd_reporting_threshold_2, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
6806
26
                rep_thresh = tvb_get_bits8(tvb,curr_bit_offset, 6);
6807
26
                if (rep_quant == 0)
6808
10
                {
6809
10
                    proto_item_append_text(item, " (%.1f dB)", (float)rep_thresh/2 - 19.5);
6810
10
                }
6811
16
                else
6812
16
                {
6813
16
                    proto_item_append_text(item, " (%d dBm)", rep_thresh - 140);
6814
16
                }
6815
26
                curr_bit_offset += 6;
6816
26
            }
6817
47
            if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_eutran_tdd_reporting_offset_present))
6818
21
            {
6819
21
                item = proto_tree_add_bits_item(tree, hf_gsm_a_rr_eutran_tdd_reporting_offset, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6820
21
                curr_bit_offset += 3;
6821
21
            }
6822
47
        }
6823
93
    }
6824
6825
    /* Repeated E-UTRAN Neighbour Cells */
6826
886
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_eutran_neighbour_cells))
6827
692
    {
6828
692
        curr_bit_offset += de_rr_eutran_neighbour_cells(tvb, subtree, curr_bit_offset);
6829
692
    }
6830
6831
    /* Repeated E-UTRAN Not Allowed Cells */
6832
634
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_eutran_not_allowed_cells))
6833
440
    {
6834
440
        curr_bit_offset += de_rr_eutran_not_allowed_cells(tvb, subtree, curr_bit_offset);
6835
440
    }
6836
6837
    /* Repeated E-UTRAN PCID to TA mapping */
6838
1.05k
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_eutran_pcid_ta_mapping))
6839
861
    {
6840
861
        curr_bit_offset += de_rr_eutran_pcid_to_ta_mapping(tvb, subtree, curr_bit_offset);
6841
861
    }
6842
194
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
6843
6844
194
    return curr_bit_offset - bit_offset;
6845
194
}
6846
6847
static int
6848
de_rr_eutran_param_desc_mi(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
6849
0
{
6850
0
    proto_tree *subtree;
6851
0
    proto_item *item;
6852
0
    int         curr_bit_offset;
6853
6854
0
    curr_bit_offset = bit_offset;
6855
0
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_EUTRAN_PARAM_DESC], &item,
6856
0
                                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_EUTRAN_PARAM_DESC]);
6857
6858
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_start, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
6859
0
    curr_bit_offset += 1;
6860
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_stop, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
6861
0
    curr_bit_offset += 1;
6862
6863
0
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_eutran_measurement_parameters_description))
6864
0
    {
6865
        /* E-UTRAN Measurement Parameters Description */
6866
0
        curr_bit_offset += de_rr_eutran_measurement_param_desc(tvb, subtree, curr_bit_offset);
6867
0
    }
6868
6869
    /* Repeated E-UTRAN Neighbour Cells */
6870
0
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_eutran_neighbour_cells))
6871
0
    {
6872
0
        curr_bit_offset += de_rr_eutran_neighbour_cells_mi(tvb, subtree, curr_bit_offset);
6873
0
    }
6874
6875
    /* Repeated E-UTRAN Not Allowed Cells */
6876
0
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_eutran_not_allowed_cells))
6877
0
    {
6878
0
        curr_bit_offset += de_rr_eutran_not_allowed_cells(tvb, subtree, curr_bit_offset);
6879
0
    }
6880
6881
    /* Measurement Control Parameters Description */
6882
0
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_measurement_control_parameters_description))
6883
0
    {
6884
0
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_eutran_default_measurement_control_eutran_present))
6885
0
        {
6886
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_default_measurement_control_eutran, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
6887
0
            curr_bit_offset += 1;
6888
0
        }
6889
0
        while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_eutran_measurement_control_parameters))
6890
0
        {
6891
0
            while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_eutran_frequency_index))
6892
0
            {
6893
0
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_frequency_index, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6894
0
                curr_bit_offset += 3;
6895
0
            }
6896
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_measurement_control_eutran, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
6897
0
            curr_bit_offset += 1;
6898
0
        }
6899
0
    }
6900
0
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
6901
6902
0
    return curr_bit_offset - bit_offset;
6903
0
}
6904
6905
static int
6906
de_rr_priority_and_eutran_param_desc(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
6907
239
{
6908
239
    proto_tree *subtree;
6909
239
    proto_item *item;
6910
239
    int         curr_bit_offset;
6911
6912
239
    curr_bit_offset = bit_offset;
6913
239
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_PRIORITY_AND_EUTRAN_PARAM_DESC], &item,
6914
239
                                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_PRIORITY_AND_EUTRAN_PARAM_DESC]);
6915
6916
    /* Serving Cell Priority Parameters Description */
6917
239
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_serving_cell_priority_parameters_description))
6918
89
    {
6919
89
        proto_tree *subtree_serv;
6920
89
        proto_item *item_serv;
6921
89
        int serv_bit_offset = curr_bit_offset;
6922
6923
89
        subtree_serv = proto_tree_add_subtree(subtree, tvb, curr_bit_offset>>3, ((curr_bit_offset+15)>>3)-(curr_bit_offset>>3) + 1,
6924
89
                            ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_SERVING_CELL_PRIORITY_PARAM_DESC], &item_serv,
6925
89
                            gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_SERVING_CELL_PRIORITY_PARAM_DESC]);
6926
6927
89
        proto_tree_add_bits_item(subtree_serv, hf_gsm_a_rr_serving_cell_priority_param_geran_priority, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6928
89
        curr_bit_offset += 3;
6929
89
        proto_tree_add_bits_item(subtree_serv, hf_gsm_a_rr_serving_cell_priority_param_thresh_prio_search, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
6930
89
        curr_bit_offset += 4;
6931
89
        proto_tree_add_bits_item(subtree_serv, hf_gsm_a_rr_serving_cell_priority_param_thresh_gsm_low, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
6932
89
        curr_bit_offset += 4;
6933
89
        proto_tree_add_bits_item(subtree_serv, hf_gsm_a_rr_serving_cell_priority_param_h_prio, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
6934
89
        curr_bit_offset += 2;
6935
89
        proto_tree_add_bits_item(subtree_serv, hf_gsm_a_rr_serving_cell_priority_param_t_reselection, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
6936
89
        curr_bit_offset += 2;
6937
89
        proto_item_set_len(item_serv, (curr_bit_offset>>3) - (serv_bit_offset>>3)+1);
6938
89
    }
6939
6940
    /* 3G Priority Parameters Description */
6941
239
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_3g_priority_parameters_description))
6942
207
    {
6943
207
        curr_bit_offset += de_rr_3g_priority_param_desc(tvb, subtree, curr_bit_offset);
6944
207
    }
6945
6946
    /* E-UTRAN Parameters Description */
6947
239
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_eutran_parameters_description))
6948
194
    {
6949
194
        curr_bit_offset += de_rr_eutran_param_desc(tvb, subtree, curr_bit_offset);
6950
194
    }
6951
239
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
6952
6953
239
    return (curr_bit_offset - bit_offset);
6954
239
}
6955
6956
static int
6957
de_rr_3g_csg_desc(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
6958
97
{
6959
97
    proto_tree *subtree;
6960
97
    proto_item *item;
6961
97
    int         curr_bit_offset;
6962
6963
97
    curr_bit_offset = bit_offset;
6964
97
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_3G_CSG_DESC], &item,
6965
97
                            gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_3G_CSG_DESC]);
6966
6967
539
    while (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_repeated_csg_psc_split_struct))
6968
442
    {
6969
        /* CSG_PSC_SPLIT struct */
6970
1.36k
        while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_psc_present))
6971
922
        {
6972
922
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_psc, tvb, curr_bit_offset, 9, ENC_BIG_ENDIAN);
6973
922
            curr_bit_offset += 9;
6974
922
        }
6975
1.51k
        while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_psc_pattern_present))
6976
1.07k
        {
6977
1.07k
            int psc_pattern_length;
6978
1.07k
            int psc_pattern;
6979
6980
1.07k
            psc_pattern_length = tvb_get_bits8(tvb,curr_bit_offset,3) + 1;
6981
1.07k
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_utran_psc_pattern_length, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
6982
1.07k
            curr_bit_offset += 3;
6983
1.07k
            psc_pattern = tvb_get_bits8(tvb,curr_bit_offset, psc_pattern_length);
6984
6985
1.07k
            item = proto_tree_add_uint(tree, hf_gsm_a_rr_psc_pattern, tvb, curr_bit_offset>>3, 1, psc_pattern);
6986
6987
1.07k
            curr_bit_offset += psc_pattern_length;
6988
1.07k
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_utran_psc_pattern_sense, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
6989
1.07k
            curr_bit_offset += 1;
6990
1.07k
        }
6991
6992
1.09k
        while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_utran_frequency_index))
6993
649
        {
6994
649
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_utran_frequency_index, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
6995
649
            curr_bit_offset += 5;
6996
649
        }
6997
442
    }
6998
6999
519
    while(gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_csg_fdd_uarfcn))
7000
422
    {
7001
        /* CSG_FDD_UARFCN */
7002
422
        if (!gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_3g_csg_desc_technology))
7003
172
        {
7004
172
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_utran_csg_fdd_uarfcn, tvb, curr_bit_offset, 14, ENC_BIG_ENDIAN);
7005
172
            curr_bit_offset += 14;
7006
172
        }
7007
250
        else
7008
250
        {
7009
250
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_utran_csg_tdd_uarfcn, tvb, curr_bit_offset, 14, ENC_BIG_ENDIAN);
7010
250
            curr_bit_offset += 14;
7011
250
        }
7012
422
    }
7013
97
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
7014
7015
97
    return curr_bit_offset - bit_offset;
7016
97
}
7017
7018
static int
7019
de_rr_eutran_csg_desc(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
7020
70
{
7021
70
    proto_tree *subtree;
7022
70
    proto_item *item;
7023
70
    int         curr_bit_offset;
7024
7025
70
    curr_bit_offset = bit_offset;
7026
70
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_EUTRAN_CSG_DESC], &item,
7027
70
                                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_EUTRAN_CSG_DESC]);
7028
7029
678
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_pcid_group))
7030
608
    {
7031
        /* dissect PCID group */
7032
608
        curr_bit_offset += de_rr_eutran_pcid(tvb, subtree, curr_bit_offset);
7033
608
    }
7034
7035
251
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_earfcn))
7036
181
    {
7037
181
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_csg_earfcn, tvb, curr_bit_offset, 16, ENC_BIG_ENDIAN);
7038
181
        curr_bit_offset += 16;
7039
181
    }
7040
70
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
7041
7042
70
    return curr_bit_offset - bit_offset;
7043
70
}
7044
7045
static int
7046
de_rr_eutran_csg_desc_mi(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
7047
0
{
7048
0
    proto_tree *subtree;
7049
0
    proto_item *item;
7050
0
    int         curr_bit_offset;
7051
7052
0
    curr_bit_offset = bit_offset;
7053
0
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_EUTRAN_CSG_DESC], &item,
7054
0
                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_EUTRAN_CSG_DESC]);
7055
7056
0
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_csg_pci_split))
7057
0
    {
7058
        /* dissect PCID group */
7059
0
        curr_bit_offset += de_rr_eutran_pcid(tvb, subtree, curr_bit_offset);
7060
0
    }
7061
0
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
7062
7063
0
    return curr_bit_offset - bit_offset;
7064
0
}
7065
7066
static int
7067
de_rr_utran_measurement_control_param_mi(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
7068
0
{
7069
0
    proto_tree *subtree;
7070
0
    proto_item *item;
7071
0
    int         curr_bit_offset;
7072
7073
0
    curr_bit_offset = bit_offset;
7074
0
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_UTRAN_MEASUREMENT_CONTROL_PARAM_DESC], &item,
7075
0
                                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_UTRAN_MEASUREMENT_CONTROL_PARAM_DESC]);
7076
7077
0
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_utran_frequency_index))
7078
0
    {
7079
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_utran_frequency_index, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
7080
0
        curr_bit_offset += 5;
7081
0
    }
7082
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_3g_control_param_desc_meas_ctrl_utran, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
7083
0
    curr_bit_offset += 1;
7084
7085
0
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
7086
7087
0
    return curr_bit_offset - bit_offset;
7088
0
}
7089
7090
static int
7091
de_rr_3g_supplementary_param_desc_mi(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
7092
0
{
7093
0
    proto_tree *subtree;
7094
0
    proto_item *item;
7095
0
    int         curr_bit_offset;
7096
7097
0
    curr_bit_offset = bit_offset;
7098
0
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_3G_SUPPLEMENTARY_PARAM_DESC], &item,
7099
0
                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_3G_SUPPLEMENTARY_PARAM_DESC]);
7100
7101
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_3g_priority_param_desc_utran_start, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
7102
0
    curr_bit_offset += 1;
7103
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_3g_priority_param_desc_utran_stop, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
7104
0
    curr_bit_offset += 1;
7105
7106
    /* 3G Measurement Control Parameters Description */
7107
0
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_3g_measurement_control_parameters_description))
7108
0
    {
7109
        /* 3G Measurement Control Parameters Description struct */
7110
0
        if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_3g_measurement_control_parameters_description_struct))
7111
0
        {
7112
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_3g_control_param_desc_meas_ctrl_utran, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
7113
0
            curr_bit_offset += 1;
7114
0
        }
7115
0
        while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_repeated_utran_measurement_control_parameters_struct))
7116
0
        {
7117
0
            curr_bit_offset += de_rr_utran_measurement_control_param_mi(tvb, subtree, curr_bit_offset);
7118
0
        }
7119
0
    }
7120
0
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
7121
7122
0
    return curr_bit_offset - bit_offset;
7123
0
}
7124
7125
static uint16_t
7126
de_rr_si2quater_rest_oct(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
7127
854
{
7128
854
    proto_tree  *subtree2, *subtree3;
7129
854
    proto_item  *item2, *item3;
7130
854
    uint32_t     curr_offset;
7131
854
    int          bit_offset, bit_offset_sav, idx;
7132
854
    uint8_t      value;
7133
854
    uint8_t      tvb_len = tvb_reported_length(tvb);
7134
854
    uint16_t     bit_len = tvb_len << 3;
7135
7136
854
    curr_offset = offset;
7137
854
    bit_offset  = curr_offset << 3;
7138
7139
854
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ba_ind, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7140
854
    bit_offset += 1;
7141
854
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_3g_ba_ind, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7142
854
    bit_offset += 1;
7143
854
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_mp_change_mark, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7144
854
    bit_offset += 1;
7145
854
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si2quater_index, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
7146
854
    bit_offset += 4;
7147
854
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si2quater_count, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
7148
854
    bit_offset += 4;
7149
854
    if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_measurement_parameters_description))
7150
318
    { /* Measurement Parameters Description */
7151
318
        bit_offset_sav = bit_offset;
7152
318
        subtree2 = proto_tree_add_subtree(subtree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_MEAS_PARAM_DESC], &item2,
7153
318
                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_MEAS_PARAM_DESC]);
7154
318
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_gsm_report_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7155
318
        bit_offset += 1;
7156
318
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_serving_band_reporting, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
7157
318
        bit_offset += 2;
7158
318
        proto_item_set_len(item2, (bit_offset>>3) - (bit_offset_sav>>3)+1);
7159
318
    }
7160
854
    if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_gprs_real_time_difference_description))
7161
328
    { /* GPRS Real Time Difference Description */
7162
328
        bit_offset += de_rr_rtd_desc(tvb, subtree, bit_offset, DE_RR_REST_OCTETS_GPRS_RTD_DESC);
7163
328
    }
7164
854
    if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_gprs_bsic_description))
7165
334
    { /* GPRS BSIC Description */
7166
334
        bit_offset += de_rr_bsic_desc(tvb, subtree, bit_offset, DE_RR_REST_OCTETS_GPRS_BSIC_DESC);
7167
334
    }
7168
854
    if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_gprs_report_priority_description))
7169
188
    { /* GPRS Report Priority Description */
7170
188
        bit_offset += de_rr_report_priority_desc(tvb, subtree, bit_offset, DE_RR_REST_OCTETS_GPRS_REPORT_PRIO_DESC);
7171
188
    }
7172
854
    if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_gprs_measurement_parameters_description))
7173
172
    { /* GPRS Measurement Parameters Description */
7174
172
        bit_offset += de_rr_meas_param_desc(tvb, subtree, bit_offset, DE_RR_REST_OCTETS_GPRS_MEAS_PARAM_DESC);
7175
172
    }
7176
854
    if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_nc_measurement_parameters))
7177
202
    { /* NC Measurement Parameters */
7178
202
        bit_offset_sav = bit_offset;
7179
202
        subtree2 = proto_tree_add_subtree(subtree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_NC_MEAS_PARAM], &item2,
7180
202
                            gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_NC_MEAS_PARAM]);
7181
202
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_network_control_order, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
7182
202
        bit_offset += 2;
7183
202
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_nc_periods))
7184
127
        {
7185
127
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_nc_non_drx_period, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7186
127
            bit_offset += 3;
7187
127
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_nc_reporting_period_i, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7188
127
            bit_offset += 3;
7189
127
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_nc_reporting_period_t, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7190
127
            bit_offset += 3;
7191
127
        }
7192
202
        proto_item_set_len(item2, (bit_offset>>3) - (bit_offset_sav>>3)+1);
7193
202
    }
7194
854
    if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_si_2quater_extension_information))
7195
213
    { /* SI 2quater Extension Information */
7196
213
        bit_offset_sav = bit_offset;
7197
213
        subtree2 = proto_tree_add_subtree(subtree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_SI2Q_EXT_INFO], &item2,
7198
213
                                gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_SI2Q_EXT_INFO]);
7199
213
        idx = tvb_get_bits8(tvb,bit_offset,8);
7200
213
        proto_tree_add_uint(subtree2, hf_gsm_a_rr_extension_length, tvb, bit_offset>>3, 1, idx);
7201
213
        bit_offset += 8;
7202
213
        proto_item_set_len(item2,((bit_offset+idx+1)>>3) - (bit_offset_sav>>3)+1);
7203
213
        if (gsm_rr_csn_flag(tvb, subtree2, bit_offset++, hf_gsm_a_rr_ccn_support_description))
7204
81
        { /* CCN Support Description */
7205
81
            bit_offset_sav = bit_offset;
7206
81
            subtree3 = proto_tree_add_subtree(subtree2, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_CCN_SUPPORT_DESC], &item3,
7207
81
                                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_CCN_SUPPORT_DESC]);
7208
81
            value = tvb_get_bits8(tvb,bit_offset,7);
7209
81
            proto_tree_add_uint(subtree3, hf_gsm_a_rr_number_cells, tvb, bit_offset>>3, 1, value);
7210
81
            bit_offset += 7;
7211
81
            idx -= 7;
7212
81
            item2 = proto_tree_add_bytes_format(subtree3, hf_gsm_a_rr_ccn_supported, tvb, bit_offset>>3, (value>>3)+1, NULL, "CCN Supported: ");
7213
3.54k
            while (value)
7214
3.46k
            {
7215
3.46k
                proto_item_append_text(item2,"%d",tvb_get_bits8(tvb,bit_offset,1));
7216
3.46k
                bit_offset += 1;
7217
3.46k
                value -= 1;
7218
3.46k
                idx -= 1;
7219
3.46k
            }
7220
81
            proto_item_set_len(item3, (bit_offset>>3) - (bit_offset_sav>>3)+1);
7221
81
        }
7222
213
        bit_offset += idx;
7223
213
    }
7224
854
    if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_3g_neighbour_cell_description))
7225
254
    { /* 3G Neighbour Cell Description */
7226
254
        bit_offset_sav = bit_offset;
7227
254
        subtree2 = proto_tree_add_subtree(subtree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_3G_NEIGH_CELL_DESC], &item2,
7228
254
                                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_3G_NEIGH_CELL_DESC]);
7229
254
        if (gsm_rr_csn_flag(tvb, subtree2, bit_offset++, hf_gsm_a_rr_index_start_3g))
7230
159
        {
7231
159
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_index_start_3g, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
7232
159
            bit_offset += 7;
7233
159
        }
7234
254
        if (gsm_rr_csn_flag(tvb, subtree2, bit_offset++, hf_gsm_a_rr_absolute_index_start_emr))
7235
106
        {
7236
106
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_absolute_index_start_emr, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
7237
106
            bit_offset += 7;
7238
106
        }
7239
254
        if (gsm_rr_csn_flag(tvb, subtree2, bit_offset++, hf_gsm_a_rr_utran_fdd_description))
7240
214
        { /* UTRAN FDD Description */
7241
214
            bit_offset += de_rr_si2quater_meas_info_utran_fdd_desc(tvb, subtree2, bit_offset);
7242
214
        }
7243
254
        if (gsm_rr_csn_flag(tvb, subtree2, bit_offset++, hf_gsm_a_rr_utran_tdd_description))
7244
170
        { /* UTRAN TDD Description */
7245
170
            bit_offset += de_rr_si2quater_meas_info_utran_tdd_desc(tvb, subtree2, bit_offset);
7246
170
        }
7247
254
        proto_item_set_len(item2, (bit_offset>>3) - (bit_offset_sav>>3)+1);
7248
254
    }
7249
854
    if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_3g_measurement_parameters_description))
7250
142
    { /* 3G Measurement Parameters Description */
7251
142
        bit_offset_sav = bit_offset;
7252
142
        subtree2 = proto_tree_add_subtree(subtree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_3G_MEAS_PARAM_DESC], &item2,
7253
142
                                gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_3G_MEAS_PARAM_DESC]);
7254
142
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_qsearch_i, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
7255
142
        bit_offset += 4;
7256
142
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_qsearch_c_initial, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7257
142
        bit_offset += 1;
7258
142
        if (gsm_rr_csn_flag(tvb, subtree2, bit_offset++, hf_gsm_a_rr_fdd_information))
7259
95
        {
7260
95
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_fdd_qoffset, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
7261
95
            bit_offset += 4;
7262
95
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_fdd_rep_quant, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7263
95
            bit_offset += 1;
7264
95
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_fdd_multirat_reporting, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
7265
95
            bit_offset += 2;
7266
95
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_fdd_qmin, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7267
95
            bit_offset += 3;
7268
95
        }
7269
142
        if (gsm_rr_csn_flag(tvb, subtree2, bit_offset++, hf_gsm_a_rr_tdd_information))
7270
26
        {
7271
26
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_tdd_qoffset, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
7272
26
            bit_offset += 4;
7273
26
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_tdd_multirat_reporting, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
7274
26
            bit_offset += 2;
7275
26
        }
7276
142
        proto_item_set_len(item2, (bit_offset>>3) - (bit_offset_sav>>3)+1);
7277
142
    }
7278
854
    if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_gprs_3g_measurement_parameters_description))
7279
109
    { /* GPRS 3G Measurement Parameters Description */
7280
109
        uint8_t reporting_quant = 0;
7281
109
        bit_offset_sav = bit_offset;
7282
109
        subtree2 = proto_tree_add_subtree(subtree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_GPRS_3G_MEAS_PARAM_DESC], &item2,
7283
109
                                gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_GPRS_3G_MEAS_PARAM_DESC]);
7284
109
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_qsearch_p, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
7285
109
        bit_offset += 4;
7286
109
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_3g_search_prio, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7287
109
        bit_offset += 1;
7288
109
        if (gsm_rr_csn_flag(tvb, subtree2, bit_offset++, hf_gsm_a_rr_fdd_parameters))
7289
52
        {
7290
52
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_fdd_rep_quant, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7291
52
            reporting_quant = gsm_rr_csn_flag(tvb, subtree2, bit_offset++, hf_gsm_a_rr_reporting_quantity_present);
7292
52
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_fdd_multirat_reporting, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
7293
52
            bit_offset += 2;
7294
52
        }
7295
109
        if (gsm_rr_csn_flag(tvb, subtree2, bit_offset++, hf_gsm_a_rr_fdd_reporting_parameters))
7296
39
        {
7297
39
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_fdd_reporting_offset, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7298
39
            bit_offset += 3;
7299
39
            if (reporting_quant == 0)
7300
23
            {
7301
23
              proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_fdd_reporting_threshold_rscp, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7302
23
            }
7303
16
            else
7304
16
            {
7305
16
              proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_fdd_reporting_threshold_ecn0, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7306
16
            }
7307
39
            bit_offset += 3;
7308
39
        }
7309
109
        if (gsm_rr_csn_flag(tvb, subtree2, bit_offset++, hf_gsm_a_rr_tdd_multirat_reporting_present))
7310
66
        {
7311
66
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_tdd_multirat_reporting, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
7312
66
            bit_offset += 2;
7313
66
        }
7314
109
        if (gsm_rr_csn_flag(tvb, subtree2, bit_offset++, hf_gsm_a_rr_tdd_reporting_parameters))
7315
58
        {
7316
58
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_tdd_reporting_offset, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7317
58
            bit_offset += 3;
7318
58
            if (reporting_quant == 0)
7319
49
            {
7320
49
              proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_tdd_reporting_threshold_rscp, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7321
49
            }
7322
9
            else
7323
9
            {
7324
9
              proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_tdd_reporting_threshold_ecn0, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7325
9
            }
7326
58
            bit_offset += 3;
7327
58
        }
7328
109
        proto_item_set_len(item2, (bit_offset>>3) - (bit_offset_sav>>3)+1);
7329
109
    }
7330
    /* Null breakpoint */
7331
854
    if (bit_len - bit_offset > 0)
7332
453
    {
7333
        /* There is still room left in the Rest Octets IE */
7334
453
        if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_additions_in_rel_5))
7335
360
        { /* Additions in Rel-5 */
7336
360
            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_3g_additional_measurement_parameters_description))
7337
193
            { /* 3G Additional Measurement Parameters Description */
7338
193
                bit_offset_sav = bit_offset;
7339
193
                subtree2 = proto_tree_add_subtree(subtree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_3G_ADD_MEAS_PARAM_DESC], &item2,
7340
193
                                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_3G_ADD_MEAS_PARAM_DESC]);
7341
193
                proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_fdd_qmin_offset, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7342
193
                bit_offset += 3;
7343
193
                proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_fdd_rscpmin, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
7344
193
                bit_offset += 4;
7345
193
                proto_item_set_len(item2, (bit_offset>>3) - (bit_offset_sav>>3)+1);
7346
193
            }
7347
360
            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_3g_additional_measurement_parameters_description_2))
7348
193
            { /* 3G Additional Measurement Parameters Description 2 */
7349
193
                bit_offset += de_rr_3g_add_meas_param_desc2(tvb, subtree, bit_offset);
7350
193
            }
7351
            /* Null breakpoint */
7352
360
            if (bit_len - bit_offset > 0)
7353
355
            {
7354
                /* There is still room left in the Rest Octets IE */
7355
355
                if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_additions_in_rel_6))
7356
303
                { /* Additions in Rel-6 */
7357
303
                    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_3g_ccn_active, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7358
303
                    bit_offset += 1;
7359
7360
                    /* Null breakpoint */
7361
303
                    if (bit_len - bit_offset > 0)
7362
302
                    {
7363
                        /* There is still room left in the Rest Octets IE */
7364
302
                        if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_additions_in_rel_7))
7365
273
                        { /* Additions in Rel-7 */
7366
273
                            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_700_reporting))
7367
48
                            {
7368
48
                                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_700_reporting_offset, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7369
48
                                bit_offset += 3;
7370
48
                                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_700_reporting_threshold, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7371
48
                                bit_offset += 3;
7372
48
                            }
7373
273
                            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_810_reporting))
7374
87
                            {
7375
87
                                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_810_reporting_offset, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7376
87
                                bit_offset += 3;
7377
87
                                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_810_reporting_threshold, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7378
87
                                bit_offset += 3;
7379
87
                            }
7380
7381
                            /* Null breakpoint */
7382
273
                            if (bit_len - bit_offset > 0)
7383
270
                            {
7384
                              /* There is still room left in the Rest Octets IE */
7385
270
                              if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_additions_in_rel_8))
7386
264
                              { /* Additions in Rel-8 */
7387
264
                                if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_priority_and_eutran_param_description))
7388
239
                                {
7389
239
                                  bit_offset += de_rr_priority_and_eutran_param_desc(tvb, subtree, bit_offset);
7390
239
                                }
7391
264
                                if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_3g_csg_description))
7392
97
                                {
7393
97
                                  bit_offset += de_rr_3g_csg_desc(tvb, subtree, bit_offset);
7394
97
                                }
7395
264
                                if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_eutran_csg_description))
7396
70
                                {
7397
70
                                  bit_offset += de_rr_eutran_csg_desc(tvb, subtree, bit_offset);
7398
70
                                }
7399
264
                              }
7400
270
                            }
7401
273
                        }
7402
302
                    }
7403
303
                }
7404
355
            }
7405
360
        }
7406
453
    }
7407
854
    gsm_rr_padding_bits(subtree, tvb, bit_offset, tvb_len, PADDING_BYTE);
7408
854
    return tvb_len - offset;
7409
854
}
7410
7411
/*
7412
 * [3] 10.5.2.34 SI 3 Rest Octets
7413
 */
7414
static const value_string gsm_a_rr_temporary_offset_vals[] = {
7415
    { 0, "0 dB"},
7416
    { 1, "10 dB"},
7417
    { 2, "20 dB"},
7418
    { 3, "30 dB"},
7419
    { 4, "40 dB"},
7420
    { 5, "50 dB"},
7421
    { 6, "60 dB"},
7422
    { 7, "infinity"},
7423
    { 0, NULL }
7424
};
7425
7426
static const value_string gsm_a_rr_cell_reselect_offset_vals[] = {
7427
    { 0, "0 dB"},
7428
    { 1, "2 dB"},
7429
    { 2, "4 dB"},
7430
    { 3, "6 dB"},
7431
    { 4, "8 dB"},
7432
    { 5, "10 dB"},
7433
    { 6, "12 dB"},
7434
    { 7, "14 dB"},
7435
    { 8, "16 dB"},
7436
    { 9, "18 dB"},
7437
    {10, "20 dB"},
7438
    {11, "22 dB"},
7439
    {12, "24 dB"},
7440
    {13, "26 dB"},
7441
    {14, "28 dB"},
7442
    {15, "30 dB"},
7443
    {16, "32 dB"},
7444
    {17, "34 dB"},
7445
    {18, "36 dB"},
7446
    {19, "38 dB"},
7447
    {20, "40 dB"},
7448
    {21, "42 dB"},
7449
    {22, "44 dB"},
7450
    {23, "46 dB"},
7451
    {24, "48 dB"},
7452
    {25, "50 dB"},
7453
    {26, "52 dB"},
7454
    {27, "54 dB"},
7455
    {28, "56 dB"},
7456
    {29, "58 dB"},
7457
    {30, "60 dB"},
7458
    {31, "62 dB"},
7459
    {32, "64 dB"},
7460
    {33, "66 dB"},
7461
    {34, "68 dB"},
7462
    {35, "70 dB"},
7463
    {36, "72 dB"},
7464
    {37, "74 dB"},
7465
    {38, "76 dB"},
7466
    {39, "78 dB"},
7467
    {40, "80 dB"},
7468
    {41, "82 dB"},
7469
    {42, "84 dB"},
7470
    {43, "86 dB"},
7471
    {44, "88 dB"},
7472
    {45, "90 dB"},
7473
    {46, "92 dB"},
7474
    {47, "94 dB"},
7475
    {48, "96 dB"},
7476
    {49, "98 dB"},
7477
    {50, "100 dB"},
7478
    {51, "102 dB"},
7479
    {52, "104 dB"},
7480
    {53, "106 dB"},
7481
    {54, "108 dB"},
7482
    {55, "110 dB"},
7483
    {56, "112 dB"},
7484
    {57, "114 dB"},
7485
    {58, "116 dB"},
7486
    {59, "118 dB"},
7487
    {60, "120 dB"},
7488
    {61, "122 dB"},
7489
    {62, "124 dB"},
7490
    {63, "126 dB"},
7491
    { 0, NULL }
7492
};
7493
static value_string_ext gsm_a_rr_cell_reselect_offset_vals_ext = VALUE_STRING_EXT_INIT(gsm_a_rr_cell_reselect_offset_vals);
7494
7495
7496
static const value_string gsm_a_rr_penalty_time_vals[] = {
7497
    { 0, "20 s"},
7498
    { 1, "40 s"},
7499
    { 2, "60 s"},
7500
    { 3, "80 s"},
7501
    { 4, "100 s"},
7502
    { 5, "120 s"},
7503
    { 6, "140 s"},
7504
    { 7, "160 s"},
7505
    { 8, "180 s"},
7506
    { 9, "200 s"},
7507
    {10, "220 s"},
7508
    {11, "240 s"},
7509
    {12, "260 s"},
7510
    {13, "280 s"},
7511
    {14, "300 s"},
7512
    {15, "320 s"},
7513
    {16, "340 s"},
7514
    {17, "360 s"},
7515
    {18, "380 s"},
7516
    {19, "400 s"},
7517
    {20, "420 s"},
7518
    {21, "440 s"},
7519
    {22, "460 s"},
7520
    {23, "480 s"},
7521
    {24, "500 s"},
7522
    {25, "520 s"},
7523
    {26, "540 s"},
7524
    {27, "560 s"},
7525
    {28, "580 s"},
7526
    {29, "600 s"},
7527
    {30, "620 s"},
7528
    {31, "Cell Reselect Offset is subtracted from C2 and Temporary Offset is ignored"},
7529
    { 0, NULL }
7530
};
7531
7532
static int
7533
de_rr_rest_oct_opt_sel_param(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
7534
534
{
7535
534
    proto_tree *subtree;
7536
534
    proto_item *item;
7537
534
    int         curr_bit_offset;
7538
7539
534
    curr_bit_offset = bit_offset;
7540
7541
534
    if (gsm_rr_csn_HL_flag(tvb, tree, 0, curr_bit_offset++, hf_gsm_a_rr_selection_parameters))
7542
180
    { /* Selection Parameters */
7543
180
        subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_OPTIONAL_SEL_PARAM], &item,
7544
180
                            gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_OPTIONAL_SEL_PARAM]);
7545
180
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_cbq, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
7546
180
        curr_bit_offset += 1;
7547
180
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_cell_reselect_offset, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
7548
180
        curr_bit_offset += 6;
7549
180
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_temporary_offset, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
7550
180
        curr_bit_offset += 3;
7551
180
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_penalty_time, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
7552
180
        curr_bit_offset += 5;
7553
180
        proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
7554
180
    }
7555
7556
534
    return (curr_bit_offset - bit_offset);
7557
534
}
7558
7559
static const value_string gsm_a_rr_si13_position_vals[] = {
7560
    { 0, "SYSTEM INFORMATION TYPE 13 message is sent on BCCH Norm"},
7561
    { 1, "SYSTEM INFORMATION TYPE 13 message is sent on BCCH Ext"},
7562
    { 0, NULL }
7563
};
7564
7565
static int
7566
de_rr_rest_oct_gprs_indicator(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
7567
275
{
7568
275
    proto_tree *subtree;
7569
275
    int         curr_bit_offset;
7570
7571
275
    curr_bit_offset = bit_offset;
7572
7573
275
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, 1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_GPRS_INDICATOR], NULL,
7574
275
                            gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_GPRS_INDICATOR]);
7575
275
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_gprs_ra_colour, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
7576
275
    curr_bit_offset += 3;
7577
275
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si13_position, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
7578
275
    curr_bit_offset += 1;
7579
7580
275
    return (curr_bit_offset - bit_offset);
7581
275
}
7582
7583
static const value_string gsm_a_rr_power_offset_vals[] = {
7584
    { 0, "0 dB"},
7585
    { 1, "2 dB"},
7586
    { 2, "4 dB"},
7587
    { 3, "8 dB"},
7588
    { 0, NULL }
7589
};
7590
7591
static const true_false_string gsm_a_rr_si2quater_position_value = {
7592
    "SYSTEM INFORMATION TYPE 2 quater message is sent on BCCH Ext",
7593
    "SYSTEM INFORMATION TYPE 2 quater message is sent on BCCH Norm"
7594
};
7595
7596
static const true_false_string gsm_a_rr_si13alt_position_value = {
7597
    "If Iu mode is supported in the cell, SYSTEM INFORMATION TYPE 13alt message is sent on BCCH Ext",
7598
    "If Iu mode is supported in the cell, SYSTEM INFORMATION TYPE 13alt message is sent on BCCH Norm"
7599
};
7600
7601
static const true_false_string gsm_a_rr_si21_position_value = {
7602
    "SYSTEM INFORMATION TYPE 21 message is sent on BCCH Ext",
7603
    "SYSTEM INFORMATION TYPE 21 message is sent on BCCH Norm"
7604
    };
7605
7606
static uint16_t
7607
de_rr_si3_rest_oct(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
7608
172
{
7609
172
    uint32_t curr_offset;
7610
172
    int      bit_offset;
7611
172
    bool gprs_indicator;
7612
172
    uint8_t  tvb_len = tvb_reported_length(tvb);
7613
7614
172
    curr_offset = offset;
7615
172
    bit_offset = curr_offset << 3;
7616
7617
172
    bit_offset += de_rr_rest_oct_opt_sel_param(tvb, subtree, bit_offset);
7618
7619
172
    if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_power_offset_present))
7620
57
    { /* Optional Power Offset */
7621
57
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_power_offset, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
7622
57
        bit_offset += 2;
7623
57
    }
7624
172
    (void) gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_system_information_type_2ter);
7625
172
    (void) gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_early_classmark_sending);
7626
172
    if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_scheduling_if_and_where))
7627
72
    { /* Scheduling if and where */
7628
72
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_where, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7629
72
        bit_offset += 3;
7630
72
    }
7631
172
    gprs_indicator = gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_gprs_indicator);
7632
172
    if (gprs_indicator)
7633
59
    { /* GPRS indicator */
7634
59
        bit_offset += de_rr_rest_oct_gprs_indicator(tvb, subtree, bit_offset);
7635
59
    }
7636
172
    (void) gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_3g_early_classmark_sending_restriction);
7637
172
    if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_si2quater_indicator))
7638
71
    { /* SI2quater Indicator */
7639
71
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si2quater_position, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7640
71
        bit_offset += 1;
7641
71
    }
7642
172
    if (gprs_indicator == false)
7643
113
    {
7644
113
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si13alt_position, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7645
113
        bit_offset += 1;
7646
113
    }
7647
172
    if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_si21_indicator))
7648
62
        { /* SI21 Indicator */
7649
62
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si21_position, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7650
62
        bit_offset += 1;
7651
62
    }
7652
172
    gsm_rr_padding_bits(subtree, tvb, bit_offset, tvb_len, PADDING_BYTE);
7653
172
    return tvb_len - offset;
7654
172
}
7655
7656
/*
7657
 * [3] 10.5.2.32 SI 4 Rest Octets
7658
 */
7659
static const value_string gsm_a_rr_prio_thr_vals[] = {
7660
    { 0, "0 dB"},
7661
    { 1, "6 dB"},
7662
    { 2, "12 dB"},
7663
    { 3, "18 dB"},
7664
    { 4, "24 dB"},
7665
    { 5, "30 dB"},
7666
    { 6, "36 dB"},
7667
    { 7, "Infinite"},
7668
    { 0, NULL }
7669
};
7670
7671
static const value_string gsm_a_rr_lsa_offset_vals[] = {
7672
    { 0, "0 dB"},
7673
    { 1, "4 dB"},
7674
    { 2, "8 dB"},
7675
    { 3, "16 dB"},
7676
    { 4, "24 dB"},
7677
    { 5, "32 dB"},
7678
    { 6, "48 dB"},
7679
    { 7, "64 dB"},
7680
    { 0, NULL }
7681
};
7682
7683
static uint16_t
7684
de_rr_si4_rest_oct(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
7685
362
{
7686
362
    proto_tree *subtree2, *subtree3;
7687
362
    proto_item *item2, *item3;
7688
362
    uint32_t    curr_offset;
7689
362
    int         bit_offset, bit_offset_sav;
7690
362
    uint8_t     tvb_len = tvb_reported_length(tvb);
7691
362
    uint16_t    bit_len = tvb_len << 3;
7692
7693
362
    curr_offset = offset;
7694
362
    bit_offset = curr_offset << 3;
7695
7696
362
    subtree2 = proto_tree_add_subtree(subtree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_SI4_REST_OCTETS_O], &item2,
7697
362
                            gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_SI4_REST_OCTETS_O]);
7698
7699
362
    bit_offset += de_rr_rest_oct_opt_sel_param(tvb, subtree2, bit_offset);
7700
7701
362
    if (gsm_rr_csn_HL_flag(tvb, subtree2, bit_len, bit_offset++, hf_gsm_a_rr_power_offset_present))
7702
89
    { /* Optional Power Offset */
7703
89
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_power_offset, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
7704
89
        bit_offset += 2;
7705
89
    }
7706
362
    if (gsm_rr_csn_HL_flag(tvb, subtree2, bit_len, bit_offset++, hf_gsm_a_rr_gprs_indicator))
7707
216
    {
7708
216
        bit_offset += de_rr_rest_oct_gprs_indicator(tvb, subtree2, bit_offset);
7709
216
    }
7710
362
    proto_item_set_len(item2,(bit_offset>>3) + 1 - curr_offset);
7711
7712
362
    if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_rr_si4_rest_octets_s))
7713
236
    { /* SI4 Rest Octets_S */
7714
236
        bit_offset_sav = bit_offset;
7715
236
        subtree2 = proto_tree_add_subtree(subtree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_SI4_REST_OCTETS_S], &item2,
7716
236
                                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_SI4_REST_OCTETS_S]);
7717
7718
236
        if (gsm_rr_csn_HL_flag(tvb, subtree2, bit_len, bit_offset++, hf_gsm_a_rr_lsa_parameters))
7719
58
        { /* LSA Parameters */
7720
58
            subtree3 = proto_tree_add_subtree(subtree2, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_LSA_PARAMETERS], &item3,
7721
58
                                gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_LSA_PARAMETERS]);
7722
58
            proto_tree_add_bits_item(subtree3, hf_gsm_a_rr_prio_thr, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7723
58
            bit_offset += 3;
7724
58
            proto_tree_add_bits_item(subtree3, hf_gsm_a_rr_lsa_offset, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7725
58
            bit_offset += 3;
7726
58
            if (gsm_rr_csn_flag(tvb,subtree3, bit_offset++, hf_gsm_a_rr_mcc_mnc_parameters))
7727
26
            {
7728
26
                proto_tree_add_bits_item(subtree3, hf_gsm_a_rr_mcc, tvb, bit_offset, 12, ENC_BIG_ENDIAN);
7729
26
                bit_offset += 12;
7730
26
                proto_tree_add_bits_item(subtree3, hf_gsm_a_rr_mnc, tvb, bit_offset, 12, ENC_BIG_ENDIAN);
7731
26
                bit_offset += 12;
7732
26
            }
7733
58
            proto_item_set_len(item2, (bit_offset>>3) - (bit_offset_sav>>3)+1);
7734
58
        }
7735
7736
236
        if (gsm_rr_csn_HL_flag(tvb, subtree2, bit_len, bit_offset++, hf_gsm_a_rr_cell_id_present))
7737
68
        { /* Cell Identity */
7738
68
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_cell_id, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
7739
68
            bit_offset += 16;
7740
68
        }
7741
7742
236
        if (gsm_rr_csn_HL_flag(tvb, subtree2, bit_len, bit_offset++, hf_gsm_a_rr_lsa_id_information))
7743
157
        { /* LSA ID information */
7744
157
            subtree3 = proto_tree_add_subtree(subtree2, tvb, bit_offset>>3, len, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_LSA_ID_INFO], &item3,
7745
157
                                                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_LSA_ID_INFO]);
7746
157
            do
7747
224
            {
7748
224
                if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_lsa_id_type))
7749
123
                {
7750
123
                    proto_tree_add_bits_item(subtree3, hf_gsm_a_rr_short_lsa_id, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
7751
123
                    bit_offset += 10;
7752
123
                }
7753
101
                else
7754
101
                {
7755
101
                    proto_tree_add_bits_item(subtree3, hf_gsm_a_rr_lsa_id, tvb, bit_offset, 24, ENC_BIG_ENDIAN);
7756
101
                    bit_offset += 24;
7757
101
                }
7758
224
            } while (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_additional_lsa_id));
7759
157
        }
7760
236
        if (gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_rr_cbq3_present))
7761
119
        {
7762
119
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_cbq3, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
7763
119
            bit_offset += 3;
7764
119
        }
7765
236
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_si13alt_position_present))
7766
84
        {
7767
84
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si13alt_position, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7768
84
            bit_offset += 1;
7769
84
        }
7770
236
        proto_item_set_len(item2, (bit_offset>>3) - (bit_offset_sav>>3)+1);
7771
236
    }
7772
126
    else
7773
126
    { /* Break indicator */
7774
126
        (void) gsm_rr_csn_HL_flag(tvb, subtree, bit_len, bit_offset++, hf_gsm_a_rr_break_indicator);
7775
126
    }
7776
    /* Truncation allowed (see 44.018 section 8.9 */
7777
362
    gsm_rr_padding_bits(subtree, tvb, bit_offset, tvb_len, PADDING_BYTE);
7778
362
    return tvb_len - offset;
7779
362
}
7780
7781
/*
7782
 * [3] 10.5.2.35a SI 6 Rest Octets
7783
 */
7784
static const true_false_string gsm_a_rr_paging_channel_restructuring_value = {
7785
    "Paging channel is restructured",
7786
    "Paging channel is not restructured"
7787
};
7788
7789
static const true_false_string gsm_a_rr_vbs_vgcs_inband_notifications_value = {
7790
    "The mobile shall be notified on incoming high priority VBS/VGCS calls through NOTIFICATION/FACCH, the mobile need not to inspect the NCH",
7791
    "The network does not provide notification on FACCH so that the mobile should inspect the NCH for notifications"
7792
};
7793
7794
static const true_false_string gsm_a_rr_vbs_vgcs_inband_pagings_value = {
7795
    "The mobile shall be notified on incoming high priority point-to-point calls through NOTIFICATION/FACCH, the mobile need not to inspect the PCH",
7796
    "The network does not provide paging information on FACCH so that the mobile should inspect the PCH for pagings"
7797
};
7798
7799
static const value_string gsm_a_rr_max_lapdm_vals[] = {
7800
    { 0, "Any message segmented in up to 5 LAPDm frames"},
7801
    { 1, "Any message segmented in up to 6 LAPDm frames"},
7802
    { 2, "Any message segmented in up to 7 LAPDm frames"},
7803
    { 3, "Any message segmented in up to 8 LAPDm frames"},
7804
    { 4, "Any message segmented in up to 9 LAPDm frames"},
7805
    { 5, "Any message segmented in up to 10 LAPDm frames"},
7806
    { 6, "Any message segmented in up to 11 LAPDm frames"},
7807
    { 7, "Any message segmented in up to 12 LAPDm frames"},
7808
    { 0, NULL }
7809
};
7810
7811
static const true_false_string gsm_a_rr_dedicated_mode_mbms_notification_support_value = {
7812
    "The cell supports the Dedicated Mode MBMS Notification procedures",
7813
    "The cell does not support the Dedicated Mode MBMS Notification procedures"
7814
};
7815
7816
static const true_false_string gsm_a_rr_mnci_support_value = {
7817
    "The cell supports the distribution of MBMS NEIGHBOURING CELL INFORMATION messages",
7818
    "The cell does not support the distribution of MBMS NEIGHBOURING CELL INFORMATION messages"
7819
};
7820
7821
static uint16_t
7822
de_rr_si6_rest_oct(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
7823
125
{
7824
125
    proto_tree *subtree2;
7825
125
    proto_item *item2;
7826
125
    uint32_t    curr_offset;
7827
125
    int         bit_offset, bit_offset_sav;
7828
125
    uint8_t     value;
7829
125
    uint8_t     tvb_len = tvb_reported_length(tvb);
7830
7831
125
    curr_offset = offset;
7832
125
    bit_offset = curr_offset << 3;
7833
7834
125
    if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_pch_and_nch_info))
7835
33
    { /* PCH and NCH Info */
7836
33
        bit_offset_sav = bit_offset;
7837
33
        subtree2 = proto_tree_add_subtree(subtree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_PCH_AND_NCH_INFO], &item2,
7838
33
                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_PCH_AND_NCH_INFO]);
7839
33
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_paging_channel_restructuring, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7840
33
        bit_offset += 1;
7841
33
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_nln_sacch, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
7842
33
        bit_offset += 2;
7843
33
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_call_prio_present))
7844
16
        {
7845
16
            proto_tree_add_bits_item(subtree2, hf_gsm_a_call_prio, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7846
16
            bit_offset += 3;
7847
16
        }
7848
33
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_nln_status_sacch, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7849
33
        bit_offset += 1;
7850
33
        proto_item_set_len(item2, (bit_offset>>3) - (bit_offset_sav>>3)+1);
7851
33
    }
7852
125
    if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_vbs_vgcs_options))
7853
35
    { /* VBS/VGCS options */
7854
35
        bit_offset_sav = bit_offset;
7855
35
        subtree2 = proto_tree_add_subtree(subtree, tvb,bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_VBS_VGCS_OPTIONS], &item2,
7856
35
                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_VBS_VGCS_OPTIONS]);
7857
35
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_vbs_vgcs_inband_notifications, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7858
35
        bit_offset += 1;
7859
35
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_vbs_vgcs_inband_pagings, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7860
35
        bit_offset += 1;
7861
35
        proto_item_set_len(item2, (bit_offset>>3) - (bit_offset_sav>>3)+1);
7862
35
    }
7863
125
    value = gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_dtm);
7864
125
    if (value == true)
7865
89
    {
7866
89
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rac, tvb, bit_offset, 8, ENC_BIG_ENDIAN);
7867
89
        bit_offset += 8;
7868
89
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_max_lapdm, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
7869
89
        bit_offset += 3;
7870
89
    }
7871
125
    (void) gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_band_indicator);
7872
125
    if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_gprs_ms_txpwr_max_ccch_present))
7873
86
    {
7874
86
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_gprs_ms_txpwr_max_ccch, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
7875
86
        bit_offset += 5;
7876
86
    }
7877
125
    if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_mbms_procedures))
7878
48
    { /* MBMS Procedures */
7879
48
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_dedicated_mode_mbms_notification_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7880
48
        bit_offset += 1;
7881
48
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_mnci_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
7882
48
        bit_offset += 1;
7883
48
    }
7884
125
    if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_additions_in_rel_7))
7885
60
    { /* Additions in Release 7 */
7886
60
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_amr_config_present))
7887
12
        {
7888
12
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_amr_config, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
7889
12
            bit_offset += 4;
7890
12
        }
7891
60
    }
7892
125
    if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_rand_bit_stream_ind))
7893
47
    { /* H < Random bit stream : bit **> */
7894
47
        proto_tree_add_bytes_format_value(subtree, hf_gsm_a_rr_padding, tvb,
7895
47
                                          bit_offset >> 3, -1, NULL,
7896
47
                                          "random bit stream");
7897
47
    }
7898
78
    else
7899
78
    { /* L <spare padding> -- (no randomization) */
7900
78
        gsm_rr_padding_bits(subtree, tvb, bit_offset, tvb_len, PADDING_BYTE);
7901
78
    }
7902
125
    return tvb_len - offset;
7903
125
}
7904
7905
/* [3] 10.5.2.36 SI 7 Rest Octets
7906
 * [3] 10.5.2.37 SI 8 Rest Octets
7907
 * [3] 10.5.2.37a SI 9 Rest Octets
7908
 */
7909
7910
/*
7911
 * [3] 10.5.2.37b SI 13 Rest Octets
7912
 */
7913
static const value_string gsm_a_rr_si_change_field_vals[] = {
7914
    {  0, "Update of unspecified SI message or SI messages"},
7915
    {  1, "Update of SI1 message"},
7916
    {  2, "Update of SI2, SI2 bis or SI2 ter message or any instance of SI2quater messages"},
7917
    {  3, "Update of SI3, SI4, SI7, SI8, SI16 or SI17 message"},
7918
    {  4, "Update of SI9 message"},
7919
    {  5, "Update of SI18 or SI20 message"},
7920
    {  6, "Update of SI19 message"},
7921
    {  7, "Update of SI15 message"},
7922
    {  8, "Update of SI2n message"},
7923
    {  9, "Update of unknown SI message type"},
7924
    { 10, "Update of unknown SI message type"},
7925
    { 11, "Update of unknown SI message type"},
7926
    { 12, "Update of unknown SI message type"},
7927
    { 13, "Update of unknown SI message type"},
7928
    { 14, "Update of unknown SI message type"},
7929
    { 15, "Update of unknown SI message type"},
7930
    {  0, NULL }
7931
};
7932
7933
static const value_string gsm_a_rr_psi1_repeat_period_vals[] = {
7934
    {  0, "1 multiframe"},
7935
    {  1, "2 multiframes"},
7936
    {  2, "3 multiframes"},
7937
    {  3, "4 multiframes"},
7938
    {  4, "5 multiframes"},
7939
    {  5, "6 multiframes"},
7940
    {  6, "7 multiframes"},
7941
    {  7, "8 multiframes"},
7942
    {  8, "9 multiframes"},
7943
    {  9, "10 multiframes"},
7944
    { 10, "11 multiframes"},
7945
    { 11, "12 multiframes"},
7946
    { 12, "13 multiframes"},
7947
    { 13, "14 multiframes"},
7948
    { 14, "15 multiframes"},
7949
    { 15, "16 multiframes"},
7950
    {  0, NULL }
7951
};
7952
7953
static const value_string gsm_a_rr_pbcch_pb_vals[] = {
7954
    {  0, "0 dB"},
7955
    {  1, "-2 dB"},
7956
    {  2, "-4 dB"},
7957
    {  3, "-6 dB"},
7958
    {  4, "-8 dB"},
7959
    {  5, "-10 dB"},
7960
    {  6, "-12 dB"},
7961
    {  7, "-14 dB"},
7962
    {  8, "-16 dB"},
7963
    {  9, "-18 dB"},
7964
    { 10, "-20 dB"},
7965
    { 11, "-22 dB"},
7966
    { 12, "-24 dB"},
7967
    { 13, "-26 dB"},
7968
    { 14, "-28 dB"},
7969
    { 15, "-30 dB"},
7970
    {  0, NULL }
7971
};
7972
7973
static const true_false_string gsm_a_rr_spgc_ccch_sup_value = {
7974
    "SPLIT_PG_CYCLE is supported on CCCH in this cell",
7975
    "SPLIT_PG_CYCLE is not supported on CCCH in this cell"
7976
};
7977
7978
static const value_string gsm_a_rr_priority_access_thr_vals[] = {
7979
    {  0, "Packet access is not allowed in the cell"},
7980
    {  1, "Packet access is not allowed in the cell"},
7981
    {  2, "Packet access is not allowed in the cell"},
7982
    {  3, "Packet access is allowed for priority level 1"},
7983
    {  4, "Packet access is allowed for priority level 1 to 2"},
7984
    {  5, "Packet access is allowed for priority level 1 to 3"},
7985
    {  6, "Packet access is allowed for priority level 1 to 4"},
7986
    {  7, "Packet access is allowed for priority level 1 to 4"},
7987
    {  0, NULL }
7988
};
7989
7990
static int
7991
de_rr_rest_oct_gprs_mobile_allocation(tvbuff_t *tvb, proto_tree *tree, int bit_offset)
7992
175
{
7993
175
    proto_tree *subtree;
7994
175
    proto_item *item;
7995
175
    int         curr_bit_offset;
7996
175
    uint8_t     value;
7997
175
    uint64_t    ma_length;
7998
7999
175
    curr_bit_offset = bit_offset;
8000
8001
175
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_GPRS_MOBILE_ALLOC], &item,
8002
175
                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_GPRS_MOBILE_ALLOC]);
8003
175
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_hsn, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
8004
175
    curr_bit_offset += 6;
8005
502
    while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_rfl_number_present))
8006
327
    {
8007
327
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rfl_number, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
8008
327
        curr_bit_offset += 4;
8009
327
    }
8010
175
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_gprs_mobile_allocation))
8011
47
    {
8012
97
        while (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_arfcn_index_list))
8013
50
        {
8014
50
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_arfcn_index, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
8015
50
            curr_bit_offset += 6;
8016
50
        }
8017
47
    }
8018
128
    else
8019
128
    {
8020
128
        proto_tree_add_bits_ret_val(subtree, hf_gsm_a_rr_ma_length, tvb, curr_bit_offset, 6, &ma_length, ENC_BIG_ENDIAN);
8021
128
        curr_bit_offset += 6;
8022
128
        value = (int)ma_length + 1;
8023
128
        item = proto_tree_add_bytes_format(subtree, hf_gsm_a_rr_ma_bitmap, tvb, curr_bit_offset>>3, (value>>3)+1, NULL, "MA Bitmap: ");
8024
1.68k
        while (value)
8025
1.55k
        {
8026
1.55k
            proto_item_append_text(item,"%d",tvb_get_bits8(tvb,curr_bit_offset,1));
8027
1.55k
            curr_bit_offset += 1;
8028
1.55k
            value -= 1;
8029
1.55k
        }
8030
128
    }
8031
175
    proto_item_set_len(item,((curr_bit_offset>>3) - (bit_offset>>3) + 1));
8032
8033
175
    return (curr_bit_offset - bit_offset);
8034
175
}
8035
8036
static const value_string gsm_a_rr_nmo_vals[] = {
8037
    { 0, "Network Mode of Operation I"},
8038
    { 1, "Network Mode of Operation II"},
8039
    { 2, "Network Mode of Operation III"},
8040
    { 3, "Reserved"},
8041
    { 0, NULL }
8042
};
8043
8044
static const value_string gsm_a_rr_t3168_vals[] = {
8045
    { 0, "500 ms"},
8046
    { 1, "1000 ms"},
8047
    { 2, "1500 ms"},
8048
    { 3, "2000 ms"},
8049
    { 4, "2500 ms"},
8050
    { 5, "3000 ms"},
8051
    { 6, "3500 ms"},
8052
    { 7, "4000 ms"},
8053
    { 0, NULL }
8054
};
8055
8056
static const value_string gsm_a_rr_t3192_vals[] = {
8057
    { 0, "500 ms"},
8058
    { 1, "1000 ms"},
8059
    { 2, "1500 ms"},
8060
    { 3, "0 ms"},
8061
    { 4, "80 ms"},
8062
    { 5, "120 ms"},
8063
    { 6, "160 ms"},
8064
    { 7, "200 ms"},
8065
    { 0, NULL }
8066
};
8067
8068
static const value_string gsm_a_rr_drx_timer_max_vals[] = {
8069
    { 0, "0 s"},
8070
    { 1, "1 s"},
8071
    { 2, "2 s"},
8072
    { 3, "4 s"},
8073
    { 4, "8 s"},
8074
    { 5, "16 s"},
8075
    { 6, "32 s"},
8076
    { 7, "64 s"},
8077
    { 0, NULL }
8078
};
8079
8080
static const true_false_string gsm_a_rr_access_burst_type_value = {
8081
    "11-bit format shall be used",
8082
    "8-bit format shall be used"
8083
};
8084
8085
static const true_false_string gsm_a_rr_control_ack_type_value = {
8086
    "Default format is RLC/MAC control block",
8087
    "Default format is four access bursts"
8088
};
8089
8090
static const value_string gsm_a_rr_pan_max_vals[] = {
8091
    { 0, "maximum value allowed for counter N3102 is 4"},
8092
    { 1, "maximum value allowed for counter N3102 is 8"},
8093
    { 2, "maximum value allowed for counter N3102 is 12"},
8094
    { 3, "maximum value allowed for counter N3102 is 16"},
8095
    { 4, "maximum value allowed for counter N3102 is 20"},
8096
    { 5, "maximum value allowed for counter N3102 is 24"},
8097
    { 6, "maximum value allowed for counter N3102 is 28"},
8098
    { 7, "maximum value allowed for counter N3102 is 32"},
8099
    { 0, NULL }
8100
};
8101
8102
static const true_false_string gsm_a_rr_egprs_packet_channel_request_value = {
8103
    "Use two phase packet access with PACKET CHANNEL REQUEST message for uplink TBF establishment on the PRACH",
8104
    "Use EGPRS PACKET CHANNEL REQUEST message for uplink TBF establishment on the PRACH"
8105
};
8106
8107
static const value_string gsm_a_rr_bep_period_vals[] = {
8108
    {  0, "1"},
8109
    {  1, "2"},
8110
    {  2, "3"},
8111
    {  3, "4"},
8112
    {  4, "5"},
8113
    {  5, "7"},
8114
    {  6, "10"},
8115
    {  7, "12"},
8116
    {  8, "15"},
8117
    {  9, "20"},
8118
    { 10, "25"},
8119
    { 11, "Reserved"},
8120
    { 12, "Reserved"},
8121
    { 13, "Reserved"},
8122
    { 14, "Reserved"},
8123
    { 15, "Reserved"},
8124
    {  0, NULL }
8125
};
8126
8127
static const true_false_string gsm_a_rr_pfc_feature_mode_value = {
8128
    "The network supports packet flow context procedures",
8129
    "The network does not support packet flow context procedures"
8130
};
8131
8132
static const true_false_string gsm_a_rr_dtm_support_value = {
8133
    "The cell supports DTM procedures",
8134
    "The cell does not support DTM procedures"
8135
};
8136
8137
static const true_false_string gsm_a_rr_bss_paging_coordination_value = {
8138
    "The cell supports Circuit-Switched paging coordination",
8139
    "The cell does not support Circuit-Switched paging coordination"
8140
};
8141
8142
static const true_false_string gsm_a_rr_ccn_active_value = {
8143
    "CCN is enabled in the cell",
8144
    "CCN is disabled in the cell"
8145
};
8146
8147
static const true_false_string gsm_a_rr_nw_ext_utbf_value = {
8148
    "The extended uplink TBF mode is supported by the network",
8149
    "The extended uplink TBF mode is not supported by the network"
8150
};
8151
8152
static const true_false_string gsm_a_rr_multiple_tbf_capability_value = {
8153
    "The cell supports multiple TBF procedures",
8154
    "The cell does not support multiple TBF procedures"
8155
};
8156
8157
static const true_false_string gsm_a_rr_ext_utbf_no_data_value = {
8158
    "The mobile station may refrain from sending a PACKET UPLINK DUMMY CONTROL BLOCK message when there is no other RLC/MAC block ready to send in an uplink radio block allocated by the network",
8159
    "The mobile station shall send a PACKET UPLINK DUMMY CONTROL BLOCK message when there is no other RLC/MAC block ready to send in an uplink radio block allocated by the network"
8160
};
8161
8162
static const true_false_string gsm_a_rr_dtm_enhancements_capability_value = {
8163
    "The cell supports enhanced DTM CS establishment and enhanced DTM CS release procedures",
8164
    "The cell does not support enhanced DTM CS establishment and enhanced DTM CS release procedures"
8165
};
8166
8167
static const true_false_string gsm_a_rr_reduced_latency_access_value = {
8168
    "The cell supports \"One Phase Access Request by Reduced Latency MS\"",
8169
    "The cell does not support \"One Phase Access Request by Reduced Latency MS\""
8170
};
8171
8172
static const value_string gsm_a_rr_alpha_vals[] = {
8173
    {  0, "0.0"},
8174
    {  1, "0.1"},
8175
    {  2, "0.2"},
8176
    {  3, "0.3"},
8177
    {  4, "0.4"},
8178
    {  5, "0.5"},
8179
    {  6, "0.6"},
8180
    {  7, "0.7"},
8181
    {  8, "0.8"},
8182
    {  9, "0.9"},
8183
    { 10, "1.0"},
8184
    { 11, "1.0"},
8185
    { 12, "1.0"},
8186
    { 13, "1.0"},
8187
    { 14, "1.0"},
8188
    { 15, "1.0"},
8189
    {  0, NULL }
8190
};
8191
8192
static const value_string gsm_a_rr_t_avg_x_vals[] = {
8193
    {  0, "2^(0/2) / 6 multiframes"},
8194
    {  1, "2^(1/2) / 6 multiframes"},
8195
    {  2, "2^(2/2) / 6 multiframes"},
8196
    {  3, "2^(3/2) / 6 multiframes"},
8197
    {  4, "2^(4/2) / 6 multiframes"},
8198
    {  5, "2^(5/2) / 6 multiframes"},
8199
    {  6, "2^(6/2) / 6 multiframes"},
8200
    {  7, "2^(7/2) / 6 multiframes"},
8201
    {  8, "2^(8/2) / 6 multiframes"},
8202
    {  9, "2^(9/2) / 6 multiframes"},
8203
    { 10, "2^(10/2) / 6 multiframes"},
8204
    { 11, "2^(11/2) / 6 multiframes"},
8205
    { 12, "2^(12/2) / 6 multiframes"},
8206
    { 13, "2^(13/2) / 6 multiframes"},
8207
    { 14, "2^(14/2) / 6 multiframes"},
8208
    { 15, "2^(15/2) / 6 multiframes"},
8209
    { 16, "2^(16/2) / 6 multiframes"},
8210
    { 17, "2^(17/2) / 6 multiframes"},
8211
    { 18, "2^(18/2) / 6 multiframes"},
8212
    { 19, "2^(19/2) / 6 multiframes"},
8213
    { 20, "2^(20/2) / 6 multiframes"},
8214
    { 21, "2^(21/2) / 6 multiframes"},
8215
    { 22, "2^(22/2) / 6 multiframes"},
8216
    { 23, "2^(23/2) / 6 multiframes"},
8217
    { 24, "2^(24/2) / 6 multiframes"},
8218
    { 25, "2^(25/2) / 6 multiframes"},
8219
    { 26, "2^(25/2) / 6 multiframes"},
8220
    { 27, "2^(25/2) / 6 multiframes"},
8221
    { 28, "2^(25/2) / 6 multiframes"},
8222
    { 29, "2^(25/2) / 6 multiframes"},
8223
    { 30, "2^(25/2) / 6 multiframes"},
8224
    { 31, "2^(25/2) / 6 multiframes"},
8225
    {  0, NULL }
8226
};
8227
8228
static const true_false_string gsm_a_rr_pc_meas_chan_value = {
8229
    "Downlink measurements for power control shall be made on PDCH",
8230
    "Downlink measurements for power control shall be made on BCCH"
8231
};
8232
8233
static const value_string gsm_a_rr_n_avg_i_vals[] = {
8234
    {  0, "2^(0/2)"},
8235
    {  1, "2^(1/2)"},
8236
    {  2, "2^(2/2)"},
8237
    {  3, "2^(3/2)"},
8238
    {  4, "2^(4/2)"},
8239
    {  5, "2^(5/2)"},
8240
    {  6, "2^(6/2)"},
8241
    {  7, "2^(7/2)"},
8242
    {  8, "2^(8/2)"},
8243
    {  9, "2^(9/2)"},
8244
    { 10, "2^(10/2)"},
8245
    { 11, "2^(11/2)"},
8246
    { 12, "2^(12/2)"},
8247
    { 13, "2^(13/2)"},
8248
    { 14, "2^(14/2)"},
8249
    { 15, "2^(15/2)"},
8250
    {  0, NULL }
8251
};
8252
8253
static const true_false_string gsm_a_rr_sgsnr_value = {
8254
    "SGSN is Release '99 onwards",
8255
    "SGSN is Release '98 or older"
8256
};
8257
8258
static const true_false_string gsm_a_rr_si_status_ind_value = {
8259
    "The network supports the PACKET SI STATUS message",
8260
    "The network does not support the PACKET SI STATUS message"
8261
};
8262
8263
static const value_string gsm_a_rr_lb_ms_txpwr_max_cch_vals[] = {
8264
    {  0, "43 dBm"},
8265
    {  1, "41 dBm"},
8266
    {  2, "39 dBm"},
8267
    {  3, "37 dBm"},
8268
    {  4, "35 dBm"},
8269
    {  5, "33 dBm"},
8270
    {  6, "31 dBm"},
8271
    {  7, "29 dBm"},
8272
    {  8, "27 dBm"},
8273
    {  9, "25 dBm"},
8274
    { 10, "23 dBm"},
8275
    { 11, "21 dBm"},
8276
    { 12, "19 dBm"},
8277
    { 13, "17 dBm"},
8278
    { 14, "15 dBm"},
8279
    { 15, "13 dBm"},
8280
    { 16, "11 dBm"},
8281
    { 17, "9 dBm"},
8282
    { 18, "7 dBm"},
8283
    { 19, "5 dBm"},
8284
    { 20, "5 dBm"},
8285
    { 21, "5 dBm"},
8286
    { 22, "5 dBm"},
8287
    { 23, "5 dBm"},
8288
    { 24, "5 dBm"},
8289
    { 25, "5 dBm"},
8290
    { 26, "5 dBm"},
8291
    { 27, "5 dBm"},
8292
    { 28, "5 dBm"},
8293
    { 29, "5 dBm"},
8294
    { 30, "5 dBm"},
8295
    { 31, "5 dBm"},
8296
    {  0, NULL }
8297
};
8298
8299
static const value_string gsm_a_rr_si2n_support_vals[] = {
8300
    { 0, "SI2n is not supported"},
8301
    { 1, "SI2n is supported on PACCH"},
8302
    { 2, "SI2n is supported on PACCH and broadcast on BCCH"},
8303
    { 3, "SI2n is supported on PACCH and broadcast on BCCH Ext"},
8304
    { 0, NULL }
8305
};
8306
8307
static const value_string gsm_a_rr_peo_dsc_vals[] = {
8308
    { 0, "DSC = 4" },
8309
    { 1, "DSC = 6" },
8310
    { 2, "DSC = 8" },
8311
    { 3, "DSC = 10" },
8312
    { 0, NULL }
8313
};
8314
8315
static const value_string gsm_a_rr_c1_delta_min_vals[] = {
8316
    { 0, "3 dB" },
8317
    { 1, "6 dB" },
8318
    { 2, "9 dB" },
8319
    { 3, "12 dB" },
8320
    { 0, NULL }
8321
};
8322
8323
static const value_string gsm_a_rr_c1_delta_max_vals[] = {
8324
    { 0, "3 dB" },
8325
    { 1, "6 dB" },
8326
    { 2, "9 dB" },
8327
    { 3, "12 dB" },
8328
    { 4, "15 dB" },
8329
    { 5, "18 dB" },
8330
    { 6, "21 dB" },
8331
    { 7, "24 dB" },
8332
    { 0, NULL }
8333
};
8334
8335
static const true_false_string gsm_si_change_alt_value = {
8336
    "A mobile station supporting network sharing should not attempt to re-read the SI2quater message",
8337
    "A mobile station supporting network sharing shall fully take into account a change of system information \nsignalled by the SI_CHANGE_FIELD value '2', SI2quater included"
8338
    };
8339
8340
static uint16_t
8341
de_rr_si13_rest_oct(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8342
1.69k
{
8343
1.69k
    proto_tree *subtree2;
8344
1.69k
    proto_item *item2;
8345
1.69k
    unsigned    bit_offset, bit_offset_sav;
8346
1.69k
    uint8_t     tvb_len = tvb_reported_length(tvb);
8347
1.69k
    uint16_t    bit_len = tvb_len << 3;
8348
1.69k
    bit_offset          = offset << 3;
8349
8350
1.69k
    if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_si13_contents))
8351
354
    {
8352
354
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_bcch_change_mark, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
8353
354
        bit_offset += 3;
8354
354
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si_change_field, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
8355
354
        bit_offset += 4;
8356
354
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_si13_change_mark_present))
8357
175
        {
8358
175
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si13_change_mark, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
8359
175
            bit_offset += 2;
8360
175
            bit_offset += de_rr_rest_oct_gprs_mobile_allocation(tvb, subtree, bit_offset);
8361
175
        }
8362
354
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_pbcch))
8363
92
        { /* PBCCH present in the cell */
8364
92
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_psi1_repeat_period, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
8365
92
            bit_offset += 4;
8366
92
            bit_offset_sav = bit_offset;
8367
92
            subtree2 = proto_tree_add_subtree(subtree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_PBCCH_DESC], &item2,
8368
92
                                            gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_PBCCH_DESC]);
8369
92
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_pbcch_pb, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
8370
92
            bit_offset += 4;
8371
92
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_pbcch_tsc, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
8372
92
            bit_offset += 3;
8373
92
            proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_pbcch_tn, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
8374
92
            bit_offset += 3;
8375
92
            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_maio_present))
8376
32
            {
8377
32
                proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_maio, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
8378
32
                bit_offset += 6;
8379
32
            }
8380
60
            else
8381
60
            {
8382
60
                if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_arfcn_present))
8383
23
                {
8384
23
                    proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_arfcn, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
8385
23
                    bit_offset += 10;
8386
23
                }
8387
37
                else
8388
37
                    proto_tree_add_item(subtree2, hf_gsm_a_rr_pbcch_use_bcch, tvb, bit_offset>>3, 1, ENC_NA);
8389
60
            }
8390
92
            proto_item_set_len(item2, (bit_offset>>3) - (bit_offset_sav>>3)+1);
8391
92
        }
8392
262
        else
8393
262
        { /* PBCCH not present in the cell */
8394
262
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rac, tvb, bit_offset, 8, ENC_BIG_ENDIAN);
8395
262
            bit_offset += 8;
8396
262
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_spgc_ccch_sup, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
8397
262
            bit_offset += 1;
8398
262
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_priority_access_thr, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
8399
262
            bit_offset += 3;
8400
262
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_network_control_order, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
8401
262
            bit_offset += 2;
8402
262
            bit_offset += de_rr_rest_oct_gprs_cell_options(tvb, subtree, bit_offset);
8403
262
            bit_offset += de_rr_rest_oct_gprs_power_control_parameters(tvb, subtree, bit_offset);
8404
262
        }
8405
8406
        /* Null breakpoint */
8407
354
        if (bit_offset < bit_len)
8408
225
        {
8409
225
           if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_additions_in_r99))
8410
148
           { /* Additions in release 99 */
8411
148
               proto_tree_add_bits_item(subtree, hf_gsm_a_rr_sgsnr, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
8412
148
               bit_offset += 1;
8413
8414
               /* Null breakpoint */
8415
148
               if (bit_offset < bit_len)
8416
143
               {
8417
143
                  if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_additions_in_rel_4))
8418
94
                  { /* Additions in release Rel-4 */
8419
94
                      proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si_status_ind, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
8420
94
                      bit_offset += 1;
8421
8422
                      /* Null breakpoint */
8423
94
                      if (bit_offset < bit_len)
8424
91
                      {
8425
91
                         if (gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_additions_in_rel_6))
8426
66
                         { /* Additions in release Rel-6 */
8427
66
                            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_lb_ms_txpwr_max_cch_present))
8428
36
                            {
8429
36
                                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_lb_ms_txpwr_max_cch, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
8430
36
                                bit_offset += 5;
8431
36
                            }
8432
66
                            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si2n_support, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
8433
66
                            bit_offset += 2;
8434
8435
66
                            (void)gsm_rr_csn_HL_flag(tvb, subtree, 0, bit_offset++, hf_gsm_a_rr_si_change_alt);
8436
8437
66
                            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_peo_dsc_and_rcc_present))
8438
31
                            {
8439
31
                                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_peo_dsc, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
8440
31
                                bit_offset += 2;
8441
31
                                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rcc, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
8442
31
                                bit_offset += 3;
8443
31
                            }
8444
8445
66
                            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_c1_delta_present))
8446
18
                            {
8447
18
                                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_c1_delta_min, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
8448
18
                                bit_offset += 2;
8449
18
                                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_c1_delta_max, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
8450
18
                                bit_offset += 3;
8451
18
                            }
8452
66
                         }
8453
91
                      }
8454
94
                  }
8455
143
               }
8456
148
           }
8457
225
        }
8458
354
    }
8459
1.69k
    gsm_rr_padding_bits(subtree, tvb, bit_offset, tvb_len, PADDING_BYTE);
8460
1.69k
    return tvb_len - offset;
8461
1.69k
}
8462
8463
/* [3] 10.5.2.37c (void)
8464
 * [3] 10.5.2.37d (void)
8465
 * [3] 10.5.2.37e SI 16 Rest Octets
8466
 * [3] 10.5.2.37f SI 17 Rest Octets
8467
 * [3] 10.5.2.37g SI 19 Rest Octets
8468
 * [3] 10.5.2.37h SI 18 Rest Octets
8469
 * [3] 10.5.2.37i SI 20 Rest Octets
8470
 */
8471
8472
 /*
8473
  * [3] 10.5.2.37m SI 21 Rest Octets
8474
  */
8475
static uint16_t
8476
de_rr_si21_rest_oct(tvbuff_t *tvb, proto_tree *subtree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8477
100
{
8478
100
    proto_tree  *subtree2;
8479
100
    proto_item *item2;
8480
100
    uint32_t curr_offset;
8481
100
    int      bit_offset, bit_offset_sav;
8482
100
    uint8_t  tvb_len = tvb_reported_length(tvb);
8483
8484
100
    curr_offset = offset;
8485
100
    bit_offset = curr_offset << 3;
8486
8487
100
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si21_change_mark, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
8488
100
    bit_offset += 2;
8489
100
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si21_index, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
8490
100
    bit_offset += 3;
8491
100
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_si21_count, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
8492
100
    bit_offset += 3;
8493
100
    if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_eab_parameters))
8494
27
    {
8495
27
        bit_offset_sav = bit_offset;
8496
27
        subtree2 = proto_tree_add_subtree(subtree, tvb, bit_offset >> 3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_EAB_PARAM_DESC], &item2,
8497
27
            gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_EAB_PARAM_DESC]);
8498
8499
        /* EAB Authorization mask */
8500
27
        proto_tree_add_bits_item(subtree2, hf_gsm_a_rr_eab_auth_mask, tvb, bit_offset, 10, ENC_BIG_ENDIAN);
8501
27
        bit_offset += 10;
8502
        /* EAB Subcategory */
8503
27
        proto_tree_add_bits_item(subtree2, hf_gsm_a_eab_subcategory, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
8504
27
        bit_offset += 2;
8505
8506
27
        proto_item_set_len(item2, (bit_offset >> 3) - (bit_offset_sav >> 3) + 1);
8507
27
    }
8508
100
    gsm_rr_padding_bits(subtree, tvb, bit_offset, tvb_len, PADDING_BYTE);
8509
100
    return tvb_len - offset;
8510
100
}
8511
8512
/*
8513
 * [3] 10.5.2.38 Starting Time
8514
 */
8515
static uint16_t
8516
de_rr_starting_time(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8517
52
{
8518
52
    proto_item *item;
8519
52
    uint32_t    curr_offset;
8520
52
    uint16_t    rfn;
8521
8522
52
    curr_offset = offset;
8523
8524
52
    rfn = parse_reduced_frame_number(tvb, curr_offset);
8525
52
    proto_tree_add_item(tree, hf_gsm_a_rr_T1prim, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8526
52
    proto_tree_add_item(tree, hf_gsm_a_rr_T3, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
8527
52
    curr_offset++;
8528
52
    proto_tree_add_item(tree, hf_gsm_a_rr_T2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8529
52
    curr_offset++;
8530
52
    item = proto_tree_add_uint(tree, hf_gsm_a_rr_rfn, tvb, curr_offset-2, 2, rfn);
8531
52
    proto_item_set_generated(item);
8532
52
    return curr_offset - offset;
8533
52
}
8534
/*
8535
 * [3] 10.5.2.39 Synchronization Indication
8536
 */
8537
/*
8538
 * ROT: Report Observed Time Difference (Octet1 bit 3) */
8539
8540
static const true_false_string sm_a_rr_sync_ind_rot_value  = {
8541
    "Mobile Time Difference IE shall be included in the HANDOVER COMPLETE message",
8542
    "Mobile Time Difference IE shall not be included in the HANDOVER COMPLETE message"
8543
};
8544
8545
/* SI: Synchronization indication (octet 1)Bit2 1 */
8546
8547
static const value_string gsm_a_rr_sync_ind_si_vals[] = {
8548
    { 0, "Non-synchronized"},
8549
    { 1, "Synchronized"},
8550
    { 2, "Pre-synchronised"},
8551
    { 3, "Pseudo-synchronised"},
8552
    { 0, NULL }
8553
};
8554
/* NCI: Normal cell indication (octet 1, bit 4) */
8555
8556
static const true_false_string gsm_a_rr_sync_ind_nci_value = {
8557
    "Out of range timing advance shall trigger a handover failure procedure",
8558
    "Out of range timing advance is ignored"
8559
};
8560
static uint16_t
8561
de_rr_sync_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8562
16
{
8563
16
    uint32_t curr_offset;
8564
8565
16
    curr_offset = offset;
8566
8567
    /*NCI */
8568
16
    proto_tree_add_item(tree, hf_gsm_a_rr_sync_ind_nci, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8569
    /*ROT */
8570
16
    proto_tree_add_item(tree, hf_gsm_a_rr_sync_ind_rot, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8571
    /*SI*/
8572
16
    proto_tree_add_item(tree, hf_gsm_a_rr_sync_ind_si, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8573
8574
16
    curr_offset = curr_offset + 1;
8575
8576
16
    return curr_offset - offset;
8577
16
}
8578
8579
/*
8580
 * [3] 10.5.2.40 Timing Advance
8581
 */
8582
static uint16_t
8583
de_rr_timing_adv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8584
597
{
8585
597
    uint32_t curr_offset;
8586
8587
597
    curr_offset = offset;
8588
8589
597
    proto_tree_add_item(tree, hf_gsm_a_rr_timing_adv, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8590
597
    curr_offset = curr_offset + 1;
8591
8592
597
    return curr_offset - offset;
8593
597
}
8594
8595
/*
8596
 * [3] 10.5.2.41 Time Difference
8597
 */
8598
static uint16_t
8599
de_rr_time_diff(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8600
1
{
8601
1
    uint32_t curr_offset;
8602
8603
1
    curr_offset = offset;
8604
8605
1
    proto_tree_add_item(tree, hf_gsm_a_rr_time_diff, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8606
1
    curr_offset = curr_offset + 1;
8607
8608
1
    return curr_offset - offset;
8609
1
}
8610
/*
8611
 * [3] 10.5.2.41a TLLI
8612
 * The TLLI is encoded as a binary number with a length of 4 octets. TLLI is defined in 3GPP TS 23.003
8613
 */
8614
uint16_t
8615
de_rr_tlli(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8616
590
{
8617
590
    uint32_t curr_offset, tlli;
8618
8619
590
    curr_offset = offset;
8620
8621
590
    proto_tree_add_item_ret_uint(tree, hf_gsm_a_rr_tlli, tvb, curr_offset, 4, ENC_BIG_ENDIAN, &tlli);
8622
8623
590
    if(gsm_a_rr_nri_length > 0) {
8624
        /* NRI is in second byte of TLLI */
8625
0
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_nri, tvb, (curr_offset+1)*8, gsm_a_rr_nri_length, ENC_BIG_ENDIAN);
8626
0
    }
8627
8628
590
    curr_offset = curr_offset + 4;
8629
590
    if(add_string)
8630
590
        snprintf(add_string, string_len, " - 0x%x", tlli);
8631
8632
590
    return curr_offset - offset;
8633
590
}
8634
8635
/*
8636
 * [3] 10.5.2.42 TMSI/P-TMSI
8637
 */
8638
static uint16_t
8639
de_rr_tmsi_ptmsi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8640
808
{
8641
808
    proto_tree *subtree;
8642
808
    uint32_t    curr_offset;
8643
8644
808
    curr_offset = offset;
8645
8646
808
    subtree = proto_tree_add_subtree(tree, tvb, curr_offset, 3, ett_gsm_rr_elem[DE_RR_TMSI_PTMSI], NULL,
8647
808
                               val_to_str_ext_const(DE_RR_TMSI_PTMSI, &gsm_rr_elem_strings_ext, ""));
8648
8649
808
    proto_tree_add_item(subtree, hf_gsm_a_tmsi, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
8650
808
    curr_offset = curr_offset + 4;
8651
8652
808
    return curr_offset - offset;
8653
808
}
8654
8655
/*
8656
 * [3] 10.5.2.42a VGCS target mode Indication
8657
 */
8658
/*
8659
Target mode (octet 3)
8660
Bit  8 7
8661
     0 0    dedicated mode
8662
     0 1    group transmit mode
8663
     Other values are reserved for future use.
8664
*/
8665
static const value_string gsm_a_rr_target_mode_vals[] _U_ = {
8666
    { 0, "Dedicated mode"},
8667
    { 1, "Group transmit mode"},
8668
    { 0, NULL }
8669
};
8670
static uint16_t
8671
de_rr_vgcs_tar_mode_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8672
30
{
8673
30
    uint32_t curr_offset;
8674
8675
30
    curr_offset = offset;
8676
8677
30
    proto_tree_add_item(tree, hf_gsm_a_rr_target_mode, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8678
30
    proto_tree_add_item(tree, hf_gsm_a_rr_group_cipher_key_number, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8679
30
    curr_offset = curr_offset + 1;
8680
8681
30
    return curr_offset - offset;
8682
30
}
8683
8684
/*
8685
 * [3] 10.5.2.42b      VGCS Ciphering Parameters
8686
 */
8687
static uint16_t
8688
de_rr_vgcs_cip_par(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8689
5
{
8690
5
    uint32_t curr_offset;
8691
8692
5
    curr_offset = offset;
8693
8694
5
    proto_tree_add_expert_format(tree, pinfo, &ei_gsm_a_rr_data_not_dissected, tvb, curr_offset, len, "Data (Not decoded)");
8695
8696
5
    curr_offset = curr_offset + 2;
8697
8698
5
    return curr_offset - offset;
8699
5
}
8700
/*
8701
 * [3] 10.5.2.43 Wait Indication
8702
 */
8703
static uint16_t
8704
de_rr_wait_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8705
536
{
8706
536
    uint32_t curr_offset;
8707
8708
536
    curr_offset = offset;
8709
8710
536
    proto_tree_add_item(tree, hf_gsm_a_rr_wait_indication, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8711
8712
536
    curr_offset = curr_offset + 1;
8713
8714
536
    return curr_offset - offset;
8715
536
}
8716
8717
/*
8718
 * [3] 10.5.2.44 SI10 rest octets $(ASCI)$
8719
 */
8720
8721
/*
8722
 * [3] 10.5.2.45 Extended Measurement Results
8723
 */
8724
static uint16_t
8725
de_rr_ext_meas_result(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
8726
153
{
8727
153
    uint32_t curr_offset;
8728
153
    int     bit_offset, i;
8729
153
    uint8_t value;
8730
8731
153
    curr_offset = offset;
8732
153
    bit_offset  = curr_offset << 3;
8733
8734
153
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_seq_code, tvb,bit_offset, 1, ENC_BIG_ENDIAN);
8735
153
    bit_offset += 1;
8736
153
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_dtx_used, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
8737
153
    bit_offset += 1;
8738
2.90k
    for (i=0; i<21; i++)
8739
2.75k
    {
8740
2.75k
        value = tvb_get_bits8(tvb,bit_offset,6);
8741
2.75k
        proto_tree_add_uint_format(tree, hf_gsm_a_rr_rxlev_carrier, tvb, bit_offset>>3, 1,
8742
2.75k
                value, "RXLEV carrier %d: %s (%d)", i, val_to_str_ext_const(value, &gsm_a_rr_rxlev_vals_ext, "Unknown"), value);
8743
2.75k
        bit_offset += 6;
8744
2.75k
    }
8745
8746
153
    curr_offset = offset + len;
8747
8748
153
    return curr_offset - offset;
8749
153
}
8750
8751
/*
8752
 * [3] 10.5.2.46 Extended Measurement Frequency List
8753
 */
8754
static uint16_t
8755
de_rr_ext_meas_freq_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8756
73
{
8757
73
   uint32_t curr_offset;
8758
8759
73
   curr_offset = offset;
8760
8761
73
   proto_tree_add_bits_item(tree, hf_gsm_a_rr_seq_code, tvb,(curr_offset<<3)+3, 1, ENC_BIG_ENDIAN);
8762
8763
73
   return dissect_arfcn_list(tvb, tree, pinfo, offset, 16, add_string, string_len);
8764
73
}
8765
8766
/*
8767
 * [3] 10.5.2.47 Suspension Cause
8768
 */
8769
/*Suspension cause value (octet 2)*/
8770
static const value_string gsm_a_rr_suspension_cause_vals[] = {
8771
    { 0, "Emergency call, mobile originating call or call re-establishment"},
8772
    { 1, "Location Area Update"},
8773
    { 2, "MO Short message service"},
8774
    { 3, "Other procedure which can be completed with an SDCCH"},
8775
    { 4, "MO Voice broadcast or group call"},
8776
    { 5, "Mobile terminating CS connection"},
8777
    { 6, "DTM not supported in the cell"},
8778
    { 0, NULL }
8779
};
8780
uint16_t
8781
de_rr_sus_cau(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8782
173
{
8783
173
    uint32_t curr_offset;
8784
8785
173
    curr_offset = offset;
8786
8787
173
    proto_tree_add_item(tree, hf_gsm_a_rr_suspension_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8788
8789
173
    curr_offset = curr_offset + 1;
8790
8791
173
    return curr_offset - offset;
8792
173
}
8793
/*
8794
 * [3] 10.5.2.48 APDU ID
8795
 */
8796
static const value_string gsm_a_rr_apdu_id_vals[] = {
8797
    { 0, "RRLP (GSM 04.31) LCS" },
8798
    { 1, "ETWS (3GPP TS 23.041)" },
8799
    { 0, NULL },
8800
};
8801
static uint16_t
8802
de_rr_apdu_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8803
235
{
8804
235
    uint32_t *ppi = wmem_new(pinfo->pool, uint32_t);
8805
235
    proto_tree_add_item_ret_uint(tree, hf_gsm_a_rr_apdu_id, tvb, offset, 1, ENC_BIG_ENDIAN, ppi);
8806
235
    p_add_proto_data(pinfo->pool, pinfo, proto_a_rr, pinfo->curr_layer_num, ppi);
8807
8808
235
    return 0;
8809
235
}
8810
8811
/*
8812
 * [3] 10.5.2.49 APDU Flags
8813
 * Please note that value 1 means "not".
8814
 */
8815
static const true_false_string gsm_a_rr_apdu_flags_cr_value = {
8816
    "Not Command or Final Response",
8817
    "Command or Final Response",
8818
};
8819
static const true_false_string gsm_a_rr_apdu_flags_fs_value = {
8820
    "Not first or only segment",
8821
    "First or only segment",
8822
};
8823
static const true_false_string gsm_a_rr_apdu_flags_ls_value = {
8824
    "Not last or only segment",
8825
    "Last or only segment",
8826
};
8827
8828
static uint16_t
8829
de_rr_apdu_flags(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8830
235
{
8831
235
    proto_tree_add_item(tree, hf_gsm_a_rr_apdu_flags_cr, tvb, offset, 1, ENC_BIG_ENDIAN);
8832
235
    proto_tree_add_item(tree, hf_gsm_a_rr_apdu_flags_fs, tvb, offset, 1, ENC_BIG_ENDIAN);
8833
235
    proto_tree_add_item(tree, hf_gsm_a_rr_apdu_flags_ls, tvb, offset, 1, ENC_BIG_ENDIAN);
8834
8835
235
    return 1;
8836
235
}
8837
8838
/*
8839
 * [3] 10.5.2.50 APDU Data
8840
 */
8841
static uint16_t
8842
de_rr_apdu_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
8843
204
{
8844
204
    proto_item *apdu_pi;
8845
204
    proto_tree *apdu_tree;
8846
204
    tvbuff_t *sub_tvb;
8847
204
    uint32_t *ppi;
8848
8849
204
    apdu_pi = proto_tree_add_item(tree, hf_gsm_a_rr_apdu_data, tvb, offset, len, ENC_NA);
8850
204
    apdu_tree = proto_item_add_subtree(apdu_pi, ett_apdu);
8851
204
    sub_tvb = tvb_new_subset_length(tvb, offset, len);
8852
8853
204
    ppi = (uint32_t *) p_get_proto_data(pinfo->pool, pinfo, proto_a_rr, pinfo->curr_layer_num);
8854
204
    if (ppi && *ppi == 0 && rrlp_dissector)
8855
15
        call_dissector(rrlp_dissector, sub_tvb,pinfo, apdu_tree);
8856
8857
204
    return len;
8858
204
}
8859
8860
/*
8861
 * [3] 10.5.2.51 Handover To UTRAN Command
8862
 */
8863
static uint16_t
8864
de_rr_ho_to_utran_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
8865
1.32k
{
8866
1.32k
    uint32_t curr_offset;
8867
1.32k
    tvbuff_t *rrc_irat_ho_to_utran_cmd_tvb;
8868
8869
1.32k
    curr_offset = offset;
8870
1.32k
    if (len)
8871
1.32k
    {
8872
1.32k
        rrc_irat_ho_to_utran_cmd_tvb = tvb_new_subset_length(tvb, curr_offset, len);
8873
1.32k
        if (rrc_irat_ho_to_utran_cmd_handle)
8874
1.32k
            call_dissector(rrc_irat_ho_to_utran_cmd_handle, rrc_irat_ho_to_utran_cmd_tvb, pinfo, tree);
8875
1.32k
    }
8876
8877
1.32k
    curr_offset += len;
8878
1.32k
    return curr_offset - offset;
8879
1.32k
}
8880
8881
8882
/*
8883
 * [3] 10.5.2.52 Handover To cdma2000 Command
8884
 * [3] 10.5.2.53 (void)
8885
 * [3] 10.5.2.54 (void)
8886
 * [3] 10.5.2.55 (void)
8887
 * [3] 10.5.2.56 3G Target Cell
8888
 */
8889
/*
8890
 * 10.5.2.57 Service Support
8891
 */
8892
static const true_false_string gsm_a_rr_MBMS_multicast_value  = {
8893
    "mobile station requires notification of multicast MBMS services",
8894
    "mobile station does not require notification of multicast MBMS services"
8895
};
8896
static const true_false_string gsm_a_rr_MBMS_broadcast_value  = {
8897
    "mobile station requires notification of broadcast MBMS services",
8898
    "mobile station does not require notification of broadcast MBMS services"
8899
};
8900
static uint16_t
8901
de_rr_serv_sup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8902
28
{
8903
28
    uint32_t curr_offset;
8904
8905
28
    curr_offset = offset;
8906
    /* bit 1
8907
     * 0 mobile station does not require notification of broadcast MBMS services
8908
     * 1 mobile station requires notification of broadcast MBMS services
8909
     * bit 2
8910
     * 0 mobile station does not require notification of multicast MBMS services
8911
     * 1 mobile station requires notification of multicast MBMS services
8912
     */
8913
    /* MBMS Multicast */
8914
28
    proto_tree_add_item(tree, hf_gsm_a_rr_MBMS_multicast, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8915
8916
    /* MBMS Broadcast */
8917
28
    proto_tree_add_item(tree, hf_gsm_a_rr_MBMS_broadcast, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8918
28
    curr_offset++;
8919
8920
28
    return curr_offset - offset;
8921
28
}
8922
8923
/*
8924
 * [3] 10.5.2.59       Dedicated Service Information
8925
 */
8926
/*
8927
Last Segment (octet 2)
8928
bit 1
8929
  0  mobile station shall not perform Service Information Sending procedure on new cell.
8930
  1  mobile station shall perform Service Information Sending procedure on new cell.
8931
*/
8932
static const true_false_string gsm_a_rr_last_segment_value  = {
8933
    "Mobile station shall perform Service Information Sending procedure on new cell.",
8934
    "mobile station shall not perform Service Information Sending procedure on new cell."
8935
};
8936
static uint16_t
8937
de_rr_ded_serv_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8938
1
{
8939
1
    uint32_t curr_offset;
8940
8941
1
    curr_offset = offset;
8942
8943
1
    proto_tree_add_item(tree, hf_gsm_a_rr_last_segment, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8944
8945
1
    curr_offset = curr_offset + 3;
8946
8947
1
    return curr_offset - offset;
8948
1
}
8949
8950
/*
8951
 * [3] 10.5.2.69        Carrier Indication
8952
 */
8953
static const true_false_string gsm_a_rr_carrier_ind_value  = {
8954
    "Carrier 2",
8955
    "Carrier 1"
8956
};
8957
8958
static uint16_t
8959
de_rr_carrier_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8960
4
{
8961
4
    proto_tree *subtree;
8962
4
    uint32_t    curr_offset;
8963
8964
4
    curr_offset = offset;
8965
8966
4
    subtree = proto_tree_add_subtree(tree, tvb, curr_offset, 3, ett_gsm_rr_elem[DE_RR_CARRIER_IND], NULL,
8967
4
                               val_to_str_ext_const(DE_RR_CARRIER_IND, &gsm_rr_elem_strings_ext, ""));
8968
8969
4
    proto_tree_add_item(subtree, hf_gsm_a_rr_carrier_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
8970
8971
4
    curr_offset += 1;
8972
8973
4
    return curr_offset - offset;
8974
4
}
8975
8976
/*
8977
 * [3] 10.5.2.76 Feature Indicator
8978
 */
8979
static const true_false_string gsm_a_rr_feat_ind_cs_ir = {
8980
    "An implicit reject is indicated for the CS domain",
8981
    "An implicit reject is not indicated for the CS domain"
8982
};
8983
8984
static const true_false_string gsm_a_rr_feat_ind_ps_ir = {
8985
    "An implicit reject is indicated for the PS domain",
8986
    "An implicit reject is not indicated for the PS domain"
8987
};
8988
8989
static uint16_t
8990
de_rr_feature_indicator(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
8991
370
{
8992
370
    uint32_t curr_offset;
8993
8994
370
    curr_offset = offset;
8995
8996
370
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_peo_bcch_change_mark, tvb, curr_offset << 3, 2, ENC_BIG_ENDIAN);
8997
370
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_feat_ind_cs_ir, tvb, (curr_offset<<3)+2, 1, ENC_BIG_ENDIAN);
8998
370
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_feat_ind_ps_ir, tvb, (curr_offset<<3)+3, 1, ENC_BIG_ENDIAN);
8999
9000
370
    curr_offset += 1;
9001
9002
370
    return curr_offset - offset;
9003
370
}
9004
9005
/*
9006
 * [3] 10.5.2.8 Extended TSC Set
9007
 */
9008
static const value_string gsm_a_rr_cs_tsc_set_vals[] = {
9009
    { 0, "TSC set 1" },
9010
    { 1, "TSC set 2" },
9011
    { 2, "TSC set 3" },
9012
    { 3, "TSC set 4" },
9013
    { 0, NULL }
9014
};
9015
9016
static const value_string gsm_a_rr_ps_tsc_set_vals[] = {
9017
    { 0, "TSC set 1" },
9018
    { 1, "TSC set 2 for 8PSK, 16QAM and 32QAM or TSC set 3 for GMSK" },
9019
    { 0, NULL }
9020
};
9021
9022
static uint16_t
9023
de_rr_extended_tsc_set(tvbuff_t *tvb, proto_tree *tree,
9024
                       packet_info *pinfo _U_, uint32_t offset, unsigned len _U_,
9025
                       char *add_string _U_, int string_len _U_)
9026
15
{
9027
15
    proto_tree_add_item(tree, hf_gsm_a_rr_cs_tsc_set, tvb, offset, 1, ENC_NA);
9028
15
    proto_tree_add_item(tree, hf_gsm_a_rr_ps_sd_tsc_ass, tvb, offset, 1, ENC_NA);
9029
15
    proto_tree_add_item(tree, hf_gsm_a_rr_ps_pd_tsc_set, tvb, offset, 1, ENC_NA);
9030
15
    proto_tree_add_item(tree, hf_gsm_a_rr_ps_sd_tsc_set, tvb, offset, 1, ENC_NA);
9031
15
    proto_tree_add_item(tree, hf_gsm_a_rr_ps_sd_tsc_val, tvb, offset, 1, ENC_NA);
9032
15
    return 1;
9033
15
}
9034
9035
 /*
9036
  * 10.5.2.83 EC Request reference
9037
  */
9038
static uint16_t
9039
de_rr_ec_request_reference(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t bit_offset, char *add_string)
9040
0
{
9041
0
    proto_tree *subtree;
9042
0
    uint32_t    curr_bit_offset = bit_offset;
9043
9044
0
    subtree = proto_tree_add_subtree_format(tree, tvb, curr_bit_offset>>3, 2, ett_gsm_rr_elem[DE_RR_EC_REQUEST_REFERENCE], NULL,
9045
0
                             "%s%s", val_to_str_ext_const(DE_RR_EC_REQUEST_REFERENCE, &gsm_rr_elem_strings_ext, ""),
9046
0
                             (add_string == NULL) || (add_string[0] == '\0') ? "" : add_string);
9047
9048
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_last_tdma_frame, tvb, curr_bit_offset, 10, ENC_BIG_ENDIAN);
9049
0
    curr_bit_offset += 10;
9050
9051
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_echoed_random_bits, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
9052
0
    curr_bit_offset += 3;
9053
9054
0
    return curr_bit_offset-bit_offset; /*Bits!*/
9055
0
}
9056
9057
/*
9058
 * [3] 10.5.2.84        EC Packet Channel Description type 1
9059
 */
9060
static void
9061
gsm_a_rr_ec_ma_number_fmt(char *s, uint32_t v)
9062
104
{
9063
104
    snprintf(s, ITEM_LABEL_LENGTH, "EC-EGPRS Mobile Allocation set %u (%u)", v+1, v);
9064
104
}
9065
9066
static uint16_t
9067
de_rr_ec_pkt_ch_dsc1(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
9068
107
{
9069
107
    uint32_t    curr_offset;
9070
107
    uint32_t    bit_offset;
9071
9072
107
    curr_offset = offset;
9073
107
    bit_offset  = curr_offset << 3;
9074
9075
107
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_qhfi, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
9076
107
    bit_offset += 2;
9077
107
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_dl_cc, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
9078
107
    bit_offset += 2;
9079
107
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_ul_cc, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
9080
107
    bit_offset += 2;
9081
107
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_tsc_set, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
9082
107
    bit_offset += 1;
9083
107
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_tsc, tvb, bit_offset, 3, ENC_BIG_ENDIAN); /*FIXME: use same tsc variable as other msgs (doesn't work with bits_item)*/
9084
107
    bit_offset += 3;
9085
107
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_ma_number, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
9086
9087
107
    return 2;
9088
9089
107
}
9090
9091
/*
9092
 * [3] 10.5.2.85        EC Packet Channel Description type 2
9093
 */
9094
static uint16_t
9095
de_rr_ec_pkt_ch_dsc2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t bit_offset)
9096
0
{
9097
0
    proto_tree *subtree;
9098
0
    uint32_t    curr_bit_offset = bit_offset;
9099
9100
0
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, 2, ett_gsm_rr_elem[DE_RR_EC_PKT_CH_DSC2], NULL,
9101
0
                             val_to_str_ext_const(DE_RR_EC_PKT_CH_DSC2, &gsm_rr_elem_strings_ext, ""));
9102
9103
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_qhfi, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
9104
0
    curr_bit_offset += 2;
9105
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_dl_cc, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
9106
0
    curr_bit_offset += 2;
9107
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_ul_cc, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
9108
0
    curr_bit_offset += 2;
9109
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tsc_set, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
9110
0
    curr_bit_offset += 1;
9111
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_tsc, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN); /*FIXME: use same tsc variable as other msgs (doesn't work with bits_item)*/
9112
0
    curr_bit_offset += 3;
9113
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_ma_number, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
9114
0
    curr_bit_offset += 5;
9115
9116
0
    return curr_bit_offset-bit_offset; /*Bits!*/
9117
0
}
9118
9119
/*
9120
 * [3] 10.5.2.86        EC Fixed Uplink Allocation
9121
 */
9122
static uint16_t
9123
de_rr_ec_fua(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
9124
104
{
9125
104
    uint32_t    bit_offset;
9126
9127
104
    bit_offset  = offset << 3;
9128
9129
104
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_enhanced_access_burst, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
9130
104
    bit_offset +=1;
9131
9132
104
    if (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_timing_adv_present))
9133
65
    { /* Timing Advance Description */
9134
65
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_timing_adv, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
9135
65
        bit_offset += 6;
9136
65
    }
9137
9138
104
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_starting_ul_timeslot, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
9139
104
    bit_offset += 3;
9140
104
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_tfi_assignment, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
9141
104
    bit_offset += 5;
9142
104
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_starting_dl_timeslot_offset, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
9143
104
    bit_offset += 2;
9144
9145
104
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_overlaid_cdma_code, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
9146
104
    bit_offset += 2;
9147
9148
104
    if (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_ec_mcs_exist))
9149
62
    { /* MCS Description */
9150
62
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_egprs_mcs, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
9151
62
        bit_offset += 4;
9152
62
    }
9153
9154
104
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_gamma, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
9155
104
    bit_offset += 5;
9156
9157
104
    if (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_p0_present))
9158
53
    {
9159
53
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_p0, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
9160
53
        bit_offset += 4;
9161
53
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_pr_mode, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
9162
53
        bit_offset += 1;
9163
53
    }
9164
9165
104
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_start_first_ul_data_block, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
9166
104
    bit_offset += 4;
9167
9168
403
    while(gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_ec_fua_gap_list))
9169
299
    {
9170
299
        if (!gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_ec_start_fn_next_data_block_exist))
9171
21
        {
9172
21
            proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_start_fn_next_data_block, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
9173
21
            bit_offset += 3;
9174
21
        }
9175
278
        else
9176
278
        {
9177
278
            proto_tree_add_uint(tree, hf_gsm_a_rr_ec_start_fn_next_data_block, tvb, (bit_offset>>3), 0, 0);
9178
278
        }
9179
299
    }
9180
9181
104
    return len;
9182
104
}
9183
9184
uint16_t (* const rr_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len) = {
9185
    /* Radio Resource Management  Information Elements 10.5.2, most are from 10.5.1 */
9186
9187
    de_rr_ba_range,                             /* [3]  10.5.2.1a       BA Range */
9188
    de_rr_cell_ch_dsc,                          /* [3]  10.5.2.1b       Cell Channel Description        */
9189
    de_rr_ba_list_pref,                         /* [3]  10.5.2.1c       BA List Pref                    */
9190
    de_rr_utran_freq_list,                      /* [3]  10.5.2.1d       UTRAN Frequency List            */
9191
    de_rr_cell_select_indic,                    /* [3]  10.5.2.1e       Cell selection indicator after release of all TCH and SDCCH IE */
9192
    de_rr_cell_dsc,                             /* 10.5.2.2   RR Cell Description                       */
9193
    de_rr_cell_opt_bcch,                        /* [3]  10.5.2.3        Cell Options (BCCH)             */
9194
    de_rr_cell_opt_sacch,                       /* [3]  10.5.2.3a       Cell Options (SACCH)            */
9195
    de_rr_cell_sel_param,                       /* [3]  10.5.2.4        Cell Selection Parameters       */
9196
/*
9197
 * [3]  10.5.2.4a       (void)
9198
 */
9199
    de_rr_ch_dsc,                               /* [3]  10.5.2.5        Channel Description             */
9200
    de_rr_ch_dsc2,                              /* [3]  10.5.2.5a   RR Channel Description 2            */
9201
    de_rr_ch_dsc3,                              /* [3]  10.5.2.5c   RR Channel Description 3            */
9202
    de_rr_ch_mode,                              /* [3]  10.5.2.6        Channel Mode                    */
9203
    de_rr_ch_mode2,                             /* [3]  10.5.2.7        Channel Mode 2                  */
9204
    de_rr_utran_cm,                             /* [3]  10.5.2.7a       UTRAN Classmark */
9205
/* [3]  10.5.2.7b       (void) */
9206
9207
    de_rr_cm_enq_mask,                          /* [3]  10.5.2.7c       Classmark Enquiry Mask          */
9208
/* [3]  10.5.2.7d       GERAN Iu Mode Classmark information element                                     */
9209
    de_rr_chnl_needed,                          /* [3]  10.5.2.8        Channel Needed
9210
                                                 * [3]  10.5.2.8a       (void) */
9211
    de_rr_chnl_req_desc2,                       /* [3]  10.5.2.8b       Channel Request Description 2   */
9212
    /* Pos 20 */
9213
    de_rr_cip_mode_set,                         /* [3]  10.5.2.9        Cipher Mode Setting             */
9214
    de_rr_cip_mode_resp,                        /* [3]  10.5.2.10       Cipher Response */
9215
    de_rr_ctrl_ch_desc,                         /* [3]  10.5.2.11       Control Channel Description     */
9216
    de_rr_dtm_info_details,                     /* [3]  10.5.2.11a      DTM Information Details */
9217
    de_rr_dyn_arfcn_map,                        /* [3]  10.5.2.11b      Dynamic ARFCN Mapping           */
9218
    de_rr_freq_ch_seq,                          /* [3]  10.5.2.12       Frequency Channel Sequence      */
9219
    de_rr_freq_list,                            /* [3]  10.5.2.13       Frequency List                  */
9220
    de_rr_freq_short_list,                      /* [3]  10.5.2.14       Frequency Short List            */
9221
    de_rr_freq_short_list2,                     /* [3]  10.5.2.14a      Frequency Short List 2          */
9222
/* [3]  10.5.2.14b      Group Channel Description */
9223
    de_rr_gprs_resumption,                      /* [3]  10.5.2.14c      GPRS Resumption                 */
9224
    de_rr_gprs_broadcast_info,                  /* [3]  10.5.2.14d      GPRS broadcast information      */
9225
/* [3]  10.5.2.14e      Enhanced DTM CS Release Indication */
9226
    de_rr_ho_ref,                               /* 10.5.2.15  Handover Reference                        */
9227
    de_rr_ia_rest_oct,                          /* [3] 10.5.2.16 IA Rest Octets                         */
9228
    de_rr_iar_rest_oct,                         /* [3] 10.5.2.17 IAR Rest Octets                        */
9229
    de_rr_iax_rest_oct,                         /* [3] 10.5.2.18 IAX Rest Octets                        */
9230
    de_rr_l2_pseudo_len,                        /*[3] 10.5.2.19 L2 Pseudo Length                        */
9231
    de_rr_meas_res,                             /* [3] 10.5.2.20 Measurement Results                    */
9232
/*
9233
 * [3] (void)
9234
 */
9235
    de_rr_mob_all,                              /* [3] 10.5.2.21 Mobile Allocation                      */
9236
    de_rr_mob_time_diff,                        /* [3] 10.5.2.21a Mobile Time Difference                */
9237
    de_rr_multirate_conf,                       /* [3] 10.5.2.21aa MultiRate configuration              */
9238
    /* Pos 30 */
9239
    de_rr_mult_all,                             /* [3] 10.5.2.21b Multislot Allocation                  */
9240
/*
9241
 * [3] 10.5.2.21c (void)
9242
 */
9243
    de_rr_neigh_cell_desc,                      /* [3] 10.5.2.22 Neighbour Cell Description             */
9244
    de_rr_neigh_cell_desc2,                     /* [3] 10.5.2.22a Neighbour Cell Description 2          */
9245
/*
9246
 * [3] 10.5.2.22b (void)
9247
 * [3] 10.5.2.22c NT/N Rest Octets */
9248
    de_rr_p1_rest_oct,                          /* [3] 10.5.2.23 P1 Rest Octets                         */
9249
    de_rr_p2_rest_oct,                          /* [3] 10.5.2.24 P2 Rest Octets                         */
9250
    de_rr_p3_rest_oct,                          /* [3] 10.5.2.25 P3 Rest Octets                         */
9251
    de_rr_packet_ch_desc,                       /* [3] 10.5.2.25a Packet Channel Description            */
9252
    de_rr_ded_mod_or_tbf,                       /* [3] 10.5.2.25b Dedicated mode or TBF                 */
9253
    de_rr_pkt_ul_ass,                           /* [3] 10.5.2.25c RR Packet Uplink Assignment           */
9254
    de_rr_pkt_dl_ass,                           /* [3] 10.5.2.25d RR Packet Downlink Assignment         */
9255
    de_rr_pkt_dl_ass_type2,                     /* [3] 10.5.2.25e RR Packet Downlink Assignment Type 2  */
9256
    de_rr_page_mode,                            /* [3] 10.5.2.26 Page Mode                              */
9257
/*
9258
 * [3] 10.5.2.26a (void)
9259
 * [3] 10.5.2.26b (void)
9260
 * [3] 10.5.2.26c (void)
9261
 * [3] 10.5.2.26d (void)
9262
 */
9263
    de_rr_ncc_perm,                             /* [3] 10.5.2.27 NCC Permitted                          */
9264
    de_rr_pow_cmd,                              /* 10.5.2.28  Power Command                             */
9265
    de_rr_pow_cmd_and_acc_type,                 /* 10.5.2.28a Power Command and access type             */
9266
    de_rr_rach_ctrl_param,                      /* [3] 10.5.2.29 RACH Control Parameters                */
9267
    de_rr_req_ref,                              /* [3] 10.5.2.30 Request Reference                      */
9268
    de_rr_cause,                                /* 10.5.2.31  RR Cause                                  */
9269
    de_rr_sync_ind,                             /* 10.5.2.39  Synchronization Indication                */
9270
    de_rr_si1_rest_oct,                         /* [3] 10.5.2.32 SI1 Rest Octets                        */
9271
/* [3] 10.5.2.33 SI 2bis Rest Octets */
9272
    de_rr_si2ter_rest_oct,                      /* [3] 10.5.2.33a SI 2ter Rest Octets                   */
9273
    de_rr_si2quater_rest_oct,                   /* [3] 10.5.2.33b SI 2quater Rest Octets                */
9274
    de_rr_si3_rest_oct,                         /* [3] 10.5.2.34 SI3 Rest Octets                        */
9275
    de_rr_si4_rest_oct,                         /* [3] 10.5.2.35 SI4 Rest Octets                        */
9276
    de_rr_si6_rest_oct,                         /* [3] 10.5.2.35b SI6 Rest Octets                       */
9277
/* [3] 10.5.2.36 SI 7 Rest Octets
9278
 * [3] 10.5.2.37 SI 8 Rest Octets
9279
 * [3] 10.5.2.37a SI 9 Rest Octets
9280
 */
9281
    de_rr_si13_rest_oct,                        /* [3] 10.5.2.37a SI13 Rest Octets                      */
9282
/* [3] 10.5.2.37c (void)
9283
 * [3] 10.5.2.37d (void)
9284
 * [3] 10.5.2.37e SI 16 Rest Octets
9285
 * [3] 10.5.2.37f SI 17 Rest Octets
9286
 * [3] 10.5.2.37g SI 19 Rest Octets
9287
 * [3] 10.5.2.37h SI 18 Rest Octets
9288
 * [3] 10.5.2.37i SI 20 Rest Octets */
9289
    de_rr_si21_rest_oct,                        /* [3] 10.5.2.37m SI21 Rest Octets                      */
9290
    de_rr_starting_time,                        /* [3] 10.5.2.38 Starting Time                          */
9291
    de_rr_timing_adv,                           /* [3] 10.5.2.40 Timing Advance                         */
9292
    de_rr_time_diff,                            /* [3] 10.5.2.41 Time Difference                        */
9293
    de_rr_tlli,                                 /* [3] 10.5.2.41a TLLI                                  */
9294
    de_rr_tmsi_ptmsi,                           /* [3] 10.5.2.42 TMSI/P-TMSI                            */
9295
    de_rr_vgcs_tar_mode_ind,                    /* [3] 10.5.2.42a VGCS target mode Indication           */
9296
    /* Pos 40 */
9297
    de_rr_vgcs_cip_par,                         /* [3] 10.5.2.42b       VGCS Ciphering Parameters       */
9298
    de_rr_wait_ind,                             /* [3] 10.5.2.43 Wait Indication                        */
9299
/* [3] 10.5.2.44 SI10 rest octets $(ASCI)$ */
9300
    de_rr_ext_meas_result,                      /* [3] 10.5.2.45 Extended Measurement Results           */
9301
    de_rr_ext_meas_freq_list,                   /* [3] 10.5.2.46 Extended Measurement Frequency List    */
9302
    de_rr_sus_cau,                              /* [3] 10.5.2.47 Suspension Cause                       */
9303
    de_rr_apdu_id,                              /* [3] 10.5.2.48 APDU ID                                */
9304
    de_rr_apdu_flags,                           /* [3] 10.5.2.49 APDU Flags                             */
9305
    de_rr_apdu_data,                            /* [3] 10.5.2.50 APDU Data */
9306
    de_rr_ho_to_utran_cmd,                      /* [3] 10.5.2.51 Handover To UTRAN Command              */
9307
/* [3] 10.5.2.52 Handover To cdma2000 Command
9308
 * [3] 10.5.2.53 (void)
9309
 * [3] 10.5.2.54 (void)
9310
 * [3] 10.5.2.55 (void)
9311
 * [3] 10.5.2.56 3G Target Cell
9312
 * 10.5.2.57 Service Support */
9313
    de_rr_serv_sup,                             /* 10.5.2.57            Service Support                 */
9314
/*
9315
 * 10.5.2.58 MBMS p-t-m Channel Description
9316
 */
9317
    de_rr_ded_serv_inf,                         /* [3] 10.5.2.59        Dedicated Service Information   */
9318
/*
9319
 * 10.5.2.60 MPRACH Description
9320
 * 10.5.2.61 Restriction Timer
9321
 * 10.5.2.62 MBMS Session Identity
9322
 * 10.5.2.63 Reduced group or broadcast call reference
9323
 * 10.5.2.64 Talker Priority status
9324
 * 10.5.2.65 Talker Identity
9325
 * 10.5.2.66 Token
9326
 * 10.5.2.67 PS Cause
9327
 * 10.5.2.68 VGCS AMR Configuration
9328
 */
9329
    de_rr_carrier_ind,                          /* 10.5.2.69 Carrier Indication                         */
9330
/*
9331
 * 10.5.2.70 SI10bis Rest Octets
9332
 * 10.5.2.71 SI10ter Rest Octets
9333
 * 10.5.2.72 Application Data
9334
 * 10.5.2.73 Data Identity
9335
 * 10.5.2.74 Uplink Access Indication
9336
 * 10.5.2.75 Individual priorities
9337
 */
9338
    de_rr_feature_indicator,                    /* 10.5.2.76 Feature Indicator                          */
9339
/*
9340
 * 10.5.2.77 (void)
9341
 * 10.5.2.78 IPA Rest Octets
9342
 * 10.5.2.79 DL-DCCH-Message
9343
 * 10.5.2.80 CN to MS transparent information
9344
 * 10.5.2.81 PLMN Index
9345
 */
9346
    de_rr_extended_tsc_set,                     /* 10.5.2.82 Extended TSC Set */
9347
    NULL,                                       /* 10.5.2.83 EC Request reference */
9348
    de_rr_ec_pkt_ch_dsc1,                       /* 10.5.2.84 EC Packet Channel Description  Type 1      */
9349
    NULL,                                       /* 10.5.2.85 EC Packet Channel Description  Type 1      */
9350
    de_rr_ec_fua,                               /* 10.5.2.86 EC Fixed Uplink Allocation                 */
9351
    NULL,       /* NONE */
9352
};
9353
9354
/* MESSAGE FUNCTIONS */
9355
9356
/*
9357
 * 9.1.1 Additional Assignment
9358
 */
9359
static void
9360
dtap_rr_add_ass(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9361
58
{
9362
58
    uint32_t curr_offset;
9363
58
    uint32_t consumed;
9364
58
    unsigned   curr_len;
9365
9366
58
    curr_offset = offset;
9367
58
    curr_len = len;
9368
9369
    /* Channel Description  10.5.2.5  M V 3 */
9370
58
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC, NULL, ei_gsm_a_rr_missing_mandatory_element);
9371
9372
    /* Mobile Allocation  10.5.2.21  C TLV 3-10 */
9373
58
    ELEM_OPT_TLV(0x72, GSM_A_PDU_TYPE_RR, DE_RR_MOB_ALL, NULL);
9374
9375
    /* Starting Time  10.5.2.38  O TV 3 */
9376
43
    ELEM_OPT_TV(0x7c, GSM_A_PDU_TYPE_RR, DE_RR_STARTING_TIME, NULL);
9377
9378
    /* 6D Extended TSC Set      10.5.2.82       O TV 2 */
9379
43
    ELEM_OPT_TV(0x6d, GSM_A_PDU_TYPE_RR, DE_RR_EXTENDED_TSC_SET, NULL);
9380
9381
43
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
9382
43
}
9383
9384
/*
9385
 * 9.1.2 Assignment command
9386
 */
9387
static void
9388
dtap_rr_ass_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9389
169
{
9390
169
    uint32_t curr_offset;
9391
169
    uint32_t consumed;
9392
169
    unsigned   curr_len;
9393
9394
169
    curr_offset = offset;
9395
169
    curr_len = len;
9396
9397
    /* Channel Description 2                    10.5.2.5a       M V 3 */
9398
169
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC2, " - Description of the First Channel, after time", ei_gsm_a_rr_missing_mandatory_element);
9399
9400
    /* Power Command                            10.5.2.28       M V 1 */
9401
169
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_POW_CMD, NULL, ei_gsm_a_rr_missing_mandatory_element);
9402
9403
    /* 05 Frequency List                        10.5.2.13       C TLV 4-132 */
9404
169
    ELEM_OPT_TLV(0x05, GSM_A_PDU_TYPE_RR, DE_RR_FREQ_LIST, " - Frequency List, after time");
9405
9406
    /* 62 Cell Channel Description              10.5.2.1b       O TV 17 */
9407
147
    ELEM_OPT_TV(0x62, GSM_A_PDU_TYPE_RR, DE_RR_CELL_CH_DSC, NULL);
9408
9409
    /* 10 Multislot Allocation                  10.5.2.21b      C TLV 3-12 */
9410
147
    ELEM_OPT_TLV(0x10,GSM_A_PDU_TYPE_RR, DE_RR_MULT_ALL, " - Description of the multislot configuration");
9411
9412
    /* 63 Channel Mode                          10.5.2.6        O TV 2 */
9413
147
    ELEM_OPT_TV(0x63,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of the First Channel(Channel Set 1)");
9414
9415
    /* 11 Channel Mode                          10.5.2.6        O TV 2 */
9416
147
    ELEM_OPT_TV(0x11,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 2");
9417
9418
    /* 13 Channel Mode                          10.5.2.6        O TV 2 */
9419
147
    ELEM_OPT_TV(0x13,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 3");
9420
9421
    /* 14 Channel Mode                          10.5.2.6        O TV 2 */
9422
147
    ELEM_OPT_TV(0x14,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 4");
9423
9424
    /* 15 Channel Mode                          10.5.2.6        O TV 2 */
9425
146
    ELEM_OPT_TV(0x15,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 5");
9426
9427
    /* 16 Channel Mode                          10.5.2.6        O TV 2 */
9428
146
    ELEM_OPT_TV(0x16,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 6");
9429
9430
    /* 17 Channel Mode                          10.5.2.6        O TV 2 */
9431
145
    ELEM_OPT_TV(0x17,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 7");
9432
9433
    /* 18 Channel Mode                          10.5.2.6        O TV 2 */
9434
145
    ELEM_OPT_TV(0x18,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 8");
9435
9436
    /* 64 Channel Description           10.5.2.5        O TV 4 */
9437
144
    ELEM_OPT_TV(0x64,GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC, "Description of the Second Channel, after time");
9438
9439
    /* 66  Channel Mode 2                       10.5.2.7        O TV 2 */
9440
143
    ELEM_OPT_TV(0x66,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE2, " - Mode of the Second Channel");
9441
9442
    /* 72 Mobile Allocation                     10.5.2.21       C TLV 3-10 */
9443
143
    ELEM_OPT_TLV(0x72,GSM_A_PDU_TYPE_RR, DE_RR_MOB_ALL, " - Mobile Allocation, after time");
9444
9445
    /* 7C Starting Time                         10.5.2.38       O TV 3 */
9446
142
    ELEM_OPT_TV(0x7C,GSM_A_PDU_TYPE_RR, DE_RR_STARTING_TIME, NULL);
9447
9448
    /* 19 Frequency List                        10.5.2.13       C TLV 4-132 */
9449
142
    ELEM_OPT_TLV(0x19, GSM_A_PDU_TYPE_RR, DE_RR_FREQ_LIST, " - Frequency List, before time");
9450
9451
    /* 1C Channel Description 2                 10.5.2.5a       O TV 4 */
9452
142
    ELEM_OPT_TV(0x1c,GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC2, " - Description of the First Channel, before time");
9453
9454
    /* 1D Channel Description                   10.5.2.5        O TV 4 */
9455
142
    ELEM_OPT_TV(0x1d,GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC, " - Description of the Second Channel, before time");
9456
9457
    /* 1E Frequency channel sequence            10.5.2.12  C TV 10 */
9458
142
    ELEM_OPT_TV(0x1e,GSM_A_PDU_TYPE_RR, DE_RR_FREQ_CH_SEQ, " - Frequency channel sequence before time");
9459
9460
    /* 21 Mobile Allocation                     10.5.2.21       C TLV 3-10 */
9461
142
    ELEM_OPT_TLV(0x21,GSM_A_PDU_TYPE_RR, DE_RR_MOB_ALL, " - Mobile Allocation, before time");
9462
9463
    /* 9- Cipher Mode Setting                   10.5.2.9        O TV 1 */
9464
141
    ELEM_OPT_TV_SHORT(0x90,GSM_A_PDU_TYPE_RR, DE_RR_CIP_MODE_SET, NULL);
9465
    /* 01 VGCS target mode Indication VGCS target mode Indication 10.5.2.42a O TLV 3 */
9466
141
    ELEM_OPT_TLV(0x01,GSM_A_PDU_TYPE_RR, DE_RR_VGCS_TAR_MODE_IND, NULL);
9467
9468
    /* 03 Multi-Rate configuration,     MultiRate configuration 10.5.2.21aa     O TLV 4-8 */
9469
139
    ELEM_OPT_TLV(0x03,GSM_A_PDU_TYPE_RR, DE_RR_MULTIRATE_CONF, NULL);
9470
9471
    /* 04 VGCS Ciphering Parameters VGCS Ciphering Parameters 10.5.2.42b O TLV 3-15     */
9472
138
    ELEM_OPT_TLV(0x04,GSM_A_PDU_TYPE_RR, DE_RR_VGCS_CIP_PAR, NULL);
9473
9474
    /* 6D Extended TSC Set      10.5.2.82       O TV 2 */
9475
138
    ELEM_OPT_TV(0x6d, GSM_A_PDU_TYPE_RR, DE_RR_EXTENDED_TSC_SET, " - Extended TSC Set, after time");
9476
9477
    /* 6E Extended TSC Set      10.5.2.82       O TV 2 */
9478
138
    ELEM_OPT_TV(0x6e, GSM_A_PDU_TYPE_RR, DE_RR_EXTENDED_TSC_SET, " - Extended TSC Set, before time");
9479
9480
138
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
9481
9482
138
}
9483
9484
/*
9485
 * 9.1.3 Assignment complete
9486
 */
9487
static void
9488
dtap_rr_ass_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9489
114
{
9490
114
    uint32_t curr_offset;
9491
114
    uint32_t consumed;
9492
114
    unsigned   curr_len;
9493
9494
114
    curr_offset = offset;
9495
114
    curr_len = len;
9496
9497
    /* RR Cause RR Cause 10.5.2.31 M V 1 */
9498
114
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CAUSE, NULL, ei_gsm_a_rr_missing_mandatory_element);
9499
9500
114
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
9501
9502
114
}
9503
9504
/*
9505
 * 9.1.4 Assignment failure
9506
 */
9507
static void
9508
dtap_rr_ass_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9509
78
{
9510
78
    uint32_t curr_offset;
9511
78
    uint32_t consumed;
9512
78
    unsigned   curr_len;
9513
9514
78
    curr_offset = offset;
9515
78
    curr_len = len;
9516
9517
    /* RR Cause RR Cause 10.5.2.31 M V 1 */
9518
78
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CAUSE, NULL, ei_gsm_a_rr_missing_mandatory_element);
9519
9520
78
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
9521
9522
78
}
9523
9524
/*
9525
 * 9.1.5 Channel Mode Modify
9526
 */
9527
static void
9528
dtap_rr_ch_mode_mod(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9529
614
{
9530
614
    uint32_t curr_offset;
9531
614
    uint32_t consumed;
9532
614
    unsigned   curr_len;
9533
9534
614
    curr_offset = offset;
9535
614
    curr_len = len;
9536
9537
    /* Channel Description 2    10.5.2.5a       M V 3 */
9538
614
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC2, NULL, ei_gsm_a_rr_missing_mandatory_element);
9539
9540
    /* Channel Mode             10.5.2.6        M V 1 */
9541
614
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, NULL, ei_gsm_a_rr_missing_mandatory_element);
9542
9543
    /* 01 VGCS target mode Indication VGCS target mode Indication 10.5.2.42a O TLV 3 */
9544
614
    ELEM_OPT_TLV(0x01,GSM_A_PDU_TYPE_RR, DE_RR_VGCS_TAR_MODE_IND, NULL);
9545
9546
    /* 03 Multi-Rate configuration,     MultiRate configuration 10.5.2.21aa     O TLV 4-8 */
9547
424
    ELEM_OPT_TLV(0x03,GSM_A_PDU_TYPE_RR, DE_RR_MULTIRATE_CONF, NULL);
9548
9549
    /* 6D Extended TSC Set      10.5.2.82       O TV 2 */
9550
423
    ELEM_OPT_TV(0x6d, GSM_A_PDU_TYPE_RR, DE_RR_EXTENDED_TSC_SET, NULL);
9551
9552
422
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
9553
9554
422
}
9555
9556
/*
9557
 * 9.1.6 Channel Mode Modify Acknowledge
9558
 */
9559
static void
9560
dtap_rr_ch_mode_mod_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9561
158
{
9562
158
    uint32_t curr_offset;
9563
158
    uint32_t consumed;
9564
158
    unsigned   curr_len;
9565
9566
158
    curr_offset = offset;
9567
158
    curr_len = len;
9568
9569
    /* Channel Description 2    10.5.2.5a       M V 3 */
9570
158
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC2, NULL, ei_gsm_a_rr_missing_mandatory_element);
9571
9572
    /* Channel Mode             10.5.2.6        M V 1 */
9573
158
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, NULL, ei_gsm_a_rr_missing_mandatory_element);
9574
9575
    /* 6D Extended TSC Set      10.5.2.82       C TV 2 */
9576
158
    ELEM_OPT_TV(0x6d, GSM_A_PDU_TYPE_RR, DE_RR_EXTENDED_TSC_SET, NULL);
9577
9578
107
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
9579
9580
107
}
9581
9582
/*
9583
 * 9.1.7 Channel Release
9584
 */
9585
static void
9586
dtap_rr_ch_rel(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9587
239
{
9588
239
    uint32_t curr_offset;
9589
239
    uint32_t consumed;
9590
239
    unsigned   curr_len;
9591
9592
239
    curr_offset = offset;
9593
239
    curr_len = len;
9594
9595
    /* RR Cause RR Cause 10.5.2.31 M V 1 */
9596
239
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CAUSE, NULL, ei_gsm_a_rr_missing_mandatory_element);
9597
9598
    /* 73 BA Range BA Range 10.5.2.1a O TLV 6-7 */
9599
239
    ELEM_OPT_TLV(0x73, GSM_A_PDU_TYPE_RR, DE_RR_BA_RANGE, NULL);
9600
9601
    /* 74 Group Channel Description Group Channel Description 10.5.2.14b O TLV 5-13 */
9602
    /* ELEM_OPT_TLV(0x74, GSM_A_PDU_TYPE_RR, DE_GRP_CH_DESC, NULL); */
9603
9604
    /* 8x Group Cipher Key Number Group Cipher Key Number 10.5.1.10 C TV 1 */
9605
    /* ELEM_OPT_TV_SHORT(0x80, GSM_A_PDU_TYPE_RR, DE_GRP_CIP_KEY_NUM, NULL); */
9606
9607
    /* Cx GPRS Resumption GPRS Resumption 10.5.2.14c O TV 1 */
9608
167
    ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_RR, DE_RR_GPRS_RESUMPTION, NULL);
9609
9610
    /* 75 BA List Pref BA List Pref 10.5.2.1c O TLV 3-? */
9611
167
    ELEM_OPT_TLV(0x75, GSM_A_PDU_TYPE_RR, DE_RR_BA_LIST_PREF, NULL);
9612
9613
    /* 76 UTRAN Freq List 10.5.2.1d O TLV 3-? */
9614
165
    ELEM_OPT_TLV(0x76, GSM_A_PDU_TYPE_RR, DE_RR_UTRAN_FREQ_LIST, NULL);
9615
9616
    /* 62 Cell Channel Description Cell Channel Description 10.5.2.1b O TV 17 */
9617
163
    ELEM_OPT_TV(0x62, GSM_A_PDU_TYPE_RR, DE_RR_CELL_CH_DSC, NULL);
9618
9619
    /* 77 Cell selection indicator after release of all TCH and SDCCH 10.5.2.1e O TLV 4-? */
9620
161
    ELEM_OPT_TLV(0x77, GSM_A_PDU_TYPE_RR, DE_RR_CELL_SELECT_INDIC, NULL);
9621
9622
161
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
9623
9624
161
}
9625
9626
/*
9627
 * 9.1.8 Channel Request
9628
 */
9629
/* This message is NOT follow the basic format, and is only found on RACH - ignored here */
9630
9631
/*
9632
 * 9.1.9 Ciphering Mode Command
9633
 */
9634
static void
9635
dtap_rr_cip_mode_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9636
147
{
9637
147
    uint32_t curr_offset;
9638
147
    unsigned   curr_len;
9639
9640
147
    curr_offset = offset;
9641
147
    curr_len = len;
9642
9643
    /* Ciphering Mode Setting           10.5.2.9        M V 0.5 */
9644
    /* Cipher Response                  10.5.2.10       M V 0.5 */
9645
147
    ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_RR, DE_RR_CIP_MODE_SET,
9646
147
                       GSM_A_PDU_TYPE_RR, DE_RR_CIP_MODE_RESP, ei_gsm_a_rr_missing_mandatory_element);
9647
9648
147
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
9649
9650
147
}
9651
/*
9652
 * 9.1.10 Ciphering Mode Complete
9653
 */
9654
void
9655
dtap_rr_cip_mode_cpte(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9656
196
{
9657
196
    uint32_t curr_offset;
9658
196
    uint32_t consumed;
9659
196
    unsigned   curr_len;
9660
9661
196
    curr_offset = offset;
9662
196
    curr_len = len;
9663
9664
    /* Mobile Equipment Identity                10.5.1.4        O TLV */
9665
196
    ELEM_OPT_TLV(0x17, GSM_A_PDU_TYPE_COMMON, DE_MID, "Mobile Equipment Identity");
9666
9667
173
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
9668
9669
173
}
9670
9671
/*
9672
 * 9.1.11 Classmark change
9673
 */
9674
static void
9675
dtap_rr_mm_cm_change(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9676
132
{
9677
132
    uint32_t curr_offset;
9678
132
    uint32_t consumed;
9679
132
    unsigned   curr_len;
9680
9681
132
    curr_offset = offset;
9682
132
    curr_len = len;
9683
9684
    /* Mobile Station Classmark 2               10.5.1.6        M LV 4 */
9685
132
    ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL, ei_gsm_a_rr_missing_mandatory_element);
9686
    /* 20 Mobile Station Classmark 3            10.5.1.7        C TLV 3-34 */
9687
132
    ELEM_OPT_TLV(0x20, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_3, NULL);
9688
9689
105
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
9690
9691
105
}
9692
9693
/*
9694
 * 9.1.11 UTRAN Classmark Change
9695
 */
9696
static void
9697
dtap_rr_utran_classmark_change(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9698
355
{
9699
355
    uint32_t curr_offset;
9700
355
    uint32_t consumed;
9701
355
    unsigned   curr_len;
9702
9703
355
    curr_offset = offset;
9704
355
    curr_len = len;
9705
9706
    /* UTRAN Classmark          10.5.2.7a       M LV 2-? */
9707
355
    ELEM_MAND_LV(GSM_A_PDU_TYPE_RR, DE_RR_UTRAN_CM, NULL, ei_gsm_a_rr_missing_mandatory_element);
9708
9709
355
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
9710
355
}
9711
9712
/*
9713
 * 9.1.12 Classmark enquiry
9714
 */
9715
static void
9716
dtap_rr_cm_enq(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9717
158
{
9718
158
    uint32_t curr_offset;
9719
158
    uint32_t consumed;
9720
158
    unsigned   curr_len;
9721
9722
158
    curr_offset = offset;
9723
158
    curr_len = len;
9724
9725
    /* 10 Classmark Enquiry Mask        10.5.2.7c       O TLV 3 */
9726
158
    ELEM_OPT_TLV(0x10, GSM_A_PDU_TYPE_RR, DE_RR_CM_ENQ_MASK, NULL);
9727
9728
121
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
9729
9730
121
}
9731
9732
/*
9733
 * 9.1.12b Configuration change command
9734
 */
9735
static void
9736
dtap_rr_conf_change_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9737
417
{
9738
417
    uint32_t curr_offset;
9739
417
    uint32_t consumed;
9740
417
    unsigned   curr_len;
9741
9742
417
    curr_offset = offset;
9743
417
    curr_len = len;
9744
9745
    /* Multislot Allocation  10.5.2.21b  M LV 2-11 */
9746
417
    ELEM_MAND_LV(GSM_A_PDU_TYPE_RR, DE_RR_MULT_ALL, NULL, ei_gsm_a_rr_missing_mandatory_element);
9747
9748
    /* Channel Mode  10.5.2.6  O TV 2 */
9749
417
    ELEM_OPT_TV(0x63,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 1");
9750
9751
    /* Channel Mode  10.5.2.6  O TV 2 */
9752
332
    ELEM_OPT_TV(0x11,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 2");
9753
9754
    /* Channel Mode  10.5.2.6  O TV 2 */
9755
332
    ELEM_OPT_TV(0x13,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 3");
9756
9757
    /* Channel Mode  10.5.2.6  O TV 2 */
9758
332
    ELEM_OPT_TV(0x14,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 4");
9759
9760
    /* Channel Mode  10.5.2.6  O TV 2 */
9761
332
    ELEM_OPT_TV(0x15,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 5");
9762
9763
    /* Channel Mode  10.5.2.6  O TV 2 */
9764
332
    ELEM_OPT_TV(0x16,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 6");
9765
9766
    /* Channel Mode  10.5.2.6  O TV 2 */
9767
332
    ELEM_OPT_TV(0x17,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 7");
9768
9769
    /* Channel Mode  10.5.2.6  O TV 2 */
9770
331
    ELEM_OPT_TV(0x18,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 8");
9771
9772
330
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_rr_extraneous_data);
9773
330
}
9774
9775
/*
9776
 * 9.1.12c      Configuration change acknowledge
9777
 */
9778
/* empty message */
9779
9780
/*
9781
 * 9.1.12d      Configuration change reject
9782
 */
9783
static void
9784
dtap_rr_conf_change_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9785
121
{
9786
121
    uint32_t curr_offset;
9787
121
    uint32_t consumed;
9788
121
    unsigned   curr_len;
9789
9790
121
    curr_offset = offset;
9791
121
    curr_len = len;
9792
9793
    /* RR Cause  10.5.2.31  M V 1 */
9794
121
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CAUSE, NULL, ei_gsm_a_rr_missing_mandatory_element);
9795
9796
121
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
9797
121
}
9798
9799
/*
9800
 * 9.1.12e DTM Assignment Command
9801
 */
9802
static void
9803
dtap_rr_dtm_ass_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9804
196
{
9805
196
    uint32_t curr_offset;
9806
196
    uint32_t consumed;
9807
196
    unsigned   curr_len;
9808
9809
196
    curr_offset = offset;
9810
196
    curr_len = len;
9811
9812
    /* CS Power Command 10.5.2.28 M V 1 */
9813
196
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_POW_CMD, NULL, ei_gsm_a_rr_missing_mandatory_element);
9814
9815
    /* Description of the CS Channel 10.5.2.5 M V 3 */
9816
196
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC, NULL, ei_gsm_a_rr_missing_mandatory_element);
9817
9818
    /* GPRS broadcast information 10.5.2.14d M LV 7 - n */
9819
196
    ELEM_MAND_LV(GSM_A_PDU_TYPE_RR, DE_RR_GPRS_BROADCAST_INFORMATION, NULL, ei_gsm_a_rr_missing_mandatory_element);
9820
9821
    /* 10 Cell Channel Description 10.5.2.1b O TV 17 */
9822
196
    ELEM_OPT_TV(0x10, GSM_A_PDU_TYPE_RR, DE_RR_CELL_CH_DSC, NULL);
9823
9824
    /* 11 Channel mode Channel mode 10.5.2.6 O TV 2 */
9825
62
    ELEM_OPT_TV(0x11,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, NULL);
9826
    /* 12 Frequency List Frequency List 10.5.2.13 C TLV 4 - 132 */
9827
62
    ELEM_OPT_TLV(0x12, GSM_A_PDU_TYPE_RR, DE_RR_FREQ_LIST, NULL);
9828
    /* 13 Mobile Allocation Mobile Allocation 10.5.2.21 C TLV 3 - 10 */
9829
62
    ELEM_OPT_TLV(0x13, GSM_A_PDU_TYPE_RR, DE_RR_MOB_ALL, NULL);
9830
9831
    /* 15 Description of the Uplink Packet Channel Assignment RR Packet Uplink Assignment 10.5.2.25c O TLV 3 - n */
9832
62
    ELEM_OPT_TLV(0x15, GSM_A_PDU_TYPE_RR, DE_RR_PKT_UL_ASS, NULL);
9833
9834
    /* 16 Description of the Downlink Packet Channel Assignment RR Packet Downlink Assignment 10.5.2.25d O TLV 3 - n */
9835
62
    ELEM_OPT_TLV(0x16, GSM_A_PDU_TYPE_RR, DE_RR_PKT_DL_ASS, NULL);
9836
9837
    /* 17 Multi-Rate configuration MultiRate configuration 10.5.2.21aa O TLV 4-8  */
9838
62
    ELEM_OPT_TLV(0x17,GSM_A_PDU_TYPE_RR, DE_RR_MULTIRATE_CONF, NULL);
9839
9840
    /* 9- Ciphering Mode Setting Ciphering Mode Setting 10.5.2.9 O TV 1 */
9841
62
    ELEM_OPT_TV_SHORT(0x90,GSM_A_PDU_TYPE_RR, DE_RR_CIP_MODE_SET, NULL);
9842
9843
    /* 18 Mobile Allocation C2 Mobile Allocation 10.5.2.21 C TLV 3 - 10 */
9844
62
    ELEM_OPT_TLV(0x18, GSM_A_PDU_TYPE_RR, DE_RR_MOB_ALL, " - C2");
9845
9846
    /* 19 Frequency List C2 Frequency List 10.5.2.13 C TLV 4 - 132 */
9847
62
    ELEM_OPT_TLV(0x19, GSM_A_PDU_TYPE_RR, DE_RR_FREQ_LIST, " - C2");
9848
9849
    /* 20 Description of the Downlink Packet Channel Assignment Type 2 RR Packet Downlink Assignment Type 2 10.5.2.25e C TLV 3 n */
9850
62
    ELEM_OPT_TLV(0x20, GSM_A_PDU_TYPE_RR, DE_RR_PKT_DL_ASS_TYPE2, NULL);
9851
9852
    /* 21 Channel Description C2 Channel Description 3 10.5.2.5c O TV 3 */
9853
61
    ELEM_OPT_TV(0x21,GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC3, " - Channel Description C2");
9854
9855
    /* 6D Extended TSC Set      10.5.2.82       C TV 2 */
9856
60
    ELEM_OPT_TV(0x6d, GSM_A_PDU_TYPE_RR, DE_RR_EXTENDED_TSC_SET, NULL);
9857
9858
59
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
9859
59
}
9860
9861
/*
9862
 * 9.1.12f DTM Assignment Failure
9863
 */
9864
static void
9865
dtap_rr_dtm_ass_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9866
240
{
9867
240
    uint32_t curr_offset;
9868
240
    uint32_t consumed;
9869
240
    unsigned   curr_len;
9870
9871
240
    curr_offset = offset;
9872
240
    curr_len = len;
9873
9874
    /* RR Cause RR Cause 10.5.2.31 M V 1 */
9875
240
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CAUSE, NULL, ei_gsm_a_rr_missing_mandatory_element);
9876
9877
240
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_rr_extraneous_data);
9878
240
}
9879
9880
/*
9881
 * 9.1.12g DTM Information
9882
 */
9883
static void
9884
dtap_rr_dtm_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9885
124
{
9886
124
    uint32_t curr_offset;
9887
124
    uint32_t consumed;
9888
124
    unsigned   curr_len;
9889
9890
124
    curr_offset = offset;
9891
124
    curr_len = len;
9892
9893
    /* Routeing Area Identification 10.5.5.15 M V 6 */
9894
124
    ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, NULL, ei_gsm_a_rr_missing_mandatory_element);
9895
9896
    /* DTM Information Details 10.5.2.11a M LV 4-n */
9897
124
    ELEM_MAND_LV(GSM_A_PDU_TYPE_RR, DE_RR_DTM_INFO_DETAILS, NULL, ei_gsm_a_rr_missing_mandatory_element);
9898
9899
124
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_rr_extraneous_data);
9900
124
}
9901
9902
/*
9903
 * 9.1.12h DTM Reject
9904
 */
9905
static void
9906
dtap_rr_dtm_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9907
136
{
9908
136
    uint32_t curr_offset;
9909
136
    uint32_t consumed;
9910
136
    unsigned   curr_len;
9911
9912
136
    curr_offset = offset;
9913
136
    curr_len = len;
9914
9915
    /* Wait indication 10.5.2.43 M V 1 */
9916
136
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_WAIT_IND, " - DTM Wait Indication", ei_gsm_a_rr_missing_mandatory_element);
9917
9918
136
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_rr_extraneous_data);
9919
136
}
9920
9921
/*
9922
 * 9.1.12i DTM Request
9923
 */
9924
static void
9925
dtap_rr_dtm_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9926
124
{
9927
124
    uint32_t curr_offset;
9928
124
    uint32_t consumed;
9929
124
    unsigned   curr_len;
9930
9931
124
    curr_offset = offset;
9932
124
    curr_len = len;
9933
9934
    /* TLLI 10.5.2.41a M V 4 */
9935
124
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_TLLI, NULL, ei_gsm_a_rr_missing_mandatory_element);
9936
9937
    /* Channel Request Description 2 M LV 5-n */
9938
124
    ELEM_MAND_LV(GSM_A_PDU_TYPE_RR, DE_RR_CHNL_REQ_DESC2, NULL, ei_gsm_a_rr_missing_mandatory_element);
9939
9940
124
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_rr_extraneous_data);
9941
124
}
9942
9943
/*
9944
 * 9.1.13 Frequency Redefinition
9945
 */
9946
static void
9947
dtap_rr_freq_redef(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9948
248
{
9949
248
    uint32_t curr_offset;
9950
248
    uint32_t consumed;
9951
248
    unsigned   curr_len;
9952
9953
248
    curr_offset = offset;
9954
248
    curr_len = len;
9955
9956
    /* Channel Description  10.5.2.5  M V 3 */
9957
248
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC, NULL, ei_gsm_a_rr_missing_mandatory_element);
9958
9959
    /* Mobile Allocation  10.5.2.21  M LV 1-9 */
9960
248
    ELEM_MAND_LV(GSM_A_PDU_TYPE_RR, DE_RR_MOB_ALL, NULL, ei_gsm_a_rr_missing_mandatory_element);
9961
9962
    /* Starting Time  10.5.2.38  M V 2 */
9963
248
    ELEM_MAND_LV(GSM_A_PDU_TYPE_RR, DE_RR_STARTING_TIME, NULL, ei_gsm_a_rr_missing_mandatory_element);
9964
9965
    /* Cell Channel Description  10.5.2.1b  O TV 17 */
9966
248
    ELEM_OPT_TV(0x62,GSM_A_PDU_TYPE_RR, DE_RR_CELL_CH_DSC, NULL);
9967
9968
    /* Carrier Indication  10.5.2.69  O TV 1 */
9969
204
    ELEM_OPT_TV_SHORT(0x90,GSM_A_PDU_TYPE_RR, DE_RR_CARRIER_IND,NULL);
9970
9971
    /* Mobile Allocation  10.5.2.21  O TLV 1-9 */
9972
204
    ELEM_OPT_TLV(0x11, GSM_A_PDU_TYPE_RR, DE_RR_MOB_ALL, " - Mobile Allocation C2");
9973
9974
    /* Channel Description 3  10.5.2.5c  O TV 3 */
9975
203
    ELEM_OPT_TV(0x12,GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC3, " - Channel Description C2");
9976
9977
    /* 6D Extended TSC Set      10.5.2.82       C TV 2 */
9978
203
    ELEM_OPT_TV(0x6d, GSM_A_PDU_TYPE_RR, DE_RR_EXTENDED_TSC_SET, NULL);
9979
9980
203
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_rr_extraneous_data);
9981
203
}
9982
9983
/*
9984
 * 9.1.13b GPRS suspension request
9985
 */
9986
static void
9987
dtap_rr_gprs_sus_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
9988
174
{
9989
174
    uint32_t curr_offset;
9990
174
    uint32_t consumed;
9991
174
    unsigned   curr_len;
9992
9993
174
    curr_offset = offset;
9994
174
    curr_len = len;
9995
9996
    /* TLLI                                                             10.5.2.41a      M V 4 */
9997
174
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_TLLI, NULL, ei_gsm_a_rr_missing_mandatory_element);
9998
9999
    /* Routeing Area Identification                     10.5.5.15       M V 6 */
10000
174
    ELEM_MAND_V(GSM_A_PDU_TYPE_GM, DE_RAI, NULL, ei_gsm_a_rr_missing_mandatory_element);
10001
    /* Suspension cause                                 10.5.2.47       M V 1 */
10002
174
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_SUS_CAU, NULL, ei_gsm_a_rr_missing_mandatory_element);
10003
10004
    /* 01 Service Support                               10.5.2.57       O TV 2 */
10005
174
    ELEM_OPT_TV_SHORT(0x01,GSM_A_PDU_TYPE_RR, DE_RR_SERV_SUP,NULL);
10006
10007
138
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_rr_extraneous_data);
10008
10009
138
}
10010
10011
/*
10012
 * 9.1.14 Handover Access
10013
 */
10014
/* This message does NOT follow the basic format, and is only found on DCH during initial handover access */
10015
10016
/* 3GPP TS 24.008 version 4.7.0 Release 4
10017
 * [3] 9.1.15
10018
 */
10019
void
10020
dtap_rr_ho_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10021
243
{
10022
243
    uint32_t curr_offset;
10023
243
    uint32_t consumed;
10024
243
    unsigned   curr_len;
10025
10026
243
    curr_offset = offset;
10027
243
    curr_len = len;
10028
10029
    /* Mandatory Elements
10030
     * Cell description 10.5.2.2
10031
     */
10032
243
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CELL_DSC, NULL, ei_gsm_a_rr_missing_mandatory_element);
10033
10034
    /* Description of the first channel,after time
10035
     * Channel Description 2 10.5.2.5a
10036
     */
10037
243
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC2, " - Description of the first channel, after time", ei_gsm_a_rr_missing_mandatory_element);
10038
10039
    /* Handover Reference 10.5.2.15 */
10040
243
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_HO_REF, NULL, ei_gsm_a_rr_missing_mandatory_element);
10041
10042
    /* Power Command and Access type 10.5.2.28a */
10043
243
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_POW_CMD_AND_ACC_TYPE, NULL, ei_gsm_a_rr_missing_mandatory_element);
10044
10045
    /* optional elements */
10046
10047
    /* Synchronization Indication 10.5.2.39 */
10048
243
    ELEM_OPT_TV_SHORT(0xD0,GSM_A_PDU_TYPE_RR, DE_RR_SYNC_IND,NULL);
10049
10050
    /* Frequency Short List 10.5.2.14 */
10051
185
    ELEM_OPT_TV(0x02,GSM_A_PDU_TYPE_RR, DE_RR_FREQ_SHORT_LIST," - Frequency Short List, after time");
10052
10053
    /* Frequency List 10.5.2.13 */
10054
184
    ELEM_OPT_TLV(0x05, GSM_A_PDU_TYPE_RR, DE_RR_FREQ_LIST, " - Frequency List, after time");
10055
10056
    /* Cell Channel Description 10.5.2.1b */
10057
184
    ELEM_OPT_TV(0x62,GSM_A_PDU_TYPE_RR, DE_RR_CELL_CH_DSC, NULL);
10058
10059
    /* Multislot Allocation 10.5.2.21b */
10060
184
    ELEM_OPT_TLV(0x10,GSM_A_PDU_TYPE_RR, DE_RR_MULT_ALL, NULL);
10061
10062
    /* Mode of the First Channel(Channel Set 1)) Channel Mode 10.5.2.6*/
10063
184
    ELEM_OPT_TV(0x63,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of the First Channel(Channel Set 1))");
10064
10065
    /* Mode of Channel Set 2 Channel Mode 10.5.2.6*/
10066
183
    ELEM_OPT_TV(0x11,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 2");
10067
10068
    /* Mode of Channel Set 3 Channel Mode 10.5.2.6*/
10069
182
    ELEM_OPT_TV(0x13,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 3");
10070
10071
    /* Mode of Channel Set 4 Channel Mode 10.5.2.6*/
10072
182
    ELEM_OPT_TV(0x14,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 4");
10073
10074
    /* Mode of Channel Set 5 Channel Mode 10.5.2.6*/
10075
181
    ELEM_OPT_TV(0x15,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 5");
10076
10077
    /* Mode of Channel Set 6 Channel Mode 10.5.2.6*/
10078
181
    ELEM_OPT_TV(0x16,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 6");
10079
10080
    /* Mode of Channel Set 7 Channel Mode 10.5.2.6*/
10081
181
    ELEM_OPT_TV(0x17,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 7");
10082
10083
    /* Mode of Channel Set 8 Channel Mode 10.5.2.6*/
10084
181
    ELEM_OPT_TV(0x18,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE, " - Mode of Channel Set 8");
10085
10086
    /* Description of the Second Channel, after time, Channel Description 10.5.2.5 */
10087
180
    ELEM_OPT_TV(0x64,GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC, " - Description of the Second Channel, after time");
10088
10089
    /* Mode of the Second Channel, Channel Mode 2 10.5.2.7 */
10090
179
    ELEM_OPT_TV(0x66,GSM_A_PDU_TYPE_RR, DE_RR_CH_MODE2, " - Mode of the Second Channel");
10091
10092
    /* Frequency Channel Sequence, after time, Frequency Channel Sequence 10.5.2.12 */
10093
179
    ELEM_OPT_TV(0x69,GSM_A_PDU_TYPE_RR, DE_RR_FREQ_CH_SEQ, " - Frequency Channel Sequence, after time");
10094
10095
    /* Mobile Allocation, after time, Mobile Allocation 10.5.2.21 */
10096
178
    ELEM_OPT_TLV(0x72,GSM_A_PDU_TYPE_RR, DE_RR_MOB_ALL, " - Mobile Allocation, after time");
10097
10098
    /* Starting Time 10.5.2.38 */
10099
178
    ELEM_OPT_TV(0x7C,GSM_A_PDU_TYPE_RR, DE_RR_STARTING_TIME, NULL);
10100
10101
    /* Real Time Difference, Time Difference 10.5.2.41 */
10102
178
    ELEM_OPT_TV(0x7B,GSM_A_PDU_TYPE_RR, DE_RR_TIME_DIFF, " - Real Time Difference");
10103
10104
    /* Timing Advance, Timing Advance 10.5.2.40 */
10105
178
    ELEM_OPT_TV(0x7D,GSM_A_PDU_TYPE_RR, DE_RR_TIMING_ADV, NULL);
10106
10107
    /* Frequency Short List, before time, Frequency Short List 10.5.2.14 */
10108
178
    ELEM_OPT_TV(0x12,GSM_A_PDU_TYPE_RR, DE_RR_FREQ_SHORT_LIST, " - Frequency Short List, before time");
10109
10110
    /* Frequency List, before time,     Frequency List 10.5.2.13 */
10111
178
    ELEM_OPT_TLV(0x19,GSM_A_PDU_TYPE_RR, DE_RR_FREQ_LIST, " - Frequency List, before time");
10112
10113
    /* Description of the First Channel, before time,   Channel Description 2 10.5.2.5a*/
10114
178
    ELEM_OPT_TV(0x1c,GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC2, " - Description of the First Channel, before time");
10115
10116
    /* Description of the Second Channel, before time,  Channel Description 10.5.2.5*/
10117
178
    ELEM_OPT_TV(0x1d,GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC, " - Description of the Second Channel, before time");
10118
10119
    /* Frequency channel sequence before time,  Frequency channel sequence 10.5.2.12*/
10120
178
    ELEM_OPT_TV(0x1e,GSM_A_PDU_TYPE_RR, DE_RR_FREQ_CH_SEQ, " - Frequency channel sequence before time");
10121
10122
    /* Mobile Allocation, before time,  Mobile Allocation 10.5.2.21 */
10123
177
    ELEM_OPT_TLV(0x21,GSM_A_PDU_TYPE_RR, DE_RR_MOB_ALL, " - Mobile Allocation, before time");
10124
10125
    /* Cipher Mode Setting,     Cipher Mode Setting 10.5.2.9 */
10126
177
    ELEM_OPT_TV_SHORT(0x90,GSM_A_PDU_TYPE_RR, DE_RR_CIP_MODE_SET, NULL);
10127
10128
    /* VGCS target mode Indication,     VGCS target mode Indication 10.5.2.42a */
10129
177
    ELEM_OPT_TLV(0x01,GSM_A_PDU_TYPE_RR, DE_RR_VGCS_TAR_MODE_IND, NULL);
10130
10131
    /* Multi-Rate configuration,        MultiRate configuration 10.5.2.21a */
10132
176
    ELEM_OPT_TLV(0x03,GSM_A_PDU_TYPE_RR, DE_RR_MULTIRATE_CONF, NULL);
10133
10134
    /* Dynamic ARFCN Mapping,   Dynamic ARFCN Mapping 10.5.2.11b */
10135
175
    ELEM_OPT_TLV(0x76,GSM_A_PDU_TYPE_RR, DE_RR_DYN_ARFCN_MAP, NULL);
10136
10137
    /* VGCS Ciphering Parameters,       VGCS Ciphering Parameters 10.5.2.42b */
10138
175
    ELEM_OPT_TLV(0x04,GSM_A_PDU_TYPE_RR, DE_RR_VGCS_CIP_PAR, NULL);
10139
10140
    /* Dedicated Service Information,   Dedicated Service Information 10.5.2.59 */
10141
174
    ELEM_OPT_TV(0x51,GSM_A_PDU_TYPE_RR, DE_RR_DED_SERV_INF, NULL);
10142
10143
    /* 6D Extended TSC Set      10.5.2.82       O TV 2 */
10144
173
    ELEM_OPT_TV(0x6d, GSM_A_PDU_TYPE_RR, DE_RR_EXTENDED_TSC_SET, " - Extended TSC Set, after time");
10145
10146
    /* 6E Extended TSC Set      10.5.2.82       O TV 2 */
10147
172
    ELEM_OPT_TV(0x6e, GSM_A_PDU_TYPE_RR, DE_RR_EXTENDED_TSC_SET, " - Extended TSC Set, before time");
10148
10149
172
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_rr_extraneous_data);
10150
10151
172
}
10152
10153
/*
10154
 * 9.1.15a Inter System To UTRAN Handover Command
10155
 */
10156
static void
10157
dtap_rr_inter_syst_to_utran_ho_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10158
1.34k
{
10159
1.34k
    uint32_t curr_offset;
10160
1.34k
    uint32_t consumed;
10161
1.34k
    unsigned   curr_len;
10162
10163
1.34k
    curr_offset = offset;
10164
1.34k
    curr_len = len;
10165
10166
    /* UTRAN Classmark          10.5.2.51       M LV 2-? */
10167
1.34k
    ELEM_MAND_LV(GSM_A_PDU_TYPE_RR, DE_RR_HO_TO_UTRAN_CMD, NULL, ei_gsm_a_rr_missing_mandatory_element);
10168
10169
1.34k
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
10170
1.34k
}
10171
10172
/* 3GPP TS 24.008 version 4.7.0 Release 4
10173
 * [3] 9.1.16
10174
 */
10175
static void
10176
dtap_rr_ho_cpte(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10177
115
{
10178
115
    uint32_t curr_offset;
10179
115
    uint32_t consumed;
10180
115
    unsigned   curr_len;
10181
10182
115
    curr_offset = offset;
10183
115
    curr_len = len;
10184
10185
    /* RR Cause RR Cause 10.5.2.31 M V 1 */
10186
115
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CAUSE, NULL, ei_gsm_a_rr_missing_mandatory_element);
10187
10188
    /* 77 Mobile Observed Time Difference       Mobile Time Difference 10.5.2.21a */
10189
115
    ELEM_OPT_TLV(0x77,GSM_A_PDU_TYPE_RR, DE_RR_MOB_TIME_DIFF, " - Mobile Observed Time Difference");
10190
10191
85
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_rr_extraneous_data);
10192
10193
85
}
10194
10195
/*
10196
 * 9.1.17 Handover failure
10197
 */
10198
static void
10199
dtap_rr_ho_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10200
174
{
10201
174
    uint32_t curr_offset;
10202
174
    uint32_t consumed;
10203
174
    unsigned   curr_len;
10204
10205
174
    curr_offset = offset;
10206
174
    curr_len = len;
10207
10208
    /* RR Cause RR Cause 10.5.2.31 M V 1 */
10209
174
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CAUSE, NULL, ei_gsm_a_rr_missing_mandatory_element);
10210
10211
174
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
10212
10213
174
}
10214
10215
/*
10216
 * 9.1.18 Immediate assignment See 3GPP TS 44.018
10217
 */
10218
static void
10219
dtap_rr_imm_ass(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10220
256
{
10221
256
    uint32_t curr_offset;
10222
256
    uint32_t consumed;
10223
256
    unsigned   curr_len;
10224
256
    uint8_t oct;
10225
10226
256
    curr_offset = offset;
10227
256
    curr_len = len;
10228
10229
256
    oct = tvb_get_uint8(tvb, curr_offset);
10230
10231
    /* NOTE: The order of the mandatory information elements should be chosen so that
10232
     * information elements with 1/2 octet of content (type 1) go together in succession.
10233
     * The first type 1 information element occupies bits 1 to 4 of octet N,
10234
     * the second bits 5 to 8 of octet N, the third bits 1 to 4 of octet N+1 etc.
10235
     * If the number of type 1 information elements is odd then bits 5 to 8 of the last octet
10236
     *  occupied by these information elements should be treated as spare bits,
10237
     * i.e. coded with a "0" in each.
10238
     */
10239
10240
    /* Page Mode                        10.5.2.26       M V 1/2 */
10241
    /* Dedicated mode or TBF            10.5.2.25b      M V 1/2 */
10242
256
    ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_RR, DE_RR_PAGE_MODE,
10243
256
                       GSM_A_PDU_TYPE_RR, DE_RR_DED_MOD_OR_TBF, ei_gsm_a_rr_missing_mandatory_element);
10244
10245
256
    if((oct&0x10) == 0){
10246
        /* Channel Description                  10.5.2.5        C V 3m */
10247
73
        ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC, NULL, ei_gsm_a_rr_missing_mandatory_element);
10248
183
    }else{
10249
        /* Packet Channel Description   10.5.2.25a      C V 3
10250
         * If the Dedicated mode or TBF IE indicates that the message assigns a Temporary Block Flow (TBF),
10251
         * the mobile station shall consider this information element present in the message.
10252
         * If the Dedicated mode or TBF IE indicates that this message is the first of two in a two-message
10253
         * assignment of an uplink or downlink TBF, the mobile station shall ignore the contents
10254
         * of this information element and regard it as an unnecessary IE.
10255
         */
10256
183
        if((oct&0x04) == 0){
10257
33
            ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_PACKET_CH_DESC, NULL, ei_gsm_a_rr_missing_mandatory_element);
10258
33
        }
10259
183
    }
10260
    /* Request Reference                        10.5.2.30       M V 3   */
10261
256
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_REQ_REF, NULL, ei_gsm_a_rr_missing_mandatory_element);
10262
10263
    /* Timing Advance                           10.5.2.40       M V 1   */
10264
256
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_TIMING_ADV, NULL, ei_gsm_a_rr_missing_mandatory_element);
10265
    /* Mobile Allocation                        10.5.2.21       M LV 1-9 */
10266
256
    ELEM_MAND_LV(GSM_A_PDU_TYPE_RR, DE_RR_MOB_ALL, NULL, ei_gsm_a_rr_missing_mandatory_element);
10267
    /* 7C Starting Time                         10.5.2.38       O TV 3  */
10268
256
    ELEM_OPT_TV(0x7C,GSM_A_PDU_TYPE_RR, DE_RR_STARTING_TIME, NULL);
10269
    /* IA Rest Octets                           10.5.2.16       M V 0-11 */
10270
228
    if(tvb_reported_length_remaining(tvb,curr_offset) > 0)
10271
120
        ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_IA_REST_OCT, NULL, ei_gsm_a_rr_missing_mandatory_element);
10272
10273
    /* 6D Extended TSC Set                      10.5.2.82       O TV 2 */
10274
228
    ELEM_OPT_TV(0x6d, GSM_A_PDU_TYPE_RR, DE_RR_EXTENDED_TSC_SET, NULL);
10275
141
}
10276
10277
/*
10278
 * 9.1.19 Immediate assignment extended
10279
 */
10280
static void
10281
dtap_rr_imm_ass_ext(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10282
104
{
10283
104
    uint32_t curr_offset;
10284
104
    uint32_t consumed;
10285
104
    unsigned   curr_len;
10286
10287
104
    curr_offset = offset;
10288
104
    curr_len = len;
10289
10290
    /* Page Mode                                                10.5.2.26       M V 1/2 */
10291
    /* Feature Indicator                                        10.5.2.76       M V 1/2 */
10292
104
    ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_RR, DE_RR_PAGE_MODE,
10293
104
                       GSM_A_PDU_TYPE_RR, DE_RR_FEATURE_INDICATOR, ei_gsm_a_rr_missing_mandatory_element);
10294
    /* Channel Description 1    Channel Description             10.5.2.5        M V 3 */
10295
104
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC, " - Channel Description 1", ei_gsm_a_rr_missing_mandatory_element);
10296
    /* Request Reference 1      Request Reference               10.5.2.30       M V 3   */
10297
104
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_REQ_REF, " - Request Reference 1", ei_gsm_a_rr_missing_mandatory_element);
10298
    /* Timing Advance 1 Timing Advance                          10.5.2.40       M V 1   */
10299
104
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_TIMING_ADV, " - Timing Advance 1", ei_gsm_a_rr_missing_mandatory_element);
10300
    /* Channel Description 2    Channel Description             10.5.2.5        M V 3 */
10301
104
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC, " - Channel Description 2", ei_gsm_a_rr_missing_mandatory_element);
10302
    /* Request Reference 2      Request Reference               10.5.2.30       M V 3   */
10303
104
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_REQ_REF, " - Request Reference 2", ei_gsm_a_rr_missing_mandatory_element);
10304
    /* Timing Advance 2 Timing Advance                          10.5.2.40       M V 1   */
10305
104
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_TIMING_ADV, " - Timing Advance 2", ei_gsm_a_rr_missing_mandatory_element);
10306
    /* Mobile Allocation                                        10.5.2.21       M LV 1-9 */
10307
104
    ELEM_MAND_LV(GSM_A_PDU_TYPE_RR, DE_RR_MOB_ALL, NULL, ei_gsm_a_rr_missing_mandatory_element);
10308
    /* 7C Starting Time                                         10.5.2.38       O TV 3  */
10309
104
    ELEM_OPT_TV(0x7C,GSM_A_PDU_TYPE_RR, DE_RR_STARTING_TIME, NULL);
10310
    /* IAX Rest Octets                                          10.5.2.18       M V 0-4 */
10311
71
    if(tvb_reported_length_remaining(tvb,curr_offset) > 0)
10312
20
        ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_IAX_REST_OCT, NULL, ei_gsm_a_rr_missing_mandatory_element);
10313
10314
71
}
10315
10316
/*
10317
 * 9.1.20 Immediate assignment reject
10318
 */
10319
static void
10320
dtap_rr_imm_ass_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10321
181
{
10322
181
    uint32_t curr_offset;
10323
181
    uint32_t consumed;
10324
181
    unsigned   curr_len;
10325
10326
181
    curr_offset = offset;
10327
181
    curr_len = len;
10328
10329
    /* Page Mode                                        10.5.2.26       M V 1/2 */
10330
    /* Feature Indicator                                        10.5.2.76       M V 1/2 */
10331
181
    ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_RR, DE_RR_PAGE_MODE,
10332
181
                       GSM_A_PDU_TYPE_RR, DE_RR_FEATURE_INDICATOR, ei_gsm_a_rr_missing_mandatory_element);
10333
    /* Request Reference 1      Request Reference               10.5.2.30       M V 3   */
10334
181
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_REQ_REF, " - Request Reference 1", ei_gsm_a_rr_missing_mandatory_element);
10335
    /* Wait Indication 1        Wait Indication                 10.5.2.43       M V 1   */
10336
181
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_WAIT_IND, " - Wait Indication 1", ei_gsm_a_rr_missing_mandatory_element);
10337
    /* Request Reference 2      Request Reference               10.5.2.30       M V 3   */
10338
181
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_REQ_REF, " - Request Reference 2", ei_gsm_a_rr_missing_mandatory_element);
10339
    /* Wait Indication 2        Wait Indication                 10.5.2.43       M V 1   */
10340
181
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_WAIT_IND, " - Wait Indication 2", ei_gsm_a_rr_missing_mandatory_element);
10341
    /* Request Reference 3      Request Reference               10.5.2.30       M V 3   */
10342
181
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_REQ_REF, " - Request Reference 3", ei_gsm_a_rr_missing_mandatory_element);
10343
    /* Wait Indication 3        Wait Indication                 10.5.2.43       M V 1   */
10344
181
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_WAIT_IND, " - Wait Indication 3", ei_gsm_a_rr_missing_mandatory_element);
10345
    /* Request Reference 4      Request Reference               10.5.2.30       M V 3   */
10346
181
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_REQ_REF, " - Request Reference 4", ei_gsm_a_rr_missing_mandatory_element);
10347
    /* Wait Indication 4        Wait Indication                 10.5.2.43       M V 1   */
10348
181
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_WAIT_IND, " - Wait Indication 4", ei_gsm_a_rr_missing_mandatory_element);
10349
    /* IAR Rest Octets                          10.5.2.19       M V 3 */
10350
181
    if(tvb_reported_length_remaining(tvb,curr_offset) > 0)
10351
92
        ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_IAR_REST_OCT, NULL, ei_gsm_a_rr_missing_mandatory_element);
10352
10353
181
}
10354
10355
/*
10356
 * 9.1.21 Measurement report
10357
 */
10358
static void
10359
dtap_rr_meas_rep(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10360
153
{
10361
153
    uint32_t curr_offset;
10362
153
    uint32_t consumed;
10363
153
    unsigned   curr_len;
10364
10365
153
    curr_offset = offset;
10366
153
    curr_len = len;
10367
10368
    /* Measurement Results 10.5.2.20 M V 16 */
10369
153
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_MEAS_RES, NULL, ei_gsm_a_rr_missing_mandatory_element);
10370
153
}
10371
10372
/*
10373
 * 9.1.21f Packet Assignment
10374
 */
10375
static void
10376
dtap_rr_pkt_assign(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10377
108
{
10378
108
    uint32_t curr_offset;
10379
108
    uint32_t consumed;
10380
108
    unsigned   curr_len;
10381
10382
108
    curr_offset = offset;
10383
108
    curr_len = len;
10384
10385
    /* GPRS broadcast information 10.5.2.14d M LV 7-n */
10386
108
    ELEM_MAND_LV(GSM_A_PDU_TYPE_RR, DE_RR_GPRS_BROADCAST_INFORMATION, NULL, ei_gsm_a_rr_missing_mandatory_element);
10387
10388
    /* 0x22 RR Packet Uplink Assignment 10.5.2.25c O TLV 3-n */
10389
108
    ELEM_OPT_TLV(0x22, GSM_A_PDU_TYPE_RR, DE_RR_PKT_UL_ASS, NULL);
10390
10391
    /* 0x23 RR Packet Downlink Assignment 10.5.2.25d O TLV 3-n */
10392
28
    ELEM_OPT_TLV(0x23, GSM_A_PDU_TYPE_RR, DE_RR_PKT_DL_ASS, NULL);
10393
10394
    /* 0x12 Frequency List 10.5.2.13 C TLV 4-132 */
10395
28
    ELEM_OPT_TLV(0x12, GSM_A_PDU_TYPE_RR, DE_RR_FREQ_LIST, " - Frequency List C2");
10396
10397
    /* 0x13 Mobile Allocation 10.5.2.21 C TLV 3-10 */
10398
28
    ELEM_OPT_TLV(0x13, GSM_A_PDU_TYPE_RR, DE_RR_MOB_ALL, " - Mobile Allocation C2");
10399
10400
    /* 0x14 Channel Description 3 10.5.2.5c O TV 3 */
10401
28
    ELEM_OPT_TV(0x14, GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC3, " - Channel Description C2");
10402
10403
    /* 0x24 RR Packet Downlink Assignment Type 2 10.5.2.25e C TLV 3-n */
10404
28
    ELEM_OPT_TLV(0x24, GSM_A_PDU_TYPE_RR, DE_RR_PKT_DL_ASS_TYPE2, NULL);
10405
10406
    /* 0x6D Extended TSC Set 10.5.2.82 C TV 2 */
10407
28
    ELEM_OPT_TV(0x6d, GSM_A_PDU_TYPE_RR, DE_RR_EXTENDED_TSC_SET, NULL);
10408
10409
28
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_rr_extraneous_data);
10410
28
}
10411
10412
/*
10413
 * 9.1.21g Packet Notification
10414
 */
10415
static void
10416
dtap_rr_pkt_notif(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10417
73
{
10418
73
    uint32_t curr_offset;
10419
73
    uint32_t consumed;
10420
73
    unsigned   curr_len;
10421
10422
73
    curr_offset = offset;
10423
73
    curr_len = len;
10424
10425
    /* 0x10 P-TMSI 10.5.2.42 C TV 5 */
10426
73
    ELEM_OPT_TV(0x10, GSM_A_PDU_TYPE_RR, DE_RR_TMSI_PTMSI, " - Packet TMSI");
10427
10428
    /* 0x11 Mobile Identity 10.5.1.4 C TLV 3-11 */
10429
61
    ELEM_OPT_TLV(0x11, GSM_A_PDU_TYPE_COMMON, DE_MID, NULL);
10430
10431
61
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_rr_extraneous_data);
10432
61
}
10433
10434
/*
10435
 * 9.1.22 Paging Request Type 1
10436
 */
10437
static void
10438
dtap_rr_paging_req_type_1(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10439
300
{
10440
300
    uint32_t curr_offset;
10441
300
    uint32_t consumed;
10442
300
    unsigned   curr_len;
10443
300
    uint8_t l2plen = tvb_get_uint8(tvb, 0) >> 2;
10444
10445
300
    curr_offset = offset;
10446
300
    curr_len = len;
10447
10448
    /* RR Page Mode 10.5.2.26 M V 1/2 */
10449
    /* RR Channel Needed 10.5.2.8 M V 1/2 */
10450
300
    ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_RR, DE_RR_PAGE_MODE,
10451
300
                       GSM_A_PDU_TYPE_RR, DE_RR_CHNL_NEEDED, ei_gsm_a_rr_missing_mandatory_element);
10452
10453
    /* RR Mobile Identity 10.5.1.4 M LV 2-9 */
10454
300
    ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, " - Mobile Identity 1", ei_gsm_a_rr_missing_mandatory_element);
10455
10456
    /* RR Mobile Identity 10.5.1.4 O TLV 3-10 */
10457
300
    ELEM_OPT_TLV(0x17, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Mobile Identity 2");
10458
10459
    /* 9.1.22.4 P1 Rest Octets: The sum of the length of this IE and the L2 Pseudo Length of the message equals 22. */
10460
97
    if (l2plen < 22) {
10461
        /* RR P1 Rest Octets 10.5.2.23 M V 0-17 */
10462
37
        ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_P1_REST_OCT, NULL, ei_gsm_a_rr_missing_mandatory_element);
10463
37
    }
10464
10465
97
}
10466
10467
/*
10468
 * 9.1.23 Paging Request Type 2
10469
 */
10470
static void
10471
dtap_rr_paging_req_type_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10472
274
{
10473
274
    uint32_t curr_offset;
10474
274
    uint32_t consumed;
10475
274
    unsigned   curr_len;
10476
10477
274
    curr_offset = offset;
10478
274
    curr_len = len;
10479
10480
    /* RR Page Mode 10.5.2.26 M V 1/2 */
10481
    /* RR Channel Needed 10.5.2.8 M V 1/2 */
10482
274
    ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_RR, DE_RR_PAGE_MODE,
10483
274
                       GSM_A_PDU_TYPE_RR, DE_RR_CHNL_NEEDED, ei_gsm_a_rr_missing_mandatory_element);
10484
10485
    /* RR TMSI/P-TMSI 10.5.2.42 M V 4 */
10486
274
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_TMSI_PTMSI, " - Mobile Identity 1", ei_gsm_a_rr_missing_mandatory_element);
10487
10488
    /* RR TMSI/P-TMSI 10.5.2.42 M V 4 */
10489
274
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_TMSI_PTMSI, " - Mobile Identity 2", ei_gsm_a_rr_missing_mandatory_element);
10490
10491
    /* RR Mobile Identity 10.5.1.4 O TLV 3-10 */
10492
274
    ELEM_OPT_TLV(0x17, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Mobile Identity 3");
10493
10494
    /* RR P2 Rest Octets 10.5.2.24 M V 1-11 */
10495
215
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_P2_REST_OCT, NULL, ei_gsm_a_rr_missing_mandatory_element);
10496
10497
215
}
10498
10499
/*
10500
 * 9.1.24 Paging Request Type 3
10501
 */
10502
static void
10503
dtap_rr_paging_req_type_3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10504
286
{
10505
286
    uint32_t curr_offset;
10506
286
    uint32_t consumed;
10507
286
    unsigned   curr_len;
10508
10509
286
    curr_offset = offset;
10510
286
    curr_len = len;
10511
10512
    /* RR Page Mode 10.5.2.26 M V 1/2 */
10513
    /* RR Channel Needed 10.5.2.8 M V 1/2 */
10514
286
    ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_RR, DE_RR_PAGE_MODE,
10515
286
                       GSM_A_PDU_TYPE_RR, DE_RR_CHNL_NEEDED, ei_gsm_a_rr_missing_mandatory_element);
10516
10517
    /* RR TMSI/P-TMSI 10.5.2.42 M V 4 */
10518
286
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_TMSI_PTMSI, " - Mobile Identity 1", ei_gsm_a_rr_missing_mandatory_element);
10519
10520
    /* RR TMSI/P-TMSI 10.5.2.42 M V 4 */
10521
286
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_TMSI_PTMSI, " - Mobile Identity 2", ei_gsm_a_rr_missing_mandatory_element);
10522
10523
    /* RR TMSI/P-TMSI 10.5.2.42 M V 4 */
10524
286
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_TMSI_PTMSI, " - Mobile Identity 3", ei_gsm_a_rr_missing_mandatory_element);
10525
10526
    /* RR TMSI/P-TMSI 10.5.2.42 M V 4 */
10527
286
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_TMSI_PTMSI, " - Mobile Identity 4", ei_gsm_a_rr_missing_mandatory_element);
10528
10529
    /* RR P3 Rest Octets 10.5.2.25 M V 3 */
10530
286
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_P3_REST_OCT, NULL, ei_gsm_a_rr_missing_mandatory_element);
10531
10532
286
}
10533
10534
/*
10535
 * [4] 9.1.25 Paging response
10536
 */
10537
static void
10538
dtap_rr_paging_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10539
149
{
10540
149
    uint32_t    curr_offset;
10541
149
    uint32_t    consumed;
10542
149
    unsigned    curr_len;
10543
149
    uint8_t     oct;
10544
149
    proto_tree *subtree;
10545
10546
149
    curr_offset = offset;
10547
149
    curr_len = len;
10548
10549
    /*
10550
     * special dissection for Cipher Key Sequence Number
10551
     */
10552
149
    oct = tvb_get_uint8(tvb, curr_offset);
10553
10554
149
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_spare, tvb, (curr_offset<<3)+4, 4, ENC_NA);
10555
10556
149
    subtree = proto_tree_add_subtree(tree,
10557
149
                            tvb, curr_offset, 1, ett_gsm_common_elem[DE_CIPH_KEY_SEQ_NUM], NULL,
10558
149
                            val_to_str_ext_const(DE_CIPH_KEY_SEQ_NUM, &gsm_common_elem_strings_ext, ""));
10559
10560
149
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_spare, tvb, (curr_offset<<3)+3, 1, ENC_NA);
10561
10562
149
    switch (oct & 0x07)
10563
149
    {
10564
50
    case 0x07:
10565
50
        proto_tree_add_uint_format_value(subtree, hf_gsm_a_rr_ciphering_key_seq_num,
10566
50
                            tvb, curr_offset, 1, oct, "No key is available");
10567
50
        break;
10568
10569
73
    default:
10570
73
        proto_tree_add_uint(subtree, hf_gsm_a_rr_ciphering_key_seq_num, tvb, curr_offset, 1, oct);
10571
73
        break;
10572
149
    }
10573
10574
123
    curr_offset++;
10575
123
    curr_len--;
10576
10577
123
    ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL, ei_gsm_a_rr_missing_mandatory_element);
10578
10579
123
    ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, NULL, ei_gsm_a_rr_missing_mandatory_element);
10580
10581
123
    ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_DTAP, DE_ADD_UPD_PARAMS, NULL);
10582
10583
97
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
10584
97
}
10585
10586
/*
10587
 * [4] 9.1.26 Partial Release
10588
 */
10589
static void
10590
dtap_rr_partial_rel(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10591
205
{
10592
205
    uint32_t curr_offset;
10593
205
    uint32_t consumed;
10594
205
    unsigned   curr_len;
10595
10596
205
    curr_offset = offset;
10597
205
    curr_len = len;
10598
10599
    /* Channel Description  10.5.2.5  M V 3 */
10600
205
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC, NULL, ei_gsm_a_rr_missing_mandatory_element);
10601
10602
205
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
10603
205
}
10604
10605
/*
10606
 * [4] 9.1.27 Partial Release Complete
10607
 */
10608
/* empty message */
10609
10610
/*
10611
 * [4] 9.1.28 Physical Information
10612
 */
10613
static void
10614
dtap_rr_phy_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10615
95
{
10616
95
    uint32_t curr_offset;
10617
95
    uint32_t consumed;
10618
95
    unsigned   curr_len;
10619
10620
95
    curr_offset = offset;
10621
95
    curr_len = len;
10622
10623
95
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_TIMING_ADV, NULL, ei_gsm_a_rr_missing_mandatory_element);
10624
10625
95
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
10626
95
}
10627
10628
/*
10629
 * [4] 9.1.29
10630
 */
10631
static void
10632
dtap_rr_rr_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10633
244
{
10634
244
    uint32_t curr_offset;
10635
244
    uint32_t consumed;
10636
244
    unsigned   curr_len;
10637
10638
244
    curr_offset = offset;
10639
244
    curr_len = len;
10640
10641
244
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CAUSE, NULL, ei_gsm_a_rr_missing_mandatory_element);
10642
10643
244
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_rr_extraneous_data);
10644
244
}
10645
10646
/*
10647
 * [4] 9.1.31
10648
 */
10649
static void
10650
dtap_rr_sys_info_1(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10651
201
{
10652
201
    uint32_t curr_offset;
10653
201
    uint32_t consumed;
10654
201
    unsigned   curr_len;
10655
10656
201
    curr_offset = offset;
10657
201
    curr_len = len;
10658
10659
201
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CELL_CH_DSC, NULL, ei_gsm_a_rr_missing_mandatory_element);
10660
10661
201
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_RACH_CTRL_PARAM, NULL, ei_gsm_a_rr_missing_mandatory_element);
10662
10663
201
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_SI1_REST_OCT, NULL, ei_gsm_a_rr_missing_mandatory_element);
10664
201
}
10665
10666
/*
10667
 * [4] 9.1.32
10668
 */
10669
static void
10670
dtap_rr_sys_info_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10671
199
{
10672
199
    uint32_t curr_offset;
10673
199
    uint32_t consumed;
10674
199
    unsigned   curr_len;
10675
10676
199
    curr_offset = offset;
10677
199
    curr_len = len;
10678
10679
199
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_NEIGH_CELL_DESC, " - BCCH Frequency List", ei_gsm_a_rr_missing_mandatory_element);
10680
10681
199
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_NCC_PERM, NULL, ei_gsm_a_rr_missing_mandatory_element);
10682
10683
199
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_RACH_CTRL_PARAM, NULL, ei_gsm_a_rr_missing_mandatory_element);
10684
199
}
10685
10686
/*
10687
 * [4] 9.1.33
10688
 */
10689
static void
10690
dtap_rr_sys_info_2bis(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10691
645
{
10692
645
    uint32_t curr_offset;
10693
645
    uint32_t consumed;
10694
645
    unsigned   curr_len;
10695
10696
645
    curr_offset = offset;
10697
645
    curr_len = len;
10698
10699
645
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_NEIGH_CELL_DESC, " - Extended BCCH Frequency List", ei_gsm_a_rr_missing_mandatory_element);
10700
10701
645
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_RACH_CTRL_PARAM, NULL, ei_gsm_a_rr_missing_mandatory_element);
10702
645
}
10703
10704
/*
10705
 * [4] 9.1.34
10706
 */
10707
static void
10708
dtap_rr_sys_info_2ter(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10709
570
{
10710
570
    uint32_t curr_offset;
10711
570
    uint32_t consumed;
10712
570
    unsigned   curr_len;
10713
10714
570
    curr_offset = offset;
10715
570
    curr_len = len;
10716
10717
570
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_NEIGH_CELL_DESC2, " - Extended BCCH Frequency List", ei_gsm_a_rr_missing_mandatory_element);
10718
10719
570
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_SI2TER_REST_OCT, NULL, ei_gsm_a_rr_missing_mandatory_element);
10720
570
}
10721
10722
/*
10723
 * [4] 9.1.34a
10724
 */
10725
static void
10726
dtap_rr_sys_info_2quater(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10727
958
{
10728
958
    uint32_t curr_offset;
10729
958
    uint32_t consumed;
10730
958
    unsigned   curr_len;
10731
10732
958
    curr_offset = offset;
10733
958
    curr_len = len;
10734
10735
958
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_SI2QUATER_REST_OCT, NULL, ei_gsm_a_rr_missing_mandatory_element);
10736
958
}
10737
10738
/*
10739
 * [4] 9.1.35
10740
 */
10741
static void
10742
dtap_rr_sys_info_3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10743
226
{
10744
226
    uint32_t curr_offset;
10745
226
    uint32_t consumed;
10746
226
    unsigned   curr_len;
10747
10748
226
    curr_offset = offset;
10749
226
    curr_len = len;
10750
10751
226
    ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_CELL_ID, NULL, ei_gsm_a_rr_missing_mandatory_element);
10752
10753
226
    ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_LAI, NULL, ei_gsm_a_rr_missing_mandatory_element);
10754
10755
226
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CTRL_CH_DESC, NULL, ei_gsm_a_rr_missing_mandatory_element);
10756
10757
226
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CELL_OPT_BCCH, NULL, ei_gsm_a_rr_missing_mandatory_element);
10758
10759
226
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CELL_SEL_PARAM, NULL, ei_gsm_a_rr_missing_mandatory_element);
10760
10761
226
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_RACH_CTRL_PARAM, NULL, ei_gsm_a_rr_missing_mandatory_element);
10762
10763
226
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_SI3_REST_OCT, NULL, ei_gsm_a_rr_missing_mandatory_element);
10764
226
}
10765
10766
/*
10767
 * [4] 9.1.36
10768
 */
10769
static void
10770
dtap_rr_sys_info_4(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10771
444
{
10772
444
    uint32_t curr_offset;
10773
444
    uint32_t consumed;
10774
444
    unsigned   curr_len;
10775
10776
444
    curr_offset = offset;
10777
444
    curr_len = len;
10778
10779
444
    ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_LAI, NULL, ei_gsm_a_rr_missing_mandatory_element);
10780
10781
444
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CELL_SEL_PARAM, NULL, ei_gsm_a_rr_missing_mandatory_element);
10782
10783
444
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_RACH_CTRL_PARAM, NULL, ei_gsm_a_rr_missing_mandatory_element);
10784
10785
444
    ELEM_OPT_TV(0x64, GSM_A_PDU_TYPE_RR, DE_RR_CH_DSC, " - CBCH");
10786
10787
404
    ELEM_OPT_TLV(0x72, GSM_A_PDU_TYPE_RR, DE_RR_MOB_ALL, " - CBCH");
10788
10789
404
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_SI4_REST_OCT, NULL, ei_gsm_a_rr_missing_mandatory_element);
10790
404
}
10791
10792
/*
10793
 * [4] 9.1.37
10794
 */
10795
static void
10796
dtap_rr_sys_info_5(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10797
184
{
10798
184
    uint32_t curr_offset;
10799
184
    uint32_t consumed;
10800
184
    unsigned   curr_len;
10801
10802
184
    curr_offset = offset;
10803
184
    curr_len = len;
10804
10805
184
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_NEIGH_CELL_DESC, " - BCCH Frequency List", ei_gsm_a_rr_missing_mandatory_element);
10806
184
}
10807
10808
/*
10809
 * [4] 9.1.38
10810
 */
10811
static void
10812
dtap_rr_sys_info_5bis(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10813
282
{
10814
282
    uint32_t curr_offset;
10815
282
    uint32_t consumed;
10816
282
    unsigned   curr_len;
10817
10818
282
    curr_offset = offset;
10819
282
    curr_len = len;
10820
10821
282
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_NEIGH_CELL_DESC, " - Extended BCCH Frequency List", ei_gsm_a_rr_missing_mandatory_element);
10822
282
}
10823
10824
/*
10825
 * [4] 9.1.39
10826
 */
10827
static void
10828
dtap_rr_sys_info_5ter(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10829
346
{
10830
346
    uint32_t curr_offset;
10831
346
    uint32_t consumed;
10832
346
    unsigned   curr_len;
10833
10834
346
    curr_offset = offset;
10835
346
    curr_len = len;
10836
10837
346
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_NEIGH_CELL_DESC2, " - Extended BCCH Frequency List", ei_gsm_a_rr_missing_mandatory_element);
10838
346
}
10839
10840
/*
10841
 * [4] 9.1.40
10842
 */
10843
static void
10844
dtap_rr_sys_info_6(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10845
190
{
10846
190
    uint32_t curr_offset;
10847
190
    uint32_t consumed;
10848
190
    unsigned   curr_len;
10849
10850
190
    curr_offset = offset;
10851
190
    curr_len = len;
10852
10853
190
    ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_CELL_ID, NULL, ei_gsm_a_rr_missing_mandatory_element);
10854
10855
190
    ELEM_MAND_V(GSM_A_PDU_TYPE_COMMON, DE_LAI, NULL, ei_gsm_a_rr_missing_mandatory_element);
10856
10857
190
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CELL_OPT_SACCH, NULL, ei_gsm_a_rr_missing_mandatory_element);
10858
10859
190
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_NCC_PERM, NULL, ei_gsm_a_rr_missing_mandatory_element);
10860
10861
190
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_SI6_REST_OCT, NULL, ei_gsm_a_rr_missing_mandatory_element);
10862
190
}
10863
10864
/*
10865
 * [4] 9.1.43a
10866
 */
10867
static void
10868
dtap_rr_sys_info_13(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10869
11.5k
{
10870
11.5k
    uint32_t curr_offset;
10871
11.5k
    uint32_t consumed;
10872
11.5k
    unsigned   curr_len;
10873
10874
11.5k
    curr_offset = offset;
10875
11.5k
    curr_len = len;
10876
10877
11.5k
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_SI13_REST_OCT, NULL, ei_gsm_a_rr_missing_mandatory_element);
10878
11.5k
}
10879
10880
/*
10881
 * [4] 9.1.43b
10882
 */
10883
static void
10884
dtap_rr_sys_info_21(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10885
118
{
10886
118
    uint32_t curr_offset;
10887
118
    uint32_t consumed;
10888
118
    unsigned   curr_len;
10889
10890
118
    curr_offset = offset;
10891
118
    curr_len = len;
10892
10893
118
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_SI21_REST_OCT, NULL, ei_gsm_a_rr_missing_mandatory_element);
10894
118
}
10895
10896
/*
10897
 * [4] 9.1.44 Talker indication
10898
 */
10899
static void
10900
dtap_rr_talker_indication(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10901
251
{
10902
251
    uint32_t curr_offset;
10903
251
    uint32_t consumed;
10904
251
    unsigned   curr_len;
10905
10906
251
    curr_offset = offset;
10907
251
    curr_len = len;
10908
10909
    /* Mobile Station Classmark 2 10.5.1.6 M LV */
10910
251
    ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL, ei_gsm_a_rr_missing_mandatory_element);
10911
10912
    /* Mobile identity 10.5.1.4 M LV */
10913
251
    ELEM_MAND_LV(GSM_A_PDU_TYPE_COMMON, DE_MID, NULL, ei_gsm_a_rr_missing_mandatory_element);
10914
10915
    /* Ciphering Key Sequence Number 10.5.1.2 O TV 1 */
10916
251
    ELEM_OPT_TV_SHORT(0xD0,GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM,NULL);
10917
200
}
10918
10919
/*
10920
 * [4] 9.1.48 Uplink release
10921
 */
10922
static void
10923
dtap_rr_upl_rel(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10924
267
{
10925
267
    uint32_t curr_offset;
10926
267
    uint32_t consumed;
10927
267
    unsigned   curr_len;
10928
10929
267
    curr_offset = offset;
10930
267
    curr_len = len;
10931
10932
    /* RR Cause 10.5.2.31 M V 1 */
10933
267
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_CAUSE, NULL, ei_gsm_a_rr_missing_mandatory_element);
10934
267
}
10935
10936
/*
10937
 * [4] 9.1.49 VGCS uplink grant
10938
 */
10939
static void
10940
dtap_rr_vgcs_upl_grant(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10941
265
{
10942
265
    uint32_t curr_offset;
10943
265
    uint32_t consumed;
10944
265
    unsigned   curr_len;
10945
10946
265
    curr_offset = offset;
10947
265
    curr_len = len;
10948
10949
    /* Request reference 10.5.2.30 M V 3 */
10950
265
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_REQ_REF, NULL, ei_gsm_a_rr_missing_mandatory_element);
10951
10952
    /* Timing advance 10.5.2.40 M V 1 */
10953
265
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_TIMING_ADV, NULL, ei_gsm_a_rr_missing_mandatory_element);
10954
265
}
10955
10956
/*
10957
 * [4] 9.1.51 Extended Measurement Order
10958
 */
10959
static void
10960
dtap_rr_ext_meas_order(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10961
78
{
10962
78
    uint32_t curr_offset;
10963
78
    uint32_t consumed;
10964
78
    unsigned   curr_len;
10965
10966
78
    curr_offset = offset;
10967
78
    curr_len = len;
10968
10969
    /* Extended Measurement Frequency List  10.5.2.46  M V 16 */
10970
78
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_EXT_MEAS_FREQ_LIST, NULL, ei_gsm_a_rr_missing_mandatory_element);
10971
78
}
10972
10973
/*
10974
 * [4] 9.1.52 Extended Measurement Report
10975
 */
10976
static void
10977
dtap_rr_ext_meas_report(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10978
180
{
10979
180
    uint32_t curr_offset;
10980
180
    uint32_t consumed;
10981
180
    unsigned   curr_len;
10982
10983
180
    curr_offset = offset;
10984
180
    curr_len = len;
10985
10986
    /* Extended Measurement Result  10.5.2.45  M V 16 */
10987
180
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_EXT_MEAS_RESULT, NULL, ei_gsm_a_rr_missing_mandatory_element);
10988
180
}
10989
10990
/*
10991
 * 9.1.53 Application Information
10992
 */
10993
static void
10994
dtap_rr_app_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
10995
277
{
10996
277
    uint32_t curr_offset;
10997
277
    uint32_t consumed;
10998
277
    unsigned   curr_len;
10999
11000
277
    curr_offset = offset;
11001
277
    curr_len    = len;
11002
11003
    /*
11004
     * APDU ID IE (10.5.2.48) M V 1/2
11005
     * APDU Flags (10.5.2.49) M V 1/2
11006
     */
11007
277
    ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_RR, DE_RR_APDU_ID,
11008
277
                       GSM_A_PDU_TYPE_RR, DE_RR_APDU_FLAGS,
11009
277
                       ei_gsm_a_rr_missing_mandatory_element);
11010
11011
277
    ELEM_MAND_LV(GSM_A_PDU_TYPE_RR, DE_RR_APDU_DATA, NULL, ei_gsm_a_rr_missing_mandatory_element);
11012
277
}
11013
11014
/*
11015
 * [4] 9.1.54 Measurement Information
11016
 */
11017
static const value_string gsm_a_rr_3g_wait_vals[] = {
11018
    { 0, "1 instance that contain 3G Neighbour Cell Description shall be received"},
11019
    { 1, "2 instances that contain 3G Neighbour Cell Description shall be received"},
11020
    { 2, "3 instances that contain 3G Neighbour Cell Description shall be received"},
11021
    { 3, "4 instances that contain 3G Neighbour Cell Description shall be received"},
11022
    { 4, "5 instances that contain 3G Neighbour Cell Description shall be received"},
11023
    { 5, "6 instances that contain 3G Neighbour Cell Description shall be received"},
11024
    { 6, "7 instances that contain 3G Neighbour Cell Description shall be received"},
11025
    { 7, "8 instances that contain 3G Neighbour Cell Description shall be received"},
11026
    { 0, NULL }
11027
};
11028
11029
11030
static void
11031
sacch_rr_meas_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_)
11032
0
{
11033
0
    proto_tree *subtree = NULL, *subtree2 = NULL;
11034
0
    proto_item *item, *item2;
11035
0
    uint32_t    curr_offset;
11036
0
    int         bit_offset, bit_offset_sav, bit_offset_sav2;
11037
0
    uint8_t     value, idx;
11038
0
    uint8_t     tvb_len = tvb_reported_length(tvb);
11039
0
    uint16_t    bit_len = tvb_len << 3;
11040
11041
0
    curr_offset = offset;
11042
0
    bit_offset = curr_offset << 3;
11043
11044
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ba_ind, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
11045
0
    bit_offset += 1;
11046
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_3g_ba_ind, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
11047
0
    bit_offset += 1;
11048
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_mp_change_mark, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
11049
0
    bit_offset += 1;
11050
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_mi_index, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
11051
0
    bit_offset += 4;
11052
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_mi_count, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
11053
0
    bit_offset += 4;
11054
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_pwrc, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
11055
0
    bit_offset += 1;
11056
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_gsm_report_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
11057
0
    bit_offset += 1;
11058
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_reporting_rate, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
11059
0
    bit_offset +=1;
11060
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_invalid_bsic_reporting, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
11061
0
    bit_offset +=1;
11062
0
    if (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_real_time_difference_description))
11063
0
    { /* Real Time Difference Description */
11064
0
        bit_offset += de_rr_rtd_desc(tvb, tree, bit_offset, DE_RR_REST_OCTETS_RTD_DESC);
11065
0
    }
11066
0
    if (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_bsic_description))
11067
0
    { /* BSIC Description */
11068
0
        bit_offset += de_rr_bsic_desc(tvb, tree, bit_offset, DE_RR_REST_OCTETS_BSIC_DESC);
11069
0
    }
11070
0
    if (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_report_priority_description))
11071
0
    { /* Report Priority Description */
11072
0
        bit_offset += de_rr_report_priority_desc(tvb, tree, bit_offset, DE_RR_REST_OCTETS_REPORT_PRIO_DESC);
11073
0
    }
11074
0
    if (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_measurement_parameters_description))
11075
0
    { /* Measurement Parameters Description */
11076
0
        bit_offset += de_rr_meas_param_desc(tvb, tree, bit_offset, DE_RR_REST_OCTETS_MEAS_PARAM_DESC);
11077
0
    }
11078
0
    if (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_future_extensions_of_the_2g_parameters))
11079
0
    {  /* used for future extensions of the 2G parameters */
11080
0
        value = tvb_get_bits8(tvb,bit_offset,8);
11081
0
        bit_offset += 8 + value + 1;
11082
0
    }
11083
0
    if (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_3g_neighbour_cell_description))
11084
0
    { /* 3G Neighbour Cell Description */
11085
0
        bit_offset_sav = bit_offset;
11086
0
        subtree = proto_tree_add_subtree(tree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_3G_NEIGH_CELL_DESC], &item,
11087
0
                            gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_3G_NEIGH_CELL_DESC]);
11088
0
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_3g_wait_present))
11089
0
        {
11090
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_3g_wait, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
11091
0
            bit_offset += 3;
11092
0
        }
11093
0
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_index_start_3g_present))
11094
0
        {
11095
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_index_start_3g, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
11096
0
            bit_offset += 7;
11097
0
        }
11098
0
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_absolute_index_start_emr_present))
11099
0
        {
11100
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_absolute_index_start_emr, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
11101
0
            bit_offset += 7;
11102
0
        }
11103
0
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_utran_fdd_description))
11104
0
        { /* UTRAN FDD Description */
11105
0
            bit_offset += de_rr_si2quater_meas_info_utran_fdd_desc(tvb, subtree, bit_offset);
11106
0
        }
11107
0
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_utran_tdd_description))
11108
0
        { /* UTRAN TDD Description */
11109
0
            bit_offset += de_rr_si2quater_meas_info_utran_tdd_desc(tvb, subtree, bit_offset);
11110
0
        }
11111
0
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_cdma2000_description))
11112
0
        { /* CDMA2000 Description */
11113
0
            bit_offset_sav2 = bit_offset;
11114
0
            subtree2 = proto_tree_add_subtree(subtree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_CDMA2000_DESC], &item2,
11115
0
                                            gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_CDMA2000_DESC]);
11116
0
            bit_offset += 16; /* cdma2000 frequency band + cdma2000 frequency */
11117
0
            idx = tvb_get_bits8(tvb,bit_offset,5); /* number_cdma2000_cells */
11118
0
            bit_offset += 5;
11119
0
            while (idx)
11120
0
            {
11121
0
                bit_offset += 9; /* Pilot PN offset */
11122
0
                if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_additional_information_for_3x_auxiliary_pilot))
11123
0
                {
11124
0
                    value = tvb_get_bits8(tvb,bit_offset,3);
11125
0
                    switch (value)
11126
0
                    {
11127
0
                    case 0:
11128
0
                        bit_offset += 5; /* TD_MODE + TD_POWER_LEVEL */
11129
0
                        break;
11130
0
                    case 1:
11131
0
                        bit_offset += 2; /* QOF */
11132
0
                        bit_offset += tvb_get_bits8(tvb,bit_offset,3) + 3 + 6; /* WALSH_LEN_A + bit(val(WALSH_LEN_A)+6) */
11133
0
                        break;
11134
0
                    case 2:
11135
0
                        bit_offset += 2; /* QOF */
11136
0
                        bit_offset += tvb_get_bits8(tvb,bit_offset,3) + 3 + 6; /* WALSH_LEN_B + bit(val(WALSH_LEN_B)+6) */
11137
0
                        bit_offset += 4; /* AUX_TD_POWER_LEVEL + TD_MODE */
11138
0
                        break;
11139
0
                    case 3:
11140
0
                        bit_offset += 8; /* SR3_PRIM_PILOT + SR3_PILOT_POWER1 + SR3_PILOT_POWER2 */
11141
0
                        break;
11142
0
                    case 6:
11143
0
                        bit_offset += 10; /* SR3_PRIM_PILOT + SR3_PILOT_POWER1 + SR3_PILOT_POWER2 + QOF */
11144
0
                        bit_offset += tvb_get_bits8(tvb,bit_offset,3) + 3 + 6; /* WALSH_LEN_C + bit(val(WALSH_LEN_C)+6) */
11145
0
                        if (tvb_get_bits8(tvb,bit_offset,1))
11146
0
                        {
11147
0
                            bit_offset += 3; /* 1 + QOF1 */
11148
0
                            bit_offset += tvb_get_bits8(tvb,bit_offset,3) + 3 + 6; /* WALSH_LENGTH1 + bit(val(WALSH_LENGTH1)+6) */
11149
0
                        }
11150
0
                        else
11151
0
                            bit_offset += 1;
11152
0
                        if (tvb_get_bits8(tvb,bit_offset,1))
11153
0
                        {
11154
0
                            bit_offset += 3; /* 1 + QOF2 */
11155
0
                            bit_offset += tvb_get_bits8(tvb,bit_offset,3) + 3 + 6; /* WALSH_LENGTH2 + bit(val(WALSH_LENGTH2)+6) */
11156
0
                        }
11157
0
                        else
11158
0
                            bit_offset += 1;
11159
0
                        break;
11160
0
                    default:
11161
                        /* decoding sequence is unknown ! */
11162
0
                        return;
11163
0
                    }
11164
0
                }
11165
0
                idx -= 1;
11166
0
            }
11167
0
            proto_tree_add_expert_format(subtree2, pinfo, &ei_gsm_a_rr_data_not_dissected, tvb, bit_offset_sav2>>3, ((bit_offset-bit_offset_sav2)>>3)+1, "Data (Not decoded)");
11168
0
            proto_item_set_len(item2, (bit_offset>>3) - (bit_offset_sav>>3)+1);
11169
0
        }
11170
0
        proto_item_set_len(item, (bit_offset>>3) - (bit_offset_sav>>3)+1);
11171
0
    }
11172
0
    if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_3g_measurement_parameters_description))
11173
0
    { /* 3G Measurement Parameters Description */
11174
0
        uint8_t reporting_quant = 0;
11175
0
        bit_offset_sav = bit_offset;
11176
0
        subtree = proto_tree_add_subtree(tree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_3G_MEAS_PARAM_DESC], &item,
11177
0
                                    gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_3G_MEAS_PARAM_DESC]);
11178
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_qsearch_c, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
11179
0
        bit_offset += 4;
11180
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_3g_search_prio, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
11181
0
        bit_offset += 1;
11182
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_fdd_rep_quant, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
11183
0
        reporting_quant = gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_3g_reporting_quantity);
11184
0
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_fdd_multirat_reporting_present))
11185
0
        {
11186
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_fdd_multirat_reporting, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
11187
0
            bit_offset += 2;
11188
0
        }
11189
0
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_fdd_reporting_offset_present))
11190
0
        {
11191
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_fdd_reporting_offset, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
11192
0
            bit_offset += 3;
11193
0
            if (reporting_quant == 0)
11194
0
            {
11195
0
              proto_tree_add_bits_item(subtree, hf_gsm_a_rr_fdd_reporting_threshold_rscp, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
11196
0
            }
11197
0
            else
11198
0
            {
11199
0
              proto_tree_add_bits_item(subtree, hf_gsm_a_rr_fdd_reporting_threshold_ecn0, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
11200
0
            }
11201
0
            bit_offset += 3;
11202
0
        }
11203
0
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_tdd_multirat_reporting_present))
11204
0
        {
11205
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tdd_multirat_reporting, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
11206
0
            bit_offset += 2;
11207
0
        }
11208
0
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_tdd_reporting_offset_present))
11209
0
        {
11210
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tdd_reporting_offset, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
11211
0
            bit_offset += 3;
11212
0
            if (reporting_quant == 0)
11213
0
            {
11214
0
              proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tdd_reporting_threshold_rscp, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
11215
0
            }
11216
0
            else
11217
0
            {
11218
0
              proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tdd_reporting_threshold_ecn0, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
11219
0
            }
11220
0
            bit_offset += 3;
11221
0
        }
11222
0
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_cdma2000_multirat_reporting))
11223
0
            bit_offset += 2; /* CDMA2000 Multirat Reporting */
11224
0
        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_cdma2000_reporting_threshold))
11225
0
            bit_offset += 6; /* CDMA2000 Reporting Offset + CDMA2000 Reporting Threshold */
11226
0
        proto_item_set_len(item, (bit_offset>>3) - (bit_offset_sav>>3)+1);
11227
0
    }
11228
11229
    /* Null breakpoint */
11230
0
    if (bit_len - bit_offset > 0)
11231
0
    {
11232
        /* There is still room left in the Rest Octets IE */
11233
0
        if (gsm_rr_csn_HL_flag(tvb, tree, 0, bit_offset++, hf_gsm_a_rr_additions_in_rel_5))
11234
0
        { /* Additions in Rel-5 */
11235
0
            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_3g_additional_measurement_parameters_description_2))
11236
0
            { /* 3G Additional Measurement Parameters Description 2 */
11237
0
                bit_offset += de_rr_3g_add_meas_param_desc2(tvb, tree, bit_offset);
11238
0
            }
11239
11240
            /* Null breakpoint */
11241
0
            if (bit_len - bit_offset > 0)
11242
0
            {
11243
                /* There is still room left in the Rest Octets IE */
11244
0
                if (gsm_rr_csn_HL_flag(tvb, tree, 0, bit_offset++, hf_gsm_a_rr_additions_in_rel_7))
11245
0
                { /* Additions in Rel-7 */
11246
0
                    if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_700_reporting))
11247
0
                    {
11248
0
                        proto_tree_add_bits_item(tree, hf_gsm_a_rr_700_reporting_offset, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
11249
0
                        bit_offset += 3;
11250
0
                        proto_tree_add_bits_item(tree, hf_gsm_a_rr_700_reporting_threshold, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
11251
0
                        bit_offset += 3;
11252
0
                    }
11253
0
                    if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_810_reporting))
11254
0
                    {
11255
0
                        proto_tree_add_bits_item(tree, hf_gsm_a_rr_810_reporting_offset, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
11256
0
                        bit_offset += 3;
11257
0
                        proto_tree_add_bits_item(tree, hf_gsm_a_rr_810_reporting_threshold, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
11258
0
                        bit_offset += 3;
11259
0
                    }
11260
11261
                    /* Null breakpoint */
11262
0
                    if (bit_len - bit_offset > 0)
11263
0
                    {
11264
                      /* There is still room left in the Rest Octets IE */
11265
                       /* Additions in Rel-8 */
11266
0
                      if (gsm_rr_csn_HL_flag(tvb, tree, 0, bit_offset++, hf_gsm_a_rr_additions_in_rel_8))
11267
0
                      { /* Additions in Rel-8 */
11268
0
                        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_3g_supplementary_parameters_description))
11269
0
                        {
11270
0
                          bit_offset += de_rr_3g_supplementary_param_desc_mi(tvb, tree, bit_offset);
11271
0
                        }
11272
0
                        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_eutran_parameters_description))
11273
0
                        {
11274
0
                          bit_offset += de_rr_eutran_param_desc_mi(tvb, tree, bit_offset);
11275
0
                        }
11276
0
                        if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_eutran_csg_description))
11277
0
                        {
11278
0
                          bit_offset += de_rr_eutran_csg_desc_mi(tvb, tree, bit_offset);
11279
0
                        }
11280
0
                      }
11281
0
                    }
11282
0
                }
11283
0
            }
11284
0
        }
11285
0
    }
11286
0
    gsm_rr_padding_bits(tree, tvb, bit_offset, tvb_len, PADDING_BYTE);
11287
0
}
11288
11289
static uint32_t
11290
sacch_rr_eutran_meas_report(tvbuff_t *tvb, proto_tree *tree, uint32_t bit_offset, unsigned len_in_bit _U_)
11291
0
{
11292
0
    proto_tree *subtree;
11293
0
    int         curr_bit_offset;
11294
0
    int8_t      n_eutran;
11295
11296
0
    curr_bit_offset = bit_offset;
11297
11298
0
    subtree = proto_tree_add_subtree(tree, tvb, curr_bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_EUTRAN_MEASUREMENT_REPORT], NULL,
11299
0
                gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_EUTRAN_MEASUREMENT_REPORT]);
11300
11301
0
    n_eutran = tvb_get_bits8(tvb,curr_bit_offset,2);
11302
0
    n_eutran += 1;
11303
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_mr_n_eutran, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
11304
0
    curr_bit_offset += 2;
11305
11306
0
    while ( (n_eutran > 0) && (curr_bit_offset - bit_offset < len_in_bit) )
11307
0
    {
11308
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_mr_freq_idx, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
11309
0
        curr_bit_offset += 3;
11310
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_mr_cell_id, tvb, curr_bit_offset, 9, ENC_BIG_ENDIAN);
11311
0
        curr_bit_offset += 9;
11312
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_eutran_mr_rpt_quantity, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
11313
0
        curr_bit_offset += 6;
11314
0
        n_eutran -= 1;
11315
0
    }
11316
11317
0
    return curr_bit_offset - bit_offset;
11318
0
}
11319
11320
/*
11321
 * [4] 9.1.55 Enhanced Measurement Information
11322
 */
11323
static const true_false_string gsm_a_rr_bsic_seen_value = {
11324
    "One Cell or more with invalid BSIC and allowed NCC part of BSIC is seen",
11325
    "No cell with invalid BSIC and allowed NCC part of BSIC is seen"
11326
};
11327
11328
static const true_false_string gsm_a_rr_scale_value = {
11329
    "+10 dB",
11330
    "0 dB"
11331
};
11332
11333
static const value_string gsm_a_rr_mean_bep_gmsk_vals[] = {
11334
    {  0, "log10(BEP) > -0.60"},
11335
    {  1, "-0.70 < log10(BEP) < -0.60"},
11336
    {  2, "-0.80 < log10(BEP) < -0.70"},
11337
    {  3, "-0.90 < log10(BEP) < -0.80"},
11338
    {  4, "-1.00 < log10(BEP) < -0.90"},
11339
    {  5, "-1.10 < log10(BEP) < -1.00"},
11340
    {  6, "-1.20 < log10(BEP) < -1.10"},
11341
    {  7, "-1.30 < log10(BEP) < -1.20"},
11342
    {  8, "-1.40 < log10(BEP) < -1.30"},
11343
    {  9, "-1.50 < log10(BEP) < -1.40"},
11344
    { 10, "-1.60 < log10(BEP) < -1.50"},
11345
    { 11, "-1.70 < log10(BEP) < -1.60"},
11346
    { 12, "-1.80 < log10(BEP) < -1.70"},
11347
    { 13, "-1.90 < log10(BEP) < -1.80"},
11348
    { 14, "-2.00 < log10(BEP) < -1.90"},
11349
    { 15, "-2.10 < log10(BEP) < -2.00"},
11350
    { 16, "-2.20 < log10(BEP) < -2.10"},
11351
    { 17, "-2.30 < log10(BEP) < -2.20"},
11352
    { 18, "-2.40 < log10(BEP) < -2.30"},
11353
    { 19, "-2.50 < log10(BEP) < -2.40"},
11354
    { 20, "-2.60 < log10(BEP) < -2.50"},
11355
    { 21, "-2.70 < log10(BEP) < -2.60"},
11356
    { 22, "-2.80 < log10(BEP) < -2.70"},
11357
    { 23, "-2.90 < log10(BEP) < -2.80"},
11358
    { 24, "-3.00 < log10(BEP) < -2.90"},
11359
    { 25, "-3.10 < log10(BEP) < -3.00"},
11360
    { 26, "-3.20 < log10(BEP) < -3.10"},
11361
    { 27, "-3.30 < log10(BEP) < -3.20"},
11362
    { 28, "-3.40 < log10(BEP) < -3.30"},
11363
    { 29, "-3.50 < log10(BEP) < -3.40"},
11364
    { 30, "-3.60 < log10(BEP) < -3.50"},
11365
    { 31, "log10(BEP) < -3.60"},
11366
    {  0, NULL }
11367
};
11368
11369
static const value_string gsm_a_rr_cv_bep_vals[] = {
11370
    {  0, "1.75 < CV BEP < 2.00"},
11371
    {  1, "1.50 < CV BEP < 1.75"},
11372
    {  2, "1.25 < CV BEP < 1.50"},
11373
    {  3, "1.00 < CV BEP < 1.25"},
11374
    {  4, "0.75 < CV BEP < 1.00"},
11375
    {  5, "0.50 < CV BEP < 0.75"},
11376
    {  6, "0.25 < CV BEP < 0.50"},
11377
    {  7, "0.00 < CV BEP < 0.25"},
11378
    {  0, NULL }
11379
};
11380
11381
static void
11382
sacch_rr_enh_meas_report(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
11383
0
{
11384
0
    proto_tree *subtree;
11385
0
    proto_item *item;
11386
0
    uint32_t    curr_offset;
11387
0
    unsigned    bit_offset, bit_offset_sav;
11388
0
    uint8_t     tvb_len = tvb_reported_length(tvb);
11389
0
    uint16_t    bit_len = tvb_len << 3;
11390
0
    uint8_t     idx;
11391
11392
0
    curr_offset = offset;
11393
0
    bit_offset = curr_offset << 3;
11394
11395
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ba_used, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
11396
0
    bit_offset += 1;
11397
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_3g_ba_used, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
11398
0
    bit_offset += 1;
11399
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_bsic_seen, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
11400
0
    bit_offset += 1;
11401
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_scale, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
11402
0
    bit_offset += 1;
11403
0
    if (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_serving_cell_data))
11404
0
    { /* Serving cell data */
11405
0
        bit_offset_sav = bit_offset;
11406
0
        subtree = proto_tree_add_subtree(tree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_SERVING_CELL_DATA], &item,
11407
0
                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_SERVING_CELL_DATA]);
11408
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_dtx_used, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
11409
0
        bit_offset += 1;
11410
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rxlev_full_serv_cell, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
11411
0
        bit_offset += 6;
11412
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rxqual_full_serv_cell, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
11413
0
        bit_offset += 3;
11414
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_mean_bep_gmsk, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
11415
0
        bit_offset += 5;
11416
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_mean_cv_bep, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
11417
0
        bit_offset += 3;
11418
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_nbr_rcvd_blocks, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
11419
0
        bit_offset += 5;
11420
0
        proto_item_set_len(item, (bit_offset>>3) - (bit_offset_sav>>3)+1);
11421
0
    }
11422
0
    while (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_repeated_invalid_bsic_information))
11423
0
    { /* Repeated Invalid BSIC Information */
11424
0
        bit_offset_sav = bit_offset;
11425
0
        subtree = proto_tree_add_subtree(tree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_REPEAT_INV_BSIC_INFO], &item,
11426
0
                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_REPEAT_INV_BSIC_INFO]);
11427
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_bcch_freq_ncell, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
11428
0
        bit_offset += 5;
11429
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_bsic_ncell, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
11430
0
        bit_offset += 6;
11431
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_rxlev_ncell, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
11432
0
        bit_offset += 6;
11433
0
        proto_item_set_len(item, (bit_offset>>3) - (bit_offset_sav>>3)+1);
11434
0
    }
11435
0
    if (gsm_rr_csn_flag(tvb, tree, bit_offset++, hf_gsm_a_rr_bitmap_type_reporting))
11436
0
    { /* Bitmap Type Reporting */
11437
0
        subtree = proto_tree_add_subtree(tree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_BITMAP_TYPE_REPORTING], NULL,
11438
0
                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_BITMAP_TYPE_REPORTING]);
11439
0
        idx = 0;
11440
0
        while (((unsigned)(bit_offset>>3) <= (offset + len)) && (idx < 96))
11441
0
        {
11442
0
            if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_reporting_quantity_present))
11443
0
            {
11444
0
                proto_tree_add_uint(subtree, hf_gsm_a_rr_neighbour_cell_list_index, tvb, bit_offset>>3, 1, idx);
11445
0
                proto_tree_add_bits_item(subtree, hf_gsm_a_rr_reporting_quantity, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
11446
0
                bit_offset += 6;
11447
0
            }
11448
0
            idx += 1;
11449
0
        }
11450
0
    }
11451
    /* Null breakpoint */
11452
0
    if (bit_offset < bit_len)
11453
0
    {
11454
0
       if (gsm_rr_csn_HL_flag(tvb, tree, 0, bit_offset++, hf_gsm_a_rr_additions_in_rel_8))
11455
0
       {
11456
0
           int8_t bitmap_length;
11457
0
           bit_offset_sav = bit_offset;
11458
0
           subtree = proto_tree_add_subtree(tree, tvb, bit_offset>>3, -1, ett_gsm_rr_rest_octets_elem[DE_RR_REST_OCTETS_REPORTING_QUANTITY], &item,
11459
0
                                        gsm_rr_rest_octets_elem_strings[DE_RR_REST_OCTETS_REPORTING_QUANTITY]);
11460
11461
0
           bitmap_length = tvb_get_bits8(tvb,bit_offset,7);
11462
0
           bitmap_length += 1;
11463
0
           proto_tree_add_bits_item(subtree, hf_gsm_a_rr_emr_bitmap_length, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
11464
0
           bit_offset += 7;
11465
11466
           /* REPORTING_QUANTITY */
11467
0
           idx = 0;
11468
0
           while ((unsigned)(bit_offset>>3) <= (offset + len) && (idx < bitmap_length) )
11469
0
           {
11470
0
              if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_reporting_quantity_present))
11471
0
               {
11472
0
                   proto_tree_add_uint(subtree, hf_gsm_a_rr_neighbour_cell_list_index, tvb, bit_offset>>3, 1, idx);
11473
0
                   proto_tree_add_bits_item(subtree, hf_gsm_a_rr_reporting_quantity, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
11474
0
                   bit_offset += 6;
11475
0
               }
11476
0
               idx += 1;
11477
0
           }
11478
11479
           /* E-UTRAN Measurement Report */
11480
0
           if (gsm_rr_csn_flag(tvb, subtree, bit_offset++, hf_gsm_a_rr_e_utran_measurement_report))
11481
0
           {
11482
0
               bit_offset += sacch_rr_eutran_meas_report(tvb, subtree, bit_offset, len*8-(bit_offset-offset*8));
11483
0
           }
11484
0
           proto_item_set_len(item, (bit_offset>>3) - (bit_offset_sav>>3)+1);
11485
0
       }
11486
0
    }
11487
0
    gsm_rr_padding_bits(tree, tvb, bit_offset, tvb_len, PADDING_BYTE);
11488
0
}
11489
11490
/*
11491
 * [4] 9.1.59 EC-Immediate Assignment Type 1
11492
 */
11493
static void
11494
dtap_rr_ec_imm_ass_type_1(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len)
11495
134
{
11496
134
    uint32_t curr_offset;
11497
134
    uint32_t consumed;
11498
134
    unsigned   curr_len;
11499
11500
134
    curr_offset = offset;
11501
134
    curr_len = len;
11502
11503
    /* Page Mode                                                10.5.2.26       M V 1/2 */
11504
    /* Feature indicator                                        10.5.2.76       M V 1/2 */
11505
134
    ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_RR, DE_RR_PAGE_MODE,
11506
134
                       GSM_A_PDU_TYPE_RR, DE_RR_FEATURE_INDICATOR, ei_gsm_a_rr_missing_mandatory_element);
11507
11508
    /* Request Reference 1      Request Reference               10.5.2.30       M V 3   */
11509
134
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_REQ_REF, NULL, ei_gsm_a_rr_missing_mandatory_element);
11510
    /* EC Channel Description   EC Channel Description          10.5.2.84       M V 2 */
11511
134
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_EC_PKT_CH_DSC1, NULL, ei_gsm_a_rr_missing_mandatory_element);
11512
    /* Timing Advance 1 Timing Advance                          10.5.2.86       M V 3-14   */
11513
134
    ELEM_MAND_V(GSM_A_PDU_TYPE_RR, DE_RR_EC_FUA, NULL, ei_gsm_a_rr_missing_mandatory_element);
11514
11515
134
}
11516
11517
11518
/*
11519
 * [4] 9.1.60 EC-Immediate Assignment Type 2
11520
 */
11521
static void
11522
dtap_rr_ec_imm_ass_type_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_)
11523
0
{
11524
0
    proto_tree *subtree;
11525
0
    uint32_t    curr_offset;
11526
0
    uint32_t    curr_bit_offset;
11527
11528
0
    curr_offset = offset;
11529
0
    curr_bit_offset  = curr_offset << 3;
11530
11531
0
    curr_bit_offset += 4; /* Skip msgtype */
11532
11533
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_used_dl_cc, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
11534
0
    curr_bit_offset += 2;
11535
11536
0
    if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_ec_page_extension_exist))
11537
0
    {
11538
0
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_page_extension, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
11539
0
        curr_bit_offset += 4;
11540
0
    }
11541
11542
0
    curr_bit_offset += de_rr_ec_request_reference(tvb, tree, pinfo, curr_bit_offset, NULL);
11543
11544
0
    curr_bit_offset += de_rr_ec_pkt_ch_dsc2(tvb, tree, pinfo, curr_bit_offset);
11545
11546
    /*TODO: reuse legacy FN - use subtree there?*/
11547
    /*de_rr_ec_fua(tvb, tree, pinfo, (1<<31)|curr_bit_offset, len, NULL, 0);*/
11548
0
    subtree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_gsm_rr_elem[DE_RR_EC_FUA], NULL,
11549
0
                               val_to_str_ext_const(DE_RR_EC_FUA, &gsm_rr_elem_strings_ext, ""));
11550
11551
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_enhanced_access_burst, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
11552
0
    curr_bit_offset +=1;
11553
11554
0
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_timing_adv_present))
11555
0
    {
11556
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_timing_adv, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
11557
0
        curr_bit_offset += 6;
11558
0
    }
11559
11560
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_starting_ul_timeslot, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
11561
0
    curr_bit_offset += 3;
11562
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tfi_assignment, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
11563
0
    curr_bit_offset += 5;
11564
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_starting_dl_timeslot_offset, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
11565
0
    curr_bit_offset += 2;
11566
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_overlaid_cdma_code, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
11567
0
    curr_bit_offset += 2;
11568
11569
0
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_ec_mcs_exist))
11570
0
    { /* MCS Description */
11571
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_egprs_mcs, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
11572
0
        curr_bit_offset += 4;
11573
0
    }
11574
11575
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_gamma, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
11576
0
    curr_bit_offset += 5;
11577
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_alpha_enable, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
11578
0
    curr_bit_offset += 1;
11579
11580
0
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_p0_present))
11581
0
    {
11582
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_p0, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
11583
0
        curr_bit_offset += 4;
11584
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pr_mode, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
11585
0
        curr_bit_offset += 1;
11586
0
    }
11587
11588
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_start_first_ul_data_block, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
11589
0
    curr_bit_offset += 4;
11590
11591
0
    while(gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_ec_fua_gap_list))
11592
0
    {
11593
0
        if (!gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_ec_start_fn_next_data_block_exist))
11594
0
        {
11595
0
            proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_start_fn_next_data_block, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
11596
0
            curr_bit_offset += 3;
11597
0
        }
11598
0
        else
11599
0
        {
11600
0
            proto_tree_add_uint(subtree, hf_gsm_a_rr_ec_start_fn_next_data_block, tvb, (curr_bit_offset>>3), 0, 0);
11601
0
        }
11602
0
    }
11603
11604
0
}
11605
11606
11607
/*
11608
 * [4] 9.1.61 EC-Immediate Assignment Reject
11609
 */
11610
static void
11611
dtap_rr_ec_imm_ass_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_)
11612
0
{
11613
0
    uint32_t    curr_offset;
11614
0
    uint32_t    curr_bit_offset;
11615
11616
0
    curr_offset = offset;
11617
0
    curr_bit_offset  = curr_offset << 3;
11618
11619
0
    curr_bit_offset += 4; /* Skip msgtype */
11620
11621
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_used_dl_cc, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
11622
0
    curr_bit_offset += 2;
11623
11624
0
    if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_ec_page_extension_exist))
11625
0
    {
11626
0
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_page_extension, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
11627
0
        curr_bit_offset += 4;
11628
0
    }
11629
11630
0
    curr_bit_offset += de_rr_ec_request_reference(tvb, tree, pinfo, curr_bit_offset, " - 1");
11631
11632
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_wait_timer, tvb, curr_bit_offset, 8, ENC_BIG_ENDIAN);
11633
0
    curr_bit_offset += 8;
11634
11635
0
    if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_ec_req_ref_2_present))
11636
0
    {
11637
0
        curr_bit_offset += de_rr_ec_request_reference(tvb, tree, pinfo, curr_bit_offset, " - 2");
11638
0
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_wait_timer, tvb, curr_bit_offset, 8, ENC_BIG_ENDIAN);
11639
0
        curr_bit_offset += 8;
11640
0
    }
11641
11642
0
    if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_ec_req_ref_3_present))
11643
0
    {
11644
0
        curr_bit_offset += de_rr_ec_request_reference(tvb, tree, pinfo, curr_bit_offset, " - 3");
11645
0
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_wait_timer, tvb, curr_bit_offset, 8, ENC_BIG_ENDIAN);
11646
0
    }
11647
11648
0
}
11649
11650
/*
11651
 * [4] 9.1.62 EC-Dummy
11652
 */
11653
static void
11654
dtap_rr_ec_dummy(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_)
11655
0
{
11656
0
    uint32_t    curr_bit_offset;
11657
0
    curr_bit_offset  = offset << 3;
11658
11659
0
    curr_bit_offset += 4; /* Skip msgtype */
11660
11661
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_used_dl_cc, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
11662
0
}
11663
11664
/*
11665
 * [4] 9.1.63 EC-Paging Request
11666
 */
11667
static const char digits[16] = {
11668
    /*  0   1   2   3   4   5   6   7   8   9   a   b   c   d   e  f*/
11669
       '0','1','2','3','4','5','6','7','8','9','?','?','?','?','?','?'
11670
};
11671
11672
static uint32_t
11673
dtap_rr_ec_paging_imsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, uint32_t curr_bit_offset)
11674
0
{
11675
0
    uint64_t imsi_digits;
11676
0
    uint8_t i;
11677
0
    wmem_strbuf_t *imsi_str;
11678
0
    uint32_t sav_bit_offset;
11679
11680
0
    proto_tree_add_bits_ret_val(tree, hf_gsm_a_rr_ec_imsi_digits, tvb, curr_bit_offset, 4, &imsi_digits, ENC_BIG_ENDIAN);
11681
0
    curr_bit_offset += 4;
11682
0
    sav_bit_offset = curr_bit_offset;
11683
0
    imsi_str = wmem_strbuf_new_sized(pinfo->pool, (size_t)imsi_digits+2);
11684
0
    for (i = 0; i <= (uint8_t)imsi_digits; i++) {
11685
0
        wmem_strbuf_append_c(imsi_str, digits[tvb_get_bits8(tvb, curr_bit_offset, 4)]);
11686
0
        curr_bit_offset += 4;
11687
0
    }
11688
0
    proto_tree_add_string(tree, hf_gsm_a_rr_ec_imsi, tvb, sav_bit_offset,
11689
0
                          (curr_bit_offset-sav_bit_offset+7)>>3, wmem_strbuf_finalize(imsi_str));
11690
0
    return curr_bit_offset;
11691
0
}
11692
11693
static void
11694
dtap_rr_ec_paging_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_)
11695
0
{
11696
0
    uint32_t    curr_bit_offset;
11697
0
    curr_bit_offset  = offset << 3;
11698
11699
0
    curr_bit_offset += 4; /* Skip msgtype */
11700
11701
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_used_dl_cc, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
11702
0
    curr_bit_offset += 2;
11703
11704
0
    if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_ec_page_extension_exist))
11705
0
    {
11706
0
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_page_extension, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
11707
0
        curr_bit_offset += 4;
11708
0
    }
11709
11710
0
    if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_ec_ptmsi_imsi_select))
11711
0
    { /* IMSI */
11712
0
        curr_bit_offset = dtap_rr_ec_paging_imsi(tvb, pinfo, tree, curr_bit_offset);
11713
0
    }
11714
0
    else
11715
0
    { /* P-TMSI*/
11716
0
        proto_tree_add_bits_item(tree, hf_gsm_a_tmsi, tvb, curr_bit_offset, 32, ENC_BIG_ENDIAN);
11717
0
        curr_bit_offset += 32;
11718
0
    }
11719
11720
0
    if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_ec_mobile_identity_2_exist))
11721
0
    { /* Mobile identity 2 */
11722
0
        if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_ec_ptmsi_imsi_select))
11723
0
        { /* IMSI */
11724
0
            dtap_rr_ec_paging_imsi(tvb, pinfo, tree, curr_bit_offset);
11725
0
        }
11726
0
        else
11727
0
        { /* P-TMSI*/
11728
0
            proto_tree_add_bits_item(tree, hf_gsm_a_tmsi, tvb, curr_bit_offset, 32, ENC_BIG_ENDIAN);
11729
0
        }
11730
0
    }
11731
11732
0
}
11733
11734
/*
11735
 * [4] 9.1.64 EC-Downlink Assignment
11736
 */
11737
static void
11738
dtap_rr_ec_dl_ass(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_)
11739
0
{
11740
0
    proto_tree* subtree;
11741
0
    uint32_t    curr_offset;
11742
0
    uint32_t    curr_bit_offset;
11743
11744
0
    curr_offset = offset;
11745
0
    curr_bit_offset  = curr_offset << 3;
11746
11747
0
    curr_bit_offset += 4; /* Skip msgtype */
11748
11749
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_used_dl_cc, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
11750
0
    curr_bit_offset += 2;
11751
11752
0
    if (gsm_rr_csn_flag(tvb, tree, curr_bit_offset++, hf_gsm_a_rr_ec_page_extension_exist))
11753
0
    {
11754
0
        proto_tree_add_bits_item(tree, hf_gsm_a_rr_ec_page_extension, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
11755
0
        curr_bit_offset += 4;
11756
0
    }
11757
11758
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_tlli, tvb, curr_bit_offset, 32, ENC_BIG_ENDIAN);
11759
0
    curr_bit_offset += 32;
11760
11761
0
    curr_bit_offset += de_rr_ec_pkt_ch_dsc2(tvb, tree, pinfo, curr_bit_offset);
11762
11763
    /* FIXME:where to put "ett"? subtree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_gsm_rr_elem[DE_RR_EC_FUA], NULL,
11764
                                     "EC Downlink Allocation"); */
11765
0
    subtree = tree;
11766
11767
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_timing_adv, tvb, curr_bit_offset, 6, ENC_BIG_ENDIAN);
11768
0
    curr_bit_offset += 6;
11769
11770
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_starting_dl_timeslot, tvb, curr_bit_offset, 3, ENC_BIG_ENDIAN);
11771
0
    curr_bit_offset += 3;
11772
11773
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_tfi_assignment, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
11774
0
    curr_bit_offset += 5;
11775
11776
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_cc1_timeslot_multiplier, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
11777
0
    curr_bit_offset += 2;
11778
11779
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_starting_ul_timeslot_offset, tvb, curr_bit_offset, 2, ENC_BIG_ENDIAN);
11780
0
    curr_bit_offset += 2;
11781
11782
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_gamma, tvb, curr_bit_offset, 5, ENC_BIG_ENDIAN);
11783
0
    curr_bit_offset += 5;
11784
11785
0
    proto_tree_add_bits_item(subtree, hf_gsm_a_rr_ec_alpha_enable, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
11786
0
    curr_bit_offset += 1;
11787
11788
0
    if (gsm_rr_csn_flag(tvb, subtree, curr_bit_offset++, hf_gsm_a_rr_p0_present))
11789
0
    {
11790
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_p0, tvb, curr_bit_offset, 4, ENC_BIG_ENDIAN);
11791
0
        curr_bit_offset += 4;
11792
0
        proto_tree_add_bits_item(subtree, hf_gsm_a_rr_pr_mode, tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
11793
0
    }
11794
11795
0
}
11796
11797
1.23k
#define NUM_GSM_DTAP_MSG_RR array_length(gsm_a_dtap_msg_rr_strings)
11798
static int ett_gsm_dtap_msg_rr[NUM_GSM_DTAP_MSG_RR];
11799
static void (* const dtap_msg_rr_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len) = {
11800
    NULL,       /* Reserved */
11801
    dtap_rr_add_ass,            /* Additional Assignment */
11802
    dtap_rr_imm_ass,            /* 9.1.18 Immediate assignment  */
11803
    dtap_rr_imm_ass_ext,        /* Immediate Assignment Extended */
11804
    dtap_rr_imm_ass_rej,        /* Immediate Assignment Reject */
11805
    dtap_rr_ec_imm_ass_type_1,  /* EC-Immediate Assignment Type 1 */
11806
11807
    dtap_rr_dtm_ass_fail,       /* DTM Assignment Failure */
11808
    dtap_rr_dtm_rej,            /* DTM Reject */
11809
    dtap_rr_dtm_req,            /* DTM Request */
11810
    dtap_rr_pkt_assign,         /* Packet Assignment */
11811
    dtap_rr_dtm_ass_cmd,        /* DTM Assignment Command */
11812
    dtap_rr_dtm_info,           /* DTM Information */
11813
    dtap_rr_pkt_notif,          /* Packet Notification */
11814
11815
    dtap_rr_cip_mode_cmd,       /* Ciphering Mode Command */
11816
    dtap_rr_cip_mode_cpte,      /* Ciphering Mode Complete */
11817
11818
    dtap_rr_conf_change_cmd,    /* Configuration Change Command */
11819
    NULL,                       /* Configuration Change Ack. */
11820
    dtap_rr_conf_change_rej,    /* Configuration Change Reject */
11821
11822
    dtap_rr_ass_cmd,            /* 9.1.2 Assignment Command */
11823
    dtap_rr_ass_comp,           /* Assignment Complete */
11824
    dtap_rr_ass_fail,           /* Assignment Failure */
11825
    dtap_rr_ho_cmd,             /* Handover Command */
11826
    dtap_rr_ho_cpte,            /* Handover Complete */
11827
    dtap_rr_ho_fail,            /* Handover Failure */
11828
    dtap_rr_phy_info,           /* Physical Information */
11829
11830
    NULL,                       /* RR-cell Change Order */
11831
    NULL,                       /* PDCH Assignment Command */
11832
11833
    dtap_rr_ch_rel,             /* Channel Release */
11834
    dtap_rr_partial_rel,        /* Partial Release */
11835
    NULL,                       /* Partial Release Complete */
11836
11837
    dtap_rr_paging_req_type_1,  /* Paging Request Type 1 */
11838
    dtap_rr_paging_req_type_2,  /* Paging Request Type 2 */
11839
    dtap_rr_paging_req_type_3,  /* Paging Request Type 3 */
11840
    dtap_rr_paging_resp,        /* Paging Response */
11841
    NULL,                       /* Notification/NCH */
11842
    NULL,                       /* Reserved */
11843
    NULL,                       /* Notification/Response */
11844
11845
    NULL,                       /* Reserved */
11846
11847
    dtap_rr_utran_classmark_change,     /* Utran Classmark Change  */
11848
    NULL,                       /* cdma2000 Classmark Change */
11849
    dtap_rr_inter_syst_to_utran_ho_cmd, /* Inter System to UTRAN Handover Command */
11850
    NULL,                       /* Inter System to cdma2000 Handover Command */
11851
11852
    NULL,                       /* System Information Type 8 */
11853
    dtap_rr_sys_info_1,         /* System Information Type 1 */
11854
    dtap_rr_sys_info_2,         /* System Information Type 2 */
11855
    dtap_rr_sys_info_3,         /* System Information Type 3 */
11856
    dtap_rr_sys_info_4,         /* System Information Type 4 */
11857
    dtap_rr_sys_info_5,         /* System Information Type 5 */
11858
    dtap_rr_sys_info_6,         /* System Information Type 6 */
11859
    NULL,                       /* System Information Type 7 */
11860
11861
    dtap_rr_sys_info_2bis,      /* System Information Type 2bis */
11862
    dtap_rr_sys_info_2ter,      /* System Information Type 2ter */
11863
    dtap_rr_sys_info_2quater,   /* System Information Type 2quater */
11864
    dtap_rr_sys_info_5bis,      /* System Information Type 5bis */
11865
    dtap_rr_sys_info_5ter,      /* System Information Type 5ter */
11866
    NULL,                       /* System Information Type 9 */
11867
    dtap_rr_sys_info_13,        /* System Information Type 13 */
11868
11869
    NULL,                       /* System Information Type 16 */
11870
    NULL,                       /* System Information Type 17 */
11871
11872
    NULL,                       /* System Information Type 18 */
11873
    NULL,                       /* System Information Type 19 */
11874
    NULL,                       /* System Information Type 20 */
11875
    dtap_rr_sys_info_21,        /* System Information Type 21 */
11876
11877
    dtap_rr_ch_mode_mod,        /* Channel Mode Modify */
11878
    dtap_rr_rr_status,          /* RR Status */
11879
    dtap_rr_ch_mode_mod_ack,    /* Channel Mode Modify Acknowledge */
11880
    dtap_rr_freq_redef,         /* Frequency Redefinition */
11881
    dtap_rr_meas_rep,           /* 9.1.21 Measurement report */
11882
    dtap_rr_mm_cm_change,       /* 9.1.11 Classmark Change */
11883
    dtap_rr_cm_enq,             /* Classmark Enquiry */
11884
    dtap_rr_ext_meas_report,    /* Extended Measurement Report */
11885
    dtap_rr_ext_meas_order,     /* Extended Measurement Order */
11886
    dtap_rr_gprs_sus_req,       /* 9.1.13b GPRS Suspension Request */
11887
11888
    dtap_rr_vgcs_upl_grant,     /* VGCS Uplink Grant */
11889
    dtap_rr_upl_rel,            /* Uplink Release */
11890
    NULL,                       /* Reserved */
11891
    NULL,                       /* Uplink Busy */
11892
    dtap_rr_talker_indication,  /* Talker Indication */
11893
11894
    NULL,                       /* UTRAN Classmark Change/Handover To UTRAN Command */  /* spec conflict */
11895
11896
    dtap_rr_app_inf,            /* Application Information */
11897
    NULL                       /* NONE */
11898
11899
};
11900
11901
11902
/* GSM 04.08 9.1.8 Channel request, ESTABLISHMENT CAUSE */
11903
11904
static const value_string gsm_a_rr_cannel_request_3bit_est_cause_vals[] = {
11905
    { 0x00, "Location updating and the network does not set NECI bit to 1"},
11906
    { 0x80, "Answer to paging: 'Any Channel', or ('TCH/F' or 'TCH/H or TCH/F') if MS is 'Full rate only'"},
11907
    { 0xa0, "Emergency call"},
11908
    { 0xc0, "Call re-establishment; TCH/F was in use, or TCH/H was in use but the network does not set NECI bit to 1"},
11909
    { 0xe0, "Originating call and TCH/F is needed, or originating call and the network does not set NECI bit to 1,"
11910
            " or procedures that can be completed with a SDCCH and the network does not set NECI bit to 1"},
11911
    {    0, NULL }
11912
};
11913
11914
static const value_string gsm_a_rr_cannel_request_4bit_est_cause_vals[] = {
11915
    { 0x00, "Location updating and the network sets NECI bit to 1"},
11916
    { 0x10, "Answer to paging: 'SDCCH' / Other procedures which can be completed with an SDCCH and the network sets NECI bit to 1"},
11917
    { 0x20, "Answer to paging: MS is dual rate capable and requests 'TCH/F' only"},
11918
    { 0x30, "Answer to paging: MS is dual rate capable and requests 'TCH/H or TCH/F'"},
11919
    { 0x40, "Originating speech call from dual-rate mobile station when TCH/H is sufficient and the network sets NECI bit to 1"},
11920
    { 0x50, "Originating data call from dual-rate mobile station when TCH/H is sufficient and the network sets NECI bit to 1"},
11921
    { 0x70, "Reserved for future use. An SDCCH may be allocated"},
11922
    {    0, NULL }
11923
};
11924
11925
static const value_string gsm_a_rr_cannel_request_5bit_est_cause_vals[] = {
11926
    { 0x70, "Single block packet access; one block period on a PDCH is needed for two phase packet access or other RR"
11927
            " signalling purpose"},
11928
    { 0x78, "One phase packet access with request for single timeslot uplink transmission; one PDCH is needed"},
11929
    {    0, NULL }
11930
};
11931
11932
static const value_string gsm_a_rr_cannel_request_6bit_est_cause_vals[] = {
11933
    { 0x68, "Call re-establishment; TCH/H was in use and the network sets NECI bit to 1"},
11934
    { 0x6c, "Call re-establishment; TCH/H + TCH/H was in use and the network sets NECI bit to 1"},
11935
    {    0, NULL }
11936
};
11937
11938
static const value_string gsm_a_rr_cannel_request_8bit_est_cause_vals[] = {
11939
    { 0x63, "Reserved for future use. An SDCCH may be allocated"},
11940
    { 0x67, "LMU establishment. An SDCCH may be allocated"},
11941
    { 0x7f, "Reserved. Message may be ignored"},
11942
    {    0, NULL }
11943
};
11944
11945
static bool
11946
ra_channel_request_parse(const char **cause, uint8_t *reference, uint32_t ra)
11947
0
{
11948
0
    const char *str;
11949
0
    uint8_t ref;
11950
0
    int idx;
11951
11952
0
    str = try_val_to_str_idx((uint32_t)(ra & 0xe0), gsm_a_rr_cannel_request_3bit_est_cause_vals, &idx);
11953
0
    if (str != NULL) {
11954
0
        ref = ra & 0x1f;
11955
0
        goto found;
11956
0
    }
11957
11958
0
    str = try_val_to_str_idx((uint32_t)(ra & 0xf0), gsm_a_rr_cannel_request_4bit_est_cause_vals, &idx);
11959
0
    if (str != NULL) {
11960
0
        ref = ra & 0x0f;
11961
0
        goto found;
11962
0
    }
11963
11964
0
    str = try_val_to_str_idx((uint32_t)(ra & 0xf8), gsm_a_rr_cannel_request_5bit_est_cause_vals, &idx);
11965
0
    if (str != NULL) {
11966
0
        ref = ra & 0x07;
11967
0
        if ((idx != 1) || (ref != 0x07)) {
11968
0
            goto found;
11969
0
        }
11970
0
    }
11971
11972
0
    str = try_val_to_str_idx((uint32_t)(ra & 0xfc), gsm_a_rr_cannel_request_6bit_est_cause_vals, &idx);
11973
0
    if (str != NULL) {
11974
0
        ref = ra & 0x03;
11975
0
        goto found;
11976
0
    }
11977
11978
0
    str = try_val_to_str_idx((uint32_t)ra, gsm_a_rr_cannel_request_8bit_est_cause_vals, &idx);
11979
0
    if (str != NULL) {
11980
0
        ref = 0;
11981
0
        goto found;
11982
0
    }
11983
11984
0
    if ((ra & 0xf9) == 0x60) {
11985
0
        str = "Single block MBMS access; one block period on a PDCH is needed for transfer of MBMS SERVICE REQUEST message";
11986
0
        ref = (ra & 0x6) >> 1;
11987
0
        goto found;
11988
0
    }
11989
11990
0
    if ((ra & 0xfb) == 0x61) {
11991
0
        str = "Reserved for future use. An SDCCH may be allocated";
11992
0
        ref = (ra & 0x4) >> 2;
11993
0
        goto found;
11994
0
    }
11995
11996
0
    return false;
11997
11998
0
found:
11999
0
    if (NULL != cause) {
12000
0
        *cause = str;
12001
0
    }
12002
0
    if (NULL != reference) {
12003
0
        *reference = ref;
12004
0
    }
12005
0
    return true;
12006
0
}
12007
12008
static void
12009
ra_est_cause_convert(char *result, uint32_t ra)
12010
0
{
12011
0
    const char *str;
12012
12013
0
    if (ra_channel_request_parse(&str, NULL, ra)) {
12014
0
        snprintf(result, ITEM_LABEL_LENGTH, "%s", str);
12015
0
    } else {
12016
0
        snprintf(result, ITEM_LABEL_LENGTH, "unknown ra %u", ra);
12017
0
    }
12018
0
}
12019
12020
12021
static void
12022
ra_rand_ref_convert(char *result, uint32_t ra)
12023
0
{
12024
0
    uint8_t reference;
12025
12026
0
    if (ra_channel_request_parse(NULL, &reference, ra)) {
12027
0
        snprintf(result, ITEM_LABEL_LENGTH, "%d", reference);
12028
0
    } else {
12029
0
        snprintf(result, ITEM_LABEL_LENGTH, "unknown ra %u", ra);
12030
0
    }
12031
0
}
12032
12033
12034
static int dissect_rach(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
12035
1
{
12036
1
    proto_item  *rach_item   = NULL;
12037
1
    proto_tree  *rach_tree   = NULL;
12038
1
    uint32_t     len;
12039
12040
1
    col_append_str(pinfo->cinfo, COL_INFO, "(RACH) Channel Request ");
12041
1
    len = tvb_reported_length(tvb);
12042
1
    rach_item = proto_tree_add_protocol_format(tree, proto_a_rach, tvb, 0, len, "GSM RACH");
12043
1
    rach_tree = proto_item_add_subtree(rach_item, ett_rach_msg);
12044
1
    proto_tree_add_item(rach_tree, hf_gsm_a_rr_ra_est_cause, tvb, 0, 1, ENC_BIG_ENDIAN);
12045
1
    proto_tree_add_item(rach_tree, hf_gsm_a_rr_ra_rand_ref, tvb, 0, 1, ENC_BIG_ENDIAN);
12046
1
    return tvb_captured_length(tvb);
12047
1
}
12048
12049
void get_rr_msg_params(uint8_t oct, const char **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p)
12050
48.1k
{
12051
48.1k
    int idx;
12052
12053
48.1k
    *msg_str = try_val_to_str_idx((uint32_t) (oct & DTAP_RR_IEI_MASK), gsm_a_dtap_msg_rr_strings, &idx);
12054
48.1k
    *hf_idx = hf_gsm_a_dtap_msg_rr_type;
12055
48.1k
    if (*msg_str != NULL) {
12056
30.9k
        *ett_tree = ett_gsm_dtap_msg_rr[idx];
12057
30.9k
        *msg_fcn_p  = dtap_msg_rr_fcn[idx];
12058
30.9k
    }
12059
12060
48.1k
    return;
12061
48.1k
}
12062
/* This is more or less a copy of the dissect_dtap() code just adding
12063
 * L2 Pseudo Length decoding first
12064
 * The code should probably be cleaned up.
12065
 * The name CCCH might not be correct!
12066
 */
12067
static int
12068
dissect_ccch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
12069
19
{
12070
12071
19
    static gsm_a_tap_rec_t  tap_rec[4];
12072
19
    static gsm_a_tap_rec_t *tap_p;
12073
19
    static unsigned         tap_current = 0;
12074
12075
19
    void                  (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len);
12076
19
    uint8_t                 oct;
12077
19
    uint8_t                 pd;
12078
19
    uint32_t                offset;
12079
19
    uint32_t                len;
12080
19
    uint32_t                oct_1;
12081
19
    proto_item             *ccch_item   = NULL;
12082
19
    proto_tree             *ccch_tree   = NULL;
12083
19
    proto_item             *oct_1_item  = NULL;
12084
19
    proto_tree             *pd_tree     = NULL;
12085
19
    const char             *msg_str;
12086
19
    int                     ett_tree;
12087
19
    int                     hf_idx;
12088
19
    uint8_t                *gsmtap_channel_type = (uint8_t *)data;
12089
12090
19
    len = tvb_reported_length(tvb);
12091
12092
19
    if ((NULL != gsmtap_channel_type) && ((*gsmtap_channel_type & ~GSMTAP_CHANNEL_ACCH) == GSMTAP_CHANNEL_RACH)) {
12093
1
        return dissect_rach(tvb, pinfo, tree, NULL);
12094
1
    }
12095
12096
18
    if (len < 3){
12097
        /*
12098
         * too short to be CCCH
12099
         */
12100
3
        call_data_dissector(tvb, pinfo, tree);
12101
3
        return tvb_captured_length(tvb);
12102
3
    }
12103
12104
15
    col_append_str(pinfo->cinfo, COL_INFO, "(CCCH) ");
12105
    /*
12106
     * set tap record pointer
12107
     */
12108
15
    tap_current++;
12109
15
    if (tap_current >= 4)
12110
3
    {
12111
3
        tap_current = 0;
12112
3
    }
12113
15
    tap_p = &tap_rec[tap_current];
12114
12115
15
    offset = 0;
12116
12117
    /* Skip pseudo hdr here - it is dissected later */
12118
15
    offset += 1;
12119
12120
    /*
12121
     * get protocol discriminator
12122
     */
12123
15
    oct_1 = tvb_get_uint8(tvb, offset++);
12124
12125
15
    if ((((oct_1 & DTAP_TI_MASK) >> 4) & DTAP_TIE_PRES_MASK) == DTAP_TIE_PRES_MASK){
12126
        /*
12127
         * even though we don't know if a TI should be in the message yet
12128
         * we rely on the TI/SKIP indicator to be 0 to avoid taking this
12129
         * octet
12130
         */
12131
2
        offset++;
12132
2
    }
12133
12134
15
    oct = tvb_get_uint8(tvb, offset);
12135
12136
15
    pd = oct_1 & DTAP_PD_MASK;
12137
15
    msg_str = NULL;
12138
15
    ett_tree = -1;
12139
15
    hf_idx = -1;
12140
15
    msg_fcn_p = NULL;
12141
15
    col_append_fstr(pinfo->cinfo, COL_INFO, "(%s) ",val_to_str(pinfo->pool, pd,gsm_a_pd_short_str_vals,"Unknown (%u)"));
12142
12143
    /*
12144
     * octet 1
12145
     */
12146
15
    switch (pd){
12147
7
    case 6:
12148
7
        get_rr_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn_p);
12149
7
        break;
12150
12151
8
    default:
12152
        /* XXX - hf_idx is still -1! this is a bug in the implementation, and I don't know how to fix it so simple return here */
12153
8
        return tvb_captured_length(tvb);
12154
15
    }
12155
12156
    /*
12157
     * create the protocol tree
12158
     */
12159
7
    if (msg_str == NULL){
12160
2
        ccch_item = proto_tree_add_protocol_format(tree, proto_a_ccch, tvb, 0, len,
12161
2
                                                   "GSM CCCH - Message Type (0x%02x)",
12162
2
                                                   oct);
12163
12164
2
        ccch_tree = proto_item_add_subtree(ccch_item, ett_ccch_msg);
12165
5
    }else{
12166
5
        ccch_item = proto_tree_add_protocol_format(tree, proto_a_ccch, tvb, 0, -1,
12167
5
                                                   "GSM CCCH - %s", msg_str);
12168
12169
5
        ccch_tree = proto_item_add_subtree(ccch_item, ett_tree);
12170
12171
5
        col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", msg_str);
12172
5
    }
12173
12174
    /*  L2 Pseudo Length 10.5.2.19 */
12175
    /* note: dissected out of sequence! */
12176
7
    (void) elem_v(tvb, ccch_tree, pinfo, GSM_A_PDU_TYPE_RR, DE_RR_L2_PSEUDO_LEN, 0, NULL);
12177
12178
7
    oct_1_item = proto_tree_add_item(ccch_tree, hf_gsm_a_L3_protocol_discriminator, tvb, 1, 1, ENC_BIG_ENDIAN);
12179
7
    pd_tree = proto_item_add_subtree(oct_1_item, ett_ccch_oct_1);
12180
12181
7
    proto_tree_add_item(pd_tree, hf_gsm_a_L3_protocol_discriminator, tvb, 1, 1, ENC_BIG_ENDIAN);
12182
12183
7
    proto_tree_add_item(pd_tree, hf_gsm_a_skip_ind, tvb, 1, 1, ENC_BIG_ENDIAN);
12184
12185
    /*
12186
     * add DTAP message name
12187
     */
12188
7
    proto_tree_add_uint_format(ccch_tree, hf_idx, tvb, offset, 1, oct,
12189
7
                               "Message Type: %s",msg_str ? msg_str : "(Unknown)");
12190
12191
7
    offset++;
12192
12193
7
    tap_p->pdu_type = GSM_A_PDU_TYPE_DTAP;
12194
7
    tap_p->message_type = oct;
12195
7
    tap_p->protocol_disc = (gsm_a_pd_str_e)pd;
12196
12197
7
    tap_queue_packet(gsm_a_tap, pinfo, tap_p);
12198
12199
7
    if (msg_str == NULL)
12200
2
        return offset;
12201
12202
5
    if (offset >= len)
12203
0
        return offset;
12204
12205
    /*
12206
     * decode elements
12207
     */
12208
5
    if (msg_fcn_p == NULL){
12209
1
        proto_tree_add_item(ccch_tree, hf_gsm_a_rr_message_elements, tvb, offset, len - offset, ENC_NA);
12210
4
    }else{
12211
4
        (*msg_fcn_p)(tvb, ccch_tree, pinfo, offset, len - offset);
12212
4
    }
12213
5
    return tvb_captured_length(tvb);
12214
5
}
12215
12216
12217
#define NUM_GSM_DTAP_EC_CCCH_MSG_RR array_length(gsm_a_dtap_msg_rr_ec_ccch_strings)
12218
static int ett_gsm_dtap_ec_ccch_msg_rr[NUM_GSM_DTAP_EC_CCCH_MSG_RR];
12219
static void (* const dtap_msg_rr_ec_ccch_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len) = {
12220
  dtap_rr_ec_imm_ass_type_2,                  /* EC-Immediate Assignment Type 2 */
12221
  dtap_rr_ec_imm_ass_rej,                     /* EC-Immediate Assignment Reject */
12222
  dtap_rr_ec_dummy,                           /* EC-Dummy */
12223
  dtap_rr_ec_dl_ass,                          /* EC-Downlink Assignment */
12224
  dtap_rr_ec_paging_req,                      /* EC-Paging Request */
12225
};
12226
12227
static void
12228
get_rr_ec_ccch_msg_params(uint8_t oct, const char **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p)
12229
0
{
12230
0
    int idx;
12231
12232
0
    *msg_str = try_val_to_str_idx((uint32_t) (oct & DTAP_RR_IEI_MASK), gsm_a_dtap_msg_rr_ec_ccch_strings, &idx);
12233
0
    *hf_idx = hf_gsm_a_dtap_msg_rr_ec_ccch_type;
12234
0
    if (*msg_str != NULL) {
12235
0
        *ett_tree = ett_gsm_dtap_ec_ccch_msg_rr[idx];
12236
0
        *msg_fcn_p  = dtap_msg_rr_ec_ccch_fcn[idx];
12237
0
    }
12238
12239
0
    return;
12240
0
}
12241
12242
static int
12243
dissect_ec_ccch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
12244
0
{
12245
12246
0
    void                  (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len);
12247
0
    uint8_t                 msgtype;
12248
0
    uint32_t                offset;
12249
0
    uint32_t                len;
12250
0
    proto_item             *ec_ccch_item   = NULL;
12251
0
    proto_tree             *ec_ccch_tree   = NULL;
12252
0
    const char             *msg_str;
12253
0
    int                     ett_tree;
12254
0
    int                     hf_idx;
12255
0
    len = tvb_reported_length(tvb);
12256
12257
0
    col_append_str(pinfo->cinfo, COL_INFO, "(EC-CCCH) (RR) ");
12258
12259
0
    offset = 0;
12260
0
    msgtype = tvb_get_bits8(tvb, offset, 4);
12261
12262
0
    msg_str = NULL;
12263
0
    ett_tree = -1;
12264
0
    hf_idx = -1;
12265
0
    msg_fcn_p = NULL;
12266
12267
0
    get_rr_ec_ccch_msg_params(msgtype, &msg_str, &ett_tree, &hf_idx, &msg_fcn_p);
12268
12269
    /*
12270
     * create the protocol tree
12271
     */
12272
0
    if (msg_str == NULL){
12273
0
        ec_ccch_item = proto_tree_add_protocol_format(tree, proto_a_ec_ccch, tvb, 0, len,
12274
0
                                                   "GSM EC-CCCH - Message Type (0x%02x)",
12275
0
                                                   msgtype);
12276
12277
0
        ec_ccch_tree = proto_item_add_subtree(ec_ccch_item, ett_ec_ccch_msg);
12278
0
    }else{
12279
0
        ec_ccch_item = proto_tree_add_protocol_format(tree, proto_a_ec_ccch, tvb, 0, -1,
12280
0
                                                   "GSM EC-CCCH - %s", msg_str);
12281
12282
0
        ec_ccch_tree = proto_item_add_subtree(ec_ccch_item, ett_tree);
12283
12284
0
        col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", msg_str);
12285
0
    }
12286
12287
    /*
12288
     * add DTAP message name
12289
     */
12290
0
    proto_tree_add_uint_format(ec_ccch_tree, hf_idx, tvb, offset, 1, msgtype,
12291
0
                               "Message Type: %s",msg_str ? msg_str : "(Unknown)");
12292
    /*
12293
     * decode elements
12294
     */
12295
0
    if (msg_fcn_p == NULL){
12296
0
        proto_tree_add_item(ec_ccch_tree, hf_gsm_a_rr_message_elements, tvb, offset, len - offset, ENC_NA);
12297
0
    }else{
12298
0
        (*msg_fcn_p)(tvb, ec_ccch_tree, pinfo, offset, len - offset);
12299
0
    }
12300
0
    return tvb_captured_length(tvb);
12301
0
}
12302
12303
12304
const value_string gsm_a_rr_short_pd_msg_strings[] = {
12305
    { 0x00, "System Information Type 10" },
12306
    { 0x01, "Notification/FACCH" },
12307
    { 0x02, "Uplink Free" },
12308
    { 0x04, "Enhanced Measurement Report" },
12309
    { 0x05, "Measurement Information" },
12310
    { 0x06, "VBS/VGCS Reconfigure" },
12311
    { 0x07, "VBS/VGCS Reconfigure2" },
12312
    { 0x08, "VGCS Additional Information" },
12313
    { 0x09, "VGCS SMS Information" },
12314
    {    0, NULL }
12315
};
12316
12317
165
#define NUM_GSM_SACCH_MSG_RR array_length(gsm_a_rr_short_pd_msg_strings)
12318
static int ett_gsm_sacch_msg_rr[NUM_GSM_SACCH_MSG_RR];
12319
static void (* const sacch_msg_rr_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len) = {
12320
    NULL,                       /* System Information Type 10 */
12321
    NULL,                       /* Notification/FACCH */
12322
    NULL,                       /* Uplink Free  */
12323
    sacch_rr_enh_meas_report,   /* Enhanced Measurement Report */
12324
    sacch_rr_meas_info,         /* Measurement Information */
12325
    NULL,                       /* VBS/VGCS Reconfigure */
12326
    NULL,                       /* VBS/VGCS Reconfigure2 */
12327
    NULL,                       /* VGCS Additional Information */
12328
    NULL,                       /* VGCS SMS Information */
12329
    NULL,                       /* NONE */
12330
};
12331
12332
static void
12333
get_rr_short_pd_msg_params(uint8_t mess_type, const char **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p)
12334
0
{
12335
0
    int idx;
12336
12337
0
    *msg_str = try_val_to_str_idx((uint32_t) mess_type, gsm_a_rr_short_pd_msg_strings, &idx);
12338
0
    *hf_idx = hf_gsm_a_rr_short_pd_msg_type;
12339
0
    if (*msg_str != NULL) {
12340
0
        *ett_tree = ett_gsm_sacch_msg_rr[idx];
12341
0
        *msg_fcn_p = sacch_msg_rr_fcn[idx];
12342
0
    }
12343
0
}
12344
12345
#if 0
12346
const value_string short_protocol_discriminator_vals[] = {
12347
    {0x0, "Radio Resources Management messages"},
12348
    {  0, NULL }
12349
};
12350
#endif
12351
12352
static int
12353
dissect_sacch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
12354
0
{
12355
0
    static gsm_a_tap_rec_t  tap_rec[4];
12356
0
    static gsm_a_tap_rec_t *tap_p;
12357
0
    static unsigned         tap_current        = 0;
12358
12359
0
    void                  (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len);
12360
0
    uint8_t                 oct, short_pd, mess_type;
12361
0
    uint32_t                offset, bit_offset = 0;
12362
0
    uint32_t                len;
12363
0
    proto_item             *sacch_item         = NULL;
12364
0
    proto_tree             *sacch_tree         = NULL;
12365
0
    const char             *msg_str;
12366
0
    int                     ett_tree;
12367
0
    int                     hf_idx;
12368
12369
0
    len = tvb_reported_length(tvb);
12370
12371
0
    col_append_str(pinfo->cinfo, COL_INFO, "(SACCH) ");
12372
12373
    /*
12374
     * set tap record pointer
12375
     */
12376
0
    tap_current++;
12377
0
    if (tap_current >= 4)
12378
0
    {
12379
0
        tap_current = 0;
12380
0
    }
12381
0
    tap_p = &tap_rec[tap_current];
12382
12383
0
    offset = 0;
12384
12385
0
    oct = tvb_get_uint8(tvb, offset);
12386
12387
0
    msg_str = NULL;
12388
0
    ett_tree = -1;
12389
0
    hf_idx = -1;
12390
0
    msg_fcn_p = NULL;
12391
12392
0
    short_pd = (oct & 0x80) >> 7;
12393
0
    mess_type = (oct & 0x7c) >> 2;
12394
12395
0
    if (short_pd == 0)
12396
0
    {
12397
0
        col_append_str(pinfo->cinfo, COL_INFO, "(RR) ");
12398
0
        get_rr_short_pd_msg_params(mess_type, &msg_str, &ett_tree, &hf_idx, &msg_fcn_p);
12399
0
    }
12400
0
    else
12401
0
    {
12402
0
        col_append_str(pinfo->cinfo, COL_INFO, "(Unknown) ");
12403
0
    }
12404
12405
    /*
12406
     * create the protocol tree
12407
     */
12408
0
    if (msg_str == NULL){
12409
0
        sacch_item = proto_tree_add_protocol_format(tree, proto_a_sacch, tvb, 0, len,
12410
0
                                                    "GSM SACCH - Message Type (0x%02x)", mess_type);
12411
12412
0
        sacch_tree = proto_item_add_subtree(sacch_item, ett_sacch_msg);
12413
0
    }else{
12414
0
        sacch_item = proto_tree_add_protocol_format(tree, proto_a_sacch, tvb, 0, -1,
12415
0
                                                    "GSM SACCH - %s", msg_str);
12416
12417
0
        sacch_tree = proto_item_add_subtree(sacch_item, ett_tree);
12418
12419
0
        col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", msg_str);
12420
0
    }
12421
12422
0
    if (short_pd == 0)
12423
0
       proto_tree_add_bits_item(sacch_tree, hf_gsm_a_rr_short_pd, tvb, offset * 8 + bit_offset++, 1, ENC_BIG_ENDIAN);
12424
12425
0
    if (hf_idx <= 0)
12426
0
        return 1;
12427
12428
    /*
12429
     * add SACCH message name
12430
     */
12431
0
    proto_tree_add_bits_item(sacch_tree, hf_gsm_a_rr_short_pd_msg_type, tvb, offset * 8 + bit_offset, 5, ENC_BIG_ENDIAN);
12432
0
    bit_offset += 5;
12433
12434
0
    proto_tree_add_bits_item(sacch_tree, hf_gsm_a_rr_short_l2_header, tvb, offset * 8 + bit_offset, 2, ENC_BIG_ENDIAN);
12435
0
    offset++;
12436
12437
0
    tap_p->pdu_type = GSM_A_PDU_TYPE_SACCH;
12438
0
    tap_p->message_type = mess_type;
12439
0
    tap_p->protocol_disc = (gsm_a_pd_str_e)short_pd;
12440
12441
0
    tap_queue_packet(gsm_a_tap, pinfo, tap_p);
12442
12443
0
    if (msg_str == NULL)
12444
0
        return offset;
12445
12446
    /*
12447
     * decode elements
12448
     */
12449
0
    if (msg_fcn_p == NULL){
12450
0
        proto_tree_add_item(sacch_tree, hf_gsm_a_rr_message_elements, tvb, offset, len - offset, ENC_NA);
12451
0
    }else{
12452
0
        (*msg_fcn_p)(tvb, sacch_tree, pinfo, offset, len - offset);
12453
0
    }
12454
0
    return tvb_captured_length(tvb);
12455
0
}
12456
12457
/* Register the protocol with Wireshark */
12458
void
12459
proto_register_gsm_a_rr(void)
12460
15
{
12461
15
    unsigned i;
12462
15
    unsigned last_offset;
12463
12464
    /* Setup list of header fields */
12465
12466
15
    static hf_register_info hf[] =
12467
15
        {
12468
15
            { &hf_gsm_a_dtap_msg_rr_type,
12469
15
              { "DTAP Radio Resources Management Message Type", "gsm_a.dtap.msg_rr_type",
12470
15
                FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_rr_strings), 0x0,
12471
15
                NULL, HFILL }
12472
15
            },
12473
15
            { &hf_gsm_a_rr_elem_id,
12474
15
              { "Element ID",   "gsm_a.rr.elem_id",
12475
15
                FT_UINT8, BASE_HEX, NULL, 0,
12476
15
                NULL, HFILL }
12477
15
            },
12478
15
            { &hf_gsm_a_rr_bcc,
12479
15
              { "BCC","gsm_a.rr.bcc",
12480
15
                FT_UINT8,BASE_DEC,  NULL, 0x07,
12481
15
                NULL, HFILL }
12482
15
            },
12483
15
            { &hf_gsm_a_rr_ncc,
12484
15
              { "NCC","gsm_a.rr.ncc",
12485
15
                FT_UINT8,BASE_DEC,  NULL, 0x38,
12486
15
                NULL, HFILL }
12487
15
            },
12488
15
            { &hf_gsm_a_rr_bcch_arfcn,
12489
15
              { "BCCH ARFCN(RF channel number)","gsm_a.rr.bcch_arfcn",
12490
15
                FT_UINT16,BASE_DEC,  NULL, 0x0,
12491
15
                NULL, HFILL }
12492
15
            },
12493
15
            { &hf_gsm_a_rr_range_nb,
12494
15
              { "Number of Ranges","gsm_a.rr.range_nb",
12495
15
                FT_UINT8, BASE_DEC,  NULL, 0x0,
12496
15
                NULL, HFILL }
12497
15
            },
12498
15
            { &hf_gsm_a_rr_range_lower,
12499
15
              { "Range Lower","gsm_a.rr.range_lower",
12500
15
                FT_UINT16, BASE_DEC,  NULL, 0x0,
12501
15
                "ARFCN used as the lower limit of a range of frequencies to be used by the mobile station in cell selection (Range Lower)", HFILL }
12502
15
            },
12503
15
            { &hf_gsm_a_rr_range_higher,
12504
15
              { "Range Higher","gsm_a.rr.range_higher",
12505
15
                FT_UINT16, BASE_DEC,  NULL, 0x0,
12506
15
                "ARFCN used as the higher limit of a range of frequencies to be used by the mobile station in cell selection (Range Higher)", HFILL }
12507
15
            },
12508
15
            { &hf_gsm_a_rr_ba_freq,
12509
15
              { "BA Freq","gsm_a.rr.ba_freq",
12510
15
                FT_UINT16, BASE_DEC,  NULL, 0x0,
12511
15
                "ARFCN indicating a single frequency to be used by the mobile station in cell selection and reselection (BA Freq)", HFILL }
12512
15
            },
12513
15
            { &hf_gsm_a_rr_ho_ref_val,
12514
15
              { "Handover reference value","gsm_a.rr.ho_ref_val",
12515
15
                FT_UINT8,BASE_DEC,  NULL, 0x0,
12516
15
                NULL, HFILL }
12517
15
            },
12518
15
            { &hf_gsm_a_rr_L2_pseudo_len,
12519
15
              { "L2 Pseudo Length value","gsm_a.rr.l2_pseudo_len",
12520
15
                FT_UINT8, BASE_DEC, NULL, 0xfc,
12521
15
                NULL, HFILL }
12522
15
            },
12523
15
            { &hf_gsm_a_rr_ba_used,
12524
15
              { "BA-USED","gsm_a.rr.ba_used",
12525
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
12526
15
                NULL, HFILL }
12527
15
            },
12528
15
            { &hf_gsm_a_rr_dtx_used,
12529
15
              { "DTX-USED","gsm_a.rr.dtx_used",
12530
15
                FT_BOOLEAN, BASE_NONE,  TFS(&gsm_a_rr_dtx_vals), 0x0,
12531
15
                NULL, HFILL }
12532
15
            },
12533
15
            { &hf_gsm_a_rr_3g_ba_used,
12534
15
              { "3G-BA-USED","gsm_a.rr.3g_ba_used",
12535
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
12536
15
                NULL, HFILL }
12537
15
            },
12538
15
            { &hf_gsm_a_rr_meas_valid,
12539
15
              { "MEAS-VALID","gsm_a.rr.meas_valid",
12540
15
                FT_BOOLEAN, BASE_NONE,  TFS(&gsm_a_rr_mv_vals), 0x0,
12541
15
                NULL, HFILL }
12542
15
            },
12543
15
            { &hf_gsm_a_rr_rxlev_full_serv_cell,
12544
15
              { "RXLEV-FULL-SERVING-CELL","gsm_a.rr.rxlev_full_serv_cell",
12545
15
                FT_UINT8,BASE_DEC|BASE_EXT_STRING,  &gsm_a_rr_rxlev_vals_ext, 0x00,
12546
15
                NULL, HFILL }
12547
15
            },
12548
15
            { &hf_gsm_a_rr_rxlev_sub_serv_cell,
12549
15
              { "RXLEV-SUB-SERVING-CELL","gsm_a.rr.rxlev_sub_serv_cell",
12550
15
                FT_UINT8,BASE_DEC|BASE_EXT_STRING,  &gsm_a_rr_rxlev_vals_ext, 0x00,
12551
15
                NULL, HFILL }
12552
15
            },
12553
15
            { &hf_gsm_a_rr_si23_ba_used,
12554
15
              { "SI23_BA_USED","gsm_a.rr.si23_ba_used",
12555
15
                FT_UINT8,BASE_DEC,  NULL, 0x00,
12556
15
                NULL, HFILL }
12557
15
            },
12558
15
            { &hf_gsm_a_rr_rxqual_full_serv_cell,
12559
15
              { "RXQUAL-FULL-SERVING-CELL","gsm_a.rr.rxqual_full_serv_cell",
12560
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_rxqual_vals), 0x00,
12561
15
                NULL, HFILL }
12562
15
            },
12563
15
            { &hf_gsm_a_rr_rxqual_sub_serv_cell,
12564
15
              { "RXQUAL-SUB-SERVING-CELL","gsm_a.rr.rxqual_sub_serv_cell",
12565
15
                FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_rxqual_vals), 0x0,
12566
15
                NULL, HFILL }
12567
15
            },
12568
15
            { &hf_gsm_a_rr_no_ncell_m,
12569
15
              { "NO-NCELL-M","gsm_a.rr.no_ncell_m",
12570
15
                FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_ncell_vals), 0x00,
12571
15
                NULL, HFILL }
12572
15
            },
12573
15
            { &hf_gsm_a_rr_rxlev_ncell,
12574
15
              { "RXLEV-NCELL","gsm_a.rr.rxlev_ncell",
12575
15
                FT_UINT8,BASE_DEC, NULL, 0x00,
12576
15
                NULL, HFILL }
12577
15
            },
12578
15
            { &hf_gsm_a_rr_bcch_freq_ncell,
12579
15
              { "BCCH-FREQ-NCELL","gsm_a.rr.bcch_freq_ncell",
12580
15
                FT_UINT8,BASE_DEC, NULL, 0x00,
12581
15
                NULL, HFILL }
12582
15
            },
12583
15
            { &hf_gsm_a_rr_bsic_ncell,
12584
15
              { "BSIC-NCELL","gsm_a.rr.bsic_ncell",
12585
15
                FT_UINT8,BASE_DEC, NULL, 0x00,
12586
15
                NULL, HFILL }
12587
15
            },
12588
15
            { &hf_gsm_a_rr_mobile_time_difference,
12589
15
              { "Mobile Timing Difference value (in half bit periods)","gsm_a.rr.mobile_time_difference",
12590
15
                FT_UINT32,BASE_DEC, NULL, 0xFFFFF8,
12591
15
                NULL, HFILL }
12592
15
            },
12593
15
            { &hf_gsm_a_rr_pow_cmd_atc,
12594
15
              { "ATC","gsm_a.rr.pow_cmd_atc",
12595
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_pow_cmd_atc_value), 0x80,
12596
15
                NULL, HFILL }
12597
15
            },
12598
15
            { &hf_gsm_a_rr_page_mode,
12599
15
              { "Page Mode","gsm_a.rr.page_mode",
12600
15
                FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_page_mode_vals), 0x0F,
12601
15
                NULL, HFILL }
12602
15
            },
12603
15
            { &hf_gsm_a_rr_dedicated_mode_or_tbf,
12604
15
              { "Dedicated mode or TBF","gsm_a.rr.dedicated_mode_or_tbf",
12605
15
                FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_dedicated_mode_or_tbf_vals), 0xF0,
12606
15
                NULL, HFILL }
12607
15
            },
12608
15
            { &hf_gsm_a_rr_pow_cmd_epc,
12609
15
              { "EPC_mode","gsm_a.rr.pow_cmd_epc",
12610
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_pow_cmd_epc_value), 0x40,
12611
15
                NULL, HFILL }
12612
15
            },
12613
15
            { &hf_gsm_a_rr_pow_cmd_fpcepc,
12614
15
              { "FPC_EPC","gsm_a.rr.pow_cmd_fpcepc",
12615
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_pow_cmd_fpcepc_value), 0x20,
12616
15
                NULL, HFILL }
12617
15
            },
12618
15
            { &hf_gsm_a_rr_pow_cmd_powlev,
12619
15
              { "POWER LEVEL","gsm_a.rr.pow_cmd_pow",
12620
15
                FT_UINT8,BASE_DEC,  NULL, 0x1f,
12621
15
                NULL, HFILL }
12622
15
            },
12623
15
            { &hf_gsm_a_rr_sync_ind_nci,
12624
15
              { "Normal cell indication(NCI)","gsm_a.rr.sync_ind_nci",
12625
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_sync_ind_nci_value), 0x08,
12626
15
                NULL, HFILL }
12627
15
            },
12628
15
            { &hf_gsm_a_rr_sync_ind_rot,
12629
15
              { "Report Observed Time Difference(ROT)","gsm_a.rr.sync_ind_rot",
12630
15
                FT_BOOLEAN,8,  TFS(&sm_a_rr_sync_ind_rot_value), 0x04,
12631
15
                NULL, HFILL }
12632
15
            },
12633
15
            { &hf_gsm_a_rr_sync_ind_si,
12634
15
              { "Synchronization indication(SI)","gsm_a.rr.sync_ind_si",
12635
15
                FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_sync_ind_si_vals), 0x03,
12636
15
                NULL, HFILL }
12637
15
            },
12638
15
            { &hf_gsm_a_rr_format_id,
12639
15
              { "Format Identifier","gsm_a.rr.format_id",
12640
15
                FT_UINT8,BASE_HEX,  VALS(gsm_a_rr_freq_list_format_id_vals), 0xce,
12641
15
                NULL, HFILL }
12642
15
            },
12643
15
            { &hf_gsm_a_rr_format_id2,
12644
15
              { "Format Identifier","gsm_a.rr.format_id",
12645
15
                FT_UINT8,BASE_HEX,  VALS(gsm_a_rr_freq_list_format_id_vals), 0x8e,
12646
15
                NULL, HFILL }
12647
15
            },
12648
15
            { &hf_gsm_a_rr_channel_mode,
12649
15
              { "Channel Mode","gsm_a.rr.channel_mode",
12650
15
                FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_channel_mode_vals), 0x0,
12651
15
                NULL, HFILL }
12652
15
            },
12653
15
            { &hf_gsm_a_rr_channel_mode2,
12654
15
              { "Channel Mode 2","gsm_a.rr.channel_mode2",
12655
15
                FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_channel_mode2_vals), 0x0,
12656
15
                NULL, HFILL }
12657
15
            },
12658
15
            { &hf_gsm_a_rr_sc,
12659
15
              { "SC","gsm_a.rr.SC",
12660
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_sc_vals), 0x00,
12661
15
                NULL, HFILL }
12662
15
            },
12663
15
            { &hf_gsm_a_rr_algorithm_id,
12664
15
              { "Algorithm identifier","gsm_a.rr.algorithm_identifier",
12665
15
                FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_algorithm_identifier_vals), 0x00,
12666
15
                NULL, HFILL }
12667
15
            },
12668
15
            { &hf_gsm_a_rr_cr,
12669
15
              { "CR","gsm_a.rr.CR",
12670
15
                FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_cr_vals), 0x00,
12671
15
                NULL, HFILL }
12672
15
            },
12673
15
            { &hf_gsm_a_rr_multirate_speech_ver,
12674
15
              { "Multirate speech version","gsm_a.rr.multirate_speech_ver",
12675
15
                FT_UINT8,BASE_DEC,  VALS(multirate_speech_ver_vals), 0xe0,
12676
15
                NULL, HFILL }
12677
15
            },
12678
15
            { &hf_gsm_a_rr_NCSB,
12679
15
              { "NSCB: Noise Suppression Control Bit","gsm_a.rr.NCSB",
12680
15
                FT_UINT8,BASE_DEC,  VALS(NSCB_vals), 0x10,
12681
15
                NULL, HFILL }
12682
15
            },
12683
15
            { &hf_gsm_a_rr_ICMI,
12684
15
              { "ICMI: Initial Codec Mode Indicator","gsm_a.rr.ICMI",
12685
15
                FT_UINT8,BASE_DEC,  VALS(ICMI_vals), 0x8,
12686
15
                NULL, HFILL }
12687
15
            },
12688
15
            { &hf_gsm_a_rr_start_mode,
12689
15
              { "Start Mode","gsm_a.rr.start_mode",
12690
15
                FT_UINT8,BASE_DEC,  NULL, 0x3,
12691
15
                NULL, HFILL }
12692
15
            },
12693
15
            { &hf_gsm_a_rr_timing_adv,
12694
15
              { "Timing advance value","gsm_a.rr.timing_adv",
12695
15
                FT_UINT8,BASE_DEC,  NULL, 0x0,
12696
15
                NULL, HFILL }
12697
15
            },
12698
15
            { &hf_gsm_a_rr_time_diff,
12699
15
              { "Time difference value","gsm_a.rr.time_diff",
12700
15
                FT_UINT8,BASE_DEC,  NULL, 0x0,
12701
15
                NULL, HFILL }
12702
15
            },
12703
15
            { &hf_gsm_a_rr_tlli,
12704
15
              { "TLLI","gsm_a.rr.tlli",
12705
15
                FT_UINT32,BASE_HEX,  NULL, 0x0,
12706
15
                NULL, HFILL }
12707
15
            },
12708
15
            { &hf_gsm_a_rr_nri,
12709
15
              { "NRI","gsm_a.rr.nri",
12710
15
                FT_UINT8,BASE_DEC,  NULL, 0x0,
12711
15
                NULL, HFILL }
12712
15
            },
12713
15
            { &hf_gsm_a_rr_target_mode,
12714
15
              { "Target mode","gsm_a.rr.target_mode",
12715
15
                FT_UINT8,BASE_DEC,  NULL, 0xc0,
12716
15
                NULL, HFILL }
12717
15
            },
12718
15
            { &hf_gsm_a_rr_wait_indication,
12719
15
              { "Wait Indication","gsm_a.rr.wait_indication",
12720
15
                FT_UINT8,BASE_DEC,  NULL, 0x00,
12721
15
                NULL, HFILL }
12722
15
            },
12723
15
            { &hf_gsm_a_rr_seq_code,
12724
15
              { "Sequence Code","gsm_a.rr.seq_code",
12725
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
12726
15
                NULL, HFILL }
12727
15
            },
12728
12729
15
            { &hf_gsm_a_rr_group_cipher_key_number,
12730
15
              { "Group cipher key number","gsm_a.rr.Group_cipher_key_number",
12731
15
                FT_UINT8,BASE_DEC,  NULL, 0x3c,
12732
15
                NULL, HFILL }
12733
15
            },
12734
15
            { &hf_gsm_a_rr_MBMS_broadcast,
12735
15
              { "MBMS Broadcast","gsm_a.rr.MBMS_broadcast",
12736
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_MBMS_broadcast_value), 0x01,
12737
15
                NULL, HFILL }
12738
15
            },
12739
15
            { &hf_gsm_a_rr_MBMS_multicast,
12740
15
              { "MBMS Multicast","gsm_a.rr.MBMS_multicast",
12741
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_MBMS_multicast_value), 0x02,
12742
15
                NULL, HFILL }
12743
15
            },
12744
15
            { &hf_gsm_a_rr_last_segment,
12745
15
              { "Last Segment","gsm_a.rr.last_segment",
12746
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_last_segment_value), 0x01,
12747
15
                NULL, HFILL }
12748
15
            },
12749
15
            { &hf_gsm_a_rr_carrier_ind,
12750
15
              { "Carrier Indication","gsm_a.rr.carrier_ind",
12751
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_carrier_ind_value), 0x01,
12752
15
                NULL, HFILL }
12753
15
            },
12754
15
            { &hf_gsm_a_rr_ra,
12755
15
              { "Random Access Information (RA)", "gsm_a.rr.ra",
12756
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
12757
15
                NULL, HFILL }
12758
15
            },
12759
15
            { &hf_gsm_a_rr_T1prim,
12760
15
              { "T1'",             "gsm_a.rr.T1prim",
12761
15
                FT_UINT8, BASE_DEC, NULL, 0xf8,
12762
15
                NULL, HFILL }
12763
15
            },
12764
15
            { &hf_gsm_a_rr_T3,
12765
15
              { "T3",              "gsm_a.rr.T3",
12766
15
                FT_UINT16, BASE_DEC, NULL, 0x07e0,
12767
15
                NULL, HFILL }
12768
15
            },
12769
15
            { &hf_gsm_a_rr_T2,
12770
15
              { "T2",              "gsm_a.rr.T2",
12771
15
                FT_UINT8, BASE_DEC, NULL, 0x1f,
12772
15
                NULL, HFILL }
12773
15
            },
12774
15
            { &hf_gsm_a_rr_tbf_T1prim,
12775
15
              { "T1' (TBF)",             "gsm_a.rr.tbf.T1prim",
12776
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
12777
15
                NULL, HFILL }
12778
15
            },
12779
15
            { &hf_gsm_a_rr_tbf_T3,
12780
15
              { "T3 (TBF)",              "gsm_a.rr.tbf.T3",
12781
15
                FT_UINT16, BASE_DEC, NULL, 0x00,
12782
15
                NULL, HFILL }
12783
15
            },
12784
15
            { &hf_gsm_a_rr_tbf_T2,
12785
15
              { "T2 (TBF)",              "gsm_a.rr.tbf.T2",
12786
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
12787
15
                NULL, HFILL }
12788
15
            },
12789
15
            { &hf_gsm_a_rr_rfn,
12790
15
              { "RFN",             "gsm_a.rr.rfn",
12791
15
                FT_UINT16, BASE_DEC, NULL, 0x0,
12792
15
                "Reduced Frame Number", HFILL }
12793
15
            },
12794
15
            { &hf_gsm_a_rr_RR_cause,
12795
15
              { "RR cause value","gsm_a.rr.RRcause",
12796
15
                FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_RR_cause_vals), 0x0,
12797
15
                NULL, HFILL }
12798
15
            },
12799
15
            { &hf_gsm_a_rr_cm_cng_msg_req,
12800
15
              { "CLASSMARK CHANGE","gsm_a.rr.cm_cng_msg_req",
12801
15
                FT_BOOLEAN,8,  TFS(&gsm_a_msg_req_value), 0x80,
12802
15
                NULL, HFILL }
12803
15
            },
12804
15
            { &hf_gsm_a_rr_utran_cm_cng_msg_req,
12805
15
              { "UTRAN CLASSMARK CHANGE","gsm_a.rr.utran_cm_cng_msg_req",
12806
15
                FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_utran_cm_cng_msg_req_vals), 0x70,
12807
15
                NULL, HFILL }
12808
15
            },
12809
15
            { &hf_gsm_a_rr_cdma2000_cm_cng_msg_req,
12810
15
              { "CDMA2000 CLASSMARK CHANGE","gsm_a.rr.cdma2000_cm_cng_msg_req",
12811
15
                FT_BOOLEAN,8,  TFS(&gsm_a_msg_req_value), 0x08,
12812
15
                NULL, HFILL }
12813
15
            },
12814
15
            { &hf_gsm_a_rr_geran_iu_cm_cng_msg_req,
12815
15
              { "GERAN IU MODE CLASSMARK CHANGE","gsm_a.rr.geran_iu_cm_cng_msg_req",
12816
15
                FT_BOOLEAN,8,  TFS(&gsm_a_msg_req_value), 0x04,
12817
15
                NULL, HFILL }
12818
15
            },
12819
15
            { &hf_gsm_a_rr_chnl_needed_ch1,
12820
15
              { "Channel 1","gsm_a.rr.chnl_needed_ch1",
12821
15
                FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_channel_needed_vals), 0x00,
12822
15
                NULL, HFILL }
12823
15
            },
12824
15
            { &hf_gsm_a_rr_chnl_needed_ch2,
12825
15
              { "Channel 2","gsm_a.rr.chnl_needed_ch2",
12826
15
                FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_channel_needed_vals), 0x00,
12827
15
                NULL, HFILL }
12828
15
            },
12829
15
            { &hf_gsm_a_rr_chnl_needed_ch3,
12830
15
              { "Channel 3","gsm_a.rr.chnl_needed_ch3",
12831
15
                FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_channel_needed_vals), 0x00,
12832
15
                NULL, HFILL }
12833
15
            },
12834
15
            { &hf_gsm_a_rr_chnl_needed_ch4,
12835
15
              { "Channel 4","gsm_a.rr.chnl_needed_ch4",
12836
15
                FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_channel_needed_vals), 0x00,
12837
15
                NULL, HFILL }
12838
15
            },
12839
15
            { &hf_gsm_a_rr_pkt_estab_cause,
12840
15
              { "PACKET_ESTABLISHMENT_CAUSE","gsm_a.rr.pkt_estab_cause",
12841
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_pkt_estab_cause_vals), 0x00,
12842
15
                NULL, HFILL }
12843
15
            },
12844
15
            { &hf_gsm_a_rr_peak_throughput_class,
12845
15
              { "PEAK_THROUGHPUT_CLASS","gsm_a.rr.peak_throughput_class",
12846
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
12847
15
                NULL, HFILL }
12848
15
            },
12849
15
            { &hf_gsm_a_rr_radio_priority,
12850
15
              { "RADIO_PRIORITY","gsm_a.rr.radio_priority",
12851
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_radio_priority_vals), 0x00,
12852
15
                NULL, HFILL }
12853
15
            },
12854
15
            { &hf_gsm_a_rr_llc_pdu_type,
12855
15
              { "LLC_PDU_TYPE","gsm_a.rr.llc_pdu_type",
12856
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_llc_pdu_type_value), 0x00,
12857
15
                NULL, HFILL }
12858
15
            },
12859
15
            { &hf_gsm_a_rr_rlc_octet_count,
12860
15
              { "RLC_OCTET_COUNT","gsm_a.rr.rlc_octet_count",
12861
15
                FT_UINT16, BASE_DEC, NULL, 0x00,
12862
15
                NULL, HFILL }
12863
15
            },
12864
15
            { &hf_gsm_a_rr_rlc_non_pers_mode_cap,
12865
15
              { "RLC Non-persistent Mode Capability","gsm_a.rr.rlc_non_pers_mode_cap",
12866
15
                FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x00,
12867
15
                NULL, HFILL }
12868
15
            },
12869
15
            { &hf_gsm_a_rr_reduced_latency_cap,
12870
15
              { "Reduced Latency Capability","gsm_a.rr.reduced_latency_cap",
12871
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_reduced_latency_cap_value), 0x00,
12872
15
                NULL, HFILL }
12873
15
            },
12874
15
            { &hf_gsm_a_rr_ul_egprs2,
12875
15
              { "Uplink EGPRS2","gsm_a.rr.ul_egprs2",
12876
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_egprs2_vals), 0x00,
12877
15
                NULL, HFILL }
12878
15
            },
12879
15
            { &hf_gsm_a_rr_dl_egprs2,
12880
15
              { "Downlink EGPRS2","gsm_a.rr.dl_egprs2",
12881
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_egprs2_vals), 0x00,
12882
15
                NULL, HFILL }
12883
15
            },
12884
15
            { &hf_gsm_a_rr_emst_ms_cap,
12885
15
              { "EMST_MS_Capability","gsm_a.rr.emst_ms_cap",
12886
15
                FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x00,
12887
15
                NULL, HFILL }
12888
15
            },
12889
15
            { &hf_gsm_a_rr_suspension_cause,
12890
15
              { "Suspension cause value","gsm_a.rr.suspension_cause",
12891
15
                FT_UINT8,BASE_DEC,  VALS(gsm_a_rr_suspension_cause_vals), 0x0,
12892
15
                NULL, HFILL }
12893
15
            },
12894
15
            { &hf_gsm_a_rr_apdu_id,
12895
15
              { "APDU ID","gsm_a.rr.apdu_id",
12896
15
                FT_UINT8,BASE_HEX,  VALS(gsm_a_rr_apdu_id_vals), 0x0f,
12897
15
                NULL, HFILL }
12898
15
            },
12899
15
            { &hf_gsm_a_rr_apdu_flags_cr,
12900
15
              { "C/R", "gsm_a.rr.apdu_flags_cr",
12901
15
                FT_BOOLEAN, 8, TFS(&gsm_a_rr_apdu_flags_cr_value), 0x10,
12902
15
                NULL, HFILL }
12903
15
            },
12904
15
            { &hf_gsm_a_rr_apdu_flags_fs,
12905
15
              { "First Segment", "gsm_a.rr.apdu_flags_fs",
12906
15
                FT_BOOLEAN, 8, TFS(&gsm_a_rr_apdu_flags_fs_value), 0x20,
12907
15
                NULL, HFILL }
12908
15
            },
12909
15
            { &hf_gsm_a_rr_apdu_flags_ls,
12910
15
              { "Last Segment", "gsm_a.rr.apdu_flags_ls",
12911
15
                FT_BOOLEAN, 8, TFS(&gsm_a_rr_apdu_flags_ls_value), 0x40,
12912
15
                NULL, HFILL }
12913
15
            },
12914
15
            { &hf_gsm_a_rr_apdu_data,
12915
15
              { "APDU Data","gsm_a.rr.apdu_data",
12916
15
                FT_BYTES, BASE_NONE, NULL, 0,
12917
15
                NULL, HFILL }
12918
15
            },
12919
15
            { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b8,
12920
15
              { "12,2 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b8",
12921
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x80,
12922
15
                NULL, HFILL }
12923
15
            },
12924
15
            { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b7,
12925
15
              { "10,2 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b7",
12926
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x40,
12927
15
                NULL, HFILL }
12928
15
            },
12929
15
            { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b6,
12930
15
              { "7,95 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b6",
12931
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x20,
12932
15
                NULL, HFILL }
12933
15
            },
12934
15
            { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b5,
12935
15
              { "7,40 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b5",
12936
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x10,
12937
15
                NULL, HFILL }
12938
15
            },
12939
15
            { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b4,
12940
15
              { "6,70 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b4",
12941
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x08,
12942
15
                NULL, HFILL }
12943
15
            },
12944
15
            { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b3,
12945
15
              { "5,90 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b3",
12946
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x04,
12947
15
                NULL, HFILL }
12948
15
            },
12949
15
            { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b2,
12950
15
              { "5,15 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b2",
12951
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x02,
12952
15
                NULL, HFILL }
12953
15
            },
12954
15
            { &hf_gsm_a_rr_set_of_amr_codec_modes_v1_b1,
12955
15
              { "4,75 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v1b1",
12956
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x01,
12957
15
                NULL, HFILL }
12958
15
            },
12959
15
            { &hf_gsm_a_rr_set_of_amr_codec_modes_v2_b5,
12960
15
              { "23,85 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v2b5",
12961
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x10,
12962
15
                NULL, HFILL }
12963
15
            },
12964
15
            { &hf_gsm_a_rr_set_of_amr_codec_modes_v2_b4,
12965
15
              { "15,85 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v2b4",
12966
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x08,
12967
15
                NULL, HFILL }
12968
15
            },
12969
15
            { &hf_gsm_a_rr_set_of_amr_codec_modes_v2_b3,
12970
15
              { "12,65 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v2b3",
12971
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x04,
12972
15
                NULL, HFILL }
12973
15
            },
12974
15
            { &hf_gsm_a_rr_set_of_amr_codec_modes_v2_b2,
12975
15
              { "8,85 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v2b2",
12976
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x02,
12977
15
                NULL, HFILL }
12978
15
            },
12979
15
            { &hf_gsm_a_rr_set_of_amr_codec_modes_v2_b1,
12980
15
              { "6,60 kbit/s codec rate", "gsm_a.rr.set_of_amr_codec_modes_v2b1",
12981
15
                FT_BOOLEAN,8,  TFS(&gsm_a_rr_set_of_amr_codec_modes), 0x01,
12982
15
                NULL, HFILL }
12983
15
            },
12984
15
            { &hf_gsm_a_rr_amr_threshold,
12985
15
              { "AMR Threshold", "gsm_a.rr.amr_threshold",
12986
15
                FT_UINT8, BASE_DEC|BASE_EXT_STRING,  &gsm_a_rr_amr_threshold_vals_ext, 0x00,
12987
15
                NULL, HFILL }
12988
15
            },
12989
15
            { &hf_gsm_a_rr_amr_hysteresis,
12990
15
              { "AMR Hysteresis", "gsm_a.rr.amr_hysteresis",
12991
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_amr_hysteresis_vals), 0x00,
12992
15
                NULL, HFILL }
12993
15
            },
12994
15
            { &hf_gsm_a_rr_pwrc,
12995
15
              { "PWRC", "gsm_a.rr.pwrc",
12996
15
                FT_BOOLEAN, BASE_NONE,  NULL, 0x0,
12997
15
                "Power Control Indicator (PWRC)", HFILL }
12998
15
            },
12999
15
            { &hf_gsm_a_rr_dtx_bcch,
13000
15
              { "DTX (BCCH)", "gsm_a.rr.dtx_bcch",
13001
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_dtx_bcch_vals), 0x30,
13002
15
                "Discontinuous Transmission (DTX-BCCH)", HFILL }
13003
15
            },
13004
15
            { &hf_gsm_a_rr_dtx_sacch,
13005
15
              { "DTX (SACCH)", "gsm_a.rr.dtx_sacch",
13006
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_dtx_sacch_vals), 0x00,
13007
15
                "Discontinuous Transmission (DTX-SACCH)", HFILL }
13008
15
            },
13009
15
            { &hf_gsm_a_rr_radio_link_timeout,
13010
15
              { "Radio Link Timeout", "gsm_a.rr.radio_link_timeout",
13011
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_radio_link_timeout_vals), 0x0f,
13012
15
                "Radio Link Timeout (s)", HFILL }
13013
15
            },
13014
15
            { &hf_gsm_a_rr_cell_reselect_hyst,
13015
15
              { "Cell Reselection Hysteresis", "gsm_a.rr.cell_reselect_hyst",
13016
15
                FT_UINT8, BASE_DEC,  NULL, 0xe0,
13017
15
                "Cell Reselection Hysteresis (dB)", HFILL }
13018
15
            },
13019
15
            { &hf_gsm_a_rr_ms_txpwr_max_cch,
13020
15
              { "MS TXPWR MAX CCH", "gsm_a.rr.ms_txpwr_max_cch",
13021
15
                FT_UINT8, BASE_DEC,  NULL, 0x1f,
13022
15
                NULL, HFILL }
13023
15
            },
13024
15
            { &hf_gsm_a_rr_acs,
13025
15
              { "ACS", "gsm_a.rr.acs",
13026
15
                FT_BOOLEAN, 8,  NULL, 0x80,
13027
15
                "Additional Reselect Param Indicator (ACS)", HFILL }
13028
15
            },
13029
15
            { &hf_gsm_a_rr_neci,
13030
15
              { "NECI", "gsm_a.rr.neci",
13031
15
                FT_UINT8, BASE_DEC,  NULL, 0x40,
13032
15
                "New Establishment Cause Indicator (NECI)", HFILL }
13033
15
            },
13034
15
            { &hf_gsm_a_rr_rxlev_access_min,
13035
15
              { "RXLEV-ACCESS-MIN", "gsm_a.rr.rxlev_access_min",
13036
15
                FT_UINT8, BASE_DEC|BASE_EXT_STRING,  &gsm_a_rr_rxlev_vals_ext, 0x3f,
13037
15
                NULL, HFILL }
13038
15
            },
13039
15
            { &hf_gsm_a_rr_mscr,
13040
15
              { "MSCR", "gsm_a.rr.mscr",
13041
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_mscr_vals), 0x80,
13042
15
                "MSC Release Indicator (MSCR)", HFILL }
13043
15
            },
13044
15
            { &hf_gsm_a_rr_att,
13045
15
              { "ATT", "gsm_a.rr.att",
13046
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_att_vals), 0x40,
13047
15
                "Attach Indicator (ATT)", HFILL }
13048
15
            },
13049
15
            { &hf_gsm_a_rr_bs_ag_blks_res,
13050
15
              { "BS_AG_BLKS_RES", "gsm_a.rr.bs_ag_blks_res",
13051
15
                FT_UINT8, BASE_DEC,  NULL, 0x38,
13052
15
                "Access Grant Reserved Blocks (BS_AG_BLKS_RES)", HFILL }
13053
15
            },
13054
15
            { &hf_gsm_a_rr_ccch_conf,
13055
15
              { "CCCH-CONF", "gsm_a.rr.ccch_conf",
13056
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_ccch_conf_vals), 0x07,
13057
15
                NULL, HFILL }
13058
15
            },
13059
15
            { &hf_gsm_a_rr_cbq3,
13060
15
              { "CBQ3", "gsm_a.rr.cbq3",
13061
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_cbq3_vals), 0x00,
13062
15
                "Cell Bar Qualify 3", HFILL }
13063
15
            },
13064
15
            { &hf_gsm_a_rr_bs_pa_mfrms,
13065
15
              { "BS-PA-MFRMS", "gsm_a.rr.bs_pa_mfrms",
13066
15
                FT_UINT8, BASE_DEC,  NULL, 0x07,
13067
15
                NULL, HFILL }
13068
15
            },
13069
15
            { &hf_gsm_a_rr_t3212,
13070
15
              { "T3212", "gsm_a.rr.t3212",
13071
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13072
15
                "Periodic Update period (T3212) (deci-hours)", HFILL }
13073
15
            },
13074
15
            { &hf_gsm_a_rr_gsm_band,
13075
15
              { "GSM Band", "gsm_a.rr.gsm_band",
13076
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_gsm_band_vals), 0x00,
13077
15
                NULL, HFILL }
13078
15
            },
13079
15
            { &hf_gsm_a_rr_arfcn_first,
13080
15
              { "ARFCN First", "gsm_a.rr.arfcn_first",
13081
15
                FT_UINT16, BASE_DEC,  NULL, 0x00,
13082
15
                NULL, HFILL }
13083
15
            },
13084
15
            { &hf_gsm_a_rr_band_offset,
13085
15
              { "Band Offset", "gsm_a.rr.band_offset",
13086
15
                FT_UINT16, BASE_DEC,  NULL, 0x00,
13087
15
                NULL, HFILL }
13088
15
            },
13089
15
            { &hf_gsm_a_rr_arfcn_range,
13090
15
              { "ARFCN Range", "gsm_a.rr.arfcn_range",
13091
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13092
15
                NULL, HFILL }
13093
15
            },
13094
15
            { &hf_gsm_a_rr_lowest_arfcn,
13095
15
              { "Lowest ARFCN", "gsm_a.rr.lowest_arfcn",
13096
15
                FT_UINT8, BASE_DEC,  NULL, 0x7f,
13097
15
                NULL, HFILL }
13098
15
            },
13099
15
            { &hf_gsm_a_rr_inc_skip_arfcn,
13100
15
              { "Increment skip ARFCN", "gsm_a.rr.inc_skip_arfcn",
13101
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13102
15
                NULL, HFILL }
13103
15
            },
13104
15
            { &hf_gsm_a_rr_gprs_resumption_ack,
13105
15
              { "Ack", "gsm_a.rr.gprs_resumption_ack",
13106
15
                FT_BOOLEAN, 8,  TFS(&gsm_a_rr_gprs_resumption_ack_value), 0x01,
13107
15
                "GPRS Resumption Ack bit", HFILL }
13108
15
            },
13109
15
            { &hf_gsm_a_rr_ext_ind,
13110
15
              { "EXT-IND", "gsm_a.rr.ext_ind",
13111
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_ext_ind_vals), 0x20,
13112
15
                "Extension Indication (EXT-IND)", HFILL }
13113
15
            },
13114
15
            { &hf_gsm_a_rr_ba_ind,
13115
15
              { "BA-IND", "gsm_a.rr.ba_ind",
13116
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13117
15
                "BCCH Allocation Indication (BA-IND)", HFILL }
13118
15
            },
13119
15
            { &hf_gsm_a_rr_multiband_reporting,
13120
15
              { "Multiband Reporting", "gsm_a.rr.multiband_reporting",
13121
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13122
15
                "Number of cells to be reported in each band if Multiband Reporting", HFILL }
13123
15
            },
13124
15
            { &hf_gsm_a_rr_ncc_permitted,
13125
15
              { "NCC Permitted", "gsm_a.rr.ncc_permitted",
13126
15
                FT_UINT8, BASE_HEX,  NULL, 0x0,
13127
15
                NULL, HFILL }
13128
15
            },
13129
15
            { &hf_gsm_a_rr_max_retrans,
13130
15
              { "Max retrans", "gsm_a.rr.max_retrans",
13131
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_max_retrans_vals), 0xc0,
13132
15
                "Maximum number of retransmissions", HFILL }
13133
15
            },
13134
15
            { &hf_gsm_a_rr_tx_integer,
13135
15
              { "Tx-integer", "gsm_a.rr.tx_integer",
13136
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_tx_integer_vals), 0x3c,
13137
15
                "Number of Slots to spread Transmission (Tx-integer)", HFILL }
13138
15
            },
13139
15
            { &hf_gsm_a_rr_cell_barr_access,
13140
15
              { "CELL_BARR_ACCESS", "gsm_a.rr.cell_barr_access",
13141
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_cell_barr_access_vals), 0x02,
13142
15
                "Cell Barred for Access (CELL_BARR_ACCESS)", HFILL }
13143
15
            },
13144
15
            { &hf_gsm_a_rr_re,
13145
15
              { "RE", "gsm_a.rr.re",
13146
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_re_vals), 0x01,
13147
15
                "Call re-establishment allowed (RE)", HFILL }
13148
15
            },
13149
15
            { &hf_gsm_a_rr_acc,
13150
15
              { "ACC", "gsm_a.rr.acc",
13151
15
                FT_UINT16, BASE_HEX,  NULL, 0x0,
13152
15
                "Access Control Class N barred (ACC)", HFILL }
13153
15
            },
13154
15
            { &hf_gsm_a_rr_nch_position,
13155
15
              { "NCH Position", "gsm_a.rr.nch_position",
13156
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_nch_position_vals), 0x00,
13157
15
                NULL, HFILL }
13158
15
            },
13159
15
            { &hf_gsm_a_rr_si2ter_mp_change_mark,
13160
15
              { "SI2ter Measurement Parameter Change Mark", "gsm_a.rr.si2ter_mp_change_mark",
13161
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13162
15
                NULL, HFILL }
13163
15
            },
13164
15
            { &hf_gsm_a_rr_si2ter_3g_change_mark,
13165
15
              { "SI2ter 3G Change Mark", "gsm_a.rr.si2ter_3g_change_mark",
13166
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13167
15
                NULL, HFILL }
13168
15
            },
13169
15
            { &hf_gsm_a_rr_si2ter_index,
13170
15
              { "SI2ter Index", "gsm_a.rr.si2ter_index",
13171
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13172
15
                NULL, HFILL }
13173
15
            },
13174
15
            { &hf_gsm_a_rr_si2ter_count,
13175
15
              { "SI2ter Count", "gsm_a.rr.si2ter_count",
13176
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13177
15
                NULL, HFILL }
13178
15
            },
13179
15
            { &hf_gsm_a_rr_fdd_uarfcn,
13180
15
              { "FDD UARFCN", "gsm_a.rr.fdd_uarfcn",
13181
15
                FT_UINT16, BASE_DEC,  NULL, 0x0,
13182
15
                NULL, HFILL }
13183
15
            },
13184
15
            { &hf_gsm_a_rr_bandwidth_fdd,
13185
15
              { "Bandwidth FDD", "gsm_a.rr.bandwidth_fdd",
13186
15
                FT_UINT8, BASE_DEC,  NULL, 0x0,
13187
15
                NULL, HFILL }
13188
15
            },
13189
15
            { &hf_gsm_a_rr_tdd_uarfcn,
13190
15
              { "TDD UARFCN", "gsm_a.rr.tdd_uarfcn",
13191
15
                FT_UINT16, BASE_DEC,  NULL, 0x0,
13192
15
                NULL, HFILL }
13193
15
            },
13194
15
            { &hf_gsm_a_rr_bandwidth_tdd,
13195
15
              { "Bandwidth TDD", "gsm_a.rr.bandwidth_tdd",
13196
15
                FT_UINT8, BASE_DEC,  NULL, 0x0,
13197
15
                NULL, HFILL }
13198
15
            },
13199
15
            { &hf_gsm_a_rr_arfcn,
13200
15
              { "ARFCN", "gsm_a.rr.arfcn",
13201
15
                FT_UINT16, BASE_DEC,  NULL, 0x0,
13202
15
                "Absolute Radio Frequency Channel Number (ARFCN)", HFILL }
13203
15
            },
13204
15
            { &hf_gsm_a_rr_bsic,
13205
15
              { "BSIC", "gsm_a.rr.bsic",
13206
15
                FT_UINT8, BASE_DEC,  NULL, 0x0,
13207
15
                "Base Station Identify Code (BSIC)", HFILL }
13208
15
            },
13209
15
            { &hf_gsm_a_rr_qsearch_i,
13210
15
              { "Qsearch I", "gsm_a.rr.qsearch_i",
13211
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_qsearch_x_vals), 0x0,
13212
15
                "Search for 3G cells if signal level is below (0 7) or above (8 15) threshold (Qsearch I)", HFILL }
13213
15
            },
13214
15
            { &hf_gsm_a_rr_fdd_qoffset,
13215
15
              { "FDD Qoffset", "gsm_a.rr.fdd_qoffset",
13216
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_xdd_qoffset_vals), 0x0,
13217
15
                "Offset to RLA_C for cell re selection to FDD access technology (FDD Qoffset)", HFILL }
13218
15
            },
13219
15
            { &hf_gsm_a_rr_fdd_qmin,
13220
15
              { "FDD Qmin", "gsm_a.rr.fdd_qmin",
13221
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_fdd_qmin_vals), 0x0,
13222
15
                "Minimum threshold for Ec/No for UTRAN FDD cell re-selection (FDD Qmin)", HFILL }
13223
15
            },
13224
15
            { &hf_gsm_a_rr_tdd_qoffset,
13225
15
              { "TDD Qoffset", "gsm_a.rr.tdd_qoffset",
13226
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_xdd_qoffset_vals), 0x0,
13227
15
                "Offset to RLA_C for cell re selection to TDD access technology (TDD Qoffset)", HFILL }
13228
15
            },
13229
15
            { &hf_gsm_a_rr_fdd_qmin_offset,
13230
15
              { "FDD Qmin Offset", "gsm_a.rr.fdd_qmin_offset",
13231
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_fdd_qmin_offset_vals), 0x0,
13232
15
                "Offset to FDD Qmin value (FDD Qmin Offset)", HFILL }
13233
15
            },
13234
15
            { &hf_gsm_a_rr_fdd_rscpmin,
13235
15
              { "FDD RSCPmin", "gsm_a.rr.fdd_rscpmin",
13236
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_fdd_rscpmin_vals), 0x0,
13237
15
                "Minimum threshold of RSCP for UTRAN FDD cell re-selection (FDD RSCPmin)", HFILL }
13238
15
            },
13239
15
            { &hf_gsm_a_rr_3g_ba_ind,
13240
15
              { "3G BA-IND", "gsm_a.rr.3g_ba_ind",
13241
15
                FT_UINT8, BASE_DEC,  NULL, 0x0,
13242
15
                "3G BCCH Allocation Indication (3G BA-IND)", HFILL }
13243
15
            },
13244
15
            { &hf_gsm_a_rr_mp_change_mark,
13245
15
              { "Measurement Parameter Change Mark", "gsm_a.rr.mp_change_mark",
13246
15
                FT_UINT8, BASE_DEC,  NULL, 0x0,
13247
15
                NULL, HFILL }
13248
15
            },
13249
15
            { &hf_gsm_a_rr_si2quater_index,
13250
15
              { "SI2quater Index", "gsm_a.rr.si2quater_index",
13251
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13252
15
                NULL, HFILL }
13253
15
            },
13254
15
            { &hf_gsm_a_rr_si2quater_count,
13255
15
              { "SI2quater Count", "gsm_a.rr.si2quater_count",
13256
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13257
15
                NULL, HFILL }
13258
15
            },
13259
15
            { &hf_gsm_a_rr_si21_change_mark,
13260
15
              { "SI21 Change Mark", "gsm_a.rr.si21_change_mark",
13261
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13262
15
                NULL, HFILL }
13263
15
            },
13264
15
            { &hf_gsm_a_rr_si21_index,
13265
15
              { "SI21 Index", "gsm_a.rr.si21_index",
13266
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13267
15
                NULL, HFILL }
13268
15
            },
13269
15
            { &hf_gsm_a_rr_si21_count,
13270
15
              { "SI21 Count", "gsm_a.rr.si21_count",
13271
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13272
15
                NULL, HFILL }
13273
15
            },
13274
15
            { &hf_gsm_a_rr_eab_auth_mask,
13275
15
              { "EAB Authorization Mask", "gsm_a.rr.eab_auth_mask",
13276
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13277
15
                NULL, HFILL }
13278
15
            },
13279
15
            { &hf_gsm_a_eab_subcategory,
13280
15
              { "EAB Subcategory", "gsm_a.rr.eab_subcategory",
13281
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13282
15
                NULL, HFILL }
13283
15
            },
13284
15
            { &hf_gsm_a_rr_gsm_report_type,
13285
15
              { "Report Type", "gsm_a.rr.gsm_report_type",
13286
15
                FT_BOOLEAN, BASE_NONE,  TFS(&gsm_a_rr_gsm_report_type_value), 0x0,
13287
15
                "Report type the MS shall use (Report Type)", HFILL }
13288
15
            },
13289
15
            { &hf_gsm_a_rr_serving_band_reporting,
13290
15
              { "Serving Band Reporting", "gsm_a.rr.serving_band_reporting",
13291
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
13292
15
                "Number of cells reported from the GSM serving frequency band (Serving Band Reporting)", HFILL }
13293
15
            },
13294
15
            { &hf_gsm_a_rr_frequency_scrolling,
13295
15
              { "Frequency Scrolling", "gsm_a.rr.frequency_scrolling",
13296
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_frequency_scrolling_value), 0x0,
13297
15
                NULL, HFILL }
13298
15
            },
13299
15
            { &hf_gsm_a_rr_rep_priority,
13300
15
              { "Rep Priority", "gsm_a.rr.rep_priority",
13301
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_rep_priority_value), 0x0,
13302
15
                "Reporting Priority", HFILL }
13303
15
            },
13304
15
            { &hf_gsm_a_rr_report_type,
13305
15
              { "Report Type", "gsm_a.rr.report_type",
13306
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_report_type_value), 0x0,
13307
15
                NULL, HFILL }
13308
15
            },
13309
15
            { &hf_gsm_a_rr_reporting_rate,
13310
15
              { "Reporting Rate", "gsm_a.rr.reporting_rate",
13311
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_reporting_rate_value), 0x0,
13312
15
                NULL, HFILL }
13313
15
            },
13314
15
            { &hf_gsm_a_rr_invalid_bsic_reporting,
13315
15
              { "Invalid BSIC Reporting", "gsm_a.rr.invalid_bsic_reporting",
13316
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_invalid_bsic_reporting_value), 0x0,
13317
15
                NULL, HFILL }
13318
15
            },
13319
15
            { &hf_gsm_a_rr_scale_ord,
13320
15
              { "Scale Ord", "gsm_a.rr.scale_ord",
13321
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_scale_ord_vals), 0x00,
13322
15
                "Offset used for the reported RXLEV values (Scale Ord)", HFILL }
13323
15
            },
13324
15
            { &hf_gsm_a_rr_900_reporting_offset,
13325
15
              { "900 Reporting Offset", "gsm_a.rr.900_reporting_offset",
13326
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_xxx_reporting_offset_vals), 0x00,
13327
15
                "Offset to the reported value when prioritising the cells for reporting for GSM frequency band 900 (900 Reporting Offset)", HFILL }
13328
15
            },
13329
15
            { &hf_gsm_a_rr_900_reporting_threshold,
13330
15
              { "900 Reporting Threshold", "gsm_a.rr.900_reporting_threshold",
13331
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_gsm_reporting_threshold_vals), 0x00,
13332
15
                "Apply priority reporting if the reported value is above threshold for GSM frequency band 900 (900 Reporting Threshold)", HFILL }
13333
15
            },
13334
15
            { &hf_gsm_a_rr_1800_reporting_offset,
13335
15
              { "1800 Reporting Offset", "gsm_a.rr.1800_reporting_offset",
13336
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_xxx_reporting_offset_vals), 0x00,
13337
15
                "Offset to the reported value when prioritising the cells for reporting for GSM frequency band 1800 (1800 Reporting Offset)", HFILL }
13338
15
            },
13339
15
            { &hf_gsm_a_rr_1800_reporting_threshold,
13340
15
              { "1800 Reporting Threshold", "gsm_a.rr.1800_reporting_threshold",
13341
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_gsm_reporting_threshold_vals), 0x00,
13342
15
                "Apply priority reporting if the reported value is above threshold for GSM frequency band 1800 (1800 Reporting Threshold)", HFILL }
13343
15
            },
13344
15
            { &hf_gsm_a_rr_400_reporting_offset,
13345
15
              { "400 Reporting Offset", "gsm_a.rr.400_reporting_offset",
13346
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_xxx_reporting_offset_vals), 0x00,
13347
15
                "Offset to the reported value when prioritising the cells for reporting for GSM frequency band 400 (400 Reporting Offset)", HFILL }
13348
15
            },
13349
15
            { &hf_gsm_a_rr_400_reporting_threshold,
13350
15
              { "400 Reporting Threshold", "gsm_a.rr.400_reporting_threshold",
13351
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_gsm_reporting_threshold_vals), 0x00,
13352
15
                "Apply priority reporting if the reported value is above threshold for GSM frequency band 400 (400 Reporting Threshold)", HFILL }
13353
15
            },
13354
15
            { &hf_gsm_a_rr_1900_reporting_offset,
13355
15
              { "1900 Reporting Offset", "gsm_a.rr.1900_reporting_offset",
13356
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_xxx_reporting_offset_vals), 0x00,
13357
15
                "Offset to the reported value when prioritising the cells for reporting for GSM frequency band 1900 (1900 Reporting Offset)", HFILL }
13358
15
            },
13359
15
            { &hf_gsm_a_rr_1900_reporting_threshold,
13360
15
              { "1900 Reporting Threshold", "gsm_a.rr.1900_reporting_threshold",
13361
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_gsm_reporting_threshold_vals), 0x00,
13362
15
                "Apply priority reporting if the reported value is above threshold for GSM frequency band 1900 (1900 Reporting Threshold)", HFILL }
13363
15
            },
13364
15
            { &hf_gsm_a_rr_850_reporting_offset,
13365
15
              { "850 Reporting Offset", "gsm_a.rr.850_reporting_offset",
13366
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_xxx_reporting_offset_vals), 0x00,
13367
15
                "Offset to the reported value when prioritising the cells for reporting for GSM frequency band 850 (850 Reporting Offset)", HFILL }
13368
15
            },
13369
15
            { &hf_gsm_a_rr_850_reporting_threshold,
13370
15
              { "850 Reporting Threshold", "gsm_a.rr.850_reporting_threshold",
13371
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_gsm_reporting_threshold_vals), 0x00,
13372
15
                "Apply priority reporting if the reported value is above threshold for GSM frequency band 850 (850 Reporting Threshold)", HFILL }
13373
15
            },
13374
15
            { &hf_gsm_a_rr_network_control_order,
13375
15
              { "Network Control Order", "gsm_a.rr.network_control_order",
13376
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_network_control_order_vals), 0x00,
13377
15
                NULL, HFILL }
13378
15
            },
13379
15
            { &hf_gsm_a_rr_nc_non_drx_period,
13380
15
              { "NC Non DRX Period", "gsm_a.rr.nc_non_drx_period",
13381
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_nc_non_drx_period_vals), 0x00,
13382
15
                NULL, HFILL }
13383
15
            },
13384
15
            { &hf_gsm_a_rr_nc_reporting_period_i,
13385
15
              { "NC Reporting Period I", "gsm_a.rr.nc_reporting_period_i",
13386
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_nc_reporting_period_x_vals), 0x00,
13387
15
                "NC Reporting Period in Packet Idle mode (NC Reporting Period I)", HFILL }
13388
15
            },
13389
15
            { &hf_gsm_a_rr_nc_reporting_period_t,
13390
15
              { "NC Reporting Period T", "gsm_a.rr.nc_reporting_period_t",
13391
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_nc_reporting_period_x_vals), 0x00,
13392
15
                "NC Reporting Period in Packet Transfer mode (NC Reporting Period T)", HFILL }
13393
15
            },
13394
15
            { &hf_gsm_a_rr_index_start_3g,
13395
15
              { "Index Start 3G", "gsm_a.rr.index_start_3g",
13396
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
13397
15
                NULL, HFILL }
13398
15
            },
13399
15
            { &hf_gsm_a_rr_absolute_index_start_emr,
13400
15
              { "Absolute Index Start EMR", "gsm_a.rr.absolute_index_start_emr",
13401
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
13402
15
                NULL, HFILL }
13403
15
            },
13404
15
            { &hf_gsm_a_rr_qsearch_c_initial,
13405
15
              { "QSearch C Initial", "gsm_a.rr.qsearch_c_initial",
13406
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_qsearch_c_initial_value), 0x0,
13407
15
                "Qsearch value to be used in connected mode before Qsearch C is received (QSearch C Initial)", HFILL }
13408
15
            },
13409
15
            { &hf_gsm_a_rr_fdd_rep_quant,
13410
15
              { "FDD Rep Quant", "gsm_a.rr.fdd_rep_quant",
13411
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_fdd_rep_quant_value), 0x0,
13412
15
                "FDD Reporting Quantity (FDD Rep Quant)", HFILL }
13413
15
            },
13414
15
            { &hf_gsm_a_rr_fdd_multirat_reporting,
13415
15
              { "FDD Multirat Reporting", "gsm_a.rr.fdd_multirat_reporting",
13416
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
13417
15
                "Number of cells from the FDD access technology that shall be included in the list of strongest cells or in the measurement report (FDD Multirat Reporting)", HFILL }
13418
15
            },
13419
15
            { &hf_gsm_a_rr_tdd_multirat_reporting,
13420
15
              { "TDD Multirat Reporting", "gsm_a.rr.tdd_multirat_reporting",
13421
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
13422
15
                "Number of cells from the TDD access technology that shall be included in the list of strongest cells or in the measurement report (TDD Multirat Reporting)", HFILL }
13423
15
            },
13424
15
            { &hf_gsm_a_rr_qsearch_p,
13425
15
              { "Qsearch P", "gsm_a.rr.qsearch_p",
13426
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_qsearch_x_vals), 0x00,
13427
15
                "Search for 3G cells if signal level below threshold (Qsearch P)", HFILL }
13428
15
            },
13429
15
            { &hf_gsm_a_rr_3g_search_prio,
13430
15
              { "3G Search Prio (ignored in Rel-8)", "gsm_a.rr.3g_search_prio",
13431
15
                FT_BOOLEAN, BASE_NONE,  TFS(&gsm_a_rr_3g_search_prio_value), 0x0,
13432
15
                NULL, HFILL }
13433
15
            },
13434
15
            { &hf_gsm_a_rr_fdd_reporting_offset,
13435
15
              { "FDD Reporting Offset", "gsm_a.rr.fdd_reporting_offset",
13436
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_xxx_reporting_offset_vals), 0x00,
13437
15
                "Offset to the reported value when prioritising the cells for reporting for FDD access technology (FDD Reporting Offset)", HFILL }
13438
15
            },
13439
15
            { &hf_gsm_a_rr_fdd_reporting_threshold_rscp,
13440
15
              { "FDD Reporting Threshold RSCP", "gsm_a.rr.fdd_reporting_threshold_rscp",
13441
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_wcdma_rscp_reporting_threshold_vals), 0x00,
13442
15
                "Apply priority reporting if the reported value is above threshold for FDD access technology (FDD Reporting Threshold)", HFILL }
13443
15
            },
13444
15
            { &hf_gsm_a_rr_fdd_reporting_threshold_ecn0,
13445
15
              { "FDD Reporting Threshold EcN0", "gsm_a.rr.fdd_reporting_threshold_ecn0",
13446
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_wcdma_ecn0_reporting_threshold_vals), 0x00,
13447
15
                "Apply priority reporting if the reported value is above threshold for FDD access technology (FDD Reporting Threshold)", HFILL }
13448
15
            },
13449
15
            { &hf_gsm_a_rr_tdd_reporting_offset,
13450
15
              { "TDD Reporting Offset", "gsm_a.rr.tdd_reporting_offset",
13451
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_xxx_reporting_offset_vals), 0x00,
13452
15
                "Offset to the reported value when prioritising the cells for reporting for TDD access technology (TDD Reporting Offset)", HFILL }
13453
15
            },
13454
15
            { &hf_gsm_a_rr_tdd_reporting_threshold_rscp,
13455
15
              { "TDD Reporting Threshold RSCP", "gsm_a.rr.tdd_reporting_threshold_rscp",
13456
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_wcdma_rscp_reporting_threshold_vals), 0x00,
13457
15
                "Apply priority reporting if the reported value is above threshold for TDD access technology (TDD Reporting Threshold)", HFILL }
13458
15
            },
13459
15
            { &hf_gsm_a_rr_tdd_reporting_threshold_ecn0,
13460
15
              { "TDD Reporting Threshold EcN0", "gsm_a.rr.tdd_reporting_threshold_ecn0",
13461
15
                FT_UINT8, BASE_DEC,  VALS(gsm_a_rr_wcdma_ecn0_reporting_threshold_vals), 0x00,
13462
15
                "Apply priority reporting if the reported value is above threshold for TDD access technology (TDD Reporting Threshold)", HFILL }
13463
15
            },
13464
15
            { &hf_gsm_a_rr_fdd_reporting_threshold_2,
13465
15
              { "FDD Reporting Threshold 2", "gsm_a.rr.fdd_reporting_threshold_2",
13466
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13467
15
                "Reporting threshold for the CPICH parameter (Ec/No or RSCP) that is not reported according to FDD_REP_QUANT (FDD Reporting Threshold 2)", HFILL }
13468
15
            },
13469
15
            { &hf_gsm_a_rr_3g_ccn_active,
13470
15
              { "3G CCN Active", "gsm_a.rr.3g_ccn_active",
13471
15
                FT_BOOLEAN, BASE_NONE,  TFS(&gsm_a_rr_3g_ccn_active_value), 0x0,
13472
15
                NULL, HFILL }
13473
15
            },
13474
15
            { &hf_gsm_a_rr_700_reporting_offset,
13475
15
              { "700 Reporting Offset", "gsm_a.rr.700_reporting_offset",
13476
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_xxx_reporting_offset_vals), 0x00,
13477
15
                "Offset to the reported value when prioritising the cells for reporting for GSM frequency band 700 (700 Reporting Offset)", HFILL }
13478
15
            },
13479
15
            { &hf_gsm_a_rr_700_reporting_threshold,
13480
15
              { "700 Reporting Threshold", "gsm_a.rr.700_reporting_threshold",
13481
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_gsm_reporting_threshold_vals), 0x00,
13482
15
                "Apply priority reporting if the reported value is above threshold for GSM frequency band 700 (700 Reporting Threshold)", HFILL }
13483
15
            },
13484
15
            { &hf_gsm_a_rr_810_reporting_offset,
13485
15
              { "810 Reporting Offset", "gsm_a.rr.810_reporting_offset",
13486
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_xxx_reporting_offset_vals), 0x00,
13487
15
                "Offset to the reported value when prioritising the cells for reporting for GSM frequency band 810 (810 Reporting Offset)", HFILL }
13488
15
            },
13489
15
            { &hf_gsm_a_rr_810_reporting_threshold,
13490
15
              { "810 Reporting Threshold", "gsm_a.rr.810_reporting_threshold",
13491
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_gsm_reporting_threshold_vals), 0x00,
13492
15
                "Apply priority reporting if the reported value is above threshold for GSM frequency band 810 (810 Reporting Threshold)", HFILL }
13493
15
            },
13494
15
            { &hf_gsm_a_rr_cbq,
13495
15
              { "CBQ", "gsm_a.rr.cbq",
13496
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13497
15
                "Cell Bar Qualify", HFILL }
13498
15
            },
13499
15
            { &hf_gsm_a_rr_cell_reselect_offset,
13500
15
              { "Cell Reselect Offset", "gsm_a.rr.cell_reselect_offset",
13501
15
                FT_UINT8, BASE_DEC|BASE_EXT_STRING,  &gsm_a_rr_cell_reselect_offset_vals_ext, 0x00,
13502
15
                "Offset to the C2 reselection criterion (Cell Reselect Offset)", HFILL }
13503
15
            },
13504
15
            { &hf_gsm_a_rr_temporary_offset,
13505
15
              { "Temporary Offset", "gsm_a.rr.temporary_offset",
13506
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_temporary_offset_vals), 0x0,
13507
15
                "Negative offset to C2 for the duration of Penalty Time (Temporary Offset)", HFILL }
13508
15
            },
13509
15
            { &hf_gsm_a_rr_penalty_time,
13510
15
              { "Penalty Time", "gsm_a.rr.penalty_time",
13511
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_penalty_time_vals), 0x0,
13512
15
                "Duration for which the temporary offset is applied (Penalty Time)", HFILL }
13513
15
            },
13514
15
            { &hf_gsm_a_rr_gprs_ra_colour,
13515
15
              { "GPRS RA Colour", "gsm_a.rr.gprs_ra_colour",
13516
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13517
15
                NULL, HFILL }
13518
15
            },
13519
15
            { &hf_gsm_a_rr_si13_position,
13520
15
              { "SI13 Position", "gsm_a.rr.si13_position",
13521
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_si13_position_vals), 0x0,
13522
15
                NULL, HFILL }
13523
15
            },
13524
15
            { &hf_gsm_a_rr_power_offset,
13525
15
              { "Power Offset", "gsm_a.rr.power_offset",
13526
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_power_offset_vals), 0x0,
13527
15
                "Power offset used in conjunction with the MS TXPWR MAX CCH parameter by the class 3 DCS 1800 MS (Power Offset)", HFILL }
13528
15
            },
13529
15
            { &hf_gsm_a_rr_si2quater_position,
13530
15
              { "SI2quater Position", "gsm_a.rr.si2quater_position",
13531
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_si2quater_position_value), 0x0,
13532
15
                NULL, HFILL }
13533
15
            },
13534
15
            { &hf_gsm_a_rr_si13alt_position,
13535
15
              { "SI13alt Position", "gsm_a.rr.si13alt_position",
13536
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_si13alt_position_value), 0x0,
13537
15
                NULL, HFILL }
13538
15
            },
13539
15
            { &hf_gsm_a_rr_si21_position,
13540
15
              { "SI21 Position", "gsm_a.rr.si21_position",
13541
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_si21_position_value), 0x0,
13542
15
                NULL, HFILL }
13543
15
            },
13544
15
            { &hf_gsm_a_rr_prio_thr,
13545
15
              { "Prio Thr", "gsm_a.rr.prio_thr",
13546
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_prio_thr_vals), 0x0,
13547
15
                "Prio signal strength threshold is related to RXLEV ACCESS_MIN (Prio Thr)", HFILL }
13548
15
            },
13549
15
            { &hf_gsm_a_rr_lsa_offset,
13550
15
              { "LSA Offset", "gsm_a.rr.lsa_offset",
13551
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_lsa_offset_vals), 0x0,
13552
15
                "Offset to be used for LSA cell re selection between cells with the same LSA priorities (LSA Offset)", HFILL }
13553
15
            },
13554
15
            { &hf_gsm_a_rr_cell_id,
13555
15
              { "Cell Identity", "gsm_a.rr.cell_id",
13556
15
                FT_UINT16, BASE_HEX_DEC, 0, 0x0,
13557
15
                NULL, HFILL }
13558
15
            },
13559
15
            { &hf_gsm_a_rr_paging_channel_restructuring,
13560
15
              { "Paging Channel Restructuring", "gsm_a.rr.paging_channel_restructuring",
13561
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_paging_channel_restructuring_value), 0x0,
13562
15
                NULL, HFILL }
13563
15
            },
13564
15
            { &hf_gsm_a_rr_nln_sacch,
13565
15
              { "NLN (SACCH)", "gsm_a.rr.nln_sacch",
13566
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13567
15
                NULL, HFILL }
13568
15
            },
13569
15
            { &hf_gsm_a_rr_nln_status_sacch,
13570
15
              { "NLN Status (SACCH)", "gsm_a.rr.nln_status_sacch",
13571
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13572
15
                NULL, HFILL }
13573
15
            },
13574
15
            { &hf_gsm_a_rr_nln_pch,
13575
15
              { "NLN (PCH)", "gsm_a.rr.nln_pch",
13576
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13577
15
                NULL, HFILL }
13578
15
            },
13579
15
            { &hf_gsm_a_rr_nln_status_pch,
13580
15
              { "NLN Status (PCH)", "gsm_a.rr.nln_status_pch",
13581
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13582
15
                NULL, HFILL }
13583
15
            },
13584
15
            { &hf_gsm_a_rr_vbs_vgcs_inband_notifications,
13585
15
              { "Inband Notifications", "gsm_a.rr.vbs_vgcs_inband_notifications",
13586
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_vbs_vgcs_inband_notifications_value), 0x0,
13587
15
                NULL, HFILL }
13588
15
            },
13589
15
            { &hf_gsm_a_rr_vbs_vgcs_inband_pagings,
13590
15
              { "Inband Pagings", "gsm_a.rr.vbs_vgcs_inband_pagings",
13591
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_vbs_vgcs_inband_pagings_value), 0x0,
13592
15
                NULL, HFILL }
13593
15
            },
13594
15
            { &hf_gsm_a_rr_rac,
13595
15
              { "RAC", "gsm_a.rr.rac",
13596
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13597
15
                "Routeing Area Code", HFILL }
13598
15
            },
13599
15
            { &hf_gsm_a_rr_max_lapdm,
13600
15
              { "Max LAPDm", "gsm_a.rr.max_lapdm",
13601
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_max_lapdm_vals), 0x0,
13602
15
                "Maximum number of LAPDm frames on which a layer 3 can be segmented into and be sent on the main DCCH (Max LAPDm)", HFILL }
13603
15
            },
13604
15
            { &hf_gsm_a_rr_gprs_ms_txpwr_max_ccch,
13605
15
              { "GPRS MS TxPwr Max CCH", "gsm_a.rr.gprs_ms_txpwr_max_cch",
13606
15
                FT_UINT8, BASE_DEC,  NULL, 0x00,
13607
15
                NULL, HFILL }
13608
15
            },
13609
15
            { &hf_gsm_a_rr_dedicated_mode_mbms_notification_support,
13610
15
              { "Dedicated Mode MBMS Notification Support", "gsm_a.rr.dedicated_mode_mbms_notification_support",
13611
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_dedicated_mode_mbms_notification_support_value), 0x0,
13612
15
                NULL, HFILL }
13613
15
            },
13614
15
            { &hf_gsm_a_rr_mnci_support,
13615
15
              { "MNCI Support", "gsm_a.rr.mnci_support",
13616
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_mnci_support_value), 0x0,
13617
15
                "MBMS Neighbouring Cell Information Support (MNCI Support)", HFILL }
13618
15
            },
13619
15
            { &hf_gsm_a_rr_amr_config,
13620
15
              { "AMR Configuration", "gsm_a.rr.amr_config",
13621
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13622
15
                NULL, HFILL }
13623
15
            },
13624
15
            { &hf_gsm_a_rr_bcch_change_mark,
13625
15
              { "BCCH Change Mark", "gsm_a.rr.bcch_change_mark",
13626
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13627
15
                NULL, HFILL }
13628
15
            },
13629
15
            { &hf_gsm_a_rr_si_change_field,
13630
15
              { "SI Change Field", "gsm_a.rr.si_change_field",
13631
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_si_change_field_vals), 0x0,
13632
15
                NULL, HFILL }
13633
15
            },
13634
15
            { &hf_gsm_a_rr_si13_change_mark,
13635
15
              { "SI13 Change Mark", "gsm_a.rr.si13_change_mark",
13636
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13637
15
                NULL, HFILL }
13638
15
            },
13639
15
            { &hf_gsm_a_rr_hsn,
13640
15
              { "HSN", "gsm_a.rr.hsn",
13641
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13642
15
                "Hopping Sequence Number (HSN)", HFILL }
13643
15
            },
13644
15
            { &hf_gsm_a_rr_rfl_number,
13645
15
              { "RFL Number", "gsm_a.rr.rfl_number",
13646
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13647
15
                "Radio Frequency List Number (RFL Number)", HFILL }
13648
15
            },
13649
15
            { &hf_gsm_a_rr_arfcn_index,
13650
15
              { "ARFCN Index", "gsm_a.rr.arfcn_index",
13651
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13652
15
                NULL, HFILL }
13653
15
            },
13654
15
            { &hf_gsm_a_rr_ma_length,
13655
15
              { "MA Length", "gsm_a.rr.ma_length",
13656
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13657
15
                "Mobile Allocation Length (MA Length)", HFILL }
13658
15
            },
13659
15
            { &hf_gsm_a_rr_psi1_repeat_period,
13660
15
              { "PSI1 Repeat Period", "gsm_a.rr.psi1_repeat_period",
13661
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_psi1_repeat_period_vals), 0x0,
13662
15
                NULL, HFILL }
13663
15
            },
13664
15
            { &hf_gsm_a_rr_pbcch_pb,
13665
15
              { "Pb", "gsm_a.rr.pbcch_pb",
13666
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_pbcch_pb_vals), 0x0,
13667
15
                "Power reduction on PBCCH/PCCCH (Pb)", HFILL }
13668
15
            },
13669
15
            { &hf_gsm_a_rr_pbcch_tsc,
13670
15
              { "TSC", "gsm_a.rr.pbcch_tsc",
13671
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13672
15
                "Training Sequence Code for PBCCH (TSC)", HFILL }
13673
15
            },
13674
15
            { &hf_gsm_a_rr_pbcch_tn,
13675
15
              { "TN", "gsm_a.rr.pbcch_tn",
13676
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13677
15
                "Timeslot Number for PCCH (TN)", HFILL }
13678
15
            },
13679
15
            { &hf_gsm_a_rr_spgc_ccch_sup,
13680
15
              { "SPGC CCCH Sup", "gsm_a.rr.spgc_ccch_sup",
13681
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_spgc_ccch_sup_value), 0x0,
13682
15
                "Split PG Cycle Code on CCCH Support (SPGC CCCH Sup)", HFILL }
13683
15
            },
13684
15
            { &hf_gsm_a_rr_priority_access_thr,
13685
15
              { "Priority Access Thr", "gsm_a.rr.priority_access_thr",
13686
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_priority_access_thr_vals), 0x0,
13687
15
                "Priority Access Threshold for packet access (Priority Access Thr)", HFILL }
13688
15
            },
13689
15
            { &hf_gsm_a_rr_nmo,
13690
15
              { "NMO", "gsm_a.rr.nmo",
13691
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_nmo_vals), 0x0,
13692
15
                "Network mode of Operation (NMO)", HFILL }
13693
15
            },
13694
15
            { &hf_gsm_a_rr_t3168,
13695
15
              { "T3168", "gsm_a.rr.t3168",
13696
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_t3168_vals), 0x0,
13697
15
                NULL, HFILL }
13698
15
            },
13699
15
            { &hf_gsm_a_rr_t3192,
13700
15
              { "T3192", "gsm_a.rr.t3192",
13701
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_t3192_vals), 0x0,
13702
15
                NULL, HFILL }
13703
15
            },
13704
15
            { &hf_gsm_a_rr_drx_timer_max,
13705
15
              { "DRX Timer Max", "gsm_a.rr.drx_timer_max",
13706
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_drx_timer_max_vals), 0x0,
13707
15
                "Discontinuous Reception Timer Max (DRX Timer Max)", HFILL }
13708
15
            },
13709
15
            { &hf_gsm_a_rr_access_burst_type,
13710
15
              { "Access Burst Type", "gsm_a.rr.access_burst_type",
13711
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_access_burst_type_value), 0x0,
13712
15
                "Format used in the PACKET CHANNEL REQUEST message, the PS HANDOVER ACCESS message, the PTCCH uplink block and in the PACKET CONTROL ACKNOWLEDGMENT message (Access Burst Type)", HFILL }
13713
15
            },
13714
15
            { &hf_gsm_a_rr_control_ack_type,
13715
15
              { "Control Ack Type", "gsm_a.rr.control_ack_type",
13716
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_control_ack_type_value), 0x0,
13717
15
                "Default format of the PACKET CONTROL ACKNOWLEDGMENT message (Control Ack Type)", HFILL }
13718
15
            },
13719
15
            { &hf_gsm_a_rr_bs_cv_max,
13720
15
              { "BS CV Max", "gsm_a.rr.bs_cv_max",
13721
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13722
15
                "Base Station Countdown Value Maximum (BS CV Max)", HFILL }
13723
15
            },
13724
15
            { &hf_gsm_a_rr_pan_dec,
13725
15
              { "PAN Dec", "gsm_a.rr.pan_dec",
13726
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13727
15
                NULL, HFILL }
13728
15
            },
13729
15
            { &hf_gsm_a_rr_pan_inc,
13730
15
              { "PAN Inc", "gsm_a.rr.pan_inc",
13731
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13732
15
                NULL, HFILL }
13733
15
            },
13734
15
            { &hf_gsm_a_rr_pan_max,
13735
15
              { "PAN Max", "gsm_a.rr.pan_max",
13736
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_pan_max_vals), 0x0,
13737
15
                NULL, HFILL }
13738
15
            },
13739
15
            { &hf_gsm_a_rr_egprs_packet_channel_request,
13740
15
              { "EGPRS Packet Channel Request", "gsm_a.rr.egprs_packet_channel_request",
13741
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_egprs_packet_channel_request_value), 0x0,
13742
15
                NULL, HFILL }
13743
15
            },
13744
15
            { &hf_gsm_a_rr_bep_period,
13745
15
              { "BEP Period", "gsm_a.rr.bep_period",
13746
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_bep_period_vals), 0x0,
13747
15
                NULL, HFILL }
13748
15
            },
13749
15
            { &hf_gsm_a_rr_pfc_feature_mode,
13750
15
              { "PFC Feature Mode", "gsm_a.rr.pfc_feature_mode",
13751
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_pfc_feature_mode_value), 0x0,
13752
15
                "Packet Flow Context Feature Mode (PFC Feature Mode)", HFILL }
13753
15
            },
13754
15
            { &hf_gsm_a_rr_dtm_support,
13755
15
              { "DTM Support", "gsm_a.rr.dtm_support",
13756
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_dtm_support_value), 0x0,
13757
15
                "Dual Transfer Mode Support (DTM Support)", HFILL }
13758
15
            },
13759
15
            { &hf_gsm_a_rr_bss_paging_coordination,
13760
15
              { "BSS Paging Coordination", "gsm_a.rr.bss_paging_coordination",
13761
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_bss_paging_coordination_value), 0x0,
13762
15
                NULL, HFILL }
13763
15
            },
13764
15
            { &hf_gsm_a_rr_ccn_active,
13765
15
              { "CCN Active", "gsm_a.rr.ccn_active",
13766
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_ccn_active_value), 0x0,
13767
15
                NULL, HFILL }
13768
15
            },
13769
15
            { &hf_gsm_a_rr_nw_ext_utbf,
13770
15
              { "NW Ext UTBF", "gsm_a.rr.nw_ext_utbf",
13771
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_nw_ext_utbf_value), 0x0,
13772
15
                "Network Extended Uplink TBF (NW Ext UTBF)", HFILL }
13773
15
            },
13774
15
            { &hf_gsm_a_rr_multiple_tbf_capability,
13775
15
              { "Multiple TBF Capability", "gsm_a.rr.multiple_tbf_capability",
13776
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_multiple_tbf_capability_value), 0x0,
13777
15
                NULL, HFILL }
13778
15
            },
13779
15
            { &hf_gsm_a_rr_ext_utbf_no_data,
13780
15
              { "Ext UTBF No Data", "gsm_a.rr.ext_utbf_no_data",
13781
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_ext_utbf_no_data_value), 0x0,
13782
15
                NULL, HFILL }
13783
15
            },
13784
15
            { &hf_gsm_a_rr_dtm_enhancements_capability,
13785
15
              { "DTM Enhancements Capability", "gsm_a.rr.dtm_enhancements_capability",
13786
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_dtm_enhancements_capability_value), 0x0,
13787
15
                NULL, HFILL }
13788
15
            },
13789
15
            { &hf_gsm_a_rr_reduced_latency_access,
13790
15
              { "Reduced Latency Access", "gsm_a.rr.reduced_latency_access",
13791
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_reduced_latency_access_value), 0x0,
13792
15
                NULL, HFILL }
13793
15
            },
13794
15
            { &hf_gsm_a_rr_alpha,
13795
15
              { "Alpha", "gsm_a.rr.alpha",
13796
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_alpha_vals), 0x0,
13797
15
                "Alpha parameter for GPR MS output power control (Alpha)", HFILL }
13798
15
            },
13799
15
            { &hf_gsm_a_rr_t_avg_w,
13800
15
              { "T Avg W", "gsm_a.rr.t_avg_w",
13801
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_t_avg_x_vals), 0x0,
13802
15
                "Signal strength filter period for power control in packet idle mode", HFILL }
13803
15
            },
13804
15
            { &hf_gsm_a_rr_t_avg_t,
13805
15
              { "T Avg T", "gsm_a.rr.t_avg_t",
13806
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_t_avg_x_vals), 0x0,
13807
15
                "Signal strength filter period for power control in packet transfer mode", HFILL }
13808
15
            },
13809
15
            { &hf_gsm_a_rr_pc_meas_chan,
13810
15
              { "PC Meas Chan", "gsm_a.rr.pc_meas_chan",
13811
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_pc_meas_chan_value), 0x0,
13812
15
                "Channel used to measure the received power level on the downlink for the purpose of the uplink power control (PC Meas Chan)", HFILL }
13813
15
            },
13814
15
            { &hf_gsm_a_rr_n_avg_i,
13815
15
              { "N Avg I", "gsm_a.rr.n_avg_i",
13816
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_n_avg_i_vals), 0x0,
13817
15
                "Interfering signal strength filter constant for power control (N Avg I)", HFILL }
13818
15
            },
13819
15
            { &hf_gsm_a_rr_sgsnr,
13820
15
              { "SGSNR", "gsm_a.rr.sgsnr",
13821
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_sgsnr_value), 0x0,
13822
15
                "SGSN Release (SGSNR)", HFILL }
13823
15
            },
13824
15
            { &hf_gsm_a_rr_si_status_ind,
13825
15
              { "SI Status Ind", "gsm_a.rr.si_status_ind",
13826
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_si_status_ind_value), 0x0,
13827
15
                NULL, HFILL }
13828
15
            },
13829
15
            { &hf_gsm_a_rr_lb_ms_txpwr_max_cch,
13830
15
              { "LB MS TxPwr Max CCCH", "gsm_a.rr.lb_ms_txpwr_max_cch",
13831
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_lb_ms_txpwr_max_cch_vals), 0x0,
13832
15
                "Maximum TX power level an MS is allowed to use on all other than DCS 1800 and PCS 1900 frequency bands when accessing the system until otherwise commanded (LB MS TxPwr Max CCCH)", HFILL }
13833
15
            },
13834
15
            { &hf_gsm_a_rr_si2n_support,
13835
15
              { "SI2n Support", "gsm_a.rr.si2n_support",
13836
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_si2n_support_vals), 0x0,
13837
15
                NULL, HFILL }
13838
15
            },
13839
15
            { &hf_gsm_a_rr_mi_index,
13840
15
              { "Measurement Information Index", "gsm_a.rr.mi_index",
13841
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13842
15
                NULL, HFILL }
13843
15
            },
13844
15
            { &hf_gsm_a_rr_mi_count,
13845
15
              { "Measurement Information Count", "gsm_a.rr.mi_count",
13846
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
13847
15
                NULL, HFILL }
13848
15
            },
13849
15
            { &hf_gsm_a_rr_3g_wait,
13850
15
              { "3G Wait", "gsm_a.rr.3g_wait",
13851
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_3g_wait_vals), 0x0,
13852
15
                NULL, HFILL }
13853
15
            },
13854
15
            { &hf_gsm_a_rr_qsearch_c,
13855
15
              { "Qsearch C", "gsm_a.rr.qsearch_c",
13856
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_qsearch_x_vals), 0x00,
13857
15
                "Search for 3G cells if signal level is below (0 7) or above (8 15) threshold (Qsearch C)", HFILL }
13858
15
            },
13859
15
            { &hf_gsm_a_rr_bsic_seen,
13860
15
              { "BSIC Seen", "gsm_a.rr.bsic_seen",
13861
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_bsic_seen_value), 0x0,
13862
15
                NULL, HFILL }
13863
15
            },
13864
15
            { &hf_gsm_a_rr_scale,
13865
15
              { "Scale", "gsm_a.rr.scale",
13866
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_scale_value), 0x0,
13867
15
                "Offset applied for the reported RXLEV values (Scale)", HFILL }
13868
15
            },
13869
15
            { &hf_gsm_a_rr_mean_bep_gmsk,
13870
15
              { "Mean BEP GMSK", "gsm_a.rr.mean_bep_gmsk",
13871
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_mean_bep_gmsk_vals), 0x00,
13872
15
                "Mean Bit Error Probability in GMSK (Mean BEP GMSK)", HFILL }
13873
15
            },
13874
15
            { &hf_gsm_a_rr_mean_cv_bep,
13875
15
              { "CV BEP", "gsm_a.rr.cv_bep",
13876
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_cv_bep_vals), 0x00,
13877
15
                "Coefficient of Variation of the Bit Error Probability (CV BEP)", HFILL }
13878
15
            },
13879
15
            { &hf_gsm_a_rr_nbr_rcvd_blocks,
13880
15
              { "Nb Rcvd Blocks", "gsm_a.rr.nbr_rcvd_blocks",
13881
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
13882
15
                "Number of correctly decoded blocks that were completed during the measurement report period (Nb Rcvd Blocks)", HFILL }
13883
15
            },
13884
15
            { &hf_gsm_a_rr_reporting_quantity,
13885
15
              { "Reporting Quantity", "gsm_a.rr.reporting_quantity",
13886
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
13887
15
                NULL, HFILL }
13888
15
            },
13889
15
            { &hf_gsm_a_rr_3g_priority_param_desc_utran_start,
13890
15
              { "UTRAN Start", "gsm_a.rr.3g_priority.utran_start",
13891
15
                FT_BOOLEAN, BASE_NONE, TFS(&priority_utran_start), 0x00,
13892
15
                NULL, HFILL }
13893
15
            },
13894
15
            { &hf_gsm_a_rr_3g_priority_param_desc_utran_stop,
13895
15
              { "UTRAN Stop", "gsm_a.rr.3g_priority.utran_stop",
13896
15
                FT_BOOLEAN, BASE_NONE, TFS(&priority_utran_stop), 0x00,
13897
15
                NULL, HFILL }
13898
15
            },
13899
15
            { &hf_gsm_a_rr_3g_priority_param_desc_default_utran_prio,
13900
15
              { "DEFAULT_UTRAN_PRIORITY", "gsm_a.rr.3g_priority.default_utran_prio",
13901
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
13902
15
                NULL, HFILL }
13903
15
            },
13904
15
            { &hf_gsm_a_rr_3g_priority_param_desc_default_threshold_utran,
13905
15
              { "DEFAULT_THRESH_UTRAN", "gsm_a.rr.3g_priority.default_threshold_utran",
13906
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_thresh_utran_eutran_high_low), 0x00,
13907
15
                NULL, HFILL }
13908
15
            },
13909
15
            { &hf_gsm_a_rr_3g_priority_param_desc_default_utran_qrxlevmin,
13910
15
              { "DEFAULT_UTRAN_QRXLEVMIN", "gsm_a.rr.3g_priority.default_utran_qrxlevmin",
13911
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_utran_qrxlevmin), 0x00,
13912
15
                NULL, HFILL }
13913
15
            },
13914
15
            { &hf_gsm_a_rr_utran_frequency_index,
13915
15
              { "UTRAN Frequency Index", "gsm_a.rr.3g_priority.utran_frequency_index",
13916
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
13917
15
                NULL, HFILL }
13918
15
            },
13919
15
            { &hf_gsm_a_rr_utran_priority,
13920
15
              { "UTRAN_PRIORITY", "gsm_a.rr.3g_priority.utran_priority",
13921
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
13922
15
                NULL, HFILL }
13923
15
            },
13924
15
            { &hf_gsm_a_rr_thresh_utran_high,
13925
15
              { "THRESH_UTRAN_high", "gsm_a.rr.3g_priority.thres_utran_high",
13926
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_thresh_utran_eutran_high_low), 0x00,
13927
15
                NULL, HFILL }
13928
15
            },
13929
15
            { &hf_gsm_a_rr_thresh_utran_low,
13930
15
              { "THRESH_UTRAN_low", "gsm_a.rr.3g_priority.thres_utran_low",
13931
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_thresh_utran_eutran_high_low), 0x00,
13932
15
                NULL, HFILL }
13933
15
            },
13934
15
            { &hf_gsm_a_rr_utran_qrxlevmin,
13935
15
              { "UTRAN_QRXLEVMIN", "gsm_a.rr.3g_priority.utran_qrxlevmin",
13936
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_utran_qrxlevmin), 0x00,
13937
15
                NULL, HFILL }
13938
15
            },
13939
15
            { &hf_gsm_a_rr_eutran_ccn_active,
13940
15
              { "E-UTRAN_CCN_ACTIVE", "gsm_a.rr.3g_priority.eutran_ccn_active",
13941
15
                FT_BOOLEAN, BASE_NONE, TFS(&eutran_ccn_active), 0x00,
13942
15
                NULL, HFILL }
13943
15
            },
13944
15
            { &hf_gsm_a_rr_eutran_start,
13945
15
              { "E-UTRAN Start", "gsm_a.rr.3g_priority.eutran_start",
13946
15
                FT_BOOLEAN, BASE_NONE, TFS(&priority_utran_start), 0x00,
13947
15
                NULL, HFILL }
13948
15
            },
13949
15
            { &hf_gsm_a_rr_eutran_stop,
13950
15
              { "E-UTRAN Stop", "gsm_a.rr.3g_priority.utran_stop",
13951
15
                FT_BOOLEAN, BASE_NONE, TFS(&priority_utran_stop), 0x00,
13952
15
                NULL, HFILL }
13953
15
            },
13954
15
            { &hf_gsm_a_rr_qsearch_c_eutran_initial,
13955
15
              { "Qsearch_C_E-UTRAN_Initial", "gsm_a.rr.qsearch_c_eutran_initial",
13956
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_qsearch_c_eutran_initial), 0x00,
13957
15
                NULL, HFILL }
13958
15
            },
13959
15
            { &hf_gsm_a_rr_eutran_multirat_reporting,
13960
15
              { "E-UTRAN_MULTIRAT_REPORTING (nb of E-UTRAN cells to be included in measurement report)", "gsm_a.rr.eutran_multirat_reporting",
13961
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
13962
15
                NULL, HFILL }
13963
15
            },
13964
15
            { &hf_gsm_a_rr_eutran_fdd_reporting_threshold_rsrp,
13965
15
              { "E-UTRAN_FDD_REPORTING_THRESHOLD", "gsm_a.rr.eutran_fdd_reporting_threshold_rsrp",
13966
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_lte_rsrp_reporting_threshold_vals), 0x00,
13967
15
                NULL, HFILL }
13968
15
            },
13969
15
            { &hf_gsm_a_rr_eutran_fdd_reporting_threshold_rsrq,
13970
15
              { "E-UTRAN_FDD_REPORTING_THRESHOLD", "gsm_a.rr.eutran_fdd_reporting_threshold_rsrq",
13971
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_lte_rsrq_reporting_threshold_vals), 0x00,
13972
15
                NULL, HFILL }
13973
15
            },
13974
15
            { &hf_gsm_a_rr_eutran_fdd_reporting_threshold_2,
13975
15
              { "E-UTRAN_FDD_REPORTING_THRESHOLD_2", "gsm_a.rr.eutran_fdd_reporting_threshold_2",
13976
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
13977
15
                NULL, HFILL }
13978
15
            },
13979
15
            { &hf_gsm_a_rr_eutran_fdd_reporting_offset,
13980
15
              { "E-UTRAN_FDD_REPORTING_OFFSET", "gsm_a.rr.eutran_fdd_reporting_offset",
13981
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
13982
15
                NULL, HFILL }
13983
15
            },
13984
15
            { &hf_gsm_a_rr_eutran_tdd_reporting_threshold_rsrp,
13985
15
              { "E-UTRAN_TDD_REPORTING_THRESHOLD", "gsm_a.rr.eutran_tdd_reporting_threshold_rsrp",
13986
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_lte_rsrp_reporting_threshold_vals), 0x00,
13987
15
                NULL, HFILL }
13988
15
            },
13989
15
            { &hf_gsm_a_rr_eutran_tdd_reporting_threshold_rsrq,
13990
15
              { "E-UTRAN_TDD_REPORTING_THRESHOLD", "gsm_a.rr.eutran_tdd_reporting_threshold_rsrq",
13991
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_lte_rsrq_reporting_threshold_vals), 0x00,
13992
15
                NULL, HFILL }
13993
15
            },
13994
15
            { &hf_gsm_a_rr_eutran_tdd_reporting_threshold_2,
13995
15
              { "E-UTRAN_TDD_REPORTING_THRESHOLD_2", "gsm_a.rr.eutran_tdd_reporting_threshold_2",
13996
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
13997
15
                NULL, HFILL }
13998
15
            },
13999
15
            { &hf_gsm_a_rr_eutran_tdd_reporting_offset,
14000
15
              { "E-UTRAN_TDD_REPORTING_OFFSET", "gsm_a.rr.eutran_tdd_reporting_offset",
14001
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14002
15
                NULL, HFILL }
14003
15
            },
14004
15
            { &hf_gsm_a_rr_eutran_fdd_measurement_report_offset,
14005
15
              { "E-UTRAN_FDD_MEASUREMENT_REPORT_OFFSET", "gsm_a.rr.eutran_fdd_measurement_report_offset",
14006
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14007
15
                NULL, HFILL }
14008
15
            },
14009
15
            { &hf_gsm_a_rr_eutran_tdd_measurement_report_offset,
14010
15
              { "E-UTRAN_TDD_MEASUREMENT_REPORT_OFFSET", "gsm_a.rr.eutran_tdd_measurement_report_offset",
14011
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14012
15
                NULL, HFILL }
14013
15
            },
14014
15
            { &hf_gsm_a_rr_reporting_granularity,
14015
15
              { "REPORTING_GRANULARITY", "gsm_a.rr.reporting_granularity",
14016
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14017
15
                NULL, HFILL }
14018
15
            },
14019
15
            { &hf_gsm_a_rr_eutran_default_measurement_control_eutran,
14020
15
              { "DEFAULT_Measurement_Control_E-UTRAN", "gsm_a.rr.eutran_default_measurement_control_eutran",
14021
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14022
15
                NULL, HFILL }
14023
15
            },
14024
15
            { &hf_gsm_a_rr_eutran_measurement_control_eutran,
14025
15
              { "Measurement_Control_E-UTRAN", "gsm_a.rr.eutran_measurement_control_eutran",
14026
15
                FT_BOOLEAN, BASE_NONE, TFS(&measurement_control_eutran), 0x00,
14027
15
                NULL, HFILL }
14028
15
            },
14029
15
            { &hf_gsm_a_rr_qsearch_p_eutran,
14030
15
              { "Qsearch_P_E-UTRAN", "gsm_a.rr.qsearch_p_eutran",
14031
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14032
15
                NULL, HFILL }
14033
15
            },
14034
15
            { &hf_gsm_a_rr_serving_cell_priority_param_geran_priority,
14035
15
              { "GERAN_PRIORITY", "gsm_a.rr.serving_cell_priority_param_geran_priority",
14036
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14037
15
                NULL, HFILL }
14038
15
            },
14039
15
            { &hf_gsm_a_rr_serving_cell_priority_param_thresh_prio_search,
14040
15
              { "THRESH_Priority_Search", "gsm_a.rr.serving_cell_priority_param_thresh_prio_search",
14041
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_serving_cell_thresh_priority_search), 0x00,
14042
15
                NULL, HFILL }
14043
15
            },
14044
15
            { &hf_gsm_a_rr_serving_cell_priority_param_thresh_gsm_low,
14045
15
              { "THRESH_GSM_low", "gsm_a.rr.serving_cell_priority_param_thresh_gsm_low",
14046
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_serving_cell_thresh_gsm_low), 0x00,
14047
15
                NULL, HFILL }
14048
15
            },
14049
15
            { &hf_gsm_a_rr_serving_cell_priority_param_h_prio,
14050
15
              { "H_PRIO", "gsm_a.rr.serving_cell_priority_param_h_prio",
14051
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_serving_cell_priority_param_h_prio), 0x00,
14052
15
                NULL, HFILL }
14053
15
            },
14054
15
            { &hf_gsm_a_rr_serving_cell_priority_param_t_reselection,
14055
15
              { "T_Reselection", "gsm_a.rr.serving_cell_priority_param_t_reselection",
14056
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_serving_cell_priority_param_t_reselection), 0x00,
14057
15
                NULL, HFILL }
14058
15
            },
14059
15
            { &hf_gsm_a_rr_eutran_earfcn,
14060
15
              { "EARFCN", "gsm_a.rr.earfcn",
14061
15
                FT_UINT16, BASE_DEC, NULL, 0x00,
14062
15
                NULL, HFILL }
14063
15
            },
14064
15
            { &hf_gsm_a_rr_eutran_measurement_bandwidth,
14065
15
              { "Measurement Bandwidth", "gsm_a.rr.eutran_measurement_bandwidth",
14066
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_eutran_measurement_bandwidth), 0x00,
14067
15
                NULL, HFILL }
14068
15
            },
14069
15
            { &hf_gsm_a_rr_eutran_priority,
14070
15
              { "E-UTRAN_PRIORITY", "gsm_a.rr.eutran_priority",
14071
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14072
15
                NULL, HFILL }
14073
15
            },
14074
15
            { &hf_gsm_a_rr_thresh_eutran_high,
14075
15
              { "THRESH_EUTRAN_high", "gsm_a.rr.thresh_eutran_high",
14076
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_thresh_utran_eutran_high_low), 0x00,
14077
15
                NULL, HFILL }
14078
15
            },
14079
15
            { &hf_gsm_a_rr_thresh_eutran_low,
14080
15
              { "THRESH_EUTRAN_low", "gsm_a.rr.thresh_eutran_low",
14081
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_thresh_utran_eutran_high_low), 0x00,
14082
15
                NULL, HFILL }
14083
15
            },
14084
15
            { &hf_gsm_a_rr_eutran_qrxlevmin,
14085
15
              { "E-UTRAN_QRXLEVMIN", "gsm_a.rr.eutran_qrxlevmin",
14086
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_eutran_qrxlevmin), 0x00,
14087
15
                NULL, HFILL }
14088
15
            },
14089
15
            { &hf_gsm_a_rr_eutran_pcid,
14090
15
              { "PCID", "gsm_a.rr.pcid",
14091
15
                FT_UINT16, BASE_DEC, NULL, 0x00,
14092
15
                NULL, HFILL }
14093
15
            },
14094
15
            { &hf_gsm_a_rr_eutran_pcid_bitmap_group,
14095
15
              { "PCID_BITMAP_GROUP", "gsm_a.rr.pcid_bitmap_group",
14096
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14097
15
                NULL, HFILL }
14098
15
            },
14099
15
            { &hf_gsm_a_rr_eutran_pcid_pattern_length,
14100
15
              { "PCID_Pattern_length", "gsm_a.rr.pcid_pattern_length",
14101
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_pcid_psc_pattern_length), 0x00,
14102
15
                NULL, HFILL }
14103
15
            },
14104
#if 0
14105
            { &hf_gsm_a_rr_eutran_pcid_pattern,
14106
              { "PCID_Pattern", "gsm_a.rr.pcid_pattern",
14107
                FT_UINT8, BASE_DEC, NULL, 0x00,
14108
                NULL, HFILL }
14109
            },
14110
#endif
14111
15
            { &hf_gsm_a_rr_eutran_pcid_pattern_sense,
14112
15
              { "PCID_pattern_sense", "gsm_a.rr.pcid_pattern_sense",
14113
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_pcid_pattern_sense), 0x00,
14114
15
                NULL, HFILL }
14115
15
            },
14116
15
            { &hf_gsm_a_rr_eutran_frequency_index,
14117
15
              { "E-UTRAN_FREQUENCY_INDEX", "gsm_a.rr.eutran_frequency_index",
14118
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14119
15
                NULL, HFILL }
14120
15
            },
14121
15
            { &hf_gsm_a_rr_psc,
14122
15
              { "PSC", "gsm_a.rr.psc",
14123
15
                FT_UINT16, BASE_DEC, NULL, 0x00,
14124
15
                NULL, HFILL }
14125
15
            },
14126
15
            { &hf_gsm_a_rr_utran_psc_pattern_length,
14127
15
              { "PSC_Pattern_length", "gsm_a.rr.psc_pattern_length",
14128
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_pcid_psc_pattern_length), 0x00,
14129
15
                NULL, HFILL }
14130
15
            },
14131
15
            { &hf_gsm_a_rr_utran_psc_pattern_sense,
14132
15
              { "PSC_pattern_sense", "gsm_a.rr.psc_pattern_sense",
14133
15
                FT_BOOLEAN, BASE_NONE, NULL, 0x00,
14134
15
                NULL, HFILL }
14135
15
            },
14136
15
            { &hf_gsm_a_rr_utran_csg_fdd_uarfcn,
14137
15
              { "CSG FDD UARFCN", "gsm_a.rr.utran_csg_fdd_uarfcn",
14138
15
                FT_UINT16, BASE_DEC,  NULL, 0x0,
14139
15
                NULL, HFILL }
14140
15
            },
14141
15
            { &hf_gsm_a_rr_utran_csg_tdd_uarfcn,
14142
15
              { "CSG TDD UARFCN", "gsm_a.rr.utran_csg_tdd_uarfcn",
14143
15
                FT_UINT16, BASE_DEC,  NULL, 0x0,
14144
15
                NULL, HFILL }
14145
15
            },
14146
15
            { &hf_gsm_a_rr_csg_earfcn,
14147
15
              { "CSG_EARFCN", "gsm_a.rr.csg_earfcn",
14148
15
                FT_UINT16, BASE_DEC, NULL, 0x00,
14149
15
                NULL, HFILL }
14150
15
            },
14151
15
            { &hf_gsm_a_rr_3g_control_param_desc_meas_ctrl_utran,
14152
15
              { "PCID_pattern_sense", "gsm_a.rr.meas_ctrl_utran",
14153
15
                FT_BOOLEAN, BASE_NONE, TFS(&measurement_control_utran), 0x00,
14154
15
                NULL, HFILL }
14155
15
            },
14156
15
            { &hf_gsm_a_rr_extended_ra,
14157
15
              { "Extended_RA", "gsm_a.rr.extended_ra",
14158
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14159
15
                NULL, HFILL }
14160
15
            },
14161
15
            { &hf_gsm_a_rr_access_tech_type,
14162
15
              { "Access_Technology_Type", "gsm_a.rr.access_tech_type",
14163
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_access_tech_type_vals), 0x00,
14164
15
                NULL, HFILL }
14165
15
            },
14166
15
            { &hf_gsm_a_rr_tfi_assignment,
14167
15
              { "TFI_Assignment", "gsm_a.rr.tfi_assignment",
14168
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14169
15
                NULL, HFILL }
14170
15
            },
14171
15
            { &hf_gsm_a_rr_polling,
14172
15
              { "Polling", "gsm_a.rr.polling",
14173
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_polling_vals), 0x00,
14174
15
                NULL, HFILL }
14175
15
            },
14176
15
            { &hf_gsm_a_rr_usf,
14177
15
              { "USF", "gsm_a.rr.usf",
14178
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14179
15
                NULL, HFILL }
14180
15
            },
14181
15
            { &hf_gsm_a_rr_usf_granularity,
14182
15
              { "USF_granularity", "gsm_a.rr.usf_granularity",
14183
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_usf_granularity_vals), 0x00,
14184
15
                NULL, HFILL }
14185
15
            },
14186
15
            { &hf_gsm_a_rr_p0,
14187
15
              { "P0", "gsm_a.rr.p0",
14188
15
                FT_UINT8, BASE_CUSTOM, CF_FUNC(&fmt_2db_units), 0x00,
14189
15
                NULL, HFILL }
14190
15
            },
14191
15
            { &hf_gsm_a_rr_pr_mode,
14192
15
              { "pr_mode", "gsm_a.rr.pr_mode",
14193
15
                FT_BOOLEAN, BASE_NONE, NULL, 0x00,
14194
15
                NULL, HFILL }
14195
15
            },
14196
15
            { &hf_gsm_a_rr_egprs_mcs,
14197
15
              { "Egprs_Modulation_and_Coding_Scheme", "gsm_a.rr.egprs_mcs",
14198
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_egprs_mcs_vals), 0x00,
14199
15
                NULL, HFILL }
14200
15
            },
14201
15
            { &hf_gsm_a_rr_tlli_block_channel_coding,
14202
15
              { "TLLI_Block_Channel_Coding", "gsm_a.rr.tlli_block_cs",
14203
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_tlli_block_channel_coding_vals), 0x00,
14204
15
                NULL, HFILL }
14205
15
            },
14206
15
            { &hf_gsm_a_rr_bep_period2,
14207
15
              { "Bep_Period2", "gsm_a.rr.bep_period2",
14208
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14209
15
                NULL, HFILL }
14210
15
            },
14211
15
            { &hf_gsm_a_rr_resegment,
14212
15
              { "Resegment", "gsm_a.rr.resegment",
14213
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_resegment_vals), 0x00,
14214
15
                NULL, HFILL }
14215
15
            },
14216
15
            { &hf_gsm_a_rr_egprs_window_size,
14217
15
              { "Egprs_Windows_Size", "gsm_a.rr.egprs_win_size",
14218
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_egprs_windows_size_vals), 0x00,
14219
15
                NULL, HFILL }
14220
15
            },
14221
15
            { &hf_gsm_a_rr_gamma,
14222
15
              { "Gamma", "gsm_a.rr.gamma",
14223
15
                FT_UINT8, BASE_CUSTOM, CF_FUNC(&fmt_2db_units), 0x00,
14224
15
                NULL, HFILL }
14225
15
            },
14226
15
            { &hf_gsm_a_rr_timing_adv_index,
14227
15
              { "Timing_Advance_Index", "gsm_a.rr.timing_adv_idx",
14228
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14229
15
                NULL, HFILL }
14230
15
            },
14231
15
            { &hf_gsm_a_rr_tbf_starting_time,
14232
15
              { "TBF_Starting_Time", "gsm_a.rr.tvf_start_time",
14233
15
                FT_UINT16, BASE_DEC, NULL, 0x00,
14234
15
                NULL, HFILL }
14235
15
            },
14236
15
            { &hf_gsm_a_rr_num_of_radio_block_allocated,
14237
15
              { "Number_of_Radio_Block_Allocated", "gsm_a.rr.num_of_radio_blk_allocated",
14238
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14239
15
                NULL, HFILL }
14240
15
            },
14241
15
            { &hf_gsm_a_rr_pfi,
14242
15
              { "PFI", "gsm_a.rr.pfi",
14243
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14244
15
                NULL, HFILL }
14245
15
            },
14246
15
            { &hf_gsm_a_rr_mbms_service_id,
14247
15
              { "MBMS_Service_ID", "gsm_a.rr.mbms_service_id",
14248
15
                FT_UINT32, BASE_DEC, NULL, 0x00,
14249
15
                NULL, HFILL }
14250
15
            },
14251
15
            { &hf_gsm_a_rr_ms_id,
14252
15
              { "MS_ID", "gsm_a.rr.ms_id",
14253
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14254
15
                NULL, HFILL }
14255
15
            },
14256
15
            { &hf_gsm_a_rr_timing_adv_timeslot_num,
14257
15
              { "Timing_Advance_Timeslot_Number", "gsm_a.rr.timing_adv_ts",
14258
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14259
15
                NULL, HFILL }
14260
15
            },
14261
15
            { &hf_gsm_a_rr_gprs_cs,
14262
15
              { "Channel_Coding_Command", "gsm_a.rr.gprs_cs",
14263
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_gprs_cs_vals), 0x00,
14264
15
                NULL, HFILL }
14265
15
            },
14266
15
            { &hf_gsm_a_rr_rlc_mode,
14267
15
              { "RLC_Mode", "gsm_a.rr.rlc_mode",
14268
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rlc_mode_vals), 0x00,
14269
15
                NULL, HFILL }
14270
15
            },
14271
15
            { &hf_gsm_a_rr_ta_valid,
14272
15
              { "TA_Valid", "gsm_a.rr.ta_valid",
14273
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_ta_valid_vals), 0x00,
14274
15
                NULL, HFILL }
14275
15
            },
14276
15
            { &hf_gsm_a_rr_link_quality_meas_mode,
14277
15
              { "Link_Quality_Measure_Mode", "gsm_a.rr.link_qual_meas_mode",
14278
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_link_quality_meas_mode_vals), 0x00,
14279
15
                NULL, HFILL }
14280
15
            },
14281
15
            { &hf_gsm_a_rr_emr_bitmap_length,
14282
15
              { "BITMAP_LENGTH", "gsm_a.rr.emr_bitmap_len",
14283
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14284
15
                NULL, HFILL }
14285
15
            },
14286
15
            { &hf_gsm_a_rr_eutran_mr_n_eutran,
14287
15
              { "N_E-UTRAN", "gsm_a.rr.eutran_mr_n_eutran",
14288
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14289
15
                NULL, HFILL }
14290
15
            },
14291
15
            { &hf_gsm_a_rr_eutran_mr_freq_idx,
14292
15
              { "E-UTRAN_FREQUENCY_INDEX", "gsm_a.rr.eutran_mr_freq_idx",
14293
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14294
15
                NULL, HFILL }
14295
15
            },
14296
15
            { &hf_gsm_a_rr_eutran_mr_cell_id,
14297
15
              { "CELL IDENTITY", "gsm_a.rr.eutran_mr_cell_id",
14298
15
                FT_UINT16, BASE_DEC, NULL, 0x00,
14299
15
                NULL, HFILL }
14300
15
            },
14301
15
            { &hf_gsm_a_rr_eutran_mr_rpt_quantity,
14302
15
              { "REPORTING_QUANTITY", "gsm_a.rr.eutran_mr_rpt_quantity",
14303
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14304
15
                NULL, HFILL }
14305
15
            },
14306
15
            { &hf_gsm_a_rr_ma_channel_set,
14307
15
              { "Channel Set", "gsm_a.rr.ma_channel_set",
14308
15
                FT_UINT8, BASE_HEX, NULL, 0x00,
14309
15
                NULL, HFILL }
14310
15
            },
14311
15
            { &hf_n_range_orig_arfcn,
14312
15
              { "ORIG-ARFCN", "gsm_a.rr.orig_arfcn",
14313
15
                FT_UINT16, BASE_DEC, NULL, 0x00,
14314
15
                NULL, HFILL }
14315
15
            },
14316
15
            { &hf_gsm_a_rr_peo_bcch_change_mark,
14317
15
              { "PEO BCCH CHANGE MARK", "gsm_a.rr.peo_bcch_change_mark",
14318
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14319
15
                NULL, HFILL }
14320
15
            },
14321
15
            { &hf_gsm_a_rr_feat_ind_cs_ir,
14322
15
              { "CS IR","gsm_a.rr.feature_indicator.cs_ir",
14323
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_feat_ind_cs_ir), 0x00,
14324
15
                NULL, HFILL }
14325
15
            },
14326
15
            { &hf_gsm_a_rr_feat_ind_ps_ir,
14327
15
              { "PS IR","gsm_a.rr.feature_indicator.ps_ir",
14328
15
                FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_feat_ind_ps_ir), 0x00,
14329
15
                NULL, HFILL }
14330
15
            },
14331
            /* ---> EC <---*/
14332
15
            { &hf_gsm_a_rr_ec_qhfi,
14333
15
              { "QUARTER_HYPERFRAME_INDICATOR", "gsm_a.rr.ec_quarter_hyperframe_indicator",
14334
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14335
15
                NULL, HFILL }
14336
15
            },
14337
15
            { &hf_gsm_a_rr_ec_dl_cc,
14338
15
              { "DL_COVERAGE_CLASS", "gsm_a.rr.ec_dl_cc",
14339
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_ec_cc_vals), 0x00,
14340
15
                NULL, HFILL }
14341
15
            },
14342
15
            { &hf_gsm_a_rr_ec_ul_cc,
14343
15
              { "UL_COVERAGE_CLASS", "gsm_a.rr.ec_ul_cc",
14344
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_ec_cc_vals), 0x00,
14345
15
                NULL, HFILL }
14346
15
            },
14347
15
            { &hf_gsm_a_rr_tsc_set,
14348
15
              { "TSC Set", "gsm_a.rr.tsc_set",
14349
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14350
15
                NULL, HFILL }
14351
15
            },
14352
15
            { &hf_gsm_a_rr_ec_tsc,
14353
15
              { "TSC (EC)", "gsm_a.rr.ec_tsc",
14354
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14355
15
                NULL, HFILL }
14356
15
            },
14357
15
            { &hf_gsm_a_rr_ec_ma_number,
14358
15
              { "MA_NUMBER", "gsm_a.rr.ma_number",
14359
15
                FT_UINT8, BASE_CUSTOM, CF_FUNC(gsm_a_rr_ec_ma_number_fmt), 0x00,
14360
15
                NULL, HFILL }
14361
15
            },
14362
15
            { &hf_gsm_a_rr_ec_enhanced_access_burst,
14363
15
              { "ENHANCED_ACCESS_BURST", "gsm_a.rr.ec_enhanced_access_burst",
14364
15
                FT_BOOLEAN, BASE_NONE, TFS(&tfs_shall_be_shall_not_be_used), 0x0,
14365
15
                NULL, HFILL
14366
15
              }
14367
15
            },
14368
15
            { &hf_gsm_a_rr_ec_starting_ul_timeslot,
14369
15
              { "STARTING_UL_TIMESLOT", "gsm_a.rr.ec_starting_ul_timeslot",
14370
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14371
15
                NULL, HFILL
14372
15
              }
14373
15
            },
14374
15
            { &hf_gsm_a_rr_ec_starting_dl_timeslot,
14375
15
              { "STARTING_DL_TIMESLOT", "gsm_a.rr.ec_starting_dl_timeslot",
14376
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14377
15
                NULL, HFILL
14378
15
              }
14379
15
            },
14380
15
            { &hf_gsm_a_rr_ec_starting_dl_timeslot_offset,
14381
15
              { "STARTING_DL_TIMESLOT_OFFSET", "gsm_a.rr.ec_starting_dl_timeslot_offset",
14382
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14383
15
                NULL, HFILL
14384
15
              }
14385
15
            },
14386
15
            { &hf_gsm_a_rr_ec_starting_ul_timeslot_offset,
14387
15
              { "STARTING_UL_TIMESLOT_OFFSET", "gsm_a.rr.ec_starting_ul_timeslot_offset",
14388
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14389
15
                NULL, HFILL
14390
15
              }
14391
15
            },
14392
15
            { &hf_gsm_a_rr_ec_overlaid_cdma_code,
14393
15
              { "OVERLAID_CDMA_CODE", "gsm_a.rr.ec_overlaid_cdma_code",
14394
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14395
15
                NULL, HFILL
14396
15
              }
14397
15
            },
14398
15
            { &hf_gsm_a_rr_ec_mcs_exist,
14399
15
              { "MCS Exist (EC)", "gsm_a.rr.ec_mcs_exist",
14400
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14401
15
                NULL, HFILL
14402
15
              }
14403
15
            },
14404
15
            { &hf_gsm_a_rr_ec_start_first_ul_data_block,
14405
15
              { "START_FIRST_UL_DATA_BLOCK", "gsm_a.rr.ec_start_first_ul_data_block",
14406
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14407
15
                NULL, HFILL
14408
15
              }
14409
15
            },
14410
15
            { &hf_gsm_a_rr_ec_fua_gap_list,
14411
15
              { "FUA_GAP List", "gsm_a.rr.ec_fua_gap_list",
14412
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14413
15
                NULL, HFILL
14414
15
              }
14415
15
            },
14416
15
            { &hf_gsm_a_rr_ec_start_fn_next_data_block_exist,
14417
15
              { "START_FN_NEXT_DATA_BLOCK Present", "gsm_a.rr.ec_start_fn_next_data_block_exist",
14418
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14419
15
                NULL, HFILL
14420
15
              }
14421
15
            },
14422
15
            { &hf_gsm_a_rr_ec_start_fn_next_data_block,
14423
15
              { "START_FN_NEXT_DATA_BLOCK", "gsm_a.rr.ec_start_fn_next_data_block",
14424
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14425
15
                NULL, HFILL
14426
15
              }
14427
15
            },
14428
15
            { &hf_gsm_a_dtap_msg_rr_ec_ccch_type,
14429
15
              { "DTAP Radio Resources Management Message Type (EC)", "gsm_a.dtap.msg_rr_ec_ccch_type",
14430
15
                FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_msg_rr_ec_ccch_strings), 0x0,
14431
15
                NULL, HFILL }
14432
15
            },
14433
14434
15
            { &hf_gsm_a_rr_ec_used_dl_cc,
14435
15
              { "USED_DL_COVERAGE_CLASS", "gsm_a.rr.ec_used_dl_cc",
14436
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_ec_cc_vals), 0x0,
14437
15
                NULL, HFILL
14438
15
              }
14439
15
            },
14440
15
            { &hf_gsm_a_rr_ec_page_extension_exist,
14441
15
              { "EC_PAGE_EXTENSION Exist", "gsm_a.rr.ec_page_extension_exist",
14442
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14443
15
                NULL, HFILL
14444
15
              }
14445
15
            },
14446
15
            { &hf_gsm_a_rr_ec_page_extension,
14447
15
              { "EC_PAGE_EXTENSION", "gsm_a.rr.ec_page_extension",
14448
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14449
15
                NULL, HFILL
14450
15
              }
14451
15
            },
14452
15
            { &hf_gsm_a_rr_ec_last_tdma_frame,
14453
15
              { "Last TDMA Frame", "gsm_a.rr.ec_last_tdma_frame",
14454
15
                FT_UINT16, BASE_DEC, NULL, 0x0,
14455
15
                NULL, HFILL
14456
15
              }
14457
15
            },
14458
15
            { &hf_gsm_a_rr_ec_echoed_random_bits,
14459
15
              { "Echoed Random Bits", "gsm_a.rr.ec_echoed_random_bits",
14460
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14461
15
                NULL, HFILL
14462
15
              }
14463
15
            },
14464
15
            { &hf_gsm_a_rr_ec_wait_timer,
14465
15
              { "EC-Wait Timer", "gsm_a.rr.ec_wait_timer",
14466
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14467
15
                NULL, HFILL
14468
15
              }
14469
15
            },
14470
15
            { &hf_gsm_a_rr_ec_req_ref_2_present,
14471
15
              { "EC Request Reference 2 Exist", "gsm_a.rr.ec_request_reference_2_exist",
14472
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14473
15
                NULL, HFILL
14474
15
              }
14475
15
            },
14476
15
            { &hf_gsm_a_rr_ec_req_ref_3_present,
14477
15
              { "EC Request Reference 3 Exist", "gsm_a.rr.ec_request_reference_3_exist",
14478
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14479
15
                NULL, HFILL
14480
15
              }
14481
15
            },
14482
15
            { &hf_gsm_a_rr_ec_ptmsi_imsi_select,
14483
15
              { "Mobile Identity", "gsm_a.rr.ec_ptmsi_imsi_select",
14484
15
                FT_BOOLEAN, BASE_NONE, TFS(&tfs_ec_ptmsi_imsi), 0x0,
14485
15
                NULL, HFILL
14486
15
              }
14487
15
            },
14488
15
            { &hf_gsm_a_rr_ec_imsi_digits,
14489
15
              { "Number of IMSI Digits", "gsm_a.rr.ec_imsi_digits",
14490
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14491
15
                NULL, HFILL
14492
15
              }
14493
15
            },
14494
15
            { &hf_gsm_a_rr_ec_imsi,
14495
15
              { "IMSI", "gsm_a.rr.ec_imsi",
14496
15
                FT_STRING, BASE_NONE, NULL, 0x0,
14497
15
                NULL, HFILL
14498
15
              }
14499
15
            },
14500
15
            { &hf_gsm_a_rr_ec_mobile_identity_2_exist,
14501
15
              { "EC Mobile Identity 2 Exist", "gsm_a.rr.ec_mobile_identity_2_exist",
14502
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14503
15
                NULL, HFILL
14504
15
              }
14505
15
            },
14506
15
            { &hf_gsm_a_rr_ec_cc1_timeslot_multiplier,
14507
15
              { "EC CC1 Timeslot Multiplier", "gsm_a.rr.ec_cc1_ts_multiplier",
14508
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14509
15
                NULL, HFILL
14510
15
              }
14511
15
            },
14512
15
            { &hf_gsm_a_rr_ec_alpha_enable,
14513
15
              { "EC ALPHA Enable", "gsm_a.rr.ec_alpha_enable",
14514
15
                FT_UINT8, BASE_DEC, NULL, 0x0,
14515
15
                NULL, HFILL
14516
15
              }
14517
15
            },
14518
15
            { &hf_gsm_a_rr_rcc,
14519
15
              { "RCC", "gsm_a.rr_rcc",
14520
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14521
15
                NULL, HFILL
14522
15
              }
14523
15
            },
14524
15
            { &hf_gsm_a_rr_implicit_reject_cs,
14525
15
                { "Implicit Reject CS", "gsm_a.rr.implicit_reject_cs",
14526
15
                  FT_UINT8, BASE_DEC, VALS(gsm_a_rr_implicit_reject_cs_vals), 0x00,
14527
15
                  NULL, HFILL }
14528
15
              },
14529
15
            { &hf_gsm_a_rr_implicit_reject_ps,
14530
15
                { "Implicit Reject PS", "gsm_a.rr.implicit_reject_ps",
14531
15
                  FT_UINT8, BASE_DEC, VALS(gsm_a_rr_implicit_reject_ps_vals), 0x00,
14532
15
                  NULL, HFILL }
14533
15
              },
14534
15
            { &hf_gsm_a_rr_peo_dsc,
14535
15
              { "PEO DSC", "gsm_a.rr.peo_dsc",
14536
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_peo_dsc_vals), 0x00,
14537
15
                NULL, HFILL }
14538
15
            },
14539
15
            { &hf_gsm_a_rr_c1_delta_min,
14540
15
              { "C1 DELTA MIN value", "gsm_a.rr.c1_delta_min",
14541
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_c1_delta_min_vals), 0x00,
14542
15
                NULL, HFILL }
14543
15
            },
14544
15
            { &hf_gsm_a_rr_c1_delta_max,
14545
15
              { "C1 DELTA MAX value", "gsm_a.rr.c1_delta_max",
14546
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_c1_delta_max_vals), 0x00,
14547
15
                NULL, HFILL }
14548
15
            },
14549
15
            { &hf_gsm_a_rr_reported_timeslots,
14550
15
              { "REPORTED TIMESLOTS", "gsm_a.rr.reported_timeslots",
14551
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14552
15
                NULL, HFILL
14553
15
              }
14554
15
            },
14555
15
            { &hf_gsm_a_rr_tsh,
14556
15
              { "TSH", "gsm_a.rr.tsh",
14557
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14558
15
                NULL, HFILL
14559
15
              }
14560
15
            },
14561
15
            { &hf_gsm_a_rr_rtti_usf_mode,
14562
15
              { "RTTI USF Mode", "gsm_a.rr.rtti_usf_mode",
14563
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_rtti_usf_mode_vals), 0x00,
14564
15
                NULL, HFILL
14565
15
              }
14566
15
            },
14567
15
            { &hf_gsm_a_rr_pdch_pair_indic,
14568
15
              { "PDCH PAIR INDICATION", "gsm_a.rr.pdch_pair_indic",
14569
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_pdch_pair_indic_vals), 0x00,
14570
15
                NULL, HFILL
14571
15
              }
14572
15
            },
14573
15
            { &hf_gsm_a_rr_additional_usf,
14574
15
              { "Additional USF", "gsm_a.rr.additional_usf",
14575
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14576
15
                NULL, HFILL
14577
15
              }
14578
15
            },
14579
15
            { &hf_gsm_a_rr_usf_2,
14580
15
              { "USF2", "gsm_a.rr.usf_2",
14581
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14582
15
                NULL, HFILL
14583
15
              }
14584
15
            },
14585
15
            { &hf_gsm_a_rr_additional_usf_2,
14586
15
              { "Additional USF2", "gsm_a.rr.additional_usf_2",
14587
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14588
15
                NULL, HFILL
14589
15
              }
14590
15
            },
14591
15
            { &hf_gsm_a_rr_npm_transfer_time,
14592
15
              { "NPM Transfer Time", "gsm_a.rr.npm_transfer_time",
14593
15
                FT_UINT8, BASE_DEC, NULL, 0x00,
14594
15
                NULL, HFILL
14595
15
              }
14596
15
            },
14597
15
            { &hf_gsm_a_rr_event_based_fanr,
14598
15
              { "EVENT BASED FANR", "gsm_a.rr.event_base_fanr",
14599
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_event_based_fanr_vals), 0x00,
14600
15
                NULL, HFILL
14601
15
              }
14602
15
            },
14603
15
            { &hf_gsm_a_rr_dl_egprs_level,
14604
15
              { "Downlink EGPRS Level", "gsm_a.rr.dl_egprs_level",
14605
15
                FT_UINT8, BASE_DEC, VALS(gsm_a_rr_egprs_level_vals), 0x00,
14606
15
                NULL, HFILL
14607
15
              }
14608
15
            },
14609
14610
            /* Generated from convert_proto_tree_add_text.pl */
14611
15
            { &hf_gsm_a_rr_padding, { "Padding Bits", "gsm_a.rr.padding_bits", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
14612
15
            { &hf_gsm_a_rr_nr_of_fdd_cells, { "Nr of FDD Cells", "gsm_a.rr.nr_of_fdd_cells", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14613
15
            { &hf_gsm_a_rr_scrambling_code, { "Scrambling Code", "gsm_a.rr.scrambling_code", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14614
15
            { &hf_gsm_a_rr_diversity, { "Diversity", "gsm_a.rr.diversity", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14615
15
            { &hf_gsm_a_rr_nr_of_tdd_cells, { "Nr of TDD Cells", "gsm_a.rr.nr_of_tdd_cells", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14616
15
            { &hf_gsm_a_rr_cell_parameter, { "Cell Parameter", "gsm_a.rr.cell_parameter", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14617
15
            { &hf_gsm_a_rr_sync_case_tstd, { "Sync Case TSTD", "gsm_a.rr.sync_case_tstd", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14618
15
            { &hf_gsm_a_rr_diversity_tdd, { "Diversity TDD", "gsm_a.rr.diversity_tdd", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14619
15
            { &hf_gsm_a_rr_packet_channel_type, { "Channel Type", "gsm_a.rr.packet_channel_type", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14620
15
            { &hf_gsm_a_rr_timeslot, { "Timeslot", "gsm_a.rr.timeslot", FT_UINT8, BASE_DEC, NULL, 0x07, NULL, HFILL }},
14621
15
            { &hf_gsm_a_rr_training_sequence, { "Training Sequence", "gsm_a.rr.training_sequence", FT_UINT8, BASE_DEC, NULL, 0xE0, NULL, HFILL }},
14622
15
            { &hf_gsm_a_rr_hopping_channel, { "Hopping Channel", "gsm_a.rr.hopping_channel", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10, NULL, HFILL }},
14623
15
            { &hf_gsm_a_rr_hopping_channel_maio, { "Hopping channel MAIO", "gsm_a.rr.hopping_channel_maio", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14624
15
            { &hf_gsm_a_rr_hopping_channel_ma_num_ind, { "Hopping channel MA_NUMBER_IND", "gsm_a.rr.hopping_channel_ma_num_ind", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14625
15
            { &hf_gsm_a_rr_hopping_channel_change_mark_1, { "CHANGE_MARK_1", "gsm_a.rr.hopping_channel_change_mark_1", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14626
15
            { &hf_gsm_a_rr_extension_length, { "Extension Length", "gsm_a.rr.extension_length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14627
15
            { &hf_gsm_a_rr_bitmap_length, { "Bitmap length", "gsm_a.rr.bitmap_length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14628
15
            { &hf_gsm_a_rr_bitmap, { "Bitmap", "gsm_a.rr.bitmap", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14629
15
            { &hf_gsm_a_rr_mobile_country_code, { "Mobile Country Code (MCC)", "gsm_a.rr.mobile_country_code", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
14630
15
            { &hf_gsm_a_rr_mobile_network_code, { "Mobile Network Code (MNC)", "gsm_a.rr.mobile_network_code", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
14631
15
            { &hf_gsm_a_rr_len_indicator_ms_id, { "Length Indicator of MS ID", "gsm_a.rr.len_indicator_ms_id", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14632
15
            { &hf_gsm_a_rr_maio, { "MAIO", "gsm_a.rr.maio", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14633
15
            { &hf_gsm_a_rr_ba_index_start_rtd, { "BA Index Start RTD", "gsm_a.rr.ba_index_start_rtd", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14634
15
            { &hf_gsm_a_rr_ba_index_start_bsic, { "BA Index Start BSIC", "gsm_a.rr.ba_index_start_bsic", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14635
15
            { &hf_gsm_a_rr_number_remaining_bsic, { "Number Remaining BSIC", "gsm_a.rr.number_remaining_bsic", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14636
15
            { &hf_gsm_a_rr_number_cells, { "Number Cells", "gsm_a.rr.number_cells", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14637
15
            { &hf_gsm_a_rr_pcid_pattern, { "PCID_Pattern", "gsm_a.rr.pcid_pattern", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14638
15
            { &hf_gsm_a_rr_psc_pattern, { "PSC_Pattern", "gsm_a.rr.psc_pattern", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14639
15
            { &hf_gsm_a_rr_where, { "Where", "gsm_a.rr.where", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14640
15
            { &hf_gsm_a_rr_mcc, { "MCC", "gsm_a.rr.mcc", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14641
15
            { &hf_gsm_a_rr_mnc, { "MNC", "gsm_a.rr.mnc", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14642
15
            { &hf_gsm_a_rr_short_lsa_id, { "Short LSA ID", "gsm_a.rr.short_lsa_id", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14643
15
            { &hf_gsm_a_rr_lsa_id, { "LSA ID", "gsm_a.rr.lsa_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14644
15
            { &hf_gsm_a_rr_rxlev_carrier, { "RXLEV carrier", "gsm_a.rr.rxlev_carrier", FT_UINT8, BASE_DEC|BASE_EXT_STRING, &gsm_a_rr_rxlev_vals_ext, 0x0, NULL, HFILL }},
14645
15
            { &hf_gsm_a_rr_ciphering_key_seq_num, { "Ciphering Key Sequence Number", "gsm_a.rr.ciphering_key_seq_num", FT_UINT8, BASE_DEC, NULL, 0x07, NULL, HFILL }},
14646
15
            { &hf_gsm_a_rr_neighbour_cell_list_index, { "Neighbour Cell List index", "gsm_a.rr.neighbour_cell_list_index", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14647
15
            { &hf_gsm_a_rr_message_elements, { "Message Elements", "gsm_a.rr.message_elements", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
14648
15
            { &hf_gsm_a_rr_spare, { "Spare", "gsm_a.rr.spare", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
14649
15
            { &hf_gsm_a_rr_single_channel_arfcn, { "Single channel ARFCN", "gsm_a.rr.single_channel_arfcn", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14650
15
            { &hf_gsm_a_rr_rtd_index, { "RTD index", "gsm_a.rr.rtd_index", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14651
15
            { &hf_gsm_a_rr_arfcn_list, { "List of ARFCNs", "gsm_a.rr.arfcn_list", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
14652
15
            { &hf_gsm_a_rr_da_list, { "List of DA", "gsm_a.rr.da_list", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
14653
15
            { &hf_gsm_a_rr_ua_list, { "List of UA", "gsm_a.rr.ua_list", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
14654
15
            { &hf_gsm_a_rr_ma_bitmap, { "MA Bitmap", "gsm_a.rr.ma_bitmap", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
14655
15
            { &hf_gsm_a_rr_inc_arfcn_bitmap, { "Bitmap of increasing ARFCNs included in the Mobile Allocation", "gsm_a.rr.inc_arfcn_bitmap", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
14656
15
            { &hf_gsm_a_rr_ccn_supported, { "CCN Supported", "gsm_a.rr.ccn_supported", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
14657
15
            { &hf_gsm_a_rr_pbcch_use_bcch, { "PBCCH shall use the BCCH carrier", "gsm_a.rr.pbcch_use_bcch", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
14658
15
            { &hf_gsm_a_rr_ia_rest_oct_reserved, { "Reserved for future use (however the value 7C for the first octet shall not be used)", "gsm_a.rr.ia_rest_oct_reserved", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
14659
15
            { &hf_gsm_a_rr_tch_facch_sacchm, { "TCH/F + FACCH/F and SACCH/M", "gsm_a.rr.tch_facch_sacchm", FT_UINT8, BASE_DEC, NULL, 0xF8, NULL, HFILL }},
14660
15
            { &hf_gsm_a_rr_tch_facch_sacchf, { "TCH/F + FACCH/F and SACCH/F", "gsm_a.rr.tch_facch_sacchf", FT_UINT8, BASE_DEC, NULL, 0xF8, NULL, HFILL }},
14661
15
            { &hf_gsm_a_rr_tch_facch_sacchm_bi, { "TCH/F + FACCH/F and SACCH/M + bi- and unidirectional channels", "gsm_a.rr.tch_facch_sacchm_bi", FT_UINT8, BASE_DEC, NULL, 0xF8, NULL, HFILL }},
14662
15
            { &hf_gsm_a_rr_tch_acch, { "TCH/H + ACCHs", "gsm_a.rr.tch_acch", FT_UINT8, BASE_DEC, NULL, 0xF8, NULL, HFILL }},
14663
15
            { &hf_gsm_a_rr_sdcch4_sdcchc4_cbch, { "SDCCH/4 + SACCH/C4 or CBCH (SDCCH/4)", "gsm_a.rr.sdcch4_sdcchc4_cbch", FT_UINT8, BASE_DEC, NULL, 0xF8, NULL, HFILL }},
14664
15
            { &hf_gsm_a_rr_sdcch8_sdcchc8_cbch, { "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8)", "gsm_a.rr.sdcch8_sdcchc8_cbch", FT_UINT8, BASE_DEC, NULL, 0xF8, NULL, HFILL }},
14665
15
            { &hf_gsm_a_rr_tch_facchf_sacchm_bi, { "TCH/F + FACCH/F and SACCH/M + bidirectional channels at timeslot", "gsm_a.rr.tch_facchf_sacchm_bi", FT_UINT8, BASE_DEC, NULL, 0xF8, NULL, HFILL }},
14666
15
            { &hf_gsm_a_rr_tch_facchf_sacchm_uni, { "TCH/F + FACCH/F and SACCH/M + unidirectional channels at timeslot", "gsm_a.rr.tch_facchf_sacchm_uni", FT_UINT8, BASE_DEC, NULL, 0xF8, NULL, HFILL }},
14667
15
            { &hf_gsm_a_rr_unknown_channel_info, { "Unknown channel information", "gsm_a.rr.unknown_channel_info", FT_UINT8, BASE_DEC, NULL, 0xF8, NULL, HFILL }},
14668
15
            { &hf_gsm_a_rr_tchf_acchs, { "TCH/F + ACCHs", "gsm_a.rr.tchf_acchs", FT_UINT8, BASE_DEC, NULL, 0xF8, NULL, HFILL }},
14669
15
            { &hf_gsm_a_rr_subchannel, { "Subchannel", "gsm_a.rr.tch_facch_sacchm", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
14670
15
            { &hf_gsm_a_rr_w_elements, { "W elements", "gsm_a.rr.w_elements", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
14671
15
            { &hf_gsm_a_rr_field_bit_long, { "Field is X bits long", "gsm_a.rr.field_bit_long", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
14672
14673
            /* gsm_rr_csn_flag() fields */
14674
15
            { &hf_gsm_a_rr_fdd_repeat_freq, { "Repeating FDD Frequency", "gsm_a.rr.fdd_repeat_freq", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14675
15
            { &hf_gsm_a_rr_tdd_repeat_freq, { "Repeating TDD Frequency", "gsm_a.rr.tdd_repeat_freq", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14676
15
            { &hf_gsm_a_rr_repeat_range_limit, { "Repeating Range Limits", "gsm_a.rr.repeat_range_limit", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14677
15
            { &hf_gsm_a_rr_repeat_ba_frequency, { "Repeating BA Frequency", "gsm_a.rr.repeat_ba_frequency", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14678
15
            { &hf_gsm_a_rr_band_indicator, { "Band Indicator", "gsm_a.rr.band_indicator", FT_BOOLEAN, BASE_NONE, TFS(&tfs_1900_1800), 0x00, NULL, HFILL }},
14679
15
            { &hf_gsm_a_rr_repeat_gsm_desc, { "Repeating GSM Description struct", "gsm_a.rr.repeat_gsm_desc", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14680
15
            { &hf_gsm_a_rr_repeat_utran_fdd_desc, { "Repeating UTRAN FDD Description struct", "gsm_a.rr.repeat_utran_fdd_desc", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14681
15
            { &hf_gsm_a_rr_bandwidth_fdd_present, { "Bandwidth FDD", "gsm_a.rr.bandwidth_fdd_present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14682
15
            { &hf_gsm_a_rr_fdd_cell_info_present, { "FDD Cell Information", "gsm_a.rr.fdd_cell_info_present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14683
15
            { &hf_gsm_a_rr_fdd_indic0, { "FDD Indic0", "gsm_a.rr.fdd_indic0", FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }},
14684
15
            { &hf_gsm_a_rr_repeat_utran_tdd_desc, { "Repeating UTRAN TDD Description struct", "gsm_a.rr.repeat_utran_tdd_desc", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14685
15
            { &hf_gsm_a_rr_bandwidth_tdd_present, { "Bandwidth TDD", "gsm_a.rr.bandwidth_tdd_present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14686
15
            { &hf_gsm_a_rr_tdd_cell_info_present, { "TDD Cell Information", "gsm_a.rr.tdd_cell_info_present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14687
15
            { &hf_gsm_a_rr_tdd_indic0, { "TDD Indic0", "gsm_a.rr.tdd_indic0", FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }},
14688
15
            { &hf_gsm_a_rr_pfi_present, { "PFI", "gsm_a.rr.pfi_present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported_by_cell), 0x00, NULL, HFILL }},
14689
15
            { &hf_gsm_a_rr_msms_procedures, { "MBMS procedures", "gsm_a.rr.msms_procedures", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14690
15
            { &hf_gsm_a_rr_repeat_dynamic_arfcn_mapping, { "Repeating Dynamic ARFCN Mapping", "gsm_a.rr.repeat_dynamic_arfcn_mapping", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14691
15
            { &hf_gsm_a_rr_pan_bits_present, { "PAN bits", "gsm_a.rr.pan_bits_present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14692
15
            { &hf_gsm_a_rr_optional_extensions_present, { "Optional Extensions", "gsm_a.rr.optional_extensions_present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14693
15
            { &hf_gsm_a_rr_egprs_supported, { "EGPRS", "gsm_a.rr.egprs_supported", FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported_by_cell), 0x00, NULL, HFILL }},
14694
15
            { &hf_gsm_a_rr_access_tech_req, { "Access Technologies Request", "gsm_a.rr.access_tech_req", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14695
15
            { &hf_gsm_a_rr_tfi_multiblock, { "TFI/Multiblock", "gsm_a.rr.tfi_multiblock", FT_BOOLEAN, BASE_NONE, TFS(&tfs_tfi_multi_block_allocation_present), 0x00, NULL, HFILL }},
14696
15
            { &hf_gsm_a_rr_tfi_allocation_type, { "Allocation Type", "gsm_a.rr.tfi_allocation_type", FT_BOOLEAN, BASE_NONE, TFS(&tfs_fixed_dynamic_allocation), 0x00, NULL, HFILL }},
14697
15
            { &hf_gsm_a_rr_p0_present, { "P0", "gsm_a.rr.p0_present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14698
15
            { &hf_gsm_a_rr_bep_period2_present, { "BEP_PERIOD2", "gsm_a.rr.bep_period2.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14699
15
            { &hf_gsm_a_rr_alpha_present, { "Alpha", "gsm_a.rr.alpha_present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14700
15
            { &hf_gsm_a_rr_timing_adv_index_present, { "Timing Advance Index", "gsm_a.rr.timing_adv_index.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14701
15
            { &hf_gsm_a_rr_tbf_starting_time_present, { "TBF Starting Time", "gsm_a.rr.tbf_starting_time.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14702
15
            { &hf_gsm_a_rr_bts_power_control_mode, { "BTS Power Control Mode", "gsm_a.rr.bts_power_control_mode", FT_BOOLEAN, BASE_NONE, TFS(&tfs_mode_b_mode_a), 0x00, NULL, HFILL }},
14703
15
            { &hf_gsm_a_rr_mcc_mnc_parameters, { "MCC and MNC Parameters", "gsm_a.rr.mcc_mnc_parameters", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14704
15
            { &hf_gsm_a_rr_timing_adv_present, { "Timing Advance Value", "gsm_a.rr.timing_adv.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14705
15
            { &hf_gsm_a_rr_timing_advance_index_timeslot, { "Timing Advance Index and Timeslot", "gsm_a.rr.timing_advance_index_timeslot", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14706
15
            { &hf_gsm_a_rr_packet_downlink_assignment, { "Packet Downlink Assignment", "gsm_a.rr.packet_downlink_assignment", FT_BOOLEAN, BASE_NONE, TFS(&tfs_downlink_assignment), 0x00, NULL, HFILL }},
14707
15
            { &hf_gsm_a_rr_mbms_assignment, { "MBMS Assignment", "gsm_a.rr.mbms_assignment", FT_BOOLEAN, BASE_NONE, TFS(&tfs_non_distribution_distribution), 0x00, NULL, HFILL }},
14708
15
            { &hf_gsm_a_rr_ms_parameters, { "MS Parameters", "gsm_a.rr.ms_parameters", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14709
15
            { &hf_gsm_a_rr_gamma_present, { "Gamma", "gsm_a.rr.gamma.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14710
15
            { &hf_gsm_a_rr_packet_uplink_assignment, { "Packet Uplink Assignment", "gsm_a.rr.packet_uplink_assignment", FT_BOOLEAN, BASE_NONE, TFS(&tfs_normal_single_block), 0x00, NULL, HFILL }},
14711
15
            { &hf_gsm_a_rr_allocation_type, { "Allocation Type", "gsm_a.rr.allocation_type", FT_BOOLEAN, BASE_NONE, TFS(&tfs_fixed_dynamic_allocation), 0x00, NULL, HFILL }},
14712
15
            { &hf_gsm_a_rr_timing_advance_index, { "Timing Advance Index", "gsm_a.rr.timing_advance_index", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14713
15
            { &hf_gsm_a_rr_early_r97_version_reserved_bit, { "Bit reserved for earlier version of protocol", "gsm_a.rr.early_r97_version_reserved_bit", FT_BOOLEAN, BASE_NONE, TFS(&tfs_early_r97_version_later_than_r97_version), 0x00, NULL, HFILL }},
14714
15
            { &hf_gsm_a_rr_later_r97_version_reserved_bit, { "Bit reserved for earlier version of protocol", "gsm_a.rr.later_r97_version_reserved_bit", FT_BOOLEAN, BASE_NONE, TFS(&tfs_later_than_r97_version_early_r97_version), 0x00, NULL, HFILL }},
14715
15
            { &hf_gsm_a_rr_earlier_version_reserved_bit, { "Bit reserved for earlier version of protocol", "gsm_a.rr.earlier_version_reserved_bit", FT_BOOLEAN, BASE_NONE, TFS(&tfs_earlier_version_current_version), 0x00, NULL, HFILL }},
14716
15
            { &hf_gsm_a_rr_extended_ra_present, { "Extended RA", "gsm_a.rr.extended_ra.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14717
15
            { &hf_gsm_a_rr_tfi_assignment_present, { "TFI Assignment (etc)", "gsm_a.rr.tfi_assignment.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14718
15
            { &hf_gsm_a_rr_pr_mode_present, { "BTS Power Control Mode", "gsm_a.rr.pr_mode.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_fixed_dynamic_allocation), 0x00, NULL, HFILL }},
14719
15
            { &hf_gsm_a_rr_downlink_uplink_discriminator_bit, { "Discriminator bit", "gsm_a.rr.downlink_uplink_discriminator_bit", FT_BOOLEAN, BASE_NONE, TFS(&tfs_downlink_uplink_discriminator_bit), 0x00, NULL, HFILL }},
14720
15
            { &hf_gsm_a_rr_downlink_uplink, { "Downlink/Uplink", "gsm_a.rr.downlink_uplink", FT_BOOLEAN, BASE_NONE, TFS(&tfs_downlink_uplink_assign), 0x00, NULL, HFILL }},
14721
15
            { &hf_gsm_a_rr_second_packet_assignment_discriminator_bit, { "Discriminator Bit", "gsm_a.rr.second_packet_assignment_discriminator_bit", FT_BOOLEAN, BASE_NONE, TFS(&tfs_second_part_packet_assignment), 0x00, NULL, HFILL }},
14722
15
            { &hf_gsm_a_rr_packet_discriminator_bit, { "Discriminator Bit", "gsm_a.rr.packet_discriminator_bit", FT_BOOLEAN, BASE_NONE, TFS(&tfs_packet_downlink_uplink_assignment), 0x00, NULL, HFILL }},
14723
15
            { &hf_gsm_a_rr_compressed_inter_rat_handover_info, { "A compressed version of the INTER RAT HANDOVER INFO message", "gsm_a.rr.compressed_inter_rat_handover_info", FT_BOOLEAN, BASE_NONE, TFS(&tfs_shall_be_shall_not_be_used), 0x00, NULL, HFILL }},
14724
15
            { &hf_gsm_a_rr_group_channel_description, { "Group Channel Description", "gsm_a.rr.group_channel_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14725
15
            { &hf_gsm_a_rr_hopping_case, { "Hopping case", "gsm_a.rr.hopping_case", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14726
15
            { &hf_gsm_a_rr_hopping_flag, { "Hopping flag", "gsm_a.rr.hopping_flag", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14727
15
            { &hf_gsm_a_rr_utran_fdd_description, { "UTRAN FDD Description", "gsm_a.rr.utran_fdd_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14728
15
            { &hf_gsm_a_rr_utran_fdd_description_earlier_version_bit_reserved1, { "Bit reserved for earlier version of protocol", "gsm_a.rr.utran_fdd_description_earlier_version_bit_reserved1", FT_BOOLEAN, BASE_NONE, TFS(&tfs_earlier_version_current_version), 0x00, NULL, HFILL }},
14729
15
            { &hf_gsm_a_rr_utran_fdd_description_earlier_version_bit_reserved2, { "Bit reserved for earlier version of protocol", "gsm_a.rr.utran_fdd_description_earlier_version_bit_reserved2", FT_BOOLEAN, BASE_NONE, TFS(&tfs_current_version_earlier_version), 0x00, NULL, HFILL }},
14730
15
            { &hf_gsm_a_rr_utran_tdd_description, { "UTRAN TDD Description", "gsm_a.rr.utran_tdd_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14731
15
            { &hf_gsm_a_rr_utran_tdd_description_earlier_version_bit_reserved1, { "Bit reserved for earlier version of protocol", "gsm_a.rr.utran_tdd_description_earlier_version_bit_reserved1", FT_BOOLEAN, BASE_NONE, TFS(&tfs_earlier_version_current_version), 0x00, NULL, HFILL }},
14732
15
            { &hf_gsm_a_rr_utran_tdd_description_earlier_version_bit_reserved2, { "Bit reserved for earlier version of protocol", "gsm_a.rr.utran_tdd_description_earlier_version_bit_reserved2", FT_BOOLEAN, BASE_NONE, TFS(&tfs_current_version_earlier_version), 0x00, NULL, HFILL }},
14733
15
            { &hf_gsm_a_rr_3g_measurement_parameters_description, { "3G Measurement Parameters Description", "gsm_a.rr.3g_measurement_parameters_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14734
15
            { &hf_gsm_a_rr_fdd_parameters, { "FDD Parameters", "gsm_a.rr.fdd_parameters", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14735
15
            { &hf_gsm_a_rr_tdd_parameters, { "TDD Parameters", "gsm_a.rr.tdd_parameters", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14736
15
            { &hf_gsm_a_rr_3g_additional_measurement_parameters_description, { "3G Additional Measurement Parameters Description", "gsm_a.rr.3g_additional_measurement_parameters_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14737
15
            { &hf_gsm_a_rr_repeated_umts_fdd_neighbour_cells, { "Repeated UMTS FDD Neighbour Cells", "gsm_a.rr.repeated_umts_fdd_neighbour_cells", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14738
15
            { &hf_gsm_a_rr_repeated_umts_fdd_neighbour_cells_earlier_version_bit_reserved, { "Bit reserved for earlier version of protocol", "gsm_a.rr.repeated_umts_fdd_neighbour_cells_earlier_version_bit_reserved", FT_BOOLEAN, BASE_NONE, TFS(&tfs_earlier_version_current_version), 0x00, NULL, HFILL }},
14739
15
            { &hf_gsm_a_rr_fdd_cell_info_param_value0, { "The FDD_CELL_INFORMATION parameter value '0000000000'", "gsm_a.rr.fdd_cell_info_param_value0", FT_BOOLEAN, BASE_NONE, TFS(&tfs_member_not_member_of_set), 0x00, NULL, HFILL }},
14740
15
            { &hf_gsm_a_rr_repeated_umts_tdd_neighbour_cells, { "Repeated UMTS TDD Neighbour Cells", "gsm_a.rr.repeated_umts_tdd_neighbour_cells", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14741
15
            { &hf_gsm_a_rr_repeated_umts_tdd_neighbour_cells_earlier_version_bit_reserved, { "Bit reserved for earlier version of protocol", "gsm_a.rr.repeated_umts_tdd_neighbour_cells_earlier_version_bit_reserved", FT_BOOLEAN, BASE_NONE, TFS(&tfs_earlier_version_current_version), 0x00, NULL, HFILL }},
14742
15
            { &hf_gsm_a_rr_tdd_cell_info_param_value0, { "the TDD_CELL_INFORMATION parameter value '0000000000'", "gsm_a.rr.tdd_cell_info_param_value0", FT_BOOLEAN, BASE_NONE, TFS(&tfs_member_not_member_of_set), 0x00, NULL, HFILL }},
14743
15
            { &hf_gsm_a_rr_rtd6, { "RTD6", "gsm_a.rr.rtd6", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14744
15
            { &hf_gsm_a_rr_ba_index_start_rtd_present, { "BA Index Start RTD", "gsm_a.rr.ba_index_start_rtd.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14745
15
            { &hf_gsm_a_rr_rtd, { "RTD", "gsm_a.rr.rtd", FT_BOOLEAN, BASE_NONE, TFS(&tfs_not_present_present), 0x00, NULL, HFILL }},
14746
15
            { &hf_gsm_a_rr_additional_rtd, { "additional RTD", "gsm_a.rr.additional_rtd", FT_BOOLEAN, BASE_NONE, TFS(&tfs_not_present_present), 0x00, NULL, HFILL }},
14747
15
            { &hf_gsm_a_rr_additional_rtd_struct, { "additional RTD struct", "gsm_a.rr.additional_rtd_struct", FT_BOOLEAN, BASE_NONE, TFS(&tfs_not_present_present), 0x00, NULL, HFILL }},
14748
15
            { &hf_gsm_a_rr_rtd12, { "RTD12", "gsm_a.rr.rtd12", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14749
15
            { &hf_gsm_a_rr_repeated_rtd, { "Repeated RTD", "gsm_a.rr.repeated_rtd", FT_BOOLEAN, BASE_NONE, TFS(&tfs_not_present_present), 0x00, NULL, HFILL }},
14750
15
            { &hf_gsm_a_rr_repeated_rtd_frequency, { "Repeated RTD Frequency", "gsm_a.rr.repeated_rtd_frequency", FT_BOOLEAN, BASE_NONE, TFS(&tfs_not_present_present), 0x00, NULL, HFILL }},
14751
15
            { &hf_gsm_a_rr_ba_index_start_bsic_present, { "BA Index Start BSIC", "gsm_a.rr.ba_index_start_bsic.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14752
15
            { &hf_gsm_a_rr_multiband_reporting_present, { "Multiband Reporting", "gsm_a.rr.multiband_reporting.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14753
15
            { &hf_gsm_a_rr_serving_reporting_present, { "Serving Reporting", "gsm_a.rr.serving_reporting.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14754
15
            { &hf_gsm_a_rr_900_reporting_present, { "900 Reporting", "gsm_a.rr.900_reporting.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14755
15
            { &hf_gsm_a_rr_1800_reporting_present, { "1800 Reporting", "gsm_a.rr.1800_reporting.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14756
15
            { &hf_gsm_a_rr_400_reporting_present, { "400 Reporting", "gsm_a.rr.400_reporting.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14757
15
            { &hf_gsm_a_rr_1900_reporting_present, { "1900 Reporting", "gsm_a.rr.1900_reporting.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14758
15
            { &hf_gsm_a_rr_850_reporting_present, { "850 Reporting", "gsm_a.rr.850_reporting.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14759
15
            { &hf_gsm_a_rr_fdd_reporting_threshold_2_present, { "FDD Reporting Threshold2", "gsm_a.rr.fdd_reporting_threshold_2.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14760
15
            { &hf_gsm_a_rr_default_utran_priority_parameters, { "Default UTRAN Priority Parameters", "gsm_a.rr.default_utran_priority_parameters", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14761
15
            { &hf_gsm_a_rr_repeated_utran_priority_parameters, { "Repeated UTRAN Priority Parameters", "gsm_a.rr.repeated_utran_priority_parameters", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14762
15
            { &hf_gsm_a_rr_utran_frequency_index_present, { "UTRAN Frequency Index", "gsm_a.rr.utran_frequency_index.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14763
15
            { &hf_gsm_a_rr_utran_priority_present, { "UTRAN Priority", "gsm_a.rr.utran_priority.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14764
15
            { &hf_gsm_a_rr_thresh_utran_low_present, { "Threshold UTRAN Low", "gsm_a.rr.thresh_utran_low.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14765
15
            { &hf_gsm_a_rr_utran_qrxlevmin_present, { "UTRAN Qrxlev Min", "gsm_a.rr.utran_qrxlevmin.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14766
15
            { &hf_gsm_a_rr_eutran_earfcn_present, { "E-UTRAN Neighbour Cells Struct", "gsm_a.rr.eutran_earfcn.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14767
15
            { &hf_gsm_a_rr_eutran_measurement_bandwidth_present, { "Measurement Bandwidth", "gsm_a.rr.eutran_measurement_bandwidth.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14768
15
            { &hf_gsm_a_rr_eutran_priority_present, { "E-UTRAN Priority", "gsm_a.rr.eutran_priority.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14769
15
            { &hf_gsm_a_rr_thresh_eutran_low_present, { "Threshold E-UTRAN Low", "gsm_a.rr.thresh_eutran_low.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14770
15
            { &hf_gsm_a_rr_eutran_qrxlevmin_present, { "E-UTRAN Qrxlev Min", "gsm_a.rr.eutran_qrxlevmin.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14771
15
            { &hf_gsm_a_rr_repeated_earfcn, { "Repeated EARFCN", "gsm_a.rr.repeated_earfcn", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14772
15
            { &hf_gsm_a_rr_repeated_pcid, { "Repeated PCID", "gsm_a.rr.repeated_pcid", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14773
15
            { &hf_gsm_a_rr_eutran_pcid_present, { "TARGET PCID", "gsm_a.rr.repeated_eutran_pcid_present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14774
15
            { &hf_gsm_a_rr_eutran_pcid_bitmap_group_present, { "PCID Bitmap Group", "gsm_a.rr.eutran_pcid_bitmap_group.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14775
15
            { &hf_gsm_a_rr_pcid_pattern_present, { "PCID Pattern", "gsm_a.rr.pcid_pattern.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14776
15
            { &hf_gsm_a_rr_repeated_eutran_frequency_index, { "Repeated E-UTRAN Frequency Index", "gsm_a.rr.repeated_eutran_frequency_index", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14777
15
            { &hf_gsm_a_rr_repeating_pcid_group, { "Repeating PCID group", "gsm_a.rr.repeating_pcid_group", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14778
15
            { &hf_gsm_a_rr_eutran_reporting_quantity, { "E-UTRAN Reporting Quantity", "gsm_a.rr.eutran_reporting_quantity", FT_BOOLEAN, BASE_NONE, TFS(&tfs_rsrq_rsrp), 0x00, NULL, HFILL }},
14779
15
            { &hf_gsm_a_rr_eutran_reporting, { "Reporting", "gsm_a.rr.eutran_reporting", FT_BOOLEAN, BASE_NONE, TFS(&tfs_3_bit_6_bit), 0x00, NULL, HFILL }},
14780
15
            { &hf_gsm_a_rr_eutran_fdd_reporting_present, { "E-UTRAN FDD FDD 3 bit Reporting", "gsm_a.rr.eutran_fdd_reporting.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14781
15
            { &hf_gsm_a_rr_eutran_fdd_reporting_threshold_2_present, { "E-UTRAN FDD Reporting Threshold2", "gsm_a.rr.eutran_fdd_reporting_threshold_2.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14782
15
            { &hf_gsm_a_rr_eutran_fdd_reporting_offset_present, { "E-EUTRAN FDD Reporting Offset", "gsm_a.rr.eutran_fdd_reporting_offset.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14783
15
            { &hf_gsm_a_rr_eutran_tdd_reporting_present, { "E-UTRAN TDD TDD 3 bit Reporting", "gsm_a.rr.eutran_tdd_reporting.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14784
15
            { &hf_gsm_a_rr_eutran_tdd_reporting_threshold_2_present, { "E-UTRAN TDD Reporting Threshold2", "gsm_a.rr.eutran_tdd_reporting_threshold_2.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14785
15
            { &hf_gsm_a_rr_eutran_tdd_reporting_offset_present, { "E-EUTRAN TDD Reporting Offset", "gsm_a.rr.eutran_tdd_reporting_offset.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14786
15
            { &hf_gsm_a_rr_eutran_fdd_reporting_threshold, { "E-EUTRAN FDD Reporting Threshold", "gsm_a.rr.eutran_fdd_reporting_threshold", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14787
15
            { &hf_gsm_a_rr_eutran_tdd_measurement_report_offset_present, { "E-UTRAN TDD Reporting Offset", "gsm_a.rr.eutran_tdd_measurement_report_offset.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14788
15
            { &hf_gsm_a_rr_eutran_measurement_parameters_description, { "E-UTRAN Measurement Parameters Description", "gsm_a.rr.eutran_measurement_parameters_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14789
15
            { &hf_gsm_a_rr_gprs_eutran_measurement_parameters_description, { "GPRS E-UTRAN Measurement Parameters Description", "gsm_a.rr.gprs_eutran_measurement_parameters_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14790
15
            { &hf_gsm_a_rr_eutran_fdd_reporting, { "E-UTRAN FDD Reporting", "gsm_a.rr.eutran_fdd_reporting", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14791
15
            { &hf_gsm_a_rr_eutran_tdd_reporting, { "E-UTRAN TDD Reporting", "gsm_a.rr.eutran_tdd_reporting", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14792
15
            { &hf_gsm_a_rr_repeated_eutran_neighbour_cells, { "Repeated E-UTRAN Neighbour Cells", "gsm_a.rr.repeated_eutran_neighbour_cells", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14793
15
            { &hf_gsm_a_rr_repeated_eutran_not_allowed_cells, { "Repeated E-UTRAN Not Allowed Cells", "gsm_a.rr.repeated_eutran_not_allowed_cells", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14794
15
            { &hf_gsm_a_rr_repeated_eutran_pcid_ta_mapping, { "Repeated E-UTRAN PCID to TA mapping", "gsm_a.rr.repeated_eutran_pcid_ta_mapping", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14795
15
            { &hf_gsm_a_rr_measurement_control_parameters_description, { "Measurement Control Parameters Description", "gsm_a.rr.measurement_control_parameters_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14796
15
            { &hf_gsm_a_rr_eutran_default_measurement_control_eutran_present, { "Default Measurement Control E-UTRAN", "gsm_a.rr.eutran_default_measurement_control_eutran.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14797
15
            { &hf_gsm_a_rr_repeated_eutran_measurement_control_parameters, { "Repeated E-UTRAN Measurement Control Parameters", "gsm_a.rr.repeated_eutran_measurement_control_parameters", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14798
15
            { &hf_gsm_a_rr_serving_cell_priority_parameters_description, { "Serving Cell Priority Parameters Description", "gsm_a.rr.serving_cell_priority_parameters_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14799
15
            { &hf_gsm_a_rr_3g_priority_parameters_description, { "3G Priority Parameters Description", "gsm_a.rr.3g_priority_parameters_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14800
15
            { &hf_gsm_a_rr_eutran_parameters_description, { "E-UTRAN Parameters Description", "gsm_a.rr.eutran_parameters_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14801
15
            { &hf_gsm_a_rr_repeated_csg_psc_split_struct, { "Repeated CSG_PSC_SPLIT struct", "gsm_a.rr.repeated_csg_psc_split_struct", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14802
15
            { &hf_gsm_a_rr_psc_present, { "PSC", "gsm_a.rr.psc_present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14803
15
            { &hf_gsm_a_rr_psc_pattern_present, { "PSC Pattern", "gsm_a.rr.psc_pattern.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14804
15
            { &hf_gsm_a_rr_repeated_utran_frequency_index, { "Repeated UTRAN Frequency Index", "gsm_a.rr.repeated_utran_frequency_index", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14805
15
            { &hf_gsm_a_rr_repeated_csg_fdd_uarfcn, { "Repeated CSG FDD UARFCN", "gsm_a.rr.repeated_csg_fdd_uarfcn", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14806
15
            { &hf_gsm_a_rr_3g_csg_desc_technology, { "Technology", "gsm_a.rr.3g_csg_desc_technology", FT_BOOLEAN, BASE_NONE, TFS(&tfs_tdd_fdd), 0x00, NULL, HFILL }},
14807
15
            { &hf_gsm_a_rr_repeated_pcid_group, { "Repeated PCID group", "gsm_a.rr.repeated_pcid_group", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14808
15
            { &hf_gsm_a_rr_repeated_csg_pci_split, { "Repeated CSG PCI Split", "gsm_a.rr.repeated_csg_pci_split", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14809
15
            { &hf_gsm_a_rr_3g_measurement_control_parameters_description, { "3G Measurement Control Parameters Description", "gsm_a.rr.3g_measurement_control_parameters_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14810
15
            { &hf_gsm_a_rr_3g_measurement_control_parameters_description_struct, { "3G Measurement Control Parameters Description struct", "gsm_a.rr.3g_measurement_control_parameters_description_struct", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14811
15
            { &hf_gsm_a_rr_repeated_utran_measurement_control_parameters_struct, { "Repeated UTRAN Measurement Control Parameters struct", "gsm_a.rr.repeated_utran_measurement_control_parameters_struct", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14812
15
            { &hf_gsm_a_rr_measurement_parameters_description, { "Measurement Parameters Description", "gsm_a.rr.measurement_parameters_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14813
15
            { &hf_gsm_a_rr_gprs_real_time_difference_description, { "GPRS Real Time Difference Description", "gsm_a.rr.gprs_real_time_difference_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14814
15
            { &hf_gsm_a_rr_gprs_bsic_description, { "GPRS BSIC Description", "gsm_a.rr.gprs_bsic_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14815
15
            { &hf_gsm_a_rr_gprs_report_priority_description, { "GPRS Report Priority Description", "gsm_a.rr.gprs_report_priority_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14816
15
            { &hf_gsm_a_rr_gprs_measurement_parameters_description, { "GPRS Measurement Parameters Description", "gsm_a.rr.gprs_measurement_parameters_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14817
15
            { &hf_gsm_a_rr_nc_measurement_parameters, { "NC Measurement Parameters", "gsm_a.rr.nc_measurement_parameters", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14818
15
            { &hf_gsm_a_rr_nc_periods, { "NC Periods", "gsm_a.rr.nc_periods", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14819
15
            { &hf_gsm_a_rr_si_2quater_extension_information, { "SI 2quater Extension Information", "gsm_a.rr.si_2quater_extension_information", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14820
15
            { &hf_gsm_a_rr_ccn_support_description, { "CCN Support Description", "gsm_a.rr.ccn_support_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14821
15
            { &hf_gsm_a_rr_3g_neighbour_cell_description, { "3G Neighbour Cell Description", "gsm_a.rr.3g_neighbour_cell_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14822
15
            { &hf_gsm_a_rr_absolute_index_start_emr_present, { "Absolute Index Start EMR", "gsm_a.rr.absolute_index_start_emr.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14823
15
            { &hf_gsm_a_rr_fdd_information, { "FDD Information", "gsm_a.rr.fdd_information", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14824
15
            { &hf_gsm_a_rr_tdd_information, { "TDD Information", "gsm_a.rr.tdd_information", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14825
15
            { &hf_gsm_a_rr_gprs_3g_measurement_parameters_description, { "GPRS 3G Measurement Parameters Description", "gsm_a.rr.gprs_3g_measurement_parameters_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14826
15
            { &hf_gsm_a_rr_reporting_quantity_present, { "Reporting Quantity", "gsm_a.rr.reporting_quantity.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_ec_no_rscp), 0x00, NULL, HFILL }},
14827
15
            { &hf_gsm_a_rr_fdd_reporting_parameters, { "FDD Reporting Parameters", "gsm_a.rr.fdd_reporting_parameters", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14828
15
            { &hf_gsm_a_rr_tdd_multirat_reporting_present, { "TDD Multirat Reporting", "gsm_a.rr.tdd_multirat_reporting.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14829
15
            { &hf_gsm_a_rr_tdd_reporting_parameters, { "TDD Reporting Parameters", "gsm_a.rr.tdd_reporting_parameters", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14830
15
            { &hf_gsm_a_rr_3g_additional_measurement_parameters_description_2, { "3G Additional Measurement Parameters Description 2", "gsm_a.rr.3g_additional_measurement_parameters_description_2", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14831
15
            { &hf_gsm_a_rr_700_reporting, { "700 Reporting", "gsm_a.rr.700_reporting", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14832
15
            { &hf_gsm_a_rr_810_reporting, { "810 Reporting", "gsm_a.rr.810_reporting", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14833
15
            { &hf_gsm_a_rr_3g_supplementary_parameters_description, { "3G Supplementary Parameters Description", "gsm_a.rr.3g_supplementary_parameters_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14834
15
            { &hf_gsm_a_rr_priority_and_eutran_param_description, { "Priority and E-UTRAN Parameters Description", "gsm_a.rr.priority_and_eutran_param_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14835
15
            { &hf_gsm_a_rr_3g_csg_description, { "3G CSG Description", "gsm_a.rr.3g_csg_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14836
15
            { &hf_gsm_a_rr_lsa_id_type, { "Type", "gsm_a.rr.lsa_id_type", FT_BOOLEAN, BASE_NONE, TFS(&tfs_short_lsa_id_lsa_id), 0x00, NULL, HFILL }},
14837
15
            { &hf_gsm_a_rr_additional_lsa_id, { "Additional LSA ID", "gsm_a.rr.additional_lsa_id", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14838
15
            { &hf_gsm_a_rr_si13alt_position_present, { "SI3 alt position", "gsm_a.rr.si13alt_position.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14839
15
            { &hf_gsm_a_call_prio_present, { "Call Priority", "gsm_a.call_prio.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14840
15
            { &hf_gsm_a_rr_amr_config_present, { "AMR Config", "gsm_a.rr.amr_config.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14841
15
            { &hf_gsm_a_rr_rand_bit_stream_ind, { "Random Bit Stream", "gsm_a.rr.rand_bit_stream.ind", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14842
15
            { &hf_gsm_a_rr_rfl_number_present, { "RFL number list", "gsm_a.rr.rfl_number.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14843
15
            { &hf_gsm_a_rr_gprs_mobile_allocation, { "MA", "gsm_a.rr.gprs_mobile_allocation", FT_BOOLEAN, BASE_NONE, TFS(&tfs_not_present_present), 0x00, NULL, HFILL }},
14844
15
            { &hf_gsm_a_rr_arfcn_index_list, { "ARFCN index list", "gsm_a.rr.arfcn_index_list", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14845
15
            { &hf_gsm_a_rr_si13_change_mark_present, { "SI13 Change Mark", "gsm_a.rr.si13_change_mark.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14846
15
            { &hf_gsm_a_rr_pbcch, { "PBCCH", "gsm_a.rr.pbcch", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present_in_cell), 0x00, NULL, HFILL }},
14847
15
            { &hf_gsm_a_rr_maio_present, { "MAIO", "gsm_a.rr.maio.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14848
15
            { &hf_gsm_a_rr_arfcn_present, { "ARFCN", "gsm_a.rr.arfcn.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14849
15
            { &hf_gsm_a_rr_lb_ms_txpwr_max_cch_present, { "LB MS TXPWR MAX CCH", "gsm_a.rr.lb_ms_txpwr_max_cch.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14850
15
            { &hf_gsm_a_rr_real_time_difference_description, { "Real Time Difference Description", "gsm_a.rr.real_time_difference_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14851
15
            { &hf_gsm_a_rr_bsic_description, { "BSIC Description", "gsm_a.rr.bsic_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14852
15
            { &hf_gsm_a_rr_report_priority_description, { "Report Priority Description", "gsm_a.rr.report_priority_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14853
15
            { &hf_gsm_a_rr_future_extensions_of_the_2g_parameters, { "Future extensions of the 2G parameters", "gsm_a.rr.future_extensions_of_the_2g_parameters", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14854
15
            { &hf_gsm_a_rr_3g_wait_present, { "3G Wait", "gsm_a.rr.3g_wait.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14855
15
            { &hf_gsm_a_rr_index_start_3g_present, { "Index Start 3G", "gsm_a.rr.index_start_3g.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14856
15
            { &hf_gsm_a_rr_cdma2000_description, { "CDMA2000 Description", "gsm_a.rr.cdma2000_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14857
15
            { &hf_gsm_a_rr_additional_information_for_3x_auxiliary_pilot, { "Additional information for 3X Auxiliary Pilot", "gsm_a.rr.additional_information_for_3x_auxiliary_pilot", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14858
15
            { &hf_gsm_a_rr_3g_reporting_quantity, { "3G Reporting Quantity", "gsm_a.rr.3g_reporting_quantity", FT_BOOLEAN, BASE_NONE, TFS(&tfs_ec_no_rscp), 0x00, NULL, HFILL }},
14859
15
            { &hf_gsm_a_rr_fdd_multirat_reporting_present, { "FDD Multirat Reporting", "gsm_a.rr.fdd_multirat_reporting.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14860
15
            { &hf_gsm_a_rr_fdd_reporting_offset_present, { "FDD Reporting Offset", "gsm_a.rr.fdd_reporting_offset.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14861
15
            { &hf_gsm_a_rr_tdd_reporting_offset_present, { "TDD Reporting Offset", "gsm_a.rr.tdd_reporting_offset.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14862
15
            { &hf_gsm_a_rr_cdma2000_multirat_reporting, { "CDMA2000 Multirat Reporting", "gsm_a.rr.cdma2000_multirat_reporting", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14863
15
            { &hf_gsm_a_rr_cdma2000_reporting_threshold, { "CDMA2000 Reporting Threshold", "gsm_a.rr.cdma2000_reporting_threshold", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14864
15
            { &hf_gsm_a_rr_eutran_csg_description, { "E-UTRAN CSG Description", "gsm_a.rr.eutran_csg_description", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14865
15
            { &hf_gsm_a_rr_serving_cell_data, { "Serving cell data", "gsm_a.rr.serving_cell_data", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14866
15
            { &hf_gsm_a_rr_repeated_invalid_bsic_information, { "Repeated Invalid BSIC Information", "gsm_a.rr.repeated_invalid_bsic_information", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14867
15
            { &hf_gsm_a_rr_bitmap_type_reporting, { "Bitmap Type Reporting", "gsm_a.rr.bitmap_type_reporting", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14868
15
            { &hf_gsm_a_rr_e_utran_measurement_report, { "E-UTRAN Measurement Report", "gsm_a.rr.e_utran_measurement_report", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14869
15
            { &hf_gsm_a_rr_repeat_eutran_desc, { "Repeating E-UTRAN Description struct", "gsm_a.rr.repeat_eutran_desc", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14870
15
            { &hf_gsm_a_rr_peo_dsc_and_rcc_present, { "PEO DSC and RCC", "gsm_a.rr.peo_dsc_and_rcc_present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL } },
14871
15
            { &hf_gsm_a_rr_c1_delta_present, { "C1 DELTA", "gsm_a.rr.c1_delta_present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL } },
14872
15
            { &hf_gsm_a_rr_ul_xtti_tbf_assignment, { "TTI mode for uplink TBF", "gsm_a.rr.ul_xtti_tbf_assignment", FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_ul_xtti_tbf_assignment_vals), 0x00, NULL, HFILL } },
14873
15
            { &hf_gsm_a_rr_dl_xtti_tbf_assignment, { "TTI mode for downlink TBF", "gsm_a.rr.dl_xtti_tbf_assignment", FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_dl_xtti_tbf_assignment_vals), 0x00, NULL, HFILL } },
14874
15
            { &hf_gsm_a_rr_fanr_act_state, { "FANR state", "gsm_a.rr.fanr_act_state", FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_fanr_act_state_vals), 0x00, NULL, HFILL } },
14875
15
            { &hf_gsm_a_rr_encoding_selection, { "Selected encoding", "gsm_a.rr.encoding_selection", FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_encoding_selection_vals), 0x00, NULL, HFILL } },
14876
15
            { &hf_gsm_a_rr_nof_pdch_pairs, { "Number of assigned PDCH pairs", "gsm_a.rr.nof_pdch_pairs", FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_rr_nof_pdch_pairs_vals), 0x00, NULL, HFILL } },
14877
15
            { &hf_gsm_a_rr_npm_transfer_time_present, { "NPM Transfer Time", "gsm_a.rr.npm_transfer_time_present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL } },
14878
15
            { &hf_gsm_a_rr_eab_parameters,{ "EAB parameters structure", "gsm_a.rr.eab_parameters", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL } },
14879
            /* gsm_rr_csn_HL_flag() fields */
14880
15
            { &hf_gsm_a_rr_selection_parameters, { "Selection Parameters", "gsm_a.rr.selection_parameters", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14881
15
            { &hf_gsm_a_rr_break_indicator, { "Break Indicator", "gsm_a.rr.break_indicator", FT_BOOLEAN, BASE_NONE, TFS(&tfs_break_indicator), 0x00, NULL, HFILL }},
14882
15
            { &hf_gsm_a_rr_multiple_tbf_procedures, { "Multiple TBF Capability procedures in A/Gb mode", "gsm_a.rr.multiple_tbf_capability", FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x00, NULL, HFILL }},
14883
15
            { &hf_gsm_a_rr_additions_in_rel_7, { "Additions in Rel-7", "gsm_a.rr.additions_in_rel_7", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14884
15
            { &hf_gsm_a_rr_additions_in_rel_9, { "Additions in Rel-9", "gsm_a.rr.additions_in_rel_9", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14885
15
            { &hf_gsm_a_rr_additions_in_rel_6, { "Additions in Rel-6", "gsm_a.rr.additions_in_rel_6", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14886
15
            { &hf_gsm_a_rr_additions_in_rel_10, { "Additions in Rel-10", "gsm_a.rr.additions_in_rel_10", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL } },
14887
15
            { &hf_gsm_a_rr_additions_in_rel_13, { "Additions in Rel-13", "gsm_a.rr.additions_in_rel_13", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL } },
14888
15
            { &hf_gsm_a_rr_additions_in_r99, { "Additions in R99", "gsm_a.rr.additions_in_r99", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14889
15
            { &hf_gsm_a_rr_first_discriminator_bit, { "First Discriminator Bit", "gsm_a.rr.first_discriminator_bit", FT_BOOLEAN, BASE_NONE, TFS(&tfs_high_low), 0x00, NULL, HFILL }},
14890
15
            { &hf_gsm_a_rr_second_discriminator_bit, { "Second Discriminator Bit", "gsm_a.rr.second_discriminator_bit", FT_BOOLEAN, BASE_NONE, TFS(&tfs_high_low), 0x00, NULL, HFILL }},
14891
15
            { &hf_gsm_a_rr_a_compressed_inter_rat_handover_info, { "A compressed version of the INTER RAT HANDOVER INFO message", "gsm_a.rr.a_compressed_inter_rat_handover_info", FT_BOOLEAN, BASE_NONE, TFS(&tfs_shall_be_shall_not_be_used), 0x00, NULL, HFILL }},
14892
15
            { &hf_gsm_a_rr_nln_pch_present, { "NLN(PCH)", "gsm_a.rr.nln_pch.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14893
15
            { &hf_gsm_a_call_prio1, { "Priority 1", "gsm_a.call_prio1.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14894
15
            { &hf_gsm_a_call_prio2, { "Priority 2", "gsm_a.call_prio2.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14895
15
            { &hf_gsm_a_rr_group_call_information, { "Group Call Information", "gsm_a.rr.group_call_information", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14896
15
            { &hf_gsm_a_rr_packet_page_indication_1, { "Packet Page Indication 1", "gsm_a.rr.packet_page_indication_1", FT_BOOLEAN, BASE_NONE, TFS(&tfs_for_gprs_for_rr_connection_establishment), 0x00, NULL, HFILL }},
14897
15
            { &hf_gsm_a_rr_packet_page_indication_2, { "Packet Page Indication 2", "gsm_a.rr.packet_page_indication_2", FT_BOOLEAN, BASE_NONE, TFS(&tfs_for_gprs_for_rr_connection_establishment), 0x00, NULL, HFILL }},
14898
15
            { &hf_gsm_a_rr_chnl_needed_ch3_present, { "Channel Needed 3", "gsm_a.rr.chnl_needed_ch3.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14899
15
            { &hf_gsm_a_call_prio3, { "Priority 3", "gsm_a.call_prio3.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14900
15
            { &hf_gsm_a_rr_packet_paging_procedure_1, { "Packet Paging Procedure 1", "gsm_a.rr.packet_paging_procedure_1", FT_BOOLEAN, BASE_NONE, TFS(&tfs_for_gprs_for_rr_connection_establishment), 0x00, NULL, HFILL }},
14901
15
            { &hf_gsm_a_rr_packet_paging_procedure_2, { "Packet Paging Procedure 2", "gsm_a.rr.packet_paging_procedure_2", FT_BOOLEAN, BASE_NONE, TFS(&tfs_for_gprs_for_rr_connection_establishment), 0x00, NULL, HFILL }},
14902
15
            { &hf_gsm_a_rr_packet_paging_procedure_3, { "Packet Paging Procedure 3", "gsm_a.rr.packet_paging_procedure_3", FT_BOOLEAN, BASE_NONE, TFS(&tfs_for_gprs_for_rr_connection_establishment), 0x00, NULL, HFILL }},
14903
15
            { &hf_gsm_a_rr_additions_in_release_6_present, { "Additions in release 6", "gsm_a.rr.additions_in_release_6.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14904
15
            { &hf_gsm_a_rr_chnl_needed_ch3and4, { "Channel Needed 3 & 4", "gsm_a.rr.chnl_needed_ch3and4", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14905
15
            { &hf_gsm_a_call_prio4, { "Priority 4", "gsm_a.call_prio4.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14906
15
            { &hf_gsm_a_rr_nch_position_present, { "NCH position", "gsm_a.rr.nch_position.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14907
15
            { &hf_gsm_a_rr_si2ter_mp_change_mark_present, { "MP Changemark", "gsm_a.rr.si2ter_mp_change_mark.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14908
15
            { &hf_gsm_a_rr_additions_in_rel_5, { "Additions in Rel-5", "gsm_a.rr.additions_in_rel_5", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14909
15
            { &hf_gsm_a_rr_additions_in_rel_8, { "Additions in Rel-8", "gsm_a.rr.additions_in_rel_8", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14910
15
            { &hf_gsm_a_rr_power_offset_present, { "Optional Power Offset", "gsm_a.rr.power_offset.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14911
15
            { &hf_gsm_a_rr_system_information_type_2ter, { "SYSTEM INFORMATION TYPE 2ter", "gsm_a.rr.system_information_type_2ter", FT_BOOLEAN, BASE_NONE, TFS(&tfs_available_not_available), 0x00, NULL, HFILL }},
14912
15
            { &hf_gsm_a_rr_early_classmark_sending, { "Early Classmark Sending", "gsm_a.rr.early_classmark_sending", FT_BOOLEAN, BASE_NONE, TFS(&tfs_allowed_not_allowed), 0x00, NULL, HFILL }},
14913
15
            { &hf_gsm_a_rr_scheduling_if_and_where, { "Scheduling if and where", "gsm_a.rr.scheduling_if_and_where", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14914
15
            { &hf_gsm_a_rr_gprs_indicator, { "GPRS Indicator", "gsm_a.rr.gprs_indicator", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14915
15
            { &hf_gsm_a_rr_3g_early_classmark_sending_restriction, { "3G Early Classmark Sending Restriction", "gsm_a.rr.3g_early_classmark_sending_restriction", FT_BOOLEAN, BASE_NONE, TFS(&tfs_3g_early_classmark_sending_restriction), 0x00, NULL, HFILL }},
14916
15
            { &hf_gsm_a_rr_si2quater_indicator, { "SI2quater Indicator", "gsm_a.rr.si2quater_indicator", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14917
15
            { &hf_gsm_a_rr_si21_indicator,{ "SI21 Indicator", "gsm_a.rr.si21_indicator", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL } },
14918
15
            { &hf_gsm_a_rr_si4_rest_octets_s, { "SI4 Rest Octets_S", "gsm_a.rr.si4_rest_octets_s", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14919
15
            { &hf_gsm_a_rr_lsa_parameters, { "LSA Parameters", "gsm_a.rr.lsa_parameters", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14920
15
            { &hf_gsm_a_rr_cell_id_present, { "Cell Identity", "gsm_a.rr.cell_id.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14921
15
            { &hf_gsm_a_rr_lsa_id_information, { "LSA ID information", "gsm_a.rr.lsa_id_information", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14922
15
            { &hf_gsm_a_rr_cbq3_present, { "CBQ3", "gsm_a.rr.cbq3.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14923
15
            { &hf_gsm_a_rr_pch_and_nch_info, { "PCH and NCH Info", "gsm_a.rr.pch_and_nch_info", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14924
15
            { &hf_gsm_a_rr_vbs_vgcs_options, { "VBS/VGCS options", "gsm_a.rr.vbs_vgcs_options", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14925
15
            { &hf_gsm_a_rr_dtm, { "DTM", "gsm_a.rr.dtm", FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_in_serving_cell_not_supported_in_serving_cell), 0x00, NULL, HFILL }},
14926
15
            { &hf_gsm_a_rr_gprs_ms_txpwr_max_ccch_present, { "GPRS MS PWR MAX CCCH", "gsm_a.rr.gprs_ms_txpwr_max_ccch.present", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14927
15
            { &hf_gsm_a_rr_mbms_procedures, { "MBMS Procedures", "gsm_a.rr.mbms_procedures", FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x00, NULL, HFILL }},
14928
15
            { &hf_gsm_a_rr_si13_contents, { "SI13 contents", "gsm_a.rr.si13_contents", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14929
15
            { &hf_gsm_a_rr_additions_in_rel_4, { "Additions in Rel-4", "gsm_a.rr.additions_in_rel_4", FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x00, NULL, HFILL }},
14930
15
            { &hf_gsm_a_rr_si_change_alt, { "SI CHANGE ALT", "gsm_a.rr.si_change_alt", FT_BOOLEAN, BASE_NONE, TFS(&gsm_si_change_alt_value), 0x00, NULL, HFILL } },
14931
14932
15
            { &hf_gsm_a_rr_cs_tsc_set, { "CS Domain TSC Set", "gsm_a.rr.cs_tsc_set", FT_UINT8, BASE_DEC, VALS(gsm_a_rr_cs_tsc_set_vals), 0x03, NULL, HFILL } },
14933
15
            { &hf_gsm_a_rr_ps_sd_tsc_ass, { "Secondary PS Domain TSC Assigned", "gsm_a.rr.ps_sd_tsc_ass", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x04, NULL, HFILL } },
14934
15
            { &hf_gsm_a_rr_ps_pd_tsc_set, { "Primary PS Domain TSC Set", "gsm_a.rr.ps_pd_tsc_set", FT_UINT8, BASE_DEC, VALS(gsm_a_rr_ps_tsc_set_vals), 0x08, NULL, HFILL } },
14935
15
            { &hf_gsm_a_rr_ps_sd_tsc_set, { "Secondary PS Domain TSC Set", "gsm_a.rr.ps_sd_tsc_set", FT_UINT8, BASE_DEC, VALS(gsm_a_rr_ps_tsc_set_vals), 0x10, NULL, HFILL } },
14936
15
            { &hf_gsm_a_rr_ps_sd_tsc_val, { "Secondary PS Domain TSC Value", "gsm_a.rr.ps_sd_tsc_val", FT_UINT8, BASE_DEC, NULL, 0xe0, NULL, HFILL } },
14937
15
        };
14938
14939
15
    static hf_register_info hf_rr_short_pd[] =
14940
15
        {
14941
15
           { &hf_gsm_a_rr_short_pd,
14942
15
             { "Radio Resources Short Protocol Discriminator", "gsm_a.rr.short_pd",
14943
15
               FT_UINT8, BASE_HEX, NULL, 0x0,
14944
15
               NULL, HFILL }
14945
15
           },
14946
15
            { &hf_gsm_a_rr_short_pd_msg_type,
14947
15
              { "Radio Resources Short PD Message Type", "gsm_a.rr.short_pd_type",
14948
15
                FT_UINT8, BASE_HEX, VALS(gsm_a_rr_short_pd_msg_strings), 0x0,
14949
15
                NULL, HFILL }
14950
15
            },
14951
15
            { &hf_gsm_a_rr_short_l2_header,
14952
15
              { "Radio Resources Short L2 Header", "gsm_a.rr.short_l2_header",
14953
15
                FT_UINT8, BASE_HEX, NULL, 0x0,
14954
15
                NULL, HFILL }
14955
15
            },
14956
15
            { &hf_gsm_a_rr_ra_est_cause,
14957
15
              { "Establishment Cause", "gsm_a.rr.ra_est_cause",
14958
15
                FT_UINT8, BASE_CUSTOM, CF_FUNC(ra_est_cause_convert), 0x0,
14959
15
                NULL, HFILL }
14960
15
            },
14961
15
            { &hf_gsm_a_rr_ra_rand_ref,
14962
15
              { "Random Reference", "gsm_a.rr.ra_rand_ref",
14963
15
                FT_UINT8, BASE_CUSTOM, CF_FUNC(ra_rand_ref_convert), 0x0,
14964
15
                NULL, HFILL }
14965
15
            }
14966
15
        };
14967
14968
    /* Setup protocol subtree array */
14969
15
#define NUM_INDIVIDUAL_ELEMS    6
14970
15
    int *ett[NUM_INDIVIDUAL_ELEMS +
14971
15
              NUM_GSM_DTAP_MSG_RR +
14972
15
              NUM_GSM_RR_ELEM +
14973
15
              NUM_GSM_RR_REST_OCTETS_ELEM +
14974
15
              NUM_GSM_SACCH_MSG_RR];
14975
14976
15
    static ei_register_info ei[] = {
14977
15
        { &ei_gsm_a_rr_ie_overrun, { "gsm_a.rr.ie_overrun", PI_MALFORMED, PI_ERROR, "IE over-runs stated length", EXPFILL }},
14978
15
        { &ei_gsm_a_rr_ie_underrun, { "gsm_a.rr.ie_underrun", PI_COMMENTS_GROUP, PI_NOTE, "IE under-runs stated length", EXPFILL }},
14979
15
        { &ei_gsm_a_rr_data_not_dissected, { "gsm_a.rr.data_not_dissected", PI_UNDECODED, PI_WARN, "Not dissected yet", EXPFILL }},
14980
15
        { &ei_gsm_a_rr_unknown_version, { "gsm_a.rr.unknown_version", PI_PROTOCOL, PI_WARN, "Unknown version", EXPFILL }},
14981
15
        { &ei_gsm_a_rr_extraneous_data, { "gsm_a.rr.extraneous_data", PI_PROTOCOL, PI_NOTE, "Extraneous Data, dissector bug or later version spec (report to wireshark.org)", EXPFILL }},
14982
15
        { &ei_gsm_a_rr_missing_mandatory_element, { "gsm_a.rr.missing_mandatory_element", PI_PROTOCOL, PI_ERROR, "Missing Mandatory element, rest of dissection is suspect", EXPFILL }},
14983
15
    };
14984
14985
15
    module_t *gsm_a_rr_module;
14986
15
    expert_module_t* expert_a_rr;
14987
14988
15
    ett[0] = &ett_ccch_msg;
14989
15
    ett[1] = &ett_ccch_oct_1;
14990
15
    ett[2] = &ett_sacch_msg;
14991
15
    ett[3] = &ett_ec_ccch_msg;
14992
15
    ett[4] = &ett_apdu;
14993
15
    ett[5] = &ett_rach_msg;
14994
14995
15
    last_offset = NUM_INDIVIDUAL_ELEMS;
14996
14997
1.23k
    for (i=0; i < NUM_GSM_DTAP_MSG_RR; i++, last_offset++)
14998
1.21k
    {
14999
1.21k
        ett[last_offset] = &ett_gsm_dtap_msg_rr[i];
15000
1.21k
    }
15001
15002
1.36k
    for (i=0; i < NUM_GSM_RR_ELEM; i++, last_offset++)
15003
1.35k
    {
15004
1.35k
        ett[last_offset] = &ett_gsm_rr_elem[i];
15005
1.35k
    }
15006
15007
930
    for (i=0; i < NUM_GSM_RR_REST_OCTETS_ELEM; i++, last_offset++)
15008
915
    {
15009
915
        ett[last_offset] = &ett_gsm_rr_rest_octets_elem[i];
15010
915
    }
15011
15012
165
    for (i=0; i < NUM_GSM_SACCH_MSG_RR; i++, last_offset++)
15013
150
    {
15014
150
        ett[last_offset] = &ett_gsm_sacch_msg_rr[i];
15015
150
    }
15016
15017
    /* Register the protocol name and description */
15018
15
    proto_a_rr =
15019
15
        proto_register_protocol("GSM A-I/F Radio Resource Management", "GSM RR", "gsm_a.rr");
15020
15021
15
    proto_register_field_array(proto_a_rr, hf, array_length(hf));
15022
15
    expert_a_rr = expert_register_protocol(proto_a_rr);
15023
15
    expert_register_field_array(expert_a_rr, ei, array_length(ei));
15024
15025
    /* Register the protocol name and description */
15026
15
    proto_a_ccch =
15027
15
        proto_register_protocol("GSM CCCH", "GSM CCCH", "gsm_a.ccch");
15028
15029
    /* subdissector code */
15030
15
    register_dissector("gsm_a_ccch", dissect_ccch, proto_a_ccch);
15031
15032
    /* Register the protocol name and description */
15033
15
    proto_a_rach =
15034
15
        proto_register_protocol("GSM RACH", "GSM RACH", "gsm_a.rach");
15035
15036
    /* subdissector code */
15037
15
    register_dissector("gsm_a_rach", dissect_rach, proto_a_rach);
15038
15039
    /* Register the protocol name and description */
15040
15
    proto_a_sacch =
15041
15
        proto_register_protocol("GSM SACCH", "GSM SACCH", "gsm_a.sacch");
15042
15043
15
    proto_register_field_array(proto_a_sacch, hf_rr_short_pd, array_length(hf_rr_short_pd));
15044
15045
    /* subdissector code */
15046
15
    register_dissector("gsm_a_sacch", dissect_sacch, proto_a_sacch);
15047
    /* Register the protocol name and description */
15048
15049
15
    proto_a_ec_ccch =
15050
15
        proto_register_protocol("GSM EC-CCCH", "GSM EC-CCCH", "gsm_a.ec_ccch");
15051
    /* subdissector code */
15052
15
    register_dissector("gsm_a_ec_ccch", dissect_ec_ccch, proto_a_ec_ccch);
15053
15054
    /* subtree array (for both sub-dissectors) */
15055
15
    proto_register_subtree_array(ett, array_length(ett));
15056
15057
    /* Register configuration options */
15058
15
    gsm_a_rr_module = prefs_register_protocol(proto_a_rr, NULL);
15059
15
    prefs_register_uint_preference(gsm_a_rr_module, "nri_length", "NRI length",
15060
15
                                   "Whether to decode NRI in TLLI. NRI is not used if length is zero",
15061
15
                                   10, &gsm_a_rr_nri_length);
15062
15
}
15063
15064
void
15065
proto_reg_handoff_gsm_a_rr(void)
15066
15
{
15067
15
    rrc_irat_ho_info_handle = find_dissector_add_dependency("rrc.irat.irat_ho_info", proto_a_rr);
15068
15
    rrc_irat_ho_to_utran_cmd_handle = find_dissector_add_dependency("rrc.irat.ho_to_utran_cmd", proto_a_rr);
15069
15
    rrlp_dissector = find_dissector("rrlp");
15070
15
}
15071
15072
15073
/*
15074
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
15075
 *
15076
 * Local variables:
15077
 * c-basic-offset: 4
15078
 * tab-width: 8
15079
 * indent-tabs-mode: nil
15080
 * End:
15081
 *
15082
 * vi: set shiftwidth=4 tabstop=8 expandtab:
15083
 * :indentSize=4:tabSize=8:noTabs=true:
15084
 */