Coverage Report

Created: 2025-02-15 06:25

/src/wireshark/epan/dissectors/packet-gsm_a_bssmap.c
Line
Count
Source (jump to first uncovered line)
1
/* packet-gsm_a_bssmap.c
2
 * Routines for GSM A Interface BSSMAP dissection
3
 *
4
 * Copyright 2003, Michael Lum <mlum [AT] telostech.com>
5
 * In association with Telos Technology Inc.
6
 *
7
 * Updated to 3GPP TS 48.008 version 9.8.0 Release 9
8
 * Copyright 2008, Anders Broman <anders.broman [at] ericsson.com
9
 * Copyright 2012, Pascal Quantin <pascal.quantin [at] gmail.com
10
 * Title        3GPP            Other
11
 *
12
 *   Reference [2]
13
 *   Mobile-services Switching Centre - Base Station System
14
 *   (MSC - BSS) interface;
15
 *   Layer 3 specification
16
 *   (GSM 08.08 version 7.7.0 Release 1998) TS 100 590 v7.7.0
17
 *   3GPP TS 48.008 version 8.4.0 Release 8
18
 *   3GPP TS 48.008 version 9.8.0 Release 9
19
 *
20
 * Wireshark - Network traffic analyzer
21
 * By Gerald Combs <gerald@wireshark.org>
22
 * Copyright 1998 Gerald Combs
23
 *
24
 * SPDX-License-Identifier: GPL-2.0-or-later
25
 */
26
27
#include "config.h"
28
29
#include <epan/packet.h>
30
#include <epan/tap.h>
31
#include <epan/expert.h>
32
#include <epan/asn1.h>
33
#include <epan/tfs.h>
34
35
#include <wsutil/str_util.h>
36
#include <wsutil/array.h>
37
38
#include "packet-bssgp.h"
39
#include "packet-gsm_a_common.h"
40
#include "packet-e212.h"
41
#include "packet-ranap.h"
42
#include "packet-rrc.h"
43
#include "packet-rtcp.h"
44
#include "packet-rtp.h"
45
#include "packet-gsm_map.h"
46
#include "packet-bicc_mst.h"
47
#include "packet-s1ap.h"
48
49
void proto_register_gsm_a_bssmap(void);
50
void proto_reg_handoff_gsm_a_bssmap(void);
51
52
/* PROTOTYPES/FORWARDS */
53
54
/* TS 48.008 3.2.2.1 Message Type */
55
const value_string gsm_a_bssmap_msg_strings[] = {
56
    { 0x01, "Assignment Request" },
57
    { 0x02, "Assignment Complete" },
58
    { 0x03, "Assignment Failure" },
59
    { 0x04, "VGCS/VBS Setup" },
60
    { 0x05, "VGCS/VBS Setup Ack" },
61
    { 0x06, "VGCS/VBS Setup Refuse" },
62
    { 0x07, "VGCS/VBS Assignment Request" },
63
    { 0x08, "Channel Modify request" },
64
65
    { 0x09, "Unallocated" },
66
    { 0x0a, "Unallocated" },
67
    { 0x0b, "Unallocated" },
68
    { 0x0c, "Unallocated" },
69
    { 0x0d, "Unallocated" },
70
    { 0x0e, "Unallocated" },
71
    { 0x0f, "Unallocated" },
72
73
    { 0x10, "Handover Request" },
74
    { 0x11, "Handover Required" },
75
    { 0x12, "Handover Request Acknowledge" },
76
    { 0x13, "Handover Command" },
77
    { 0x14, "Handover Complete" },
78
    { 0x15, "Handover Succeeded" },
79
    { 0x16, "Handover Failure" },
80
    { 0x17, "Handover Performed" },
81
    { 0x18, "Handover Candidate Enquire" },
82
    { 0x19, "Handover Candidate Response" },
83
    { 0x1a, "Handover Required Reject" },
84
    { 0x1b, "Handover Detect" },
85
    { 0x1c, "VGCS/VBS Assignment Result" },
86
    { 0x1d, "VGCS/VBS Assignment Failure" },
87
    { 0x1e, "VGCS/VBS Queuing Indication" },
88
    { 0x1f, "Uplink Request" },
89
    { 0x20, "Clear Command" },
90
    { 0x21, "Clear Complete" },
91
    { 0x22, "Clear Request" },
92
    { 0x23, "Reserved" },
93
    { 0x24, "Reserved" },
94
    { 0x25, "SAPI 'n' Reject" },
95
    { 0x26, "Confusion" },
96
    { 0x27, "Uplink Request Acknowledge" },
97
    { 0x28, "Suspend" },
98
    { 0x29, "Resume" },
99
    /* This value (2a) was allocated in an earlier phase of the protocol and shall not be used in the future. */
100
    { 0x2a, "Connection Oriented Information(Obsolete)" },
101
    { 0x2b, "Perform Location Request" },
102
    { 0x2c, "LSA Information" },
103
    { 0x2d, "Perform Location Response" },
104
    { 0x2e, "Perform Location Abort" },
105
    { 0x2f, "Common Id" },
106
    { 0x30, "Reset" },
107
    { 0x31, "Reset Acknowledge" },
108
    { 0x32, "Overload" },
109
    { 0x33, "Reserved" },
110
    { 0x34, "Reset Circuit" },
111
    { 0x35, "Reset Circuit Acknowledge" },
112
    { 0x36, "MSC Invoke Trace" },
113
    { 0x37, "BSS Invoke Trace" },
114
115
    { 0x38, "Unallocated" },
116
    { 0x39, "Unallocated" },
117
118
    { 0x3a, "Connectionless Information" },
119
    { 0x3b, "VGCS/VBS Assignment Status" },
120
    { 0x3c, "VGCS/VBS Area Cell Info" },
121
    { 0x3d, "Reset IP Resource" },
122
    { 0x3e, "Reset IP Resource Acknowledge" },
123
124
    { 0x3f, "Unallocated" },
125
126
    { 0x40, "Block" },
127
    { 0x41, "Blocking Acknowledge" },
128
    { 0x42, "Unblock" },
129
    { 0x43, "Unblocking Acknowledge" },
130
    { 0x44, "Circuit Group Block" },
131
    { 0x45, "Circuit Group Blocking Acknowledge" },
132
    { 0x46, "Circuit Group Unblock" },
133
    { 0x47, "Circuit Group Unblocking Acknowledge" },
134
    { 0x48, "Unequipped Circuit" },
135
    { 0x49, "Uplink Request Confirmation" },
136
    { 0x4a, "Uplink Release Indication" },
137
    { 0x4b, "Uplink Reject Command" },
138
    { 0x4c, "Uplink Release Command" },
139
    { 0x4d, "Uplink Seized Command" },
140
    { 0x4e, "Change Circuit" },
141
    { 0x4f, "Change Circuit Acknowledge" },
142
    { 0x50, "Resource Request" },
143
    { 0x51, "Resource Indication" },
144
    { 0x52, "Paging" },
145
    { 0x53, "Cipher Mode Command" },
146
    { 0x54, "Classmark Update" },
147
    { 0x55, "Cipher Mode Complete" },
148
    { 0x56, "Queuing Indication" },
149
    { 0x57, "Complete Layer 3 Information" },
150
    { 0x58, "Classmark Request" },
151
    { 0x59, "Cipher Mode Reject" },
152
    { 0x5a, "Load Indication" },
153
154
    { 0x5b, "Unallocated" },
155
    { 0x5c, "Unallocated" },
156
    { 0x5d, "Unallocated" },
157
    { 0x5e, "Unallocated" },
158
    { 0x5f, "Unallocated" },
159
160
    { 0x60, "VGCS Additional Information" },
161
    { 0x61, "VGCS SMS" },
162
    { 0x62, "Notification Data" },
163
    { 0x63, "Uplink Application Data" },
164
165
    { 0x64, "Unallocated" },
166
    { 0x65, "Unallocated" },
167
    { 0x66, "Unallocated" },
168
    { 0x67, "Unallocated" },
169
    { 0x68, "Unallocated" },
170
    { 0x69, "Unallocated" },
171
    { 0x6a, "Unallocated" },
172
    { 0x6b, "Unallocated" },
173
    { 0x6c, "Unallocated" },
174
    { 0x6d, "Unallocated" },
175
    { 0x6e, "Unallocated" },
176
    { 0x6f, "Unallocated" },
177
178
    { 0x70, "Internal Handover Required" },
179
    { 0x71, "Internal Handover Required Reject" },
180
    { 0x72, "Internal Handover Command" },
181
    { 0x73, "Internal Handover Enquiry" },
182
    { 0x74, "LCLS-Connect-Control" },
183
    { 0x75, "LCLS-Connect-Control-Ack" },
184
    { 0x76, "LCLS-Notification" },
185
    { 0x77, "Unallocated" },
186
    { 0x78, "Reroute Command" },
187
    { 0x79, "Reroute Complete" },
188
    { 0, NULL }
189
};
190
191
static value_string_ext gsm_a_bssmap_msg_strings_ext = VALUE_STRING_EXT_INIT(gsm_a_bssmap_msg_strings);
192
193
static const value_string gsm_bssmap_elem_strings[] = {
194
    { BE_UDEF_0,                         "Undefined" },
195
    { BE_CIC,                            "Circuit Identity Code" },
196
    { BE_RSVD_1,                         "Reserved" },
197
    { BE_RES_AVAIL,                      "Resource Available" },
198
    { BE_CAUSE,                          "Cause" },
199
    { BE_CELL_ID,                        "Cell Identifier" },
200
    { BE_PRIO,                           "Priority" },
201
    { BE_L3_HEADER_INFO,                 "Layer 3 Header Information" },
202
    { BE_IMSI,                           "IMSI" },
203
    { BE_TMSI,                           "TMSI" },
204
    { BE_ENC_INFO,                       "Encryption Information" },
205
    { BE_CHAN_TYPE,                      "Channel Type" },
206
    { BE_PERIODICITY,                    "Periodicity" },
207
    { BE_EXT_RES_IND,                    "Extended Resource Indicator" },
208
    { BE_NUM_MS,                         "Number Of MSs" },
209
    { BE_RSVD_2,                         "Reserved" },
210
    { BE_RSVD_3,                         "Reserved" },
211
    { BE_RSVD_4,                         "Reserved" },
212
    { BE_CM_INFO_2,                      "Classmark Information Type 2" },
213
    { BE_CM_INFO_3,                      "Classmark Information Type 3" },
214
    { BE_INT_BAND,                       "Interference Band To Be Used" },
215
    { BE_RR_CAUSE,                       "RR Cause" },
216
    { BE_RSVD_5,                         "Reserved" },
217
    { BE_L3_INFO,                        "Layer 3 Information" },
218
    { BE_DLCI,                           "DLCI" },
219
    { BE_DOWN_DTX_FLAG,                  "Downlink DTX Flag" },
220
    { BE_CELL_ID_LIST,                   "Cell Identifier List" },
221
    { BE_RESP_REQ,                       "Response Request" },
222
    { BE_RES_IND_METHOD,                 "Resource Indication Method" },
223
    { BE_CM_INFO_1,                      "Classmark Information Type 1" },
224
    { BE_CIC_LIST,                       "Circuit Identity Code List" },
225
    { BE_DIAG,                           "Diagnostic" },
226
    { BE_L3_MSG,                         "Layer 3 Message Contents" },
227
    { BE_CHOSEN_CHAN,                    "Chosen Channel" },
228
    { BE_TOT_RES_ACC,                    "Total Resource Accessible" },
229
    { BE_CIPH_RESP_MODE,                 "Cipher Response Mode" },
230
    { BE_CHAN_NEEDED,                    "Channel Needed" },
231
    { BE_TRACE_TYPE,                     "Trace Type" },
232
    { BE_TRIGGERID,                      "TriggerID" },
233
    { BE_TRACE_REF,                      "Trace Reference" },
234
    { BE_TRANSID,                        "TransactionID" },
235
    { BE_MID,                            "Mobile Identity" },
236
    { BE_OMCID,                          "OMCID" },
237
    { BE_FOR_IND,                        "Forward Indicator" },
238
    { BE_CHOSEN_ENC_ALG,                 "Chosen Encryption Algorithm" },
239
    { BE_CCT_POOL,                       "Circuit Pool" },
240
    { BE_CCT_POOL_LIST,                  "Circuit Pool List" },
241
    { BE_TIME_IND,                       "Time Indication" },
242
    { BE_RES_SIT,                        "Resource Situation" },
243
    { BE_CURR_CHAN_1,                    "Current Channel Type 1" },
244
    { BE_QUE_IND,                        "Queuing Indicator" },
245
    { BE_ASS_REQ,                        "Assignment Requirement" },
246
    { BE_UDEF_52,                        "Undefined" },
247
    { BE_TALKER_FLAG,                    "Talker Flag" },
248
    { BE_CONN_REL_REQ,                   "Connection Release Requested" },
249
    { BE_GROUP_CALL_REF,                 "Group Call Reference" },
250
    { BE_EMLPP_PRIO,                     "eMLPP Priority" },
251
    { BE_CONF_EVO_IND,                   "Configuration Evolution Indication" },
252
    { BE_OLD2NEW_INFO,                   "Old BSS to New BSS Information" },
253
    { BE_LSA_ID,                         "LSA Identifier" },
254
    { BE_LSA_ID_LIST,                    "LSA Identifier List" },
255
    { BE_LSA_INFO,                       "LSA Information" },
256
    { BE_LCS_QOS,                        "LCS QoS" },
257
    { BE_LSA_ACC_CTRL,                   "LSA access control suppression" },
258
    { BE_SPEECH_VER,                     "Speech Version" },
259
    { BE_UDEF_65,                        "Undefined" },
260
    { BE_UDEF_66,                        "Undefined" },
261
    { BE_LCS_PRIO,                       "LCS Priority" },
262
    { BE_LOC_TYPE,                       "Location Type" },
263
    { BE_LOC_EST,                        "Location Estimate" },
264
    { BE_POS_DATA,                       "Positioning Data" },
265
    { BE_LCS_CAUSE,                      "LCS Cause" },
266
    { BE_LCS_CLIENT,                     "LCS Client Type" },
267
    { BE_APDU,                           "APDU" },
268
    { BE_NE_ID,                          "Network Element Identity" },
269
    { BE_GPS_ASSIST_DATA,                "GPS Assistance Data" },
270
    { BE_DECIPH_KEYS,                    "Deciphering Keys" },
271
    { BE_RET_ERR_REQ,                    "Return Error Request" },
272
    { BE_RET_ERR_CAUSE,                  "Return Error Cause" },
273
    { BE_SEG,                            "Segmentation" },
274
    { BE_SERV_HO,                        "Service Handover" },
275
    { BE_SRC_RNC_TO_TAR_RNC_UMTS,        "Source RNC to target RNC transparent information (UMTS)" },
276
    { BE_SRC_RNC_TO_TAR_RNC_CDMA,        "Source RNC to target RNC transparent information (cdma2000)" },
277
    { BE_GERAN_CLS_M,                    "GERAN Classmark" },
278
    { BE_GERAN_BSC_CONT,                 "GERAN BSC Container" },
279
    { BE_VEL_EST,                        "Velocity Estimate" },
280
    { BE_UDEF_86,                        "Undefined" },
281
    { BE_UDEF_87,                        "Undefined" },
282
    { BE_UDEF_88,                        "Undefined" },
283
    { BE_UDEF_89,                        "Undefined" },
284
    { BE_UDEF_90,                        "Undefined" },
285
    { BE_UDEF_91,                        "Undefined" },
286
    { BE_UDEF_92,                        "Undefined" },
287
    { BE_UDEF_93,                        "Undefined" },
288
    { BE_UDEF_94,                        "Undefined" },
289
    { BE_UDEF_95,                        "Undefined" },
290
    { BE_UDEF_96,                        "Undefined" },
291
    { BE_NEW_BSS_TO_OLD_BSS_INF,         "New BSS to Old BSS Information" },
292
    { BE_UDEF_98,                        "Undefined" },
293
    { BE_INTER_SYS_INF,                  "Inter-System Information" },
294
    { BE_SNA_ACC_INF,                    "SNA Access Information" },
295
    { BE_VSTK_RAND_INF,                  "VSTK_RAND Information" },
296
    { BE_VSTK_INF,                       "VSTK Information" },
297
    { BE_PAGING_INF,                     "Paging Information" },
298
    { BE_IMEI,                           "IMEI" },
299
    { BE_VGCS_FEAT_FLG,                  "VGCS Feature Flags" },
300
    { BE_TALKER_PRI,                     "Talker Priority" },
301
    { BE_EMRG_SET_IND,                   "Emergency Set Indication" },
302
    { BE_TALKER_ID,                      "Talker Identity" },
303
    { BE_CELL_ID_LIST_SEG,               "Cell Identifier List Segment" },
304
    { BE_SMS_TO_VGCS,                    "SMS to VGCS" },
305
    { BE_VGCS_TALKER_MOD,                "VGCS Talker Mode" },
306
    { BE_VGS_VBS_CELL_STAT,              "VGCS/VBS Cell Status" },
307
    { BE_CELL_ID_LST_SEG_F_EST_CELLS,    "Cell Identifier List Segment for established cells" },
308
    { BE_CELL_ID_LST_SEG_F_CELL_TB_EST,  "Cell Identifier List Segment for cells to be established" },
309
    { BE_CELL_ID_LST_SEG_F_REL_CELL,     "Cell Identifier List Segment for released cells - no user present" },
310
    { BE_CELL_ID_LST_SEG_F_NOT_EST_CELL, "Cell Identifier List Segment for not established cells - no establishment possible" },
311
    { BE_GANSS_ASS_DTA,                  "GANSS Assistance Data" },
312
    { BE_GANSS_POS_DTA,                  "GANSS Positioning Data" },
313
    { BE_GANSS_LOC_TYP,                  "GANSS Location Type" },
314
    { BE_APP_DATA,                       "Application Data" },
315
    { BE_DATA_ID,                        "Data Identity" },
316
    { BE_APP_DATA_INF,                   "Application Data Information" },
317
    { BE_MSISDN,                         "MSISDN" },
318
    { BE_AOIP_TRANS_LAY_ADD,             "AoIP Transport Layer Address" },
319
    { BE_SPEECH_CODEC_LST,               "Speech Codec List" },
320
    { BE_SPEECH_CODEC,                   "Speech Codec" },
321
    { BE_CALL_ID,                        "Call Identifier" },
322
    { BE_CALL_ID_LST,                    "Call Identifier List" },
323
    { BE_A_ITF_SEL_FOR_RESET,            "A-Interface Selector for RESET" },
324
    { BE_UDEF_130,                       "Undefined" },
325
    { BE_KC128,                          "Kc128" },
326
    { BE_CSG_ID,                         "CSG Identifier" },
327
    { BE_REDIR_ATT_FLG,                  "Redirect Attempt Flag" },                                      /* 3.2.2.111    */
328
    { BE_REROUTE_REJ_CAUSE,              "Reroute Reject Cause" },                                       /* 3.2.2.112    */
329
    { BE_SEND_SEQN,                      "Send Sequence Number" },                                       /* 3.2.2.113    */
330
    { BE_REROUTE_OUTCOME,                "Reroute complete outcome" },                                   /* 3.2.2.114    */
331
    { BE_GLOBAL_CALL_REF,                "Global Call Reference" },                                      /* 3.2.2.115    */
332
    { BE_LCLS_CONF,                      "LCLS-Configuration" },                                         /* 3.2.2.116    */
333
    { BE_LCLS_CON_STATUS_CONTROL,        "LCLS-Connection-Status-Control" },                             /* 3.2.2.117    */
334
    { BE_LCLS_CORR_NOT_NEEDED,           "LCLS-Correlation-Not-Needed" },                                /* 3.2.2.118    */
335
    { BE_LCLS_BSS_STATUS,                "LCLS-BSS-Status" },                                            /* 3.2.2.119    */
336
    { BE_LCLS_BREAK_REQ,                 "LCLS-Break-Request" },                                         /* 3.2.2.120    */
337
    { BE_CSFB_IND,                       "CSFB Indication" },                                            /* 3.2.2.121    */
338
    { BE_CS_TO_PS_SRVCC,                 "CS to PS SRVCC" },                                             /* 3.2.2.122    */
339
    { BE_SRC_ENB_2_TGT_ENB_TRANSP_INF,   "Source eNB to target eNB transparent information (E-UTRAN)" }, /* 3.2.2.123    */
340
    { BE_CS_TO_PS_SRVCC_IND,             "CS to PS SRVCC Indication" },                                  /* 3.2.2.124    */
341
    { BE_CN_TO_MS_TRANSP,                "CN to MS transparent information" },                           /* 3.2.2.125    */
342
    { BE_SELECTED_PLMN_ID,               "Selected PLMN ID" },                                           /* 3.2.2.126    */
343
    { BE_LAST_USED_E_UTRAN_PLMN_ID,      "Last used E-UTRAN PLMN ID" },                                  /* 3.2.2.127    */
344
    { BE_UDEF_150,                       "Undefined" },
345
    { BE_UDEF_151,                       "Undefined" },
346
    { BE_UDEF_152,                       "Undefined" },
347
    { BE_UDEF_153,                       "Undefined" },
348
    { BE_UDEF_154,                       "Undefined" },
349
    { BE_UDEF_155,                       "Undefined" },
350
    { BE_UDEF_156,                       "Undefined" },
351
    { BE_UDEF_157,                       "Undefined" },
352
    { BE_UDEF_158,                       "Undefined" },
353
    { BE_UDEF_159,                       "Undefined" },
354
    { BE_UDEF_160,                       "Undefined" },
355
    { BE_UDEF_161,                       "Undefined" },
356
    { BE_UDEF_162,                       "Undefined" },
357
    { BE_UDEF_163,                       "Undefined" },
358
    { BE_UDEF_164,                       "Undefined" },
359
    { BE_UDEF_165,                       "Undefined" },
360
    { BE_UDEF_166,                       "Undefined" },
361
    { BE_UDEF_167,                       "Undefined" },
362
    { BE_UDEF_168,                       "Undefined" },
363
    { BE_UDEF_169,                       "Undefined" },
364
    { BE_UDEF_170,                       "Undefined" },
365
    { BE_UDEF_171,                       "Undefined" },
366
    { BE_UDEF_172,                       "Undefined" },
367
    { BE_UDEF_173,                       "Undefined" },
368
    { BE_UDEF_174,                       "Undefined" },
369
    { BE_UDEF_175,                       "Undefined" },
370
    { BE_UDEF_176,                       "Undefined" },
371
    { BE_UDEF_177,                       "Undefined" },
372
    { BE_UDEF_178,                       "Undefined" },
373
    { BE_UDEF_179,                       "Undefined" },
374
    { BE_UDEF_180,                       "Undefined" },
375
    { BE_UDEF_181,                       "Undefined" },
376
    { BE_UDEF_182,                       "Undefined" },
377
    { BE_UDEF_183,                       "Undefined" },
378
    { BE_UDEF_184,                       "Undefined" },
379
    { BE_UDEF_185,                       "Undefined" },
380
    { BE_UDEF_186,                       "Undefined" },
381
    { BE_UDEF_187,                       "Undefined" },
382
    { BE_UDEF_188,                       "Undefined" },
383
    { BE_UDEF_189,                       "Undefined" },
384
    { BE_UDEF_190,                       "Undefined" },
385
    { BE_UDEF_191,                       "Undefined" },
386
    { BE_UDEF_192,                       "Undefined" },
387
    { BE_UDEF_193,                       "Undefined" },
388
    { BE_UDEF_194,                       "Undefined" },
389
    { BE_UDEF_195,                       "Undefined" },
390
    { BE_UDEF_196,                       "Undefined" },
391
    { BE_UDEF_197,                       "Undefined" },
392
    { BE_UDEF_198,                       "Undefined" },
393
    { BE_UDEF_199,                       "Undefined" },
394
    { BE_UDEF_200,                       "Undefined" },
395
    { BE_UDEF_201,                       "Undefined" },
396
    { BE_UDEF_202,                       "Undefined" },
397
    { BE_UDEF_203,                       "Undefined" },
398
    { BE_UDEF_204,                       "Undefined" },
399
    { BE_UDEF_205,                       "Undefined" },
400
    { BE_UDEF_206,                       "Undefined" },
401
    { BE_UDEF_207,                       "Undefined" },
402
    { BE_UDEF_208,                       "Undefined" },
403
    { BE_UDEF_209,                       "Undefined" },
404
    { BE_UDEF_210,                       "Undefined" },
405
    { BE_UDEF_211,                       "Undefined" },
406
    { BE_UDEF_212,                       "Undefined" },
407
    { BE_UDEF_213,                       "Undefined" },
408
    { BE_UDEF_214,                       "Undefined" },
409
    { BE_UDEF_215,                       "Undefined" },
410
    { BE_UDEF_216,                       "Undefined" },
411
    { BE_UDEF_217,                       "Undefined" },
412
    { BE_UDEF_218,                       "Undefined" },
413
    { BE_UDEF_219,                       "Undefined" },
414
    { BE_UDEF_220,                       "Undefined" },
415
    { BE_UDEF_221,                       "Undefined" },
416
    { BE_UDEF_222,                       "Undefined" },
417
    { BE_UDEF_223,                       "Undefined" },
418
    { BE_UDEF_224,                       "Undefined" },
419
    { BE_UDEF_225,                       "Undefined" },
420
    { BE_UDEF_226,                       "Undefined" },
421
    { BE_UDEF_227,                       "Undefined" },
422
    { BE_UDEF_228,                       "Undefined" },
423
    { BE_UDEF_229,                       "Undefined" },
424
    { BE_UDEF_230,                       "Undefined" },
425
    { BE_UDEF_231,                       "Undefined" },
426
    { BE_UDEF_232,                       "Undefined" },
427
    { BE_UDEF_233,                       "Undefined" },
428
    { BE_UDEF_234,                       "Undefined" },
429
    { BE_UDEF_235,                       "Undefined" },
430
    { BE_UDEF_236,                       "Undefined" },
431
    { BE_UDEF_237,                       "Undefined" },
432
    { BE_UDEF_238,                       "Undefined" },
433
    { BE_UDEF_239,                       "Undefined" },
434
    { BE_OSMOCOM_OSMUX_SUPPORT,          "Osmocom extension: Osmux Support" },
435
    { BE_OSMOCOM_OSMUX_CID,              "Osmocom extension: Osmux CID" },
436
    { 0, NULL }
437
};
438
value_string_ext gsm_bssmap_elem_strings_ext = VALUE_STRING_EXT_INIT(gsm_bssmap_elem_strings);
439
440
/* 3.2.3 Signalling Field Element Coding */
441
static const value_string bssmap_field_element_ids[] = {
442
443
    { 0x1,  "BSSMAP Field Element: Extra information" },                                    /* 3.2.3.1  */
444
    { 0x2,  "BSSMAP Field Element: Current Channel Type 2" },                               /* 3.2.2.2  */
445
    { 0x3,  "BSSMAP Field Element: Target cell radio information" },                        /* 3.2.3.3  */
446
    { 0x4,  "BSSMAP Field Element: GPRS Suspend information" },                             /* 3.2.3.4  */
447
    { 0x5,  "BSSMAP Field Element: MultiRate configuration information" },                  /* 3.2.3.5  */
448
    { 0x6,  "BSSMAP Field Element: Dual Transfer Mode information" },                       /* 3.2.3.6  */
449
    { 0x7,  "BSSMAP Field Element: Inter RAT Handover Info" },                              /* 3.2.3.7  */
450
    /*{ 0x7,    "UE Capability information" },*/                                            /* 3.2.3.7  */
451
    { 0x8,  "BSSMAP Field Element: cdma2000 Capability Information" },                      /* 3.2.3.8  */
452
    { 0x9,  "BSSMAP Field Element: Downlink Cell Load Information" },                       /* 3.2.3.9  */
453
    { 0xa,  "BSSMAP Field Element: Uplink Cell Load Information" },                         /* 3.2.3.10 */
454
    { 0xb,  "BSSMAP Field Element: Cell Load Information Group" },                          /* 3.2.3.11 */
455
    { 0xc,  "BSSMAP Field Element: Cell Load Information" },                                /* 3.2.3.12 */
456
    { 0x0d, "BSSMAP Field Element: PS Indication" },                                        /* 3.2.3.13 */
457
    { 0x0e, "BSSMAP Field Element: DTM Handover Command Indication" },                      /* 3.2.3.14 */
458
    { 0x0f, "BSSMAP Field Element: IRAT Measurement Configuration" },                       /* 3.2.3.16 */
459
    { 0x10, "BSSMAP Field Element: Source Cell ID" },                                       /* 3.2.3.17 */
460
    { 0x11, "BSSMAP Field Element: IRAT Measurement Configuration (extended E-ARFCNs)" },   /* 3.2.3.18 */
461
    { 0x6f, "BSSMAP Field Element: VGCS talker mode" }, /* although technically not a Field Element,
462
                                     this IE can appear in Old BSS to New BSS information */
463
    { 0x95, "BSSMAP Field Element: Last used E-UTRAN PLMN ID" },                            /* 3.2.2.127 */
464
    { 0xfe, "BSSMAP Field Element: D-RNTI" },                                               /* 3.2.3.15 */
465
    { 0, NULL }
466
};
467
468
static const value_string bssap_cc_values[] = {
469
    { 0x0,      "not further specified" },
470
    { 0x2,      "FACCH or SDCCH" },
471
    { 0x3,      "SACCH" },
472
    { 0,        NULL } };
473
474
static const value_string bssap_sapi_values[] = {
475
    { 0x00,     "RR/MM/CC" },
476
    { 0x03,     "SMS" },
477
    { 0,        NULL } };
478
479
static const value_string gsm_a_be_cell_id_disc_vals[] = {
480
    { 0,        "The whole Cell Global Identification, CGI, is used to identify the cells."},
481
    { 1,        "Location Area Code, LAC, and Cell Identify, CI, is used to identify the cells."},
482
    { 2,        "Cell Identity, CI, is used to identify the cells."},
483
    { 3,        "No cell is associated with the transaction."},
484
    { 4,        "Location Area Identification, LAI, is used to identify all cells within a Location Area."},
485
    { 5,        "Location Area Code, LAC, is used to identify all cells within a location area."},
486
    { 6,        "All cells on the BSS are identified."},
487
    { 7,        "Reserved"},
488
    { 8,        "Intersystem Handover to UTRAN or cdma2000. PLMN-ID, LAC, and RNC-ID, are encoded to identify the target RNC."},
489
    { 9,        "Intersystem Handover to UTRAN or cdma2000. The RNC-ID is coded to identify the target RNC."},
490
    { 10,       "Intersystem Handover to UTRAN or cdma2000. LAC and RNC-ID are encoded to identify the target RNC."},
491
    { 11,       "Serving Area Identity, SAI, is used to identify the Serving Area of UE within UTRAN or cdma2000"},
492
    { 12,       "LAC, RNC-ID (or Extended RNC-ID) and Cell Identity, CI, is used to identify a UTRAN cell for cell load information"},
493
    { 13,       "Reserved"},
494
    { 14,       "Reserved"},
495
    { 15,       "Reserved"},
496
    { 0,    NULL }
497
};
498
static value_string_ext gsm_a_be_cell_id_disc_vals_ext = VALUE_STRING_EXT_INIT(gsm_a_be_cell_id_disc_vals);
499
500
#if 0
501
static const value_string gsm_a_rr_channel_needed_vals[] = {
502
    { 0x00,     "Any channel"},
503
    { 0x01,     "SDCCH"},
504
    { 0x02,     "TCH/F (Full rate)"},
505
    { 0x03,     "TCH/H or TCH/F (Dual rate)"},
506
    { 0,    NULL }
507
};
508
#endif
509
510
static const value_string bssmap_positioning_methods[] = {
511
    {  0, "Timing Advance" },
512
    {  1, "Reserved (Note)" },
513
    {  2, "Reserved (Note)" },
514
    {  3, "Mobile Assisted E-OTD" },
515
    {  4, "Mobile Based E-OTD" },
516
    {  5, "Mobile Assisted GPS" },
517
    {  6, "Mobile Based GPS" },
518
    {  7, "Conventional GPS" },
519
    {  8, "U-TDOA" },
520
    {  9, "Reserved for UTRAN use only" },
521
    { 10, "Reserved for UTRAN use only" },
522
    { 11, "Reserved for UTRAN use only" },
523
    { 12, "Cell ID" },
524
    { 0, NULL}
525
};
526
527
/* Positioning Method definitions */
528
static const value_string bssmap_positioning_method_vals[] = {
529
    { 0, "reserved" },
530
    { 1, "Mobile Assisted E-OTD" },
531
    { 2, "Mobile Based E-OTD" },
532
    { 3, "Assisted GPS" },
533
    { 4, "Assisted GANSS" },
534
    { 5, "Assisted GPS and Assisted GANSS" },
535
    { 0, NULL}
536
};
537
538
static const value_string bssmap_positioning_methods_usage[] = {
539
    { 0, "Attempted unsuccessfully due to failure or interruption" },
540
    { 1, "Attempted successfully - results not used to generate location" },
541
    { 2, "Attempted successfully - results used to verify but not generate location" },
542
    { 3, "Attempted successfully - results used to generate location" },
543
    { 4, "Attempted successfully - case where MS supports multiple mobile based positioning methods and the actual method or methods used by the MS cannot be determined" },
544
    { 0, NULL}
545
};
546
547
/* Location Information definitions */
548
static const value_string bssmap_location_information_vals[] = {
549
    { 0, "current geographic location" },
550
    { 1, "location assistance information for the target MS" },
551
    { 2, "deciphering keys for broadcast assistance data for the target MS" },
552
    { 0, NULL}
553
};
554
555
static const true_false_string bssmap_chan_type_extension_value = {
556
    "Additional Octet",
557
    "Last Octet"
558
};
559
560
static const true_false_string bssmap_cause_extension_value = {
561
    "Two Octets",
562
    "One Octet"
563
};
564
565
/* Current Channel Type */
566
static const value_string chan_mode_vals[] = {
567
    { 0, "signalling only" },
568
    { 1, "speech (full rate or half rate)" },
569
    { 6, "data, 14.5 kbit/s radio interface rate" },
570
    { 3, "data, 12.0 kbit/s radio interface rate" },
571
    { 4, "data, 6.0 kbit/s radio interface rate" },
572
    { 5, "data, 3.6 kbit/s radio interface rate" },
573
    { 0x0f, "reserved" },
574
    { 0, NULL}
575
};
576
577
static const value_string fe_cur_chan_type2_chan_field_vals[] = {
578
    {  1, "SDCCH" },
579
    {  8, "1 Full rate TCH" },
580
    {  9, "1 Half rate TCH" },
581
    { 10, "2 Full Rate TCHs" },
582
    { 11, "3 Full Rate TCHs" },
583
    { 12, "4 Full Rate TCHs" },
584
    { 13, "5 Full Rate TCHs" },
585
    { 14, "6 Full Rate TCHs" },
586
    { 15, "7 Full Rate TCHs" },
587
    {  4, "8 Full Rate TCHs" },
588
    {  0, "reserved" },
589
    {  0, NULL}
590
};
591
592
/* Initialize the protocol and registered fields */
593
static int proto_a_bssmap;
594
595
static int hf_gsm_a_bssmap_msg_type;
596
int hf_gsm_a_bssmap_elem_id;
597
static int hf_gsm_a_bssmap_field_elem_id;
598
static int hf_gsm_a_bssmap_field_elem_id_len;
599
static int hf_gsm_a_bssmap_cell_ci;
600
static int hf_gsm_a_bssmap_cell_lac;
601
static int hf_gsm_a_bssmap_sac;
602
static int hf_gsm_a_bssmap_dlci_cc;
603
static int hf_gsm_a_bssmap_dlci_spare;
604
static int hf_gsm_a_bssmap_dlci_sapi;
605
static int hf_gsm_a_bssmap_cause;
606
static int hf_gsm_a_bssmap_be_cell_id_disc;
607
static int hf_gsm_a_bssmap_pci;
608
static int hf_gsm_a_bssmap_qa;
609
static int hf_gsm_a_bssmap_pvi;
610
static int hf_gsm_a_bssmap_interference_bands;
611
static int hf_gsm_a_bssmap_lsa_only;
612
static int hf_gsm_a_bssmap_act;
613
static int hf_gsm_a_bssmap_pref;
614
static int hf_gsm_a_bssmap_lsa_inf_prio;
615
static int hf_gsm_a_bssmap_seq_len;
616
static int hf_gsm_a_bssmap_seq_no;
617
static int hf_gsm_a_bssap_cell_id_list_seg_cell_id_disc;
618
static int hf_gsm_a_bssap_res_ind_method;
619
static int hf_gsm_a_bssap_cic_list_range;
620
static int hf_gsm_a_bssap_cic_list_status;
621
static int hf_gsm_a_bssap_diag_error_pointer;
622
static int hf_gsm_a_bssap_diag_msg_rcv;
623
static int hf_gsm_a_bssmap_ch_mode;
624
static int hf_gsm_a_bssmap_cur_ch_mode;
625
static int hf_gsm_a_bssmap_channel;
626
static int hf_gsm_a_bssmap_trace_trigger_id;
627
static int hf_gsm_a_bssmap_trace_priority_indication;
628
static int hf_gsm_a_bssmap_trace_bss_record_type;
629
static int hf_gsm_a_bssmap_trace_msc_record_type;
630
static int hf_gsm_a_bssmap_trace_invoking_event;
631
static int hf_gsm_a_bssmap_trace_reference;
632
static int hf_gsm_a_bssmap_trace_omc_id;
633
static int hf_gsm_a_bssmap_be_rnc_id;
634
static int hf_gsm_a_bssmap_apdu_protocol_id;
635
static int hf_gsm_a_bssmap_periodicity;
636
static int hf_gsm_a_bssmap_sm;
637
static int hf_gsm_a_bssmap_tarr;
638
static int hf_gsm_a_bssmap_tot_no_of_fullr_ch;
639
static int hf_gsm_a_bssmap_tot_no_of_hr_ch;
640
static int hf_gsm_a_bssmap_smi;
641
static int hf_gsm_a_bssmap_lsa_id;
642
static int hf_gsm_a_bssmap_ep;
643
static int hf_gsm_a_bssmap_lcs_pri;
644
static int hf_gsm_a_bssmap_num_ms;
645
static int hf_gsm_a_bssmap_talker_pri;
646
static int hf_gsm_a_bssmap_rr_mode;
647
static int hf_gsm_a_bssmap_group_cipher_key_nb;
648
static int hf_gsm_a_bssmap_vgcs_vbs_cell_status;
649
static int hf_gsm_a_bssmap_paging_cause;
650
static int hf_gsm_a_bssmap_paging_inf_flg;
651
static int hf_gsm_a_bssmap_serv_ho_inf;
652
static int hf_gsm_a_bssmap_max_nb_traffic_chan;
653
static int hf_gsm_a_bssmap_acceptable_chan_coding_bit5;
654
static int hf_gsm_a_bssmap_acceptable_chan_coding_bit4;
655
static int hf_gsm_a_bssmap_acceptable_chan_coding_bit3;
656
static int hf_gsm_a_bssmap_acceptable_chan_coding_bit2;
657
static int hf_gsm_a_bssmap_acceptable_chan_coding_bit1;
658
static int hf_gsm_a_bssmap_allowed_data_rate_bit8;
659
static int hf_gsm_a_bssmap_allowed_data_rate_bit7;
660
static int hf_gsm_a_bssmap_allowed_data_rate_bit6;
661
static int hf_gsm_a_bssmap_allowed_data_rate_bit5;
662
static int hf_gsm_a_bssmap_allowed_data_rate_bit4;
663
static int hf_gsm_a_bssmap_vstk_rand;
664
static int hf_gsm_a_bssmap_vstk;
665
static int hf_gsm_a_bssmap_spare_bits;
666
static int hf_gsm_a_bssmap_tpind;
667
static int hf_gsm_a_bssmap_asind_b2;
668
static int hf_gsm_a_bssmap_asind_b3;
669
static int hf_gsm_a_bssmap_bss_res;
670
static int hf_gsm_a_bssmap_tcp;
671
static int hf_gsm_a_bssmap_filler_bits;
672
static int hf_gsm_a_bssmap_method;
673
static int hf_gsm_a_bssmap_ganss_id;
674
static int hf_gsm_a_bssmap_usage;
675
static int hf_gsm_a_bssmap_data_id;
676
static int hf_gsm_a_bssmap_bt_ind;
677
static int hf_gsm_a_bssmap_aoip_trans_ipv4;
678
static int hf_gsm_a_bssmap_aoip_trans_ipv6;
679
static int hf_gsm_a_bssmap_aoip_trans_port;
680
static int hf_gsm_a_bssmap_fi;
681
static int hf_gsm_a_bssmap_tf;
682
static int hf_gsm_a_bssmap_pi;
683
static int hf_gsm_a_bssmap_pt;
684
static int hf_gsm_a_bssap_speech_codec;
685
static int hf_gsm_a_bssap_extended_codec;
686
static int hf_gsm_a_bssap_extended_codec_r2;
687
static int hf_gsm_a_bssap_extended_codec_r3;
688
static int hf_gsm_a_bssmap_fi2;
689
static int hf_gsm_a_bssmap_tf2;
690
static int hf_gsm_a_bssmap_pi2;
691
static int hf_gsm_a_bssmap_pt2;
692
static int hf_gsm_a_bssmap_call_id;
693
static int hf_gsm_a_bssmap_spare;
694
static int hf_gsm_a_bssmap_positioning_data_discriminator;
695
static int hf_gsm_a_bssmap_positioning_method;
696
static int hf_gsm_a_bssmap_positioning_method_usage;
697
static int hf_gsm_a_bssmap_location_type_location_information;
698
static int hf_gsm_a_bssmap_location_type_positioning_method;
699
static int hf_gsm_a_bssmap_chan_type_extension;
700
static int hf_gsm_a_bssmap_cause_extension;
701
static int hf_gsm_a_bssmap_ass_req;
702
static int hf_gsm_a_bssmap_emlpp_prio;
703
static int hf_gsm_a_bssmap_rip;
704
static int hf_gsm_a_bssmap_rtd;
705
static int hf_gsm_a_bssmap_kc128;
706
static int hf_gsm_a_bssmap_csg_id;
707
static int hf_gsm_a_bssmap_cell_access_mode;
708
static int hf_fe_extra_info_prec;
709
static int hf_fe_extra_info_lcs;
710
static int hf_fe_extra_info_ue_prob;
711
static int hf_fe_extra_info_spare;
712
static int hf_fe_cur_chan_type2_chan_mode;
713
static int hf_fe_cur_chan_type2_chan_mode_spare;
714
static int hf_fe_cur_chan_type2_chan_field;
715
static int hf_fe_cur_chan_type2_chan_field_spare;
716
static int hf_fe_target_radio_cell_info_rxlev_ncell;
717
static int hf_fe_target_radio_cell_info_rxlev_ncell_spare;
718
static int hf_fe_dtm_info_dtm_ind;
719
static int hf_fe_dtm_info_sto_ind;
720
static int hf_fe_dtm_info_egprs_ind;
721
static int hf_fe_dtm_info_spare_bits;
722
static int hf_fe_cell_load_info_cell_capacity_class;
723
static int hf_fe_cell_load_info_load_value;
724
static int hf_fe_cell_load_info_rt_load_value;
725
static int hf_fe_cell_load_info_nrt_load_information_value;
726
static int hf_fe_ps_indication;
727
static int hf_fe_dtm_ho_command_ind_spare;
728
static int hf_gsm_a_bssmap_speech_data_ind;
729
static int hf_gsm_a_bssmap_channel_rate_and_type;
730
static int hf_gsm_a_bssmap_perm_speech_v_ind;
731
static int hf_gsm_a_bssmap_reroute_rej_cause;
732
static int hf_gsm_a_bssmap_send_seqn;
733
static int hf_gsm_a_bssmap_reroute_outcome;
734
static int hf_gsm_a_bssmap_lcls_conf;
735
static int hf_gsm_a_bssmap_lcls_con_status_control;
736
static int hf_gsm_a_bssmap_lcls_bss_status;
737
static int hf_gsm_a_bssmap_osmocom_osmux_cid;
738
739
/* Generated from convert_proto_tree_add_text.pl */
740
static int hf_gsm_a_bssmap_message_elements;
741
static int hf_gsm_a_bssmap_full_rate_channels_available;
742
static int hf_gsm_a_bssmap_tch_6_4_8kb;
743
static int hf_gsm_a_bssmap_speech_version_id;
744
static int hf_gsm_a_bssmap_cell_id_unknown_format;
745
static int hf_gsm_a_bssmap_tch_12kb;
746
static int hf_gsm_a_bssmap_all_call_identifiers_resources_released;
747
static int hf_gsm_a_bssmap_pcm_multiplexer;
748
static int hf_gsm_a_bssmap_talker_identity_field;
749
static int hf_gsm_a_bssmap_qri;
750
static int hf_gsm_a_bssmap_cause_value;
751
static int hf_gsm_a_bssmap_algorithm_identifier;
752
static int hf_gsm_a_bssmap_tch_14_5_14_4kb;
753
static int hf_gsm_a_bssmap_national_cause;
754
static int hf_gsm_a_bssmap_cause_class;
755
static int hf_gsm_a_bssmap_rate;
756
static int hf_gsm_a_bssmap_tch_14_5kb;
757
static int hf_gsm_a_bssmap_tch_12_9kb;
758
static int hf_gsm_a_bssmap_s0_s7;
759
static int hf_gsm_a_bssmap_tio;
760
static int hf_gsm_a_bssmap_priority_level;
761
static int hf_gsm_a_bssmap_cause16;
762
static int hf_gsm_a_bssmap_enc_info_key;
763
static int hf_gsm_a_bssmap_unknown_format;
764
static int hf_gsm_a_bssmap_timeslot;
765
static int hf_gsm_a_bssmap_transparent_service;
766
static int hf_gsm_a_bssmap_tch_6kb;
767
static int hf_gsm_a_bssmap_circuit_pool_number;
768
static int hf_gsm_a_bssmap_ti_flag;
769
static int hf_gsm_a_bssmap_half_rate_channels_available;
770
static int hf_gsm_a_bssmap_imeisv_included;
771
static int hf_gsm_a_bssmap_bss_activate_downlink;
772
static int hf_gsm_a_bssmap_apdu;
773
static int hf_gsm_a_bssmap_s0_s15;
774
static int hf_gsm_a_bssmap_layer_3_information_value;
775
static int hf_gsm_a_bssmap_gsm_a5_1;
776
static int hf_gsm_a_bssmap_gsm_a5_2;
777
static int hf_gsm_a_bssmap_gsm_a5_3;
778
static int hf_gsm_a_bssmap_gsm_a5_4;
779
static int hf_gsm_a_bssmap_gsm_a5_5;
780
static int hf_gsm_a_bssmap_gsm_a5_6;
781
static int hf_gsm_a_bssmap_gsm_a5_7;
782
static int hf_gsm_a_bssmap_no_encryption;
783
static int hf_gsm_a_bssmap_data_channel_rate_and_type;
784
static int hf_gsm_a_bssmap_cell_discriminator;
785
static int hf_gsm_a_bssmap_layer3_message_contents;
786
static int hf_gsm_a_bssmap_forward_indicator;
787
788
static expert_field ei_gsm_a_bssmap_extraneous_data;
789
static expert_field ei_gsm_a_bssmap_not_decoded_yet;
790
static expert_field ei_gsm_a_bssap_unknown_codec;
791
static expert_field ei_gsm_a_bssmap_bogus_length;
792
static expert_field ei_gsm_a_bssmap_missing_mandatory_element;
793
794
/* Initialize the subtree pointers */
795
static int ett_bssmap_msg;
796
static int ett_cell_list;
797
static int ett_dlci;
798
static int ett_codec_lst;
799
static int ett_bss_to_bss_info;
800
801
static dissector_handle_t gsm_bsslap_handle;
802
static dissector_handle_t dtap_handle;
803
static dissector_handle_t bssgp_handle;
804
static dissector_handle_t rrc_handle;
805
static dissector_handle_t bicc_mst_handle;
806
static dissector_handle_t bssmap_handle;
807
808
static proto_tree *g_tree;
809
static uint8_t cell_discriminator = 0x0f;  /* tracks whether handover is to UMTS */
810
811
static uint16_t
812
be_field_element_dissect(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_);
813
814
#if 0
815
This enum has been moved to packet-gsm_a_common to
816
make it possible to use element dissecton from this dissector
817
in other dissectors.
818
It is left here as a comment for easier reference.
819
820
Note this enum must be of the same size as the element decoding list
821
822
typedef enum
823
{
824
    BE_UDEF_0,                          /* Undefined */
825
    BE_CIC,                             /* Circuit Identity Code */
826
    BE_RSVD_1,                          /* Reserved */
827
    BE_RES_AVAIL,                       /* Resource Available */
828
    BE_CAUSE,                           /* Cause */
829
    BE_CELL_ID,                         /* Cell Identifier */
830
    BE_PRIO,                            /* Priority */
831
    BE_L3_HEADER_INFO,                  /* Layer 3 Header Information */
832
    BE_IMSI,                            /* IMSI */
833
    BE_TMSI,                            /* TMSI */
834
    BE_ENC_INFO,                        /* Encryption Information */
835
    BE_CHAN_TYPE,                       /* Channel Type */
836
    BE_PERIODICITY,                     /* Periodicity */
837
    BE_EXT_RES_IND,                     /* Extended Resource Indicator */
838
    BE_NUM_MS,                          /* Number Of MSs */
839
    BE_RSVD_2,                          /* Reserved */
840
    BE_RSVD_3,                          /* Reserved */
841
    BE_RSVD_4,                          /* Reserved */
842
    BE_CM_INFO_2,                       /* Classmark Information Type 2 */
843
    BE_CM_INFO_3,                       /* Classmark Information Type 3 */
844
    BE_INT_BAND,                        /* Interference Band To Be Used */
845
    BE_RR_CAUSE,                        /* RR Cause */
846
    BE_RSVD_5,                          /* Reserved */
847
    BE_L3_INFO,                         /* Layer 3 Information */
848
    BE_DLCI,                            /* DLCI */
849
    BE_DOWN_DTX_FLAG,                   /* Downlink DTX Flag */
850
    BE_CELL_ID_LIST,                    /* Cell Identifier List */
851
    BE_RESP_REQ,                        /* Response Request */
852
    BE_RES_IND_METHOD,                  /* Resource Indication Method */
853
    BE_CM_INFO_1,                       /* Classmark Information Type 1 */
854
    BE_CIC_LIST,                        /* Circuit Identity Code List */
855
    BE_DIAG,                            /* Diagnostic */
856
    BE_L3_MSG,                          /* Layer 3 Message Contents */
857
    BE_CHOSEN_CHAN,                     /* Chosen Channel */
858
    BE_TOT_RES_ACC,                     /* Total Resource Accessible */
859
    BE_CIPH_RESP_MODE,                  /* Cipher Response Mode */
860
    BE_CHAN_NEEDED,                     /* Channel Needed */
861
    BE_TRACE_TYPE,                      /* Trace Type */
862
    BE_TRIGGERID,                       /* TriggerID */
863
    BE_TRACE_REF,                       /* Trace Reference */
864
    BE_TRANSID,                         /* TransactionID */
865
    BE_MID,                             /* Mobile Identity */
866
    BE_OMCID,                           /* OMCID */
867
    BE_FOR_IND,                         /* Forward Indicator */
868
    BE_CHOSEN_ENC_ALG,                  /* Chosen Encryption Algorithm */
869
    BE_CCT_POOL,                        /* Circuit Pool */
870
    BE_CCT_POOL_LIST,                   /* Circuit Pool List */
871
    BE_TIME_IND,                        /* Time Indication */
872
    BE_RES_SIT,                         /* Resource Situation */
873
    BE_CURR_CHAN_1,                     /* Current Channel Type 1 */
874
    BE_QUE_IND,                         /* Queueing Indicator */
875
    BE_ASS_REQ,                         /* Assignment Requirement */
876
    BE_UDEF_52,                         /* Undefined */
877
    BE_TALKER_FLAG,                     /* Talker Flag */
878
    BE_CONN_REL_REQ,                    /* Connection Release Requested */
879
    BE_GROUP_CALL_REF,                  /* Group Call Reference */
880
    BE_EMLPP_PRIO,                      /* eMLPP Priority */
881
    BE_CONF_EVO_IND,                    /* Configuration Evolution Indication */
882
    BE_OLD2NEW_INFO,                    /* Old BSS to New BSS Information */
883
    BE_LSA_ID,                          /* LSA Identifier */
884
    BE_LSA_ID_LIST,                     /* LSA Identifier List */
885
    BE_LSA_INFO,                        /* LSA Information */
886
    BE_LCS_QOS,                         /* LCS QoS */
887
    BE_LSA_ACC_CTRL,                    /* LSA access control suppression */
888
    BE_SPEECH_VER,                      /* Speech Version */
889
    BE_UDEF_65,                         /* Undefined */
890
    BE_UDEF_66,                         /* Undefined */
891
    BE_LCS_PRIO,                        /* LCS Priority */
892
    BE_LOC_TYPE,                        /* Location Type */
893
    BE_LOC_EST,                         /* Location Estimate */
894
    BE_POS_DATA,                        /* Positioning Data */
895
    BE_LCS_CAUSE,                       /* 3.2.2.66 LCS Cause */
896
    BE_LCS_CLIENT,                      /* 10.14 LCS Client Type */
897
    BE_APDU,                            /* APDU */
898
    BE_NE_ID,                           /* Network Element Identity */
899
    BE_GPS_ASSIST_DATA,                 /* GPS Assistance Data */
900
    BE_DECIPH_KEYS,                     /* Deciphering Keys */
901
    BE_RET_ERR_REQ,                     /* Return Error Request */
902
    BE_RET_ERR_CAUSE,                   /* Return Error Cause */
903
    BE_SEG,                             /* Segmentation */
904
    BE_SERV_HO,                         /* Service Handover */
905
    BE_SRC_RNC_TO_TAR_RNC_UMTS,         /* Source RNC to target RNC transparent information (UMTS) */
906
    BE_SRC_RNC_TO_TAR_RNC_CDMA,         /* Source RNC to target RNC transparent information (cdma2000) */
907
    BE_GERAN_CLS_M,                     /* GERAN Classmark */
908
    BE_GERAN_BSC_CONT,                  /* GERAN BSC Container */
909
    BE_VEL_EST,                         /* Velocity Estimate */
910
    BE_UDEF_86,                         /* Undefined */
911
    BE_UDEF_87,                         /* Undefined */
912
    BE_UDEF_88,                         /* Undefined */
913
    BE_UDEF_89,                         /* Undefined */
914
    BE_UDEF_90,                         /* Undefined */
915
    BE_UDEF_91,                         /* Undefined */
916
    BE_UDEF_92,                         /* Undefined */
917
    BE_UDEF_93,                         /* Undefined */
918
    BE_UDEF_94,                         /* Undefined */
919
    BE_UDEF_95,                         /* Undefined */
920
    BE_UDEF_96,                         /* Undefined */
921
    BE_NEW_BSS_TO_OLD_BSS_INF,          /* New BSS to Old BSS Information */
922
    BE_UDEF_98,                         /* Undefined */
923
    BE_INTER_SYS_INF,                   /* Inter-System Information */
924
    BE_SNA_ACC_INF,                     /* SNA Access Information */
925
    BE_VSTK_RAND_INF,                   /* VSTK_RAND Information */
926
    BE_VSTK_INF,                        /* VSTK Information */
927
    BE_PAGING_INF,                      /* Paging Information */
928
    BE_IMEI,                            /* IMEI */
929
    BE_VGCS_FEAT_FLG,                   /* VGCS Feature Flags */
930
    BE_TALKER_PRI,                      /* Talker Priority */
931
    BE_EMRG_SET_IND,                    /* Emergency Set Indication */
932
    BE_TALKER_ID,                       /* Talker Identity */
933
    BE_CELL_ID_LIST_SEG,                /* Cell Identifier List Segment */
934
    BE_SMS_TO_VGCS,                     /* SMS to VGCS */
935
    BE_VGCS_TALKER_MOD,                 /* VGCS Talker Mode */
936
    BE_VGS_VBS_CELL_STAT,               /* VGCS/VBS Cell Status */
937
    BE_CELL_ID_LST_SEG_F_EST_CELLS,     /* Cell Identifier List Segment for established cells */
938
    BE_CELL_ID_LST_SEG_F_CELL_TB_EST,   /* Cell Identifier List Segment for cells to be established */
939
    BE_CELL_ID_LST_SEG_F_REL_CELL,      /* Cell Identifier List Segment for released cells - no user present */
940
    BE_CELL_ID_LST_SEG_F_NOT_EST_CELL,  /* Cell Identifier List Segment for not established cells - no establishment possible */
941
    BE_GANSS_ASS_DTA,                   /* GANSS Assistance Data */
942
    BE_GANSS_POS_DTA,                   /* GANSS Positioning Data */
943
    BE_GANSS_LOC_TYP,                   /* GANSS Location Type */
944
    BE_APP_DATA,                        /* Application Data */
945
    BE_DATA_ID,                         /* Data Identity */
946
    BE_APP_DATA_INF,                    /* Application Data Information */
947
    BE_MSISDN,                          /* MSISDN */
948
    BE_AOIP_TRANS_LAY_ADD,              /* AoIP Transport Layer Address */
949
    BE_SPEECH_CODEC_LST,                /* Speech Codec List */
950
    BE_SPEECH_CODEC,                    /* Speech Codec */
951
    BE_CALL_ID,                         /* Call Identifier */
952
    BE_CALL_ID_LST,                     /* Call Identifier List */
953
    BE_A_ITF_SEL_FOR_RESET,             /* A-Interface Selector for RESET */
954
    BE_UDEF_130,                        /* Undefined */
955
    BE_KC128,                           /* Kc128 */
956
    BE_CSG_ID,                          /* CSG Identifier */
957
    BE_REDIR_ATT_FLG,                   /* Redirect Attempt Flag               3.2.2.111    */
958
    BE_REROUTE_REJ_CAUSE,               /* Reroute Reject Cause                3.2.2.112    */
959
    BE_SEND_SEQN,                       /* Send Sequence Number                3.2.2.113    */
960
    BE_REROUTE_OUTCOME,                 /* Reroute complete outcome            3.2.2.114    */
961
    BE_GLOBAL_CALL_REF,                 /* Global Call Reference               3.2.2.115    */
962
    BE_LCLS_CONF,                       /* LCLS-Configuration                  3.2.2.116    */
963
    BE_LCLS_CON_STATUS_CONTROL,         /* LCLS-Connection-Status-Control      3.2.2.117    */
964
    BE_LCLS_CORR_NOT_NEEDED,            /* LCLS-Correlation-Not-Needed         3.2.2.118    */
965
    BE_LCLS_BSS_STATUS,                 /* LCLS-BSS-Status                     3.2.2.119    */
966
    BE_LCLS_BREAK_REQ,                  /* LCLS-Break-Request                  3.2.2.120    */
967
    BE_CSFB_IND,                        /* CSFB Indication                     3.2.2.121    */
968
    BE_CS_TO_PS_SRVCC,                  /* CS to PS SRVCC                      3.2.2.122    */
969
    BE_SRC_ENB_2_TGT_ENB_TRANSP_INF,    /* Source eNB to target eNB transparent information (E-UTRAN)" 3.2.2.123    */
970
    BE_CS_TO_PS_SRVCC_IND,              /* CS to PS SRVCC Indication           3.2.2.124    */
971
    BE_CN_TO_MS_TRANSP,                 /* CN to MS transparent information    3.2.2.125    */
972
    BE_SELECTED_PLMN_ID,                /* Selected PLMN ID                    3.2.2.126    */
973
    BE_LAST_USED_EUTRAN_PLMN_ID,        /* Last used E - UTRAN PLMN ID         3.2.2.127    */
974
    BE_UDEF_150,                         /* Undefined Old Location Area Identification    3.2.2.128 */
975
    BE_UDEF_151,                         /* Undefined Attach Indicator    3.2.2.129 */
976
    BE_UDEF_152,                         /* Undefined Selected Operator    3.2.2.130 */
977
    BE_UDEF_153,                         /* Undefined PS Registered Operator    3.2.2.131 */
978
    BE_UDEF_154,                         /* Undefined CS Registered Operator    3.2.2.132*/
979
    BE_UDEF_155,                         /* Undefined */
980
    BE_UDEF_156,                         /* Undefined */
981
    BE_UDEF_157,                         /* Undefined */
982
    BE_UDEF_158,                         /* Undefined */
983
    BE_UDEF_159,                         /* Undefined */
984
    BE_UDEF_160,                         /* Undefined */
985
    BE_UDEF_161,                         /* Undefined */
986
    BE_UDEF_162,                         /* Undefined */
987
    BE_UDEF_163,                         /* Undefined */
988
    BE_UDEF_164,                         /* Undefined */
989
    BE_UDEF_165,                         /* Undefined */
990
    BE_UDEF_166,                         /* Undefined */
991
    BE_UDEF_167,                         /* Undefined */
992
    BE_UDEF_168,                         /* Undefined */
993
    BE_UDEF_169,                         /* Undefined */
994
    BE_UDEF_170,                         /* Undefined */
995
    BE_UDEF_171,                         /* Undefined */
996
    BE_UDEF_172,                         /* Undefined */
997
    BE_UDEF_173,                         /* Undefined */
998
    BE_UDEF_174,                         /* Undefined */
999
    BE_UDEF_175,                         /* Undefined */
1000
    BE_UDEF_176,                         /* Undefined */
1001
    BE_UDEF_177,                         /* Undefined */
1002
    BE_UDEF_178,                         /* Undefined */
1003
    BE_UDEF_179,                         /* Undefined */
1004
    BE_UDEF_180,                         /* Undefined */
1005
    BE_UDEF_181,                         /* Undefined */
1006
    BE_UDEF_182,                         /* Undefined */
1007
    BE_UDEF_183,                         /* Undefined */
1008
    BE_UDEF_184,                         /* Undefined */
1009
    BE_UDEF_185,                         /* Undefined */
1010
    BE_UDEF_186,                         /* Undefined */
1011
    BE_UDEF_187,                         /* Undefined */
1012
    BE_UDEF_188,                         /* Undefined */
1013
    BE_UDEF_189,                         /* Undefined */
1014
    BE_UDEF_190,                         /* Undefined */
1015
    BE_UDEF_191,                         /* Undefined */
1016
    BE_UDEF_192,                         /* Undefined */
1017
    BE_UDEF_193,                         /* Undefined */
1018
    BE_UDEF_194,                         /* Undefined */
1019
    BE_UDEF_195,                         /* Undefined */
1020
    BE_UDEF_196,                         /* Undefined */
1021
    BE_UDEF_197,                         /* Undefined */
1022
    BE_UDEF_198,                         /* Undefined */
1023
    BE_UDEF_199,                         /* Undefined */
1024
    BE_UDEF_200,                         /* Undefined */
1025
    BE_UDEF_201,                         /* Undefined */
1026
    BE_UDEF_202,                         /* Undefined */
1027
    BE_UDEF_203,                         /* Undefined */
1028
    BE_UDEF_204,                         /* Undefined */
1029
    BE_UDEF_205,                         /* Undefined */
1030
    BE_UDEF_206,                         /* Undefined */
1031
    BE_UDEF_207,                         /* Undefined */
1032
    BE_UDEF_208,                         /* Undefined */
1033
    BE_UDEF_209,                         /* Undefined */
1034
    BE_UDEF_210,                         /* Undefined */
1035
    BE_UDEF_211,                         /* Undefined */
1036
    BE_UDEF_212,                         /* Undefined */
1037
    BE_UDEF_213,                         /* Undefined */
1038
    BE_UDEF_214,                         /* Undefined */
1039
    BE_UDEF_215,                         /* Undefined */
1040
    BE_UDEF_216,                         /* Undefined */
1041
    BE_UDEF_217,                         /* Undefined */
1042
    BE_UDEF_218,                         /* Undefined */
1043
    BE_UDEF_219,                         /* Undefined */
1044
    BE_UDEF_220,                         /* Undefined */
1045
    BE_UDEF_221,                         /* Undefined */
1046
    BE_UDEF_222,                         /* Undefined */
1047
    BE_UDEF_223,                         /* Undefined */
1048
    BE_UDEF_224,                         /* Undefined */
1049
    BE_UDEF_225,                         /* Undefined */
1050
    BE_UDEF_226,                         /* Undefined */
1051
    BE_UDEF_227,                         /* Undefined */
1052
    BE_UDEF_228,                         /* Undefined */
1053
    BE_UDEF_229,                         /* Undefined */
1054
    BE_UDEF_230,                         /* Undefined */
1055
    BE_UDEF_231,                         /* Undefined */
1056
    BE_UDEF_232,                         /* Undefined */
1057
    BE_UDEF_233,                         /* Undefined */
1058
    BE_UDEF_234,                         /* Undefined */
1059
    BE_UDEF_235,                         /* Undefined */
1060
    BE_UDEF_236,                         /* Undefined */
1061
    BE_UDEF_237,                         /* Undefined */
1062
    BE_UDEF_238,                         /* Undefined */
1063
    BE_UDEF_239,                         /* Undefined */
1064
    BE_OSMOCOM_OSMUX_SUPPORT = 0xf0,    /* Osmocom extension: Osmux Support */
1065
    BE_OSMOCOM_OSMUX_CID = 0xf1,        /* Osmocom extension: Osmux CID */
1066
    BE_NONE                             /* NONE */
1067
}
1068
bssmap_elem_idx_t;
1069
#endif
1070
1071
3.41k
#define NUM_GSM_BSSMAP_ELEM array_length(gsm_bssmap_elem_strings)
1072
int ett_gsm_bssmap_elem[NUM_GSM_BSSMAP_ELEM];
1073
1074
/*
1075
 * [2] 3.2.2.2 Circuit Identity Code
1076
 */
1077
static uint16_t
1078
be_cic(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string, int string_len)
1079
0
{
1080
0
    uint32_t curr_offset;
1081
0
    uint32_t value;
1082
1083
0
    curr_offset = offset;
1084
1085
0
    value = tvb_get_ntohs(tvb, curr_offset);
1086
1087
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_pcm_multiplexer, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1088
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_timeslot, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1089
0
    curr_offset += 2;
1090
1091
0
    if (add_string)
1092
0
        snprintf(add_string, string_len, " - (%u) (0x%04x)", value, value);
1093
1094
    /* no length check possible */
1095
1096
0
    return curr_offset-offset;
1097
0
}
1098
/*
1099
 * 3.2.2.3  Connection Release Requested
1100
 * No Data
1101
 */
1102
1103
/*
1104
 * 3.2.2.4  Resource Available
1105
 */
1106
static uint16_t
1107
be_res_avail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
1108
0
{
1109
0
    uint32_t curr_offset;
1110
0
    uint16_t value;
1111
0
    int     i;
1112
0
    proto_item* ti;
1113
1114
0
    curr_offset = offset;
1115
1116
0
    for (i=0; i < 5; i++) {
1117
0
        value = tvb_get_ntohl(tvb, curr_offset);
1118
0
        ti = proto_tree_add_uint_format(tree, hf_gsm_a_bssmap_full_rate_channels_available, tvb, curr_offset, 2, value, "Number of full rate channels available in band %u %u",i+1,value);
1119
0
        proto_item_set_len(ti, len);
1120
0
        curr_offset+=2;
1121
0
        ti = proto_tree_add_uint_format(tree, hf_gsm_a_bssmap_half_rate_channels_available, tvb, curr_offset, 2, value, "Number of half rate channels available in band %u %u",i+1, value);
1122
0
        proto_item_set_len(ti, len);
1123
0
        curr_offset+=2;
1124
0
    }
1125
1126
1127
0
    return len;
1128
0
}
1129
/*
1130
 * [2] 3.2.2.5 Cause
1131
 */
1132
static const value_string cause_class_vals[] = {
1133
    { 0, "Normal Event"},
1134
    { 1, "Normal Event"},
1135
    { 2, "Resource Unavailable"},
1136
    { 3, "Service or option not available"},
1137
    { 4, "Service or option not implemented"},
1138
    { 5, "Invalid message (e.g., parameter out of range)"},
1139
    { 6, "Protocol error"},
1140
    { 7, "Interworking"},
1141
    { 0, NULL }
1142
};
1143
1144
static const range_string gsm_a_bssap_cause_rvals[] = {
1145
    { 0x00,     0x00, "Radio interface message failure" },
1146
    { 0x01,     0x01, "Radio interface failure" },
1147
    { 0x02,     0x02, "Uplink quality" },
1148
    { 0x03,     0x03, "Uplink strength" },
1149
    { 0x04,     0x04, "Downlink quality" },
1150
    { 0x05,     0x05, "Downlink strength" },
1151
    { 0x06,     0x06, "Distance" },
1152
    { 0x07,     0x07, "O and M intervention" },
1153
    { 0x08,     0x08, "Response to MSC invocation" },
1154
    { 0x09,     0x09, "Call control" },
1155
    { 0x0a,     0x0a, "Radio interface failure, reversion to old channel" },
1156
    { 0x0b,     0x0b, "Handover successful" },
1157
    { 0x0c,     0x0c, "Better Cell" },
1158
    { 0x0d,     0x0d, "Directed Retry" },
1159
    { 0x0e,     0x0e, "Joined group call channel" },
1160
    { 0x0f,     0x0f, "Traffic" },
1161
    { 0x10,     0x10, "Reduce load in serving cell" },
1162
    { 0x11,     0x11, "Traffic load in target cell higher than in source cell" },
1163
    { 0x12,     0x12, "Relocation triggered" },
1164
    { 0x14,     0x14, "Requested option not authorised" },
1165
    { 0x15,     0x15, "Alternative channel configuration requested" },
1166
    { 0x16,     0x16, "Response to an INTERNAL HANDOVER ENQUIRY message" },
1167
    { 0x17,     0x17, "INTERNAL HANDOVER ENQUIRY reject" },
1168
    { 0x18,     0x18, "Redundancy Level not adequate" },
1169
    { 0x19,     0x1f, "Reserved for national use" },
1170
    { 0x20,     0x20, "Equipment failure" },
1171
    { 0x21,     0x21, "No radio resource available" },
1172
    { 0x22,     0x22, "Requested terrestrial resource unavailable" },
1173
    { 0x23,     0x23, "CCCH overload" },
1174
    { 0x24,     0x24, "Processor overload" },
1175
    { 0x25,     0x25, "BSS not equipped" },
1176
    { 0x26,     0x26, "MS not equipped" },
1177
    { 0x27,     0x27, "Invalid cell" },
1178
    { 0x28,     0x28, "Traffic Load" },
1179
    { 0x29,     0x29, "Preemption" },
1180
    { 0x2a,     0x2a, "DTM Handover - SGSN Failure" },
1181
    { 0x2b,     0x2b, "DTM Handover - PS Allocation failure" },
1182
    { 0x2c,     0x2f, "Reserved for national use" },
1183
    { 0x30,     0x30, "Requested transcoding/rate adaption unavailable" },
1184
    { 0x31,     0x31, "Circuit pool mismatch" },
1185
    { 0x32,     0x32, "Switch circuit pool" },
1186
    { 0x33,     0x33, "Requested speech version unavailable" },
1187
    { 0x34,     0x34, "LSA not allowed" },
1188
    { 0x35,     0x35, "Requested Codec Type or Codec Configuration unavailable" },
1189
    { 0x36,     0x36, "Requested A-Interface Type unavailable" },
1190
    { 0x37,     0x37, "Invalid CSG cell" },
1191
    { 0x38,     0x3e, "Reserved for international use" },
1192
    { 0x3f,     0x3f, "Requested Redundancy Level not available" },
1193
    { 0x40,     0x40, "Ciphering algorithm not supported" },
1194
    { 0x41,     0x41, "GERAN Iu-mode failure" },
1195
    { 0x42,     0x42, "Incoming Relocation Not Supported Due To PUESBINE Feature" },
1196
    { 0x43,     0x43, "Access Restricted Due to Shared Networks" },
1197
    { 0x44,     0x44, "Requested Codec Type or Codec Configuration not supported" },
1198
    { 0x45,     0x45, "Requested A-Interface Type not supported" },
1199
    { 0x46,     0x46, "Requested Redundancy Level not supported" },
1200
    { 0x47,     0x47, "Reserved for international use" },
1201
    { 0x48,     0x4f, "Reserved for national use" },
1202
    { 0x50,     0x50, "Terrestrial circuit already allocated" },
1203
    { 0x51,     0x51, "Invalid message contents" },
1204
    { 0x52,     0x52, "Information element or field missing" },
1205
    { 0x53,     0x53, "Incorrect value" },
1206
    { 0x54,     0x54, "Unknown Message type" },
1207
    { 0x55,     0x55, "Unknown Information Element" },
1208
    { 0x56,     0x56, "DTM Handover - Invalid PS Indication" },
1209
    { 0x57,     0x57, "Call Identifier already allocated" },
1210
    { 0x58,     0x5f, "Reserved for national use" },
1211
    { 0x60,     0x60, "Protocol Error between BSS and MSC" },
1212
    { 0x61,     0x61, "VGCS/VBS call non existent" },
1213
    { 0x62,     0x62, "DTM Handover - Timer Expiry" },
1214
    { 0x63,     0x67, "Reserved for international use" },
1215
    { 0x68,     0x6f, "Reserved for national use" },
1216
    { 0x70,     0x77, "Reserved for international use" },
1217
    { 0x78,     0x7f, "Reserved for national use" },
1218
1219
    { 0, 0, NULL },
1220
};
1221
1222
/* non-static for packet-gsm_gsup.c */
1223
uint16_t
1224
bssmap_dissect_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len)
1225
2
{
1226
2
    uint8_t      oct;
1227
2
    uint32_t     curr_offset;
1228
1229
2
    curr_offset = offset;
1230
1231
2
    oct = tvb_get_uint8(tvb, curr_offset);
1232
1233
2
    proto_tree_add_item(tree, hf_gsm_a_bssmap_cause_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1234
1235
2
    if (oct & 0x80)
1236
1
    {
1237
        /* 2 octet cause */
1238
1239
1
        if ((oct & 0x0f) == 0x00)
1240
0
        {
1241
            /* national cause */
1242
1243
0
            proto_tree_add_item(tree, hf_gsm_a_bssmap_cause_class, tvb, curr_offset, 1, ENC_NA);
1244
0
            proto_tree_add_item(tree, hf_gsm_a_bssmap_national_cause, tvb, curr_offset, 1, ENC_NA);
1245
0
            curr_offset++;
1246
1247
0
            proto_tree_add_item(tree, hf_gsm_a_bssmap_cause_value, tvb, curr_offset, 1, ENC_NA);
1248
0
            curr_offset++;
1249
1250
0
            if (add_string)
1251
0
                snprintf(add_string, string_len, " - (National Cause)");
1252
0
        }
1253
1
        else
1254
1
        {
1255
1
            proto_tree_add_item(tree, hf_gsm_a_bssmap_cause16, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1256
1
            curr_offset+=2;
1257
1
        }
1258
1
    }
1259
1
    else
1260
1
    {
1261
1
        proto_tree_add_item(tree, hf_gsm_a_bssmap_cause,
1262
1
            tvb, curr_offset, 1, ENC_NA);
1263
1264
1
        curr_offset++;
1265
1266
1
        if (add_string)
1267
0
            snprintf(add_string, string_len, " - (%u) %s", oct & 0x7f,
1268
1
                rval_to_str_const(oct & 0x7f, gsm_a_bssap_cause_rvals, "Unknown"));
1269
1
    }
1270
1271
2
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
1272
1273
2
    return curr_offset-offset;
1274
2
}
1275
/*
1276
 * 3.2.2.6  IMSI
1277
 * IMSI coded as the value part of the Mobile Identity IE defined in 3GPP TS 24.008 (NOTE 1)
1278
 * NOTE 1:  The Type of identity field in the Mobile Identity IE shall be ignored by the receiver.
1279
 * Dissected in packet-gsm_a_common.c (de_mid)
1280
 */
1281
1282
/*
1283
 * [2] 3.2.2.7 TMSI
1284
 */
1285
static uint16_t
1286
be_tmsi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len)
1287
0
{
1288
0
    uint32_t curr_offset;
1289
0
    uint32_t value;
1290
1291
0
    curr_offset = offset;
1292
1293
0
    value = tvb_get_ntohl(tvb, curr_offset);
1294
1295
0
    proto_tree_add_uint(tree, hf_gsm_a_tmsi,
1296
0
        tvb, curr_offset, 4,
1297
0
        value);
1298
1299
0
    if (add_string)
1300
0
    snprintf(add_string, string_len, " - (0x%04x)", value);
1301
1302
0
    curr_offset += 4;
1303
1304
0
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
1305
1306
0
    return curr_offset-offset;
1307
0
}
1308
1309
/*
1310
 * [2] 3.2.2.8 Number Of MSs
1311
 */
1312
static uint16_t
1313
be_num_ms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
1314
0
{
1315
0
    uint32_t curr_offset;
1316
1317
0
    curr_offset = offset;
1318
1319
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_num_ms, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1320
0
    curr_offset++;
1321
1322
   /* no length check possible */
1323
1324
0
    return curr_offset-offset;
1325
0
}
1326
/*
1327
 * [2] 3.2.2.9 Layer 3 Header Information
1328
 */
1329
static uint16_t
1330
be_l3_header_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
1331
0
{
1332
0
    uint32_t curr_offset  = offset;
1333
1334
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
1335
1336
0
    proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1337
1338
0
    curr_offset++;
1339
1340
0
    NO_MORE_DATA_CHECK(len);
1341
1342
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
1343
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_ti_flag, tvb, curr_offset, 1, ENC_NA);
1344
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_tio, tvb, curr_offset, 1, ENC_NA);
1345
0
    curr_offset++;
1346
1347
0
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
1348
1349
0
    return curr_offset-offset;
1350
0
}
1351
1352
/*
1353
 * [2] 3.2.2.10 Encryption Information
1354
 */
1355
static const true_false_string tfs_permitted_not_permitted = { "Permitted", "Not permitted" };
1356
1357
static uint16_t
1358
be_enc_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
1359
0
{
1360
0
    uint32_t curr_offset = offset;
1361
1362
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_gsm_a5_7, tvb, curr_offset, 1, ENC_NA);
1363
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_gsm_a5_6, tvb, curr_offset, 1, ENC_NA);
1364
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_gsm_a5_5, tvb, curr_offset, 1, ENC_NA);
1365
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_gsm_a5_4, tvb, curr_offset, 1, ENC_NA);
1366
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_gsm_a5_3, tvb, curr_offset, 1, ENC_NA);
1367
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_gsm_a5_2, tvb, curr_offset, 1, ENC_NA);
1368
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_gsm_a5_1, tvb, curr_offset, 1, ENC_NA);
1369
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_no_encryption, tvb, curr_offset, 1, ENC_NA);
1370
0
    curr_offset++;
1371
1372
0
    NO_MORE_DATA_CHECK(len);
1373
1374
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_enc_info_key, tvb, curr_offset, len - (curr_offset - offset), ENC_NA);
1375
1376
0
    curr_offset += len - (curr_offset - offset);
1377
1378
0
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
1379
1380
0
    return curr_offset-offset;
1381
0
}
1382
1383
/*
1384
 * [2] 3.2.2.11 Channel Type
1385
 */
1386
1387
static const value_string gsm_a_bssap_speech_data_ind_vals[] = {
1388
    { 0x0,  "Reserved"},
1389
    { 0x1,  "Speech"},
1390
    { 0x2,  "Data"},
1391
    { 0x3,  "Signalling"},
1392
    { 0x4,  "Speech + CTM Text Telephony"},
1393
    { 0x5,  "Reserved"},
1394
    { 0x6,  "Reserved"},
1395
    { 0x7,  "Reserved"},
1396
    { 0x8,  "Reserved"},
1397
    { 0x9,  "Reserved"},
1398
    { 0xa,  "Reserved"},
1399
    { 0xb,  "Reserved"},
1400
    { 0xc,  "Reserved"},
1401
    { 0xd,  "Reserved"},
1402
    { 0xe,  "Reserved"},
1403
    { 0xf,  "Reserved"},
1404
    { 0,    NULL }
1405
};
1406
1407
/* Channel Rate and Type */
1408
static const value_string gsm_a_bssap_channel_rate_and_type_vals[] = {
1409
    { 0x08,  "Full rate TCH channel Bm.  Prefer full rate TCH"},
1410
    { 0x09,  "Half rate TCH channel Lm.  Prefer half rate TCH"},
1411
    { 0x0a,  "Full or Half rate channel, Full rate preferred changes allowed after first allocation"},
1412
    { 0x0b,  "Full or Half rate channel, Half rate preferred changes allowed after first allocation"},
1413
    { 0x0f,  "Full or Half rate channel, changes allowed after first allocation"},
1414
    { 0x1a,  "Full or Half rate channel, Full rate preferred changes between full and half rate not allowed after first allocation"},
1415
    { 0x1b,  "Full or Half rate channel, Half rate preferred changes between full and half rate not allowed after first allocation"},
1416
    { 0x1f,  "Full or Half rate channel, changes between full and half rate not allowed after first allocation"},
1417
    { 0,    NULL }
1418
};
1419
1420
static const range_string gsm_a_bssap_channel_rate_and_type_rvals[] = {
1421
    { 0x00,     0x00, "SDCCH or Full rate TCH channel Bm or Half rate TCH channel Lm" },
1422
    { 0x01,     0x01, "SDCCH" },
1423
    { 0x02,     0x02, "SDCCH or Full rate TCH channel Bm" },
1424
    { 0x03,     0x03, "Half rate TCH channel Lm" },
1425
    { 0x04,     0x07, "Reserved" },
1426
    { 0x08,     0x08, "Full rate TCH channel Bm" },
1427
    { 0x09,     0x09, "Half rate TCH channel Lm" },
1428
    { 0x0a,     0x0a, "Full or Half rate TCH channel, Full rate preferred, changes allowed also after first channel allocation as a result of the request" },
1429
    { 0x0b,     0x0b, "Full or Half rate TCH channel, Half rate preferred, changes allowed also after first channel allocation as a result of the request" },
1430
    { 0x0c,     0x19, "Reserved" },
1431
    { 0x1a,     0x1a, "Full or Half rate TCH channel, Full rate preferred, changes allowed also after first channel allocation as a result of the request" },
1432
    { 0x1b,     0x1b, "Full or Half rate TCH channel, Half rate preferred, changes allowed also after first channel allocation as a result of the request" },
1433
    { 0x1c,     0x1f, "Reserved" },
1434
    { 0x20,     0x27, "Full rate TCH channels in a multislot configuration, changes by the BSS of the number of TCHs and if applicable the used radio interface rate per channel allowed after first channel allocation as a result of the request" },
1435
    { 0x28,     0x2f, "Reserved" },
1436
    { 0x30,     0x37, "Full rate TCH channels in a multislot configuration, changes by the BSS of the number of TCHs or the used radio interface rate per channel not allowed after first channel allocation as a result of the request" },
1437
    { 0x38,     0xff, "Reserved" },
1438
    { 0, 0, NULL },
1439
};
1440
1441
static const true_false_string tfs_non_transparent_transparent = {"Non-Transparent", "Transparent"};
1442
1443
uint16_t
1444
be_chan_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len)
1445
0
{
1446
0
    uint8_t      oct;
1447
0
    uint8_t      sdi;
1448
0
    uint8_t      num_chan;
1449
0
    uint32_t     curr_offset = offset;
1450
0
    const char *str;
1451
1452
0
    oct = tvb_get_uint8(tvb, curr_offset);
1453
0
    sdi = oct & 0x0f;
1454
1455
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
1456
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_speech_data_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1457
1458
0
    if (add_string)
1459
0
        snprintf(add_string, string_len, " - (%s)", val_to_str_const(tvb_get_uint8(tvb, curr_offset) & 0x0f,
1460
0
                gsm_a_bssap_speech_data_ind_vals,
1461
0
                "Unknown"));
1462
1463
0
    curr_offset++;
1464
1465
0
    NO_MORE_DATA_CHECK(len);
1466
1467
0
    oct = tvb_get_uint8(tvb, curr_offset);
1468
1469
0
    if ((sdi == 0x01)||(sdi == 0x04))
1470
0
    {
1471
        /* speech */
1472
0
        proto_tree_add_item(tree, hf_gsm_a_bssmap_channel_rate_and_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1473
0
        curr_offset++;
1474
0
        NO_MORE_DATA_CHECK(len);
1475
1476
0
        do
1477
0
        {
1478
0
            proto_tree_add_item(tree, hf_gsm_a_bssmap_chan_type_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1479
0
            proto_tree_add_item(tree, hf_gsm_a_bssmap_perm_speech_v_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1480
0
            curr_offset++;
1481
0
        }
1482
0
        while ((len - (curr_offset - offset)) > 0);
1483
0
    }
1484
0
    else if (sdi == 0x02)
1485
0
    {
1486
        /* data */
1487
1488
0
        num_chan = 0;
1489
1490
0
        if ((oct >= 0x20) && (oct <= 0x27))
1491
0
        {
1492
0
            num_chan = (oct - 0x20) + 1;
1493
0
        }
1494
0
        else if ((oct >= 0x30) && (oct <= 0x37))
1495
0
        {
1496
0
            num_chan = (oct - 0x30) + 1;
1497
0
        }
1498
1499
0
        if (num_chan > 0)
1500
0
        {
1501
0
            proto_tree_add_uint_format_value(tree, hf_gsm_a_bssmap_data_channel_rate_and_type,
1502
0
                tvb, curr_offset, 1, oct, "Max channels %u, %s",
1503
0
                num_chan, rval_to_str_const(oct, gsm_a_bssap_channel_rate_and_type_rvals, "Reserved"));
1504
0
        }
1505
0
        else
1506
0
        {
1507
0
            proto_tree_add_item(tree, hf_gsm_a_bssmap_data_channel_rate_and_type,
1508
0
                tvb, curr_offset, 1, ENC_NA);
1509
0
        }
1510
1511
0
        curr_offset++;
1512
1513
0
        NO_MORE_DATA_CHECK(len);
1514
1515
0
        oct = tvb_get_uint8(tvb, curr_offset);
1516
1517
0
        proto_tree_add_item(tree, hf_gsm_a_bssmap_chan_type_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1518
0
        proto_tree_add_item(tree, hf_gsm_a_bssmap_transparent_service, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1519
1520
0
        if (num_chan == 0)
1521
0
        {
1522
0
            if (oct & 0x40)
1523
0
            {
1524
                /* non-transparent */
1525
1526
0
                switch (oct & 0x3f)
1527
0
                {
1528
0
                case 0x00: str = "12 kbit/s if the channel is a full rate TCH, or 6 kbit/s if the channel is a half rate TCH"; break;
1529
0
                case 0x18: str = "14.5 kbit/s"; break;
1530
0
                case 0x10: str = "12 kbits/s"; break;
1531
0
                case 0x11: str = "6 kbits/s"; break;
1532
0
                case 0x31: str = "29 kbit/s"; break;
1533
0
                case 0x34: str = "43,5 kbit/s"; break;
1534
0
                default:
1535
0
                    str = "Reserved";
1536
0
                    break;
1537
0
                }
1538
0
            }
1539
0
            else
1540
0
            {
1541
0
                switch (oct & 0x3f)
1542
0
                {
1543
0
                case 0x18: str = "14.4 kbit/s"; break;
1544
0
                case 0x10: str = "9.6kbit/s"; break;
1545
0
                case 0x11: str = "4.8kbit/s"; break;
1546
0
                case 0x12: str = "2.4kbit/s"; break;
1547
0
                case 0x13: str = "1.2Kbit/s"; break;
1548
0
                case 0x14: str = "600 bit/s"; break;
1549
0
                case 0x15: str = "1200/75 bit/s (1200 network-to-MS / 75 MS-to-network)"; break;
1550
0
                case 0x39: str = "28,8 kbit/s"; break;
1551
0
                case 0x3a: str = "32,0 kbit/s"; break;
1552
0
                default:
1553
0
                    str = "Reserved";
1554
0
                    break;
1555
0
                }
1556
0
            }
1557
0
        }
1558
0
        else
1559
0
        {
1560
0
            if (oct & 0x40)
1561
0
            {
1562
                /* non-transparent */
1563
1564
0
                switch (oct & 0x3f)
1565
0
                {
1566
0
                case 0x16: str = "58 kbit/s (4x14.5 kbit/s)"; break;
1567
0
                case 0x14: str = "48.0 / 43.5 kbit/s (4x12 kbit/s or 3x14.5 kbit/s)"; break;
1568
0
                case 0x13: str = "36.0 / 29.0 kbit/s (3x12 kbit/s or 2x14.5 kbit/s)"; break;
1569
0
                case 0x12: str = "24.0 / 24.0 (4x6 kbit/s or 2x12 kbit/s)"; break;
1570
0
                case 0x11: str = "18.0 / 14.5 kbit/s (3x6 kbit/s or 1x14.5 kbit/s)"; break;
1571
0
                case 0x10: str = "12.0 / 12.0 kbit/s (2x6 kbit/s or 1x12 kbit/s)"; break;
1572
0
                default:
1573
0
                    str = "Reserved";
1574
0
                    break;
1575
0
                }
1576
0
            }
1577
0
            else
1578
0
            {
1579
0
                switch (oct & 0x3f)
1580
0
                {
1581
0
                case 0x1f: str = "64 kbit/s, bit transparent"; break;
1582
0
                case 0x1e: str = "56 kbit/s, bit transparent"; break;
1583
0
                case 0x1d: str = "56 kbit/s"; break;
1584
0
                case 0x1c: str = "48 kbit/s"; break;
1585
0
                case 0x1b: str = "38.4 kbit/s"; break;
1586
0
                case 0x1a: str = "28.8 kbit/s"; break;
1587
0
                case 0x19: str = "19.2 kbit/s"; break;
1588
0
                case 0x18: str = "14.4 kbit/s"; break;
1589
0
                case 0x10: str = "9.6 kbit/s"; break;
1590
0
                default:
1591
0
                    str = "Reserved";
1592
0
                    break;
1593
0
                }
1594
0
            }
1595
0
        }
1596
1597
0
        proto_tree_add_uint_format_value(tree, hf_gsm_a_bssmap_rate,
1598
0
            tvb, curr_offset, 1, oct & 0x3f, "%s", str);
1599
1600
0
        curr_offset++;
1601
1602
0
        NO_MORE_DATA_CHECK(len);
1603
1604
0
        proto_tree_add_item(tree, hf_gsm_a_bssmap_chan_type_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1605
1606
0
        proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, (curr_offset<<3)+1, 3, ENC_BIG_ENDIAN);
1607
1608
0
        if (num_chan == 0)
1609
0
        {
1610
0
            proto_tree_add_item(tree, hf_gsm_a_bssmap_tch_14_5kb, tvb, curr_offset, 1, ENC_NA);
1611
0
            proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, (curr_offset<<3)+6, 1, ENC_BIG_ENDIAN);
1612
0
            proto_tree_add_item(tree, hf_gsm_a_bssmap_tch_12kb, tvb, curr_offset, 1, ENC_NA);
1613
0
            proto_tree_add_item(tree, hf_gsm_a_bssmap_tch_6kb, tvb, curr_offset, 1, ENC_NA);
1614
0
        }
1615
0
        else
1616
0
        {
1617
0
            proto_tree_add_item(tree, hf_gsm_a_bssmap_tch_14_5_14_4kb, tvb, curr_offset, 1, ENC_NA);
1618
0
            proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, (curr_offset<<3)+6, 1, ENC_BIG_ENDIAN);
1619
0
            proto_tree_add_item(tree, hf_gsm_a_bssmap_tch_12_9kb, tvb, curr_offset, 1, ENC_NA);
1620
0
            proto_tree_add_item(tree, hf_gsm_a_bssmap_tch_6_4_8kb, tvb, curr_offset, 1, ENC_NA);
1621
0
        }
1622
1623
0
        curr_offset++;
1624
0
    }
1625
0
    else if (sdi == 0x03)
1626
0
    {
1627
        /* signalling */
1628
0
        proto_tree_add_item(tree, hf_gsm_a_bssmap_data_channel_rate_and_type,
1629
0
            tvb, curr_offset, 1, ENC_NA);
1630
1631
0
        curr_offset++;
1632
1633
0
        NO_MORE_DATA_CHECK(len);
1634
1635
0
        proto_tree_add_item(tree, hf_gsm_a_bssmap_spare, tvb, curr_offset, len - (curr_offset - offset), ENC_NA);
1636
1637
0
        curr_offset += len - (curr_offset - offset);
1638
0
    }
1639
0
    else
1640
0
    {
1641
        /* unknown format */
1642
1643
0
        proto_tree_add_item(tree, hf_gsm_a_bssmap_unknown_format, tvb, curr_offset, len - (curr_offset - offset), ENC_NA);
1644
1645
0
        curr_offset += len - (curr_offset - offset);
1646
0
    }
1647
1648
0
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
1649
1650
0
    return curr_offset-offset;
1651
0
}
1652
/*
1653
 * 3.2.2.12 Periodicity
1654
 */
1655
static uint16_t
1656
be_periodicity(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
1657
0
{
1658
0
    uint32_t curr_offset;
1659
1660
0
    curr_offset = offset;
1661
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_periodicity, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1662
0
    curr_offset++;
1663
1664
0
    return curr_offset-offset;
1665
0
}
1666
/*
1667
 * 3.2.2.13 Extended Resource Indicator
1668
 */
1669
#if 0
1670
static const true_false_string bssmap_tarr_vals = {
1671
   "The total number of accessible channels is requested",
1672
   "No extra Resource Information is requested"
1673
};
1674
#endif
1675
static uint16_t
1676
be_ext_res_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_)
1677
0
{
1678
0
    uint32_t curr_offset;
1679
1680
0
    curr_offset = offset;
1681
1682
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 6, ENC_BIG_ENDIAN);
1683
    /* the Subsequent Mode field */
1684
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_sm, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1685
    /* Total Accessible Resource Requested field */
1686
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_tarr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1687
0
    curr_offset++;
1688
1689
1690
0
    return curr_offset-offset;
1691
0
}
1692
/*
1693
 * 3.2.2.14 Total Resource Accessible
1694
 */
1695
static uint16_t
1696
be_tot_res_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
1697
0
{
1698
0
    uint32_t curr_offset;
1699
1700
0
    curr_offset = offset;
1701
1702
    /* Total number of accessible full rate channels */
1703
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_tot_no_of_fullr_ch, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1704
0
    curr_offset+=2;
1705
    /* Total number of accessible half rate channels */
1706
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_tot_no_of_hr_ch, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1707
    /*curr_offset+=2;*/
1708
1709
1710
0
    return len;
1711
0
}
1712
/*
1713
 * 3.2.2.15 LSA Identifier
1714
 * The octets 3-5 are coded as specified in 3GPP TS 23.003, 'Identification of Localised Service Area'. Bit 8 of octet 3 is the MSB.
1715
 */
1716
static uint16_t
1717
be_lsa_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_)
1718
0
{
1719
0
    uint32_t curr_offset;
1720
1721
0
    curr_offset = offset;
1722
1723
    /* TS 23.003:
1724
     * The LSA ID consists of 24 bits, numbered from 0 to 23, with bit 0 being the LSB.
1725
     * Bit 0 indicates whether the LSA is a PLMN significant number or a universal LSA.
1726
     * If the bit is set to 0 the LSA is a PLMN significant number; if it is set to
1727
     * 1 it is a universal LSA.
1728
     */
1729
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_lsa_id, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
1730
    /*curr_offset+=3;*/
1731
1732
1733
0
    return len;
1734
0
}
1735
1736
1737
/*
1738
 * 3.2.2.16 LSA Identifier List
1739
 */
1740
static uint16_t
1741
be_lsa_id_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_)
1742
0
{
1743
0
    uint32_t curr_offset;
1744
1745
0
    curr_offset = offset;
1746
1747
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 7, ENC_BIG_ENDIAN);
1748
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_ep, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1749
0
    curr_offset++;
1750
1751
    /* LSA identification 1 - n */
1752
1753
0
    while (curr_offset-offset < len) {
1754
0
        proto_tree_add_item(tree, hf_gsm_a_bssmap_lsa_id, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
1755
0
        curr_offset+=3;
1756
0
    }
1757
1758
0
    return len;
1759
0
}
1760
/*
1761
 * [2] 3.2.2.17 Cell Identifier
1762
 * Formats everything after the discriminator, shared function
1763
 */
1764
uint16_t
1765
be_cell_id_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len, uint8_t disc, e212_number_type_t number_type)
1766
2.75k
{
1767
2.75k
    uint32_t value;
1768
2.75k
    uint32_t curr_offset;
1769
1770
2.75k
    if (add_string)
1771
216
    add_string[0] = '\0';
1772
2.75k
    curr_offset = offset;
1773
1774
2.75k
    switch (disc)
1775
2.75k
    {
1776
211
    case 0x00:
1777
        /* FALLTHRU */
1778
1779
429
    case 0x04:
1780
        /* FALLTHRU */
1781
1782
489
    case 0x08:  /* For intersystem handover from GSM to UMTS or cdma2000: */
1783
        /* FALLTHRU */
1784
572
    case 0xb:
1785
        /* Serving Area Identity, SAI, is used to identify the Serving Area of UE
1786
         * within UTRAN or cdma2000.
1787
         * Coding of Cell Identification for Cell identification discriminator = 1011
1788
         * The coding of SAI is defined in 3GPP TS 25.413, without the protocol extension
1789
         * container.
1790
         * TS 25.413:
1791
         * SAI ::= SEQUENCE {
1792
         * pLMNidentity PLMNidentity,
1793
         * lAC LAC,
1794
         * sAC SAC,
1795
         * iE-Extensions ProtocolExtensionContainer { {SAI-ExtIEs} } OPTIONAL
1796
         * }
1797
         */
1798
        /* FALLTHRU */
1799
749
    case 0x0c:  /* For identification of a UTRAN cell for cell load information: */
1800
749
        if (disc != 0x0b)
1801
666
            curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, number_type, true);
1802
83
        else
1803
83
            curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, number_type, false);
1804
        /* FALLTHRU */
1805
1806
978
    case 0x01:
1807
1.16k
    case 0x05:
1808
1.33k
    case 0x0a: /*For intersystem handover from GSM to UMTS or cdma2000: */
1809
        /* LAC */
1810
1.33k
        value = tvb_get_ntohs(tvb, curr_offset);
1811
1.33k
        proto_tree_add_item(tree, hf_gsm_a_bssmap_cell_lac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1812
1.33k
        curr_offset += 2;
1813
1814
1.33k
        if (add_string)
1815
0
            snprintf(add_string, string_len, " - LAC (0x%04x)", value);
1816
1.33k
        if (disc == 0x0b) {
1817
            /* If SAI, SAC follows */
1818
80
            value = tvb_get_ntohs(tvb, curr_offset);
1819
80
            proto_tree_add_item(tree, hf_gsm_a_bssmap_sac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1820
80
            if (add_string) {
1821
0
                char *str = ws_strdup_printf("%s/SAC (%u)", add_string, value);
1822
0
                g_strlcpy(add_string, str, string_len);
1823
0
                g_free(str);
1824
0
            }
1825
80
            curr_offset += 2;
1826
80
            break;
1827
80
        }
1828
        /* FALLTHRU */
1829
1830
1.74k
    case 0x09: /* For intersystem handover from GSM to UMTS or cdma2000: */
1831
1832
1.74k
        if ((disc == 0x08) ||(disc == 0x09) || (disc == 0x0a)|| (disc == 0x0c)) {
1833
            /* RNC-ID
1834
             * The octets 9-10 are coded as the RNC-ID (0..4095) or the
1835
             * Extended RNC-ID (4096..65535) specified in 3GPP TS 25.413 [31]:
1836
             * XXX is this a PER encoded number?
1837
             */
1838
896
            value = tvb_get_ntohs(tvb, curr_offset);
1839
896
            proto_tree_add_item(tree, hf_gsm_a_bssmap_be_rnc_id, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1840
896
            curr_offset += 2;
1841
1842
896
            if (add_string)
1843
0
            {
1844
0
                if (add_string[0] == '\0')
1845
0
                {
1846
0
                    snprintf(add_string, string_len, " - RNC-ID (%u)", value);
1847
0
                }
1848
0
                else
1849
0
                {
1850
0
                    char *str = ws_strdup_printf("%s/RNC-ID (%u)", add_string, value);
1851
0
                    g_strlcpy(add_string, str, string_len);
1852
0
                    g_free(str);
1853
0
                }
1854
0
            }
1855
896
            break;
1856
896
        }
1857
1858
850
        if ((disc == 0x04) || (disc == 0x05) || (disc == 0x08)) break;
1859
1860
        /* FALLTHRU */
1861
1862
1.26k
    case 0x02:
1863
        /* CI */
1864
1865
1.26k
        value = tvb_get_ntohs(tvb, curr_offset);
1866
1.26k
        proto_tree_add_uint(tree, hf_gsm_a_bssmap_cell_ci, tvb,
1867
1.26k
            curr_offset, 2, value);
1868
1869
1.26k
        curr_offset += 2;
1870
1871
1.26k
        if (add_string)
1872
212
        {
1873
212
            if (add_string[0] == '\0')
1874
212
            {
1875
212
                snprintf(add_string, string_len, " - CI (%u)", value);
1876
212
            }
1877
0
            else
1878
0
            {
1879
0
                char *str = ws_strdup_printf("%s/CI (%u)", add_string, value);
1880
0
                g_strlcpy(add_string, str, string_len);
1881
0
                g_free(str);
1882
0
            }
1883
212
        }
1884
1.26k
        break;
1885
117
    default:
1886
117
        proto_tree_add_item(tree, hf_gsm_a_bssmap_cell_id_unknown_format, tvb, curr_offset, len, ENC_NA);
1887
1888
117
        curr_offset += (len);
1889
117
        break;
1890
2.75k
    }
1891
1892
2.71k
    return curr_offset-offset;
1893
2.75k
}
1894
1895
uint16_t
1896
be_cell_id_aux(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len, uint8_t disc)
1897
2.75k
{
1898
2.75k
    return be_cell_id_type(tvb, tree, pinfo, offset, len, add_string, string_len, disc, E212_NONE);
1899
2.75k
}
1900
1901
static uint16_t
1902
be_cell_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string, int string_len)
1903
0
{
1904
0
    uint8_t oct;
1905
0
    uint8_t disc;
1906
0
    uint32_t curr_offset;
1907
1908
0
    curr_offset = offset;
1909
1910
0
    oct = tvb_get_uint8(tvb, curr_offset);
1911
1912
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
1913
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_be_cell_id_disc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1914
0
    disc = oct&0x0f;
1915
0
    cell_discriminator = disc; /* may be required later */
1916
0
    curr_offset++;
1917
1918
0
    NO_MORE_DATA_CHECK(len);
1919
1920
0
    curr_offset +=
1921
0
    be_cell_id_aux(tvb, tree, pinfo, curr_offset, len - (curr_offset - offset), add_string, string_len, disc);
1922
1923
    /* no length check possible */
1924
1925
0
    return curr_offset-offset;
1926
0
}
1927
1928
/*
1929
 * [2] 3.2.2.18 Priority
1930
 */
1931
static const true_false_string bssmap_pci_value = {
1932
   "This allocation request may preempt an existing connection",
1933
   "This allocation request shall not preempt an existing connection"
1934
};
1935
1936
static const true_false_string bssmap_pvi_value = {
1937
   "This connection might be preempted by another allocation request",
1938
   "This connection shall not be preempted by another allocation request"
1939
};
1940
1941
static const range_string bssmap_prio_rvals[] = {
1942
    { 0x00,     0x00, "Spare" },
1943
    { 0x01,     0x0E, "1 is highest" },
1944
    { 0x0F,     0x0f, "priority not used" },
1945
    { 0, 0, NULL },
1946
};
1947
1948
uint16_t
1949
be_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string, int string_len)
1950
17
{
1951
17
    uint8_t      oct;
1952
17
    uint32_t     curr_offset;
1953
1954
17
    curr_offset = offset;
1955
1956
17
    oct = tvb_get_uint8(tvb, curr_offset);
1957
1958
17
    proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1959
17
    proto_tree_add_item(tree, hf_gsm_a_bssmap_pci, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1960
17
    proto_tree_add_item(tree, hf_gsm_a_bssmap_priority_level, tvb, curr_offset, 1, ENC_NA);
1961
1962
17
    if (add_string)
1963
1
        snprintf(add_string, string_len, " - (%u)", (oct & 0x3c) >> 2);
1964
1965
17
    proto_tree_add_item(tree, hf_gsm_a_bssmap_qa, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1966
17
    proto_tree_add_item(tree, hf_gsm_a_bssmap_pvi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1967
1968
17
    curr_offset++;
1969
1970
    /* no length check possible */
1971
1972
17
    return curr_offset-offset;
1973
17
}
1974
/*
1975
 * 3.2.2.19 Classmark Information Type 2
1976
 * The classmark octets 3, 4 and 5 are coded in the same way as the
1977
 * equivalent octets in the Mobile station classmark 2 element of
1978
 * 3GPP TS 24.008
1979
 * dissected in packet-gsm_a_common.c
1980
 */
1981
/*
1982
 * 3.2.2.20 Classmark Information Type 3
1983
 * The classmark octets 3 to 34 are coded in the same way as the
1984
 * equivalent octets in the Mobile station classmark 3 element of
1985
 * 3GPP TS 24.008.
1986
 * dissected in packet-gsm_a_common.c
1987
 */
1988
/*
1989
 * 3.2.2.21 Interference Band To Be Used
1990
 */
1991
static uint16_t
1992
be_int_band(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
1993
0
{
1994
0
    uint32_t curr_offset;
1995
1996
0
    curr_offset = offset;
1997
1998
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 3, ENC_BIG_ENDIAN);
1999
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_interference_bands, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2000
0
    curr_offset++;
2001
2002
2003
0
    return curr_offset-offset;
2004
0
}
2005
/*
2006
 * 3.2.2.22 RR Cause
2007
 * Octet 2 is coded as the equivalent field from 3GPP TS 24.008
2008
 * Dissected in packet-gsm_a_rr.c
2009
 */
2010
/*
2011
 * 3.2.2.23 LSA Information
2012
 */
2013
2014
static const true_false_string bssmap_lsa_only_value = {
2015
   "Access to the LSAs that are defined",
2016
   "Allowing emergency call"
2017
};
2018
2019
static uint16_t
2020
be_lsa_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2021
4
{
2022
4
    uint32_t curr_offset;
2023
2024
4
    curr_offset = offset;
2025
2026
4
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 7, ENC_BIG_ENDIAN);
2027
4
    proto_tree_add_item(tree, hf_gsm_a_bssmap_lsa_only, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2028
4
    curr_offset++;
2029
2030
123
    while (curr_offset-offset < len) {
2031
        /* LSA identification and attributes */
2032
        /* 8    7   6   5    4  3   2   1
2033
         * spare    act pref priority
2034
         */
2035
119
        proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 2, ENC_BIG_ENDIAN);
2036
119
        proto_tree_add_item(tree, hf_gsm_a_bssmap_act, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2037
119
        proto_tree_add_item(tree, hf_gsm_a_bssmap_pref, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2038
119
        proto_tree_add_item(tree, hf_gsm_a_bssmap_lsa_inf_prio, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2039
119
        curr_offset++;
2040
119
        proto_tree_add_item(tree, hf_gsm_a_bssmap_lsa_id, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
2041
119
        curr_offset+=3;
2042
119
    }
2043
2044
4
    return len;
2045
4
}
2046
/*
2047
 * [2] 3.2.2.24 Layer 3 Information
2048
 */
2049
static uint16_t
2050
be_l3_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
2051
0
{
2052
0
    uint32_t  curr_offset;
2053
0
    tvbuff_t *l3_tvb;
2054
0
    proto_item* ti;
2055
2056
0
    curr_offset = offset;
2057
2058
0
    proto_tree_add_bytes_format(tree, hf_gsm_a_bssmap_layer_3_information_value, tvb, curr_offset, len, NULL,
2059
0
        "Layer 3 Information value");
2060
2061
    /*
2062
     * dissect the embedded DTAP message
2063
     */
2064
0
    l3_tvb = tvb_new_subset_length(tvb, curr_offset, len);
2065
2066
    /* This information element carries a radio interface message.
2067
       In the case of an Intersystem handover to UMTS,
2068
       this information element contains a HANDOVER TO UTRAN COMMAND message
2069
       as defined in 3GPP TS 25.331.
2070
       In the case of an Inter BSC handover,
2071
       it contains an RR HANDOVER COMMAND message as defined in 3GPP TS 44.018.
2072
       In the case of an Intersystem handover to cdma2000,
2073
       this information element contains the HANDOVER TO CDMA2000 COMMAND message,
2074
       as defined in 3GPP TS 44.018. */
2075
2076
    /* note that we can't (from this PDU alone) determine whether a handover is to UMTS or cdma2000
2077
       Maybe if cdma2000 support is added later, a preference option would select dissection of cdma2000 or UMTS.
2078
       If SCCP trace is enabled (and the cell discriminator has correctly appeared in an earlier PDU)
2079
       then we will have remembered the discriminator */
2080
0
    if ( cell_discriminator == 0xFF)
2081
0
    {
2082
0
        ti = proto_tree_add_uint_format(tree, hf_gsm_a_bssmap_cell_discriminator, l3_tvb, curr_offset, 1, cell_discriminator,
2083
0
            "Cell Discriminator not initialised, try enabling the SCCP protocol option [Trace Associations], \n or maybe the file does not contain the PDUs needed for SCCP trace");
2084
0
        proto_item_set_len(ti, len);
2085
0
    }
2086
0
    else if ((cell_discriminator & 0x0f) < 8) {
2087
0
        ti = proto_tree_add_uint(tree, hf_gsm_a_bssmap_cell_discriminator, l3_tvb, curr_offset, 1, cell_discriminator);
2088
        /* cell_discriminator is a preference, so value should be known, but keeping presence of field consistent for filtering */
2089
0
        proto_item_set_hidden(ti);
2090
2091
        /* GSM */
2092
0
        call_dissector(dtap_handle, l3_tvb, pinfo, g_tree);
2093
0
    }
2094
0
    else if ((cell_discriminator & 0x0f) < 13) {
2095
0
        ti = proto_tree_add_uint(tree, hf_gsm_a_bssmap_cell_discriminator, l3_tvb, curr_offset, 1, cell_discriminator);
2096
        /* cell_discriminator is a preference, so value should be known, but keeping presence of field consistent for filtering */
2097
0
        proto_item_set_hidden(ti);
2098
2099
        /* UMTS or CDMA 2000 */
2100
0
        dissect_rrc_HandoverToUTRANCommand_PDU(l3_tvb, pinfo, g_tree, NULL);
2101
0
    }
2102
0
    else{
2103
0
        ti = proto_tree_add_uint_format(tree, hf_gsm_a_bssmap_cell_discriminator, l3_tvb, curr_offset, 1, cell_discriminator,
2104
0
                        "Unrecognised Cell Discriminator %x",cell_discriminator);
2105
0
        proto_item_set_len(ti, len);
2106
0
    }
2107
0
    curr_offset += len;
2108
2109
0
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
2110
2111
0
    return curr_offset-offset;
2112
0
}
2113
2114
/*
2115
 * [2] 3.2.2.25 DLCI
2116
 */
2117
static uint16_t
2118
be_dlci(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2119
0
{
2120
0
    uint8_t     oct;
2121
0
    uint32_t    curr_offset;
2122
0
    proto_tree *subtree;
2123
2124
0
    curr_offset = offset;
2125
2126
0
    subtree =
2127
0
    proto_tree_add_subtree(tree, tvb, curr_offset, 1,
2128
0
        ett_dlci, NULL, "Data Link Connection Identifier");
2129
2130
0
    oct = tvb_get_uint8(tvb, curr_offset);
2131
2132
0
    proto_tree_add_uint(subtree, hf_gsm_a_bssmap_dlci_cc, tvb, curr_offset, 1, oct);
2133
0
    proto_tree_add_uint(subtree, hf_gsm_a_bssmap_dlci_spare, tvb, curr_offset, 1, oct);
2134
0
    proto_tree_add_uint(subtree, hf_gsm_a_bssmap_dlci_sapi, tvb, curr_offset, 1, oct);
2135
2136
0
    curr_offset++;
2137
2138
    /* no length check possible */
2139
2140
0
    return curr_offset-offset;
2141
0
}
2142
2143
/*
2144
 * [2] 3.2.2.26 Downlink DTX Flag
2145
 */
2146
static uint16_t
2147
be_down_dtx_flag(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2148
0
{
2149
0
    uint32_t curr_offset  = offset;
2150
2151
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 7, ENC_BIG_ENDIAN);
2152
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_bss_activate_downlink, tvb, curr_offset, 1, ENC_NA);
2153
0
    curr_offset++;
2154
2155
    /* no length check possible */
2156
2157
0
    return curr_offset-offset;
2158
0
}
2159
2160
/*
2161
 * [2] 3.2.2.27 Cell Identifier List
2162
 */
2163
uint16_t
2164
be_cell_id_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len)
2165
185
{
2166
185
    uint8_t     oct;
2167
185
    uint16_t    consumed;
2168
185
    uint8_t     disc;
2169
185
    uint8_t     num_cells;
2170
185
    uint32_t    curr_offset;
2171
185
    proto_item *item    = NULL;
2172
185
    proto_tree *subtree = NULL;
2173
2174
185
    curr_offset = offset;
2175
2176
185
    oct = tvb_get_uint8(tvb, curr_offset);
2177
2178
185
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
2179
2180
185
    disc = oct & 0x0f;
2181
185
    cell_discriminator = disc; /* may be required later */
2182
185
    proto_tree_add_item(tree, hf_gsm_a_bssmap_be_cell_id_disc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2183
185
    curr_offset++;
2184
2185
185
    NO_MORE_DATA_CHECK(len);
2186
2187
175
    num_cells = 0;
2188
175
    do
2189
2.54k
    {
2190
2.54k
        subtree =
2191
2.54k
        proto_tree_add_subtree_format(tree,
2192
2.54k
            tvb, curr_offset, -1,
2193
2.54k
            ett_cell_list, &item, "Cell %u",
2194
2.54k
            num_cells + 1);
2195
2196
2.54k
        if (add_string)
2197
0
            add_string[0] = '\0';
2198
2199
2.54k
        consumed =
2200
2.54k
            be_cell_id_aux(tvb, subtree, pinfo, curr_offset, len - (curr_offset - offset), add_string, string_len, disc);
2201
2202
2.54k
        if (add_string && add_string[0] != '\0')
2203
0
            proto_item_append_text(item, "%s", add_string);
2204
2205
2.54k
        proto_item_set_len(item, consumed);
2206
2207
2.54k
        curr_offset += consumed;
2208
2209
2.54k
        num_cells++;
2210
2.54k
    }
2211
2.54k
    while ((len - (curr_offset - offset)) > 0 && consumed > 0);
2212
2213
175
    if (add_string) {
2214
0
        snprintf(add_string, string_len, " - %u cell%s",
2215
0
            num_cells, plurality(num_cells, "", "s"));
2216
0
    }
2217
2218
175
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
2219
2220
175
    return curr_offset-offset;
2221
185
}
2222
/*
2223
 * 3.2.2.27a    Cell Identifier List Segment
2224
 */
2225
2226
static const value_string gsm_a_bssap_cell_id_list_seg_cell_id_disc_vals[] = {
2227
    { 0x0,  "The whole Cell Global Identification, CGI, is used to identify the cells"},
2228
    { 0x1,  "Location Area Code, LAC, and Cell Identify, CI, is used to identify the cells within a given MCC and MNC"},
2229
    { 0x2,  "Cell Identity, CI, is used to identify the cells within a given MCC and MNC and LAC"},
2230
    { 0x3,  "No cell is associated with the transaction"},
2231
    { 0x4,  "Location Area Identification, LAI, is used to identify all cells within a Location Area"},
2232
    { 0x5,  "Location Area Code, LAC, is used to identify all cells within a location area"},
2233
    { 0x6,  "All cells on the BSS are identified"},
2234
    { 0x7,  "MCC and MNC, is used to identify all cells within the given MCC and MNC"},
2235
    { 0,    NULL }
2236
};
2237
2238
static uint16_t
2239
be_cell_id_list_seg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2240
0
{
2241
0
    uint32_t curr_offset;
2242
2243
0
    curr_offset = offset;
2244
2245
    /* Sequence Length */
2246
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_seq_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2247
    /* Sequence Number */
2248
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_seq_no, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2249
0
    curr_offset++;
2250
2251
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
2252
    /* Cell identification discriminator */
2253
0
    proto_tree_add_item(tree, hf_gsm_a_bssap_cell_id_list_seg_cell_id_disc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2254
0
    curr_offset++;
2255
0
    proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len-2);
2256
2257
2258
0
    return len;
2259
0
}
2260
2261
/*
2262
 * 3.2.2.27b    Cell Identifier List Segment for established cells
2263
 */
2264
static uint16_t
2265
be_cell_id_lst_seg_f_est_cells(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2266
0
{
2267
0
    uint32_t curr_offset;
2268
2269
0
    curr_offset = offset;
2270
2271
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
2272
    /* Cell identification discriminator */
2273
0
    proto_tree_add_item(tree, hf_gsm_a_bssap_cell_id_list_seg_cell_id_disc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2274
0
    curr_offset++;
2275
2276
0
    proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len-1);
2277
2278
2279
0
    return len;
2280
0
}
2281
/*
2282
 * 3.2.2.27c    Cell Identifier List Segment for cells to be established
2283
 */
2284
static uint16_t
2285
be_cell_id_lst_seg_f_cell_tb_est(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2286
0
{
2287
0
    uint32_t curr_offset;
2288
2289
0
    curr_offset = offset;
2290
2291
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
2292
    /* Cell identification discriminator */
2293
0
    proto_tree_add_item(tree, hf_gsm_a_bssap_cell_id_list_seg_cell_id_disc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2294
0
    curr_offset++;
2295
2296
0
    proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len-1);
2297
2298
2299
0
    return len;
2300
0
}
2301
/*
2302
 * 3.2.2.27d    (void)
2303
 */
2304
/*
2305
 * 3.2.2.27e    Cell Identifier List Segment for released cells - no user present
2306
 */
2307
static uint16_t
2308
be_cell_id_lst_seg_f_rel_cell(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2309
0
{
2310
0
    uint32_t curr_offset;
2311
2312
0
    curr_offset = offset;
2313
2314
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
2315
    /* Cell identification discriminator */
2316
0
    proto_tree_add_item(tree, hf_gsm_a_bssap_cell_id_list_seg_cell_id_disc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2317
0
    curr_offset++;
2318
2319
0
    proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len-1);
2320
2321
2322
0
    return len;
2323
0
}
2324
/*
2325
 * 3.2.2.27f    Cell Identifier List Segment for not established cells - no establishment possible
2326
 */
2327
static uint16_t
2328
be_cell_id_lst_seg_f_not_est_cell(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2329
0
{
2330
0
    uint32_t curr_offset;
2331
2332
0
    curr_offset = offset;
2333
2334
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
2335
    /* Cell identification discriminator */
2336
0
    proto_tree_add_item(tree, hf_gsm_a_bssap_cell_id_list_seg_cell_id_disc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2337
0
    curr_offset++;
2338
2339
0
    proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len-1);
2340
2341
2342
0
    return len;
2343
0
}
2344
/*
2345
 * 3.2.2.28 Response Request
2346
 * No data
2347
 */
2348
/*
2349
 * 3.2.2.29 Resource Indication Method
2350
 */
2351
static const value_string gsm_a_bssap_resource_indication_vals[] = {
2352
    { 0x0,  "Spontaneous resource information expected"},
2353
    { 0x1,  "One single resource information expected"},
2354
    { 0x2,  "Periodic resource information expected"},
2355
    { 0x3,  "No cell is associated with the transaction"},
2356
    { 0x4,  "No resource information expected"},
2357
    { 0,    NULL }
2358
};
2359
static uint16_t
2360
be_res_ind_method(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2361
0
{
2362
0
    uint32_t curr_offset;
2363
2364
0
    curr_offset = offset;
2365
2366
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
2367
0
    proto_tree_add_item(tree, hf_gsm_a_bssap_res_ind_method, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2368
0
    curr_offset++;
2369
2370
0
    return len;
2371
0
}
2372
2373
/*
2374
 * 3.2.2.30 Classmark Information Type 1
2375
 * coded in the same way as the equivalent octet in the classmark 1 element of 3GPP TS 24.008
2376
 * dissected in packet-gsm_a_common.c
2377
 */
2378
/*
2379
 * 3.2.2.31 Circuit Identity Code List
2380
 */
2381
static uint16_t
2382
be_cic_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_)
2383
0
{
2384
0
    uint32_t curr_offset;
2385
2386
0
    curr_offset = offset;
2387
2388
0
    proto_tree_add_item(tree, hf_gsm_a_bssap_cic_list_range, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2389
0
    proto_tree_add_item(tree, hf_gsm_a_bssap_cic_list_status, tvb, (curr_offset+1), (len-1), ENC_NA);
2390
2391
0
    return len;
2392
0
}
2393
/*
2394
 * 3.2.2.32 Diagnostics
2395
 */
2396
static uint16_t
2397
be_diag(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len , char *add_string _U_, int string_len _U_)
2398
0
{
2399
0
    uint32_t curr_offset;
2400
2401
0
    curr_offset = offset;
2402
2403
0
    proto_tree_add_item(tree, hf_gsm_a_bssap_diag_error_pointer, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
2404
0
    curr_offset += 2;
2405
0
    NO_MORE_DATA_CHECK(len);
2406
0
    proto_tree_add_item(tree, hf_gsm_a_bssap_diag_msg_rcv, tvb, curr_offset, (len-2), ENC_NA);
2407
2408
0
    return len;
2409
0
}
2410
/*
2411
 * [2] 3.2.2.33 Chosen Channel
2412
 */
2413
static const value_string gsm_a_bssmap_ch_mode_vals[] = {
2414
    { 0,    "no channel mode indication" },
2415
    { 9,    "speech (full rate or half rate)" },
2416
    { 14,   "data, 14.5 kbit/s radio interface rate" },
2417
    { 11,   "data, 12.0 kbit/s radio interface rate" },
2418
    { 12,   "data, 6.0 kbit/s radio interface rate" },
2419
    { 13,   "data, 3.6 kbit/s radio interface rate" },
2420
    { 8,    "signalling only" },
2421
    { 1,    "data, 29.0 kbit/s radio interface rate" },
2422
    { 2,    "data, 32.0 kbit/s radio interface rate" },
2423
    { 3,    "data, 43.5 kbit/s radio interface rate" },
2424
    { 4,    "data, 43.5 kbit/s downlink and 14.5 kbit/s uplink" },
2425
    { 5,    "data, 29.0 kbit/s downlink and 14.5 kbit/s uplink" },
2426
    { 6,    "data, 43.5 kbit/s downlink and 29.0 kbit/s uplink" },
2427
    { 7,    "data, 14.5 kbit/s downlink and 43.5 kbit/s uplink" },
2428
    { 10,   "data, 14.5 kbit/s downlink and 29.0 kbit/s uplink" },
2429
    { 15,   "data, 29.0 kbit/s downlink and 43.5 kbit/s uplink" },
2430
    { 0, NULL }
2431
};
2432
static const value_string gsm_a_bssmap_channel_vals[] = {
2433
    { 0,    "None(Current Channel Type 1 - Reserved)" },
2434
    { 1,    "SDCCH" },
2435
    { 2,    "Reserved" },
2436
    { 3,    "Reserved" },
2437
    { 5,    "Reserved" },
2438
    { 6,    "Reserved" },
2439
    { 7,    "Reserved" },
2440
    { 8,    "1 Full rate TCH" },
2441
    { 9,    "1 Half rate TCH" },
2442
    { 10,   "2 Full Rate TCHs" },
2443
    { 11,   "3 Full Rate TCHs" },
2444
    { 12,   "4 Full Rate TCHs" },
2445
    { 13,   "5 Full Rate TCHs" },
2446
    { 14,   "6 Full Rate TCHs" },
2447
    { 15,   "7 Full Rate TCHs" },
2448
    { 4,    "8 Full Rate TCHs" },
2449
    { 0, NULL }
2450
};
2451
static const value_string gsm_a_bssmap_trace_bss_record_type_vals[] = {
2452
    { 0,    "Basic" },
2453
    { 1,    "Handover" },
2454
    { 2,    "Radio" },
2455
    { 3,    "No BSS Trace" },
2456
    { 0, NULL }
2457
};
2458
static const value_string gsm_a_bssmap_trace_msc_record_type_vals[] = {
2459
    { 0,    "Basic" },
2460
    { 1,    "Detailed (optional)" },
2461
    { 2,    "Spare" },
2462
    { 3,    "No MSC Trace" },
2463
    { 0, NULL }
2464
};
2465
static const value_string gsm_a_bssmap_trace_invoking_event_vals[] = {
2466
    { 0,    "MOC, MTC, SMS MO, SMS MT, PDS MO, PDS MT, SS, Location Updates, IMSI attach, IMSI detach" },
2467
    { 1,    "MOC, MTC, SMS_MO, SMS_MT, PDS MO, PDS MT, SS only" },
2468
    { 2,    "Location updates, IMSI attach IMSI detach only" },
2469
    { 3,    "Operator definable" },
2470
    { 0, NULL }
2471
};
2472
static uint16_t
2473
be_chosen_chan(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2474
0
{
2475
0
    uint32_t curr_offset;
2476
2477
0
    curr_offset = offset;
2478
2479
    /* Channel mode */
2480
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_ch_mode, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2481
2482
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_channel, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2483
2484
0
    curr_offset++;
2485
2486
    /* no length check possible */
2487
2488
0
    return curr_offset-offset;
2489
0
}
2490
2491
/*
2492
 * [2] 3.2.2.34 Cipher Response Mode
2493
 */
2494
static uint16_t
2495
be_ciph_resp_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_)
2496
0
{
2497
0
    uint32_t curr_offset = offset;
2498
2499
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 7, ENC_BIG_ENDIAN);
2500
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_imeisv_included, tvb, curr_offset, 1, ENC_NA);
2501
2502
0
    curr_offset++;
2503
2504
    /* no length check possible */
2505
2506
0
    return curr_offset-offset;
2507
0
}
2508
2509
2510
/*
2511
 * [2] 3.2.2.35 Layer 3 Message Contents
2512
 */
2513
static uint16_t
2514
be_l3_msg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
2515
0
{
2516
0
    tvbuff_t *l3_tvb;
2517
0
    uint16_t word;
2518
2519
0
    proto_tree_add_bytes_format(tree, hf_gsm_a_bssmap_layer3_message_contents, tvb, offset, len, NULL,
2520
0
        "Layer 3 Message Contents");
2521
2522
    /*
2523
     * dissect the embedded DTAP message
2524
     */
2525
0
    l3_tvb = tvb_new_subset_length(tvb, offset, len);
2526
2527
    /* Some vendors do:
2528
     * Octets 3-12 contain the unchanged radio interface layer 3 message contents, as received from the radio interface.
2529
     * When received in the CIPHER MODE COMPLETE message, this IE contains the mobile identity IE with identity type set to IMEISV.
2530
     * The mobile identity IE is a variable length element and includes a length indicator, which is set to 9 if the type is IMEISV.
2531
     *
2532
     */
2533
0
    word = tvb_get_ntohs(tvb, offset);
2534
0
    if(word==0x1709){
2535
        /* start the dissection from byte 3 */
2536
0
        de_mid(l3_tvb, tree, pinfo, 2, 9, NULL, 0);
2537
0
        return len;
2538
0
    }
2539
    /* Octet j (j = 3, 4, ..., n) is the unchanged octet j of a radio interface layer 3 message
2540
     * as defined in 3GPP TS 24.008, n is equal to the length of that radio interface layer 3 message. */
2541
0
    call_dissector(dtap_handle, l3_tvb, pinfo, g_tree);
2542
2543
0
    return len;
2544
0
}
2545
2546
/*
2547
 * [2] 3.2.2.36 Channel Needed
2548
 */
2549
static uint16_t
2550
be_cha_needed(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2551
0
{
2552
0
    uint32_t curr_offset;
2553
2554
0
    curr_offset = offset;
2555
2556
    /* no length check possible */
2557
0
    proto_tree_add_bits_item(tree, hf_gsm_a_rr_chnl_needed_ch1, tvb, (curr_offset<<3)+6, 2, ENC_BIG_ENDIAN);
2558
2559
0
    curr_offset++;
2560
2561
0
    return curr_offset-offset;
2562
0
}
2563
/*
2564
 * 3.2.2.37 Trace Type
2565
 * coded as the MSC/BSS Trace Type specified in 3GPP TS 52.008
2566
 */
2567
static uint16_t
2568
be_trace_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2569
0
{
2570
0
    uint32_t curr_offset;
2571
0
    int     bit_offset;
2572
2573
0
    bit_offset = (offset<<3);
2574
0
    curr_offset = offset;
2575
2576
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_trace_priority_indication, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2577
0
    bit_offset ++;
2578
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2579
0
    bit_offset ++;
2580
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_trace_bss_record_type, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2581
0
    bit_offset += 2;
2582
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_trace_msc_record_type, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2583
0
    bit_offset += 2;
2584
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_trace_invoking_event, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2585
    /*bit_offset += 2;*/
2586
0
    curr_offset++;
2587
2588
    /* no length check possible */
2589
2590
0
    return curr_offset-offset;
2591
0
}
2592
2593
/*
2594
 * [2] 3.2.2.38 TriggerID
2595
 */
2596
static uint16_t
2597
be_trace_trigger_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_)
2598
0
{
2599
0
    uint32_t curr_offset;
2600
2601
0
    curr_offset = offset;
2602
2603
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_trace_trigger_id, tvb, curr_offset, len, ENC_ASCII);
2604
0
    curr_offset += len;
2605
2606
    /* no length check possible */
2607
2608
0
    return curr_offset-offset;
2609
0
}
2610
2611
    /* 3.2.2.39 Trace Reference */
2612
static uint16_t
2613
be_trace_reference(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2614
0
{
2615
0
    uint32_t curr_offset;
2616
2617
0
    curr_offset = offset;
2618
2619
2620
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_trace_reference, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
2621
0
    curr_offset +=2;
2622
2623
    /* no length check possible */
2624
2625
0
    return curr_offset-offset;
2626
0
}
2627
    /* 3.2.2.40 TransactionID */
2628
static uint16_t
2629
be_trace_transaction_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2630
0
{
2631
0
    uint32_t curr_offset;
2632
2633
0
    curr_offset = offset;
2634
2635
2636
0
    if (len == 1)
2637
0
    {
2638
0
        proto_tree_add_item(tree, hf_gsm_a_bssmap_trace_reference, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2639
0
        curr_offset ++;
2640
0
    }
2641
0
    else
2642
0
    {
2643
0
        proto_tree_add_item(tree, hf_gsm_a_bssmap_trace_reference, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
2644
0
        curr_offset +=2;
2645
0
    }
2646
2647
0
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
2648
2649
0
    return curr_offset-offset;
2650
0
}
2651
/*
2652
 * 3.2.2.41 Mobile Identity (IMSI, IMEISV or IMEI as coded in 3GPP TS 24.008)
2653
 * Dissected in packet-gsm_a_common.c
2654
 */
2655
/*
2656
 * 3.2.2.42 OMCID
2657
 * For the OMC identity, see 3GPP TS 52.021
2658
 */
2659
static uint16_t
2660
be_trace_omc_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_)
2661
0
{
2662
0
    uint32_t curr_offset;
2663
2664
0
    curr_offset = offset;
2665
2666
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_trace_omc_id, tvb, curr_offset, len, ENC_ASCII);
2667
0
    curr_offset += len;
2668
2669
    /* no length check possible */
2670
2671
0
    return curr_offset-offset;
2672
0
}
2673
/*
2674
 * [2] 3.2.2.43 Forward Indicator
2675
 */
2676
static const range_string forward_indicator_rvals[] = {
2677
    { 0x00,     0x00, "Reserved" },
2678
    { 0x01,     0x01, "forward to subsequent BSS, no trace at MSC" },
2679
    { 0x02,     0x02, "forward to subsequent BSS, and trace at MSC" },
2680
    { 0x03,     0x0F, "Reserved" },
2681
    { 0, 0, NULL },
2682
};
2683
2684
static uint16_t
2685
be_for_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_)
2686
0
{
2687
0
    uint32_t     curr_offset = offset;
2688
2689
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
2690
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_forward_indicator, tvb, curr_offset, 1, ENC_NA);
2691
0
    curr_offset++;
2692
2693
    /* no length check possible */
2694
2695
0
    return curr_offset-offset;
2696
0
}
2697
2698
/*
2699
 * [2] 3.2.2.44 Chosen Encryption Algorithm
2700
 */
2701
static const value_string gsm_a_bssmap_algorithm_id_vals[] = {
2702
    { 1,    "No encryption used" },
2703
    { 2,    "GSM A5/1" },
2704
    { 3,    "GSM A5/2" },
2705
    { 4,    "GSM A5/3" },
2706
    { 5,    "GSM A5/4" },
2707
    { 6,    "GSM A5/5" },
2708
    { 7,    "GSM A5/6" },
2709
    { 8,    "GSM A5/7" },
2710
    { 0, NULL }
2711
};
2712
2713
static uint16_t
2714
be_chosen_enc_alg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string, int string_len)
2715
0
{
2716
0
    uint8_t      oct;
2717
0
    uint32_t     curr_offset;
2718
2719
0
    curr_offset = offset;
2720
2721
0
    oct = tvb_get_uint8(tvb, curr_offset);
2722
2723
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_algorithm_identifier, tvb, curr_offset, 1, ENC_NA);
2724
2725
0
    curr_offset++;
2726
2727
0
    if (add_string)
2728
0
        snprintf(add_string, string_len, " - %s", val_to_str_const(oct, gsm_a_bssmap_algorithm_id_vals, "Unknown"));
2729
2730
    /* no length check possible */
2731
2732
0
    return curr_offset-offset;
2733
0
}
2734
2735
/*
2736
 * [2] 3.2.2.45 Circuit Pool
2737
 */
2738
static uint16_t
2739
be_cct_pool(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string, int string_len)
2740
0
{
2741
0
    uint8_t      oct;
2742
0
    uint32_t     curr_offset;
2743
0
    proto_item*  ti;
2744
2745
0
    curr_offset = offset;
2746
2747
0
    oct = tvb_get_uint8(tvb, curr_offset);
2748
2749
0
    ti = proto_tree_add_item(tree, hf_gsm_a_bssmap_circuit_pool_number, tvb, curr_offset, 1, ENC_NA);
2750
0
    if (oct <= 50)
2751
0
    {
2752
        /* No extra string */
2753
0
    }
2754
0
    else if ((oct >= 0x80) && (oct <= 0x8f))
2755
0
    {
2756
0
        proto_item_append_text(ti, ", for national/local use");
2757
0
    }
2758
0
    else
2759
0
    {
2760
0
        proto_item_append_text(ti, ", reserved for future international use");
2761
0
    }
2762
2763
0
    curr_offset++;
2764
2765
0
    if (add_string)
2766
0
        snprintf(add_string, string_len, " - (%u)", oct);
2767
2768
    /* no length check possible */
2769
2770
0
    return curr_offset-offset;
2771
0
}
2772
/*
2773
 * 3.2.2.46 Circuit Pool List
2774
 * 3.2.2.47 Time Indication
2775
 * 3.2.2.48 Resource Situation
2776
 */
2777
/*
2778
 * [2] 3.2.2.49 Current Channel Type 1
2779
 */
2780
static uint16_t
2781
be_curr_chan_1(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2782
0
{
2783
0
    uint32_t curr_offset;
2784
2785
0
    curr_offset = offset;
2786
2787
    /* Channel mode */
2788
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_cur_ch_mode, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2789
    /* Channel */
2790
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_channel, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2791
2792
0
    curr_offset++;
2793
2794
    /* no length check possible */
2795
2796
0
    return curr_offset-offset;
2797
0
}
2798
2799
/*
2800
 * [2] 3.2.2.50 Queuing Indicator
2801
 */
2802
static uint16_t
2803
be_que_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_)
2804
0
{
2805
0
    uint32_t curr_offset = offset;
2806
2807
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 6, ENC_BIG_ENDIAN);
2808
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_qri, tvb, curr_offset, 1, ENC_NA);
2809
2810
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, (curr_offset<<3)+7, 1, ENC_BIG_ENDIAN);
2811
2812
0
    curr_offset++;
2813
2814
    /* no length check possible */
2815
2816
0
    return curr_offset-offset;
2817
0
}
2818
2819
/*
2820
 * [2] 3.2.2.51 Speech Version
2821
 */
2822
static const range_string speech_version_id_rvals[] = {
2823
    { 0x01,     0x01, "GSM speech full rate version 1" },
2824
    { 0x02,     0x04, "Reserved" },
2825
    { 0x05,     0x05, "GSM speech half rate version 1" },
2826
    { 0x06,     0x10, "Reserved" },
2827
    { 0x11,     0x11, "GSM speech full rate version 2 (EFR)" },
2828
    { 0x12,     0x14, "Reserved" },
2829
    { 0x15,     0x15, "GSM speech half rate version 2" },
2830
    { 0x16,     0x20, "Reserved" },
2831
    { 0x21,     0x21, "GSM speech full rate version 3 (AMR)" },
2832
    { 0x22,     0x24, "Reserved" },
2833
    { 0x25,     0x25, "GSM speech half rate version 3 (AMR)" },
2834
    { 0x26,     0x40, "Reserved" },
2835
    { 0x41,     0x41, "GSM speech full rate version 4 (AMR-WB)" },
2836
    { 0x42,     0x42, "GSM speech full rate version 5 (AMR-WB)" },
2837
    { 0x43,     0x44, "Reserved" },
2838
    { 0x45,     0x45, "GSM speech half rate version 6 (AMR)" },
2839
    { 0x46,     0x46, "GSM speech half rate version 4 (AMR-WB)" },
2840
    { 0x47,     0x7f, "Reserved" },
2841
2842
    { 0, 0, NULL },
2843
};
2844
2845
static const range_string speech_version_id_short_rvals[] = {
2846
    { 0x01,     0x01, "FR1" },
2847
    { 0x05,     0x05, "HR1" },
2848
    { 0x11,     0x11, "FR2 (EFR)" },
2849
    { 0x15,     0x15, "HR2" },
2850
    { 0x21,     0x21, "FR3 (AMR)" },
2851
    { 0x25,     0x25, "HR3 (AMR)" },
2852
    { 0x41,     0x41, "OFR AMR-WB" },
2853
    { 0x42,     0x42, "FR AMR-WB" },
2854
    { 0x45,     0x45, "OHR AMR" },
2855
    { 0x46,     0x46, "OHR AMR-WB" },
2856
2857
    { 0, 0, NULL },
2858
};
2859
2860
static uint16_t
2861
be_speech_ver(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string, int string_len)
2862
0
{
2863
0
    uint8_t      oct;
2864
0
    uint32_t     curr_offset;
2865
2866
0
    curr_offset = offset;
2867
2868
0
    oct = tvb_get_uint8(tvb, curr_offset);
2869
2870
0
    proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2871
2872
    /* The bits 7-1 of octet 2 are coded in the same way as the permitted speech version identifier
2873
     * in the Channel type information element.
2874
     */
2875
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_speech_version_id, tvb, curr_offset, 1, ENC_NA);
2876
0
    curr_offset++;
2877
2878
0
    if (add_string)
2879
0
        snprintf(add_string, string_len, " - (%s)", rval_to_str_const(oct & 0x7f, speech_version_id_short_rvals, "Reserved"));
2880
2881
    /* no length check possible */
2882
2883
0
    return curr_offset-offset;
2884
0
}
2885
/*
2886
 * 3.2.2.52 Assignment Requirement
2887
 */
2888
static const value_string gsm_a_bssmap_assignment_requirement_vals[] = {
2889
    { 0x00, "Delay allowed" },
2890
    { 0x01, "Immediate and the resources shall not be de-allocated until the end of the call (channel establishment on demand forbidden by the MSC)" },
2891
    { 0x02, "Immediate and the resources may further be de-allocated by the BSS (channel establishment on demand permitted by the MSC)." },
2892
    { 0, NULL }
2893
};
2894
static uint16_t
2895
be_ass_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2896
0
{
2897
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_ass_req, tvb, offset, 1, ENC_BIG_ENDIAN);
2898
2899
0
    return 1;
2900
0
}
2901
/*
2902
 * 3.2.2.53 (void)
2903
 */
2904
/*
2905
 * 3.2.2.54 Talker Flag
2906
 * No data
2907
 */
2908
/*
2909
 * 3.2.2.55 Group Call Reference
2910
 * The octets 3-7 are coded in the same way as the octets 2-6 in the
2911
 * Descriptive group or broadcast call reference information element as defined in 3GPP TS 24.008.
2912
 * dissected in packet-gsm_a_common.c (de_d_gb_call_ref)
2913
 */
2914
/*
2915
 * 3.2.2.56 eMLPP Priority
2916
 * The call priority field (bit 3 to 1 of octet 2) is coded in the same way as the call priority field
2917
 * (bit 3 to 1 of octet 5) in the Descriptive group or broadcast call reference information element as
2918
 * defined in 3GPP TS 24.008.
2919
 */
2920
static const value_string gsm_a_bssmap_call_priority_vals[] = {
2921
    { 0x00, "No priority applied" },
2922
    { 0x01, "Call priority level 4" },
2923
    { 0x02, "Call priority level 3" },
2924
    { 0x03, "Call priority level 2" },
2925
    { 0x04, "Call priority level 1" },
2926
    { 0x05, "Call priority level 0" },
2927
    { 0x06, "Call priority level B" },
2928
    { 0x07, "Call priority level A" },
2929
    { 0, NULL }
2930
};
2931
2932
uint16_t
2933
be_emlpp_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
2934
1
{
2935
1
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, offset << 3, 5, ENC_BIG_ENDIAN);
2936
1
    proto_tree_add_item(tree, hf_gsm_a_bssmap_emlpp_prio, tvb, offset, 1, ENC_BIG_ENDIAN);
2937
2938
1
    return 1;
2939
1
}
2940
2941
/*
2942
 * 3.2.2.57 Configuration Evolution Indication
2943
 */
2944
static const value_string gsm_a_bssmap_smi_vals[] = {
2945
    { 0,    "No Modification is allowed" },
2946
    { 1,    "Modification is allowed and maximum number of TCH/F is 1" },
2947
    { 2,    "Modification is allowed and maximum number of TCH/F is 2" },
2948
    { 3,    "Modification is allowed and maximum number of TCH/F is 3" },
2949
    { 4,    "Modification is allowed and maximum number of TCH/F is 4" },
2950
    { 5,    "Reserved" },
2951
    { 6,    "Reserved" },
2952
    { 7,    "Reserved" },
2953
    { 0, NULL }
2954
};
2955
2956
static uint16_t
2957
be_conf_evo_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_)
2958
0
{
2959
0
    uint32_t curr_offset;
2960
2961
0
    curr_offset = offset;
2962
2963
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
2964
    /* Subsequent Modification Indication */
2965
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_smi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2966
0
    curr_offset++;
2967
2968
0
    return curr_offset-offset;
2969
0
}
2970
/*
2971
 * 3.2.2.58 Old BSS to New BSS information
2972
 */
2973
/* This function is only called from other protocols (e.g. RANAP),
2974
   internally, the Field Element dissector is called directly */
2975
void
2976
bssmap_old_bss_to_new_bss_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo)
2977
0
{
2978
0
    uint16_t len;
2979
0
    if (!tree) {
2980
0
        return;
2981
0
    }
2982
2983
0
    g_tree = tree;
2984
2985
0
    len = tvb_reported_length(tvb);
2986
0
    be_field_element_dissect(tvb, tree, pinfo, 0, len, NULL, 0);
2987
2988
0
    g_tree = NULL;
2989
0
}
2990
/*
2991
 * 3.2.2.59 (void)
2992
 * 3.2.2.60 LCS QoS
2993
 * (The QoS octets 3 to n are coded in the same way as the equivalent octets
2994
 * in the LCS QoS element of 3GPP TS 49.031.)
2995
 */
2996
2997
/*
2998
 * 3.2.2.61 LSA Access Control Suppression
2999
 */
3000
/*
3001
 * 3.2.2.62 LCS Priority
3002
 *  The Priority octets 3 to n are coded in the same way as the equivalent octets
3003
 *  in the LCS Priority element of 3GPP TS 49.031.
3004
 */
3005
/* Location Information definitions */
3006
static const value_string lcs_priority_vals[] = {
3007
    { 0, "highest" },
3008
    { 1, "normal" },
3009
    { 0, NULL}
3010
};
3011
3012
static uint16_t
3013
be_lcs_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3014
0
{
3015
0
    uint32_t curr_offset;
3016
3017
0
    curr_offset = offset;
3018
3019
    /* This octet is coded as the LCS-Priority octet in 3GPP TS 29.002 */
3020
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_lcs_pri, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3021
0
    curr_offset++;
3022
3023
0
    return curr_offset-offset;
3024
0
}
3025
3026
/*
3027
 * 3.2.2.63 Location Type (Location Type element of 3GPP TS 49.031 BSSAP-LE.)
3028
 */
3029
static uint16_t
3030
be_loc_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3031
0
{
3032
0
    uint32_t curr_offset;
3033
0
    uint8_t location_information;
3034
3035
0
    curr_offset = offset;
3036
3037
    /* Extract the location information and add to protocol tree */
3038
0
    location_information = tvb_get_uint8(tvb, offset);
3039
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_location_type_location_information, tvb, offset, 1, ENC_BIG_ENDIAN);
3040
0
    curr_offset++;
3041
3042
0
    if (location_information == 1 || location_information == 2)
3043
0
    {
3044
        /* protocol method  */
3045
0
        proto_tree_add_item(tree, hf_gsm_a_bssmap_location_type_positioning_method, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3046
0
        curr_offset++;
3047
0
    }
3048
3049
0
    return curr_offset-offset;
3050
0
}
3051
3052
/*
3053
 * 3.2.2.64 Location Estimate
3054
 * The Location Estimate field is composed of 1 or more octets with an internal structure
3055
 * according to 3GPP TS 23.032.
3056
 */
3057
static uint16_t
3058
be_loc_est(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3059
0
{
3060
0
    tvbuff_t *data_tvb;
3061
0
    uint32_t  curr_offset;
3062
3063
0
    curr_offset = offset;
3064
3065
0
    data_tvb = tvb_new_subset_length(tvb, curr_offset, len);
3066
0
    dissect_geographical_description(data_tvb, pinfo, tree);
3067
3068
0
    return len;
3069
0
}
3070
/*
3071
 * 3.2.2.65 Positioning Data
3072
 * Positioning Data element of 3GPP TS 49.031 BSSAP-LE.
3073
 */
3074
static uint16_t
3075
be_pos_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3076
0
{
3077
0
    uint32_t curr_offset;
3078
0
    uint8_t i;
3079
0
    uint64_t pos_data_disc;
3080
0
    int     bit_offset;
3081
3082
0
    curr_offset = offset;
3083
3084
    /* Spare bits */
3085
0
    bit_offset = (offset<<3);
3086
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3087
0
    bit_offset += 4;
3088
3089
    /* Extract the positioning data discriminator and add to protocol tree */
3090
0
    proto_tree_add_bits_ret_val(tree, hf_gsm_a_bssmap_positioning_data_discriminator, tvb, bit_offset, 4, &pos_data_disc, ENC_BIG_ENDIAN);
3091
0
    bit_offset += 4;
3092
0
    curr_offset++;
3093
3094
0
    if (pos_data_disc == 0)
3095
0
    {
3096
        /* Extract the positioning methods and add to protocol tree */
3097
0
        for (i = 0; i < len-1; i++)
3098
0
        {
3099
            /* Extract the positioning method and add to protocol tree */
3100
0
            proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_positioning_method, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
3101
0
            bit_offset += 5;
3102
            /* Extract the usage and add to protocol tree */
3103
0
            proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_positioning_method_usage, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3104
0
            bit_offset += 3;
3105
0
            curr_offset++;
3106
0
        }
3107
0
    }
3108
3109
0
    return curr_offset-offset;
3110
0
}
3111
/*
3112
 * 3.2.2.66 LCS Cause
3113
 * LCS Cause element of 3GPP TS 49.031 BSSAP-LE.
3114
 * Dissected in packet-gsm_bssap_le.c
3115
 */
3116
3117
/*
3118
 * 3.2.2.67 LCS Client Type
3119
 * LCS Client Type element of 3GPP TS 49.031 BSSAP-LE.
3120
 * Dissected in packet-gsm_bssap_le.c
3121
 */
3122
3123
/*
3124
 * 3.2.2.68 3GPP TS 48.008 version 6.9.0 Release 6
3125
 */
3126
3127
/* BSSLAP the embedded message is as defined in 3GPP TS 48.071
3128
 * LLP the embedded message contains a Facility Information Element as defined in 3GPP TS 44.071
3129
 *      excluding the Facility IEI and length of Facility IEI octets defined in 3GPP TS 44.071.
3130
 * SMLCPP the embedded message is as defined in 3GPP TS 48.031
3131
 */
3132
static const value_string gsm_a_apdu_protocol_id_strings[] = {
3133
    { 0,    "reserved" },
3134
    { 1,    "BSSLAP" },
3135
    { 2,    "LLP" },
3136
    { 3,    "SMLCPP" },
3137
    { 0, NULL }
3138
};
3139
3140
static uint16_t
3141
be_apdu(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
3142
0
{
3143
0
    uint32_t  curr_offset;
3144
0
    uint8_t   apdu_protocol_id;
3145
0
    tvbuff_t *APDU_tvb;
3146
3147
0
    curr_offset = offset;
3148
3149
0
    proto_tree_add_bytes_format(tree, hf_gsm_a_bssmap_apdu, tvb, curr_offset, len, NULL, "APDU");
3150
3151
    /*
3152
     * dissect the embedded APDU message
3153
     * if someone writes a TS 09.31 dissector
3154
     *
3155
     * The APDU octets 4 to n are coded in the same way as the
3156
     * equivalent octet in the APDU element of 3GPP TS 49.031 BSSAP-LE.
3157
     */
3158
3159
0
    apdu_protocol_id = tvb_get_uint8(tvb,curr_offset);
3160
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_apdu_protocol_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3161
0
    curr_offset++;
3162
0
    len--;
3163
3164
0
    switch (apdu_protocol_id) {
3165
0
    case 1:
3166
        /* BSSLAP
3167
         * the embedded message is as defined in 3GPP TS 08.71(3GPP TS 48.071 version 7.2.0 Release 7)
3168
         */
3169
0
        APDU_tvb = tvb_new_subset_length(tvb, curr_offset, len);
3170
0
        if (gsm_bsslap_handle)
3171
0
            call_dissector(gsm_bsslap_handle, APDU_tvb, pinfo, g_tree);
3172
0
        break;
3173
0
    case 2:
3174
        /* LLP
3175
         * The embedded message contains a Facility Information Element as defined in 3GPP TS 04.71
3176
         * excluding the Facility IEI and length of Facility IEI octets defined in 3GPP TS 04.71.(3GPP TS 44.071).
3177
         */
3178
0
        break;
3179
0
    case 3:
3180
        /* SMLCPP
3181
         * The embedded message is as defined in 3GPP TS 08.31(TS 48.031).
3182
         */
3183
0
        break;
3184
0
    default:
3185
0
        break;
3186
0
    }
3187
3188
0
    curr_offset += len;
3189
3190
0
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
3191
3192
0
    return curr_offset-offset;
3193
0
}
3194
/*
3195
 * 3.2.2.69 Network Element Identity
3196
 * Network Element Identity element of 3GPP TS 49.031 BSSAP-LE.
3197
 */
3198
/*
3199
 * 3.2.2.70 GPS Assistance Data
3200
 * Requested GPS Data element of 3GPP TS 49.031 BSSAP-LE.
3201
 */
3202
static uint16_t
3203
be_gps_assist_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3204
0
{
3205
0
    uint32_t curr_offset;
3206
3207
0
    curr_offset = offset;
3208
3209
0
    proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len);
3210
3211
3212
0
    return len;
3213
0
}
3214
/*
3215
 * 3.2.2.71 Deciphering Keys
3216
 * Deciphering Key element of 3GPP TS 49.031 BSSAP-LE.
3217
 * Dissected in packet-gsm_bssmap_le.c
3218
 */
3219
3220
 /* 3.2.2.72 Return Error Request
3221
  * Return Error Request element of 3GPP TS 49.031 BSSAP-LE.
3222
  */
3223
static uint16_t
3224
be_ret_err_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3225
0
{
3226
0
    uint32_t curr_offset;
3227
3228
0
    curr_offset = offset;
3229
3230
0
    proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len);
3231
3232
0
    return len;
3233
0
}
3234
/*
3235
 * 3.2.2.73 Return Error Cause
3236
 * Return Error Cause element of 3GPP TS 49.031 BSSAP-LE.
3237
 */
3238
static uint16_t
3239
be_ret_err_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3240
0
{
3241
0
    uint32_t curr_offset;
3242
3243
0
    curr_offset = offset;
3244
3245
0
    proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len);
3246
3247
0
    return len;
3248
0
}
3249
/*
3250
 * 3.2.2.74 Segmentation
3251
 * Segmentation element of 3GPP TS 49.031 BSSAP-LE.
3252
 */
3253
static uint16_t
3254
be_seg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3255
0
{
3256
0
    uint32_t curr_offset;
3257
3258
0
    curr_offset = offset;
3259
3260
0
    proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len);
3261
3262
0
    return len;
3263
0
}
3264
/*
3265
 * 3.2.2.75 Service Handover
3266
 */
3267
static const value_string gsm_a_bssmap_serv_ho_inf_vals[] = {
3268
    { 0,    "Handover to UTRAN or cdma2000 should be performed - Handover to UTRAN or cdma2000 is preferred" },
3269
    { 1,    "Handover to UTRAN or cdma2000 should not be performed - Handover to GSM is preferred" },
3270
    { 2,    "Handover to UTRAN or cdma2000 shall not be performed - " },
3271
    { 3,    "no information available for service based handover" },
3272
    { 4,    "no information available for service based handover" },
3273
    { 5,    "no information available for service based handover" },
3274
    { 6,    "no information available for service based handover" },
3275
    { 7,    "no information available for service based handover" },
3276
    { 0, NULL }
3277
};
3278
static uint16_t
3279
be_serv_ho(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3280
0
{
3281
0
    uint32_t curr_offset;
3282
3283
0
    curr_offset = offset;
3284
3285
    /* Service Handover information */
3286
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 5, ENC_BIG_ENDIAN);
3287
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_serv_ho_inf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3288
0
    curr_offset++;
3289
0
    return len;
3290
0
}
3291
3292
/*
3293
 * 3.2.2.76 Source RNC to target RNC transparent information (UMTS)
3294
 */
3295
3296
static uint16_t
3297
be_src_rnc_to_tar_rnc_umts(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3298
0
{
3299
0
    tvbuff_t    *container_tvb;
3300
0
    uint32_t curr_offset;
3301
3302
0
    curr_offset = offset;
3303
3304
    /* The Source RNC to Target RNC transparent Information value is encoded as
3305
     * the Source RNC to Target RNC Transparent Container IE as defined in relevant
3306
     * RANAP specification 3GPP TS 25.413, excluding RANAP tag
3307
     */
3308
0
    container_tvb = tvb_new_subset_length(tvb, curr_offset, len);
3309
0
    dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU(container_tvb, pinfo, tree, NULL);
3310
3311
0
    return len;
3312
0
}
3313
/*
3314
 * 3.2.2.77 Source RNC to target RNC transparent information (cdma2000)
3315
 */
3316
static uint16_t
3317
be_src_rnc_to_tar_rnc_cdma(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3318
0
{
3319
0
    uint32_t curr_offset;
3320
3321
0
    curr_offset = offset;
3322
3323
0
    proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len);
3324
    /* The Source RNC to Target RNC transparent Information value (structure and encoding)
3325
     * for cdma2000 is defined in relevant specifications.
3326
     */
3327
3328
0
    return len;
3329
0
}
3330
/*
3331
 * 3.2.2.78 GERAN Classmark
3332
 */
3333
static const value_string gsm_a_max_nb_traffic_chan_vals[] = {
3334
    { 0x00, "1 TCH" },
3335
    { 0x01, "2 TCHs" },
3336
    { 0x02, "3 TCHs" },
3337
    { 0x03, "4 TCHs" },
3338
    { 0x04, "5 TCHs" },
3339
    { 0x05, "6 TCHs" },
3340
    { 0,    NULL }
3341
};
3342
static const true_false_string gsm_a_bssmap_accept_not_accept_vals = {
3343
    "Acceptable",
3344
    "Not acceptable"
3345
};
3346
static uint16_t
3347
be_geran_cls_m(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3348
0
{
3349
0
    uint32_t curr_offset;
3350
3351
0
    curr_offset = offset;
3352
3353
0
    if (len > 2) {
3354
0
        de_sup_codec_list(tvb, tree, pinfo, curr_offset, (len-2), NULL, 0);
3355
0
    }
3356
0
    curr_offset += len-2;
3357
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 5, ENC_BIG_ENDIAN);
3358
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_max_nb_traffic_chan, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3359
0
    curr_offset++;
3360
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 3, ENC_BIG_ENDIAN);
3361
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_acceptable_chan_coding_bit5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3362
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_acceptable_chan_coding_bit4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3363
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_acceptable_chan_coding_bit3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3364
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_acceptable_chan_coding_bit2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3365
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_acceptable_chan_coding_bit1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3366
3367
0
    return len;
3368
0
}
3369
/*
3370
 * 3.2.2.79 GERAN BSC Container
3371
 */
3372
static uint16_t
3373
be_geran_bsc_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3374
0
{
3375
0
    uint32_t curr_offset;
3376
3377
0
    curr_offset = offset;
3378
3379
0
    proto_tree_add_item(tree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3380
0
    curr_offset++;
3381
0
    NO_MORE_DATA_CHECK(len);
3382
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_allowed_data_rate_bit8, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3383
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_allowed_data_rate_bit7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3384
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_allowed_data_rate_bit6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3385
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_allowed_data_rate_bit5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3386
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_allowed_data_rate_bit4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3387
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_max_nb_traffic_chan, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3388
3389
0
    return len;
3390
0
}
3391
/*
3392
 * 3.2.2.80 New BSS to Old BSS Information
3393
 */
3394
/* This function is only called from other protocols (e.g. RANAP),
3395
   internally, the Field Element dissector is called directly */
3396
void
3397
bssmap_new_bss_to_old_bss_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo)
3398
0
{
3399
0
    uint16_t len;
3400
0
    if (!tree) {
3401
0
        return;
3402
0
    }
3403
3404
0
    g_tree = tree;
3405
3406
0
    len = tvb_reported_length(tvb);
3407
0
    be_field_element_dissect(tvb, tree, pinfo, 0, len, NULL, 0);
3408
3409
0
    g_tree = NULL;
3410
0
}
3411
3412
3413
/*
3414
 * 3.2.2.81 Inter-System Information
3415
 */
3416
static uint16_t
3417
be_inter_sys_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3418
0
{
3419
0
    tvbuff_t *new_tvb;
3420
3421
0
    new_tvb = tvb_new_subset_length(tvb, offset, len);
3422
3423
0
    if (new_tvb) {
3424
0
        dissect_ranap_InterSystemInformation_TransparentContainer_PDU(new_tvb, pinfo, tree, NULL);
3425
0
    }
3426
3427
0
    return len;
3428
0
}
3429
/*
3430
 * 3.2.2.82 SNA Access Information
3431
 */
3432
static uint16_t
3433
be_sna_acc_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3434
0
{
3435
0
    uint32_t curr_offset;
3436
3437
0
    curr_offset = offset;
3438
3439
0
    proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len);
3440
3441
0
    return len;
3442
0
}
3443
3444
/*
3445
 * 3.2.2.83 VSTK_RAND Information
3446
 */
3447
static uint16_t
3448
be_vstk_rand_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3449
0
{
3450
0
    uint32_t curr_offset;
3451
0
    uint64_t vstk_rand;
3452
3453
0
    curr_offset = offset;
3454
3455
0
    vstk_rand = tvb_get_ntoh40(tvb, curr_offset);
3456
0
    vstk_rand >>= 4;
3457
0
    proto_tree_add_uint64(tree, hf_gsm_a_bssmap_vstk_rand, tvb, curr_offset, 5, vstk_rand);
3458
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, (((curr_offset+4)<<3)+4), 4, ENC_BIG_ENDIAN);
3459
3460
0
    return len;
3461
0
}
3462
/*
3463
 * 3.2.2.84 VSTK information
3464
 */
3465
static uint16_t
3466
be_vstk_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3467
0
{
3468
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_vstk, tvb, offset, 16, ENC_NA);
3469
3470
0
    return len;
3471
0
}
3472
/*
3473
 * 3.2.2.85 Paging Information
3474
 */
3475
/*
3476
* If the VGCS/VBS flag is set to zero, the mobile station to be paged is not a member of any VGCS/VBS-group.
3477
* If the VGCS/VBS flag is set to one, the mobile station to be paged is a member of a VGCS/VBS-group.
3478
*/
3479
static const true_false_string bssmap_paging_inf_flg_value = {
3480
   "A member of a VGCS/VBS-group",
3481
   "Not a member of any VGCS/VBS-group"
3482
};
3483
3484
static const value_string gsm_a_bssmap_paging_cause_vals[] = {
3485
    { 0,    "Paging is for mobile terminating call" },
3486
    { 1,    "Paging is for a short message" },
3487
    { 2,    "Paging is for a USSD" },
3488
    { 3,    "Spare" },
3489
    { 0, NULL }
3490
};
3491
3492
static uint16_t
3493
be_paging_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_)
3494
0
{
3495
0
    uint32_t curr_offset;
3496
3497
0
    curr_offset = offset;
3498
3499
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 5, ENC_BIG_ENDIAN);
3500
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_paging_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3501
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_paging_inf_flg, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3502
0
    curr_offset++;
3503
3504
0
    return curr_offset-offset;
3505
0
}
3506
/*
3507
 * 3.2.2.86 IMEI
3508
 * Use same dissector as IMSI 3.2.2.6
3509
 */
3510
3511
/*
3512
 * 3.2.2.87 Velocity Estimate
3513
 */
3514
static uint16_t
3515
be_vel_est(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len)
3516
0
{
3517
0
    dissect_description_of_velocity(tvb, tree, pinfo, offset, len, add_string, string_len);
3518
3519
0
    return len;
3520
0
}
3521
/*
3522
 * 3.2.2.88 VGCS Feature Flags
3523
 */
3524
3525
/* Bit 1 is the talker priority indicator (TP Ind). */
3526
static const true_false_string gsm_bssmap_tpind_vals = {
3527
    "Talker Priority not supported" ,
3528
    "Talker Priority supported"
3529
};
3530
/* Bits 2 and 3 are the A-interface resource sharing indicator (AS Ind). */
3531
static const true_false_string gsm_bssmap_asind_b2_vals = {
3532
    "A-interface circuit sharing" ,
3533
    "No A-interface circuit sharing"
3534
};
3535
3536
static const true_false_string gsm_bssmap_asind_b3_vals = {
3537
    "A-interface link sharing" ,
3538
    "No A-interface link sharing"
3539
};
3540
3541
/* Bit 4 is the group or broadcast call re-establishment by the BSS indicator (Bss Res). */
3542
static const true_false_string gsm_bssmap_bss_res_vals = {
3543
    "Re-establishment of the group or broadcast call by the BSS" ,
3544
    "No re-establishment of the group or broadcast call by the BSS"
3545
};
3546
3547
/* Bit 5 is the Talker Channel Parameter (TCP). */
3548
static const true_false_string gsm_bssmap_bss_tcp_vals = {
3549
    "Talker channel parameter is applicable to this call, talker shall be established and maintained on a dedicated channel" ,
3550
    "Talker channel parameter is not applicable to this call"
3551
};
3552
3553
static uint16_t
3554
be_vgcs_feat_flg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3555
0
{
3556
0
    uint32_t curr_offset;
3557
3558
0
    curr_offset = offset;
3559
3560
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 3, ENC_BIG_ENDIAN);
3561
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_tcp, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3562
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_bss_res, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3563
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_asind_b3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3564
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_asind_b2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3565
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_tpind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3566
3567
0
    curr_offset++;
3568
3569
0
    return curr_offset-offset;
3570
0
}
3571
/*
3572
 * 3.2.2.89 Talker Priority
3573
 */
3574
static const value_string gsm_a_bssmap_talker_pri_vals[] = {
3575
    { 0,    "Normal Priority" },
3576
    { 1,    "Privileged Priority" },
3577
    { 2,    "Emergency Priority" },
3578
    { 3,    "Reserved for future use" },
3579
    { 0, NULL }
3580
};
3581
3582
static uint16_t
3583
be_talker_pri(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3584
0
{
3585
0
    uint32_t curr_offset;
3586
3587
0
    curr_offset = offset;
3588
3589
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_talker_pri, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3590
0
    curr_offset++;
3591
3592
0
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
3593
3594
0
    return curr_offset-offset;
3595
0
}
3596
3597
/*
3598
 * 3.2.2.90 Emergency Set Indication
3599
 * No data
3600
 */
3601
/*
3602
 * 3.2.2.91 Talker Identity
3603
 */
3604
static uint16_t
3605
be_talker_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_)
3606
0
{
3607
0
    uint32_t curr_offset;
3608
3609
0
    curr_offset = offset;
3610
3611
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 5, ENC_BIG_ENDIAN);
3612
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_filler_bits, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3613
0
    curr_offset++;
3614
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_talker_identity_field, tvb, curr_offset, len-1, ENC_NA);
3615
3616
0
    return len;
3617
0
}
3618
/*
3619
 * 3.2.2.92 SMS to VGCS
3620
 */
3621
static uint16_t
3622
be_sms_to_vgcs(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
3623
0
{
3624
    /* The SMS content field is coded as follows -  this field contains
3625
     * the RP-DATA message as defined in 3GPP TS 24.011.
3626
     */
3627
0
    rp_data_n_ms(tvb, tree, pinfo, offset, len);
3628
3629
3630
0
    return len;
3631
0
}
3632
/*
3633
 * 3.2.2.93 VGCS talker mode
3634
 */
3635
static const value_string gsm_a_bssmap_rr_mode_vals[] = {
3636
    { 0, "dedicated mode (i.e. dedicated channel)"},
3637
    { 1, "group transmit mode (i.e. voice group channel)"},
3638
    { 0, NULL }
3639
};
3640
static const value_string gsm_a_bssmap_group_cipher_key_nb_vals[] = {
3641
    { 0x0, "no ciphering"},
3642
    { 0x1, "cipher key number 1"},
3643
    { 0x2, "cipher key number 2"},
3644
    { 0x3, "cipher key number 3"},
3645
    { 0x4, "cipher key number 4"},
3646
    { 0x5, "cipher key number 5"},
3647
    { 0x6, "cipher key number 6"},
3648
    { 0x7, "cipher key number 7"},
3649
    { 0x8, "cipher key number 8"},
3650
    { 0x9, "cipher key number 9"},
3651
    { 0xa, "cipher key number A"},
3652
    { 0xb, "cipher key number B"},
3653
    { 0xc, "cipher key number C"},
3654
    { 0xd, "cipher key number D"},
3655
    { 0xe, "cipher key number E"},
3656
    { 0xf, "cipher key number F"},
3657
    { 0,    NULL }
3658
};
3659
static uint16_t
3660
be_vgcs_talker_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_)
3661
0
{
3662
0
    uint32_t curr_offset;
3663
3664
0
    curr_offset = offset;
3665
3666
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_rr_mode, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3667
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_group_cipher_key_nb, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3668
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, ((curr_offset<<3)+6), 2, ENC_BIG_ENDIAN);
3669
3670
0
    return len;
3671
0
}
3672
/*
3673
 * 3.2.2.94 VGCS/VBS Cell Status
3674
 */
3675
static const value_string gsm_a_bssmap_vgcs_vbs_cell_status_vals[] = {
3676
    { 0, "Cell is established for the voice group or broadcast call"},
3677
    { 1, "Cell is not established for the voice group or broadcast call. Establishment by the BSS is to be attempted"},
3678
    { 2, "Cell is released for the voice group or broadcast call because no user is present"},
3679
    { 3, "Cell is not established for the voice group or broadcast call. No establishment by the BSS is to be attempted"},
3680
    { 4, "Reserved"},
3681
    { 5, "Reserved"},
3682
    { 6, "Reserved"},
3683
    { 7, "Reserved"},
3684
    { 0, NULL }
3685
};
3686
static uint16_t
3687
be_vgcs_vbs_cell_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3688
0
{
3689
0
    uint32_t curr_offset;
3690
3691
0
    curr_offset = offset;
3692
3693
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, (curr_offset<<3), 5, ENC_BIG_ENDIAN);
3694
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_vgcs_vbs_cell_status, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3695
3696
0
    return len;
3697
0
}
3698
/*
3699
 * 3.2.2.95 GANSS Assistance Data
3700
 * The GANSS Assistance Data octets 3 to n are coded as the Requested GANSS Data element of 3GPP TS 49.031 (BSSAP-LE)
3701
 * XXX move to packet-gsm_bssmap_le.c
3702
 */
3703
uint16_t
3704
be_ganss_ass_dta(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3705
0
{
3706
0
    uint32_t curr_offset;
3707
3708
0
    curr_offset = offset;
3709
3710
0
    proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len);
3711
3712
0
    return len;
3713
0
}
3714
/*
3715
 * 3.2.2.96 GANSS Positioning Data
3716
 * XXX move to packet-gsm_bssmap_le.c
3717
 */
3718
3719
static const value_string gsm_a_bssmap_method_vals[] = {
3720
    { 0x00,     "MS-Based" },
3721
    { 0x01,     "MS-Assisted" },
3722
    { 0x02,     "Conventional" },
3723
    { 0x03,     "Reserved" },
3724
    { 0,        NULL }
3725
};
3726
3727
static const value_string gsm_a_bssmap_ganss_id_vals[] = {
3728
    { 0x00,     "Galileo" },
3729
    { 0x01,     "Satellite Based Augmentation Systems (SBAS)" },
3730
    { 0x02,     "Modernized GPS" },
3731
    { 0x03,     "Quasi Zenith Satellite System (QZSS)" },
3732
    { 0x04,     "GLONASS" },
3733
    { 0,        NULL }
3734
};
3735
3736
static const value_string gsm_a_bssmap_usage_vals[] = {
3737
    { 0x00,     "Attempted unsuccessfully due to failure or interruption" },
3738
    { 0x01,     "Attempted successfully: results not used to generate location" },
3739
    { 0x02,     "Attempted successfully: results used to verify but not generate location" },
3740
    { 0x03,     "Attempted successfully: results used to generate location" },
3741
    { 0x04,     "Attempted successfully: case where MS supports multiple mobile based positioning methods and the actual method or methods used by the MS cannot be determined" },
3742
    { 0,        NULL }
3743
};
3744
3745
uint16_t
3746
be_ganss_pos_dta(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3747
0
{
3748
0
    uint32_t curr_offset;
3749
3750
0
    curr_offset = offset;
3751
3752
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_method, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3753
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_ganss_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3754
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_usage, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3755
0
    curr_offset++;
3756
3757
0
    return curr_offset-offset;
3758
0
}
3759
/*
3760
 * 3.2.2.97 GANSS Location Type
3761
 */
3762
uint16_t
3763
be_ganss_loc_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3764
0
{
3765
0
    uint32_t curr_offset;
3766
3767
0
    curr_offset = offset;
3768
3769
0
    proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len);
3770
3771
0
    return len;
3772
0
}
3773
/*
3774
 * 3.2.2.98 Application Data
3775
 */
3776
static uint16_t
3777
be_app_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3778
0
{
3779
0
    uint32_t curr_offset;
3780
3781
0
    curr_offset = offset;
3782
3783
0
    proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len);
3784
3785
0
    return len;
3786
0
}
3787
/*
3788
 * 3.2.2.99 Data Identity
3789
 */
3790
static uint16_t
3791
be_app_data_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
3792
0
{
3793
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_data_id, tvb, offset, 1, ENC_BIG_ENDIAN);
3794
3795
0
    return len;
3796
0
}
3797
/*
3798
 * 3.2.2.100    Application Data Information
3799
 */
3800
static const true_false_string gsm_a_bssmap_bt_ind_val = {
3801
    "BSS has already transmitted the application data to cells",
3802
    "BSS has not transmitted the application data to cells"
3803
};
3804
static uint16_t
3805
be_app_data_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_)
3806
0
{
3807
0
    uint32_t curr_offset;
3808
3809
0
    curr_offset = offset;
3810
3811
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, (curr_offset<<3), 7, ENC_BIG_ENDIAN);
3812
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_bt_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3813
3814
0
    return len;
3815
0
}
3816
/*
3817
 * 3.2.2.101    MSISDN
3818
 * Octets 3-12 contain the digits of an MSISDN, coded as in 3GPP TS 24.008, Calling party BCD number, octets 4 - 13.
3819
 */
3820
 static uint16_t
3821
 be_msisdn(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
3822
0
 {
3823
0
    tvbuff_t    *new_tvb;
3824
3825
0
    new_tvb = tvb_new_subset_length(tvb, offset, len);
3826
0
    if (new_tvb) {
3827
0
        dissect_gsm_map_msisdn(new_tvb, pinfo , tree);
3828
0
    }
3829
3830
0
    return len;
3831
0
}
3832
 /*
3833
  * 3.2.2.102   AoIP Transport Layer Address
3834
  */
3835
static uint16_t
3836
be_aoip_trans_lay_add(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
3837
0
{
3838
0
    uint32_t curr_offset;
3839
0
    uint8_t addr_type;
3840
0
    uint32_t rtp_ipv4_address;
3841
0
    uint16_t rtp_port;
3842
0
    address rtp_dst_addr;
3843
0
    ws_in6_addr rtp_addr_ipv6;
3844
3845
0
    curr_offset = offset;
3846
3847
    /* This Information Element provides either an IPv4 or and IPv6 Address and UDP port value
3848
     * for the Transport Layer information of the connection end point.
3849
     * The Length differentiates between IPv4 and IPv6.
3850
     */
3851
0
    switch (len) {
3852
0
        case 6:
3853
            /* IPv4 */
3854
0
            addr_type = 1;
3855
0
            proto_tree_add_item(tree, hf_gsm_a_bssmap_aoip_trans_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
3856
0
            rtp_ipv4_address = tvb_get_ipv4(tvb, curr_offset);
3857
0
            curr_offset+=4;
3858
0
            break;
3859
0
        case 18:
3860
            /* IPv6 */
3861
0
            addr_type = 2;
3862
0
            proto_tree_add_item(tree, hf_gsm_a_bssmap_aoip_trans_ipv6, tvb, curr_offset, 16, ENC_NA);
3863
0
            tvb_get_ipv6(tvb, curr_offset, &rtp_addr_ipv6);
3864
0
            curr_offset+=16;
3865
0
            break;
3866
0
        default:
3867
            /* Bogus */
3868
0
            proto_tree_add_expert_format(tree, pinfo, &ei_gsm_a_bssmap_bogus_length, tvb, curr_offset, len, "Bogus length %u",len);
3869
0
            return len;
3870
0
    }
3871
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_aoip_trans_port, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
3872
0
    rtp_port = tvb_get_ntohs(tvb,curr_offset);
3873
0
    curr_offset+=2;
3874
3875
0
    switch (addr_type) {
3876
0
    case 1:
3877
        /* IPv4 */
3878
0
        rtp_dst_addr.type = AT_IPv4;
3879
0
        rtp_dst_addr.len = 4;
3880
0
        rtp_dst_addr.data = (uint8_t *)&rtp_ipv4_address;
3881
0
        break;
3882
0
    case 2:
3883
        /* IPv6 */
3884
0
        rtp_dst_addr.type = AT_IPv6;
3885
0
        rtp_dst_addr.len = 16;
3886
0
        rtp_dst_addr.data = (uint8_t *)&rtp_addr_ipv6;
3887
0
        break;
3888
0
    }
3889
3890
0
    if ((!pinfo->fd->visited) && rtp_port != 0) {
3891
0
        rtp_add_address(pinfo, PT_UDP, &rtp_dst_addr, rtp_port, 0, "BSS MAP", pinfo->num, false, 0);
3892
0
        rtcp_add_address(pinfo, &rtp_dst_addr, rtp_port+1, 0, "BSS MAP", pinfo->num);
3893
0
    }
3894
0
    return curr_offset-offset;
3895
0
}
3896
/*
3897
 * 3.2.2.103    Speech Codec List
3898
 */
3899
/*
3900
FR_AMR is coded '011'
3901
S11, S13 and S15 are reserved and coded with zeroes.
3902
HR_AMR is coded '100'
3903
S6 - S7 and S11 - S15 are reserved and coded with zeroes.
3904
OHR_AMR is coded '011'
3905
S11, S13 and S15 are reserved and coded with zeroes.
3906
3907
FR_AMR-WB is coded '001'
3908
S0 is set to '1' S1 - S7 are reserved and coded with zeroes.
3909
OFR_AMR-WB is coded '100'
3910
S0, S2, S4 indicates the supported Codec Configurations. S1, S3, S5, S6, S7 are reserved and coded with zeroes.
3911
OHR_AMR-WB is coded '101'
3912
S0 is set to '1' S1 - S7 are reserved and coded with zeroes.
3913
3914
3915
8   7   6   5   4   3   2   1
3916
FI  PI  PT  TF  Codec Type     (FR_AMR-WB or OFR_AMR-WB or OHR_AMR-WB)
3917
S7  S6  S5  S4  S3  S2  S1  S0
3918
3919
3920
*/
3921
static const true_false_string bssmap_fi_vals = {
3922
   "AoIP with compressed speech via RTP/UDP/IP is supported by the BSS/Preferred by the MSC",
3923
   "AoIP with Compressed speech via RTP/UDP/IP is not supported by the BSS/Not Preferred by the MSC"
3924
};
3925
static const true_false_string bssmap_tf_vals = {
3926
    "TFO supported by the BSS or TFO support is preferred by the MSC for this Codec Type",
3927
    "TFO is not supported by the BSS or TFO support is not preferred by the MSC for this Codec Type"
3928
};
3929
static const true_false_string bssmap_pi_vals = {
3930
    "Transport of PCM over A-Interface via RTP/UDP/IP is supported by the BSS or preferred by the MSC for this Codec Type",
3931
    "PCM over A interface with IP as transport is not supported by the BSS or not preferred by the MSC for this Codec Type"
3932
};
3933
static const true_false_string bssmap_pt_vals = {
3934
    "Transport of PCM over A-Interface via TDM is supported by the BSS or preferred by the MSC",
3935
    "PCM over A-Interface with TDM as transport is not supported by the BSS or not preferred by the MSC for this Codec Type"
3936
};
3937
/* 26.103 Table 6.3-1: Coding of the selected Codec_Type (long form) */
3938
static const value_string bssap_speech_codec_values[] = {
3939
    { 0x00,     "GSM FR" },
3940
    { 0x01,     "GSM HR" },
3941
    { 0x02,     "GSM EFR" },
3942
    { 0x03,     "FR_AMR" },
3943
    { 0x04,     "HR_AMR" },
3944
    { 0x05,     "UMTS AMR" },
3945
    { 0x06,     "UMTS AMR 2" },
3946
    { 0x07,     "TDMA EFR" },
3947
    { 0x08,     "PDC EFR" },
3948
    { 0x09,     "FR_AMR-WB" },
3949
    { 0x0a,     "UMTS AMR-WB" },
3950
    { 0x0b,     "OHR_AMR" },
3951
    { 0x0c,     "OFR_AMR-WB" },
3952
    { 0x0d,     "OHR_AMR-WB" },
3953
    { 0x0e,     "Reserved" },
3954
    { 0x0f,     "Codec Extension" },
3955
    { 0xfd,     "CSData" },
3956
    { 0xfe,     "MuMe2" },
3957
    { 0xff,     "MuMe" },
3958
    { 0,        NULL }
3959
};
3960
static value_string_ext bssap_speech_codec_values_ext = VALUE_STRING_EXT_INIT(bssap_speech_codec_values);
3961
3962
static const value_string bssap_extended_codec_values[] = {
3963
    { 0xfd,     "CSData" },
3964
    { 0,        NULL }
3965
};
3966
3967
static uint16_t
3968
be_speech_codec_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3969
0
{
3970
0
    uint32_t curr_offset, consumed = 0;
3971
0
    uint8_t codec;
3972
0
    uint8_t number = 0;
3973
0
    proto_item  *item = NULL;
3974
0
    proto_tree  *subtree = NULL;
3975
3976
0
    curr_offset = offset;
3977
3978
0
    while (curr_offset-offset < len) {
3979
0
        number++;
3980
0
        consumed = 0;
3981
0
        subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 1,
3982
0
                    ett_codec_lst, &item, "Speech Codec Element %u",number);
3983
0
        codec = tvb_get_uint8(tvb,curr_offset)&0x0f;
3984
0
        switch (codec) {
3985
0
            case 0:
3986
                /* GSM_FR is coded "0000" */
3987
                /* fall through */
3988
0
            case 1:
3989
                /* GSM_HR is coded "0001" */
3990
                /* fall through */
3991
0
            case 2:
3992
                /* GSM_EFR is coded "0010" */
3993
                /* fall through */
3994
                /* FI indicates Full IP */
3995
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_fi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3996
                /* PI indicates PCMoIP */
3997
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3998
                /* PT indicates PCMoTDM */
3999
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4000
                /* TF indicates TFO support */
4001
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_tf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4002
                /* Codec Type */
4003
0
                proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4004
0
                proto_item_append_text(item, " - %s",
4005
0
                                       val_to_str_const(tvb_get_uint8(tvb, curr_offset) & 0x0f,
4006
0
                                                        bssap_speech_codec_values,
4007
0
                                                        "Unknown"));
4008
0
                curr_offset++;
4009
0
                consumed++;
4010
0
                break;
4011
0
            case 3:
4012
                /* fall through */
4013
0
            case 4:
4014
                /* fall through */
4015
0
            case 0xb:
4016
                /* FR_AMR is coded '011'
4017
                 * HR_AMR is coded '100'
4018
                 * OHR_AMR is coded '1011'
4019
                 */
4020
                /* FI indicates Full IP */
4021
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_fi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4022
                /* PI indicates PCMoIP */
4023
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4024
                /* PT indicates PCMoTDM */
4025
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4026
                /* TF indicates TFO support */
4027
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_tf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4028
                /* Codec Type */
4029
0
                proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4030
0
                proto_item_append_text(item, " - %s",
4031
0
                                       val_to_str_const(tvb_get_uint8(tvb, curr_offset) & 0x0f,
4032
0
                                                        bssap_speech_codec_values,
4033
0
                                                        "Unknown"));
4034
0
                curr_offset++;
4035
0
                consumed++;
4036
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_s0_s15, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
4037
0
                curr_offset+=2;
4038
0
                consumed+=2;
4039
0
                break;
4040
0
            case 0x9:
4041
                /* fall through */
4042
0
            case 0xc:
4043
                /* fall through */
4044
0
            case 0xd:
4045
                /* FR_AMR-WB is coded '1001'
4046
                 * OFR_AMR-WB is coded '1100'
4047
                 * OHR_AMR-WB is coded '1101'
4048
                 */
4049
                /* FI indicates Full IP */
4050
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_fi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4051
                /* PI indicates PCMoIP */
4052
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4053
                /* PT indicates PCMoTDM */
4054
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4055
                /* TF indicates TFO support */
4056
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_tf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4057
                /* Codec Type */
4058
0
                proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4059
0
                proto_item_append_text(item, " - %s",
4060
0
                                       val_to_str_const(tvb_get_uint8(tvb, curr_offset) & 0x0f,
4061
0
                                                        bssap_speech_codec_values,
4062
0
                                                        "Unknown"));
4063
0
                curr_offset++;
4064
0
                consumed++;
4065
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_s0_s7, tvb, curr_offset, 1, ENC_NA);
4066
0
                curr_offset++;
4067
0
                consumed++;
4068
0
                break;
4069
0
            case 0xf:
4070
                /* Currently (3GPP TS 48.008 version 9.4.0 Release 9) CSData Codec Type is the only extended one */
4071
                /* PI indicates PCMoIP */
4072
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4073
                /* PT indicates PCMoTDM */
4074
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4075
                /* Codec Type */
4076
0
                proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4077
0
                curr_offset++;
4078
0
                consumed++;
4079
                /* Codec Extension */
4080
0
                proto_tree_add_item(subtree, hf_gsm_a_bssap_extended_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4081
0
                proto_item_append_text(item, " - %s",
4082
0
                                       val_to_str_const(tvb_get_uint8(tvb, curr_offset),
4083
0
                                                        bssap_extended_codec_values,
4084
0
                                                        "Unknown"));
4085
0
                curr_offset++;
4086
0
                consumed++;
4087
0
                proto_tree_add_item(subtree, hf_gsm_a_bssap_extended_codec_r2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4088
0
                proto_tree_add_item(subtree, hf_gsm_a_bssap_extended_codec_r3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4089
0
                curr_offset++;
4090
0
                consumed++;
4091
0
                break;
4092
0
            default:
4093
0
                proto_tree_add_expert(subtree, pinfo, &ei_gsm_a_bssap_unknown_codec, tvb, curr_offset, 2);
4094
0
                curr_offset+=2;
4095
0
                consumed+=2;
4096
0
                break;
4097
0
        }
4098
0
    }
4099
0
    proto_item_set_len(item, consumed);
4100
0
    return len;
4101
0
}
4102
/*
4103
 * 3.2.2.104    Speech Codec
4104
 */
4105
static const true_false_string bssmap_fi2_vals = {
4106
   "AoIP with compressed speech via RTP/UDP/IP is selected for this Codec Type",
4107
   "Compressed speech via RTP/UDP/IP is not selected for this Codec Type"
4108
};
4109
static const true_false_string bssmap_tf2_vals = {
4110
    "TFO Support is selected for this Codec Type",
4111
    "TFO Support is not selected for this Codec Type"
4112
};
4113
static const true_false_string bssmap_pi2_vals = {
4114
    "PCM over A-Interface via RTP/UPD/IP is selected for this Codec Type",
4115
    "PCM over A interface with RTP/UDP/IP is not selected for this Codec Type"
4116
};
4117
static const true_false_string bssmap_pt2_vals = {
4118
    "PCM over A-Interface with TDM as transport is selected for this Codec Type",
4119
    "PCM over A-Interface with TDM as transport is not selected for this Codec Type"
4120
};
4121
static uint16_t
4122
be_speech_codec(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4123
0
{
4124
0
    uint32_t curr_offset, consumed = 0;
4125
0
    uint8_t codec;
4126
0
    uint8_t number = 0;
4127
0
    proto_item  *item = NULL;
4128
0
    proto_tree  *subtree = NULL;
4129
4130
0
    curr_offset = offset;
4131
4132
0
    while (curr_offset-offset < len) {
4133
0
        number++;
4134
0
        consumed = 0;
4135
0
        subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 1, ett_codec_lst, &item,
4136
0
                        "Speech Codec Element %u",number);
4137
0
        codec = tvb_get_uint8(tvb,curr_offset)&0x0f;
4138
0
        switch (codec) {
4139
0
            case 0:
4140
                /* GSM_FR is coded "0000" */
4141
                /* fall through */
4142
0
            case 1:
4143
                /* GSM_HR is coded "0001" */
4144
                /* fall through */
4145
0
            case 2:
4146
                /* GSM_EFR is coded "0010" */
4147
                /* fall through */
4148
                /* FI indicates Full IP */
4149
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_fi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4150
                /* PI indicates PCMoIP */
4151
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4152
                /* PT indicates PCMoTDM */
4153
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4154
                /* TF indicates TFO support */
4155
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_tf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4156
                /* Codec Type */
4157
0
                proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4158
0
                proto_item_append_text(item, " - %s",
4159
0
                                       val_to_str_const(tvb_get_uint8(tvb, curr_offset) & 0x0f,
4160
0
                                                        bssap_speech_codec_values,
4161
0
                                                        "Unknown"));
4162
0
                curr_offset++;
4163
0
                consumed++;
4164
0
                break;
4165
0
            case 3:
4166
                /* fall through */
4167
0
            case 4:
4168
                /* fall through */
4169
0
            case 0xb:
4170
                /* FR_AMR is coded '011'
4171
                 * HR_AMR is coded '100'
4172
                 * OHR_AMR is coded '1011'
4173
                 */
4174
                /* FI indicates Full IP */
4175
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_fi2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4176
                /* PI indicates PCMoIP */
4177
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4178
                /* PT indicates PCMoTDM */
4179
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4180
                /* TF indicates TFO support */
4181
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_tf2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4182
                /* Codec Type */
4183
0
                proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4184
0
                proto_item_append_text(item, " - %s",
4185
0
                                       val_to_str_const(tvb_get_uint8(tvb, curr_offset) & 0x0f,
4186
0
                                                        bssap_speech_codec_values,
4187
0
                                                        "Unknown"));
4188
0
                curr_offset++;
4189
0
                consumed++;
4190
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_s0_s15, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
4191
0
                curr_offset+=2;
4192
0
                consumed+=2;
4193
0
                break;
4194
0
            case 0x9:
4195
                /* fall through */
4196
0
            case 0xc:
4197
                /* fall through */
4198
0
            case 0xd:
4199
                /* FR_AMR-WB is coded '1001'
4200
                 * OFR_AMR-WB is coded '1100'
4201
                 * OHR_AMR-WB is coded '1101'
4202
                 */
4203
                /* FI indicates Full IP */
4204
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_fi2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4205
                /* PI indicates PCMoIP */
4206
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4207
                /* PT indicates PCMoTDM */
4208
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4209
                /* TF indicates TFO support */
4210
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_tf2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4211
                /* Codec Type */
4212
0
                proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4213
0
                proto_item_append_text(item, " - %s",
4214
0
                                       val_to_str_const(tvb_get_uint8(tvb, curr_offset) & 0x0f,
4215
0
                                                        bssap_speech_codec_values,
4216
0
                                                        "Unknown"));
4217
0
                curr_offset++;
4218
0
                consumed++;
4219
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_s0_s7, tvb, curr_offset, 1, ENC_NA);
4220
0
                curr_offset++;
4221
0
                consumed++;
4222
0
                break;
4223
0
            case 0xf:
4224
                /* Currently (3GPP TS 48.008 version 9.4.0 Release 9) CSData Codec Type is the only extended one */
4225
                /* PI indicates PCMoIP */
4226
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4227
                /* PT indicates PCMoTDM */
4228
0
                proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4229
                /* Codec Type */
4230
0
                proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4231
0
                curr_offset++;
4232
0
                consumed++;
4233
                /* Codec Extension */
4234
0
                proto_tree_add_item(subtree, hf_gsm_a_bssap_extended_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4235
0
                curr_offset++;
4236
0
                consumed++;
4237
0
                proto_tree_add_item(subtree, hf_gsm_a_bssap_extended_codec_r2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4238
0
                proto_tree_add_item(subtree, hf_gsm_a_bssap_extended_codec_r3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4239
0
                curr_offset++;
4240
0
                consumed++;
4241
0
                break;
4242
0
            default:
4243
0
                proto_tree_add_expert(subtree, pinfo, &ei_gsm_a_bssap_unknown_codec, tvb, curr_offset, 2);
4244
0
                curr_offset+=2;
4245
0
                consumed+=2;
4246
0
                break;
4247
0
        }
4248
0
    }
4249
0
    proto_item_set_len(item, consumed);
4250
0
    return len;
4251
0
}
4252
/*
4253
 * 3.2.2.105    Call Identifier
4254
 */
4255
static uint16_t
4256
be_call_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_)
4257
0
{
4258
0
    uint32_t curr_offset;
4259
4260
0
    curr_offset = offset;
4261
4262
    /* Call Identifier  (least significant bits)    octet 2
4263
     * Call Identifier  octet 3
4264
     * Call Identifier  octet 4
4265
     * Call Identifier (most significant bits)  octet 5
4266
     */
4267
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_call_id, tvb, curr_offset, 4, ENC_LITTLE_ENDIAN);
4268
0
    curr_offset+=4;
4269
4270
0
    return curr_offset-offset;
4271
0
}
4272
/*
4273
 * 3.2.2.106    Call Identifier List
4274
 */
4275
static uint16_t
4276
be_call_id_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4277
0
{
4278
0
    uint32_t curr_offset;
4279
0
    curr_offset = offset;
4280
4281
0
    if (len==0) {
4282
0
        proto_tree_add_item(tree, hf_gsm_a_bssmap_all_call_identifiers_resources_released, tvb, curr_offset, len, ENC_NA);
4283
0
    }
4284
0
    while (curr_offset-offset < len) {
4285
0
        proto_tree_add_item(tree, hf_gsm_a_bssmap_call_id, tvb, curr_offset, 4, ENC_LITTLE_ENDIAN);
4286
0
        curr_offset+=4;
4287
0
    }
4288
4289
0
    return len;
4290
0
}
4291
/*
4292
 * 3.2.2.107    A-Interface Selector for RESET
4293
 */
4294
static const true_false_string gsm_a_bssmap_rip_value = {
4295
    "all calls associated to IP links shall be cleared",
4296
    "calls associated to IP links shall not be cleared"
4297
};
4298
static const true_false_string gsm_a_bssmap_rtd_value = {
4299
    "all calls associated to TDM links shall be cleared",
4300
    "calls associated to TDM links shall not be cleared"
4301
};
4302
static uint16_t
4303
be_a_itf_sel_for_reset(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4304
0
{
4305
0
    uint32_t curr_offset;
4306
0
    curr_offset = offset;
4307
4308
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, (curr_offset<<3), 6, ENC_BIG_ENDIAN);
4309
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_rip, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4310
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_rtd, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4311
0
    curr_offset++;
4312
4313
0
    return curr_offset-offset;
4314
0
}
4315
/*
4316
 * 3.2.2.109    Kc128
4317
 */
4318
static uint16_t
4319
be_kc128(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4320
0
{
4321
0
    uint32_t curr_offset;
4322
0
    curr_offset = offset;
4323
4324
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_kc128, tvb, curr_offset, 16, ENC_NA);
4325
0
    curr_offset+=16;
4326
4327
0
    return curr_offset-offset;
4328
0
}
4329
/*
4330
 * 3.2.2.110    CSG Identifier
4331
 */
4332
static const crumb_spec_t gsm_a_bssmap_csg_id_crumbs[] = {
4333
    { 0, 24},
4334
    { 29, 3},
4335
    { 0, 0}
4336
};
4337
static const true_false_string gsm_a_bssmap_cell_access_mode_value = {
4338
    "Hybrid cell",
4339
    "CSG cell"
4340
};
4341
static uint16_t
4342
be_csg_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4343
0
{
4344
0
    uint32_t bit_offset;
4345
0
    bit_offset = offset<<3;
4346
4347
0
    proto_tree_add_split_bits_item_ret_val(tree, hf_gsm_a_bssmap_csg_id, tvb, bit_offset, gsm_a_bssmap_csg_id_crumbs, NULL);
4348
0
    bit_offset += 32;
4349
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
4350
0
    bit_offset += 7;
4351
0
    proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_cell_access_mode, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4352
4353
0
    return len;
4354
0
}
4355
4356
/*
4357
 * 3.2.2.111 Redirect Attempt Flag
4358
 * No data
4359
 */
4360
4361
/*
4362
 * 3.2.2.112 Reroute Reject Cause
4363
 */
4364
/*
4365
 * Reroute Reject cause value (octet 2)
4366
 */
4367
4368
4369
static const value_string gsm_a_bssap_reroute_rej_cause_vals[] = {
4370
    { 0x0,     "Reserved" },
4371
    { 0x1,     "Reserved" },
4372
    { 0x2,     "Reserved" },
4373
    { 0x3,     "Reserved" },
4374
    { 0x4,     "Reserved" },
4375
    { 0x5,     "Reserved" },
4376
    { 0x6,     "Reserved" },
4377
    { 0x7,     "Reserved" },
4378
    { 0x8,     "Reserved" },
4379
    { 0x9,     "Reserved" },
4380
    { 0xa,     "Reserved" },
4381
    { 0xb,     "PLMN not allowed" },
4382
    { 0xc,     "Location area not allowed" },
4383
    { 0xd,     "Roaming not allowed in this location area" },
4384
    { 0xe,     "GPRS services not allowed in this PLMN" },
4385
    { 0xf,     "No suitable cell in location area" },
4386
    { 0x10,    "CS/PS domain registration coordination required" },
4387
    { 0,        NULL }
4388
};
4389
4390
static uint16_t
4391
be_reroute_rej_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_)
4392
0
{
4393
0
    uint32_t curr_offset;
4394
0
    curr_offset = offset;
4395
4396
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_reroute_rej_cause, tvb, curr_offset, 1, ENC_NA);
4397
0
    curr_offset+=1;
4398
4399
0
    return curr_offset-offset;
4400
4401
0
}
4402
4403
/*
4404
 * 3.2.2.113 Send Sequence Number
4405
 */
4406
static uint16_t
4407
be_send_seqn(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4408
0
{
4409
0
    uint32_t curr_offset;
4410
0
    curr_offset = offset;
4411
4412
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_send_seqn, tvb, curr_offset, 1, ENC_NA);
4413
0
    curr_offset+=1;
4414
4415
0
    return curr_offset-offset;
4416
4417
0
}
4418
4419
/*
4420
 * 3.2.2.114 Reroute complete outcome
4421
 */
4422
static const value_string gsm_a_bssap_reroute_outcome_vals[] = {
4423
    { 0x0,     "Reserved" },
4424
    { 0x1,     "MS is accepted" },
4425
    { 0x2,     "MS is not accepted" },
4426
    { 0x3,     "MS is already registered" },
4427
    { 0,        NULL }
4428
};
4429
4430
static uint16_t
4431
be_reroute_outcome(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4432
0
{
4433
0
    uint32_t curr_offset;
4434
0
    curr_offset = offset;
4435
4436
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_reroute_outcome, tvb, curr_offset, 1, ENC_NA);
4437
0
    curr_offset+=1;
4438
4439
0
    return curr_offset-offset;
4440
4441
0
}
4442
4443
/*
4444
 * 3.2.2.115 Global Call Reference as per 3GPP TS 29.205 Section B.2.1.9
4445
 */
4446
static uint16_t
4447
be_global_call_ref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4448
0
{
4449
0
    dissect_bicc_mst_lcls_gcr(tvb, tree, offset, len);
4450
4451
0
    return len;
4452
0
}
4453
4454
/*
4455
 * 3.2.2.116 LCLS-Configuration
4456
 */
4457
static const value_string gsm_a_bssap_lcls_conf_vals[] = {
4458
    { 0x0,     "Connect both-way" },
4459
    { 0x1,     "Connect both-way and bi-cast UL to the core network" },
4460
    { 0x2,     "Connect both-way and send access DL from the core network" },
4461
    { 0x3,     "Connect both-way and send access DL from the core network, block local DL user data" },
4462
    { 0x4,     "Connect both-way and bi-cast UL to the core network with send access DL from the core network" },
4463
    { 0x5,     "Connect both-way and bi-cast UL to the core network with send access DL from the core network, block local DL user data" },
4464
    { 0,        NULL }
4465
};
4466
4467
static uint16_t
4468
be_lcls_conf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4469
0
{
4470
0
    uint32_t curr_offset;
4471
0
    curr_offset = offset;
4472
4473
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_lcls_conf, tvb, curr_offset, 1, ENC_NA);
4474
0
    curr_offset+=1;
4475
4476
0
    return curr_offset-offset;
4477
4478
0
}
4479
4480
/*
4481
 * 3.2.2.117 LCLS-Connection-Status-Control
4482
 */
4483
static const value_string gsm_a_bssap_lcls_con_status_control_vals[] = {
4484
    { 0x0,     "Connect" },
4485
    { 0x1,     "Do not connect" },
4486
    { 0x2,     "Release LCLS" },
4487
    { 0x3,     "Bi-cast UL at Handover" },
4488
    { 0x4,     "Bi-cast UL and receive DL data at Handover" },
4489
    { 0,        NULL }
4490
};
4491
4492
static uint16_t
4493
be_lcls_con_status_control(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4494
0
{
4495
0
    uint32_t curr_offset;
4496
0
    curr_offset = offset;
4497
4498
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_lcls_con_status_control, tvb, curr_offset, 1, ENC_NA);
4499
0
    curr_offset+=1;
4500
4501
0
    return curr_offset-offset;
4502
4503
0
}
4504
4505
/*
4506
 * 3.2.2.118 LCLS-Correlation-Not-Needed
4507
 * No data
4508
 */
4509
4510
/*
4511
 * 3.2.2.119 LCLS-BSS-Status
4512
 */
4513
static const value_string gsm_a_bssmap_lcls_bss_status_vals[] = {
4514
    { 0x0,     "Call not yet locally switched" },
4515
    { 0x1,     "Call not possible to be locally switched" },
4516
    { 0x2,     "Call is no longer locally switched" },
4517
    { 0x3,     "Requested LCLS configuration is not supported" },
4518
    { 0x4,     "Call is locally switched with requested LCLS configuration" },
4519
    { 0,        NULL }
4520
};
4521
4522
static uint16_t
4523
be_lcls_bss_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4524
0
{
4525
0
    uint32_t curr_offset;
4526
0
    curr_offset = offset;
4527
4528
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_lcls_bss_status, tvb, curr_offset, 1, ENC_NA);
4529
0
    curr_offset+=1;
4530
4531
0
    return curr_offset-offset;
4532
4533
0
}
4534
4535
/*
4536
 * 3.2.2.120 LCLS-Break-Request
4537
 * No data
4538
 */
4539
4540
/*
4541
 * 3.2.2.121 CSFB Indication
4542
 * No data
4543
 */
4544
4545
/*
4546
 * 3.2.2.123 Source eNB to target eNB transparent information (E-UTRAN)
4547
 */
4548
4549
/*
4550
 * 3.2.2.124 CS to PS SRVCC Indication
4551
 */
4552
4553
/*
4554
 * 3.2.2.125 CN to MS transparent information
4555
 */
4556
4557
/*
4558
 * 3.2.2.126 Selected PLMN ID
4559
 */
4560
static uint16_t
4561
be_selected_plmn_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4562
0
{
4563
4564
0
    dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, offset, E212_NONE, true);
4565
0
    return 3;
4566
4567
0
}
4568
4569
/*
4570
 * 3.2.2.127 Last used E-UTRAN PLMN ID
4571
 */
4572
static uint16_t
4573
be_last_used_eutran_plmn_id(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo, uint32_t offset, unsigned len _U_, char* add_string _U_, int string_len _U_)
4574
0
{
4575
4576
0
    dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_NONE, true);
4577
4578
0
    return 3;
4579
4580
0
}
4581
4582
/* Osmocom extension: Osmux CID */
4583
static uint16_t
4584
be_osmocom_osmux_cid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4585
0
{
4586
0
    proto_tree_add_item(tree, hf_gsm_a_bssmap_osmocom_osmux_cid, tvb, offset, 1, ENC_NA);
4587
0
    return 1;
4588
0
}
4589
4590
4591
uint16_t (*bssmap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len) = {
4592
    NULL,               /* Undefined */
4593
    be_cic,             /* Circuit Identity Code */
4594
    NULL,               /* Reserved */
4595
    be_res_avail,       /* Resource Available */
4596
    bssmap_dissect_cause,/* Cause */
4597
    be_cell_id,         /* Cell Identifier */
4598
    be_prio,            /* Priority */
4599
    be_l3_header_info,  /* Layer 3 Header Information */
4600
    de_mid,             /* IMSI */
4601
    be_tmsi,            /* TMSI */
4602
    be_enc_info,        /* Encryption Information */
4603
    be_chan_type,       /* Channel Type */
4604
    be_periodicity,     /* Periodicity */
4605
    be_ext_res_ind,     /* Extended Resource Indicator */
4606
    be_num_ms,          /* Number Of MSs */
4607
    NULL,               /* Reserved */
4608
    NULL,               /* Reserved */
4609
    NULL,               /* Reserved */
4610
    de_ms_cm_2,         /* Classmark Information Type 2 */
4611
    de_ms_cm_3,         /* Classmark Information Type 3 */
4612
    be_int_band,        /* Interference Band To Be Used */
4613
    de_rr_cause,        /* RR Cause */
4614
    NULL,               /* Reserved */
4615
    be_l3_info,         /* Layer 3 Information */
4616
    be_dlci,            /* DLCI */
4617
    be_down_dtx_flag,   /* Downlink DTX Flag */
4618
    be_cell_id_list,    /* Cell Identifier List */
4619
    NULL                /* no associated data */,  /* Response Request */
4620
    be_res_ind_method,  /* Resource Indication Method */
4621
    de_ms_cm_1,         /* Classmark Information Type 1 */
4622
    be_cic_list,        /* Circuit Identity Code List */
4623
    be_diag,            /* Diagnostics */
4624
    be_l3_msg,          /* Layer 3 Message Contents */
4625
    be_chosen_chan,     /* Chosen Channel */
4626
    be_tot_res_acc,     /* Total Resource Accessible */
4627
    be_ciph_resp_mode,  /* Cipher Response Mode */
4628
    be_cha_needed,      /* Channel Needed */
4629
    be_trace_type,      /* Trace Type */
4630
    be_trace_trigger_id,/* TriggerID */
4631
    be_trace_reference, /* Trace Reference */
4632
    be_trace_transaction_id, /* TransactionID */
4633
    de_mid,             /* Mobile Identity */
4634
    be_trace_omc_id,    /* OMCID */
4635
    be_for_ind,         /* Forward Indicator */
4636
    be_chosen_enc_alg,  /* Chosen Encryption Algorithm */
4637
    be_cct_pool,        /* Circuit Pool */
4638
    NULL,               /* Circuit Pool List */
4639
    NULL,               /* Time Indication */
4640
    NULL,               /* Resource Situation */
4641
    be_curr_chan_1,     /* Current Channel Type 1 */
4642
    be_que_ind,         /* Queueing Indicator */
4643
    be_ass_req,         /* Assignment Requirement */
4644
    NULL,               /* Undefined */
4645
    NULL                /* no associated data */,   /* Talker Flag */
4646
    NULL                /* no associated data */,   /* Connection Release Requested */
4647
    de_d_gb_call_ref,   /* Group Call Reference */
4648
    be_emlpp_prio,      /* eMLPP Priority */
4649
    be_conf_evo_ind,    /* Configuration Evolution Indication */
4650
    be_field_element_dissect,   /* Old BSS to New BSS Information */
4651
    be_lsa_id,          /* LSA Identifier */
4652
    be_lsa_id_list,     /* LSA Identifier List */
4653
    be_lsa_info,        /* LSA Information */
4654
    NULL,               /* LCS QoS Dissected in packet-gsm_bssmap_le.c*/
4655
    NULL,               /* LSA access control suppression */
4656
    be_speech_ver,      /* Speech Version */
4657
    NULL,               /* Undefined */
4658
    NULL,               /* Undefined */
4659
    be_lcs_prio,        /* LCS Priority */
4660
    be_loc_type,        /* Location Type */
4661
    be_loc_est,         /* Location Estimate */
4662
    be_pos_data,        /* Positioning Data */
4663
    NULL,               /* 3.2.2.66 LCS Cause Dissected in packet-gsm_bssmap_le.c */
4664
    NULL,               /* LCS Client Type Dissected in packet-gsm_bssmap_le.c */
4665
    be_apdu,            /* APDU */
4666
    NULL,               /* Network Element Identity */
4667
    be_gps_assist_data, /* GPS Assistance Data */
4668
    NULL,               /* Deciphering Keys (dissected in packet-gsm_bssmap_le)*/
4669
    be_ret_err_req,     /* Return Error Request */
4670
    be_ret_err_cause,   /* Return Error Cause */
4671
    be_seg,             /* Segmentation */
4672
    be_serv_ho,         /* Service Handover */
4673
    be_src_rnc_to_tar_rnc_umts, /* Source RNC to target RNC transparent information (UMTS) */
4674
    be_src_rnc_to_tar_rnc_cdma, /* Source RNC to target RNC transparent information (cdma2000) */
4675
    be_geran_cls_m,     /* GERAN Classmark */
4676
    be_geran_bsc_cont,  /* GERAN BSC Container */
4677
    be_vel_est,         /* Velocity Estimate */
4678
    NULL,               /* Undefined */
4679
    NULL,               /* Undefined */
4680
    NULL,               /* Undefined */
4681
    NULL,               /* Undefined */
4682
    NULL,               /* Undefined */
4683
    NULL,               /* Undefined */
4684
    NULL,               /* Undefined */
4685
    NULL,               /* Undefined */
4686
    NULL,               /* Undefined */
4687
    NULL,               /* Undefined */
4688
    NULL,               /* Undefined */
4689
    be_field_element_dissect,   /* New BSS to Old BSS Information */
4690
    NULL,               /* Undefined */
4691
    be_inter_sys_inf,   /*  Inter-System Information */
4692
    be_sna_acc_inf,     /* SNA Access Information */
4693
    be_vstk_rand_info,  /* VSTK_RAND Information */
4694
    be_vstk_info,       /* VSTK Information */
4695
    be_paging_inf,      /* Paging Information */
4696
    de_mid,             /* 3.2.2.86 IMEI (use same dissector as IMSI)*/
4697
    be_vgcs_feat_flg,   /* VGCS Feature Flags */
4698
    be_talker_pri,      /* Talker Priority */
4699
    NULL,               /* no data Emergency Set Indication */
4700
    be_talker_id,       /* Talker Identity */
4701
    be_cell_id_list_seg,    /* Cell Identifier List Segment */
4702
    be_sms_to_vgcs,     /* SMS to VGCS */
4703
    be_vgcs_talker_mode,/*  VGCS Talker Mode */
4704
    be_vgcs_vbs_cell_status,            /* VGCS/VBS Cell Status */
4705
    be_cell_id_lst_seg_f_est_cells,     /* Cell Identifier List Segment for established cells */
4706
    be_cell_id_lst_seg_f_cell_tb_est,   /* Cell Identifier List Segment for cells to be established */
4707
    be_cell_id_lst_seg_f_rel_cell,      /* Cell Identifier List Segment for released cells - no user present */
4708
    be_cell_id_lst_seg_f_not_est_cell,  /* Cell Identifier List Segment for not established cells - no establishment possible */
4709
    be_ganss_ass_dta,   /*  GANSS Assistance Data */
4710
    be_ganss_pos_dta,   /*  GANSS Positioning Data */
4711
    be_ganss_loc_type,  /* GANSS Location Type */
4712
    be_app_data,        /* Application Data */
4713
    be_app_data_id,     /* Data Identity */
4714
    be_app_data_inf,    /*  Application Data Information */
4715
    be_msisdn,          /* MSISDN */
4716
    be_aoip_trans_lay_add,  /*  AoIP Transport Layer Address */
4717
    be_speech_codec_lst,/* Speech Codec List */
4718
    be_speech_codec,    /* Speech Codec */
4719
    be_call_id,         /* Call Identifier */
4720
    be_call_id_lst,     /* Call Identifier List */
4721
    be_a_itf_sel_for_reset, /* A-Interface Selector for RESET */
4722
    NULL,               /* Undefined */
4723
    be_kc128,           /* Kc128 */
4724
    be_csg_id,                          /* CSG Identifier */
4725
    NULL,                               /* Redirect Attempt Flag                3.2.2.111    No data */
4726
    be_reroute_rej_cause,               /* Reroute Reject Cause                 3.2.2.112    */
4727
    be_send_seqn,                       /* Send Sequence Number                 3.2.2.113    */
4728
    be_reroute_outcome,                 /* Reroute complete outcome             3.2.2.114    */
4729
    be_global_call_ref,                 /* Global Call Reference                3.2.2.115    */
4730
    be_lcls_conf,                       /* LCLS-Configuration                   3.2.2.116    */
4731
    be_lcls_con_status_control,         /* LCLS-Connection-Status-Control       3.2.2.117    */
4732
    NULL,                               /* LCLS-Correlation-Not-Needed          3.2.2.118    No data */
4733
    be_lcls_bss_status,                 /* LCLS-BSS-Status                      3.2.2.119    */
4734
    NULL,                               /* LCLS-Break-Request                   3.2.2.120    No data */
4735
    NULL,                               /* CSFB Indication                      3.2.2.121    No data */
4736
    NULL,                               /* CS to PS SRVCC                       3.2.2.122    */
4737
    NULL,                               /* Source eNB to target eNB transparent information (E-UTRAN)" 3.2.2.123    */
4738
    NULL,                               /* CS to PS SRVCC Indication            3.2.2.124    */
4739
    NULL,                               /* CN to MS transparent information     3.2.2.125    */
4740
    be_selected_plmn_id,                /* Selected PLMN ID                     3.2.2.126    */
4741
    be_last_used_eutran_plmn_id,        /* Last used E-UTRAN PLMN ID            3.2.2.127    */
4742
    NULL,                               /* 0x96 */
4743
    NULL,                               /* 0x97 */
4744
    NULL,                               /* 0x98 */
4745
    NULL,                               /* 0x99 */
4746
    NULL,                               /* 0x9a */
4747
    NULL,                               /* 0x9b */
4748
    NULL,                               /* 0x9c */
4749
    NULL,                               /* 0x9d */
4750
    NULL,                               /* 0x9e */
4751
    NULL,                               /* 0x9f */
4752
    NULL,                               /* 0xa0 */
4753
    NULL,                               /* 0xa1 */
4754
    NULL,                               /* 0xa2 */
4755
    NULL,                               /* 0xa3 */
4756
    NULL,                               /* 0xa4 */
4757
    NULL,                               /* 0xa5 */
4758
    NULL,                               /* 0xa6 */
4759
    NULL,                               /* 0xa7 */
4760
    NULL,                               /* 0xa8 */
4761
    NULL,                               /* 0xa9 */
4762
    NULL,                               /* 0xaa */
4763
    NULL,                               /* 0xab */
4764
    NULL,                               /* 0xac */
4765
    NULL,                               /* 0xad */
4766
    NULL,                               /* 0xae */
4767
    NULL,                               /* 0xaf */
4768
    NULL,                               /* 0xb0 */
4769
    NULL,                               /* 0xb1 */
4770
    NULL,                               /* 0xb2 */
4771
    NULL,                               /* 0xb3 */
4772
    NULL,                               /* 0xb4 */
4773
    NULL,                               /* 0xb5 */
4774
    NULL,                               /* 0xb6 */
4775
    NULL,                               /* 0xb7 */
4776
    NULL,                               /* 0xb8 */
4777
    NULL,                               /* 0xb9 */
4778
    NULL,                               /* 0xba */
4779
    NULL,                               /* 0xbb */
4780
    NULL,                               /* 0xbc */
4781
    NULL,                               /* 0xbd */
4782
    NULL,                               /* 0xbe */
4783
    NULL,                               /* 0xbf */
4784
    NULL,                               /* 0xc0 */
4785
    NULL,                               /* 0xc1 */
4786
    NULL,                               /* 0xc2 */
4787
    NULL,                               /* 0xc3 */
4788
    NULL,                               /* 0xc4 */
4789
    NULL,                               /* 0xc5 */
4790
    NULL,                               /* 0xc6 */
4791
    NULL,                               /* 0xc7 */
4792
    NULL,                               /* 0xc8 */
4793
    NULL,                               /* 0xc9 */
4794
    NULL,                               /* 0xca */
4795
    NULL,                               /* 0xcb */
4796
    NULL,                               /* 0xcc */
4797
    NULL,                               /* 0xcd */
4798
    NULL,                               /* 0xce */
4799
    NULL,                               /* 0xcf */
4800
    NULL,                               /* 0xd0 */
4801
    NULL,                               /* 0xd1 */
4802
    NULL,                               /* 0xd2 */
4803
    NULL,                               /* 0xd3 */
4804
    NULL,                               /* 0xd4 */
4805
    NULL,                               /* 0xd5 */
4806
    NULL,                               /* 0xd6 */
4807
    NULL,                               /* 0xd7 */
4808
    NULL,                               /* 0xd8 */
4809
    NULL,                               /* 0xd9 */
4810
    NULL,                               /* 0xda */
4811
    NULL,                               /* 0xdb */
4812
    NULL,                               /* 0xdc */
4813
    NULL,                               /* 0xdd */
4814
    NULL,                               /* 0xde */
4815
    NULL,                               /* 0xdf */
4816
    NULL,                               /* 0xe0 */
4817
    NULL,                               /* 0xe1 */
4818
    NULL,                               /* 0xe2 */
4819
    NULL,                               /* 0xe3 */
4820
    NULL,                               /* 0xe4 */
4821
    NULL,                               /* 0xe5 */
4822
    NULL,                               /* 0xe6 */
4823
    NULL,                               /* 0xe7 */
4824
    NULL,                               /* 0xe8 */
4825
    NULL,                               /* 0xe9 */
4826
    NULL,                               /* 0xea */
4827
    NULL,                               /* 0xeb */
4828
    NULL,                               /* 0xec */
4829
    NULL,                               /* 0xed */
4830
    NULL,                               /* 0xee */
4831
    NULL,                               /* 0xef */
4832
    NULL,                               /* Osmocom extension: Osmux Support */
4833
    be_osmocom_osmux_cid,               /* Osmocom extension: Osmux CID */
4834
    NULL                                /* NONE */
4835
4836
};
4837
/* 3.2.3    Signalling Field Element Coding */
4838
/* 3.2.3.1  Extra information */
4839
static const value_string fe_extra_info_prec_vals[] = {
4840
    { 0, "The old BSS recommends that this allocation request should not cause a pre-emption an existing connection" },
4841
    { 1, "The old BSS recommends that this allocation request is allowed to preempt an existing connection based on the information supplied in the Priority information element, if available" },
4842
    { 0, NULL}
4843
};
4844
4845
static const value_string fe_extra_info_lcs_vals[] = {
4846
    { 0, "No ongoing LCS procedure" },
4847
    { 1, "An ongoing LCS procedure was interrupted by handover. The new BSS may notify the SMLC when the handover is completed" },
4848
    { 0, NULL}
4849
};
4850
4851
static const value_string fe_extra_info_ue_prob_vals[] = {
4852
    { 0, "This MS supports handover to UMTS" },
4853
    { 1, "This MS does not support handover to UMTS" },
4854
    { 0, NULL}
4855
};
4856
4857
static uint16_t
4858
be_fe_extra_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4859
0
{
4860
0
    uint32_t curr_offset;
4861
4862
0
    curr_offset = offset;
4863
0
    proto_tree_add_item(tree, hf_fe_extra_info_prec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4864
0
    proto_tree_add_item(tree, hf_fe_extra_info_lcs, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4865
0
    proto_tree_add_item(tree, hf_fe_extra_info_ue_prob, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4866
0
    proto_tree_add_item(tree, hf_fe_extra_info_spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4867
0
    curr_offset++;
4868
4869
0
    return curr_offset-offset;
4870
0
}
4871
4872
/* 3.2.3.2  Current Channel type 2 */
4873
static uint16_t
4874
be_fe_cur_chan_type2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4875
0
{
4876
0
    uint32_t curr_offset;
4877
4878
0
    curr_offset = offset;
4879
0
    proto_tree_add_item(tree, hf_fe_cur_chan_type2_chan_mode, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4880
0
    proto_tree_add_item(tree, hf_fe_cur_chan_type2_chan_mode_spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4881
0
    curr_offset++;
4882
0
    proto_tree_add_item(tree, hf_fe_cur_chan_type2_chan_field, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4883
0
    proto_tree_add_item(tree, hf_fe_cur_chan_type2_chan_field_spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4884
0
    curr_offset++;
4885
4886
0
    return curr_offset-offset;
4887
0
}
4888
4889
/* 3.2.3.3  Target cell radio information */
4890
static uint16_t
4891
be_fe_target_radio_cell_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4892
0
{
4893
0
    uint32_t curr_offset;
4894
4895
0
    curr_offset = offset;
4896
0
    proto_tree_add_item(tree, hf_fe_target_radio_cell_info_rxlev_ncell, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4897
0
    proto_tree_add_item(tree, hf_fe_target_radio_cell_info_rxlev_ncell_spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4898
0
    curr_offset++;
4899
4900
0
    return curr_offset-offset;
4901
0
}
4902
4903
/* 3.2.3.4  GPRS Suspend Information */
4904
static uint16_t
4905
be_fe_gprs_suspend_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4906
0
{
4907
0
    uint32_t curr_offset = offset;
4908
4909
    /* This Field Element contains the contents of the Gb interface SUSPEND ACK PDU,
4910
       Call the BSSGP dissector here, assuming that the encoding is per 48.018 */
4911
4912
4913
0
    bssgp_suspend_ack(tvb, tree, pinfo, offset, len);
4914
0
    curr_offset += len;
4915
4916
0
    return curr_offset-offset;
4917
0
}
4918
4919
/* 3.2.3.5  MultiRate configuration Information */
4920
4921
/* 3.2.3.6  Dual Transfer Mode information */
4922
static const value_string gsm_a_bssmap_dtm_info_dtm_ind_vals[] = {
4923
    { 0,    "The MS has resources allocated exclusively for the CS domain in the old cell" },
4924
    { 1,    "The MS has resources allocated for both the CS and PS domains in the old cell" },
4925
    { 0, NULL }
4926
};
4927
4928
static const value_string gsm_a_bssmap_dtm_info_sto_ind_vals[] = {
4929
    { 0,    "The MS is in multislot operation in the old cell" },
4930
    { 1,    "The MS is in single timeslot operation in the old cell" },
4931
    { 0, NULL }
4932
};
4933
4934
static const value_string gsm_a_bssmap_dtm_info_egprs_ind_vals[] = {
4935
    { 0,    "The MS has no TBF using E-GPRS in the old cell" },
4936
    { 1,    "The MS has a TBF using E-GPRS in the old cell" },
4937
    { 0, NULL }
4938
};
4939
4940
static uint16_t
4941
be_fe_dual_transfer_mode_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4942
0
{
4943
0
    uint32_t curr_offset;
4944
4945
0
    curr_offset = offset;
4946
0
    proto_tree_add_item(tree, hf_fe_dtm_info_dtm_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4947
0
    proto_tree_add_item(tree, hf_fe_dtm_info_sto_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4948
0
    proto_tree_add_item(tree, hf_fe_dtm_info_egprs_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4949
0
    proto_tree_add_item(tree, hf_fe_dtm_info_spare_bits, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4950
0
    curr_offset++;
4951
4952
0
    return curr_offset-offset;
4953
0
}
4954
4955
/* 3.2.3.7  Inter RAT Handover Info */
4956
static uint16_t
4957
be_fe_inter_rat_handover_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4958
0
{
4959
0
    tvbuff_t    *container_tvb;
4960
4961
    /* Octets 3-n are encoded as Inter RAT Handover Info as defined in 3GPP TS 25.331 */
4962
0
    container_tvb = tvb_new_subset_length(tvb, offset, len);
4963
0
    dissect_rrc_InterRATHandoverInfo_PDU(container_tvb, pinfo, tree, NULL);
4964
4965
0
    return len;
4966
0
}
4967
4968
/* 3.2.3.8  cdma2000 Capability Information */
4969
4970
/* 3.2.3.9  Downlink Cell Load Information */
4971
4972
/* 3.2.3.10 Uplink Cell Load Information */
4973
4974
4975
static const value_string gsm_a_bssmap_cell_load_nrt_vals[] = {
4976
    { 0,    "NRT Load is low" },
4977
    { 1,    "NRT load is medium" },
4978
    { 2,    "NRT load is high. (Probability to admit a new user is low.)" },
4979
    { 3,    "NRT overload. (Probability to admit a new user is low, packets are discarded and the source is recommended to reduce the data flow.)" },
4980
    { 0, NULL }
4981
};
4982
4983
/* 3.2.3.11 Cell Load Information Group */
4984
static uint16_t
4985
be_fe_cell_load_info_group(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4986
0
{
4987
0
    uint32_t curr_offset;
4988
4989
0
    curr_offset = offset;
4990
0
    curr_offset += be_cell_id(tvb, tree, pinfo, curr_offset, len, NULL, 0);
4991
0
    curr_offset += be_field_element_dissect(tvb, tree, pinfo, curr_offset, len + offset - curr_offset, NULL, 0);
4992
4993
0
    return curr_offset-offset;
4994
0
}
4995
4996
/* 3.2.3.12 Cell Load Information */
4997
static uint16_t
4998
be_fe_cell_load_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4999
0
{
5000
0
    uint32_t curr_offset;
5001
5002
0
    curr_offset = offset;
5003
0
    proto_tree_add_item(tree, hf_fe_cell_load_info_cell_capacity_class, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5004
0
    curr_offset++;
5005
0
    proto_tree_add_item(tree, hf_fe_cell_load_info_load_value, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5006
0
    curr_offset++;
5007
0
    proto_tree_add_item(tree, hf_fe_cell_load_info_rt_load_value, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5008
0
    curr_offset++;
5009
0
    proto_tree_add_item(tree, hf_fe_cell_load_info_nrt_load_information_value, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5010
0
    curr_offset++;
5011
5012
0
    return curr_offset-offset;
5013
0
}
5014
5015
/* 3.2.3.13 PS Indication */
5016
static uint16_t
5017
be_fe_ps_indication(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
5018
0
{
5019
0
    uint32_t curr_offset;
5020
5021
0
    curr_offset = offset;
5022
0
    proto_tree_add_item(tree, hf_fe_ps_indication, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5023
0
    curr_offset++;
5024
5025
0
    return curr_offset-offset;
5026
0
}
5027
5028
/* 3.2.3.14 DTM Handover Command Indication */
5029
static uint16_t
5030
be_fe_dtm_ho_command_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_)
5031
0
{
5032
0
    uint32_t curr_offset;
5033
5034
0
    curr_offset = offset;
5035
0
    proto_tree_add_item(tree, hf_fe_dtm_ho_command_ind_spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5036
0
    curr_offset++;
5037
5038
0
    return curr_offset-offset;
5039
0
}
5040
5041
/* 3.2.3.17 Source Cell ID */
5042
static uint16_t
5043
be_fe_source_cell_id(tvbuff_t* tvb, proto_tree* tree, packet_info* pinfo _U_, uint32_t offset, unsigned len, char* add_string _U_, int string_len _U_)
5044
0
{
5045
0
    tvbuff_t* new_tvb;
5046
0
    uint32_t curr_offset;
5047
5048
0
    curr_offset = offset;
5049
5050
    /* Tracking Area Identity: Octets 3 to 7 contain the value part of the Tracking Area Identity IE defined in 3GPP TS 24.301, not including 3GPP TS 24.301 IEI. */
5051
0
    curr_offset += de_emm_trac_area_id(tvb, tree, pinfo, curr_offset, 5, NULL, 0);
5052
    /* E-UTRAN CGI: Octets 8 - m contain the value part of the E-UTRAN CGI IE defined 3GPP TS 36.413 for the source cell. */
5053
0
    new_tvb = tvb_new_subset_remaining(tvb, curr_offset);
5054
0
    curr_offset += dissect_s1ap_EUTRAN_CGI_PDU(new_tvb , pinfo, tree, NULL);
5055
    /* Global eNB ID: Octets (m+1) - n contain the value part of the Global eNB ID IE defined 3GPP TS 36.413 for the source eNB. */
5056
0
    new_tvb = tvb_new_subset_remaining(tvb, curr_offset);
5057
0
    dissect_s1ap_Global_ENB_ID_PDU(new_tvb, pinfo, tree, NULL);
5058
5059
0
    return len;
5060
0
}
5061
5062
5063
static uint16_t (*bssmap_bss_to_bss_element_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_) = {
5064
    be_fe_extra_info,              /* { 0x01,       "Extra information" }, */
5065
    be_fe_cur_chan_type2,          /* { 0x02,       "Current Channel Type 2" }, */
5066
    be_fe_target_radio_cell_info,  /* { 0x03,       "Target cell radio information" }, */
5067
    be_fe_gprs_suspend_info,       /* { 0x04,       "GPRS Suspend information" }, */
5068
    de_rr_multirate_conf,          /* { 0x05,       "MultiRate configuration information" }, */
5069
    be_fe_dual_transfer_mode_info, /* { 0x06,       "Dual Transfer Mode Information" }, */
5070
    be_fe_inter_rat_handover_info, /* { 0x07,       "Inter RAT Handover Info" }, */
5071
    NULL,                          /* { 0x08,       "cdma2000 Capability Information" }, */
5072
    be_fe_cell_load_info,          /* { 0x09,       "Downlink Cell Load Information" }, */
5073
    be_fe_cell_load_info,          /* { 0x0a,       "Uplink Cell Load Information" }, */
5074
    be_fe_cell_load_info_group,    /* { 0x0b,       "Cell Load Information Group" },                           3.2.3.11  */
5075
    be_fe_cell_load_info,          /* { 0x0c,       "Cell Load Information" }, */
5076
    be_fe_ps_indication,           /* { 0x0d,       "PS Indication" },                                         3.2.3.13  */
5077
    be_fe_dtm_ho_command_ind,      /* { 0x0e,       "DTM Handover Command Indication" },                       3.2.3.14  */
5078
    NULL,                          /* { 0x0f,       "IRAT Measurement Configuration" },                        3.2.3.16  */
5079
    be_fe_source_cell_id,          /* { 0x10,       "Source Cell ID" },                                        3.2.3.17  */
5080
    NULL,                          /* { 0x11,       "IRAT Measurement Configuration (extended E-ARFCNs)" },    3.2.3.18  */
5081
    be_vgcs_talker_mode,           /* { 0x6f,       "VGCS talker mode" }, */ /* not really a field element
5082
                                                     but does appear in old bss to new bss info                3.2.2.93  */
5083
    be_last_used_eutran_plmn_id,   /* { 0x95,       "Last used E-UTRAN PLMN ID" },                             3.2.2.127 */
5084
    NULL,                          /* { 0xfe,       "D-RNTI" },                                                3.2.3.15  */
5085
    NULL,   /* NONE */
5086
};
5087
5088
0
#define NUM_BSS_ELEMENT_FCNS   (int)array_length(bssmap_bss_to_bss_element_fcn)
5089
5090
static uint16_t
5091
be_field_element_dissect(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
5092
0
{
5093
0
    uint32_t curr_offset, ie_len, fe_start_offset, ie_id_off, len_len;
5094
0
    int idx;
5095
0
    const char *str;
5096
0
    proto_tree *  bss_to_bss_tree = NULL;
5097
0
    bool has_len = true;
5098
5099
0
    curr_offset = offset;
5100
5101
5102
0
    while (curr_offset - offset + 2 < len) {
5103
0
        uint8_t oct;
5104
        /*
5105
         * add name
5106
         */
5107
0
        ie_id_off = curr_offset;
5108
0
        oct = tvb_get_uint8(tvb, curr_offset++);
5109
5110
0
        str = try_val_to_str_idx((uint32_t) oct, bssmap_field_element_ids, &idx);
5111
        /* It looks like a few IEs come without length Check for those here */
5112
0
        switch (oct) {
5113
0
        case 0x95:
5114
            /* 3.2.2.127 Last used E-UTRAN PLMN ID */
5115
0
            len_len = 0;
5116
0
            ie_len = 3;   /* Data part */
5117
0
            has_len = false;
5118
0
            break;
5119
0
        default:
5120
0
            len_len = 1;
5121
0
            ie_len = tvb_get_uint8(tvb, curr_offset++);
5122
0
            break;
5123
0
        }
5124
5125
0
        if (!str)
5126
0
            str = "Unknown";
5127
5128
        /* Add subtree */
5129
0
        bss_to_bss_tree = proto_tree_add_subtree_format(tree, tvb, ie_id_off, ie_len + 1 + len_len, ett_bss_to_bss_info, NULL, "%s", str);
5130
        /*
5131
         * add Field Element name and length
5132
         */
5133
0
        proto_tree_add_item(bss_to_bss_tree, hf_gsm_a_bssmap_field_elem_id, tvb, ie_id_off, 1, ENC_BIG_ENDIAN);
5134
0
        if (has_len) {
5135
0
            proto_tree_add_item(bss_to_bss_tree, hf_gsm_a_bssmap_field_elem_id_len, tvb, curr_offset - 1, 1, ENC_BIG_ENDIAN);
5136
0
        }
5137
5138
0
        fe_start_offset = curr_offset;
5139
5140
        /*
5141
         * decode field element
5142
         */
5143
0
        if (idx < 0 || idx >= NUM_BSS_ELEMENT_FCNS ||
5144
0
           (bssmap_bss_to_bss_element_fcn[idx] == NULL))
5145
0
        {
5146
0
            proto_tree_add_expert_format(bss_to_bss_tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet,
5147
0
                tvb, curr_offset, ie_len, "Field Element not decoded");
5148
0
            curr_offset += ie_len;
5149
0
        }
5150
0
        else
5151
0
        {
5152
            /* dissect the field element */
5153
0
            curr_offset += (*bssmap_bss_to_bss_element_fcn[idx])(tvb, bss_to_bss_tree, pinfo, curr_offset, ie_len, NULL, 0);
5154
5155
0
            EXTRANEOUS_DATA_CHECK(ie_len, curr_offset - fe_start_offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5156
5157
0
        }
5158
0
    }
5159
0
    return len;
5160
0
}
5161
/* MESSAGE FUNCTIONS */
5162
5163
/*
5164
 *  [2] 3.2.1.1 ASSIGNMENT REQUEST
5165
 * 48.008 8.4.0
5166
 */
5167
static void
5168
bssmap_ass_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5169
0
{
5170
0
    uint32_t curr_offset;
5171
0
    uint32_t consumed;
5172
0
    unsigned   curr_len;
5173
5174
0
    curr_offset = offset;
5175
0
    curr_len = len;
5176
5177
    /* Channel Type 3.2.2.11    MSC-BSS     M   5-13 */
5178
0
    ELEM_MAND_TLV(BE_CHAN_TYPE, GSM_A_PDU_TYPE_BSSMAP, BE_CHAN_TYPE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5179
    /* Layer 3 Header Information   3.2.2.9     MSC-BSS     O (note 3)  4 */
5180
0
    ELEM_OPT_TLV(BE_L3_HEADER_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_L3_HEADER_INFO, NULL);
5181
    /* Priority 3.2.2.18    MSC-BSS     O   3 */
5182
0
    ELEM_OPT_TLV(BE_PRIO, GSM_A_PDU_TYPE_BSSMAP, BE_PRIO, NULL);
5183
    /* Circuit Identity Code    3.2.2.2     MSC-BSS     O (note 1, 12   3 */
5184
0
    ELEM_OPT_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL);
5185
    /* Downlink DTX Flag    3.2.2.26    MSC-BSS     O (note 2)  2 */
5186
0
    ELEM_OPT_TV(BE_DOWN_DTX_FLAG, GSM_A_PDU_TYPE_BSSMAP, BE_DOWN_DTX_FLAG, NULL);
5187
    /* Interference Band To Be Used 3.2.2.21    MSC-BSS     O   2 */
5188
0
    ELEM_OPT_TV(BE_INT_BAND, GSM_A_PDU_TYPE_BSSMAP, BE_INT_BAND, NULL);
5189
    /* Classmark Information 2  3.2.2.19    MSC-BSS     O (note 4)  4-5 */
5190
0
    ELEM_OPT_TLV(BE_CM_INFO_2, GSM_A_PDU_TYPE_BSSMAP, BE_CM_INFO_2, NULL);
5191
    /* Group Call Reference 3.2.2.55    MSC-BSS     O (note 5)  7 */
5192
0
    ELEM_OPT_TLV(BE_GROUP_CALL_REF, GSM_A_PDU_TYPE_BSSMAP, BE_GROUP_CALL_REF, NULL);
5193
    /* Talker Flag  3.2.2.54    MSC-BSS     O (note 6)  1 */
5194
0
    ELEM_OPT_T(BE_TALKER_FLAG, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_FLAG, NULL);
5195
    /* Configuration Evolution Indication   3.2.2.57    MSC-BSS O (note 7)  2 */
5196
0
    ELEM_OPT_TV(BE_CONF_EVO_IND, GSM_A_PDU_TYPE_BSSMAP, BE_CONF_EVO_IND, NULL);
5197
    /* LSA Access Control Suppression   3.2.2.61    MSC-BSS O (note 8)  2 */
5198
0
    ELEM_OPT_TV(BE_LSA_ACC_CTRL, GSM_A_PDU_TYPE_BSSMAP, BE_LSA_ACC_CTRL, NULL);
5199
    /* Service Handover 3.2.2.75    MSC-BSS O (note 9)  3 */
5200
0
    ELEM_OPT_TLV(BE_SERV_HO, GSM_A_PDU_TYPE_BSSMAP, BE_SERV_HO, NULL);
5201
    /* Encryption Information   3.2.2.10    MSC-BSS O (note 10) 3-n */
5202
0
    ELEM_OPT_TLV(BE_ENC_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_ENC_INFO, NULL);
5203
    /* Talker Priority  3.2.2.89    MSC-BSS O (note 11) 2 */
5204
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
5205
    /* AoIP Transport Layer Address (MGW)   3.2.2.102   MSC-BSS O (note 12) 10-22 */
5206
0
    ELEM_OPT_TLV(BE_AOIP_TRANS_LAY_ADD, GSM_A_PDU_TYPE_BSSMAP, BE_AOIP_TRANS_LAY_ADD, NULL);
5207
    /* Codec List (MSC Preferred)   3.2.2.103   MSC-BSS O (note 13) 3-n */
5208
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(MSC Preferred)");
5209
    /* Call Identifier  3.2.2.105   MSC-BSS O (note 12) 5 */
5210
0
    ELEM_OPT_TV(BE_CALL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CALL_ID, NULL);
5211
    /* Kc128  3.2.2.109   MSC-BSS C (note 15) 17 */
5212
0
    ELEM_OPT_TV(BE_KC128, GSM_A_PDU_TYPE_BSSMAP, BE_KC128, NULL);
5213
    /* Global Call Reference    3.2.2.115   MSC-BSS    O (note 16)    3-n*/
5214
0
    ELEM_OPT_TLV(BE_GLOBAL_CALL_REF, GSM_A_PDU_TYPE_BSSMAP, BE_GLOBAL_CALL_REF, NULL);
5215
    /* LCLS-Configuration    3.2.2.116    MSC-BSS    O (note 16)    2*/
5216
0
    ELEM_OPT_TV(BE_LCLS_CONF, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_CONF, NULL);
5217
    /* LCLS-Connection-Status-Control    3.2.2.117    MSC-BSS    O (note 17)    2*/
5218
0
    ELEM_OPT_TV(BE_LCLS_CON_STATUS_CONTROL, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_CON_STATUS_CONTROL, NULL);
5219
    /* LCLS-Correlation-Not-Needed    3.2.2.118    MSC-BSS    O (note 18)    1*/
5220
0
    ELEM_OPT_T(BE_LCLS_CORR_NOT_NEEDED, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_CORR_NOT_NEEDED, NULL);
5221
    /* CS to PS SRVCC    3.2.2.122    MSC-BSS    O (note 19)    1*/
5222
    /* Osmocom extension: Osmux CID */
5223
0
    ELEM_OPT_TV(BE_OSMOCOM_OSMUX_CID, GSM_A_PDU_TYPE_BSSMAP, BE_OSMOCOM_OSMUX_CID, NULL);
5224
5225
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5226
0
}
5227
5228
/*
5229
 *  [2] 3.2.1.2 ASSIGNMENT COMPLETE
5230
 */
5231
static void
5232
bssmap_ass_complete(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5233
0
{
5234
0
    uint32_t curr_offset;
5235
0
    uint32_t consumed;
5236
0
    unsigned   curr_len;
5237
5238
0
    curr_offset = offset;
5239
0
    curr_len = len;
5240
5241
    /* RR Cause 3.2.2.22    BSS-MSC     O   2 */
5242
0
    ELEM_OPT_TV(BE_RR_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_RR_CAUSE, NULL);
5243
    /* Circuit Identity Code    3.2.2.2 BSS-MSC O (note 4)  3 */
5244
0
    ELEM_OPT_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL);
5245
    /* Cell Identifier  3.2.2.17    BSS-MSC     O (note 1)  3-10 */
5246
0
    ELEM_OPT_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL);
5247
    /* Chosen Channel   3.2.2.33    BSS-MSC     O (note 3)  2 */
5248
0
    ELEM_OPT_TV(BE_CHOSEN_CHAN, GSM_A_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, NULL);
5249
    /* Chosen Encryption Algorithm  3.2.2.44    BSS-MSC     O (note 5)  2 */
5250
0
    ELEM_OPT_TV(BE_CHOSEN_ENC_ALG, GSM_A_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, NULL);
5251
    /* Circuit Pool 3.2.2.45    BSS-MSC     O (note 2)  2 */
5252
0
    ELEM_OPT_TV(BE_CCT_POOL, GSM_A_PDU_TYPE_BSSMAP, BE_CCT_POOL, NULL);
5253
    /* Speech Version (Chosen)  3.2.2.51    BSS-MSC     O (note 6)  2 */
5254
0
    ELEM_OPT_TV(BE_SPEECH_VER, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Chosen)");
5255
    /* LSA Identifier   3.2.2.15    BSS-MSC O (note 7)  5 */
5256
0
    ELEM_OPT_TLV(BE_LSA_ID, GSM_A_PDU_TYPE_BSSMAP, BE_LSA_ID, NULL);
5257
    /* Talker Priority  3.2.2.89    BSS-MSC O (note 8)  2 */
5258
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
5259
    /* AoIP Transport Layer Address (BSS)   3.2.2.102   BSS-MSC O (note 9)  10-22 */
5260
0
    ELEM_OPT_TLV(BE_AOIP_TRANS_LAY_ADD, GSM_A_PDU_TYPE_BSSMAP, BE_AOIP_TRANS_LAY_ADD, NULL);
5261
    /* Speech Codec (Chosen)    3.2.2.104   BSS-MSC O (note 10)     3-5 */
5262
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC, "(Chosen)");
5263
    /* Codec List (BSS supported)   3.2.2.103   MSC-BSS O (note 11) 3-n */
5264
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(BSS Supported)");
5265
    /* LCLS-BSS-Status    3.2.2.119    BSS-MSC    O (note 12)    2 */
5266
0
    ELEM_OPT_TV(BE_LCLS_BSS_STATUS, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_BSS_STATUS, NULL);
5267
    /* Osmocom extension: Osmux CID */
5268
0
    ELEM_OPT_TV(BE_OSMOCOM_OSMUX_CID, GSM_A_PDU_TYPE_BSSMAP, BE_OSMOCOM_OSMUX_CID, NULL);
5269
5270
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5271
0
}
5272
5273
/*
5274
 *  [2] 3.2.1.3 ASSIGNMENT FAILURE
5275
 */
5276
static void
5277
bssmap_ass_failure(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5278
0
{
5279
0
    uint32_t curr_offset;
5280
0
    uint32_t consumed;
5281
0
    unsigned   curr_len;
5282
5283
0
    curr_offset = offset;
5284
0
    curr_len = len;
5285
5286
    /* Cause    3.2.2.5     BSS-MSC     M   3-4 */
5287
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5288
    /* RR Cause 3.2.2.22    BSS-MSC     O   2 */
5289
0
    ELEM_OPT_TV(BE_RR_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_RR_CAUSE, NULL);
5290
    /* Circuit Pool 3.2.2.45    BSS-MSC     O (note 1)  2 */
5291
0
    ELEM_OPT_TV(BE_CCT_POOL, GSM_A_PDU_TYPE_BSSMAP, BE_CCT_POOL, NULL);
5292
    /* Circuit Pool List    3.2.2.46    BSS-MSC     O (note 2)  V */
5293
0
    ELEM_OPT_TLV(BE_CCT_POOL_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CCT_POOL_LIST, NULL);
5294
    /* Talker Priority  3.2.2.89    BSS-MSC O (note 3)  2 */
5295
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
5296
    /* Codec List (BSS Supported)   3.2.2.103   BSS-MSC O (note 4)  3-n */
5297
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(BSS Supported)");
5298
5299
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5300
0
}
5301
5302
/*
5303
 *  [2] 3.2.1.4 BLOCK
5304
 */
5305
static void
5306
bssmap_block(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5307
0
{
5308
0
    uint32_t curr_offset;
5309
0
    uint32_t consumed;
5310
0
    unsigned   curr_len;
5311
5312
0
    curr_offset = offset;
5313
0
    curr_len = len;
5314
5315
    /* Circuit Identity Code    3.2.2.2     both    M   3*/
5316
0
    ELEM_MAND_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5317
    /* Cause    3.2.2.5     both    M   3-4  */
5318
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5319
    /* Connection Release Requested 3.2.2.3 MSC-BSS O   1 */
5320
0
    ELEM_OPT_T(BE_CONN_REL_REQ, GSM_A_PDU_TYPE_BSSMAP, BE_CONN_REL_REQ, NULL);
5321
5322
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5323
0
}
5324
5325
/*
5326
 *  [2] 3.2.1.5 BLOCKING ACKNOWLEDGE
5327
 */
5328
5329
static void
5330
bssmap_block_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5331
0
{
5332
0
    uint32_t curr_offset;
5333
0
    uint32_t consumed;
5334
0
    unsigned   curr_len;
5335
5336
0
    curr_offset = offset;
5337
0
    curr_len = len;
5338
5339
    /* Circuit Identity Code    3.2.2.2     both    M   3 */
5340
0
    ELEM_MAND_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5341
5342
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5343
0
}
5344
5345
/*
5346
 *  [2] 3.2.1.6 UNBLOCK
5347
 */
5348
static void
5349
bssmap_unblock(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5350
0
{
5351
0
    uint32_t curr_offset;
5352
0
    uint32_t consumed;
5353
0
    unsigned   curr_len;
5354
5355
0
    curr_offset = offset;
5356
0
    curr_len = len;
5357
5358
    /* Circuit Identity Code    3.2.2.2     both    M   3  */
5359
0
    ELEM_MAND_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5360
5361
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5362
0
}
5363
5364
/*
5365
 *  [2] 3.2.1.7 UNBLOCKING ACKNOWLEDGE
5366
 */
5367
static void
5368
bssmap_unblock_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5369
0
{
5370
0
    uint32_t curr_offset;
5371
0
    uint32_t consumed;
5372
0
    unsigned   curr_len;
5373
5374
0
    curr_offset = offset;
5375
0
    curr_len = len;
5376
5377
    /* Circuit Identity Code    3.2.2.2     both    M   3 */
5378
0
    ELEM_MAND_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5379
5380
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5381
0
}
5382
5383
/*
5384
 *  [2] 3.2.1.8 HANDOVER REQUEST
5385
 */
5386
static void
5387
bssmap_ho_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5388
0
{
5389
0
    uint32_t curr_offset;
5390
0
    uint32_t consumed;
5391
0
    unsigned   curr_len;
5392
5393
0
    curr_offset = offset;
5394
0
    curr_len = len;
5395
5396
    /* Channel Type 3.2.2.11    MSC-BSS     M   5-13  */
5397
0
    ELEM_MAND_TLV(BE_CHAN_TYPE, GSM_A_PDU_TYPE_BSSMAP, BE_CHAN_TYPE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5398
    /* Encryption Information   3.2.2.10    MSC-BSS     M (note 1)  3-n */
5399
0
    ELEM_MAND_TLV(BE_ENC_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_ENC_INFO, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5400
5401
    /* Classmark Information 1 3.2.2.30 MSC-BSS M# 2
5402
     * or
5403
     * Classmark Information 2 3.2.2.19 MSC-BSS M (note 6)  4-5
5404
     */
5405
0
    ELEM_OPT_TV(BE_CM_INFO_1, GSM_A_PDU_TYPE_BSSMAP, BE_CM_INFO_1, NULL);
5406
5407
0
    ELEM_OPT_TLV(BE_CM_INFO_2, GSM_A_PDU_TYPE_BSSMAP, BE_CM_INFO_2, NULL);
5408
    /* Cell Identifier (Serving)    3.2.2.17    MSC-BSS     M (note 20) 5-10  */
5409
0
    ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, " (Serving)", ei_gsm_a_bssmap_missing_mandatory_element);
5410
    /* Priority 3.2.2.18    MSC-BSS     O   3  */
5411
0
    ELEM_OPT_TLV(BE_PRIO, GSM_A_PDU_TYPE_BSSMAP, BE_PRIO, NULL);
5412
    /* Circuit Identity Code    3.2.2.2     MSC-BSS     O (note 7, 28   3 */
5413
0
    ELEM_OPT_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL);
5414
    /* Downlink DTX Flag    3.2.2.26    MSC-BSS     O (note 3)  2 */
5415
0
    ELEM_OPT_TV(BE_DOWN_DTX_FLAG, GSM_A_PDU_TYPE_BSSMAP, BE_DOWN_DTX_FLAG, NULL);
5416
    /* Cell Identifier (Target) 3.2.2.17    MSC-BSS     M (note 17) 3-10 */
5417
0
    ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, " (Target)", ei_gsm_a_bssmap_missing_mandatory_element);
5418
    /* Interference Band To Be Used 3.2.2.21    MSC-BSS     O   2 */
5419
0
    ELEM_OPT_TV(BE_INT_BAND, GSM_A_PDU_TYPE_BSSMAP, BE_INT_BAND, NULL);
5420
    /* Cause    3.2.2.5     MSC-BSS     O (note 9)   3-4 */
5421
0
    ELEM_OPT_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL);
5422
    /* Classmark Information 3  3.2.2.20    MSC-BSS     O (note 4)   3-34 */
5423
0
    ELEM_OPT_TLV(BE_CM_INFO_3, GSM_A_PDU_TYPE_BSSMAP, BE_CM_INFO_3, NULL);
5424
    /* Current Channel type 1   3.2.2.49    MSC-BSS     O (note 8)  2 */
5425
0
    ELEM_OPT_TV(BE_CURR_CHAN_1, GSM_A_PDU_TYPE_BSSMAP, BE_CURR_CHAN_1, NULL);
5426
    /* Speech Version (Used)    3.2.2.51    MSC-BSS     O (note 10) 2 */
5427
0
    ELEM_OPT_TV(BE_SPEECH_VER, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Used)");
5428
    /* Group Call Reference 3.2.2.55    MSC-BSS     O (note 5)  7 */
5429
0
    ELEM_OPT_TLV(BE_GROUP_CALL_REF, GSM_A_PDU_TYPE_BSSMAP, BE_GROUP_CALL_REF, NULL);
5430
    /* Talker Flag  3.2.2.54    MSC-BSS     O (note 11) 1 */
5431
0
    ELEM_OPT_T(BE_TALKER_FLAG, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_FLAG, NULL);
5432
    /* Configuration Evolution Indication   3.2.2.57    MSC-BSS O (note 12) 2 */
5433
0
    ELEM_OPT_TV(BE_CONF_EVO_IND, GSM_A_PDU_TYPE_BSSMAP, BE_CONF_EVO_IND, NULL);
5434
    /* Chosen Encryption Algorithm (Serving)    3.2.2.44    MSC-BSS O (note 2)  2 */
5435
0
    ELEM_OPT_TV(BE_CHOSEN_ENC_ALG, GSM_A_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, " (Serving)");
5436
    /* Old BSS to New BSS Information   3.2.2.58    MSC-BSS O (note 13) 2-n */
5437
0
    ELEM_OPT_TLV(BE_OLD2NEW_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_OLD2NEW_INFO, NULL);
5438
    /* LSA Information  3.2.2.23    MSC-BSS O (note 14) 3+4n */
5439
0
    ELEM_OPT_TLV(BE_LSA_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_LSA_INFO, NULL);
5440
    /* LSA Access Control Suppression   3.2.2.61    MSC-BSS O (note 15)     2 */
5441
0
    ELEM_OPT_TV(BE_LSA_ACC_CTRL, GSM_A_PDU_TYPE_BSSMAP, BE_LSA_ACC_CTRL, NULL);
5442
    /* Service Handover 3.2.2.75    MSC-BSS O (note 21) 3 */
5443
0
    ELEM_OPT_TLV(BE_SERV_HO, GSM_A_PDU_TYPE_BSSMAP, BE_SERV_HO, NULL);
5444
    /* IMSI 3.2.2.6 MSC-BSC O (note 16) 3-10 */
5445
0
    ELEM_OPT_TLV(BE_IMSI, GSM_A_PDU_TYPE_BSSMAP, BE_IMSI, NULL);
5446
    /* Source RNC to target RNC transparent information (UMTS)  3.2.2.76    MSC-BSS O (note 18) n-m */
5447
0
    ELEM_OPT_TLV(BE_SRC_RNC_TO_TAR_RNC_UMTS, GSM_A_PDU_TYPE_BSSMAP, BE_SRC_RNC_TO_TAR_RNC_UMTS, NULL);
5448
    /* Source RNC to target RNC transparent information (cdma2000)  3.2.2.77    MSC-BSS O (note 19) n-m */
5449
0
    ELEM_OPT_TLV(BE_SRC_RNC_TO_TAR_RNC_CDMA, GSM_A_PDU_TYPE_BSSMAP, BE_SRC_RNC_TO_TAR_RNC_CDMA, NULL);
5450
    /* SNA Access Information   3.2.2.82    MSC-BSC O (note 22) 2+n */
5451
0
    ELEM_OPT_TLV(BE_SNA_ACC_INF, GSM_A_PDU_TYPE_BSSMAP, BE_SNA_ACC_INF, NULL);
5452
    /* Talker Priority  3.2.2.89    MSC-BSC O (note 23) 2 */
5453
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
5454
    /* AoIP Transport Layer Address (MGW)   3.2.2.102   MSC-BSS O (note 24) 10-22 */
5455
0
    ELEM_OPT_TLV(BE_AOIP_TRANS_LAY_ADD, GSM_A_PDU_TYPE_BSSMAP, BE_AOIP_TRANS_LAY_ADD, NULL);
5456
    /* Codec List (MSC Preferred)   3.2.2.103   MSC-BSS O (note 25) 3-n */
5457
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(MSC Preferred)");
5458
    /* Call Identifier  3.2.2.105   MSC-BSS O (note 24) 5 */
5459
0
    ELEM_OPT_TV(BE_CALL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CALL_ID, NULL);
5460
    /* Kc128  3.2.2.109   MSC-BSS C (note 27) 17 */
5461
0
    ELEM_OPT_TV(BE_KC128, GSM_A_PDU_TYPE_BSSMAP, BE_KC128, NULL);
5462
    /* Global Call Reference    3.2.2.115    MSC - BSS    O(note 28)    3 - n*/
5463
0
    ELEM_OPT_TLV(BE_GLOBAL_CALL_REF, GSM_A_PDU_TYPE_BSSMAP, BE_GLOBAL_CALL_REF, NULL);
5464
    /* LCLS-Configuration    3.2.2.116    MSC - BSS    O(note 28)    2*/
5465
0
    ELEM_OPT_TV(BE_LCLS_CONF, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_CONF, NULL);
5466
    /* LCLS-Connection-Status-Control    3.2.2.117    MSC - BSS    O(note 28)    2*/
5467
0
    ELEM_OPT_TV(BE_LCLS_CON_STATUS_CONTROL, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_CON_STATUS_CONTROL, NULL);
5468
    /* CS to PS SRVCC    3.2.2.122    MSC - BSS    O(note 29)    1*/
5469
5470
5471
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5472
0
}
5473
5474
/*
5475
 *  [2] 3.2.1.9 HANDOVER REQUIRED
5476
 */
5477
static void
5478
bssmap_ho_reqd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5479
0
{
5480
0
    uint32_t curr_offset;
5481
0
    uint32_t consumed;
5482
0
    unsigned   curr_len;
5483
5484
0
    curr_offset = offset;
5485
0
    curr_len = len;
5486
5487
    /* Cause    3.2.2.5     BSS-MSC     M    3-4 */
5488
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5489
    /* Response Request 3.2.2.28    BSS-MSC     O (note 8)  1 */
5490
0
    ELEM_OPT_T(BE_RESP_REQ, GSM_A_PDU_TYPE_BSSMAP, BE_RESP_REQ, NULL);
5491
    /* Cell Identifier List (Preferred) 3.2.2.27    BSS-MSC     M (note 4)  2n+3 to 7n+3 */
5492
0
    ELEM_MAND_TLV(BE_CELL_ID_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, " (Preferred)", ei_gsm_a_bssmap_missing_mandatory_element);
5493
    /* Circuit Pool List    3.2.2.46    BSS-MSC     O (note 1)  V */
5494
0
    ELEM_OPT_TLV(BE_CCT_POOL_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CCT_POOL_LIST, NULL);
5495
    /* Current Channel Type 1   3.2.2.49    BSS-MSC     O (note 2)  2 */
5496
0
    ELEM_OPT_TV(BE_CURR_CHAN_1, GSM_A_PDU_TYPE_BSSMAP, BE_CURR_CHAN_1, NULL);
5497
    /* Speech Version (Used)    3.2.2.51    BSS-MSC     O (note 3)  2 */
5498
0
    ELEM_OPT_TV(BE_SPEECH_VER, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Used)");
5499
    /* Queueing Indicator   3.2.2.50    BSS-MSC     O   2 */
5500
0
    ELEM_OPT_TV(BE_QUE_IND, GSM_A_PDU_TYPE_BSSMAP, BE_QUE_IND, NULL);
5501
    /* Old BSS to New BSS Information   3.2.2.58    BSS-MSC O   2-n */
5502
0
    ELEM_OPT_TLV(BE_OLD2NEW_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_OLD2NEW_INFO, NULL);
5503
    /* Source RNC to target RNC transparent information (UMTS)  3.2.2.76    BSS-MSC O (note 5)  3-m */
5504
0
    ELEM_OPT_TLV(BE_SRC_RNC_TO_TAR_RNC_UMTS, GSM_A_PDU_TYPE_BSSMAP, BE_SRC_RNC_TO_TAR_RNC_UMTS, NULL);
5505
    /* Source RNC to target RNC transparent information (cdma2000)  3.2.2.77    BSS-MSC O (note 6)  n-m */
5506
0
    ELEM_OPT_TLV(BE_SRC_RNC_TO_TAR_RNC_CDMA, GSM_A_PDU_TYPE_BSSMAP, BE_SRC_RNC_TO_TAR_RNC_CDMA, NULL);
5507
    /* GERAN Classmark  3.2.2.78    BSS-MSC O (note 7)  V */
5508
0
    ELEM_OPT_TLV(BE_GERAN_CLS_M, GSM_A_PDU_TYPE_BSSMAP, BE_GERAN_CLS_M, NULL);
5509
    /* Talker Priority  3.2.2.89    BSS-MSC O (note 9)  2 */
5510
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
5511
    /* Speech Codec (Used)  3.2.2.104   BSS-MSC O (note 10) 3-5 */
5512
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC, "(Used)");
5513
    /* CSG Identifier  3.2.2.110   BSS-MSC O (note 11) 7 */
5514
0
    ELEM_OPT_TLV(BE_CSG_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CSG_ID, NULL);
5515
    /* Source eNB to target eNB transparent information (E-UTRAN)    3.2.2.123    BSS-MSC    O (note 12)    3-m */
5516
    /* CS to PS SRVCC Indication    3.2.2.124    BSS-MSC    O (note 13)    1 */
5517
5518
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5519
0
}
5520
5521
/*
5522
 *  [2] 3.2.1.10 HANDOVER REQUEST ACKNOWLEDGE
5523
 */
5524
static void
5525
bssmap_ho_req_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5526
0
{
5527
0
    uint32_t curr_offset;
5528
0
    uint32_t consumed;
5529
0
    unsigned   curr_len;
5530
5531
0
    curr_offset = offset;
5532
0
    curr_len = len;
5533
5534
    /* Layer 3 Information  3.2.2.24    BSS-MSC     M (note 1)  11-n */
5535
0
    ELEM_MAND_TLV(BE_L3_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_L3_INFO, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5536
    /* Chosen Channel   3.2.2.33    BSS-MSC     O (note 4)  2 */
5537
0
    ELEM_OPT_TV(BE_CHOSEN_CHAN, GSM_A_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, NULL);
5538
    /* Chosen Encryption Algorithm  3.2.2.44    BSS-MSC     O (note 5)  2 */
5539
0
    ELEM_OPT_TV(BE_CHOSEN_ENC_ALG, GSM_A_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, NULL);
5540
    /* Circuit Pool 3.2.2.45    BSS-MSC     O (note 2)  2 */
5541
0
    ELEM_OPT_TV(BE_CCT_POOL, GSM_A_PDU_TYPE_BSSMAP, BE_CCT_POOL, NULL);
5542
    /* Speech Version (Chosen)  3.2.2.51    BSS-MSC     O (note 6)  2 */
5543
0
    ELEM_OPT_TV(BE_SPEECH_VER, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Chosen)");
5544
    /* Circuit Identity Code    3.2.2.2     BSS-MSC     O (note 3)  3 */
5545
0
    ELEM_OPT_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL);
5546
    /* LSA Identifier   3.2.2.15    BSS-MSC O (note 7)  5 */
5547
0
    ELEM_OPT_TLV(BE_LSA_ID, GSM_A_PDU_TYPE_BSSMAP, BE_LSA_ID, NULL);
5548
    /* New BSS to Old BSS Information   3.2.2.80    BSS-MSC O (note 8)  2-n */
5549
0
    ELEM_OPT_TLV(BE_NEW_BSS_TO_OLD_BSS_INF, GSM_A_PDU_TYPE_BSSMAP, BE_NEW_BSS_TO_OLD_BSS_INF, NULL);
5550
    /* Inter-System Information 3.2.2.81    BSS-MSC O (note 9)  2-n */
5551
0
    ELEM_OPT_TLV(BE_INTER_SYS_INF, GSM_A_PDU_TYPE_BSSMAP, BE_INTER_SYS_INF, NULL);
5552
    /* Talker Priority  3.2.2.89    BSS-MSC O (note 10) 2 */
5553
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
5554
    /* AoIP Transport Layer Address (BSS)   3.2.2.102   BSS-MSC O (note 11) 10-22 */
5555
0
    ELEM_OPT_TLV(BE_AOIP_TRANS_LAY_ADD, GSM_A_PDU_TYPE_BSSMAP, BE_AOIP_TRANS_LAY_ADD, NULL);
5556
    /* Codec List (BSS Supported)   3.2.2.103   BSS-MSC O (note 12) 3-n */
5557
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(BSS Supported)");
5558
    /* Speech Codec (Chosen)    3.2.2.104   BSS-MSC O (note 12) 3-5 */
5559
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC, "(Chosen)");
5560
    /* LCLS-BSS-Status    3.2.2.119    BSS-MSC    O (note 13)    2 */
5561
0
    ELEM_OPT_TV(BE_LCLS_BSS_STATUS, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_BSS_STATUS, NULL);
5562
5563
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5564
0
}
5565
5566
/*
5567
 *  [2] 3.2.1.11 HANDOVER COMMAND
5568
 */
5569
static void
5570
bssmap_ho_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5571
0
{
5572
0
    uint32_t curr_offset;
5573
0
    uint32_t consumed;
5574
0
    unsigned   curr_len;
5575
5576
0
    curr_offset = offset;
5577
0
    curr_len = len;
5578
5579
    /* Layer 3 Information  3.2.2.24    MSC-BSS     M (note 1)  11-n */
5580
0
    ELEM_MAND_TLV(BE_L3_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_L3_INFO, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5581
    /* Cell Identifier  3.2.2.17    MSC-BSS     O   3-10 */
5582
0
    ELEM_OPT_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL);
5583
    /* New BSS to Old BSS Information   3.2.2.80    MSC-BSS     O (note 2)  2-n */
5584
0
    ELEM_OPT_TLV(BE_NEW_BSS_TO_OLD_BSS_INF, GSM_A_PDU_TYPE_BSSMAP, BE_NEW_BSS_TO_OLD_BSS_INF, NULL);
5585
    /* Talker Priority  3.2.2.89    MSC-BSS O (note 3)  2 */
5586
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
5587
    /* CN to MS transparent information 3.2.2.125   MSC-BSS O (note 4)  19-n */
5588
5589
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5590
0
}
5591
5592
/*
5593
 *  [2] 3.2.1.12 HANDOVER COMPLETE
5594
 */
5595
static void
5596
bssmap_ho_complete(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5597
0
{
5598
0
    uint32_t curr_offset;
5599
0
    uint32_t consumed;
5600
0
    unsigned   curr_len;
5601
5602
0
    curr_offset = offset;
5603
0
    curr_len = len;
5604
5605
    /* RR Cause 3.2.2.22    BSS-MSC O   2 */
5606
0
    ELEM_OPT_TV(BE_RR_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_RR_CAUSE, NULL);
5607
    /* Talker Priority  3.2.2.89    BSS-MSC O (note 1)  2 */
5608
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
5609
    /* Speech Codec (Chosen)    3.2.2.104    BSS-MSC O (note 2)  3-5 */
5610
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC, "(Chosen)");
5611
    /* Codec List (BSS Supported)   3.2.2.103   BSS-MSC    O (note 3)  3-n */
5612
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(BSS Supported)");
5613
    /* Chosen Encryption Algorithm  3.2.2.44    BSS-MSC O (note 4)  2 */
5614
0
    ELEM_OPT_TV(BE_CHOSEN_ENC_ALG, GSM_A_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, NULL);
5615
    /* Chosen Channel   3.2.2.33    BSS-MSC O (note 5)  2 */
5616
0
    ELEM_OPT_TV(BE_CHOSEN_CHAN, GSM_A_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, NULL);
5617
    /* LCLS-BSS-Status  3.2.2.119   BSS-MSC O (note 6)  2 */
5618
0
    ELEM_OPT_TV(BE_LCLS_BSS_STATUS, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_BSS_STATUS, NULL);
5619
5620
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5621
0
}
5622
5623
/*
5624
 * 3.2.1.13 HANDOVER SUCCEEDED
5625
 */
5626
static void
5627
bssmap_ho_succ(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5628
0
{
5629
0
    uint32_t curr_offset;
5630
0
    uint32_t consumed;
5631
0
    unsigned   curr_len;
5632
5633
0
    curr_offset = offset;
5634
0
    curr_len = len;
5635
5636
    /* Talker Priority  3.2.2.89    MSC-BSS O (note 1)  2 */
5637
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
5638
5639
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5640
0
}
5641
5642
/*
5643
 *  [2] 3.2.1.14 HANDOVER CANDIDATE ENQUIRE
5644
 */
5645
static void
5646
bssmap_ho_cand_enq(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5647
0
{
5648
0
    uint32_t curr_offset;
5649
0
    uint32_t consumed;
5650
0
    unsigned   curr_len;
5651
5652
0
    curr_offset = offset;
5653
0
    curr_len = len;
5654
5655
    /* Number Of Mss    3.2.2.8     MSC-BSS     M   2 */
5656
0
    ELEM_MAND_TV(BE_NUM_MS, GSM_A_PDU_TYPE_BSSMAP, BE_NUM_MS, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5657
5658
    /* Cell Identifier List 3.2.2.27    MSC-BSS     M   2n+3 to 7n+3 */
5659
0
    ELEM_MAND_TLV(BE_CELL_ID_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5660
5661
    /* Cell Identifier  3.2.2.17    MSC-BSS     M   3-10 */
5662
0
    ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5663
5664
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5665
0
}
5666
5667
/*
5668
 *  [2] 3.2.1.15 HANDOVER CANDIDATE RESPONSE
5669
 */
5670
static void
5671
bssmap_ho_cand_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5672
0
{
5673
0
    uint32_t curr_offset;
5674
0
    uint32_t consumed;
5675
0
    unsigned   curr_len;
5676
5677
0
    curr_offset = offset;
5678
0
    curr_len = len;
5679
5680
    /* Number Of Mss    3.2.2.8     BSS-MSC     M   2 */
5681
0
    ELEM_MAND_TV(BE_NUM_MS, GSM_A_PDU_TYPE_BSSMAP, BE_NUM_MS, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5682
5683
    /* Cell Identifier  3.2.2.17    BSS-MSC     M   3-10 */
5684
0
    ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5685
5686
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5687
0
}
5688
5689
/*
5690
 *  [2] 3.2.1.16 HANDOVER FAILURE
5691
 */
5692
static void
5693
bssmap_ho_failure(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5694
0
{
5695
0
    uint32_t curr_offset;
5696
0
    uint32_t consumed;
5697
0
    unsigned   curr_len;
5698
5699
0
    curr_offset = offset;
5700
0
    curr_len = len;
5701
5702
    /* Cause    3.2.2.5     BSS-MSC     M   3-4 */
5703
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5704
    /* RR Cause 3.2.2.22    BSS-MSC     O   2 */
5705
0
    ELEM_OPT_TV(BE_RR_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_RR_CAUSE, NULL);
5706
    /* Circuit Pool 3.2.2.45    BSS-MSC     O (note 1)  2 */
5707
0
    ELEM_OPT_TV(BE_CCT_POOL, GSM_A_PDU_TYPE_BSSMAP, BE_CCT_POOL, NULL);
5708
    /* Circuit Pool List    3.2.2.46    BSS-MSC     O (note 2)  V */
5709
0
    ELEM_OPT_TLV(BE_CCT_POOL_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CCT_POOL_LIST, NULL);
5710
    /* GERAN Classmark  3.2.2.78    BSS-MSC O (note 3)  V */
5711
0
    ELEM_OPT_TLV(BE_GERAN_CLS_M, GSM_A_PDU_TYPE_BSSMAP, BE_GERAN_CLS_M, NULL);
5712
    /* New BSS to Old BSS Information   3.2.2.80    BSS-MSC     O (note 4)  2-n */
5713
0
    ELEM_OPT_TLV(BE_NEW_BSS_TO_OLD_BSS_INF, GSM_A_PDU_TYPE_BSSMAP, BE_NEW_BSS_TO_OLD_BSS_INF, NULL);
5714
    /* Inter-System Information 3.2.2.81    BSS-MSC     O (note 5)  2-n */
5715
0
    ELEM_OPT_TLV(BE_INTER_SYS_INF, GSM_A_PDU_TYPE_BSSMAP, BE_INTER_SYS_INF, NULL);
5716
    /* Talker Priority  3.2.2.89    BSS-MSC O (note 6)  2 */
5717
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
5718
    /* Codec List (BSS Supported)   3.2.2.103   BSS-MSC O (note 7)  3-n */
5719
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(BSS Supported)");
5720
5721
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5722
0
}
5723
5724
/*
5725
 * 3.2.1.17 RESOURCE REQUEST
5726
 */
5727
static void
5728
bssmap_res_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5729
0
{
5730
0
    uint32_t curr_offset;
5731
0
    uint32_t consumed;
5732
0
    unsigned   curr_len;
5733
5734
0
    curr_offset = offset;
5735
0
    curr_len = len;
5736
5737
    /* Periodicity  3.2.2.12    MSC-BSS     M   2   */
5738
0
    ELEM_MAND_TV(BE_PERIODICITY, GSM_A_PDU_TYPE_BSSMAP, BE_PERIODICITY, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5739
    /* Resource Indication Method   3.2.2.29    MSC-BSS     M   2  */
5740
0
    ELEM_MAND_TV(BE_RES_IND_METHOD, GSM_A_PDU_TYPE_BSSMAP, BE_RES_IND_METHOD, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5741
    /* Cell Identifier  3.2.2.17    MSC-BSS     M   3-10  */
5742
0
    ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5743
    /* Extended Resource Indicator  3.2.2.13    MSC-BSS     O   2  */
5744
0
    ELEM_MAND_TV(BE_EXT_RES_IND, GSM_A_PDU_TYPE_BSSMAP, BE_EXT_RES_IND, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5745
5746
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5747
0
}
5748
5749
/*
5750
 * 3.2.1.18 RESOURCE INDICATION
5751
 */
5752
static void
5753
bssmap_res_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5754
0
{
5755
0
    uint32_t curr_offset;
5756
0
    uint32_t consumed;
5757
0
    unsigned   curr_len;
5758
5759
0
    curr_offset = offset;
5760
0
    curr_len = len;
5761
5762
    /* Resource Indication Method   3.2.2.29    BSS-MSC M   2 */
5763
0
    ELEM_MAND_TV(BE_RES_IND_METHOD, GSM_A_PDU_TYPE_BSSMAP, BE_RES_IND_METHOD, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5764
    /* Resource Available   3.2.2.4 BSS-MSC O (note 1)  21 */
5765
0
    ELEM_MAND_TV(BE_RES_AVAIL, GSM_A_PDU_TYPE_BSSMAP, BE_RES_AVAIL, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5766
    /* Cell Identifier  3.2.2.17    BSS-MSC M   3-10  */
5767
0
    ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5768
    /* Total Resource Accessible    3.2.2.14    BSS-MSC O (note 2)  5 */
5769
0
    ELEM_MAND_TV(BE_TOT_RES_ACC, GSM_A_PDU_TYPE_BSSMAP, BE_TOT_RES_ACC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5770
5771
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5772
0
}
5773
/*
5774
 *  [2] 3.2.1.19 PAGING
5775
 */
5776
static void
5777
bssmap_paging(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5778
0
{
5779
0
    uint32_t curr_offset;
5780
0
    uint32_t consumed;
5781
0
    unsigned   curr_len;
5782
5783
0
    curr_offset = offset;
5784
0
    curr_len = len;
5785
5786
    /* IMSI 3.2.2.6 MSC-BSS M   3-10 */
5787
0
    ELEM_MAND_TLV(BE_IMSI, GSM_A_PDU_TYPE_BSSMAP, BE_IMSI, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5788
    /* TMSI 3.2.2.7 MSC-BSS O (note 1)  6 */
5789
0
    ELEM_OPT_TLV(BE_TMSI, GSM_A_PDU_TYPE_BSSMAP, BE_TMSI, NULL);
5790
    /* Cell Identifier List 3.2.2.27    MSC-BSS M   3 to 3+7n */
5791
0
    ELEM_MAND_TLV(BE_CELL_ID_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5792
    /* Channel Needed   3.2.2.36    MSC-BSS O (note 2)  2 */
5793
0
    ELEM_OPT_TV(BE_CHAN_NEEDED, GSM_A_PDU_TYPE_BSSMAP, BE_CHAN_NEEDED, NULL);
5794
    /* eMLPP Priority   3.2.2.56    MSC-BSS O (note 3)  2 */
5795
0
    ELEM_OPT_TV(BE_EMLPP_PRIO, GSM_A_PDU_TYPE_BSSMAP, BE_EMLPP_PRIO, NULL);
5796
    /* Paging Information   3.2.2.85    MSC-BSS O   2 */
5797
0
    ELEM_OPT_TV(BE_PAGING_INF, GSM_A_PDU_TYPE_BSSMAP, BE_PAGING_INF, NULL);
5798
5799
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5800
0
}
5801
5802
/*
5803
 *  [2] 3.2.1.20 CLEAR REQUEST
5804
 */
5805
static void
5806
bssmap_clear_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5807
0
{
5808
0
    uint32_t curr_offset;
5809
0
    uint32_t consumed;
5810
0
    unsigned   curr_len;
5811
5812
0
    curr_offset = offset;
5813
0
    curr_len = len;
5814
5815
    /* Cause    3.2.2.5 BSS-MSC M   3-4 */
5816
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5817
5818
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5819
0
}
5820
5821
/*
5822
 *  [2] 3.2.1.21 CLEAR COMMAND
5823
 */
5824
static void
5825
bssmap_clear_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5826
0
{
5827
0
    uint32_t curr_offset;
5828
0
    uint32_t consumed;
5829
0
    unsigned   curr_len;
5830
5831
0
    curr_offset = offset;
5832
0
    curr_len = len;
5833
5834
    /* Layer 3 Header Information   3.2.2.9 MSC-BSS O (note)    4 */
5835
0
    ELEM_OPT_TLV(BE_L3_HEADER_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_L3_HEADER_INFO, NULL);
5836
    /* Cause    3.2.2.5 MSC-BSS M   3-4 */
5837
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5838
    /* CSFB Indication 3.2.2.121 MSC-BSS O 1 */
5839
0
    ELEM_OPT_T(BE_CSFB_IND, GSM_A_PDU_TYPE_BSSMAP, BE_CSFB_IND, NULL);
5840
5841
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5842
0
}
5843
/*
5844
 * 3.2.1.22 CLEAR COMPLETE
5845
 * No data
5846
 */
5847
5848
/*
5849
 *  [2] 3.2.1.23 RESET
5850
 */
5851
void
5852
bssmap_reset(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5853
0
{
5854
0
    uint32_t curr_offset;
5855
0
    uint32_t consumed;
5856
0
    unsigned   curr_len;
5857
5858
0
    curr_offset = offset;
5859
0
    curr_len = len;
5860
5861
    /* Cause    3.2.2.5 Both    M   3-4 */
5862
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5863
    /* A-Interface Selector for RESET  3.2.2.107   Both O 2 */
5864
0
    ELEM_OPT_TV(BE_A_ITF_SEL_FOR_RESET, GSM_A_PDU_TYPE_BSSMAP, BE_A_ITF_SEL_FOR_RESET, NULL);
5865
    /*Osmocom extension: Osmux Support */
5866
0
    ELEM_OPT_T(BE_OSMOCOM_OSMUX_SUPPORT, GSM_A_PDU_TYPE_BSSMAP, BE_OSMOCOM_OSMUX_SUPPORT, NULL);
5867
5868
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5869
0
}
5870
5871
/*
5872
 * 3.2.1.24 RESET ACKNOWLEDGE
5873
 */
5874
static void
5875
bssmap_reset_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5876
0
{
5877
0
    uint32_t curr_offset;
5878
0
    uint32_t consumed;
5879
0
    unsigned   curr_len;
5880
5881
0
    curr_offset = offset;
5882
0
    curr_len = len;
5883
5884
    /* A-Interface Selector for RESET  3.2.2.107   Both O 2 */
5885
0
    ELEM_OPT_TV(BE_A_ITF_SEL_FOR_RESET, GSM_A_PDU_TYPE_BSSMAP, BE_A_ITF_SEL_FOR_RESET, NULL);
5886
    /*Osmocom extension: Osmux Support */
5887
0
    ELEM_OPT_T(BE_OSMOCOM_OSMUX_SUPPORT, GSM_A_PDU_TYPE_BSSMAP, BE_OSMOCOM_OSMUX_SUPPORT, NULL);
5888
5889
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5890
0
}
5891
5892
/*
5893
 *  [2] 3.2.1.25 HANDOVER PERFORMED
5894
 */
5895
static void
5896
bssmap_ho_performed(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5897
0
{
5898
0
    uint32_t curr_offset;
5899
0
    uint32_t consumed;
5900
0
    unsigned   curr_len;
5901
5902
0
    curr_offset = offset;
5903
0
    curr_len = len;
5904
5905
    /* Cause    3.2.2.5 BSS-MSC M   3-4 */
5906
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5907
    /* Cell Identifier  3.2.2.17    BSS-MSC M (note 5)  3-10 */
5908
0
    ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5909
    /* Chosen Channel   3.2.2.33    BSS-MSC O (note 1)  2 */
5910
0
    ELEM_OPT_TV(BE_CHOSEN_CHAN, GSM_A_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, NULL);
5911
    /* Chosen Encryption Algorithm  3.2.2.44    BSS-MSC O (note 2)  2 */
5912
0
    ELEM_OPT_TV(BE_CHOSEN_ENC_ALG, GSM_A_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, NULL);
5913
    /* Speech Version (Chosen)  3.2.2.51    BSS-MSC O (note 3)  2 */
5914
0
    ELEM_OPT_TV(BE_SPEECH_VER, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_VER, " (Chosen)");
5915
    /* LSA Identifier   3.2.2.15    BSS-MSC O (note 4)  5 */
5916
0
    ELEM_OPT_TLV(BE_LSA_ID, GSM_A_PDU_TYPE_BSSMAP, BE_LSA_ID, NULL);
5917
    /* Talker Priority  3.2.2.89    BSS-MSC O (note 6)  2 */
5918
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
5919
    /* Codec List (BSS Supported) (serving cell)    3.2.2.103   BSS-MSC O (note 7)  3-n */
5920
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(BSS Supported)");
5921
    /* Speech Codec (Chosen)    3.2.2.104   BSS-MSC O (note 8)  3-5 */
5922
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC, "(Chosen)");
5923
    /* LCLS-BSS-Status    3.2.2.119    BSS-MSC    O (note 9)    2 */
5924
0
    ELEM_OPT_TV(BE_LCLS_BSS_STATUS, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_BSS_STATUS, NULL);
5925
5926
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5927
0
}
5928
5929
/*
5930
 *  [2] 3.2.1.26 OVERLOAD
5931
 */
5932
static void
5933
bssmap_overload(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5934
0
{
5935
0
    uint32_t curr_offset;
5936
0
    uint32_t consumed;
5937
0
    unsigned   curr_len;
5938
5939
0
    curr_offset = offset;
5940
0
    curr_len = len;
5941
5942
    /* Cause    3.2.2.5 Both    M   3-4 */
5943
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5944
    /* Cell Identifier  3.2.2.17    BSS-MSC     O   3-10 */
5945
0
    ELEM_OPT_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL);
5946
5947
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5948
0
}
5949
/*
5950
 * 3.2.1.27 MSC INVOKE TRACE
5951
 */
5952
static void
5953
bssmap_msc_invoke_trace(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5954
0
{
5955
0
    uint32_t curr_offset;
5956
0
    uint32_t consumed;
5957
0
    unsigned   curr_len;
5958
5959
0
    curr_offset = offset;
5960
0
    curr_len = len;
5961
5962
    /* Trace Type  3.2.2.37    MSC-BSS     M   2 */
5963
0
    ELEM_MAND_TV(BE_TRACE_TYPE, GSM_A_PDU_TYPE_BSSMAP, BE_TRACE_TYPE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5964
    /* Triggerid    3.2.2.38    MSC-BSS     O   3-22 */
5965
0
    ELEM_OPT_TLV(BE_TRIGGERID, GSM_A_PDU_TYPE_BSSMAP, BE_TRIGGERID, NULL);
5966
    /* Trace Reference  3.2.2.39    MSC-BSS     M   3 */
5967
0
    ELEM_MAND_TV(BE_TRACE_REF, GSM_A_PDU_TYPE_BSSMAP, BE_TRACE_REF, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5968
    /* Transactionid    3.2.2.40    MSC-BSS     O   4 */
5969
0
    ELEM_OPT_TLV(BE_TRANSID, GSM_A_PDU_TYPE_BSSMAP, BE_TRANSID, NULL);
5970
    /* Mobile Identity  3.2.2.41    MSC-BSS     O   3-10 */
5971
0
    ELEM_OPT_TLV(BE_MID, GSM_A_PDU_TYPE_BSSMAP, BE_MID, NULL);
5972
    /* OMCId    3.2.2.42    MSC-BSS     O   3-22 */
5973
0
    ELEM_OPT_TLV(BE_OMCID, GSM_A_PDU_TYPE_BSSMAP, BE_OMCID, NULL);
5974
5975
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5976
0
}
5977
5978
/*
5979
 * 3.2.1.28 BSS INVOKE TRACE
5980
 */
5981
static void
5982
bssmap_bss_invoke_trace(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5983
0
{
5984
0
    uint32_t curr_offset;
5985
0
    uint32_t consumed;
5986
0
    unsigned   curr_len;
5987
5988
0
    curr_offset = offset;
5989
0
    curr_len = len;
5990
5991
    /* Trace Type   3.2.2.37    Both    M   2 */
5992
0
    ELEM_MAND_TV(BE_TRACE_TYPE, GSM_A_PDU_TYPE_BSSMAP, BE_TRACE_TYPE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5993
    /* Forward Indicator    3.2.2.43    Both    O   2 */
5994
0
    ELEM_OPT_TV(BE_FOR_IND, GSM_A_PDU_TYPE_BSSMAP, BE_FOR_IND, NULL);
5995
    /* Triggerid    3.2.2.38    Both    O   3-22 */
5996
0
    ELEM_OPT_TLV(BE_TRIGGERID, GSM_A_PDU_TYPE_BSSMAP, BE_TRIGGERID, NULL);
5997
    /* Trace Reference  3.2.2.39    Both    M   3 */
5998
0
    ELEM_MAND_TV(BE_TRACE_REF, GSM_A_PDU_TYPE_BSSMAP, BE_TRACE_REF, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5999
    /* TransactionId    3.2.2.40    Both    O   4 */
6000
0
    ELEM_OPT_TLV(BE_TRANSID, GSM_A_PDU_TYPE_BSSMAP, BE_TRANSID, NULL);
6001
    /* OMCId    3.2.2.42    Both    O   3-22 */
6002
0
    ELEM_OPT_TLV(BE_OMCID, GSM_A_PDU_TYPE_BSSMAP, BE_OMCID, NULL);
6003
6004
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6005
0
}
6006
6007
/*
6008
 *  [2] 3.2.1.29 CLASSMARK UPDATE
6009
 */
6010
static void
6011
bssmap_cm_upd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6012
0
{
6013
0
    uint32_t curr_offset;
6014
0
    uint32_t consumed;
6015
0
    unsigned   curr_len;
6016
6017
0
    curr_offset = offset;
6018
0
    curr_len = len;
6019
6020
    /* Classmark Information Type 2 3.2.2.19    Both    M   4-5 */
6021
0
    ELEM_MAND_TLV(BE_CM_INFO_2, GSM_A_PDU_TYPE_BSSMAP, BE_CM_INFO_2, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6022
    /* Classmark Information Type 3 3.2.2.20    Both    O (note 1)  3-34 */
6023
0
    ELEM_OPT_TLV(BE_CM_INFO_3, GSM_A_PDU_TYPE_BSSMAP, BE_CM_INFO_3, NULL);
6024
    /* Talker Priority  3.2.2.89    Both    O (note 2)  2 */
6025
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
6026
6027
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6028
0
}
6029
6030
/*
6031
 *  [2] 3.2.1.30 CIPHER MODE COMMAND
6032
 */
6033
static void
6034
bssmap_ciph_mode_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6035
0
{
6036
0
    uint32_t curr_offset;
6037
0
    uint32_t consumed;
6038
0
    unsigned   curr_len;
6039
6040
0
    curr_offset = offset;
6041
0
    curr_len = len;
6042
6043
    /* Layer 3 Header Information   3.2.2.9 MSC-BSS O (note)    4 */
6044
0
    ELEM_OPT_TLV(BE_L3_HEADER_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_L3_HEADER_INFO, NULL);
6045
    /* Encryption Information   3.2.2.10    MSC-BSS M   3-n */
6046
0
    ELEM_MAND_TLV(BE_ENC_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_ENC_INFO, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6047
    /* Cipher Response Mode 3.2.2.34    MSC-BSS O   2 */
6048
0
    ELEM_OPT_TV(BE_CIPH_RESP_MODE, GSM_A_PDU_TYPE_BSSMAP, BE_CIPH_RESP_MODE, NULL);
6049
    /* Kc128  3.2.2.109   MSC-BSS C (note 2) 17 */
6050
0
    ELEM_OPT_TV(BE_KC128, GSM_A_PDU_TYPE_BSSMAP, BE_KC128, NULL);
6051
6052
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6053
0
}
6054
6055
/*
6056
 *  [2] 3.2.1.31 CIPHER MODE COMPLETE
6057
 */
6058
static void
6059
bssmap_ciph_mode_complete(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6060
0
{
6061
0
    uint32_t curr_offset;
6062
0
    uint32_t consumed;
6063
0
    unsigned   curr_len;
6064
6065
0
    curr_offset = offset;
6066
0
    curr_len = len;
6067
6068
    /* Layer 3 Message Contents 3.2.2.35    BSS-MSC O   2-n  */
6069
0
    ELEM_OPT_TLV(BE_L3_MSG, GSM_A_PDU_TYPE_BSSMAP, BE_L3_MSG, NULL);
6070
    /* Chosen Encryption Algorithm  3.2.2.44    BSS-MSC O (note)    2 */
6071
0
    ELEM_OPT_TV(BE_CHOSEN_ENC_ALG, GSM_A_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, NULL);
6072
6073
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6074
0
}
6075
6076
/*
6077
 * [2] 3.2.1.32 COMPLETE LAYER 3 INFORMATION
6078
 * Updated to 3GPP TS 48.008 version 11.5.0 Release 11
6079
 */
6080
static void
6081
bssmap_cl3_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6082
0
{
6083
0
    uint32_t consumed;
6084
0
    uint32_t curr_offset;
6085
0
    unsigned   curr_len;
6086
6087
0
    curr_offset = offset;
6088
0
    curr_len = len;
6089
6090
    /* Cell Identifier  3.2.2.17    BSS-MSC     M   3-10 */
6091
0
    ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6092
    /* Layer 3 Information  3.2.2.24    BSS-MSC     M   3-n  */
6093
0
    ELEM_MAND_TLV(BE_L3_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_L3_INFO, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6094
    /* Chosen Channel   3.2.2.33    BSS-MSC     O (note 1)  2 */
6095
0
    ELEM_OPT_TV(BE_CHOSEN_CHAN, GSM_A_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, NULL);
6096
    /* LSA Identifier List  3.2.2.16    BSS-MSC O (note 2)  3+3n */
6097
0
    ELEM_OPT_TLV(BE_LSA_ID_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_LSA_ID_LIST, NULL);
6098
    /* APDU 3.2.2.68    BSS-MSC O (note 3)  3-n */
6099
0
    ELEM_OPT_TLV_E(BE_APDU, GSM_A_PDU_TYPE_BSSMAP, BE_APDU, NULL);
6100
    /* Codec List (BSS Supported)   3.2.2.103   BSS-MSC O (note 4)  3-n */
6101
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(BSS Supported)");
6102
    /* Redirect Attempt Flag 3.2.2.111 BSS-MSC O (note 5) 1 */
6103
0
    ELEM_OPT_T(BE_REDIR_ATT_FLG, GSM_A_PDU_TYPE_BSSMAP, BE_REDIR_ATT_FLG, NULL);
6104
    /* Send Sequence Number 3.2.2.113 BSS-MSC O (note 6) 2 */
6105
0
    ELEM_OPT_TV(BE_SEND_SEQN, GSM_A_PDU_TYPE_BSSMAP, BE_SEND_SEQN, NULL);
6106
    /* IMSI 3.2.2.6 BSS-MSC O (note 7) 3-10 */
6107
0
    ELEM_OPT_TLV(BE_IMSI, GSM_A_PDU_TYPE_BSSMAP, BE_IMSI, NULL);
6108
    /* Selected PLMN ID 3.2.2.126 BSS-MSC O (note 8) 4 */
6109
0
    ELEM_OPT_TV(BE_SELECTED_PLMN_ID, GSM_A_PDU_TYPE_BSSMAP, BE_SELECTED_PLMN_ID, NULL);
6110
    /* Selected Operator    3.2.2.130    BSS-MSC    O (note 9, 10)    4 */
6111
    /* PS Registered Operator    3.2.2.131    BSS-MSC    O (note 9, 11)    4 */
6112
6113
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6114
0
}
6115
/*
6116
 * 3.2.1.33 QUEUEING INDICATION
6117
 * No data
6118
 */
6119
6120
/*
6121
 * [2] 3.2.1.34 SAPI "n" REJECT
6122
 */
6123
static void
6124
bssmap_sapi_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6125
0
{
6126
0
    uint32_t consumed;
6127
0
    uint32_t curr_offset;
6128
0
    unsigned   curr_len;
6129
6130
0
    curr_offset = offset;
6131
0
    curr_len = len;
6132
6133
    /* DLCI 3.2.2.25    BSS-MSC M   2 */
6134
0
    ELEM_MAND_TV(BE_DLCI, GSM_A_PDU_TYPE_BSSMAP, BE_DLCI, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6135
    /* Cause    3.2.2.5 BSS-MSC M   3-4 */
6136
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6137
6138
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6139
0
}
6140
/* 3.2.1.35 (void)
6141
 * 3.2.1.36 (void)
6142
 */
6143
/*
6144
 *  [2] 3.2.1.37 HANDOVER REQUIRED REJECT
6145
 */
6146
static void
6147
bssmap_ho_reqd_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6148
0
{
6149
0
    uint32_t curr_offset;
6150
0
    uint32_t consumed;
6151
0
    unsigned   curr_len;
6152
6153
0
    curr_offset = offset;
6154
0
    curr_len = len;
6155
6156
    /* Cause    3.2.2.5 MSC-BSS M   3-4  */
6157
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6158
    /* New BSS to Old BSS Information   3.2.2.78    MSC-BSS     O (note 1)  2-n */
6159
0
    ELEM_OPT_TLV(BE_NEW_BSS_TO_OLD_BSS_INF, GSM_A_PDU_TYPE_BSSMAP, BE_NEW_BSS_TO_OLD_BSS_INF, NULL);
6160
    /* Talker Priority  3.2.2.89    MSC-BSS O (note 2)  2 */
6161
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
6162
6163
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6164
0
}
6165
6166
/*
6167
 *  [2] 3.2.1.38 RESET CIRCUIT
6168
 */
6169
static void
6170
bssmap_reset_cct(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6171
0
{
6172
0
    uint32_t curr_offset;
6173
0
    uint32_t consumed;
6174
0
    unsigned   curr_len;
6175
6176
0
    curr_offset = offset;
6177
0
    curr_len = len;
6178
6179
    /* Circuit Identity Code    3.2.2.2 Both    M   3 */
6180
0
    ELEM_MAND_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6181
    /* Cause    3.2.2.5 Both    M   3-4 */
6182
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6183
6184
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6185
0
}
6186
6187
/*
6188
 *  [2] 3.2.1.39 RESET CIRCUIT ACKNOWLEDGE
6189
 */
6190
static void
6191
bssmap_reset_cct_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6192
0
{
6193
0
    uint32_t curr_offset;
6194
0
    uint32_t consumed;
6195
0
    unsigned   curr_len;
6196
6197
0
    curr_offset = offset;
6198
0
    curr_len = len;
6199
6200
    /* Circuit Identity 3.2.2.2 Both    M   3 */
6201
0
    ELEM_MAND_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6202
6203
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6204
0
}
6205
6206
/*
6207
 * 3.2.1.40 HANDOVER DETECT
6208
 */
6209
static void
6210
bssmap_ho_det(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6211
0
{
6212
0
    uint32_t curr_offset;
6213
0
    uint32_t consumed;
6214
0
    unsigned   curr_len;
6215
6216
0
    curr_offset = offset;
6217
0
    curr_len = len;
6218
6219
    /* Talker Priority  3.2.2.89    BSS-MSC O (note 1)  2 */
6220
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
6221
6222
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6223
0
}
6224
/*
6225
 *  [2] 3.2.1.41 CIRCUIT GROUP BLOCK
6226
 */
6227
static void
6228
bssmap_cct_group_block(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6229
0
{
6230
0
    uint32_t curr_offset;
6231
0
    uint32_t consumed;
6232
0
    unsigned   curr_len;
6233
6234
0
    curr_offset = offset;
6235
0
    curr_len = len;
6236
6237
    /* Cause    3.2.2.5 Both    M   3-4 */
6238
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6239
    /* Circuit Identity Code    3.2.2.2 Both    M   3 */
6240
0
    ELEM_MAND_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6241
    /* Circuit Identity Code List   3.2.2.31    Both    M   4-35 */
6242
0
    ELEM_MAND_TLV(BE_CIC_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CIC_LIST, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6243
6244
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6245
0
}
6246
6247
/*
6248
 *  [2] 3.2.1.42 CIRCUIT GROUP BLOCKING ACKNOWLEDGE
6249
 */
6250
static void
6251
bssmap_cct_group_block_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6252
0
{
6253
0
    uint32_t curr_offset;
6254
0
    uint32_t consumed;
6255
0
    unsigned   curr_len;
6256
6257
0
    curr_offset = offset;
6258
0
    curr_len = len;
6259
6260
    /* Circuit Identity Code    3.2.2.2 Both    M   3 */
6261
0
    ELEM_MAND_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6262
    /* Circuit Identity Code List   3.2.2.31    Both    M   4-35 */
6263
0
    ELEM_MAND_TLV(BE_CIC_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CIC_LIST, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6264
6265
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6266
0
}
6267
6268
/*
6269
 *  [2] 3.2.1.43 CIRCUIT GROUP UNBLOCK
6270
 */
6271
static void
6272
bssmap_cct_group_unblock(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6273
0
{
6274
0
    uint32_t curr_offset;
6275
0
    uint32_t consumed;
6276
0
    unsigned   curr_len;
6277
6278
0
    curr_offset = offset;
6279
0
    curr_len = len;
6280
6281
    /* Circuit Identity Code    3.2.2.2 Both    M   3 */
6282
0
    ELEM_MAND_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6283
    /* Circuit Identity Code List   3.2.2.31    Both    M   4-35 */
6284
0
    ELEM_MAND_TLV(BE_CIC_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CIC_LIST, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6285
6286
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6287
0
}
6288
6289
/*
6290
 *  [2] 3.2.1.44 CIRCUIT GROUP UNBLOCKING ACKNOWLEDGE
6291
 */
6292
static void
6293
bssmap_cct_group_unblock_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6294
0
{
6295
0
    uint32_t curr_offset;
6296
0
    uint32_t consumed;
6297
0
    unsigned   curr_len;
6298
6299
0
    curr_offset = offset;
6300
0
    curr_len = len;
6301
6302
    /* Circuit Identity Code    3.2.2.2 Both    M   3 */
6303
0
    ELEM_MAND_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6304
    /* Circuit Identity Code List   3.2.2.31    Both    M   4-35 */
6305
0
    ELEM_MAND_TLV(BE_CIC_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CIC_LIST, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6306
6307
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6308
0
}
6309
6310
/*
6311
 *  [2] 3.2.1.45 CONFUSION
6312
 */
6313
static void
6314
bssmap_confusion(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6315
0
{
6316
0
    uint32_t curr_offset;
6317
0
    uint32_t consumed;
6318
0
    unsigned   curr_len;
6319
6320
0
    curr_offset = offset;
6321
0
    curr_len = len;
6322
6323
    /* Cause    3.2.2.5 Both    M   3-4 */
6324
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6325
    /* Diagnostics  3.2.2.32    Both    M   4-n */
6326
0
    ELEM_MAND_TLV(BE_DIAG, GSM_A_PDU_TYPE_BSSMAP, BE_DIAG, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6327
6328
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6329
0
}
6330
/*
6331
 * 3.2.1.46 CLASSMARK REQUEST
6332
 */
6333
static void
6334
bssmap_cls_m_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6335
0
{
6336
0
    uint32_t curr_offset;
6337
0
    uint32_t consumed;
6338
0
    unsigned   curr_len;
6339
6340
0
    curr_offset = offset;
6341
0
    curr_len = len;
6342
6343
    /* Talker Priority  3.2.2.89    MSC-BSS O (note 1)  2 */
6344
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
6345
6346
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6347
0
}
6348
/*
6349
 *  [2] 3.2.1.47 UNEQUIPPED CIRCUIT
6350
 */
6351
static void
6352
bssmap_unequipped_cct(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6353
0
{
6354
0
    uint32_t curr_offset;
6355
0
    uint32_t consumed;
6356
0
    unsigned   curr_len;
6357
6358
0
    curr_offset = offset;
6359
0
    curr_len = len;
6360
6361
    /* Circuit Identity Code    3.2.2.2     Both    M   3 */
6362
0
    ELEM_MAND_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6363
    /* Circuit Identity Code List   3.2.2.31    Both    O   4-35 */
6364
0
    ELEM_OPT_TLV(BE_CIC_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CIC_LIST, NULL);
6365
6366
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6367
0
}
6368
6369
/*
6370
 *  [2] 3.2.1.48 CIPHER MODE REJECT
6371
 */
6372
static void
6373
bssmap_ciph_mode_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6374
0
{
6375
0
    uint32_t curr_offset;
6376
0
    uint32_t consumed;
6377
0
    unsigned   curr_len;
6378
6379
0
    curr_offset = offset;
6380
0
    curr_len = len;
6381
6382
    /* Cause    3.2.2.5 BSS-MSC M   3-4 */
6383
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6384
6385
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6386
0
}
6387
6388
/*
6389
 *  [2] 3.2.1.49 LOAD INDICATION
6390
 */
6391
static void
6392
bssmap_load_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6393
0
{
6394
0
    uint32_t curr_offset;
6395
0
    uint32_t consumed;
6396
0
    unsigned   curr_len;
6397
6398
0
    curr_offset = offset;
6399
0
    curr_len = len;
6400
6401
    /* Time Indication  3.2.2.47    Both    M   2 */
6402
0
    ELEM_MAND_TV(BE_TIME_IND, GSM_A_PDU_TYPE_BSSMAP, BE_TIME_IND, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6403
    /* Cell Identifier  3.2.2.17    Both    M   3-10 */
6404
0
    ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6405
    /* Cell Identifier List (Target)    3.2.2.27    Both    M   3 to 3+7n */
6406
0
    ELEM_MAND_TLV(BE_CELL_ID_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, " (Target)", ei_gsm_a_bssmap_missing_mandatory_element);
6407
    /* Resource Situation   3.2.2.48    Both    O (note 1)  4-N */
6408
0
    ELEM_OPT_TLV(BE_RES_SIT, GSM_A_PDU_TYPE_BSSMAP, BE_RES_SIT, NULL);
6409
    /* Cause    3.2.2.5 Both    O (note 2)  4-5 */
6410
0
    ELEM_OPT_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL);
6411
6412
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6413
0
}
6414
/*
6415
 * 3.2.1.50 VGCS/VBS SETUP
6416
 */
6417
 static void
6418
 bssmap_vgcs_vbs_setup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6419
0
{
6420
0
    uint32_t curr_offset;
6421
0
    uint32_t consumed;
6422
0
    unsigned   curr_len;
6423
6424
0
    curr_offset = offset;
6425
0
    curr_len = len;
6426
6427
    /* Group Call Reference 3.2.2.55    MSC-BSS M   7 */
6428
0
    ELEM_MAND_TLV(BE_GROUP_CALL_REF, GSM_A_PDU_TYPE_BSSMAP, BE_GROUP_CALL_REF, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6429
    /* Priority 3.2.2.18    MSC-BSS O   3 */
6430
0
    ELEM_OPT_TLV(BE_PRIO, GSM_A_PDU_TYPE_BSSMAP, BE_PRIO, NULL);
6431
    /* VGCS Feature Flags   3.2.2.88    MSC-BSS O   3 */
6432
0
    ELEM_OPT_TLV(BE_VGCS_FEAT_FLG, GSM_A_PDU_TYPE_BSSMAP, BE_VGCS_FEAT_FLG, NULL);
6433
6434
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6435
0
}
6436
6437
/*
6438
 * 3.2.1.51 VGCS/VBS SETUP ACK
6439
 */
6440
 static void
6441
bssmap_vgcs_vbs_setup_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6442
0
{
6443
0
    uint32_t curr_offset;
6444
0
    uint32_t consumed;
6445
0
    unsigned   curr_len;
6446
6447
0
    curr_offset = offset;
6448
0
    curr_len = len;
6449
6450
    /* VGCS Feature Flags   3.2.2.88    BSS-MSC O(note 1)   3 */
6451
0
    ELEM_OPT_TLV(BE_VGCS_FEAT_FLG, GSM_A_PDU_TYPE_BSSMAP, BE_VGCS_FEAT_FLG, NULL);
6452
6453
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6454
0
}
6455
6456
 /*
6457
 * 3.2.1.52 VGCS/VBS SETUP REFUSE
6458
 */
6459
 static void
6460
bssmap_vgcs_vbs_setup_refuse(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6461
0
{
6462
0
    uint32_t curr_offset;
6463
0
    uint32_t consumed;
6464
0
    unsigned   curr_len;
6465
6466
0
    curr_offset = offset;
6467
0
    curr_len = len;
6468
6469
    /* Cause    3.2.2.5 BSS-MSC M   3-4 */
6470
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6471
6472
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6473
0
}
6474
6475
/*
6476
 * 3.2.1.53 VGCS/VBS ASSIGNMENT REQUEST
6477
 */
6478
static void
6479
bssmap_vgcs_vbs_ass_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6480
0
{
6481
0
    uint32_t curr_offset;
6482
0
    uint32_t consumed;
6483
0
    unsigned   curr_len;
6484
6485
0
    curr_offset = offset;
6486
0
    curr_len = len;
6487
6488
    /* Channel Type 3.2.2.11    MSC-BSS M (note 2)  5-13 */
6489
0
    ELEM_MAND_TLV(BE_CHAN_TYPE, GSM_A_PDU_TYPE_BSSMAP, BE_CHAN_TYPE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6490
    /* Assignment Requirement   3.2.2.52    MSC-BSS M   2 */
6491
0
    ELEM_MAND_TV(BE_ASS_REQ, GSM_A_PDU_TYPE_BSSMAP, BE_ASS_REQ, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6492
    /* Cell Identifier  3.2.2.17    MSC-BSS M   3-10 */
6493
0
    ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6494
    /* Group Call Reference 3.2.2.55    MSC-BSS M   7 */
6495
0
    ELEM_MAND_TLV(BE_GROUP_CALL_REF, GSM_A_PDU_TYPE_BSSMAP, BE_GROUP_CALL_REF, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6496
    /* Priority 3.2.2.18    MSC-BSS O   3 */
6497
0
    ELEM_OPT_TLV(BE_PRIO, GSM_A_PDU_TYPE_BSSMAP, BE_PRIO, NULL);
6498
    /* Circuit Identity Code    3.2.2.2 MSC-BSS O (note  4, 5)  3 */
6499
0
    ELEM_OPT_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL);
6500
    /* Downlink DTX Flag    3.2.2.26    MSC-BSS O (note 2, 4)   2 */
6501
0
    ELEM_OPT_TV(BE_DOWN_DTX_FLAG, GSM_A_PDU_TYPE_BSSMAP, BE_DOWN_DTX_FLAG, NULL);
6502
    /* Encryption Information   3.2.2.10    MSC-BSS O   3-n */
6503
0
    ELEM_OPT_TLV(BE_ENC_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_ENC_INFO, NULL);
6504
    /* VSTK_RAND    3.2.2.83    MSC-BSS O (note 1)  7 */
6505
0
    ELEM_OPT_TLV(BE_VSTK_RAND_INF, GSM_A_PDU_TYPE_BSSMAP, BE_VSTK_RAND_INF, NULL);
6506
    /* VSTK 3.2.2.84    MSC-BSS O (note 1)  18 */
6507
0
    ELEM_OPT_TLV(BE_VSTK_INF, GSM_A_PDU_TYPE_BSSMAP, BE_VSTK_INF, NULL);
6508
    /* Cell Identifier List Segment 3.2.2.27a   MSC-BSS O (note 3)  4-? */
6509
0
    ELEM_OPT_TLV(BE_CELL_ID_LIST_SEG, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST_SEG, NULL);
6510
    /* AoIP Transport Layer Address(MGW)    3.2.2.102    MSC - BSS    O(note 6, 7)    8 - 20 */
6511
0
    ELEM_OPT_TLV(BE_AOIP_TRANS_LAY_ADD, GSM_A_PDU_TYPE_BSSMAP, BE_AOIP_TRANS_LAY_ADD, NULL);
6512
    /* Call Identifier    3.2.2.105    MSC - BSS    O(note 6, 7)    5 */
6513
0
    ELEM_OPT_TV(BE_CALL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CALL_ID, NULL);
6514
    /* Codec List(MSC Preferred)    3.2.2.103    MSC - BSS    O(note 6, 7)    3 - n */
6515
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(MSC Preferred)");
6516
6517
6518
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6519
0
}
6520
/*
6521
 * 3.2.1.54 VGCS/VBS ASSIGNMENT RESULT
6522
 */
6523
static void
6524
bssmap_vgcs_vbs_ass_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6525
0
{
6526
0
    uint32_t curr_offset;
6527
0
    uint32_t consumed;
6528
0
    unsigned   curr_len;
6529
6530
0
    curr_offset = offset;
6531
0
    curr_len = len;
6532
6533
    /* Channel Type 3.2.2.11    BSS-MSC M (note 3, 4)   5 */
6534
0
    ELEM_MAND_TLV(BE_CHAN_TYPE, GSM_A_PDU_TYPE_BSSMAP, BE_CHAN_TYPE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6535
    /* Cell Identifier  3.2.2.17    BSS-MSC M   3-10 */
6536
0
    ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6537
    /* Chosen Channel   3.2.2.33    BSS-MSC O (note 2)  2 */
6538
0
    ELEM_OPT_TV(BE_CHOSEN_CHAN, GSM_A_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, NULL);
6539
    /* Circuit Identity Code    3.2.2.2 BSS-MSC O (note 5)  3 */
6540
0
    ELEM_OPT_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL);
6541
    /* Circuit Pool 3.2.2.45    BSS-MSC O (note 1)  2 */
6542
0
    ELEM_OPT_TV(BE_CCT_POOL, GSM_A_PDU_TYPE_BSSMAP, BE_CCT_POOL, NULL);
6543
    /* AoIP Transport Layer Address (BSS)    3.2.2.102    BSS-MSC    O (note 6, 7)    8-20 */
6544
0
    ELEM_OPT_TLV(BE_AOIP_TRANS_LAY_ADD, GSM_A_PDU_TYPE_BSSMAP, BE_AOIP_TRANS_LAY_ADD, NULL);
6545
    /* Speech Codec (Chosen)    3.2.2.104    BSS-MSC    O (note 6, 7)    3-5 */
6546
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC, "(Chosen)");
6547
    /* Call Identifier    3.2.2.105    BSS-MSC    O (note 6, 7)    5 */
6548
0
    ELEM_OPT_TV(BE_CALL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CALL_ID, NULL);
6549
6550
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6551
0
}
6552
/*
6553
 * 3.2.1.55 VGCS/VBS ASSIGNMENT FAILURE
6554
 */
6555
static void
6556
bssmap_vgcs_vbs_ass_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6557
0
{
6558
0
    uint32_t curr_offset;
6559
0
    uint32_t consumed;
6560
0
    unsigned   curr_len;
6561
6562
0
    curr_offset = offset;
6563
0
    curr_len = len;
6564
6565
    /* Cause    3.2.2.5 BSS-MSC M   3-4  */
6566
0
    ELEM_OPT_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL);
6567
    /* Circuit Pool 3.2.2.45    BSS-MSC O (note 1)  2 */
6568
0
    ELEM_OPT_TV(BE_CCT_POOL, GSM_A_PDU_TYPE_BSSMAP, BE_CCT_POOL, NULL);
6569
    /* Circuit Pool List    3.2.2.46    BSS-MSC O (note 2)  V */
6570
0
    ELEM_OPT_TLV(BE_CCT_POOL_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CCT_POOL_LIST, NULL);
6571
    /* Codec List (BSS Supported)    3.2.2.103    BSS-MSC    O (note 3)    3-n */
6572
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(BSS Supported)");
6573
6574
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6575
0
}
6576
/*
6577
 * 3.2.1.56 VGCS/VBS QUEUING INDICATION
6578
 * No data
6579
 */
6580
/*
6581
 * 3.2.1.57 UPLINK REQUEST
6582
 */
6583
static void
6584
bssmap_uplink_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6585
0
{
6586
0
    uint32_t curr_offset;
6587
0
    uint32_t consumed;
6588
0
    unsigned   curr_len;
6589
6590
0
    curr_offset = offset;
6591
0
    curr_len = len;
6592
6593
    /* Talker Priority  3.2.2.89    BSS-MSC O (note 1)  2 */
6594
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
6595
    /* Cell Identifier  3.2.2.17    BSS-MSC O (note 1)  3-10 */
6596
0
    ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6597
    /* Layer 3 Information  3.2.2.24    BSS-MSC O (note 1,3)    3-n */
6598
0
    ELEM_OPT_TLV(BE_L3_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_L3_INFO, NULL);
6599
    /* Mobile Identity  3.2.2.41    BSS-MSC O (note 1,2)    3-n */
6600
0
    ELEM_OPT_TLV(BE_MID, GSM_A_PDU_TYPE_COMMON, DE_MID, NULL);
6601
6602
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6603
0
}
6604
/*
6605
 * 3.2.1.58 UPLINK REQUEST ACKNOWLEDGE
6606
 */
6607
static void
6608
bssmap_uplink_req_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6609
0
{
6610
0
    uint32_t curr_offset;
6611
0
    uint32_t consumed;
6612
0
    unsigned   curr_len;
6613
6614
0
    curr_offset = offset;
6615
0
    curr_len = len;
6616
6617
    /* Talker Priority  3.2.2.89    MSC-BSS O (note 1)  2 */
6618
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
6619
    /* Emergency set indication 3.2.2.90    MSC-BSS O (note 1)  1 */
6620
0
    ELEM_OPT_T(BE_EMRG_SET_IND, GSM_A_PDU_TYPE_BSSMAP, BE_EMRG_SET_IND, NULL);
6621
    /* Talker Identity  3.2.2.91    MSC-BSS O   3-20 */
6622
0
    ELEM_MAND_TLV(BE_TALKER_ID, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6623
6624
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6625
0
}
6626
/*
6627
 * 3.2.1.59 UPLINK REQUEST CONFIRMATION
6628
 */
6629
static void
6630
bssmap_uplink_req_conf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6631
0
{
6632
0
    uint32_t curr_offset;
6633
0
    uint32_t consumed;
6634
0
    unsigned   curr_len;
6635
6636
0
    curr_offset = offset;
6637
0
    curr_len = len;
6638
6639
    /* Cell Identifier  3.2.2.17    BSS-MSC M   3-10 */
6640
0
    ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6641
    /* Talker Identity  3.2.2.91    BSS-MSC O   3-20 */
6642
0
    ELEM_OPT_TLV(BE_TALKER_ID, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_ID, NULL);
6643
    /* Layer 3 Information  3.2.2.24    BSS-MSC M   3-n */
6644
0
    ELEM_MAND_TLV(BE_L3_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_L3_INFO, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6645
6646
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6647
0
}
6648
/*
6649
 * 3.2.1.59a    UPLINK APPLICATION DATA
6650
 */
6651
static void
6652
bssmap_uplink_app_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6653
0
{
6654
0
    uint32_t curr_offset;
6655
0
    uint32_t consumed;
6656
0
    unsigned   curr_len;
6657
6658
0
    curr_offset = offset;
6659
0
    curr_len = len;
6660
6661
    /* Cell Identifier  3.2.2.17    BSS-MSC M   3-10 */
6662
0
    ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6663
    /* Layer 3 Information  3.2.2.24    BSS-MSC M   3-n */
6664
0
    ELEM_MAND_TLV(BE_L3_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_L3_INFO, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6665
    /* Application Data information 3.2.2.100   BSS-MSC M   3 */
6666
0
    ELEM_MAND_TLV(BE_APP_DATA_INF, GSM_A_PDU_TYPE_BSSMAP, BE_APP_DATA_INF, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6667
6668
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6669
0
}
6670
/*
6671
 * 3.2.1.60 UPLINK RELEASE INDICATION
6672
 */
6673
static void
6674
bssmap_uplink_rel_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6675
0
{
6676
0
    uint32_t curr_offset;
6677
0
    uint32_t consumed;
6678
0
    unsigned   curr_len;
6679
6680
0
    curr_offset = offset;
6681
0
    curr_len = len;
6682
6683
    /* Cause    3.2.2.5 BSS-MSC M   3-4 */
6684
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6685
    /* Talker Priority  3.2.2.89    BSS-MSC O (note 1)  2 */
6686
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
6687
6688
6689
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6690
0
}
6691
/*
6692
 * 3.2.1.61 UPLINK REJECT COMMAND
6693
 */
6694
static void
6695
bssmap_uplink_rej_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6696
0
{
6697
0
    uint32_t curr_offset;
6698
0
    uint32_t consumed;
6699
0
    unsigned   curr_len;
6700
6701
0
    curr_offset = offset;
6702
0
    curr_len = len;
6703
6704
    /* Cause    3.2.2.5 MSC-BSS M   3-4 */
6705
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6706
    /* Current Talker Priority  3.2.2.89    MSC-BSS O (note 1)  2 */
6707
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, "Current");
6708
    /* Rejected Talker Priority 3.2.2.89    MSC-BSS O (note 1)  2 */
6709
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, "Rejected");
6710
    /* Talker Identity  3.2.2.91    MSC-BSS O   3-20 */
6711
0
    ELEM_OPT_TLV(BE_TALKER_ID, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_ID, NULL);
6712
6713
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6714
0
}
6715
/*
6716
 * 3.2.1.62 UPLINK RELEASE COMMAND
6717
 */
6718
static void
6719
bssmap_uplink_rel_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6720
0
{
6721
0
    uint32_t curr_offset;
6722
0
    uint32_t consumed;
6723
0
    unsigned   curr_len;
6724
6725
0
    curr_offset = offset;
6726
0
    curr_len = len;
6727
6728
    /* Cause    3.2.2.5 MSC-BSS M   3-4 */
6729
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6730
6731
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6732
0
}
6733
6734
/*
6735
 * 3.2.1.63 UPLINK SEIZED COMMAND
6736
 */
6737
static void
6738
bssmap_uplink_seized_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6739
0
{
6740
0
    uint32_t curr_offset;
6741
0
    uint32_t consumed;
6742
0
    unsigned   curr_len;
6743
6744
0
    curr_offset = offset;
6745
0
    curr_len = len;
6746
6747
    /* Cause    3.2.2.5 MSC-BSS M   3-4 */
6748
0
    ELEM_OPT_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL);
6749
    /* Talker Priority  3.2.2.89    MSC-BSS O (note 1)  2 */
6750
0
    ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
6751
    /* Emergency set indication 3.2.2.90    MSC-BSS O (note 1)  1 */
6752
0
    ELEM_OPT_T(BE_EMRG_SET_IND, GSM_A_PDU_TYPE_BSSMAP, BE_EMRG_SET_IND, NULL);
6753
    /* Talker Identity  3.2.2.91    MSC-BSS O   3-20 */
6754
0
    ELEM_MAND_TLV(BE_TALKER_ID, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6755
6756
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6757
0
}
6758
/*
6759
 * 3.2.1.64 SUSPEND
6760
 */
6761
static void
6762
bssmap_sus(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6763
0
{
6764
0
    uint32_t curr_offset;
6765
0
    uint32_t consumed;
6766
0
    unsigned   curr_len;
6767
6768
0
    curr_offset = offset;
6769
0
    curr_len = len;
6770
6771
    /* DLCI 3.2.2.25    BSS-MSC M   2 */
6772
0
    ELEM_MAND_TV(BE_DLCI, GSM_A_PDU_TYPE_BSSMAP, BE_DLCI, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6773
6774
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6775
0
}
6776
/*
6777
 * 3.2.1.65 RESUME
6778
 */
6779
static void
6780
bssmap_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6781
0
{
6782
0
    uint32_t curr_offset;
6783
0
    uint32_t consumed;
6784
0
    unsigned   curr_len;
6785
6786
0
    curr_offset = offset;
6787
0
    curr_len = len;
6788
6789
    /* DLCI 3.2.2.25    BSS-MSC M   2 */
6790
0
    ELEM_MAND_TV(BE_DLCI, GSM_A_PDU_TYPE_BSSMAP, BE_DLCI, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6791
6792
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6793
0
}
6794
/*
6795
 *  [2] 3.2.1.66 CHANGE CIRCUIT
6796
 */
6797
static void
6798
bssmap_change_cct(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6799
0
{
6800
0
    uint32_t curr_offset;
6801
0
    uint32_t consumed;
6802
0
    unsigned   curr_len;
6803
6804
0
    curr_offset = offset;
6805
0
    curr_len = len;
6806
6807
    /* Cause    3.2.2.5 MSC-BSS M   3-4 */
6808
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6809
6810
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6811
0
}
6812
6813
/*
6814
 *  [2] 3.2.1.67 CHANGE CIRCUIT ACKNOWLEDGE
6815
 */
6816
static void
6817
bssmap_change_cct_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6818
0
{
6819
0
    uint32_t curr_offset;
6820
0
    uint32_t consumed;
6821
0
    unsigned   curr_len;
6822
6823
0
    curr_offset = offset;
6824
0
    curr_len = len;
6825
6826
    /* Circuit identity 3.2.2.2 BSS-MSC M   3 */
6827
0
    ELEM_MAND_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6828
6829
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6830
0
}
6831
6832
/*
6833
 *  [2] 3.2.1.68 Common ID
6834
 */
6835
static void
6836
bssmap_common_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6837
0
{
6838
0
    uint32_t curr_offset;
6839
0
    uint32_t consumed;
6840
0
    unsigned   curr_len;
6841
6842
0
    curr_offset = offset;
6843
0
    curr_len = len;
6844
6845
    /* IMSI 3.2.2.6 MSC-BSS M   3-10 */
6846
0
    ELEM_MAND_TLV(BE_IMSI, GSM_A_PDU_TYPE_BSSMAP, BE_IMSI, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6847
    /* SNA Access Information   3.2.2.82    MSC-BSC O (note)    2+n */
6848
0
    ELEM_OPT_TLV(BE_SNA_ACC_INF, GSM_A_PDU_TYPE_BSSMAP, BE_SNA_ACC_INF, NULL);
6849
    /* Selected PLMN ID    3.2.2.126    MSC-BSC    O (note 3)    */
6850
0
    ELEM_OPT_TV(BE_SELECTED_PLMN_ID, GSM_A_PDU_TYPE_BSSMAP, BE_SELECTED_PLMN_ID, NULL);
6851
    /* Last used E-UTRAN PLMN ID    3.2.2.127    MSC-BSC    O (note 4)    4 */
6852
0
    ELEM_OPT_TV(BE_LAST_USED_E_UTRAN_PLMN_ID, GSM_A_PDU_TYPE_BSSMAP, BE_LAST_USED_E_UTRAN_PLMN_ID, NULL);
6853
6854
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6855
0
}
6856
6857
/*
6858
 *  [2] 3.2.1.69 LSA INFORMATION
6859
 */
6860
static void
6861
bssmap_lsa_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6862
0
{
6863
0
    uint32_t curr_offset;
6864
0
    uint32_t consumed;
6865
0
    unsigned   curr_len;
6866
6867
0
    curr_offset = offset;
6868
0
    curr_len = len;
6869
6870
    /* LSA Information  3.2.2.23    MSC-BSS M   3+4n */
6871
0
    ELEM_MAND_TLV(BE_LSA_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_LSA_INFO, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6872
6873
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6874
0
}
6875
6876
/*
6877
 *  [2] 3.2.1.70 (void)
6878
 */
6879
void
6880
bssmap_conn_oriented(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6881
0
{
6882
0
    uint32_t curr_offset;
6883
0
    uint32_t consumed;
6884
0
    unsigned   curr_len;
6885
6886
0
    curr_offset = offset;
6887
0
    curr_len = len;
6888
6889
0
    ELEM_MAND_TLV_E(BE_APDU, GSM_A_PDU_TYPE_BSSMAP, BE_APDU, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6890
6891
0
    ELEM_OPT_TLV(BE_SEG, GSM_A_PDU_TYPE_BSSMAP, BE_SEG, NULL);
6892
6893
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6894
0
}
6895
6896
/*
6897
 * 3.2.1.71 PERFORM LOCATION REQUEST
6898
 */
6899
static void
6900
bssmap_perf_loc_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6901
0
{
6902
0
    uint32_t curr_offset;
6903
0
    uint32_t consumed;
6904
0
    unsigned   curr_len;
6905
6906
0
    curr_offset = offset;
6907
0
    curr_len = len;
6908
6909
    /* Location Type 3.2.2.63 M 3-n */
6910
0
    ELEM_MAND_TLV(BE_LOC_TYPE, GSM_A_PDU_TYPE_BSSMAP, BE_LOC_TYPE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6911
    /* Cell Identifier 3.2.2.17 O 5-10 */
6912
0
    ELEM_OPT_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL);
6913
    /* Classmark Information Type 3 3.2.2.20 O 3-14 */
6914
0
    ELEM_OPT_TLV(BE_CM_INFO_3, GSM_A_PDU_TYPE_BSSMAP, BE_CM_INFO_3, NULL);
6915
    /* LCS Client Type 3.2.2.67 C (note 3) 3-n */
6916
0
    ELEM_OPT_TLV(BE_LCS_CLIENT, GSM_PDU_TYPE_BSSMAP_LE, DE_BMAPLE_LCS_CLIENT_TYPE, NULL);
6917
    /* Chosen Channel 3.2.2.33 O 2 */
6918
0
    ELEM_OPT_TV(BE_CHOSEN_CHAN, GSM_A_PDU_TYPE_BSSMAP, BE_CHOSEN_CHAN, NULL);
6919
    /* LCS Priority 3.2.2.62 O 3-n */
6920
0
    ELEM_OPT_TLV(BE_LCS_PRIO, GSM_A_PDU_TYPE_BSSMAP, BE_LCS_PRIO, NULL);
6921
    /* LCS QoS 3.2.2.60 C (note 1) 3-n */
6922
0
    ELEM_OPT_TLV(BE_LCS_QOS, GSM_PDU_TYPE_BSSMAP_LE, DE_BMAPLE_LCSQOS, NULL);
6923
    /* GPS Assistance Data 3.2.2.70 C (note 2) 3-n */
6924
0
    ELEM_OPT_TLV(BE_GPS_ASSIST_DATA, GSM_A_PDU_TYPE_BSSMAP, BE_GPS_ASSIST_DATA, NULL);
6925
    /* APDU 3.2.2.68 O 3-n */
6926
0
    ELEM_OPT_TLV_E(BE_APDU, GSM_A_PDU_TYPE_BSSMAP, BE_APDU, NULL);
6927
    /* IMSI 3.2.2.6 O (note 4)  5-10 */
6928
0
    ELEM_OPT_TLV(BE_IMSI, GSM_A_PDU_TYPE_BSSMAP, BE_IMSI, NULL);
6929
    /* IMEI 3.2.2.86    O (note 4)  10 (use same decode as IMSI) */
6930
0
    ELEM_OPT_TLV(BE_IMEI, GSM_A_PDU_TYPE_BSSMAP, BE_IMEI, NULL);
6931
    /* GANSS Location Type  3.2.2.97    C   3 */
6932
0
    ELEM_OPT_TLV(BE_GANSS_LOC_TYP, GSM_A_PDU_TYPE_BSSMAP, BE_GANSS_LOC_TYP, NULL);
6933
    /* GANSS Assistance Data    3.2.2.95    C (note 5)  3-n */
6934
0
    ELEM_OPT_TLV(BE_GANSS_ASS_DTA, GSM_A_PDU_TYPE_BSSMAP, BE_GANSS_ASS_DTA, NULL);
6935
6936
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6937
0
}
6938
/*
6939
 * 3.2.1.72 PERFORM LOCATION RESPONSE
6940
 */
6941
static void
6942
bssmap_perf_loc_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6943
0
{
6944
0
    uint32_t curr_offset;
6945
0
    uint32_t consumed;
6946
0
    unsigned   curr_len;
6947
6948
0
    curr_offset = offset;
6949
0
    curr_len = len;
6950
6951
    /* Location Estimate 3.2.2.64 C (note 1) 3-n */
6952
0
    ELEM_OPT_TLV(BE_LOC_EST, GSM_A_PDU_TYPE_BSSMAP, BE_LOC_EST, NULL);
6953
    /* Positioning Data 3.2.2.65 O 3-n */
6954
0
    ELEM_OPT_TLV(BE_POS_DATA, GSM_A_PDU_TYPE_BSSMAP, BE_POS_DATA, NULL);
6955
    /* Deciphering Keys 3.2.2.71 C (note 2) 3-n */
6956
0
    ELEM_OPT_TLV(BE_DECIPH_KEYS, GSM_PDU_TYPE_BSSMAP_LE, DE_BMAPLE_DECIPH_KEYS, NULL);
6957
    /* LCS Cause 3.2.2.66 C (note 3) 3-n */
6958
0
    ELEM_OPT_TLV(BE_LCS_CAUSE, GSM_PDU_TYPE_BSSMAP_LE, DE_BMAPLE_LCS_CAUSE, NULL);
6959
    /* Velocity Estimate    3.2.2.87    O   3-n */
6960
0
    ELEM_OPT_TLV(BE_VEL_EST, GSM_A_PDU_TYPE_BSSMAP, BE_VEL_EST, NULL);
6961
    /* GANSS Positioning Data   3.2.2.96    O   3-n */
6962
0
    ELEM_OPT_TLV(BE_GANSS_POS_DTA, GSM_A_PDU_TYPE_BSSMAP, BE_GANSS_POS_DTA, NULL);
6963
6964
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6965
0
}
6966
/*
6967
 * 3.2.1.73 PERFORM LOCATION ABORT
6968
 */
6969
void
6970
bssmap_perf_loc_abort(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6971
0
{
6972
0
    uint32_t curr_offset;
6973
0
    uint32_t consumed;
6974
0
    unsigned   curr_len;
6975
6976
0
    curr_offset = offset;
6977
0
    curr_len = len;
6978
6979
    /* LCS Cause 3.2.2.66 M 3-n */
6980
0
    ELEM_OPT_TLV(BE_LCS_CAUSE, GSM_PDU_TYPE_BSSMAP_LE, DE_BMAPLE_LCS_CAUSE, NULL);
6981
6982
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6983
0
}
6984
6985
/*
6986
 * 3.2.1.74 CONNECTIONLESS INFORMATION
6987
 *
6988
Network Element Identity (source)   3.2.2.69    Both    M   3-n
6989
Network Element Identity (target)   3.2.2.69    Both    M   3-n
6990
APDU    3.2.2.68    Both    M   3-n
6991
Segmentation    3.2,2,74    Both    C (note 1)  5
6992
Return Error Request    3.2.2.72    Both    C (note 2)  3-n
6993
Return Error Cause  3.2.2.73    Both    C (note 3)  3-n
6994
*/
6995
6996
/*
6997
 * 3.2.1.75 CHANNEL MODIFY REQUEST
6998
 */
6999
7000
static void
7001
bssmap_chan_mod_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7002
0
{
7003
0
    uint32_t curr_offset;
7004
0
    uint32_t consumed;
7005
0
    unsigned   curr_len;
7006
7007
0
    curr_offset = offset;
7008
0
    curr_len = len;
7009
7010
    /* Cause    3.2.2.5 BSS-MSC M   3-4 */
7011
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7012
7013
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7014
0
}
7015
/*
7016
 * 3.2.1.76 EMERGENCY RESET INDICATION
7017
 */
7018
/*
7019
Cell Identifier 3.2.2.17    BSS-MSC O   3-10
7020
ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL);
7021
Layer 3 Information 3.2.2.24    BSS-MSC O (note 2)  3-n
7022
    ELEM_OPT_TLV(BE_L3_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_L3_INFO, NULL);
7023
Mobile Identity 3.2.2.41    BSS-MSC O (note 1)  3-n
7024
*/
7025
/*
7026
 * 3.2.1.77 EMERGENCY RESET COMMAND
7027
 * No data
7028
 */
7029
/*
7030
 * 3.2.1.78 VGCS ADDITIONAL INFORMATION
7031
 */
7032
static void
7033
bssmap_vgcs_add_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7034
0
{
7035
0
    uint32_t curr_offset;
7036
0
    uint32_t consumed;
7037
0
    unsigned   curr_len;
7038
7039
0
    curr_offset = offset;
7040
0
    curr_len = len;
7041
7042
    /* Talker Identity  3.2.2.91    MSC-BSS M   3-20 */
7043
0
    ELEM_MAND_TLV(BE_TALKER_ID, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7044
7045
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7046
0
}
7047
/*
7048
 * 3.2.1.79 VGCS/VBS AREA CELL INFO
7049
 */
7050
static void
7051
bssmap_vgcs_vbs_area_cell_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7052
0
{
7053
0
    uint32_t curr_offset;
7054
0
    uint32_t consumed;
7055
0
    unsigned   curr_len;
7056
7057
0
    curr_offset = offset;
7058
0
    curr_len = len;
7059
7060
    /* Cell Identifier List Segment    3.2.2.27a   MSC-BSS M   4-? */
7061
0
    ELEM_OPT_TLV(BE_CELL_ID_LIST_SEG, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST_SEG, NULL);
7062
    /* Assignment Requirement  3.2.2.52    MSC-BSS O   2 */
7063
0
    ELEM_MAND_TV(BE_ASS_REQ, GSM_A_PDU_TYPE_BSSMAP, BE_ASS_REQ, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7064
7065
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7066
0
}
7067
/*
7068
 * 3.2.1.80 VGCS/VBS ASSIGNMENT STATUS
7069
 */
7070
static void
7071
bssmap_vgcs_vbs_assign_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7072
0
{
7073
0
    uint32_t curr_offset;
7074
0
    uint32_t consumed;
7075
0
    unsigned   curr_len;
7076
7077
0
    curr_offset = offset;
7078
0
    curr_len = len;
7079
7080
    /* Cell Identifier List Segment for established cells  3.2.2.27b   BSS-MSC O (note 1)  3-? */
7081
0
    ELEM_OPT_TLV(BE_CELL_ID_LST_SEG_F_EST_CELLS, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID_LST_SEG_F_EST_CELLS, NULL);
7082
    /* Cell Identifier List Segment for cells to be established    3.2.2.27c   BSS-MSC O (note 1)  3-? */
7083
0
    ELEM_OPT_TLV(BE_CELL_ID_LST_SEG_F_CELL_TB_EST, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID_LST_SEG_F_CELL_TB_EST, NULL);
7084
    /* Cell Identifier List Segment for released cells - no user present   3.2.2.27e   BSS-MSC O (note 1)  3-? */
7085
0
    ELEM_OPT_TLV(BE_CELL_ID_LST_SEG_F_REL_CELL, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID_LST_SEG_F_REL_CELL, NULL);
7086
    /* Cell Identifier List Segment for not established cells - no establishment possible  3.2.2.27f   BSS-MSC O (note 1)  3-? */
7087
0
    ELEM_OPT_TLV(BE_CELL_ID_LST_SEG_F_NOT_EST_CELL, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID_LST_SEG_F_NOT_EST_CELL, NULL);
7088
    /* VGCS/VBS Cell Status    3.2.2.94    BSS-MSC O (note 2)  3 */
7089
0
    ELEM_OPT_TLV(BE_VGS_VBS_CELL_STAT, GSM_A_PDU_TYPE_BSSMAP, BE_VGS_VBS_CELL_STAT, NULL);
7090
7091
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7092
0
}
7093
/*
7094
 * 3.2.1.81 VGCS SMS
7095
 */
7096
static void
7097
bssmap_vgcs_sms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7098
0
{
7099
0
    uint32_t curr_offset;
7100
0
    uint32_t consumed;
7101
0
    unsigned   curr_len;
7102
7103
0
    curr_offset = offset;
7104
0
    curr_len = len;
7105
7106
    /* SMS to VGCS  3.2.2.92    MSC-BSS M   2-250 */
7107
0
    ELEM_MAND_TLV(BE_SMS_TO_VGCS, GSM_A_PDU_TYPE_BSSMAP, BE_SMS_TO_VGCS, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7108
7109
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7110
0
}
7111
/*
7112
 * 3.2.1.82 NOTIFICATION DATA
7113
 */
7114
static void
7115
bssmap_notification_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7116
0
{
7117
0
    uint32_t curr_offset;
7118
0
    uint32_t consumed;
7119
0
    unsigned   curr_len;
7120
7121
0
    curr_offset = offset;
7122
0
    curr_len = len;
7123
7124
    /* Application Data 3.2.2.98    MSC-BSS M   11 */
7125
0
    ELEM_MAND_TLV(BE_APP_DATA_INF, GSM_A_PDU_TYPE_BSSMAP, BE_APP_DATA_INF, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7126
    /* Data Identity    3.2.2.99    MSC-BSS M   3 */
7127
0
    ELEM_MAND_TLV(BE_DATA_ID, GSM_A_PDU_TYPE_BSSMAP, BE_DATA_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7128
    /* MSISDN   3.2.2.101   MSC-BSS O   2-12 */
7129
0
    ELEM_MAND_TLV(BE_MSISDN, GSM_A_PDU_TYPE_BSSMAP, BE_MSISDN, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7130
7131
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7132
0
}
7133
/*
7134
 * 3.2.1.83 INTERNAL HANDOVER REQUIRED
7135
 */
7136
static void
7137
bssmap_int_ho_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7138
0
{
7139
0
    uint32_t curr_offset;
7140
0
    uint32_t consumed;
7141
0
    unsigned   curr_len;
7142
7143
0
    curr_offset = offset;
7144
0
    curr_len = len;
7145
7146
    /* Cause    3.2.2.5     BSS-MSC     M    3-4 */
7147
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7148
    /* Cell Identifier  3.2.2.17    BSS-MSC     M   4-10 */
7149
0
    ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7150
    /* AoIP Transport Layer Address (BSS)   3.2.2.nn    BSS-MSC C (Note 1)  10-22 */
7151
0
    ELEM_OPT_TLV(BE_AOIP_TRANS_LAY_ADD, GSM_A_PDU_TYPE_BSSMAP, BE_AOIP_TRANS_LAY_ADD, NULL);
7152
    /* Codec List (BSS Supported)   3.2.2.103    BSS-MSC M   3-n */
7153
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(BSS Supported)");
7154
7155
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7156
0
}
7157
/*
7158
 * 3.2.1.84 INTERNAL HANDOVER REQUIRED REJECT
7159
 */
7160
static void
7161
bssmap_int_ho_req_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7162
0
{
7163
0
    uint32_t curr_offset;
7164
0
    uint32_t consumed;
7165
0
    unsigned   curr_len;
7166
7167
0
    curr_offset = offset;
7168
0
    curr_len = len;
7169
7170
    /* Cause    3.2.2.5     MSC-BSS     M    3-4 */
7171
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7172
    /* Codec List (MSC Preferred)   3.2.2.nn    MSC-BSS O   3-n */
7173
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(BSS Supported)");
7174
7175
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7176
0
}
7177
7178
/*
7179
 * 3.2.1.85 INTERNAL HANDOVER COMMAND
7180
 */
7181
static void
7182
bssmap_int_ho_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7183
0
{
7184
0
    uint32_t curr_offset;
7185
0
    uint32_t consumed;
7186
0
    unsigned   curr_len;
7187
7188
0
    curr_offset = offset;
7189
0
    curr_len = len;
7190
7191
    /* Speech Codec (MSC Chosen)    3.2.2.nn    MSC-BSS M (note 1)  3-n */
7192
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC, "(Chosen)");
7193
    /* Circuit Identity Code    3.2.2.2     MSC-BSS     C (note 2)  3 */
7194
0
    ELEM_OPT_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL);
7195
    /* AoIP Transport Layer Address (MGW)   3.2.2.102    MSC-BSS C (note 2)  10-22 */
7196
0
    ELEM_OPT_TLV(BE_AOIP_TRANS_LAY_ADD, GSM_A_PDU_TYPE_BSSMAP, BE_AOIP_TRANS_LAY_ADD, NULL);
7197
    /* Call Identifier  3.2.2.105   MSC-BSS C (note 4) 5 */
7198
0
    ELEM_OPT_TV(BE_CALL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CALL_ID, NULL);
7199
    /* Downlink DTX Flag  3.2.2.26   MSC-BSS O (note 5) 2 */
7200
0
    ELEM_OPT_TV(BE_DOWN_DTX_FLAG, GSM_A_PDU_TYPE_BSSMAP, BE_DOWN_DTX_FLAG, NULL);
7201
    /* LCLS-Connection-Status-Control    3.2.2.117    MSC-BSS    O (note 6)    2 */
7202
0
    ELEM_OPT_TV(BE_LCLS_CON_STATUS_CONTROL, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_CON_STATUS_CONTROL, NULL);
7203
7204
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7205
0
}
7206
/*
7207
 * 3.2.1.86 INTERNAL HANDOVER ENQUIRY
7208
 */
7209
7210
static void
7211
bssmap_int_ho_enq(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7212
0
{
7213
0
    uint32_t curr_offset;
7214
0
    uint32_t consumed;
7215
0
    unsigned   curr_len;
7216
7217
0
    curr_offset = offset;
7218
0
    curr_len = len;
7219
7220
    /* Speech Codec (MSC Chosen)    3.2.2.104   MSC-BSS M   3-n */
7221
0
    ELEM_OPT_TLV(BE_SPEECH_CODEC, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC, "(Chosen)");
7222
7223
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7224
0
}
7225
/*
7226
 * 3.2.1.87 RESET IP RESOURCE
7227
 */
7228
static void
7229
bssmap_reset_ip_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7230
0
{
7231
0
    uint32_t curr_offset;
7232
0
    uint32_t consumed;
7233
0
    unsigned   curr_len;
7234
7235
0
    curr_offset = offset;
7236
0
    curr_len = len;
7237
7238
    /* Cause    3.2.2.5 Both    M   3-4 */
7239
0
    ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7240
    /* Call Identifier List 3.2.2.106   Both    M   6-n */
7241
0
    ELEM_OPT_TLV(BE_CALL_ID_LST, GSM_A_PDU_TYPE_BSSMAP, BE_CALL_ID_LST, NULL);
7242
7243
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7244
0
}
7245
/*
7246
 * 3.2.1.88 RESET IP RESOURCE ACKNOWLEDGE
7247
 */
7248
static void
7249
bssmap_reset_ip_res_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7250
0
{
7251
0
    uint32_t curr_offset;
7252
0
    uint32_t consumed;
7253
0
    unsigned   curr_len;
7254
7255
0
    curr_offset = offset;
7256
0
    curr_len = len;
7257
7258
    /* Call Identifier List 3.2.2.106   Both    M   6-n */
7259
0
    ELEM_OPT_TLV(BE_CALL_ID_LST, GSM_A_PDU_TYPE_BSSMAP, BE_CALL_ID_LST, NULL);
7260
7261
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7262
0
}
7263
7264
/*
7265
 * 3.2.1.89 REROUTE COMMAND
7266
 */
7267
static void
7268
bssmap_reroute_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7269
0
{
7270
0
    uint32_t curr_offset;
7271
0
    uint32_t consumed;
7272
0
    unsigned   curr_len;
7273
7274
0
    curr_offset = offset;
7275
0
    curr_len = len;
7276
7277
    /* Initial Layer 3 Information 3.2.2.24 MSC-BSS M (note 1) 3-n */
7278
0
    ELEM_MAND_TLV(BE_L3_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_L3_INFO, " (Initial)", ei_gsm_a_bssmap_missing_mandatory_element);
7279
    /* Reroute Reject Cause 3.2.2.112 MSC-BSS M (note 2) 2 */
7280
0
    ELEM_MAND_TV(BE_REROUTE_REJ_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_REROUTE_REJ_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7281
    /* Layer 3 Information 3.2.2.24 MSC-BSS O (note3) 3-n */
7282
0
    ELEM_OPT_TLV(BE_L3_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_L3_INFO, NULL);
7283
    /* Send Sequence Number 3.2.2.113 MSC-BSS O (note 4) 2 */
7284
0
    ELEM_OPT_TV(BE_SEND_SEQN, GSM_A_PDU_TYPE_BSSMAP, BE_SEND_SEQN, NULL);
7285
    /* IMSI 3.2.2.6 MSC-BSS O (note 5) 3-10 */
7286
0
    ELEM_OPT_TLV(BE_IMSI, GSM_A_PDU_TYPE_BSSMAP, BE_IMSI, NULL);
7287
    /* Old Location Area Identification    3.2.2.128    MSC-BSS    O (note 6)    6 */
7288
7289
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7290
0
}
7291
7292
/*
7293
 * 3.2.1.90 REROUTE COMPLETE
7294
 */
7295
7296
static void
7297
bssmap_reroute_complete(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7298
0
{
7299
0
    uint32_t curr_offset;
7300
0
    uint32_t consumed;
7301
0
    unsigned   curr_len;
7302
7303
0
    curr_offset = offset;
7304
0
    curr_len = len;
7305
7306
    /* Reroute complete outcome 3.2.2.114 MSC-BSS M 2 */
7307
0
    ELEM_MAND_TV(BE_REROUTE_OUTCOME, GSM_A_PDU_TYPE_BSSMAP, BE_REROUTE_OUTCOME, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7308
7309
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7310
0
}
7311
7312
/*
7313
 * 3.2.1.91 LCLS-CONNECT-CONTROL
7314
 */
7315
static void
7316
bssmap_lcls_conn_ctrl(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7317
0
{
7318
0
    uint32_t curr_offset;
7319
0
    uint32_t consumed;
7320
0
    unsigned   curr_len;
7321
7322
0
    curr_offset = offset;
7323
0
    curr_len = len;
7324
7325
7326
    /* LCLS-Configuration 3.2.2.116 MSC-BSS O (note1) 2 */
7327
0
    ELEM_OPT_TV(BE_LCLS_CONF, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_CONF, NULL);
7328
    /* LCLS-Connection-Status-Control 3.2.2.117 MSC-BSS O (note1) 2 */
7329
0
    ELEM_OPT_TV(BE_LCLS_CON_STATUS_CONTROL, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_CON_STATUS_CONTROL, NULL);
7330
7331
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7332
0
}
7333
7334
/*
7335
 * 3.2.1.92 LCLS-CONNECT-CONTROL-ACK
7336
 */
7337
static void
7338
bssmap_lcls_conn_ctrl_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7339
0
{
7340
0
    uint32_t curr_offset;
7341
0
    uint32_t consumed;
7342
0
    unsigned   curr_len;
7343
7344
0
    curr_offset = offset;
7345
0
    curr_len = len;
7346
7347
    /* LCLS-BSS-Status 3.2.2.119 BSS-MSC M 2 */
7348
0
    ELEM_OPT_TV(BE_LCLS_BSS_STATUS, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_BSS_STATUS, NULL);
7349
7350
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7351
0
}
7352
/*
7353
 *
7354
 * 3.2.1.93 LCLS-NOTIFICATION
7355
 */
7356
static void
7357
bssmap_lcls_notif(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7358
0
{
7359
0
    uint32_t curr_offset;
7360
0
    uint32_t consumed;
7361
0
    unsigned   curr_len;
7362
7363
0
    curr_offset = offset;
7364
0
    curr_len = len;
7365
7366
    /* LCLS-BSS-Status 3.2.2.119 BSS-MSC O (note 1) 2 */
7367
0
    ELEM_OPT_TV(BE_LCLS_BSS_STATUS, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_BSS_STATUS, NULL);
7368
    /* LCLS-Break-Request 3.2.2.120 BSS-MSC O (note 1) 1 */
7369
0
    ELEM_OPT_T(BE_LCLS_BREAK_REQ, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_BREAK_REQ, NULL);
7370
7371
0
    EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7372
0
}
7373
7374
#if 0
7375
/*
7376
 * 3.2.1.94     MS REGISTRATION ENQUIRY
7377
 */
7378
    /* IMSI    3.2.2.6    BSS-MSC    M    3-10 */
7379
/*
7380
 * 3.2.1.95     MS REGISTRATION ENQUIRY RESPONSE
7381
 */
7382
    /* IMSI    3.2.2.6    MSC-BSS    M    3-10 */
7383
    /* CS Registered Operator    3.2.2.132    MSC-BSS    O (note 1)    4 */
7384
7385
7386
#endif
7387
1.72k
#define NUM_GSM_BSSMAP_MSG (int)array_length(gsm_a_bssmap_msg_strings)
7388
static int ett_gsm_bssmap_msg[NUM_GSM_BSSMAP_MSG];
7389
7390
static void (*bssmap_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len) = {
7391
    bssmap_ass_req,                     /* Assignment Request */
7392
    bssmap_ass_complete,                /* Assignment Complete */
7393
    bssmap_ass_failure,                 /* Assignment Failure */
7394
    bssmap_vgcs_vbs_setup,              /* VGCS/VBS Setup */
7395
    bssmap_vgcs_vbs_setup_ack,          /* VGCS/VBS Setup Ack */
7396
    bssmap_vgcs_vbs_setup_refuse,       /* VGCS/VBS Setup Refuse */
7397
    bssmap_vgcs_vbs_ass_req,            /* VGCS/VBS Assignment Request */
7398
    bssmap_chan_mod_req,                /* 0x08 Channel Modify request */
7399
    NULL,                               /* Unallocated */
7400
    NULL,                               /* Unallocated */
7401
    NULL,                               /* Unallocated */
7402
    NULL,                               /* Unallocated */
7403
    NULL,                               /* Unallocated */
7404
    NULL,                               /* Unallocated */
7405
    NULL,                               /* Unallocated */
7406
    bssmap_ho_req,                      /* 0x10 Handover Request */
7407
    bssmap_ho_reqd,                     /* Handover Required */
7408
    bssmap_ho_req_ack,                  /* Handover Request Acknowledge */
7409
    bssmap_ho_cmd,                      /* Handover Command */
7410
    bssmap_ho_complete,                 /* Handover Complete */
7411
    bssmap_ho_succ,                     /* Handover Succeeded */
7412
    bssmap_ho_failure,                  /* Handover Failure */
7413
    bssmap_ho_performed,                /* Handover Performed */
7414
    bssmap_ho_cand_enq,                 /* Handover Candidate Enquire */
7415
    bssmap_ho_cand_resp,                /* Handover Candidate Response */
7416
    bssmap_ho_reqd_rej,                 /* Handover Required Reject */
7417
    bssmap_ho_det,                      /* 0x1b Handover Detect */
7418
    bssmap_vgcs_vbs_ass_res,            /* 0x1c VGCS/VBS Assignment Result */
7419
    bssmap_vgcs_vbs_ass_fail,           /* 0x1d VGCS/VBS Assignment Failure */
7420
    NULL,                               /* 0x1e No dsta VGCS/VBS Queuing Indication */
7421
    bssmap_uplink_req,                  /* 0x1f Uplink Request */
7422
7423
    bssmap_clear_cmd,                   /* 0x20 Clear Command */
7424
    NULL /* no associated data */,      /* Clear Complete */
7425
    bssmap_clear_req,                   /* Clear Request */
7426
    NULL,                               /* Reserved */
7427
    NULL,                               /* Reserved */
7428
    bssmap_sapi_rej,                    /* SAPI 'n' Reject */
7429
    bssmap_confusion,                   /* Confusion */
7430
    bssmap_uplink_req_ack,              /* Uplink Request Acknowledge */
7431
    bssmap_sus,                         /* Suspend */
7432
    bssmap_res,                         /* Resume */
7433
    bssmap_conn_oriented,               /* Connection Oriented Information */
7434
    bssmap_perf_loc_req,                /* Perform Location Request */
7435
    bssmap_lsa_info,                    /* LSA Information */
7436
    bssmap_perf_loc_res,                /* Perform Location Response */
7437
    bssmap_perf_loc_abort,              /* Perform Location Abort */
7438
    bssmap_common_id,                   /* Common Id */
7439
    bssmap_reset,                       /* Reset */
7440
    bssmap_reset_ack,                   /* Reset Acknowledge */
7441
    bssmap_overload,                    /* Overload */
7442
    NULL,                               /* Reserved */
7443
    bssmap_reset_cct,                   /* Reset Circuit */
7444
    bssmap_reset_cct_ack,               /* Reset Circuit Acknowledge */
7445
    bssmap_msc_invoke_trace,            /* MSC Invoke Trace */
7446
    bssmap_bss_invoke_trace,            /* 0x37 BSS Invoke Trace */
7447
7448
    NULL,                               /* 0x38 unallocated */
7449
    NULL,                               /* 0x39 unallocated */
7450
7451
    NULL,                               /* 0x3a Connectionless Information */
7452
    bssmap_vgcs_vbs_assign_status,      /* 0x3b VGCS/VBS ASSIGNMENT STATUS */
7453
    bssmap_vgcs_vbs_area_cell_info,     /* 0x3c VGCS/VBS AREA CELL INFO */
7454
    bssmap_reset_ip_res,                /* 0x3d 3.2.1.87 RESET IP RESOURCE */
7455
    bssmap_reset_ip_res_ack,            /* 0x3e 3.2.1.88 RESET IP RESOURCE ACKNOWLEDGE */
7456
    NULL,                               /* 0x3f VGCS/VBS AREA CELL INFO */
7457
    bssmap_block,                       /* Block */
7458
    bssmap_block_ack,                   /* Blocking Acknowledge */
7459
    bssmap_unblock,                     /* Unblock */
7460
    bssmap_unblock_ack,                 /* Unblocking Acknowledge */
7461
    bssmap_cct_group_block,             /* Circuit Group Block */
7462
    bssmap_cct_group_block_ack,         /* Circuit Group Blocking Acknowledge */
7463
    bssmap_cct_group_unblock,           /* Circuit Group Unblock */
7464
    bssmap_cct_group_unblock_ack,       /* Circuit Group Unblocking Acknowledge */
7465
    bssmap_unequipped_cct,              /* Unequipped Circuit */
7466
    bssmap_uplink_req_conf,             /* Uplink Request Confirmation */
7467
    bssmap_uplink_rel_ind,              /* Uplink Release Indication */
7468
    bssmap_uplink_rej_cmd,              /* Uplink Reject Command */
7469
    bssmap_uplink_rel_cmd,              /* Uplink Release Command */
7470
    bssmap_uplink_seized_cmd,           /* Uplink Seized Command */
7471
    bssmap_change_cct,                  /* Change Circuit */
7472
    bssmap_change_cct_ack,              /* Change Circuit Acknowledge */
7473
    bssmap_res_req,                     /* Resource Request */
7474
    bssmap_res_ind,                     /* Resource Indication */
7475
    bssmap_paging,                      /* Paging */
7476
    bssmap_ciph_mode_cmd,               /* Cipher Mode Command */
7477
    bssmap_cm_upd,                      /* Classmark Update */
7478
    bssmap_ciph_mode_complete,          /* Cipher Mode Complete */
7479
    NULL /* no associated data */,      /* Queuing Indication */
7480
    bssmap_cl3_info,                    /* Complete Layer 3 Information */
7481
    bssmap_cls_m_req /* no associated data */,  /* Classmark Request */
7482
    bssmap_ciph_mode_rej,               /* Cipher Mode Reject */
7483
    bssmap_load_ind,                    /* 0x5a Load Indication */
7484
7485
    NULL,                               /* 0x5b unallocated */
7486
    NULL,                               /* 0x5c unallocated */
7487
    NULL,                               /* 0x5d unallocated */
7488
    NULL,                               /* 0x5e unallocated */
7489
    NULL,                               /* 0x5f unallocated */
7490
7491
    bssmap_vgcs_add_inf,                /* 0x60 VGCS Additional Information */
7492
    bssmap_vgcs_sms,                    /* 0x61 VGCS SMS */
7493
    bssmap_notification_data,           /* 0x62 Notification Data*/
7494
    bssmap_uplink_app_data,             /* 0x63 Uplink Application Data */
7495
7496
    NULL,                               /* 0x64 unallocated */
7497
    NULL,                               /* 0x65 unallocated */
7498
    NULL,                               /* 0x66 unallocated */
7499
    NULL,                               /* 0x67 unallocated */
7500
    NULL,                               /* 0x68 unallocated */
7501
    NULL,                               /* 0x69 unallocated */
7502
    NULL,                               /* 0x6a unallocated */
7503
    NULL,                               /* 0x6b unallocated */
7504
    NULL,                               /* 0x6c unallocated */
7505
    NULL,                               /* 0x6d unallocated */
7506
    NULL,                               /* 0x6e unallocated */
7507
    NULL,                               /* 0x6f unallocated */
7508
7509
    bssmap_int_ho_req,                  /* 0x70 Internal Handover Required */
7510
    bssmap_int_ho_req_rej,              /* 0x71 Internal Handover Required Reject */
7511
    bssmap_int_ho_cmd,                  /* 0x72 Internal Handover Command */
7512
    bssmap_int_ho_enq,                  /* 0x73 Internal Handover Enquiry */
7513
7514
    bssmap_lcls_conn_ctrl,              /* 0x74 LCLS-Connect-Control */
7515
    bssmap_lcls_conn_ctrl_ack,          /* 0x75 LCLS-Connect-Control-Ack */
7516
    bssmap_lcls_notif,                  /* 0x76 LCLS-Notification */
7517
    NULL,                               /* 0x77 Unallocated */
7518
    bssmap_reroute_cmd,                 /* 0x78 Reroute Command */
7519
    bssmap_reroute_complete,            /* 0x79 Reroute Complete */
7520
7521
    NULL,   /* NONE */
7522
};
7523
0
#define NUM_BSSMAP_MSG_FCNS     (int)array_length(bssmap_msg_fcn)
7524
7525
static int
7526
dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
7527
0
{
7528
0
    static gsm_a_tap_rec_t  tap_rec[4];
7529
0
    static gsm_a_tap_rec_t  *tap_p;
7530
0
    static unsigned   tap_current = 0;
7531
0
    uint8_t           oct;
7532
0
    uint32_t          offset, saved_offset;
7533
0
    uint32_t          len;
7534
0
    int               idx;
7535
0
    proto_item       *bssmap_item = NULL;
7536
0
    proto_tree       *bssmap_tree = NULL;
7537
0
    const char       *str;
7538
0
    sccp_msg_info_t*  sccp_msg_p = (sccp_msg_info_t*)data;
7539
7540
0
    if (!(sccp_msg_p && sccp_msg_p->data.co.assoc)) {
7541
0
        sccp_msg_p = NULL;
7542
0
    }
7543
7544
0
    col_append_str(pinfo->cinfo, COL_INFO, "(BSSMAP) ");
7545
7546
    /*
7547
     * set tap record pointer
7548
     */
7549
0
    tap_current++;
7550
0
    if (tap_current >= 4)
7551
0
    {
7552
0
        tap_current = 0;
7553
0
    }
7554
0
    tap_p = &tap_rec[tap_current];
7555
7556
7557
0
    offset = 0;
7558
0
    saved_offset = offset;
7559
7560
0
    g_tree = tree;
7561
7562
0
    len = tvb_reported_length(tvb);
7563
7564
    /*
7565
     * add BSSMAP message name
7566
     */
7567
0
    oct = tvb_get_uint8(tvb, offset++);
7568
7569
0
    str = try_val_to_str_idx_ext((uint32_t) oct, &gsm_a_bssmap_msg_strings_ext, &idx);
7570
7571
0
    if (sccp_msg_p && !sccp_msg_p->data.co.label) {
7572
0
        sccp_msg_p->data.co.label = wmem_strdup(wmem_file_scope(),
7573
0
                                                val_to_str_ext((uint32_t)oct,
7574
0
                                                &gsm_a_bssmap_msg_strings_ext,
7575
0
                                                "BSSMAP (0x%02x)"));
7576
0
    }
7577
7578
    /*
7579
     * create the protocol tree
7580
     */
7581
    /* The first two conditions are actually the same, i.e. if str != NULL,
7582
     * idx >= 0, but checking idx makes it obvious we won' t use a potentially
7583
     * negative idx in the else case.
7584
     */
7585
0
    if (str == NULL || idx < 0 || idx >= NUM_GSM_BSSMAP_MSG)
7586
0
    {
7587
0
        bssmap_item =
7588
0
        proto_tree_add_protocol_format(tree, proto_a_bssmap, tvb, 0, len,
7589
0
            "GSM A-I/F BSSMAP - Unknown BSSMAP Message Type (0x%02x)",
7590
0
            oct);
7591
7592
0
        bssmap_tree = proto_item_add_subtree(bssmap_item, ett_bssmap_msg);
7593
0
    }
7594
0
    else
7595
0
    {
7596
0
        bssmap_item =
7597
0
        proto_tree_add_protocol_format(tree, proto_a_bssmap, tvb, 0, -1,
7598
0
            "GSM A-I/F BSSMAP - %s",
7599
0
            str);
7600
7601
0
        bssmap_tree = proto_item_add_subtree(bssmap_item, ett_gsm_bssmap_msg[idx]);
7602
7603
0
        col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", str);
7604
7605
        /*
7606
         * add BSSMAP message name
7607
         */
7608
0
        proto_tree_add_uint_format(bssmap_tree, hf_gsm_a_bssmap_msg_type,
7609
0
        tvb, saved_offset, 1, oct, "Message Type %s",str);
7610
0
    }
7611
7612
0
    tap_p->pdu_type = GSM_A_PDU_TYPE_BSSMAP;
7613
0
    tap_p->message_type = oct;
7614
7615
0
    tap_queue_packet(gsm_a_tap, pinfo, tap_p);
7616
7617
0
    if (str == NULL) return len;
7618
7619
0
    if ((len - offset) <= 0) return len;
7620
7621
    /*
7622
     * decode elements
7623
     */
7624
0
    if (idx < 0 || idx >= NUM_BSSMAP_MSG_FCNS || bssmap_msg_fcn[idx] == NULL) {
7625
0
        proto_tree_add_bytes_format(bssmap_tree, hf_gsm_a_bssmap_message_elements,
7626
0
            tvb, offset, len - offset, NULL, "Message Elements");
7627
0
    }else{
7628
0
        if (sccp_msg_p && ((sccp_msg_p->data.co.assoc->app_info & 0xCD00) == 0xCD00)) {
7629
0
            cell_discriminator = sccp_msg_p->data.co.assoc->app_info & 0xFF;
7630
0
        }else{
7631
0
            cell_discriminator = 0xFF;
7632
0
        }
7633
0
        (*bssmap_msg_fcn[idx])(tvb, bssmap_tree, pinfo, offset, len - offset);
7634
0
        if (sccp_msg_p) {
7635
0
            sccp_msg_p->data.co.assoc->app_info = cell_discriminator | 0xCDF0;
7636
0
        }
7637
0
    }
7638
0
    g_tree = NULL;
7639
0
    return len;
7640
0
}
7641
7642
/* Register the protocol with Wireshark */
7643
void
7644
proto_register_gsm_a_bssmap(void)
7645
14
{
7646
14
    unsigned    i;
7647
14
    unsigned    last_offset;
7648
7649
    /* Setup list of header fields */
7650
7651
14
    static hf_register_info hf[] =
7652
14
    {
7653
14
    { &hf_gsm_a_bssmap_msg_type,
7654
14
        { "BSSMAP Message Type",    "gsm_a.bssmap.msgtype",
7655
14
        FT_UINT8, BASE_HEX|BASE_EXT_STRING, &gsm_a_bssmap_msg_strings_ext, 0x0,
7656
14
        NULL, HFILL }
7657
14
    },
7658
14
    { &hf_gsm_a_bssmap_elem_id,
7659
14
        { "Element ID", "gsm_a.bssmap.elem_id",
7660
14
        FT_UINT8, BASE_HEX, NULL, 0,
7661
14
        NULL, HFILL }
7662
14
    },
7663
14
    { &hf_gsm_a_bssmap_field_elem_id,
7664
14
        { "Field Element ID",   "gsm_a.bssmap.field_elem_id",
7665
14
        FT_UINT8, BASE_HEX, VALS(bssmap_field_element_ids), 0,
7666
14
        NULL, HFILL }
7667
14
    },
7668
14
    { &hf_gsm_a_bssmap_field_elem_id_len,
7669
14
    { "Length",   "gsm_a.bssmap.field_elem_id_len",
7670
14
        FT_UINT8, BASE_DEC, NULL, 0,
7671
14
        NULL, HFILL }
7672
14
    },
7673
14
    { &hf_gsm_a_bssmap_cell_ci,
7674
14
        { "Cell CI",    "gsm_a.bssmap.cell_ci",
7675
14
        FT_UINT16, BASE_HEX_DEC, 0, 0x0,
7676
14
        NULL, HFILL }
7677
14
    },
7678
14
    { &hf_gsm_a_bssmap_cell_lac,
7679
14
        { "Cell LAC",   "gsm_a.bssmap.cell_lac",
7680
14
        FT_UINT16, BASE_HEX_DEC, 0, 0x0,
7681
14
        NULL, HFILL }
7682
14
    },
7683
14
    { &hf_gsm_a_bssmap_sac,
7684
14
        { "SAC",    "gsm_a.bssmap.sac",
7685
14
        FT_UINT16, BASE_HEX, 0, 0x0,
7686
14
        NULL, HFILL }
7687
14
    },
7688
14
    { &hf_gsm_a_bssmap_dlci_cc,
7689
14
        { "Control Channel", "gsm_a.bssmap.dlci.cc",
7690
14
        FT_UINT8, BASE_HEX, VALS(bssap_cc_values), 0xc0,
7691
14
        NULL, HFILL}
7692
14
    },
7693
14
    { &hf_gsm_a_bssmap_dlci_spare,
7694
14
        { "Spare", "gsm_a.bssmap.dlci.spare",
7695
14
        FT_UINT8, BASE_HEX, NULL, 0x38,
7696
14
        NULL, HFILL}
7697
14
    },
7698
14
    { &hf_gsm_a_bssmap_dlci_sapi,
7699
14
        { "SAPI", "gsm_a.bssmap.dlci.sapi",
7700
14
        FT_UINT8, BASE_HEX, VALS(bssap_sapi_values), 0x07,
7701
14
        NULL, HFILL}
7702
14
    },
7703
14
    { &hf_gsm_a_bssmap_cause,
7704
14
        { "BSSMAP Cause",   "gsm_a.bssmap.cause",
7705
14
        FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(gsm_a_bssap_cause_rvals), 0x7F,
7706
14
        NULL, HFILL }
7707
14
    },
7708
14
    { &hf_gsm_a_bssmap_be_cell_id_disc,
7709
14
        { "Cell identification discriminator","gsm_a.bssmap.be.cell_id_disc",
7710
14
        FT_UINT8,BASE_DEC|BASE_EXT_STRING,  &gsm_a_be_cell_id_disc_vals_ext, 0x0f,
7711
14
        NULL, HFILL }
7712
14
    },
7713
14
        { &hf_gsm_a_bssmap_pci,
7714
14
        { "Preemption Capability indicator(PCI)","gsm_a.bssmap.pci",
7715
14
        FT_BOOLEAN,8, TFS(&bssmap_pci_value), 0x40,
7716
14
        NULL, HFILL }
7717
14
    },
7718
14
        { &hf_gsm_a_bssmap_qa,
7719
14
        { "Queuing Allowed Indicator(QA)","gsm_a.bssmap.qa",
7720
14
        FT_BOOLEAN,8, TFS(&tfs_allowed_not_allowed), 0x02,
7721
14
        NULL, HFILL }
7722
14
    },
7723
14
        { &hf_gsm_a_bssmap_pvi,
7724
14
        { "Preemption Vulnerability Indicator(PVI)","gsm_a.bssmap.pvi",
7725
14
        FT_BOOLEAN,8, TFS(&bssmap_pvi_value), 0x01,
7726
14
        NULL, HFILL }
7727
14
    },
7728
14
        { &hf_gsm_a_bssmap_interference_bands,
7729
14
        { "Acceptable interference bands","gsm_a.bssmap.interference_bands",
7730
14
        FT_UINT8, BASE_HEX, NULL, 0x1f,
7731
14
        NULL, HFILL }
7732
14
    },
7733
14
    { &hf_gsm_a_bssmap_lsa_only,
7734
14
        { "LSA only","gsm_a.bssmap.lsa_only",
7735
14
        FT_BOOLEAN,8, TFS(&bssmap_lsa_only_value), 0x01,
7736
14
        NULL, HFILL }
7737
14
    },
7738
14
    { &hf_gsm_a_bssmap_act,
7739
14
        { "Active mode support","gsm_a.bssmap.act",
7740
14
        FT_BOOLEAN,8, NULL, 0x20,
7741
14
        NULL, HFILL }
7742
14
    },
7743
14
    { &hf_gsm_a_bssmap_pref,
7744
14
        { "Preferential access","gsm_a.bssmap.pref",
7745
14
        FT_BOOLEAN,8, NULL, 0x10,
7746
14
        NULL, HFILL }
7747
14
    },
7748
14
    { &hf_gsm_a_bssmap_lsa_inf_prio,
7749
14
        { "Priority","gsm_a.bssmap.lsa_inf_prio",
7750
14
        FT_UINT8,BASE_DEC, NULL, 0x0f,
7751
14
        NULL, HFILL }
7752
14
    },
7753
14
    { &hf_gsm_a_bssmap_seq_len,
7754
14
        { "Sequence Length","gsm_a.bssmap.seq_len",
7755
14
        FT_UINT8,BASE_DEC, NULL, 0xf0,
7756
14
        NULL, HFILL }
7757
14
    },
7758
14
    { &hf_gsm_a_bssmap_seq_no,
7759
14
        { "Sequence Number","gsm_a.bssmap.seq_no",
7760
14
        FT_UINT8,BASE_DEC, NULL, 0xf,
7761
14
        NULL, HFILL }
7762
14
    },
7763
14
    { &hf_gsm_a_bssap_cell_id_list_seg_cell_id_disc,
7764
14
        { "Cell identification discriminator","gsm_a.bssmap.cell_id_list_seg_cell_id_disc",
7765
14
        FT_UINT8,BASE_DEC, VALS(gsm_a_bssap_cell_id_list_seg_cell_id_disc_vals), 0xf,
7766
14
        NULL, HFILL }
7767
14
    },
7768
14
    { &hf_gsm_a_bssap_res_ind_method,
7769
14
        { "Resource indication method","gsm_a.bssmap.res_ind_method",
7770
14
        FT_UINT8,BASE_DEC, VALS(gsm_a_bssap_resource_indication_vals), 0xf,
7771
14
        NULL, HFILL }
7772
14
    },
7773
14
    { &hf_gsm_a_bssap_cic_list_range,
7774
14
        { "Range","gsm_a.bssmap.cic_list_range",
7775
14
        FT_UINT8, BASE_DEC, NULL, 0,
7776
14
        NULL, HFILL }
7777
14
    },
7778
14
    { &hf_gsm_a_bssap_cic_list_status,
7779
14
        { "Status","gsm_a.bssmap.cic_list_status",
7780
14
        FT_BYTES, BASE_NONE, NULL, 0,
7781
14
        NULL, HFILL }
7782
14
    },
7783
14
    { &hf_gsm_a_bssap_diag_error_pointer,
7784
14
        { "Error pointer","gsm_a.bssmap.diag_error_pointer",
7785
14
        FT_UINT16, BASE_HEX, NULL, 0,
7786
14
        NULL, HFILL }
7787
14
    },
7788
14
    { &hf_gsm_a_bssap_diag_msg_rcv,
7789
14
        { "Message received","gsm_a.bssmap.diag_msg_rcv",
7790
14
        FT_BYTES, BASE_NONE, NULL, 0,
7791
14
        NULL, HFILL }
7792
14
    },
7793
14
    { &hf_gsm_a_bssmap_ch_mode,
7794
14
        { "Channel mode","gsm_a.bssmap.cch_mode",
7795
14
        FT_UINT8,BASE_DEC,  VALS(gsm_a_bssmap_ch_mode_vals), 0xf0,
7796
14
        NULL, HFILL }
7797
14
    },
7798
14
    { &hf_gsm_a_bssmap_cur_ch_mode,
7799
14
    { "Channel Mode", "gsm_a.bssmap.fe_cur_chan_type2.chan_mode",
7800
14
        FT_UINT8, BASE_HEX, VALS(chan_mode_vals), 0xf0,
7801
14
        NULL, HFILL }
7802
14
    },
7803
14
    { &hf_gsm_a_bssmap_channel,
7804
14
        { "Channel","gsm_a.bssmap.channel",
7805
14
        FT_UINT8,BASE_DEC,  VALS(gsm_a_bssmap_channel_vals), 0x0f,
7806
14
        NULL, HFILL }
7807
14
    },
7808
14
    { &hf_gsm_a_bssmap_trace_trigger_id,
7809
14
        { "Priority Indication","gsm_a.bssmap.trace_trigger_id",
7810
14
        FT_STRING, BASE_NONE, NULL, 0x0,
7811
14
        NULL, HFILL }
7812
14
    },
7813
14
    { &hf_gsm_a_bssmap_trace_priority_indication,
7814
14
        { "Priority Indication","gsm_a.bssmap.trace_priority_indication",
7815
14
        FT_UINT8,BASE_DEC,  NULL, 0x00,
7816
14
        NULL, HFILL }
7817
14
    },
7818
14
    { &hf_gsm_a_bssmap_trace_bss_record_type,
7819
14
        { "BSS Record Type","gsm_a.bssmap.bss_record__type",
7820
14
        FT_UINT8,BASE_DEC,  VALS(gsm_a_bssmap_trace_bss_record_type_vals), 0x00,
7821
14
        NULL, HFILL }
7822
14
    },
7823
14
    { &hf_gsm_a_bssmap_trace_msc_record_type,
7824
14
        { "MSC Record Type","gsm_a.bssmap.msc_record_type",
7825
14
        FT_UINT8,BASE_DEC,  VALS(gsm_a_bssmap_trace_msc_record_type_vals), 0x00,
7826
14
        NULL, HFILL }
7827
14
    },
7828
14
    { &hf_gsm_a_bssmap_trace_invoking_event,
7829
14
        { "Invoking Event","gsm_a.bssmap.trace_invoking_event",
7830
14
        FT_UINT8,BASE_DEC,  VALS(gsm_a_bssmap_trace_invoking_event_vals), 0x0,
7831
14
        NULL, HFILL }
7832
14
    },
7833
14
    { &hf_gsm_a_bssmap_trace_reference,
7834
14
        { "Trace Reference","gsm_a.bssmap.trace_id",
7835
14
        FT_UINT16,BASE_DEC,  NULL, 0x0,
7836
14
        NULL, HFILL }
7837
14
    },
7838
14
    { &hf_gsm_a_bssmap_trace_omc_id,
7839
14
        { "OMC ID","gsm_a.bssmap.trace_omc_id",
7840
14
        FT_STRING, BASE_NONE, NULL, 0x0,
7841
14
        NULL, HFILL }
7842
14
    },
7843
14
    { &hf_gsm_a_bssmap_be_rnc_id,
7844
14
        { "RNC-ID","gsm_a.bssmap.be.rnc_id",
7845
14
        FT_UINT16,BASE_DEC,  NULL, 0x0,
7846
14
        NULL, HFILL }
7847
14
    },
7848
14
    { &hf_gsm_a_bssmap_apdu_protocol_id,
7849
14
        { "Protocol ID", "gsm_a.bssmap.apdu_protocol_id",
7850
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_apdu_protocol_id_strings), 0x0,
7851
14
        "APDU embedded protocol id", HFILL }
7852
14
    },
7853
14
    { &hf_gsm_a_bssmap_periodicity,
7854
14
        { "Periodicity", "gsm_a.bssmap.periodicity",
7855
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
7856
14
        NULL, HFILL }
7857
14
    },
7858
14
    { &hf_gsm_a_bssmap_sm,
7859
14
        { "Subsequent Mode","gsm_a.bssmap.sm",
7860
14
        FT_BOOLEAN,8, NULL, 0x02,
7861
14
        NULL, HFILL }
7862
14
    },
7863
14
    { &hf_gsm_a_bssmap_tarr,
7864
14
        { "Total Accessible Resource Requested","gsm_a.bssmap.tarr",
7865
14
        FT_BOOLEAN,8, NULL, 0x01,
7866
14
        NULL, HFILL }
7867
14
    },
7868
14
    { &hf_gsm_a_bssmap_tot_no_of_fullr_ch,
7869
14
        { "Total number of accessible full rate channels", "gsm_a.bssmap.tot_no_of_fullr_ch",
7870
14
        FT_UINT16, BASE_DEC, NULL, 0x0,
7871
14
        NULL, HFILL }
7872
14
    },
7873
14
    { &hf_gsm_a_bssmap_tot_no_of_hr_ch,
7874
14
        { "Total number of accessible half rate channels", "gsm_a.bssmap.tot_no_of_hr_ch",
7875
14
        FT_UINT16, BASE_DEC, NULL, 0x0,
7876
14
        NULL, HFILL }
7877
14
    },
7878
14
    { &hf_gsm_a_bssmap_lsa_id,
7879
14
        { "Identification of Localised Service Area", "gsm_a.bssmap.lsa_id",
7880
14
        FT_UINT24, BASE_HEX, NULL, 0x0,
7881
14
        NULL, HFILL }
7882
14
    },
7883
14
    { &hf_gsm_a_bssmap_ep,
7884
14
        { "EP", "gsm_a.bssmap.ep",
7885
14
        FT_UINT8, BASE_DEC, NULL, 0x01,
7886
14
        NULL, HFILL }
7887
14
    },
7888
14
    { &hf_gsm_a_bssmap_smi,
7889
14
        { "Subsequent Modification Indication(SMI)", "gsm_a.bssmap.smi",
7890
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_bssmap_smi_vals), 0x0f,
7891
14
        NULL, HFILL }
7892
14
    },
7893
14
    { &hf_gsm_a_bssmap_lcs_pri,
7894
14
        { "Periodicity", "gsm_a.bssmap.lcs_pri",
7895
14
        FT_UINT8, BASE_DEC, VALS(lcs_priority_vals), 0x0,
7896
14
        NULL, HFILL }
7897
14
    },
7898
14
    { &hf_gsm_a_bssmap_num_ms,
7899
14
        { "Number of handover candidates", "gsm_a.bssmap.num_ms",
7900
14
        FT_UINT8, BASE_DEC,NULL, 0x0,
7901
14
        NULL, HFILL }
7902
14
    },
7903
14
    { &hf_gsm_a_bssmap_talker_pri,
7904
14
        { "Priority", "gsm_a.bssmap.talker_pri",
7905
14
        FT_UINT8, BASE_DEC,VALS(gsm_a_bssmap_talker_pri_vals), 0x03,
7906
14
        NULL, HFILL }
7907
14
    },
7908
14
    { &hf_gsm_a_bssmap_rr_mode,
7909
14
        { "RR mode", "gsm_a.bssmap.rr_mode",
7910
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_bssmap_rr_mode_vals), 0xc0,
7911
14
        NULL, HFILL }
7912
14
    },
7913
14
    { &hf_gsm_a_bssmap_group_cipher_key_nb,
7914
14
        { "Group cipher key number", "gsm_a.bssmap.group_cipher_key_nb",
7915
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_bssmap_group_cipher_key_nb_vals), 0x3c,
7916
14
        NULL, HFILL }
7917
14
    },
7918
14
    { &hf_gsm_a_bssmap_vgcs_vbs_cell_status,
7919
14
        { "Status", "gsm_a.bssmap.vgcs_vbs_cell_status",
7920
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_bssmap_vgcs_vbs_cell_status_vals), 0x07,
7921
14
        NULL, HFILL }
7922
14
    },
7923
14
    { &hf_gsm_a_bssmap_paging_cause,
7924
14
        { "Paging Cause", "gsm_a.bssmap.paging_cause",
7925
14
        FT_UINT8, BASE_DEC,VALS(gsm_a_bssmap_paging_cause_vals), 0x06,
7926
14
        NULL, HFILL }
7927
14
    },
7928
14
    { &hf_gsm_a_bssmap_paging_inf_flg,
7929
14
        { "VGCS/VBS flag","gsm_a.bssmap.paging_inf_flg",
7930
14
        FT_BOOLEAN,8, TFS(&bssmap_paging_inf_flg_value), 0x01,
7931
14
        "If 1, a member of a VGCS/VBS-group", HFILL }
7932
14
    },
7933
14
    { &hf_gsm_a_bssmap_serv_ho_inf,
7934
14
        { "Service Handover information", "gsm_a.bssmap.serv_ho_inf",
7935
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_bssmap_serv_ho_inf_vals), 0x07,
7936
14
        NULL, HFILL }
7937
14
    },
7938
14
    { &hf_gsm_a_bssmap_max_nb_traffic_chan,
7939
14
        { "Maximum Number of Traffic Channels", "gsm_a.bssmap.max_nb_traffic_chan",
7940
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_max_nb_traffic_chan_vals), 0x07,
7941
14
        NULL, HFILL }
7942
14
    },
7943
14
    { &hf_gsm_a_bssmap_acceptable_chan_coding_bit5,
7944
14
        { "TCH/F43.2", "gsm_a.bssmap.acceptable_chan_coding_bit5",
7945
14
        FT_BOOLEAN, 8, TFS(&gsm_a_bssmap_accept_not_accept_vals), 0x10,
7946
14
        NULL, HFILL }
7947
14
    },
7948
14
    { &hf_gsm_a_bssmap_acceptable_chan_coding_bit4,
7949
14
        { "TCH/F43.2", "gsm_a.bssmap.acceptable_chan_coding_bit4",
7950
14
        FT_BOOLEAN, 8, TFS(&gsm_a_bssmap_accept_not_accept_vals), 0x08,
7951
14
        NULL, HFILL }
7952
14
    },
7953
14
    { &hf_gsm_a_bssmap_acceptable_chan_coding_bit3,
7954
14
        { "TCH/F43.2", "gsm_a.bssmap.acceptable_chan_coding_bit3",
7955
14
        FT_BOOLEAN, 8, TFS(&gsm_a_bssmap_accept_not_accept_vals), 0x04,
7956
14
        NULL, HFILL }
7957
14
    },
7958
14
    { &hf_gsm_a_bssmap_acceptable_chan_coding_bit2,
7959
14
        { "TCH/F43.2", "gsm_a.bssmap.acceptable_chan_coding_bit2",
7960
14
        FT_BOOLEAN, 8, TFS(&gsm_a_bssmap_accept_not_accept_vals), 0x02,
7961
14
        NULL, HFILL }
7962
14
    },
7963
14
    { &hf_gsm_a_bssmap_acceptable_chan_coding_bit1,
7964
14
        { "TCH/F43.2", "gsm_a.bssmap.acceptable_chan_coding_bit1",
7965
14
        FT_BOOLEAN, 8, TFS(&gsm_a_bssmap_accept_not_accept_vals), 0x01,
7966
14
        NULL, HFILL }
7967
14
    },
7968
14
    { &hf_gsm_a_bssmap_allowed_data_rate_bit8,
7969
14
        { "43.5 kbit/s (TCH/F43.2)", "gsm_a.bssmap.allowed_data_rate_bit8",
7970
14
        FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x80,
7971
14
        NULL, HFILL }
7972
14
    },
7973
14
    { &hf_gsm_a_bssmap_allowed_data_rate_bit7,
7974
14
        { "32.0 kbit/s (TCH/F32.0)", "gsm_a.bssmap.allowed_data_rate_bit7",
7975
14
        FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x40,
7976
14
        NULL, HFILL }
7977
14
    },
7978
14
    { &hf_gsm_a_bssmap_allowed_data_rate_bit6,
7979
14
        { "29.0 kbit/s (TCH/F28.8)", "gsm_a.bssmap.allowed_data_rate_bit6",
7980
14
        FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x20,
7981
14
        NULL, HFILL }
7982
14
    },
7983
14
    { &hf_gsm_a_bssmap_allowed_data_rate_bit5,
7984
14
        { "14.5/14.4 kbit/s (TCH/F14.4)", "gsm_a.bssmap.allowed_data_rate_bit5",
7985
14
        FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x10,
7986
14
        NULL, HFILL }
7987
14
    },
7988
14
    { &hf_gsm_a_bssmap_allowed_data_rate_bit4,
7989
14
        { "12.0/9.6 kbit/s (TCH F/9.6)", "gsm_a.bssmap.allowed_data_rate_bit4",
7990
14
        FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x08,
7991
14
        NULL, HFILL }
7992
14
    },
7993
14
    { &hf_gsm_a_bssmap_vstk_rand,
7994
14
        { "VSTK_RAND", "gsm_a.bssmap.vstk_rand",
7995
14
        FT_UINT64, BASE_HEX, NULL, 0,
7996
14
        NULL, HFILL }
7997
14
    },
7998
14
    { &hf_gsm_a_bssmap_vstk,
7999
14
        { "VSTK", "gsm_a.bssmap.vstk",
8000
14
        FT_BYTES, BASE_NONE, NULL, 0,
8001
14
        NULL, HFILL }
8002
14
    },
8003
8004
14
    { &hf_gsm_a_bssmap_spare_bits,
8005
14
        { "Spare bit(s)", "gsm_a.bssmap.spare_bits",
8006
14
        FT_UINT8, BASE_HEX, NULL, 0x0,
8007
14
        NULL, HFILL }
8008
14
    },
8009
14
    { &hf_gsm_a_bssmap_tpind,
8010
14
        { "Talker priority indicator (TP Ind)","gsm_a.bssmap.tpind",
8011
14
        FT_BOOLEAN,8, TFS(&gsm_bssmap_tpind_vals), 0x01,
8012
14
        NULL, HFILL }
8013
14
    },
8014
14
    { &hf_gsm_a_bssmap_asind_b2,
8015
14
        { "A-interface resource sharing indicator (AS Ind) bit 2","gsm_a.bssmap.asind_b2",
8016
14
        FT_BOOLEAN,8, TFS(&gsm_bssmap_asind_b2_vals), 0x02,
8017
14
        NULL, HFILL }
8018
14
    },
8019
14
    { &hf_gsm_a_bssmap_asind_b3,
8020
14
        { "A-interface resource sharing indicator (AS Ind) bit 3","gsm_a.bssmap.asind_b3",
8021
14
        FT_BOOLEAN,8, TFS(&gsm_bssmap_asind_b3_vals), 0x04,
8022
14
        NULL, HFILL }
8023
14
    },
8024
14
    { &hf_gsm_a_bssmap_bss_res,
8025
14
        { "Group or broadcast call re-establishment by the BSS indicator","gsm_a.bssmap.bss_res",
8026
14
        FT_BOOLEAN,8, TFS(&gsm_bssmap_bss_res_vals), 0x08,
8027
14
        NULL, HFILL }
8028
14
    },
8029
14
    { &hf_gsm_a_bssmap_tcp,
8030
14
        { "Talker Channel Parameter (TCP)","gsm_a.bssmap.tcp",
8031
14
        FT_BOOLEAN,8, TFS(&gsm_bssmap_bss_tcp_vals), 0x10,
8032
14
        NULL, HFILL }
8033
14
    },
8034
14
    { &hf_gsm_a_bssmap_filler_bits,
8035
14
        { "Filler Bits","gsm_a.bssmap.filler_bits",
8036
14
        FT_UINT8, BASE_DEC,NULL, 0x07,
8037
14
        NULL, HFILL }
8038
14
    },
8039
14
        { &hf_gsm_a_bssmap_method,
8040
14
        { "Method","gsm_a.bssmap.method",
8041
14
        FT_UINT8, BASE_DEC,VALS(gsm_a_bssmap_method_vals), 0xc0,
8042
14
        NULL, HFILL }
8043
14
    },
8044
14
        { &hf_gsm_a_bssmap_ganss_id,
8045
14
        { "GANSS Id","gsm_a.bssmap.ganss_id",
8046
14
        FT_UINT8, BASE_DEC,VALS(gsm_a_bssmap_ganss_id_vals), 0x38,
8047
14
        NULL, HFILL }
8048
14
    },
8049
14
        { &hf_gsm_a_bssmap_usage,
8050
14
        { "Usage","gsm_a.bssmap.usage",
8051
14
        FT_UINT8, BASE_DEC,VALS(gsm_a_bssmap_usage_vals), 0x07,
8052
14
        NULL, HFILL }
8053
14
    },
8054
14
    { &hf_gsm_a_bssmap_data_id,
8055
14
        { "Data Identity","gsm_a.bssmap.data_id",
8056
14
        FT_UINT8, BASE_DEC_HEX, NULL, 0,
8057
14
        NULL, HFILL }
8058
14
    },
8059
14
    { &hf_gsm_a_bssmap_bt_ind,
8060
14
        { "BT Ind","gsm_a.bssmap.bt_ind",
8061
14
        FT_BOOLEAN, 8, TFS(&gsm_a_bssmap_bt_ind_val), 0x01,
8062
14
        NULL, HFILL }
8063
14
    },
8064
14
    { &hf_gsm_a_bssmap_aoip_trans_ipv4,
8065
14
        { "Transport Layer Address (IPv4)","gsm_a.bssmap.aoip_trans_ipv4",
8066
14
        FT_IPv4,BASE_NONE,  NULL, 0x0,
8067
14
        NULL, HFILL }
8068
14
    },
8069
14
    { &hf_gsm_a_bssmap_aoip_trans_ipv6,
8070
14
        { "Transport Layer Address (IPv6)","gsm_a.bssmap.aoip_trans_ipv6",
8071
14
        FT_IPv6,BASE_NONE,  NULL, 0x0,
8072
14
        NULL, HFILL }
8073
14
    },
8074
14
    { &hf_gsm_a_bssmap_aoip_trans_port,
8075
14
        { "UDP Port","gsm_a.bssmap.aoip_trans_port",
8076
14
        FT_UINT16, BASE_DEC,NULL, 0x0,
8077
14
        NULL, HFILL }
8078
14
    },
8079
14
    { &hf_gsm_a_bssmap_fi,
8080
14
        { "FI(Full IP)","gsm_a.bssmap.fi",
8081
14
        FT_BOOLEAN,8, TFS(&bssmap_fi_vals), 0x80,
8082
14
        NULL, HFILL }
8083
14
    },
8084
14
    { &hf_gsm_a_bssmap_pi,
8085
14
        { "PI","gsm_a.bssmap.pi",
8086
14
        FT_BOOLEAN,8, TFS(&bssmap_pi_vals), 0x40,
8087
14
        NULL, HFILL }
8088
14
    },
8089
14
    { &hf_gsm_a_bssmap_pt,
8090
14
        { "PT","gsm_a.bssmap.pt",
8091
14
        FT_BOOLEAN,8, TFS(&bssmap_pt_vals), 0x20,
8092
14
        NULL, HFILL }
8093
14
    },
8094
14
    { &hf_gsm_a_bssmap_tf,
8095
14
        { "TF","gsm_a.bssmap.tf",
8096
14
        FT_BOOLEAN,8, TFS(&bssmap_tf_vals), 0x10,
8097
14
        NULL, HFILL }
8098
14
    },
8099
14
    { &hf_gsm_a_bssap_speech_codec,
8100
14
        { "Codec Type","gsm_a.bssmap.speech_codec",
8101
14
        FT_UINT8, BASE_DEC|BASE_EXT_STRING, &bssap_speech_codec_values_ext, 0x0f,
8102
14
        NULL, HFILL }
8103
14
    },
8104
14
        { &hf_gsm_a_bssap_extended_codec,
8105
14
        { "Extended Codec Type","gsm_a.bssmap.extended_codec",
8106
14
        FT_UINT8, BASE_DEC, VALS(bssap_extended_codec_values), 0x0,
8107
14
        NULL, HFILL }
8108
14
    },
8109
14
        { &hf_gsm_a_bssap_extended_codec_r2,
8110
14
        { "Redundancy Level 2","gsm_a.bssmap.r2",
8111
14
        FT_BOOLEAN,8, TFS(&tfs_supported_not_supported), 0x80,
8112
14
        NULL, HFILL }
8113
14
    },
8114
14
        { &hf_gsm_a_bssap_extended_codec_r3,
8115
14
        { "Redundancy Level 3","gsm_a.bssmap.r3",
8116
14
        FT_BOOLEAN,8, TFS(&tfs_supported_not_supported), 0x40,
8117
14
        NULL, HFILL }
8118
14
    },
8119
14
    { &hf_gsm_a_bssmap_fi2,
8120
14
        { "FI(Full IP)","gsm_a.bssmap.fi2",
8121
14
        FT_BOOLEAN,8, TFS(&bssmap_fi2_vals), 0x80,
8122
14
        NULL, HFILL }
8123
14
    },
8124
14
    { &hf_gsm_a_bssmap_pi2,
8125
14
        { "PI","gsm_a.bssmap.pi2",
8126
14
        FT_BOOLEAN,8, TFS(&bssmap_pi2_vals), 0x40,
8127
14
        NULL, HFILL }
8128
14
    },
8129
14
    { &hf_gsm_a_bssmap_pt2,
8130
14
        { "PT","gsm_a.bssmap.pt2",
8131
14
        FT_BOOLEAN,8, TFS(&bssmap_pt2_vals), 0x20,
8132
14
        NULL, HFILL }
8133
14
    },
8134
14
    { &hf_gsm_a_bssmap_tf2,
8135
14
        { "TF","gsm_a.bssmap.tf2",
8136
14
        FT_BOOLEAN,8, TFS(&bssmap_tf2_vals), 0x10,
8137
14
        NULL, HFILL }
8138
14
    },
8139
14
    { &hf_gsm_a_bssmap_call_id,
8140
14
        { "Call Identifier","gsm_a.bssmap.callid",
8141
14
        FT_UINT32, BASE_DEC,NULL, 0x0,
8142
14
        NULL, HFILL }
8143
14
    },
8144
14
    { &hf_gsm_a_bssmap_spare,
8145
14
        { "Spare", "gsm_a.bssmap.spare",
8146
14
        FT_UINT8, BASE_HEX, NULL, 0x0,
8147
14
        NULL, HFILL}
8148
14
    },
8149
14
    { &hf_gsm_a_bssmap_positioning_data_discriminator,
8150
14
        { "Positioning Data Discriminator", "gsm_a.bssmap.posData.discriminator",
8151
14
        FT_UINT8, BASE_HEX, NULL, 0x0,
8152
14
        NULL, HFILL }
8153
14
    },
8154
14
    { &hf_gsm_a_bssmap_positioning_method,
8155
14
        { "Positioning method", "gsm_a.bssmap.posData.method",
8156
14
        FT_UINT8, BASE_HEX, VALS(bssmap_positioning_methods), 0x0,
8157
14
        NULL, HFILL }
8158
14
    },
8159
14
    { &hf_gsm_a_bssmap_positioning_method_usage,
8160
14
        { "Usage", "gsm_a.bssmap.posData.usage",
8161
14
        FT_UINT8, BASE_HEX, VALS(bssmap_positioning_methods_usage), 0x0,
8162
14
        NULL, HFILL }
8163
14
    },
8164
14
    { &hf_gsm_a_bssmap_location_type_location_information,
8165
14
        { "Location Information", "gsm_a.bssmap.locationType.locationInformation",
8166
14
        FT_UINT8, BASE_HEX, VALS(bssmap_location_information_vals), 0x0,
8167
14
        NULL, HFILL }
8168
14
    },
8169
14
    { &hf_gsm_a_bssmap_location_type_positioning_method,
8170
14
        { "Positioning Method", "gsm_a.bssmap.locationType.positioningMethod",
8171
14
        FT_UINT8, BASE_HEX, VALS(bssmap_positioning_method_vals), 0x0,
8172
14
        NULL, HFILL }
8173
14
    },
8174
14
    { &hf_gsm_a_bssmap_chan_type_extension,
8175
14
        { "Extension", "gsm_a.bssmap.chanType.permittedIndicator.extension",
8176
14
            FT_BOOLEAN, 8, TFS(&bssmap_chan_type_extension_value), 0x80,
8177
14
            NULL, HFILL }
8178
14
    },
8179
14
    { &hf_gsm_a_bssmap_cause_extension,
8180
14
        { "Extension", "gsm_a.bssmap.causeType.extension",
8181
14
            FT_BOOLEAN, 8, TFS(&bssmap_cause_extension_value), 0x80,
8182
14
            NULL, HFILL }
8183
14
    },
8184
14
    { &hf_gsm_a_bssmap_ass_req,
8185
14
        { "Assignment Requirement", "gsm_a.bssmap.assignment_requirement",
8186
14
            FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_assignment_requirement_vals), 0x0,
8187
14
            NULL, HFILL }
8188
14
    },
8189
14
    { &hf_gsm_a_bssmap_emlpp_prio,
8190
14
        { "eMLPP Priority", "gsm_a.bssmap.emlpp_priority",
8191
14
            FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_call_priority_vals), 0x07,
8192
14
            NULL, HFILL }
8193
14
    },
8194
14
    { &hf_gsm_a_bssmap_rip,
8195
14
        { "RIP", "gsm_a.bssmap.rip",
8196
14
            FT_BOOLEAN, 8, TFS(&gsm_a_bssmap_rip_value), 0x02,
8197
14
            NULL, HFILL }
8198
14
    },
8199
14
    { &hf_gsm_a_bssmap_rtd,
8200
14
        { "RTD", "gsm_a.bssmap.rtd",
8201
14
            FT_BOOLEAN, 8, TFS(&gsm_a_bssmap_rtd_value), 0x01,
8202
14
            NULL, HFILL }
8203
14
    },
8204
14
    { &hf_gsm_a_bssmap_kc128,
8205
14
        { "Kc128", "gsm_a.bssmap.kc128",
8206
14
            FT_BYTES, BASE_NONE, NULL, 0,
8207
14
            NULL, HFILL }
8208
14
    },
8209
14
    { &hf_gsm_a_bssmap_csg_id,
8210
14
        { "CSG Identity", "gsm_a.bssmap.csg_id",
8211
14
            FT_UINT32, BASE_DEC, NULL, 0,
8212
14
            NULL, HFILL }
8213
14
    },
8214
14
    { &hf_gsm_a_bssmap_cell_access_mode,
8215
14
        { "Cell Access Mode", "gsm_a.bssmap.cell_access_mode",
8216
14
            FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_bssmap_cell_access_mode_value), 0,
8217
14
            NULL, HFILL }
8218
14
    },
8219
8220
14
    { &hf_fe_extra_info_prec,
8221
14
        { "Pre-emption Recommendation", "gsm_a.bssmap.fe_extra_info.prec",
8222
14
            FT_UINT8, BASE_DEC, VALS(fe_extra_info_prec_vals), 0x01,
8223
14
            NULL, HFILL }
8224
14
    },
8225
14
    { &hf_fe_extra_info_lcs,
8226
14
        { "LCS Information", "gsm_a.bssmap.fe_extra_info.lcs",
8227
14
            FT_UINT8, BASE_DEC, VALS(fe_extra_info_lcs_vals), 0x02,
8228
14
            NULL, HFILL }
8229
14
    },
8230
14
    { &hf_fe_extra_info_ue_prob,
8231
14
        { "UE support of UMTS", "gsm_a.bssmap.fe_extra_info.ue_prob",
8232
14
            FT_UINT8, BASE_DEC, VALS(fe_extra_info_ue_prob_vals), 0x04,
8233
14
            NULL, HFILL }
8234
14
    },
8235
14
    { &hf_fe_extra_info_spare,
8236
14
        { "Extra Information Spare bits", "gsm_a.bssmap.fe_extra_info.spare",
8237
14
            FT_UINT8, BASE_HEX, NULL, 0xf8,
8238
14
            NULL, HFILL }
8239
14
    },
8240
14
    { &hf_fe_cur_chan_type2_chan_mode,
8241
14
        { "Channel Mode", "gsm_a.bssmap.fe_cur_chan_type2.chan_mode",
8242
14
             FT_UINT8, BASE_HEX, VALS(chan_mode_vals), 0x0f,
8243
14
             NULL, HFILL }
8244
14
    },
8245
14
    { &hf_fe_cur_chan_type2_chan_mode_spare,
8246
14
        { "Channel Mode Spare bits", "gsm_a.bssmap.fe_cur_chan_type2_chan_mode.spare",
8247
14
            FT_UINT8, BASE_HEX, NULL, 0xf0,
8248
14
            NULL, HFILL }
8249
14
    },
8250
14
    { &hf_fe_cur_chan_type2_chan_field,
8251
14
        { "Channel Field", "gsm_a.bssmap.fe_cur_chan_type2.chan_field",
8252
14
            FT_UINT8, BASE_HEX, VALS(fe_cur_chan_type2_chan_field_vals),0x0f,
8253
14
            NULL, HFILL }
8254
14
    },
8255
14
    { &hf_fe_cur_chan_type2_chan_field_spare,
8256
14
        { "Channel field Spare bits", "gsm_a.bssmap.fe_cur_chan_type2_chan_field.spare",
8257
14
            FT_UINT8, BASE_HEX, NULL, 0xf0,
8258
14
            NULL, HFILL }
8259
14
    },
8260
14
    { &hf_fe_target_radio_cell_info_rxlev_ncell,
8261
14
        { "RXLEV-NCELL", "gsm_a.bssmap.fe_target_radio_cell_info.rxlev_ncell",
8262
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &gsm_a_rr_rxlev_vals_ext, 0x3f,
8263
14
            NULL, HFILL }
8264
14
    },
8265
14
    { &hf_fe_target_radio_cell_info_rxlev_ncell_spare,
8266
14
        { "RXLEV-NCELL Spare bits", "gsm_a.bssmap.fe_target_radio_cell_info.rxlev_ncell_spare",
8267
14
            FT_UINT8, BASE_HEX, NULL, 0xc0,
8268
14
            NULL, HFILL }
8269
14
    },
8270
14
    { &hf_fe_dtm_info_dtm_ind,
8271
14
        { "DTM indicator", "gsm_a.bssmap.fe_dtm_info.dtm_ind",
8272
14
            FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_dtm_info_dtm_ind_vals), 0x01,
8273
14
            NULL, HFILL }
8274
14
    },
8275
14
    { &hf_fe_dtm_info_sto_ind,
8276
14
        { "Time Slot Operation indicator", "gsm_a.bssmap.fe_dtm_info.sto_ind",
8277
14
            FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_dtm_info_sto_ind_vals), 0x02,
8278
14
            NULL, HFILL }
8279
14
    },
8280
14
    { &hf_fe_dtm_info_egprs_ind,
8281
14
        { "EGPRS indicator", "gsm_a.bssmap.fe_dtm_info.egprs_ind",
8282
14
            FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_dtm_info_egprs_ind_vals), 0x04,
8283
14
            NULL, HFILL }
8284
14
    },
8285
14
    { &hf_fe_dtm_info_spare_bits,
8286
14
        { "DTM Info Spare bits", "gsm_a.bssmap.fe_dtm_info.spare_bits",
8287
14
            FT_UINT8, BASE_HEX, NULL, 0xf8,
8288
14
            NULL, HFILL }
8289
14
    },
8290
14
    { &hf_fe_cell_load_info_cell_capacity_class,
8291
14
        { "Cell capacity class", "gsm_a.bssmap.fe_cell_load_info.cell_capacity_class",
8292
14
            FT_UINT8, BASE_DEC, NULL, 0,
8293
14
            NULL, HFILL }
8294
14
    },
8295
14
    { &hf_fe_cell_load_info_load_value,
8296
14
        { "Load value", "gsm_a.bssmap.fe_cell_load_info.load_info",
8297
14
            FT_UINT8, BASE_DEC, NULL, 0,
8298
14
            NULL, HFILL }
8299
14
    },
8300
14
    { &hf_fe_cell_load_info_rt_load_value,
8301
14
        { "Realtime load value", "gsm_a.bssmap.fe_cell_load_info.rt_load_value",
8302
14
            FT_UINT8, BASE_DEC, NULL, 0,
8303
14
            NULL, HFILL }
8304
14
    },
8305
14
    { &hf_fe_cell_load_info_nrt_load_information_value,
8306
14
        { "Non-Realtime load information value", "gsm_a.bssmap.fe_cell_load_info.nrt_load_info_value",
8307
14
            FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_cell_load_nrt_vals), 0,
8308
14
            NULL, HFILL }
8309
14
    },
8310
14
    { &hf_fe_ps_indication,
8311
14
        { "PS Indication", "gsm_a.bssmap.fe_ps_indication.value",
8312
14
            FT_UINT8, BASE_HEX, NULL, 0,
8313
14
            NULL, HFILL }
8314
14
    },
8315
14
    { &hf_fe_dtm_ho_command_ind_spare,
8316
14
        { "Spare octet", "gsm_a.bssmap.fe_dtm_ho_command_ind.spare",
8317
14
            FT_UINT8, BASE_HEX, NULL, 0,
8318
14
            NULL, HFILL }
8319
14
    },
8320
14
    { &hf_gsm_a_bssmap_speech_data_ind,
8321
14
        { "Speech/Data Indicator", "gsm_a.bssmap.speech_data_ind",
8322
14
            FT_UINT8, BASE_DEC, VALS(gsm_a_bssap_speech_data_ind_vals), 0x0f,
8323
14
            NULL, HFILL }
8324
14
    },
8325
14
    { &hf_gsm_a_bssmap_channel_rate_and_type,
8326
14
        { "Channel Rate and Type", "gsm_a.bssmap.rate_and_type",
8327
14
            FT_UINT8, BASE_DEC, VALS(gsm_a_bssap_channel_rate_and_type_vals), 0x0,
8328
14
            NULL, HFILL }
8329
14
    },
8330
14
    { &hf_gsm_a_bssmap_perm_speech_v_ind,
8331
14
        { "Permitted speech version indication", "gsm_a.bssmap.perm_speech_v_ind",
8332
14
            FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(speech_version_id_rvals), 0x7f,
8333
14
            NULL, HFILL }
8334
14
    },
8335
14
    { &hf_gsm_a_bssmap_reroute_rej_cause,
8336
14
        { "Reroute Reject cause", "gsm_a.bssmap.reroute_rej_cause",
8337
14
            FT_UINT8, BASE_HEX, VALS(gsm_a_bssap_reroute_rej_cause_vals), 0x0,
8338
14
            NULL, HFILL }
8339
14
    },
8340
14
    { &hf_gsm_a_bssmap_send_seqn,
8341
14
        { "Send Sequence Number", "gsm_a.bssmap.send_seqn",
8342
14
            FT_UINT8, BASE_HEX, NULL, 0xc0,
8343
14
            NULL, HFILL }
8344
14
    },
8345
14
    { &hf_gsm_a_bssmap_reroute_outcome,
8346
14
        { "Outcome", "gsm_a.bssmap.reroute_outcome",
8347
14
            FT_UINT8, BASE_HEX, VALS(gsm_a_bssap_reroute_outcome_vals), 0x0,
8348
14
            NULL, HFILL }
8349
14
    },
8350
14
    { &hf_gsm_a_bssmap_lcls_conf,
8351
14
        { "LCLS-Configuration", "gsm_a.bssmap.lcls_conf",
8352
14
            FT_UINT8, BASE_HEX, VALS(gsm_a_bssap_lcls_conf_vals), 0x0f,
8353
14
            NULL, HFILL }
8354
14
    },
8355
14
    { &hf_gsm_a_bssmap_lcls_con_status_control,
8356
14
        { "LCLS-Connection-Status-Control", "gsm_a.bssmap.lcls_con_status_control",
8357
14
            FT_UINT8, BASE_HEX, VALS(gsm_a_bssap_lcls_con_status_control_vals), 0x0f,
8358
14
            NULL, HFILL }
8359
14
    },
8360
14
    { &hf_gsm_a_bssmap_lcls_bss_status,
8361
14
        { "LCLS-BSS-Status", "gsm_a.bssmap.lcls_bss_status",
8362
14
            FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_lcls_bss_status_vals), 0x0f,
8363
14
            NULL, HFILL }
8364
14
    },
8365
14
    { &hf_gsm_a_bssmap_osmocom_osmux_cid,
8366
14
        { "Osmux CID", "gsm_a.bssmap.osmocom_osmux_cid",
8367
14
            FT_UINT8, BASE_DEC, NULL, 0,
8368
14
            NULL, HFILL }
8369
14
    },
8370
8371
      /* Generated from convert_proto_tree_add_text.pl */
8372
14
      { &hf_gsm_a_bssmap_pcm_multiplexer, { "PCM Multiplexer", "gsm_a_bssmap.pcm_multiplexer", FT_UINT16, BASE_DEC, NULL, 0xffe0, NULL, HFILL }},
8373
14
      { &hf_gsm_a_bssmap_timeslot, { "Timeslot", "gsm_a_bssmap.timeslot", FT_UINT16, BASE_DEC, NULL, 0x001f, NULL, HFILL }},
8374
14
      { &hf_gsm_a_bssmap_full_rate_channels_available, { "Number of full rate channels available in band", "gsm_a_bssmap.full_rate_channels_available", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
8375
14
      { &hf_gsm_a_bssmap_half_rate_channels_available, { "Number of half rate channels available in band", "gsm_a_bssmap.half_rate_channels_available", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
8376
14
      { &hf_gsm_a_bssmap_cause_class, { "Cause Class", "gsm_a_bssmap.cause_class", FT_UINT8, BASE_DEC, VALS(cause_class_vals), 0x70, NULL, HFILL }},
8377
14
      { &hf_gsm_a_bssmap_national_cause, { "National Cause", "gsm_a_bssmap.national_cause", FT_UINT8, BASE_DEC, NULL, 0x0f, NULL, HFILL }},
8378
14
      { &hf_gsm_a_bssmap_cause_value, { "Cause Value", "gsm_a_bssmap.cause_value", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
8379
14
      { &hf_gsm_a_bssmap_cause16, { "Cause", "gsm_a_bssmap.cause", FT_UINT16, BASE_DEC, NULL, 0x07ff, NULL, HFILL }},
8380
14
      { &hf_gsm_a_bssmap_ti_flag, { "TI flag", "gsm_a_bssmap.ti_flag", FT_BOOLEAN, 8, TFS(&tfs_allocated_by_receiver_sender), 0x08, NULL, HFILL }},
8381
14
      { &hf_gsm_a_bssmap_tio, { "TIO", "gsm_a_bssmap.tio", FT_UINT8, BASE_DEC, NULL, 0x07, NULL, HFILL }},
8382
14
      { &hf_gsm_a_bssmap_enc_info_key, { "Key", "gsm_a_bssmap.enc_info_key", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8383
14
      { &hf_gsm_a_bssmap_transparent_service, { "Service", "gsm_a_bssmap.transparent_service", FT_BOOLEAN, 8, TFS(&tfs_non_transparent_transparent), 0x40, NULL, HFILL }},
8384
14
      { &hf_gsm_a_bssmap_rate, { "Rate", "gsm_a_bssmap.rate", FT_UINT8, BASE_DEC, NULL, 0x3f, NULL, HFILL }},
8385
14
      { &hf_gsm_a_bssmap_tch_14_5kb, { "14.5 kbit/s (TCH/F14.4)", "gsm_a_bssmap.tch_14_5kb", FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x08, NULL, HFILL }},
8386
14
      { &hf_gsm_a_bssmap_tch_12kb, { "12.0 kbit/s (TCH F/9.6)", "gsm_a_bssmap.tch_12kb", FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x02, NULL, HFILL }},
8387
14
      { &hf_gsm_a_bssmap_tch_6kb, { "6.0 kbit/s (TCH F/4.8)", "gsm_a_bssmap.tch_6kb", FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x01, NULL, HFILL }},
8388
14
      { &hf_gsm_a_bssmap_tch_14_5_14_4kb, { "14.5/14.4 kbit/s (TCH/F14.4)", "gsm_a_bssmap.tch_14_5_14_4kb", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
8389
14
      { &hf_gsm_a_bssmap_tch_12_9kb, { "12.0/9.6 kbit/s (TCH F/9.6)", "gsm_a_bssmap.tch_12_9kb", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
8390
14
      { &hf_gsm_a_bssmap_tch_6_4_8kb, { "6.0/4.8 kbit/s (TCH F/4.8)", "gsm_a_bssmap.tch_6_4_8kb", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
8391
14
      { &hf_gsm_a_bssmap_unknown_format, { "Unknown format", "gsm_a_bssmap.unknown_format", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8392
14
      { &hf_gsm_a_bssmap_cell_id_unknown_format, { "Cell ID - Unknown format", "gsm_a_bssmap.cell_id.unknown_format", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8393
14
      { &hf_gsm_a_bssmap_priority_level, { "Priority Level", "gsm_a_bssmap.priority_level", FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(bssmap_prio_rvals), 0x3c, NULL, HFILL }},
8394
14
      { &hf_gsm_a_bssmap_layer_3_information_value, { "Layer 3 Information value", "gsm_a_bssmap.layer_3_information_value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8395
14
      { &hf_gsm_a_bssmap_bss_activate_downlink, { "BSS can to activate DTX in the downlink direction", "gsm_a_bssmap.bss_activate_downlink", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x01, NULL, HFILL }},
8396
14
      { &hf_gsm_a_bssmap_imeisv_included, { "IMEISV must be included by the mobile station", "gsm_a_bssmap.imeisv_included", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x01, NULL, HFILL }},
8397
14
      { &hf_gsm_a_bssmap_algorithm_identifier, { "Algorithm Identifier", "gsm_a_bssmap.algorithm_identifier", FT_UINT8, BASE_DEC, VALS(gsm_a_bssmap_algorithm_id_vals), 0x0, NULL, HFILL }},
8398
14
      { &hf_gsm_a_bssmap_circuit_pool_number, { "Circuit pool number", "gsm_a_bssmap.circuit_pool_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
8399
14
      { &hf_gsm_a_bssmap_qri, { "qri recommended queuing", "gsm_a_bssmap.qri", FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x02, NULL, HFILL }},
8400
14
      { &hf_gsm_a_bssmap_speech_version_id, { "Speech version identifier", "gsm_a_bssmap.speech_version_id", FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(speech_version_id_rvals), 0x7f, NULL, HFILL }},
8401
14
      { &hf_gsm_a_bssmap_apdu, { "APDU", "gsm_a_bssmap.apdu", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8402
14
      { &hf_gsm_a_bssmap_talker_identity_field, { "Talker Identity field", "gsm_a_bssmap.talker_identity_field", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8403
14
      { &hf_gsm_a_bssmap_s0_s15, { "S0 - S15", "gsm_a_bssmap.s0_s15", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8404
14
      { &hf_gsm_a_bssmap_s0_s7, { "S0 - S7", "gsm_a_bssmap.s0_s7", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8405
14
      { &hf_gsm_a_bssmap_all_call_identifiers_resources_released, { "all resources and references associated to all Call Identifiers in use between the BSC and the MSC need to be released", "gsm_a_bssmap.all_call_identifiers_resources_released", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8406
14
      { &hf_gsm_a_bssmap_message_elements, { "Message Elements", "gsm_a_bssmap.message_elements", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8407
14
      { &hf_gsm_a_bssmap_layer3_message_contents, { "Layer 3 Message Contents", "gsm_a_bssmap.layer3_message_contents", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8408
14
      { &hf_gsm_a_bssmap_gsm_a5_1, { "GSM A5/1", "gsm_a_bssmap.gsm_a5_1", FT_BOOLEAN, 8, TFS(&tfs_permitted_not_permitted), 0x02, NULL, HFILL }},
8409
14
      { &hf_gsm_a_bssmap_gsm_a5_2, { "GSM A5/2", "gsm_a_bssmap.gsm_a5_2", FT_BOOLEAN, 8, TFS(&tfs_permitted_not_permitted), 0x04, NULL, HFILL }},
8410
14
      { &hf_gsm_a_bssmap_gsm_a5_3, { "GSM A5/3", "gsm_a_bssmap.gsm_a5_3", FT_BOOLEAN, 8, TFS(&tfs_permitted_not_permitted), 0x08, NULL, HFILL }},
8411
14
      { &hf_gsm_a_bssmap_gsm_a5_4, { "GSM A5/4", "gsm_a_bssmap.gsm_a5_4", FT_BOOLEAN, 8, TFS(&tfs_permitted_not_permitted), 0x10, NULL, HFILL }},
8412
14
      { &hf_gsm_a_bssmap_gsm_a5_5, { "GSM A5/5", "gsm_a_bssmap.gsm_a5_5", FT_BOOLEAN, 8, TFS(&tfs_permitted_not_permitted), 0x20, NULL, HFILL }},
8413
14
      { &hf_gsm_a_bssmap_gsm_a5_6, { "GSM A5/6", "gsm_a_bssmap.gsm_a5_6", FT_BOOLEAN, 8, TFS(&tfs_permitted_not_permitted), 0x40, NULL, HFILL }},
8414
14
      { &hf_gsm_a_bssmap_gsm_a5_7, { "GSM A5/7", "gsm_a_bssmap.gsm_a5_7", FT_BOOLEAN, 8, TFS(&tfs_permitted_not_permitted), 0x80, NULL, HFILL }},
8415
14
      { &hf_gsm_a_bssmap_no_encryption, { "No encryption", "gsm_a_bssmap.no_encryption", FT_BOOLEAN, 8, TFS(&tfs_permitted_not_permitted), 0x01, NULL, HFILL }},
8416
14
      { &hf_gsm_a_bssmap_data_channel_rate_and_type, { "Channel rate and type", "gsm_a_bssmap.channel_rate_and_type", FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_bssap_channel_rate_and_type_rvals), 0x7f, NULL, HFILL }},
8417
14
      { &hf_gsm_a_bssmap_cell_discriminator, { "Cell Discriminator", "gsm_a_bssmap.cell_discriminator", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8418
14
      { &hf_gsm_a_bssmap_forward_indicator, { "Forward indicator", "gsm_a_bssmap.forward_indicator", FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(forward_indicator_rvals), 0x0f, NULL, HFILL }},
8419
14
    };
8420
8421
14
    expert_module_t* expert_gsm_a_bssmap;
8422
8423
14
    static ei_register_info ei[] = {
8424
14
        { &ei_gsm_a_bssmap_extraneous_data, { "gsm_a_bssmap.extraneous_data", PI_PROTOCOL, PI_NOTE, "Extraneous Data, dissector bug or later version spec(report to wireshark.org)", EXPFILL }},
8425
14
        { &ei_gsm_a_bssmap_not_decoded_yet, { "gsm_a_bssmap.not_decoded_yet", PI_UNDECODED, PI_WARN, "Not decoded yet", EXPFILL }},
8426
14
        { &ei_gsm_a_bssap_unknown_codec, { "gsm_a_bssmap.unknown_codec", PI_PROTOCOL, PI_WARN, "Unknown codec - the rest of the dissection my be suspect", EXPFILL }},
8427
14
        { &ei_gsm_a_bssmap_bogus_length, { "gsm_a_bssmap.bogus_length", PI_PROTOCOL, PI_WARN, "Bogus length", EXPFILL }},
8428
14
        { &ei_gsm_a_bssmap_missing_mandatory_element, { "gsm_a_bssmap.missing_mandatory_element", PI_PROTOCOL, PI_WARN, "Missing Mandatory element, rest of dissection is suspect", EXPFILL }},
8429
14
    };
8430
8431
    /* Setup protocol subtree array */
8432
14
#define NUM_INDIVIDUAL_ELEMS    5
8433
14
    int *ett[NUM_INDIVIDUAL_ELEMS + NUM_GSM_BSSMAP_MSG +
8434
14
          NUM_GSM_BSSMAP_ELEM];
8435
8436
14
    ett[0] = &ett_bssmap_msg;
8437
14
    ett[1] = &ett_cell_list;
8438
14
    ett[2] = &ett_dlci;
8439
14
    ett[3] = &ett_codec_lst;
8440
14
    ett[4] = &ett_bss_to_bss_info;
8441
8442
14
    last_offset = NUM_INDIVIDUAL_ELEMS;
8443
8444
1.72k
    for (i=0; i < NUM_GSM_BSSMAP_MSG; i++, last_offset++)
8445
1.70k
    {
8446
1.70k
        ett[last_offset] = &ett_gsm_bssmap_msg[i];
8447
1.70k
    }
8448
8449
3.41k
    for (i=0; i < NUM_GSM_BSSMAP_ELEM; i++, last_offset++)
8450
3.40k
    {
8451
3.40k
        ett[last_offset] = &ett_gsm_bssmap_elem[i];
8452
3.40k
    }
8453
8454
    /* Register the protocol name and description */
8455
8456
14
    proto_a_bssmap =
8457
14
        proto_register_protocol("GSM A-I/F BSSMAP", "GSM BSSMAP", "gsm_a.bssmap");
8458
8459
14
    proto_register_field_array(proto_a_bssmap, hf, array_length(hf));
8460
8461
14
    proto_register_subtree_array(ett, array_length(ett));
8462
8463
14
    expert_gsm_a_bssmap = expert_register_protocol(proto_a_bssmap);
8464
14
    expert_register_field_array(expert_gsm_a_bssmap, ei, array_length(ei));
8465
8466
14
    bssmap_handle = register_dissector("gsm_a_bssmap", dissect_bssmap, proto_a_bssmap);
8467
14
}
8468
8469
8470
void
8471
proto_reg_handoff_gsm_a_bssmap(void)
8472
14
{
8473
14
    dissector_add_uint("bssap.pdu_type",  GSM_A_PDU_TYPE_BSSMAP, bssmap_handle);
8474
8475
14
    dtap_handle       = find_dissector_add_dependency("gsm_a_dtap", proto_a_bssmap);
8476
14
    gsm_bsslap_handle = find_dissector_add_dependency("gsm_bsslap", proto_a_bssmap);
8477
14
    bssgp_handle      = find_dissector_add_dependency("bssgp", proto_a_bssmap);
8478
14
    rrc_handle        = find_dissector_add_dependency("rrc", proto_a_bssmap);
8479
14
    bicc_mst_handle   = find_dissector_add_dependency("bicc_mst", proto_a_bssmap);
8480
14
}
8481
8482
/*
8483
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
8484
 *
8485
 * Local variables:
8486
 * c-basic-offset: 4
8487
 * tab-width: 8
8488
 * indent-tabs-mode: nil
8489
 * End:
8490
 *
8491
 * vi: set shiftwidth=4 tabstop=8 expandtab:
8492
 * :indentSize=4:tabSize=8:noTabs=true:
8493
 */