Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-gsm_a_bssmap.c
blob050a872442f1edf6e77800ebce37ba5ede8f6de0
1 /* packet-gsm_a_bssmap.c
2 * Routines for GSM A Interface BSSMAP dissection
4 * Copyright 2003, Michael Lum <mlum [AT] telostech.com>
5 * In association with Telos Technology Inc.
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
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
20 * Wireshark - Network traffic analyzer
21 * By Gerald Combs <gerald@wireshark.org>
22 * Copyright 1998 Gerald Combs
24 * SPDX-License-Identifier: GPL-2.0-or-later
27 #include "config.h"
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>
35 #include <wsutil/str_util.h>
36 #include <wsutil/array.h>
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"
49 void proto_register_gsm_a_bssmap(void);
50 void proto_reg_handoff_gsm_a_bssmap(void);
52 /* PROTOTYPES/FORWARDS */
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" },
65 { 0x09, "Unallocated" },
66 { 0x0a, "Unallocated" },
67 { 0x0b, "Unallocated" },
68 { 0x0c, "Unallocated" },
69 { 0x0d, "Unallocated" },
70 { 0x0e, "Unallocated" },
71 { 0x0f, "Unallocated" },
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" },
115 { 0x38, "Unallocated" },
116 { 0x39, "Unallocated" },
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" },
124 { 0x3f, "Unallocated" },
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" },
154 { 0x5b, "Unallocated" },
155 { 0x5c, "Unallocated" },
156 { 0x5d, "Unallocated" },
157 { 0x5e, "Unallocated" },
158 { 0x5f, "Unallocated" },
160 { 0x60, "VGCS Additional Information" },
161 { 0x61, "VGCS SMS" },
162 { 0x62, "Notification Data" },
163 { 0x63, "Uplink Application Data" },
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" },
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 }
191 static value_string_ext gsm_a_bssmap_msg_strings_ext = VALUE_STRING_EXT_INIT(gsm_a_bssmap_msg_strings);
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 }
438 value_string_ext gsm_bssmap_elem_strings_ext = VALUE_STRING_EXT_INIT(gsm_bssmap_elem_strings);
440 /* 3.2.3 Signalling Field Element Coding */
441 static const value_string bssmap_field_element_ids[] = {
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 }
468 static const value_string bssap_cc_values[] = {
469 { 0x0, "not further specified" },
470 { 0x2, "FACCH or SDCCH" },
471 { 0x3, "SACCH" },
472 { 0, NULL } };
474 static const value_string bssap_sapi_values[] = {
475 { 0x00, "RR/MM/CC" },
476 { 0x03, "SMS" },
477 { 0, NULL } };
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 }
498 static value_string_ext gsm_a_be_cell_id_disc_vals_ext = VALUE_STRING_EXT_INIT(gsm_a_be_cell_id_disc_vals);
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 }
508 #endif
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}
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}
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}
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}
555 static const true_false_string bssmap_chan_type_extension_value = {
556 "Additional Octet",
557 "Last Octet"
560 static const true_false_string bssmap_cause_extension_value = {
561 "Two Octets",
562 "One Octet"
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}
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}
592 /* Initialize the protocol and registered fields */
593 static int proto_a_bssmap;
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;
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;
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;
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;
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;
808 static proto_tree *g_tree;
809 static uint8_t cell_discriminator = 0x0f; /* tracks whether handover is to UMTS */
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_);
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.
820 Note this enum must be of the same size as the element decoding list
822 typedef enum
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 */
1068 bssmap_elem_idx_t;
1069 #endif
1071 #define NUM_GSM_BSSMAP_ELEM array_length(gsm_bssmap_elem_strings)
1072 int ett_gsm_bssmap_elem[NUM_GSM_BSSMAP_ELEM];
1075 * [2] 3.2.2.2 Circuit Identity Code
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)
1080 uint32_t curr_offset;
1081 uint32_t value;
1083 curr_offset = offset;
1085 value = tvb_get_ntohs(tvb, curr_offset);
1087 proto_tree_add_item(tree, hf_gsm_a_bssmap_pcm_multiplexer, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1088 proto_tree_add_item(tree, hf_gsm_a_bssmap_timeslot, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1089 curr_offset += 2;
1091 if (add_string)
1092 snprintf(add_string, string_len, " - (%u) (0x%04x)", value, value);
1094 /* no length check possible */
1096 return curr_offset-offset;
1099 * 3.2.2.3 Connection Release Requested
1100 * No Data
1104 * 3.2.2.4 Resource Available
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_)
1109 uint32_t curr_offset;
1110 uint16_t value;
1111 int i;
1112 proto_item* ti;
1114 curr_offset = offset;
1116 for (i=0; i < 5; i++) {
1117 value = tvb_get_ntohl(tvb, curr_offset);
1118 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 proto_item_set_len(ti, len);
1120 curr_offset+=2;
1121 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 proto_item_set_len(ti, len);
1123 curr_offset+=2;
1127 return len;
1130 * [2] 3.2.2.5 Cause
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 }
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" },
1219 { 0, 0, NULL },
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)
1226 uint8_t oct;
1227 uint32_t curr_offset;
1229 curr_offset = offset;
1231 oct = tvb_get_uint8(tvb, curr_offset);
1233 proto_tree_add_item(tree, hf_gsm_a_bssmap_cause_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1235 if (oct & 0x80)
1237 /* 2 octet cause */
1239 if ((oct & 0x0f) == 0x00)
1241 /* national cause */
1243 proto_tree_add_item(tree, hf_gsm_a_bssmap_cause_class, tvb, curr_offset, 1, ENC_NA);
1244 proto_tree_add_item(tree, hf_gsm_a_bssmap_national_cause, tvb, curr_offset, 1, ENC_NA);
1245 curr_offset++;
1247 proto_tree_add_item(tree, hf_gsm_a_bssmap_cause_value, tvb, curr_offset, 1, ENC_NA);
1248 curr_offset++;
1250 if (add_string)
1251 snprintf(add_string, string_len, " - (National Cause)");
1253 else
1255 proto_tree_add_item(tree, hf_gsm_a_bssmap_cause16, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1256 curr_offset+=2;
1259 else
1261 proto_tree_add_item(tree, hf_gsm_a_bssmap_cause,
1262 tvb, curr_offset, 1, ENC_NA);
1264 curr_offset++;
1266 if (add_string)
1267 snprintf(add_string, string_len, " - (%u) %s", oct & 0x7f,
1268 rval_to_str_const(oct & 0x7f, gsm_a_bssap_cause_rvals, "Unknown"));
1271 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
1273 return curr_offset-offset;
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)
1283 * [2] 3.2.2.7 TMSI
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)
1288 uint32_t curr_offset;
1289 uint32_t value;
1291 curr_offset = offset;
1293 value = tvb_get_ntohl(tvb, curr_offset);
1295 proto_tree_add_uint(tree, hf_gsm_a_tmsi,
1296 tvb, curr_offset, 4,
1297 value);
1299 if (add_string)
1300 snprintf(add_string, string_len, " - (0x%04x)", value);
1302 curr_offset += 4;
1304 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
1306 return curr_offset-offset;
1310 * [2] 3.2.2.8 Number Of MSs
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_)
1315 uint32_t curr_offset;
1317 curr_offset = offset;
1319 proto_tree_add_item(tree, hf_gsm_a_bssmap_num_ms, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1320 curr_offset++;
1322 /* no length check possible */
1324 return curr_offset-offset;
1327 * [2] 3.2.2.9 Layer 3 Header Information
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_)
1332 uint32_t curr_offset = offset;
1334 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
1336 proto_tree_add_item(tree, hf_gsm_a_L3_protocol_discriminator, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1338 curr_offset++;
1340 NO_MORE_DATA_CHECK(len);
1342 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
1343 proto_tree_add_item(tree, hf_gsm_a_bssmap_ti_flag, tvb, curr_offset, 1, ENC_NA);
1344 proto_tree_add_item(tree, hf_gsm_a_bssmap_tio, tvb, curr_offset, 1, ENC_NA);
1345 curr_offset++;
1347 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
1349 return curr_offset-offset;
1353 * [2] 3.2.2.10 Encryption Information
1355 static const true_false_string tfs_permitted_not_permitted = { "Permitted", "Not permitted" };
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_)
1360 uint32_t curr_offset = offset;
1362 proto_tree_add_item(tree, hf_gsm_a_bssmap_gsm_a5_7, tvb, curr_offset, 1, ENC_NA);
1363 proto_tree_add_item(tree, hf_gsm_a_bssmap_gsm_a5_6, tvb, curr_offset, 1, ENC_NA);
1364 proto_tree_add_item(tree, hf_gsm_a_bssmap_gsm_a5_5, tvb, curr_offset, 1, ENC_NA);
1365 proto_tree_add_item(tree, hf_gsm_a_bssmap_gsm_a5_4, tvb, curr_offset, 1, ENC_NA);
1366 proto_tree_add_item(tree, hf_gsm_a_bssmap_gsm_a5_3, tvb, curr_offset, 1, ENC_NA);
1367 proto_tree_add_item(tree, hf_gsm_a_bssmap_gsm_a5_2, tvb, curr_offset, 1, ENC_NA);
1368 proto_tree_add_item(tree, hf_gsm_a_bssmap_gsm_a5_1, tvb, curr_offset, 1, ENC_NA);
1369 proto_tree_add_item(tree, hf_gsm_a_bssmap_no_encryption, tvb, curr_offset, 1, ENC_NA);
1370 curr_offset++;
1372 NO_MORE_DATA_CHECK(len);
1374 proto_tree_add_item(tree, hf_gsm_a_bssmap_enc_info_key, tvb, curr_offset, len - (curr_offset - offset), ENC_NA);
1376 curr_offset += len - (curr_offset - offset);
1378 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
1380 return curr_offset-offset;
1384 * [2] 3.2.2.11 Channel Type
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 }
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 }
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 },
1441 static const true_false_string tfs_non_transparent_transparent = {"Non-Transparent", "Transparent"};
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)
1446 uint8_t oct;
1447 uint8_t sdi;
1448 uint8_t num_chan;
1449 uint32_t curr_offset = offset;
1450 const char *str;
1452 oct = tvb_get_uint8(tvb, curr_offset);
1453 sdi = oct & 0x0f;
1455 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
1456 proto_tree_add_item(tree, hf_gsm_a_bssmap_speech_data_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1458 if (add_string)
1459 snprintf(add_string, string_len, " - (%s)", val_to_str_const(tvb_get_uint8(tvb, curr_offset) & 0x0f,
1460 gsm_a_bssap_speech_data_ind_vals,
1461 "Unknown"));
1463 curr_offset++;
1465 NO_MORE_DATA_CHECK(len);
1467 oct = tvb_get_uint8(tvb, curr_offset);
1469 if ((sdi == 0x01)||(sdi == 0x04))
1471 /* speech */
1472 proto_tree_add_item(tree, hf_gsm_a_bssmap_channel_rate_and_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1473 curr_offset++;
1474 NO_MORE_DATA_CHECK(len);
1478 proto_tree_add_item(tree, hf_gsm_a_bssmap_chan_type_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1479 proto_tree_add_item(tree, hf_gsm_a_bssmap_perm_speech_v_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1480 curr_offset++;
1482 while ((len - (curr_offset - offset)) > 0);
1484 else if (sdi == 0x02)
1486 /* data */
1488 num_chan = 0;
1490 if ((oct >= 0x20) && (oct <= 0x27))
1492 num_chan = (oct - 0x20) + 1;
1494 else if ((oct >= 0x30) && (oct <= 0x37))
1496 num_chan = (oct - 0x30) + 1;
1499 if (num_chan > 0)
1501 proto_tree_add_uint_format_value(tree, hf_gsm_a_bssmap_data_channel_rate_and_type,
1502 tvb, curr_offset, 1, oct, "Max channels %u, %s",
1503 num_chan, rval_to_str_const(oct, gsm_a_bssap_channel_rate_and_type_rvals, "Reserved"));
1505 else
1507 proto_tree_add_item(tree, hf_gsm_a_bssmap_data_channel_rate_and_type,
1508 tvb, curr_offset, 1, ENC_NA);
1511 curr_offset++;
1513 NO_MORE_DATA_CHECK(len);
1515 oct = tvb_get_uint8(tvb, curr_offset);
1517 proto_tree_add_item(tree, hf_gsm_a_bssmap_chan_type_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1518 proto_tree_add_item(tree, hf_gsm_a_bssmap_transparent_service, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1520 if (num_chan == 0)
1522 if (oct & 0x40)
1524 /* non-transparent */
1526 switch (oct & 0x3f)
1528 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 case 0x18: str = "14.5 kbit/s"; break;
1530 case 0x10: str = "12 kbits/s"; break;
1531 case 0x11: str = "6 kbits/s"; break;
1532 case 0x31: str = "29 kbit/s"; break;
1533 case 0x34: str = "43,5 kbit/s"; break;
1534 default:
1535 str = "Reserved";
1536 break;
1539 else
1541 switch (oct & 0x3f)
1543 case 0x18: str = "14.4 kbit/s"; break;
1544 case 0x10: str = "9.6kbit/s"; break;
1545 case 0x11: str = "4.8kbit/s"; break;
1546 case 0x12: str = "2.4kbit/s"; break;
1547 case 0x13: str = "1.2Kbit/s"; break;
1548 case 0x14: str = "600 bit/s"; break;
1549 case 0x15: str = "1200/75 bit/s (1200 network-to-MS / 75 MS-to-network)"; break;
1550 case 0x39: str = "28,8 kbit/s"; break;
1551 case 0x3a: str = "32,0 kbit/s"; break;
1552 default:
1553 str = "Reserved";
1554 break;
1558 else
1560 if (oct & 0x40)
1562 /* non-transparent */
1564 switch (oct & 0x3f)
1566 case 0x16: str = "58 kbit/s (4x14.5 kbit/s)"; break;
1567 case 0x14: str = "48.0 / 43.5 kbit/s (4x12 kbit/s or 3x14.5 kbit/s)"; break;
1568 case 0x13: str = "36.0 / 29.0 kbit/s (3x12 kbit/s or 2x14.5 kbit/s)"; break;
1569 case 0x12: str = "24.0 / 24.0 (4x6 kbit/s or 2x12 kbit/s)"; break;
1570 case 0x11: str = "18.0 / 14.5 kbit/s (3x6 kbit/s or 1x14.5 kbit/s)"; break;
1571 case 0x10: str = "12.0 / 12.0 kbit/s (2x6 kbit/s or 1x12 kbit/s)"; break;
1572 default:
1573 str = "Reserved";
1574 break;
1577 else
1579 switch (oct & 0x3f)
1581 case 0x1f: str = "64 kbit/s, bit transparent"; break;
1582 case 0x1e: str = "56 kbit/s, bit transparent"; break;
1583 case 0x1d: str = "56 kbit/s"; break;
1584 case 0x1c: str = "48 kbit/s"; break;
1585 case 0x1b: str = "38.4 kbit/s"; break;
1586 case 0x1a: str = "28.8 kbit/s"; break;
1587 case 0x19: str = "19.2 kbit/s"; break;
1588 case 0x18: str = "14.4 kbit/s"; break;
1589 case 0x10: str = "9.6 kbit/s"; break;
1590 default:
1591 str = "Reserved";
1592 break;
1597 proto_tree_add_uint_format_value(tree, hf_gsm_a_bssmap_rate,
1598 tvb, curr_offset, 1, oct & 0x3f, "%s", str);
1600 curr_offset++;
1602 NO_MORE_DATA_CHECK(len);
1604 proto_tree_add_item(tree, hf_gsm_a_bssmap_chan_type_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1606 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, (curr_offset<<3)+1, 3, ENC_BIG_ENDIAN);
1608 if (num_chan == 0)
1610 proto_tree_add_item(tree, hf_gsm_a_bssmap_tch_14_5kb, tvb, curr_offset, 1, ENC_NA);
1611 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, (curr_offset<<3)+6, 1, ENC_BIG_ENDIAN);
1612 proto_tree_add_item(tree, hf_gsm_a_bssmap_tch_12kb, tvb, curr_offset, 1, ENC_NA);
1613 proto_tree_add_item(tree, hf_gsm_a_bssmap_tch_6kb, tvb, curr_offset, 1, ENC_NA);
1615 else
1617 proto_tree_add_item(tree, hf_gsm_a_bssmap_tch_14_5_14_4kb, tvb, curr_offset, 1, ENC_NA);
1618 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, (curr_offset<<3)+6, 1, ENC_BIG_ENDIAN);
1619 proto_tree_add_item(tree, hf_gsm_a_bssmap_tch_12_9kb, tvb, curr_offset, 1, ENC_NA);
1620 proto_tree_add_item(tree, hf_gsm_a_bssmap_tch_6_4_8kb, tvb, curr_offset, 1, ENC_NA);
1623 curr_offset++;
1625 else if (sdi == 0x03)
1627 /* signalling */
1628 proto_tree_add_item(tree, hf_gsm_a_bssmap_data_channel_rate_and_type,
1629 tvb, curr_offset, 1, ENC_NA);
1631 curr_offset++;
1633 NO_MORE_DATA_CHECK(len);
1635 proto_tree_add_item(tree, hf_gsm_a_bssmap_spare, tvb, curr_offset, len - (curr_offset - offset), ENC_NA);
1637 curr_offset += len - (curr_offset - offset);
1639 else
1641 /* unknown format */
1643 proto_tree_add_item(tree, hf_gsm_a_bssmap_unknown_format, tvb, curr_offset, len - (curr_offset - offset), ENC_NA);
1645 curr_offset += len - (curr_offset - offset);
1648 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
1650 return curr_offset-offset;
1653 * 3.2.2.12 Periodicity
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_)
1658 uint32_t curr_offset;
1660 curr_offset = offset;
1661 proto_tree_add_item(tree, hf_gsm_a_bssmap_periodicity, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1662 curr_offset++;
1664 return curr_offset-offset;
1667 * 3.2.2.13 Extended Resource Indicator
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"
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_)
1678 uint32_t curr_offset;
1680 curr_offset = offset;
1682 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 proto_tree_add_item(tree, hf_gsm_a_bssmap_sm, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1685 /* Total Accessible Resource Requested field */
1686 proto_tree_add_item(tree, hf_gsm_a_bssmap_tarr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1687 curr_offset++;
1690 return curr_offset-offset;
1693 * 3.2.2.14 Total Resource Accessible
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_)
1698 uint32_t curr_offset;
1700 curr_offset = offset;
1702 /* Total number of accessible full rate channels */
1703 proto_tree_add_item(tree, hf_gsm_a_bssmap_tot_no_of_fullr_ch, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1704 curr_offset+=2;
1705 /* Total number of accessible half rate channels */
1706 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;*/
1710 return len;
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.
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_)
1719 uint32_t curr_offset;
1721 curr_offset = offset;
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.
1729 proto_tree_add_item(tree, hf_gsm_a_bssmap_lsa_id, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
1730 /*curr_offset+=3;*/
1733 return len;
1738 * 3.2.2.16 LSA Identifier List
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_)
1743 uint32_t curr_offset;
1745 curr_offset = offset;
1747 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 7, ENC_BIG_ENDIAN);
1748 proto_tree_add_item(tree, hf_gsm_a_bssmap_ep, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1749 curr_offset++;
1751 /* LSA identification 1 - n */
1753 while (curr_offset-offset < len) {
1754 proto_tree_add_item(tree, hf_gsm_a_bssmap_lsa_id, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
1755 curr_offset+=3;
1758 return len;
1761 * [2] 3.2.2.17 Cell Identifier
1762 * Formats everything after the discriminator, shared function
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)
1767 uint32_t value;
1768 uint32_t curr_offset;
1770 if (add_string)
1771 add_string[0] = '\0';
1772 curr_offset = offset;
1774 switch (disc)
1776 case 0x00:
1777 /* FALLTHRU */
1779 case 0x04:
1780 /* FALLTHRU */
1782 case 0x08: /* For intersystem handover from GSM to UMTS or cdma2000: */
1783 /* FALLTHRU */
1784 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
1798 /* FALLTHRU */
1799 case 0x0c: /* For identification of a UTRAN cell for cell load information: */
1800 if (disc != 0x0b)
1801 curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, number_type, true);
1802 else
1803 curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, number_type, false);
1804 /* FALLTHRU */
1806 case 0x01:
1807 case 0x05:
1808 case 0x0a: /*For intersystem handover from GSM to UMTS or cdma2000: */
1809 /* LAC */
1810 value = tvb_get_ntohs(tvb, curr_offset);
1811 proto_tree_add_item(tree, hf_gsm_a_bssmap_cell_lac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1812 curr_offset += 2;
1814 if (add_string)
1815 snprintf(add_string, string_len, " - LAC (0x%04x)", value);
1816 if (disc == 0x0b) {
1817 /* If SAI, SAC follows */
1818 value = tvb_get_ntohs(tvb, curr_offset);
1819 proto_tree_add_item(tree, hf_gsm_a_bssmap_sac, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1820 if (add_string) {
1821 char *str = ws_strdup_printf("%s/SAC (%u)", add_string, value);
1822 g_strlcpy(add_string, str, string_len);
1823 g_free(str);
1825 curr_offset += 2;
1826 break;
1828 /* FALLTHRU */
1830 case 0x09: /* For intersystem handover from GSM to UMTS or cdma2000: */
1832 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?
1838 value = tvb_get_ntohs(tvb, curr_offset);
1839 proto_tree_add_item(tree, hf_gsm_a_bssmap_be_rnc_id, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
1840 curr_offset += 2;
1842 if (add_string)
1844 if (add_string[0] == '\0')
1846 snprintf(add_string, string_len, " - RNC-ID (%u)", value);
1848 else
1850 char *str = ws_strdup_printf("%s/RNC-ID (%u)", add_string, value);
1851 g_strlcpy(add_string, str, string_len);
1852 g_free(str);
1855 break;
1858 if ((disc == 0x04) || (disc == 0x05) || (disc == 0x08)) break;
1860 /* FALLTHRU */
1862 case 0x02:
1863 /* CI */
1865 value = tvb_get_ntohs(tvb, curr_offset);
1866 proto_tree_add_uint(tree, hf_gsm_a_bssmap_cell_ci, tvb,
1867 curr_offset, 2, value);
1869 curr_offset += 2;
1871 if (add_string)
1873 if (add_string[0] == '\0')
1875 snprintf(add_string, string_len, " - CI (%u)", value);
1877 else
1879 char *str = ws_strdup_printf("%s/CI (%u)", add_string, value);
1880 g_strlcpy(add_string, str, string_len);
1881 g_free(str);
1884 break;
1885 default:
1886 proto_tree_add_item(tree, hf_gsm_a_bssmap_cell_id_unknown_format, tvb, curr_offset, len, ENC_NA);
1888 curr_offset += (len);
1889 break;
1892 return curr_offset-offset;
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)
1898 return be_cell_id_type(tvb, tree, pinfo, offset, len, add_string, string_len, disc, E212_NONE);
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)
1904 uint8_t oct;
1905 uint8_t disc;
1906 uint32_t curr_offset;
1908 curr_offset = offset;
1910 oct = tvb_get_uint8(tvb, curr_offset);
1912 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
1913 proto_tree_add_item(tree, hf_gsm_a_bssmap_be_cell_id_disc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1914 disc = oct&0x0f;
1915 cell_discriminator = disc; /* may be required later */
1916 curr_offset++;
1918 NO_MORE_DATA_CHECK(len);
1920 curr_offset +=
1921 be_cell_id_aux(tvb, tree, pinfo, curr_offset, len - (curr_offset - offset), add_string, string_len, disc);
1923 /* no length check possible */
1925 return curr_offset-offset;
1929 * [2] 3.2.2.18 Priority
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"
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"
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 },
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)
1951 uint8_t oct;
1952 uint32_t curr_offset;
1954 curr_offset = offset;
1956 oct = tvb_get_uint8(tvb, curr_offset);
1958 proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1959 proto_tree_add_item(tree, hf_gsm_a_bssmap_pci, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1960 proto_tree_add_item(tree, hf_gsm_a_bssmap_priority_level, tvb, curr_offset, 1, ENC_NA);
1962 if (add_string)
1963 snprintf(add_string, string_len, " - (%u)", (oct & 0x3c) >> 2);
1965 proto_tree_add_item(tree, hf_gsm_a_bssmap_qa, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1966 proto_tree_add_item(tree, hf_gsm_a_bssmap_pvi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1968 curr_offset++;
1970 /* no length check possible */
1972 return curr_offset-offset;
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
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
1989 * 3.2.2.21 Interference Band To Be Used
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_)
1994 uint32_t curr_offset;
1996 curr_offset = offset;
1998 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 3, ENC_BIG_ENDIAN);
1999 proto_tree_add_item(tree, hf_gsm_a_bssmap_interference_bands, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2000 curr_offset++;
2003 return curr_offset-offset;
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
2011 * 3.2.2.23 LSA Information
2014 static const true_false_string bssmap_lsa_only_value = {
2015 "Access to the LSAs that are defined",
2016 "Allowing emergency call"
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_)
2022 uint32_t curr_offset;
2024 curr_offset = offset;
2026 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 7, ENC_BIG_ENDIAN);
2027 proto_tree_add_item(tree, hf_gsm_a_bssmap_lsa_only, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2028 curr_offset++;
2030 while (curr_offset-offset < len) {
2031 /* LSA identification and attributes */
2032 /* 8 7 6 5 4 3 2 1
2033 * spare act pref priority
2035 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 2, ENC_BIG_ENDIAN);
2036 proto_tree_add_item(tree, hf_gsm_a_bssmap_act, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2037 proto_tree_add_item(tree, hf_gsm_a_bssmap_pref, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2038 proto_tree_add_item(tree, hf_gsm_a_bssmap_lsa_inf_prio, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2039 curr_offset++;
2040 proto_tree_add_item(tree, hf_gsm_a_bssmap_lsa_id, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
2041 curr_offset+=3;
2044 return len;
2047 * [2] 3.2.2.24 Layer 3 Information
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_)
2052 uint32_t curr_offset;
2053 tvbuff_t *l3_tvb;
2054 proto_item* ti;
2056 curr_offset = offset;
2058 proto_tree_add_bytes_format(tree, hf_gsm_a_bssmap_layer_3_information_value, tvb, curr_offset, len, NULL,
2059 "Layer 3 Information value");
2062 * dissect the embedded DTAP message
2064 l3_tvb = tvb_new_subset_length(tvb, curr_offset, len);
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. */
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 if ( cell_discriminator == 0xFF)
2082 ti = proto_tree_add_uint_format(tree, hf_gsm_a_bssmap_cell_discriminator, l3_tvb, curr_offset, 1, cell_discriminator,
2083 "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 proto_item_set_len(ti, len);
2086 else if ((cell_discriminator & 0x0f) < 8) {
2087 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 proto_item_set_hidden(ti);
2091 /* GSM */
2092 call_dissector(dtap_handle, l3_tvb, pinfo, g_tree);
2094 else if ((cell_discriminator & 0x0f) < 13) {
2095 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 proto_item_set_hidden(ti);
2099 /* UMTS or CDMA 2000 */
2100 dissect_rrc_HandoverToUTRANCommand_PDU(l3_tvb, pinfo, g_tree, NULL);
2102 else{
2103 ti = proto_tree_add_uint_format(tree, hf_gsm_a_bssmap_cell_discriminator, l3_tvb, curr_offset, 1, cell_discriminator,
2104 "Unrecognised Cell Discriminator %x",cell_discriminator);
2105 proto_item_set_len(ti, len);
2107 curr_offset += len;
2109 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
2111 return curr_offset-offset;
2115 * [2] 3.2.2.25 DLCI
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_)
2120 uint8_t oct;
2121 uint32_t curr_offset;
2122 proto_tree *subtree;
2124 curr_offset = offset;
2126 subtree =
2127 proto_tree_add_subtree(tree, tvb, curr_offset, 1,
2128 ett_dlci, NULL, "Data Link Connection Identifier");
2130 oct = tvb_get_uint8(tvb, curr_offset);
2132 proto_tree_add_uint(subtree, hf_gsm_a_bssmap_dlci_cc, tvb, curr_offset, 1, oct);
2133 proto_tree_add_uint(subtree, hf_gsm_a_bssmap_dlci_spare, tvb, curr_offset, 1, oct);
2134 proto_tree_add_uint(subtree, hf_gsm_a_bssmap_dlci_sapi, tvb, curr_offset, 1, oct);
2136 curr_offset++;
2138 /* no length check possible */
2140 return curr_offset-offset;
2144 * [2] 3.2.2.26 Downlink DTX Flag
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_)
2149 uint32_t curr_offset = offset;
2151 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 7, ENC_BIG_ENDIAN);
2152 proto_tree_add_item(tree, hf_gsm_a_bssmap_bss_activate_downlink, tvb, curr_offset, 1, ENC_NA);
2153 curr_offset++;
2155 /* no length check possible */
2157 return curr_offset-offset;
2161 * [2] 3.2.2.27 Cell Identifier List
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)
2166 uint8_t oct;
2167 uint16_t consumed;
2168 uint8_t disc;
2169 uint8_t num_cells;
2170 uint32_t curr_offset;
2171 proto_item *item = NULL;
2172 proto_tree *subtree = NULL;
2174 curr_offset = offset;
2176 oct = tvb_get_uint8(tvb, curr_offset);
2178 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
2180 disc = oct & 0x0f;
2181 cell_discriminator = disc; /* may be required later */
2182 proto_tree_add_item(tree, hf_gsm_a_bssmap_be_cell_id_disc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2183 curr_offset++;
2185 NO_MORE_DATA_CHECK(len);
2187 num_cells = 0;
2190 subtree =
2191 proto_tree_add_subtree_format(tree,
2192 tvb, curr_offset, -1,
2193 ett_cell_list, &item, "Cell %u",
2194 num_cells + 1);
2196 if (add_string)
2197 add_string[0] = '\0';
2199 consumed =
2200 be_cell_id_aux(tvb, subtree, pinfo, curr_offset, len - (curr_offset - offset), add_string, string_len, disc);
2202 if (add_string && add_string[0] != '\0')
2203 proto_item_append_text(item, "%s", add_string);
2205 proto_item_set_len(item, consumed);
2207 curr_offset += consumed;
2209 num_cells++;
2211 while ((len - (curr_offset - offset)) > 0 && consumed > 0);
2213 if (add_string) {
2214 snprintf(add_string, string_len, " - %u cell%s",
2215 num_cells, plurality(num_cells, "", "s"));
2218 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
2220 return curr_offset-offset;
2223 * 3.2.2.27a Cell Identifier List Segment
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 }
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_)
2241 uint32_t curr_offset;
2243 curr_offset = offset;
2245 /* Sequence Length */
2246 proto_tree_add_item(tree, hf_gsm_a_bssmap_seq_len, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2247 /* Sequence Number */
2248 proto_tree_add_item(tree, hf_gsm_a_bssmap_seq_no, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2249 curr_offset++;
2251 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 proto_tree_add_item(tree, hf_gsm_a_bssap_cell_id_list_seg_cell_id_disc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2254 curr_offset++;
2255 proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len-2);
2258 return len;
2262 * 3.2.2.27b Cell Identifier List Segment for established cells
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_)
2267 uint32_t curr_offset;
2269 curr_offset = offset;
2271 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 proto_tree_add_item(tree, hf_gsm_a_bssap_cell_id_list_seg_cell_id_disc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2274 curr_offset++;
2276 proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len-1);
2279 return len;
2282 * 3.2.2.27c Cell Identifier List Segment for cells to be established
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_)
2287 uint32_t curr_offset;
2289 curr_offset = offset;
2291 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 proto_tree_add_item(tree, hf_gsm_a_bssap_cell_id_list_seg_cell_id_disc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2294 curr_offset++;
2296 proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len-1);
2299 return len;
2302 * 3.2.2.27d (void)
2305 * 3.2.2.27e Cell Identifier List Segment for released cells - no user present
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_)
2310 uint32_t curr_offset;
2312 curr_offset = offset;
2314 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 proto_tree_add_item(tree, hf_gsm_a_bssap_cell_id_list_seg_cell_id_disc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2317 curr_offset++;
2319 proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len-1);
2322 return len;
2325 * 3.2.2.27f Cell Identifier List Segment for not established cells - no establishment possible
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_)
2330 uint32_t curr_offset;
2332 curr_offset = offset;
2334 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 proto_tree_add_item(tree, hf_gsm_a_bssap_cell_id_list_seg_cell_id_disc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2337 curr_offset++;
2339 proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len-1);
2342 return len;
2345 * 3.2.2.28 Response Request
2346 * No data
2349 * 3.2.2.29 Resource Indication Method
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 }
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_)
2362 uint32_t curr_offset;
2364 curr_offset = offset;
2366 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
2367 proto_tree_add_item(tree, hf_gsm_a_bssap_res_ind_method, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2368 curr_offset++;
2370 return len;
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
2379 * 3.2.2.31 Circuit Identity Code List
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_)
2384 uint32_t curr_offset;
2386 curr_offset = offset;
2388 proto_tree_add_item(tree, hf_gsm_a_bssap_cic_list_range, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2389 proto_tree_add_item(tree, hf_gsm_a_bssap_cic_list_status, tvb, (curr_offset+1), (len-1), ENC_NA);
2391 return len;
2394 * 3.2.2.32 Diagnostics
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_)
2399 uint32_t curr_offset;
2401 curr_offset = offset;
2403 proto_tree_add_item(tree, hf_gsm_a_bssap_diag_error_pointer, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
2404 curr_offset += 2;
2405 NO_MORE_DATA_CHECK(len);
2406 proto_tree_add_item(tree, hf_gsm_a_bssap_diag_msg_rcv, tvb, curr_offset, (len-2), ENC_NA);
2408 return len;
2411 * [2] 3.2.2.33 Chosen Channel
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 }
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 }
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 }
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 }
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 }
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_)
2475 uint32_t curr_offset;
2477 curr_offset = offset;
2479 /* Channel mode */
2480 proto_tree_add_item(tree, hf_gsm_a_bssmap_ch_mode, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2482 proto_tree_add_item(tree, hf_gsm_a_bssmap_channel, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2484 curr_offset++;
2486 /* no length check possible */
2488 return curr_offset-offset;
2492 * [2] 3.2.2.34 Cipher Response Mode
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_)
2497 uint32_t curr_offset = offset;
2499 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 7, ENC_BIG_ENDIAN);
2500 proto_tree_add_item(tree, hf_gsm_a_bssmap_imeisv_included, tvb, curr_offset, 1, ENC_NA);
2502 curr_offset++;
2504 /* no length check possible */
2506 return curr_offset-offset;
2511 * [2] 3.2.2.35 Layer 3 Message Contents
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_)
2516 tvbuff_t *l3_tvb;
2517 uint16_t word;
2519 proto_tree_add_bytes_format(tree, hf_gsm_a_bssmap_layer3_message_contents, tvb, offset, len, NULL,
2520 "Layer 3 Message Contents");
2523 * dissect the embedded DTAP message
2525 l3_tvb = tvb_new_subset_length(tvb, offset, len);
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.
2533 word = tvb_get_ntohs(tvb, offset);
2534 if(word==0x1709){
2535 /* start the dissection from byte 3 */
2536 de_mid(l3_tvb, tree, pinfo, 2, 9, NULL, 0);
2537 return len;
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 call_dissector(dtap_handle, l3_tvb, pinfo, g_tree);
2543 return len;
2547 * [2] 3.2.2.36 Channel Needed
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_)
2552 uint32_t curr_offset;
2554 curr_offset = offset;
2556 /* no length check possible */
2557 proto_tree_add_bits_item(tree, hf_gsm_a_rr_chnl_needed_ch1, tvb, (curr_offset<<3)+6, 2, ENC_BIG_ENDIAN);
2559 curr_offset++;
2561 return curr_offset-offset;
2564 * 3.2.2.37 Trace Type
2565 * coded as the MSC/BSS Trace Type specified in 3GPP TS 52.008
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_)
2570 uint32_t curr_offset;
2571 int bit_offset;
2573 bit_offset = (offset<<3);
2574 curr_offset = offset;
2576 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_trace_priority_indication, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2577 bit_offset ++;
2578 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2579 bit_offset ++;
2580 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_trace_bss_record_type, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2581 bit_offset += 2;
2582 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_trace_msc_record_type, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2583 bit_offset += 2;
2584 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 curr_offset++;
2588 /* no length check possible */
2590 return curr_offset-offset;
2594 * [2] 3.2.2.38 TriggerID
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_)
2599 uint32_t curr_offset;
2601 curr_offset = offset;
2603 proto_tree_add_item(tree, hf_gsm_a_bssmap_trace_trigger_id, tvb, curr_offset, len, ENC_ASCII);
2604 curr_offset += len;
2606 /* no length check possible */
2608 return curr_offset-offset;
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_)
2615 uint32_t curr_offset;
2617 curr_offset = offset;
2620 proto_tree_add_item(tree, hf_gsm_a_bssmap_trace_reference, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
2621 curr_offset +=2;
2623 /* no length check possible */
2625 return curr_offset-offset;
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_)
2631 uint32_t curr_offset;
2633 curr_offset = offset;
2636 if (len == 1)
2638 proto_tree_add_item(tree, hf_gsm_a_bssmap_trace_reference, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2639 curr_offset ++;
2641 else
2643 proto_tree_add_item(tree, hf_gsm_a_bssmap_trace_reference, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
2644 curr_offset +=2;
2647 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
2649 return curr_offset-offset;
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
2656 * 3.2.2.42 OMCID
2657 * For the OMC identity, see 3GPP TS 52.021
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_)
2662 uint32_t curr_offset;
2664 curr_offset = offset;
2666 proto_tree_add_item(tree, hf_gsm_a_bssmap_trace_omc_id, tvb, curr_offset, len, ENC_ASCII);
2667 curr_offset += len;
2669 /* no length check possible */
2671 return curr_offset-offset;
2674 * [2] 3.2.2.43 Forward Indicator
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 },
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_)
2687 uint32_t curr_offset = offset;
2689 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 4, ENC_BIG_ENDIAN);
2690 proto_tree_add_item(tree, hf_gsm_a_bssmap_forward_indicator, tvb, curr_offset, 1, ENC_NA);
2691 curr_offset++;
2693 /* no length check possible */
2695 return curr_offset-offset;
2699 * [2] 3.2.2.44 Chosen Encryption Algorithm
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 }
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)
2716 uint8_t oct;
2717 uint32_t curr_offset;
2719 curr_offset = offset;
2721 oct = tvb_get_uint8(tvb, curr_offset);
2723 proto_tree_add_item(tree, hf_gsm_a_bssmap_algorithm_identifier, tvb, curr_offset, 1, ENC_NA);
2725 curr_offset++;
2727 if (add_string)
2728 snprintf(add_string, string_len, " - %s", val_to_str_const(oct, gsm_a_bssmap_algorithm_id_vals, "Unknown"));
2730 /* no length check possible */
2732 return curr_offset-offset;
2736 * [2] 3.2.2.45 Circuit Pool
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)
2741 uint8_t oct;
2742 uint32_t curr_offset;
2743 proto_item* ti;
2745 curr_offset = offset;
2747 oct = tvb_get_uint8(tvb, curr_offset);
2749 ti = proto_tree_add_item(tree, hf_gsm_a_bssmap_circuit_pool_number, tvb, curr_offset, 1, ENC_NA);
2750 if (oct <= 50)
2752 /* No extra string */
2754 else if ((oct >= 0x80) && (oct <= 0x8f))
2756 proto_item_append_text(ti, ", for national/local use");
2758 else
2760 proto_item_append_text(ti, ", reserved for future international use");
2763 curr_offset++;
2765 if (add_string)
2766 snprintf(add_string, string_len, " - (%u)", oct);
2768 /* no length check possible */
2770 return curr_offset-offset;
2773 * 3.2.2.46 Circuit Pool List
2774 * 3.2.2.47 Time Indication
2775 * 3.2.2.48 Resource Situation
2778 * [2] 3.2.2.49 Current Channel Type 1
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_)
2783 uint32_t curr_offset;
2785 curr_offset = offset;
2787 /* Channel mode */
2788 proto_tree_add_item(tree, hf_gsm_a_bssmap_cur_ch_mode, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2789 /* Channel */
2790 proto_tree_add_item(tree, hf_gsm_a_bssmap_channel, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2792 curr_offset++;
2794 /* no length check possible */
2796 return curr_offset-offset;
2800 * [2] 3.2.2.50 Queuing Indicator
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_)
2805 uint32_t curr_offset = offset;
2807 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 6, ENC_BIG_ENDIAN);
2808 proto_tree_add_item(tree, hf_gsm_a_bssmap_qri, tvb, curr_offset, 1, ENC_NA);
2810 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, (curr_offset<<3)+7, 1, ENC_BIG_ENDIAN);
2812 curr_offset++;
2814 /* no length check possible */
2816 return curr_offset-offset;
2820 * [2] 3.2.2.51 Speech Version
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" },
2842 { 0, 0, NULL },
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" },
2857 { 0, 0, NULL },
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)
2863 uint8_t oct;
2864 uint32_t curr_offset;
2866 curr_offset = offset;
2868 oct = tvb_get_uint8(tvb, curr_offset);
2870 proto_tree_add_item(tree, hf_gsm_a_b8spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
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.
2875 proto_tree_add_item(tree, hf_gsm_a_bssmap_speech_version_id, tvb, curr_offset, 1, ENC_NA);
2876 curr_offset++;
2878 if (add_string)
2879 snprintf(add_string, string_len, " - (%s)", rval_to_str_const(oct & 0x7f, speech_version_id_short_rvals, "Reserved"));
2881 /* no length check possible */
2883 return curr_offset-offset;
2886 * 3.2.2.52 Assignment Requirement
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 }
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_)
2897 proto_tree_add_item(tree, hf_gsm_a_bssmap_ass_req, tvb, offset, 1, ENC_BIG_ENDIAN);
2899 return 1;
2902 * 3.2.2.53 (void)
2905 * 3.2.2.54 Talker Flag
2906 * No data
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)
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.
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 }
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_)
2935 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, offset << 3, 5, ENC_BIG_ENDIAN);
2936 proto_tree_add_item(tree, hf_gsm_a_bssmap_emlpp_prio, tvb, offset, 1, ENC_BIG_ENDIAN);
2938 return 1;
2942 * 3.2.2.57 Configuration Evolution Indication
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 }
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_)
2959 uint32_t curr_offset;
2961 curr_offset = offset;
2963 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 proto_tree_add_item(tree, hf_gsm_a_bssmap_smi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
2966 curr_offset++;
2968 return curr_offset-offset;
2971 * 3.2.2.58 Old BSS to New BSS information
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)
2978 uint16_t len;
2979 if (!tree) {
2980 return;
2983 g_tree = tree;
2985 len = tvb_reported_length(tvb);
2986 be_field_element_dissect(tvb, tree, pinfo, 0, len, NULL, 0);
2988 g_tree = NULL;
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.)
2998 * 3.2.2.61 LSA Access Control Suppression
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.
3005 /* Location Information definitions */
3006 static const value_string lcs_priority_vals[] = {
3007 { 0, "highest" },
3008 { 1, "normal" },
3009 { 0, NULL}
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_)
3015 uint32_t curr_offset;
3017 curr_offset = offset;
3019 /* This octet is coded as the LCS-Priority octet in 3GPP TS 29.002 */
3020 proto_tree_add_item(tree, hf_gsm_a_bssmap_lcs_pri, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3021 curr_offset++;
3023 return curr_offset-offset;
3027 * 3.2.2.63 Location Type (Location Type element of 3GPP TS 49.031 BSSAP-LE.)
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_)
3032 uint32_t curr_offset;
3033 uint8_t location_information;
3035 curr_offset = offset;
3037 /* Extract the location information and add to protocol tree */
3038 location_information = tvb_get_uint8(tvb, offset);
3039 proto_tree_add_item(tree, hf_gsm_a_bssmap_location_type_location_information, tvb, offset, 1, ENC_BIG_ENDIAN);
3040 curr_offset++;
3042 if (location_information == 1 || location_information == 2)
3044 /* protocol method */
3045 proto_tree_add_item(tree, hf_gsm_a_bssmap_location_type_positioning_method, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3046 curr_offset++;
3049 return curr_offset-offset;
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.
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_)
3060 tvbuff_t *data_tvb;
3061 uint32_t curr_offset;
3063 curr_offset = offset;
3065 data_tvb = tvb_new_subset_length(tvb, curr_offset, len);
3066 dissect_geographical_description(data_tvb, pinfo, tree);
3068 return len;
3071 * 3.2.2.65 Positioning Data
3072 * Positioning Data element of 3GPP TS 49.031 BSSAP-LE.
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_)
3077 uint32_t curr_offset;
3078 uint8_t i;
3079 uint64_t pos_data_disc;
3080 int bit_offset;
3082 curr_offset = offset;
3084 /* Spare bits */
3085 bit_offset = (offset<<3);
3086 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3087 bit_offset += 4;
3089 /* Extract the positioning data discriminator and add to protocol tree */
3090 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 bit_offset += 4;
3092 curr_offset++;
3094 if (pos_data_disc == 0)
3096 /* Extract the positioning methods and add to protocol tree */
3097 for (i = 0; i < len-1; i++)
3099 /* Extract the positioning method and add to protocol tree */
3100 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_positioning_method, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
3101 bit_offset += 5;
3102 /* Extract the usage and add to protocol tree */
3103 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_positioning_method_usage, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3104 bit_offset += 3;
3105 curr_offset++;
3109 return curr_offset-offset;
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
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
3124 * 3.2.2.68 3GPP TS 48.008 version 6.9.0 Release 6
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
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 }
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_)
3143 uint32_t curr_offset;
3144 uint8_t apdu_protocol_id;
3145 tvbuff_t *APDU_tvb;
3147 curr_offset = offset;
3149 proto_tree_add_bytes_format(tree, hf_gsm_a_bssmap_apdu, tvb, curr_offset, len, NULL, "APDU");
3152 * dissect the embedded APDU message
3153 * if someone writes a TS 09.31 dissector
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.
3159 apdu_protocol_id = tvb_get_uint8(tvb,curr_offset);
3160 proto_tree_add_item(tree, hf_gsm_a_bssmap_apdu_protocol_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3161 curr_offset++;
3162 len--;
3164 switch (apdu_protocol_id) {
3165 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)
3169 APDU_tvb = tvb_new_subset_length(tvb, curr_offset, len);
3170 if (gsm_bsslap_handle)
3171 call_dissector(gsm_bsslap_handle, APDU_tvb, pinfo, g_tree);
3172 break;
3173 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).
3178 break;
3179 case 3:
3180 /* SMLCPP
3181 * The embedded message is as defined in 3GPP TS 08.31(TS 48.031).
3183 break;
3184 default:
3185 break;
3188 curr_offset += len;
3190 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
3192 return curr_offset-offset;
3195 * 3.2.2.69 Network Element Identity
3196 * Network Element Identity element of 3GPP TS 49.031 BSSAP-LE.
3199 * 3.2.2.70 GPS Assistance Data
3200 * Requested GPS Data element of 3GPP TS 49.031 BSSAP-LE.
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_)
3205 uint32_t curr_offset;
3207 curr_offset = offset;
3209 proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len);
3212 return len;
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
3220 /* 3.2.2.72 Return Error Request
3221 * Return Error Request element of 3GPP TS 49.031 BSSAP-LE.
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_)
3226 uint32_t curr_offset;
3228 curr_offset = offset;
3230 proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len);
3232 return len;
3235 * 3.2.2.73 Return Error Cause
3236 * Return Error Cause element of 3GPP TS 49.031 BSSAP-LE.
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_)
3241 uint32_t curr_offset;
3243 curr_offset = offset;
3245 proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len);
3247 return len;
3250 * 3.2.2.74 Segmentation
3251 * Segmentation element of 3GPP TS 49.031 BSSAP-LE.
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_)
3256 uint32_t curr_offset;
3258 curr_offset = offset;
3260 proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len);
3262 return len;
3265 * 3.2.2.75 Service Handover
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 }
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_)
3281 uint32_t curr_offset;
3283 curr_offset = offset;
3285 /* Service Handover information */
3286 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 5, ENC_BIG_ENDIAN);
3287 proto_tree_add_item(tree, hf_gsm_a_bssmap_serv_ho_inf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3288 curr_offset++;
3289 return len;
3293 * 3.2.2.76 Source RNC to target RNC transparent information (UMTS)
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_)
3299 tvbuff_t *container_tvb;
3300 uint32_t curr_offset;
3302 curr_offset = offset;
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
3308 container_tvb = tvb_new_subset_length(tvb, curr_offset, len);
3309 dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU(container_tvb, pinfo, tree, NULL);
3311 return len;
3314 * 3.2.2.77 Source RNC to target RNC transparent information (cdma2000)
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_)
3319 uint32_t curr_offset;
3321 curr_offset = offset;
3323 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.
3328 return len;
3331 * 3.2.2.78 GERAN Classmark
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 }
3342 static const true_false_string gsm_a_bssmap_accept_not_accept_vals = {
3343 "Acceptable",
3344 "Not acceptable"
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_)
3349 uint32_t curr_offset;
3351 curr_offset = offset;
3353 if (len > 2) {
3354 de_sup_codec_list(tvb, tree, pinfo, curr_offset, (len-2), NULL, 0);
3356 curr_offset += len-2;
3357 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 5, ENC_BIG_ENDIAN);
3358 proto_tree_add_item(tree, hf_gsm_a_bssmap_max_nb_traffic_chan, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3359 curr_offset++;
3360 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 3, ENC_BIG_ENDIAN);
3361 proto_tree_add_item(tree, hf_gsm_a_bssmap_acceptable_chan_coding_bit5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3362 proto_tree_add_item(tree, hf_gsm_a_bssmap_acceptable_chan_coding_bit4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3363 proto_tree_add_item(tree, hf_gsm_a_bssmap_acceptable_chan_coding_bit3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3364 proto_tree_add_item(tree, hf_gsm_a_bssmap_acceptable_chan_coding_bit2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3365 proto_tree_add_item(tree, hf_gsm_a_bssmap_acceptable_chan_coding_bit1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3367 return len;
3370 * 3.2.2.79 GERAN BSC Container
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_)
3375 uint32_t curr_offset;
3377 curr_offset = offset;
3379 proto_tree_add_item(tree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3380 curr_offset++;
3381 NO_MORE_DATA_CHECK(len);
3382 proto_tree_add_item(tree, hf_gsm_a_bssmap_allowed_data_rate_bit8, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3383 proto_tree_add_item(tree, hf_gsm_a_bssmap_allowed_data_rate_bit7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3384 proto_tree_add_item(tree, hf_gsm_a_bssmap_allowed_data_rate_bit6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3385 proto_tree_add_item(tree, hf_gsm_a_bssmap_allowed_data_rate_bit5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3386 proto_tree_add_item(tree, hf_gsm_a_bssmap_allowed_data_rate_bit4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3387 proto_tree_add_item(tree, hf_gsm_a_bssmap_max_nb_traffic_chan, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3389 return len;
3392 * 3.2.2.80 New BSS to Old BSS Information
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)
3399 uint16_t len;
3400 if (!tree) {
3401 return;
3404 g_tree = tree;
3406 len = tvb_reported_length(tvb);
3407 be_field_element_dissect(tvb, tree, pinfo, 0, len, NULL, 0);
3409 g_tree = NULL;
3414 * 3.2.2.81 Inter-System Information
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_)
3419 tvbuff_t *new_tvb;
3421 new_tvb = tvb_new_subset_length(tvb, offset, len);
3423 if (new_tvb) {
3424 dissect_ranap_InterSystemInformation_TransparentContainer_PDU(new_tvb, pinfo, tree, NULL);
3427 return len;
3430 * 3.2.2.82 SNA Access Information
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_)
3435 uint32_t curr_offset;
3437 curr_offset = offset;
3439 proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len);
3441 return len;
3445 * 3.2.2.83 VSTK_RAND Information
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_)
3450 uint32_t curr_offset;
3451 uint64_t vstk_rand;
3453 curr_offset = offset;
3455 vstk_rand = tvb_get_ntoh40(tvb, curr_offset);
3456 vstk_rand >>= 4;
3457 proto_tree_add_uint64(tree, hf_gsm_a_bssmap_vstk_rand, tvb, curr_offset, 5, vstk_rand);
3458 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, (((curr_offset+4)<<3)+4), 4, ENC_BIG_ENDIAN);
3460 return len;
3463 * 3.2.2.84 VSTK information
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_)
3468 proto_tree_add_item(tree, hf_gsm_a_bssmap_vstk, tvb, offset, 16, ENC_NA);
3470 return len;
3473 * 3.2.2.85 Paging Information
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.
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"
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 }
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_)
3495 uint32_t curr_offset;
3497 curr_offset = offset;
3499 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 5, ENC_BIG_ENDIAN);
3500 proto_tree_add_item(tree, hf_gsm_a_bssmap_paging_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3501 proto_tree_add_item(tree, hf_gsm_a_bssmap_paging_inf_flg, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3502 curr_offset++;
3504 return curr_offset-offset;
3507 * 3.2.2.86 IMEI
3508 * Use same dissector as IMSI 3.2.2.6
3512 * 3.2.2.87 Velocity Estimate
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)
3517 dissect_description_of_velocity(tvb, tree, pinfo, offset, len, add_string, string_len);
3519 return len;
3522 * 3.2.2.88 VGCS Feature Flags
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"
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"
3536 static const true_false_string gsm_bssmap_asind_b3_vals = {
3537 "A-interface link sharing" ,
3538 "No A-interface link sharing"
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"
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"
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_)
3556 uint32_t curr_offset;
3558 curr_offset = offset;
3560 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 3, ENC_BIG_ENDIAN);
3561 proto_tree_add_item(tree, hf_gsm_a_bssmap_tcp, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3562 proto_tree_add_item(tree, hf_gsm_a_bssmap_bss_res, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3563 proto_tree_add_item(tree, hf_gsm_a_bssmap_asind_b3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3564 proto_tree_add_item(tree, hf_gsm_a_bssmap_asind_b2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3565 proto_tree_add_item(tree, hf_gsm_a_bssmap_tpind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3567 curr_offset++;
3569 return curr_offset-offset;
3572 * 3.2.2.89 Talker Priority
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 }
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_)
3585 uint32_t curr_offset;
3587 curr_offset = offset;
3589 proto_tree_add_item(tree, hf_gsm_a_bssmap_talker_pri, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3590 curr_offset++;
3592 EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
3594 return curr_offset-offset;
3598 * 3.2.2.90 Emergency Set Indication
3599 * No data
3602 * 3.2.2.91 Talker Identity
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_)
3607 uint32_t curr_offset;
3609 curr_offset = offset;
3611 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, curr_offset<<3, 5, ENC_BIG_ENDIAN);
3612 proto_tree_add_item(tree, hf_gsm_a_bssmap_filler_bits, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3613 curr_offset++;
3614 proto_tree_add_item(tree, hf_gsm_a_bssmap_talker_identity_field, tvb, curr_offset, len-1, ENC_NA);
3616 return len;
3619 * 3.2.2.92 SMS to VGCS
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_)
3624 /* The SMS content field is coded as follows - this field contains
3625 * the RP-DATA message as defined in 3GPP TS 24.011.
3627 rp_data_n_ms(tvb, tree, pinfo, offset, len);
3630 return len;
3633 * 3.2.2.93 VGCS talker mode
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 }
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 }
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_)
3662 uint32_t curr_offset;
3664 curr_offset = offset;
3666 proto_tree_add_item(tree, hf_gsm_a_bssmap_rr_mode, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3667 proto_tree_add_item(tree, hf_gsm_a_bssmap_group_cipher_key_nb, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3668 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, ((curr_offset<<3)+6), 2, ENC_BIG_ENDIAN);
3670 return len;
3673 * 3.2.2.94 VGCS/VBS Cell Status
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 }
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_)
3689 uint32_t curr_offset;
3691 curr_offset = offset;
3693 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, (curr_offset<<3), 5, ENC_BIG_ENDIAN);
3694 proto_tree_add_item(tree, hf_gsm_a_bssmap_vgcs_vbs_cell_status, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3696 return len;
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
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_)
3706 uint32_t curr_offset;
3708 curr_offset = offset;
3710 proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len);
3712 return len;
3715 * 3.2.2.96 GANSS Positioning Data
3716 * XXX move to packet-gsm_bssmap_le.c
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 }
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 }
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 }
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_)
3748 uint32_t curr_offset;
3750 curr_offset = offset;
3752 proto_tree_add_item(tree, hf_gsm_a_bssmap_method, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3753 proto_tree_add_item(tree, hf_gsm_a_bssmap_ganss_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3754 proto_tree_add_item(tree, hf_gsm_a_bssmap_usage, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3755 curr_offset++;
3757 return curr_offset-offset;
3760 * 3.2.2.97 GANSS Location Type
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_)
3765 uint32_t curr_offset;
3767 curr_offset = offset;
3769 proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len);
3771 return len;
3774 * 3.2.2.98 Application Data
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_)
3779 uint32_t curr_offset;
3781 curr_offset = offset;
3783 proto_tree_add_expert(tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet, tvb, curr_offset, len);
3785 return len;
3788 * 3.2.2.99 Data Identity
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_)
3793 proto_tree_add_item(tree, hf_gsm_a_bssmap_data_id, tvb, offset, 1, ENC_BIG_ENDIAN);
3795 return len;
3798 * 3.2.2.100 Application Data Information
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"
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_)
3807 uint32_t curr_offset;
3809 curr_offset = offset;
3811 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, (curr_offset<<3), 7, ENC_BIG_ENDIAN);
3812 proto_tree_add_item(tree, hf_gsm_a_bssmap_bt_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3814 return len;
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.
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_)
3823 tvbuff_t *new_tvb;
3825 new_tvb = tvb_new_subset_length(tvb, offset, len);
3826 if (new_tvb) {
3827 dissect_gsm_map_msisdn(new_tvb, pinfo , tree);
3830 return len;
3833 * 3.2.2.102 AoIP Transport Layer Address
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_)
3838 uint32_t curr_offset;
3839 uint8_t addr_type;
3840 uint32_t rtp_ipv4_address;
3841 uint16_t rtp_port;
3842 address rtp_dst_addr;
3843 ws_in6_addr rtp_addr_ipv6;
3845 curr_offset = offset;
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.
3851 switch (len) {
3852 case 6:
3853 /* IPv4 */
3854 addr_type = 1;
3855 proto_tree_add_item(tree, hf_gsm_a_bssmap_aoip_trans_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
3856 rtp_ipv4_address = tvb_get_ipv4(tvb, curr_offset);
3857 curr_offset+=4;
3858 break;
3859 case 18:
3860 /* IPv6 */
3861 addr_type = 2;
3862 proto_tree_add_item(tree, hf_gsm_a_bssmap_aoip_trans_ipv6, tvb, curr_offset, 16, ENC_NA);
3863 tvb_get_ipv6(tvb, curr_offset, &rtp_addr_ipv6);
3864 curr_offset+=16;
3865 break;
3866 default:
3867 /* Bogus */
3868 proto_tree_add_expert_format(tree, pinfo, &ei_gsm_a_bssmap_bogus_length, tvb, curr_offset, len, "Bogus length %u",len);
3869 return len;
3871 proto_tree_add_item(tree, hf_gsm_a_bssmap_aoip_trans_port, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
3872 rtp_port = tvb_get_ntohs(tvb,curr_offset);
3873 curr_offset+=2;
3875 switch (addr_type) {
3876 case 1:
3877 /* IPv4 */
3878 rtp_dst_addr.type = AT_IPv4;
3879 rtp_dst_addr.len = 4;
3880 rtp_dst_addr.data = (uint8_t *)&rtp_ipv4_address;
3881 break;
3882 case 2:
3883 /* IPv6 */
3884 rtp_dst_addr.type = AT_IPv6;
3885 rtp_dst_addr.len = 16;
3886 rtp_dst_addr.data = (uint8_t *)&rtp_addr_ipv6;
3887 break;
3890 if ((!pinfo->fd->visited) && rtp_port != 0) {
3891 rtp_add_address(pinfo, PT_UDP, &rtp_dst_addr, rtp_port, 0, "BSS MAP", pinfo->num, false, 0);
3892 rtcp_add_address(pinfo, &rtp_dst_addr, rtp_port+1, 0, "BSS MAP", pinfo->num);
3894 return curr_offset-offset;
3897 * 3.2.2.103 Speech Codec List
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.
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.
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
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"
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"
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"
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"
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 }
3960 static value_string_ext bssap_speech_codec_values_ext = VALUE_STRING_EXT_INIT(bssap_speech_codec_values);
3962 static const value_string bssap_extended_codec_values[] = {
3963 { 0xfd, "CSData" },
3964 { 0, NULL }
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_)
3970 uint32_t curr_offset, consumed = 0;
3971 uint8_t codec;
3972 uint8_t number = 0;
3973 proto_item *item = NULL;
3974 proto_tree *subtree = NULL;
3976 curr_offset = offset;
3978 while (curr_offset-offset < len) {
3979 number++;
3980 consumed = 0;
3981 subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 1,
3982 ett_codec_lst, &item, "Speech Codec Element %u",number);
3983 codec = tvb_get_uint8(tvb,curr_offset)&0x0f;
3984 switch (codec) {
3985 case 0:
3986 /* GSM_FR is coded "0000" */
3987 /* fall through */
3988 case 1:
3989 /* GSM_HR is coded "0001" */
3990 /* fall through */
3991 case 2:
3992 /* GSM_EFR is coded "0010" */
3993 /* fall through */
3994 /* FI indicates Full IP */
3995 proto_tree_add_item(subtree, hf_gsm_a_bssmap_fi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3996 /* PI indicates PCMoIP */
3997 proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3998 /* PT indicates PCMoTDM */
3999 proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4000 /* TF indicates TFO support */
4001 proto_tree_add_item(subtree, hf_gsm_a_bssmap_tf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4002 /* Codec Type */
4003 proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4004 proto_item_append_text(item, " - %s",
4005 val_to_str_const(tvb_get_uint8(tvb, curr_offset) & 0x0f,
4006 bssap_speech_codec_values,
4007 "Unknown"));
4008 curr_offset++;
4009 consumed++;
4010 break;
4011 case 3:
4012 /* fall through */
4013 case 4:
4014 /* fall through */
4015 case 0xb:
4016 /* FR_AMR is coded '011'
4017 * HR_AMR is coded '100'
4018 * OHR_AMR is coded '1011'
4020 /* FI indicates Full IP */
4021 proto_tree_add_item(subtree, hf_gsm_a_bssmap_fi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4022 /* PI indicates PCMoIP */
4023 proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4024 /* PT indicates PCMoTDM */
4025 proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4026 /* TF indicates TFO support */
4027 proto_tree_add_item(subtree, hf_gsm_a_bssmap_tf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4028 /* Codec Type */
4029 proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4030 proto_item_append_text(item, " - %s",
4031 val_to_str_const(tvb_get_uint8(tvb, curr_offset) & 0x0f,
4032 bssap_speech_codec_values,
4033 "Unknown"));
4034 curr_offset++;
4035 consumed++;
4036 proto_tree_add_item(subtree, hf_gsm_a_bssmap_s0_s15, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
4037 curr_offset+=2;
4038 consumed+=2;
4039 break;
4040 case 0x9:
4041 /* fall through */
4042 case 0xc:
4043 /* fall through */
4044 case 0xd:
4045 /* FR_AMR-WB is coded '1001'
4046 * OFR_AMR-WB is coded '1100'
4047 * OHR_AMR-WB is coded '1101'
4049 /* FI indicates Full IP */
4050 proto_tree_add_item(subtree, hf_gsm_a_bssmap_fi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4051 /* PI indicates PCMoIP */
4052 proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4053 /* PT indicates PCMoTDM */
4054 proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4055 /* TF indicates TFO support */
4056 proto_tree_add_item(subtree, hf_gsm_a_bssmap_tf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4057 /* Codec Type */
4058 proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4059 proto_item_append_text(item, " - %s",
4060 val_to_str_const(tvb_get_uint8(tvb, curr_offset) & 0x0f,
4061 bssap_speech_codec_values,
4062 "Unknown"));
4063 curr_offset++;
4064 consumed++;
4065 proto_tree_add_item(subtree, hf_gsm_a_bssmap_s0_s7, tvb, curr_offset, 1, ENC_NA);
4066 curr_offset++;
4067 consumed++;
4068 break;
4069 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 proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4073 /* PT indicates PCMoTDM */
4074 proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4075 /* Codec Type */
4076 proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4077 curr_offset++;
4078 consumed++;
4079 /* Codec Extension */
4080 proto_tree_add_item(subtree, hf_gsm_a_bssap_extended_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4081 proto_item_append_text(item, " - %s",
4082 val_to_str_const(tvb_get_uint8(tvb, curr_offset),
4083 bssap_extended_codec_values,
4084 "Unknown"));
4085 curr_offset++;
4086 consumed++;
4087 proto_tree_add_item(subtree, hf_gsm_a_bssap_extended_codec_r2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4088 proto_tree_add_item(subtree, hf_gsm_a_bssap_extended_codec_r3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4089 curr_offset++;
4090 consumed++;
4091 break;
4092 default:
4093 proto_tree_add_expert(subtree, pinfo, &ei_gsm_a_bssap_unknown_codec, tvb, curr_offset, 2);
4094 curr_offset+=2;
4095 consumed+=2;
4096 break;
4099 proto_item_set_len(item, consumed);
4100 return len;
4103 * 3.2.2.104 Speech Codec
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"
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"
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"
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"
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_)
4124 uint32_t curr_offset, consumed = 0;
4125 uint8_t codec;
4126 uint8_t number = 0;
4127 proto_item *item = NULL;
4128 proto_tree *subtree = NULL;
4130 curr_offset = offset;
4132 while (curr_offset-offset < len) {
4133 number++;
4134 consumed = 0;
4135 subtree = proto_tree_add_subtree_format(tree, tvb, curr_offset, 1, ett_codec_lst, &item,
4136 "Speech Codec Element %u",number);
4137 codec = tvb_get_uint8(tvb,curr_offset)&0x0f;
4138 switch (codec) {
4139 case 0:
4140 /* GSM_FR is coded "0000" */
4141 /* fall through */
4142 case 1:
4143 /* GSM_HR is coded "0001" */
4144 /* fall through */
4145 case 2:
4146 /* GSM_EFR is coded "0010" */
4147 /* fall through */
4148 /* FI indicates Full IP */
4149 proto_tree_add_item(subtree, hf_gsm_a_bssmap_fi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4150 /* PI indicates PCMoIP */
4151 proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4152 /* PT indicates PCMoTDM */
4153 proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4154 /* TF indicates TFO support */
4155 proto_tree_add_item(subtree, hf_gsm_a_bssmap_tf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4156 /* Codec Type */
4157 proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4158 proto_item_append_text(item, " - %s",
4159 val_to_str_const(tvb_get_uint8(tvb, curr_offset) & 0x0f,
4160 bssap_speech_codec_values,
4161 "Unknown"));
4162 curr_offset++;
4163 consumed++;
4164 break;
4165 case 3:
4166 /* fall through */
4167 case 4:
4168 /* fall through */
4169 case 0xb:
4170 /* FR_AMR is coded '011'
4171 * HR_AMR is coded '100'
4172 * OHR_AMR is coded '1011'
4174 /* FI indicates Full IP */
4175 proto_tree_add_item(subtree, hf_gsm_a_bssmap_fi2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4176 /* PI indicates PCMoIP */
4177 proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4178 /* PT indicates PCMoTDM */
4179 proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4180 /* TF indicates TFO support */
4181 proto_tree_add_item(subtree, hf_gsm_a_bssmap_tf2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4182 /* Codec Type */
4183 proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4184 proto_item_append_text(item, " - %s",
4185 val_to_str_const(tvb_get_uint8(tvb, curr_offset) & 0x0f,
4186 bssap_speech_codec_values,
4187 "Unknown"));
4188 curr_offset++;
4189 consumed++;
4190 proto_tree_add_item(subtree, hf_gsm_a_bssmap_s0_s15, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
4191 curr_offset+=2;
4192 consumed+=2;
4193 break;
4194 case 0x9:
4195 /* fall through */
4196 case 0xc:
4197 /* fall through */
4198 case 0xd:
4199 /* FR_AMR-WB is coded '1001'
4200 * OFR_AMR-WB is coded '1100'
4201 * OHR_AMR-WB is coded '1101'
4203 /* FI indicates Full IP */
4204 proto_tree_add_item(subtree, hf_gsm_a_bssmap_fi2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4205 /* PI indicates PCMoIP */
4206 proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4207 /* PT indicates PCMoTDM */
4208 proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4209 /* TF indicates TFO support */
4210 proto_tree_add_item(subtree, hf_gsm_a_bssmap_tf2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4211 /* Codec Type */
4212 proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4213 proto_item_append_text(item, " - %s",
4214 val_to_str_const(tvb_get_uint8(tvb, curr_offset) & 0x0f,
4215 bssap_speech_codec_values,
4216 "Unknown"));
4217 curr_offset++;
4218 consumed++;
4219 proto_tree_add_item(subtree, hf_gsm_a_bssmap_s0_s7, tvb, curr_offset, 1, ENC_NA);
4220 curr_offset++;
4221 consumed++;
4222 break;
4223 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 proto_tree_add_item(subtree, hf_gsm_a_bssmap_pi, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4227 /* PT indicates PCMoTDM */
4228 proto_tree_add_item(subtree, hf_gsm_a_bssmap_pt, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4229 /* Codec Type */
4230 proto_tree_add_item(subtree, hf_gsm_a_bssap_speech_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4231 curr_offset++;
4232 consumed++;
4233 /* Codec Extension */
4234 proto_tree_add_item(subtree, hf_gsm_a_bssap_extended_codec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4235 curr_offset++;
4236 consumed++;
4237 proto_tree_add_item(subtree, hf_gsm_a_bssap_extended_codec_r2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4238 proto_tree_add_item(subtree, hf_gsm_a_bssap_extended_codec_r3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4239 curr_offset++;
4240 consumed++;
4241 break;
4242 default:
4243 proto_tree_add_expert(subtree, pinfo, &ei_gsm_a_bssap_unknown_codec, tvb, curr_offset, 2);
4244 curr_offset+=2;
4245 consumed+=2;
4246 break;
4249 proto_item_set_len(item, consumed);
4250 return len;
4253 * 3.2.2.105 Call Identifier
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_)
4258 uint32_t curr_offset;
4260 curr_offset = offset;
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
4267 proto_tree_add_item(tree, hf_gsm_a_bssmap_call_id, tvb, curr_offset, 4, ENC_LITTLE_ENDIAN);
4268 curr_offset+=4;
4270 return curr_offset-offset;
4273 * 3.2.2.106 Call Identifier List
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_)
4278 uint32_t curr_offset;
4279 curr_offset = offset;
4281 if (len==0) {
4282 proto_tree_add_item(tree, hf_gsm_a_bssmap_all_call_identifiers_resources_released, tvb, curr_offset, len, ENC_NA);
4284 while (curr_offset-offset < len) {
4285 proto_tree_add_item(tree, hf_gsm_a_bssmap_call_id, tvb, curr_offset, 4, ENC_LITTLE_ENDIAN);
4286 curr_offset+=4;
4289 return len;
4292 * 3.2.2.107 A-Interface Selector for RESET
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"
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"
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_)
4305 uint32_t curr_offset;
4306 curr_offset = offset;
4308 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, (curr_offset<<3), 6, ENC_BIG_ENDIAN);
4309 proto_tree_add_item(tree, hf_gsm_a_bssmap_rip, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4310 proto_tree_add_item(tree, hf_gsm_a_bssmap_rtd, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4311 curr_offset++;
4313 return curr_offset-offset;
4316 * 3.2.2.109 Kc128
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_)
4321 uint32_t curr_offset;
4322 curr_offset = offset;
4324 proto_tree_add_item(tree, hf_gsm_a_bssmap_kc128, tvb, curr_offset, 16, ENC_NA);
4325 curr_offset+=16;
4327 return curr_offset-offset;
4330 * 3.2.2.110 CSG Identifier
4332 static const crumb_spec_t gsm_a_bssmap_csg_id_crumbs[] = {
4333 { 0, 24},
4334 { 29, 3},
4335 { 0, 0}
4337 static const true_false_string gsm_a_bssmap_cell_access_mode_value = {
4338 "Hybrid cell",
4339 "CSG cell"
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_)
4344 uint32_t bit_offset;
4345 bit_offset = offset<<3;
4347 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 bit_offset += 32;
4349 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_spare_bits, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
4350 bit_offset += 7;
4351 proto_tree_add_bits_item(tree, hf_gsm_a_bssmap_cell_access_mode, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4353 return len;
4357 * 3.2.2.111 Redirect Attempt Flag
4358 * No data
4362 * 3.2.2.112 Reroute Reject Cause
4365 * Reroute Reject cause value (octet 2)
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 }
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_)
4393 uint32_t curr_offset;
4394 curr_offset = offset;
4396 proto_tree_add_item(tree, hf_gsm_a_bssmap_reroute_rej_cause, tvb, curr_offset, 1, ENC_NA);
4397 curr_offset+=1;
4399 return curr_offset-offset;
4404 * 3.2.2.113 Send Sequence Number
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_)
4409 uint32_t curr_offset;
4410 curr_offset = offset;
4412 proto_tree_add_item(tree, hf_gsm_a_bssmap_send_seqn, tvb, curr_offset, 1, ENC_NA);
4413 curr_offset+=1;
4415 return curr_offset-offset;
4420 * 3.2.2.114 Reroute complete outcome
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 }
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_)
4433 uint32_t curr_offset;
4434 curr_offset = offset;
4436 proto_tree_add_item(tree, hf_gsm_a_bssmap_reroute_outcome, tvb, curr_offset, 1, ENC_NA);
4437 curr_offset+=1;
4439 return curr_offset-offset;
4444 * 3.2.2.115 Global Call Reference as per 3GPP TS 29.205 Section B.2.1.9
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_)
4449 dissect_bicc_mst_lcls_gcr(tvb, tree, offset, len);
4451 return len;
4455 * 3.2.2.116 LCLS-Configuration
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 }
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_)
4470 uint32_t curr_offset;
4471 curr_offset = offset;
4473 proto_tree_add_item(tree, hf_gsm_a_bssmap_lcls_conf, tvb, curr_offset, 1, ENC_NA);
4474 curr_offset+=1;
4476 return curr_offset-offset;
4481 * 3.2.2.117 LCLS-Connection-Status-Control
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 }
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_)
4495 uint32_t curr_offset;
4496 curr_offset = offset;
4498 proto_tree_add_item(tree, hf_gsm_a_bssmap_lcls_con_status_control, tvb, curr_offset, 1, ENC_NA);
4499 curr_offset+=1;
4501 return curr_offset-offset;
4506 * 3.2.2.118 LCLS-Correlation-Not-Needed
4507 * No data
4511 * 3.2.2.119 LCLS-BSS-Status
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 }
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_)
4525 uint32_t curr_offset;
4526 curr_offset = offset;
4528 proto_tree_add_item(tree, hf_gsm_a_bssmap_lcls_bss_status, tvb, curr_offset, 1, ENC_NA);
4529 curr_offset+=1;
4531 return curr_offset-offset;
4536 * 3.2.2.120 LCLS-Break-Request
4537 * No data
4541 * 3.2.2.121 CSFB Indication
4542 * No data
4546 * 3.2.2.123 Source eNB to target eNB transparent information (E-UTRAN)
4550 * 3.2.2.124 CS to PS SRVCC Indication
4554 * 3.2.2.125 CN to MS transparent information
4558 * 3.2.2.126 Selected PLMN ID
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_)
4564 dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, offset, E212_NONE, true);
4565 return 3;
4570 * 3.2.2.127 Last used E-UTRAN PLMN ID
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_)
4576 dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_NONE, true);
4578 return 3;
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_)
4586 proto_tree_add_item(tree, hf_gsm_a_bssmap_osmocom_osmux_cid, tvb, offset, 1, ENC_NA);
4587 return 1;
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 */
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}
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}
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}
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_)
4860 uint32_t curr_offset;
4862 curr_offset = offset;
4863 proto_tree_add_item(tree, hf_fe_extra_info_prec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4864 proto_tree_add_item(tree, hf_fe_extra_info_lcs, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4865 proto_tree_add_item(tree, hf_fe_extra_info_ue_prob, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4866 proto_tree_add_item(tree, hf_fe_extra_info_spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4867 curr_offset++;
4869 return curr_offset-offset;
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_)
4876 uint32_t curr_offset;
4878 curr_offset = offset;
4879 proto_tree_add_item(tree, hf_fe_cur_chan_type2_chan_mode, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4880 proto_tree_add_item(tree, hf_fe_cur_chan_type2_chan_mode_spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4881 curr_offset++;
4882 proto_tree_add_item(tree, hf_fe_cur_chan_type2_chan_field, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4883 proto_tree_add_item(tree, hf_fe_cur_chan_type2_chan_field_spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4884 curr_offset++;
4886 return curr_offset-offset;
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_)
4893 uint32_t curr_offset;
4895 curr_offset = offset;
4896 proto_tree_add_item(tree, hf_fe_target_radio_cell_info_rxlev_ncell, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4897 proto_tree_add_item(tree, hf_fe_target_radio_cell_info_rxlev_ncell_spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4898 curr_offset++;
4900 return curr_offset-offset;
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_)
4907 uint32_t curr_offset = offset;
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 */
4913 bssgp_suspend_ack(tvb, tree, pinfo, offset, len);
4914 curr_offset += len;
4916 return curr_offset-offset;
4919 /* 3.2.3.5 MultiRate configuration Information */
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 }
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 }
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 }
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_)
4943 uint32_t curr_offset;
4945 curr_offset = offset;
4946 proto_tree_add_item(tree, hf_fe_dtm_info_dtm_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4947 proto_tree_add_item(tree, hf_fe_dtm_info_sto_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4948 proto_tree_add_item(tree, hf_fe_dtm_info_egprs_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4949 proto_tree_add_item(tree, hf_fe_dtm_info_spare_bits, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4950 curr_offset++;
4952 return curr_offset-offset;
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_)
4959 tvbuff_t *container_tvb;
4961 /* Octets 3-n are encoded as Inter RAT Handover Info as defined in 3GPP TS 25.331 */
4962 container_tvb = tvb_new_subset_length(tvb, offset, len);
4963 dissect_rrc_InterRATHandoverInfo_PDU(container_tvb, pinfo, tree, NULL);
4965 return len;
4968 /* 3.2.3.8 cdma2000 Capability Information */
4970 /* 3.2.3.9 Downlink Cell Load Information */
4972 /* 3.2.3.10 Uplink Cell Load Information */
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 }
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_)
4987 uint32_t curr_offset;
4989 curr_offset = offset;
4990 curr_offset += be_cell_id(tvb, tree, pinfo, curr_offset, len, NULL, 0);
4991 curr_offset += be_field_element_dissect(tvb, tree, pinfo, curr_offset, len + offset - curr_offset, NULL, 0);
4993 return curr_offset-offset;
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_)
5000 uint32_t curr_offset;
5002 curr_offset = offset;
5003 proto_tree_add_item(tree, hf_fe_cell_load_info_cell_capacity_class, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5004 curr_offset++;
5005 proto_tree_add_item(tree, hf_fe_cell_load_info_load_value, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5006 curr_offset++;
5007 proto_tree_add_item(tree, hf_fe_cell_load_info_rt_load_value, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5008 curr_offset++;
5009 proto_tree_add_item(tree, hf_fe_cell_load_info_nrt_load_information_value, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5010 curr_offset++;
5012 return curr_offset-offset;
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_)
5019 uint32_t curr_offset;
5021 curr_offset = offset;
5022 proto_tree_add_item(tree, hf_fe_ps_indication, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5023 curr_offset++;
5025 return curr_offset-offset;
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_)
5032 uint32_t curr_offset;
5034 curr_offset = offset;
5035 proto_tree_add_item(tree, hf_fe_dtm_ho_command_ind_spare, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5036 curr_offset++;
5038 return curr_offset-offset;
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_)
5045 tvbuff_t* new_tvb;
5046 uint32_t curr_offset;
5048 curr_offset = offset;
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 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 new_tvb = tvb_new_subset_remaining(tvb, curr_offset);
5054 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 new_tvb = tvb_new_subset_remaining(tvb, curr_offset);
5057 dissect_s1ap_Global_ENB_ID_PDU(new_tvb, pinfo, tree, NULL);
5059 return len;
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 */
5088 #define NUM_BSS_ELEMENT_FCNS (int)array_length(bssmap_bss_to_bss_element_fcn)
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_)
5093 uint32_t curr_offset, ie_len, fe_start_offset, ie_id_off, len_len;
5094 int idx;
5095 const char *str;
5096 proto_tree * bss_to_bss_tree = NULL;
5097 bool has_len = true;
5099 curr_offset = offset;
5102 while (curr_offset - offset + 2 < len) {
5103 uint8_t oct;
5105 * add name
5107 ie_id_off = curr_offset;
5108 oct = tvb_get_uint8(tvb, curr_offset++);
5110 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 switch (oct) {
5113 case 0x95:
5114 /* 3.2.2.127 Last used E-UTRAN PLMN ID */
5115 len_len = 0;
5116 ie_len = 3; /* Data part */
5117 has_len = false;
5118 break;
5119 default:
5120 len_len = 1;
5121 ie_len = tvb_get_uint8(tvb, curr_offset++);
5122 break;
5125 if (!str)
5126 str = "Unknown";
5128 /* Add subtree */
5129 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);
5131 * add Field Element name and length
5133 proto_tree_add_item(bss_to_bss_tree, hf_gsm_a_bssmap_field_elem_id, tvb, ie_id_off, 1, ENC_BIG_ENDIAN);
5134 if (has_len) {
5135 proto_tree_add_item(bss_to_bss_tree, hf_gsm_a_bssmap_field_elem_id_len, tvb, curr_offset - 1, 1, ENC_BIG_ENDIAN);
5138 fe_start_offset = curr_offset;
5141 * decode field element
5143 if (idx < 0 || idx >= NUM_BSS_ELEMENT_FCNS ||
5144 (bssmap_bss_to_bss_element_fcn[idx] == NULL))
5146 proto_tree_add_expert_format(bss_to_bss_tree, pinfo, &ei_gsm_a_bssmap_not_decoded_yet,
5147 tvb, curr_offset, ie_len, "Field Element not decoded");
5148 curr_offset += ie_len;
5150 else
5152 /* dissect the field element */
5153 curr_offset += (*bssmap_bss_to_bss_element_fcn[idx])(tvb, bss_to_bss_tree, pinfo, curr_offset, ie_len, NULL, 0);
5155 EXTRANEOUS_DATA_CHECK(ie_len, curr_offset - fe_start_offset, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5159 return len;
5161 /* MESSAGE FUNCTIONS */
5164 * [2] 3.2.1.1 ASSIGNMENT REQUEST
5165 * 48.008 8.4.0
5167 static void
5168 bssmap_ass_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5170 uint32_t curr_offset;
5171 uint32_t consumed;
5172 unsigned curr_len;
5174 curr_offset = offset;
5175 curr_len = len;
5177 /* Channel Type 3.2.2.11 MSC-BSS M 5-13 */
5178 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 ELEM_OPT_TV(BE_OSMOCOM_OSMUX_CID, GSM_A_PDU_TYPE_BSSMAP, BE_OSMOCOM_OSMUX_CID, NULL);
5225 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5229 * [2] 3.2.1.2 ASSIGNMENT COMPLETE
5231 static void
5232 bssmap_ass_complete(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5234 uint32_t curr_offset;
5235 uint32_t consumed;
5236 unsigned curr_len;
5238 curr_offset = offset;
5239 curr_len = len;
5241 /* RR Cause 3.2.2.22 BSS-MSC O 2 */
5242 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 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 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 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 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 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 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 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 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 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 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 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 ELEM_OPT_TV(BE_LCLS_BSS_STATUS, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_BSS_STATUS, NULL);
5267 /* Osmocom extension: Osmux CID */
5268 ELEM_OPT_TV(BE_OSMOCOM_OSMUX_CID, GSM_A_PDU_TYPE_BSSMAP, BE_OSMOCOM_OSMUX_CID, NULL);
5270 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5274 * [2] 3.2.1.3 ASSIGNMENT FAILURE
5276 static void
5277 bssmap_ass_failure(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5279 uint32_t curr_offset;
5280 uint32_t consumed;
5281 unsigned curr_len;
5283 curr_offset = offset;
5284 curr_len = len;
5286 /* Cause 3.2.2.5 BSS-MSC M 3-4 */
5287 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 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 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 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 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 ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(BSS Supported)");
5299 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5303 * [2] 3.2.1.4 BLOCK
5305 static void
5306 bssmap_block(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5308 uint32_t curr_offset;
5309 uint32_t consumed;
5310 unsigned curr_len;
5312 curr_offset = offset;
5313 curr_len = len;
5315 /* Circuit Identity Code 3.2.2.2 both M 3*/
5316 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 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 ELEM_OPT_T(BE_CONN_REL_REQ, GSM_A_PDU_TYPE_BSSMAP, BE_CONN_REL_REQ, NULL);
5322 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5326 * [2] 3.2.1.5 BLOCKING ACKNOWLEDGE
5329 static void
5330 bssmap_block_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5332 uint32_t curr_offset;
5333 uint32_t consumed;
5334 unsigned curr_len;
5336 curr_offset = offset;
5337 curr_len = len;
5339 /* Circuit Identity Code 3.2.2.2 both M 3 */
5340 ELEM_MAND_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5342 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5346 * [2] 3.2.1.6 UNBLOCK
5348 static void
5349 bssmap_unblock(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5351 uint32_t curr_offset;
5352 uint32_t consumed;
5353 unsigned curr_len;
5355 curr_offset = offset;
5356 curr_len = len;
5358 /* Circuit Identity Code 3.2.2.2 both M 3 */
5359 ELEM_MAND_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5361 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5365 * [2] 3.2.1.7 UNBLOCKING ACKNOWLEDGE
5367 static void
5368 bssmap_unblock_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5370 uint32_t curr_offset;
5371 uint32_t consumed;
5372 unsigned curr_len;
5374 curr_offset = offset;
5375 curr_len = len;
5377 /* Circuit Identity Code 3.2.2.2 both M 3 */
5378 ELEM_MAND_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5380 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5384 * [2] 3.2.1.8 HANDOVER REQUEST
5386 static void
5387 bssmap_ho_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5389 uint32_t curr_offset;
5390 uint32_t consumed;
5391 unsigned curr_len;
5393 curr_offset = offset;
5394 curr_len = len;
5396 /* Channel Type 3.2.2.11 MSC-BSS M 5-13 */
5397 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 ELEM_MAND_TLV(BE_ENC_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_ENC_INFO, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
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
5405 ELEM_OPT_TV(BE_CM_INFO_1, GSM_A_PDU_TYPE_BSSMAP, BE_CM_INFO_1, NULL);
5407 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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*/
5471 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5475 * [2] 3.2.1.9 HANDOVER REQUIRED
5477 static void
5478 bssmap_ho_reqd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5480 uint32_t curr_offset;
5481 uint32_t consumed;
5482 unsigned curr_len;
5484 curr_offset = offset;
5485 curr_len = len;
5487 /* Cause 3.2.2.5 BSS-MSC M 3-4 */
5488 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 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 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 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 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 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 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 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 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 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 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 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 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 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 */
5518 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5522 * [2] 3.2.1.10 HANDOVER REQUEST ACKNOWLEDGE
5524 static void
5525 bssmap_ho_req_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5527 uint32_t curr_offset;
5528 uint32_t consumed;
5529 unsigned curr_len;
5531 curr_offset = offset;
5532 curr_len = len;
5534 /* Layer 3 Information 3.2.2.24 BSS-MSC M (note 1) 11-n */
5535 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 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 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 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 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 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 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 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 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 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 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 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 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 ELEM_OPT_TV(BE_LCLS_BSS_STATUS, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_BSS_STATUS, NULL);
5563 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5567 * [2] 3.2.1.11 HANDOVER COMMAND
5569 static void
5570 bssmap_ho_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5572 uint32_t curr_offset;
5573 uint32_t consumed;
5574 unsigned curr_len;
5576 curr_offset = offset;
5577 curr_len = len;
5579 /* Layer 3 Information 3.2.2.24 MSC-BSS M (note 1) 11-n */
5580 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 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 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 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 */
5589 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5593 * [2] 3.2.1.12 HANDOVER COMPLETE
5595 static void
5596 bssmap_ho_complete(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5598 uint32_t curr_offset;
5599 uint32_t consumed;
5600 unsigned curr_len;
5602 curr_offset = offset;
5603 curr_len = len;
5605 /* RR Cause 3.2.2.22 BSS-MSC O 2 */
5606 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 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 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 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 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 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 ELEM_OPT_TV(BE_LCLS_BSS_STATUS, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_BSS_STATUS, NULL);
5620 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5624 * 3.2.1.13 HANDOVER SUCCEEDED
5626 static void
5627 bssmap_ho_succ(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5629 uint32_t curr_offset;
5630 uint32_t consumed;
5631 unsigned curr_len;
5633 curr_offset = offset;
5634 curr_len = len;
5636 /* Talker Priority 3.2.2.89 MSC-BSS O (note 1) 2 */
5637 ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
5639 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5643 * [2] 3.2.1.14 HANDOVER CANDIDATE ENQUIRE
5645 static void
5646 bssmap_ho_cand_enq(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5648 uint32_t curr_offset;
5649 uint32_t consumed;
5650 unsigned curr_len;
5652 curr_offset = offset;
5653 curr_len = len;
5655 /* Number Of Mss 3.2.2.8 MSC-BSS M 2 */
5656 ELEM_MAND_TV(BE_NUM_MS, GSM_A_PDU_TYPE_BSSMAP, BE_NUM_MS, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5658 /* Cell Identifier List 3.2.2.27 MSC-BSS M 2n+3 to 7n+3 */
5659 ELEM_MAND_TLV(BE_CELL_ID_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID_LIST, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5661 /* Cell Identifier 3.2.2.17 MSC-BSS M 3-10 */
5662 ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5664 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5668 * [2] 3.2.1.15 HANDOVER CANDIDATE RESPONSE
5670 static void
5671 bssmap_ho_cand_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5673 uint32_t curr_offset;
5674 uint32_t consumed;
5675 unsigned curr_len;
5677 curr_offset = offset;
5678 curr_len = len;
5680 /* Number Of Mss 3.2.2.8 BSS-MSC M 2 */
5681 ELEM_MAND_TV(BE_NUM_MS, GSM_A_PDU_TYPE_BSSMAP, BE_NUM_MS, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5683 /* Cell Identifier 3.2.2.17 BSS-MSC M 3-10 */
5684 ELEM_MAND_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5686 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5690 * [2] 3.2.1.16 HANDOVER FAILURE
5692 static void
5693 bssmap_ho_failure(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5695 uint32_t curr_offset;
5696 uint32_t consumed;
5697 unsigned curr_len;
5699 curr_offset = offset;
5700 curr_len = len;
5702 /* Cause 3.2.2.5 BSS-MSC M 3-4 */
5703 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 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 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 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 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 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 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 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 ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(BSS Supported)");
5721 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5725 * 3.2.1.17 RESOURCE REQUEST
5727 static void
5728 bssmap_res_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5730 uint32_t curr_offset;
5731 uint32_t consumed;
5732 unsigned curr_len;
5734 curr_offset = offset;
5735 curr_len = len;
5737 /* Periodicity 3.2.2.12 MSC-BSS M 2 */
5738 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 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 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 ELEM_MAND_TV(BE_EXT_RES_IND, GSM_A_PDU_TYPE_BSSMAP, BE_EXT_RES_IND, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5746 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5750 * 3.2.1.18 RESOURCE INDICATION
5752 static void
5753 bssmap_res_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5755 uint32_t curr_offset;
5756 uint32_t consumed;
5757 unsigned curr_len;
5759 curr_offset = offset;
5760 curr_len = len;
5762 /* Resource Indication Method 3.2.2.29 BSS-MSC M 2 */
5763 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 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 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 ELEM_MAND_TV(BE_TOT_RES_ACC, GSM_A_PDU_TYPE_BSSMAP, BE_TOT_RES_ACC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5771 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5774 * [2] 3.2.1.19 PAGING
5776 static void
5777 bssmap_paging(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5779 uint32_t curr_offset;
5780 uint32_t consumed;
5781 unsigned curr_len;
5783 curr_offset = offset;
5784 curr_len = len;
5786 /* IMSI 3.2.2.6 MSC-BSS M 3-10 */
5787 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 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 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 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 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 ELEM_OPT_TV(BE_PAGING_INF, GSM_A_PDU_TYPE_BSSMAP, BE_PAGING_INF, NULL);
5799 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5803 * [2] 3.2.1.20 CLEAR REQUEST
5805 static void
5806 bssmap_clear_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5808 uint32_t curr_offset;
5809 uint32_t consumed;
5810 unsigned curr_len;
5812 curr_offset = offset;
5813 curr_len = len;
5815 /* Cause 3.2.2.5 BSS-MSC M 3-4 */
5816 ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
5818 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5822 * [2] 3.2.1.21 CLEAR COMMAND
5824 static void
5825 bssmap_clear_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5827 uint32_t curr_offset;
5828 uint32_t consumed;
5829 unsigned curr_len;
5831 curr_offset = offset;
5832 curr_len = len;
5834 /* Layer 3 Header Information 3.2.2.9 MSC-BSS O (note) 4 */
5835 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 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 ELEM_OPT_T(BE_CSFB_IND, GSM_A_PDU_TYPE_BSSMAP, BE_CSFB_IND, NULL);
5841 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5844 * 3.2.1.22 CLEAR COMPLETE
5845 * No data
5849 * [2] 3.2.1.23 RESET
5851 void
5852 bssmap_reset(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5854 uint32_t curr_offset;
5855 uint32_t consumed;
5856 unsigned curr_len;
5858 curr_offset = offset;
5859 curr_len = len;
5861 /* Cause 3.2.2.5 Both M 3-4 */
5862 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 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 ELEM_OPT_T(BE_OSMOCOM_OSMUX_SUPPORT, GSM_A_PDU_TYPE_BSSMAP, BE_OSMOCOM_OSMUX_SUPPORT, NULL);
5868 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5872 * 3.2.1.24 RESET ACKNOWLEDGE
5874 static void
5875 bssmap_reset_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5877 uint32_t curr_offset;
5878 uint32_t consumed;
5879 unsigned curr_len;
5881 curr_offset = offset;
5882 curr_len = len;
5884 /* A-Interface Selector for RESET 3.2.2.107 Both O 2 */
5885 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 ELEM_OPT_T(BE_OSMOCOM_OSMUX_SUPPORT, GSM_A_PDU_TYPE_BSSMAP, BE_OSMOCOM_OSMUX_SUPPORT, NULL);
5889 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5893 * [2] 3.2.1.25 HANDOVER PERFORMED
5895 static void
5896 bssmap_ho_performed(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5898 uint32_t curr_offset;
5899 uint32_t consumed;
5900 unsigned curr_len;
5902 curr_offset = offset;
5903 curr_len = len;
5905 /* Cause 3.2.2.5 BSS-MSC M 3-4 */
5906 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 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 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 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 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 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 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 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 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 ELEM_OPT_TV(BE_LCLS_BSS_STATUS, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_BSS_STATUS, NULL);
5926 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5930 * [2] 3.2.1.26 OVERLOAD
5932 static void
5933 bssmap_overload(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5935 uint32_t curr_offset;
5936 uint32_t consumed;
5937 unsigned curr_len;
5939 curr_offset = offset;
5940 curr_len = len;
5942 /* Cause 3.2.2.5 Both M 3-4 */
5943 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 ELEM_OPT_TLV(BE_CELL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CELL_ID, NULL);
5947 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5950 * 3.2.1.27 MSC INVOKE TRACE
5952 static void
5953 bssmap_msc_invoke_trace(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5955 uint32_t curr_offset;
5956 uint32_t consumed;
5957 unsigned curr_len;
5959 curr_offset = offset;
5960 curr_len = len;
5962 /* Trace Type 3.2.2.37 MSC-BSS M 2 */
5963 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 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 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 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 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 ELEM_OPT_TLV(BE_OMCID, GSM_A_PDU_TYPE_BSSMAP, BE_OMCID, NULL);
5975 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
5979 * 3.2.1.28 BSS INVOKE TRACE
5981 static void
5982 bssmap_bss_invoke_trace(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
5984 uint32_t curr_offset;
5985 uint32_t consumed;
5986 unsigned curr_len;
5988 curr_offset = offset;
5989 curr_len = len;
5991 /* Trace Type 3.2.2.37 Both M 2 */
5992 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 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 ELEM_OPT_TLV(BE_TRIGGERID, GSM_A_PDU_TYPE_BSSMAP, BE_TRIGGERID, NULL);
5997 /* Trace Reference 3.2.2.39 Both M 3 */
5998 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 ELEM_OPT_TLV(BE_TRANSID, GSM_A_PDU_TYPE_BSSMAP, BE_TRANSID, NULL);
6001 /* OMCId 3.2.2.42 Both O 3-22 */
6002 ELEM_OPT_TLV(BE_OMCID, GSM_A_PDU_TYPE_BSSMAP, BE_OMCID, NULL);
6004 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6008 * [2] 3.2.1.29 CLASSMARK UPDATE
6010 static void
6011 bssmap_cm_upd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6013 uint32_t curr_offset;
6014 uint32_t consumed;
6015 unsigned curr_len;
6017 curr_offset = offset;
6018 curr_len = len;
6020 /* Classmark Information Type 2 3.2.2.19 Both M 4-5 */
6021 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 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 ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
6027 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6031 * [2] 3.2.1.30 CIPHER MODE COMMAND
6033 static void
6034 bssmap_ciph_mode_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6036 uint32_t curr_offset;
6037 uint32_t consumed;
6038 unsigned curr_len;
6040 curr_offset = offset;
6041 curr_len = len;
6043 /* Layer 3 Header Information 3.2.2.9 MSC-BSS O (note) 4 */
6044 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 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 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 ELEM_OPT_TV(BE_KC128, GSM_A_PDU_TYPE_BSSMAP, BE_KC128, NULL);
6052 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6056 * [2] 3.2.1.31 CIPHER MODE COMPLETE
6058 static void
6059 bssmap_ciph_mode_complete(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6061 uint32_t curr_offset;
6062 uint32_t consumed;
6063 unsigned curr_len;
6065 curr_offset = offset;
6066 curr_len = len;
6068 /* Layer 3 Message Contents 3.2.2.35 BSS-MSC O 2-n */
6069 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 ELEM_OPT_TV(BE_CHOSEN_ENC_ALG, GSM_A_PDU_TYPE_BSSMAP, BE_CHOSEN_ENC_ALG, NULL);
6073 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6077 * [2] 3.2.1.32 COMPLETE LAYER 3 INFORMATION
6078 * Updated to 3GPP TS 48.008 version 11.5.0 Release 11
6080 static void
6081 bssmap_cl3_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6083 uint32_t consumed;
6084 uint32_t curr_offset;
6085 unsigned curr_len;
6087 curr_offset = offset;
6088 curr_len = len;
6090 /* Cell Identifier 3.2.2.17 BSS-MSC M 3-10 */
6091 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 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 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 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 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 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 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 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 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 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 */
6113 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6116 * 3.2.1.33 QUEUEING INDICATION
6117 * No data
6121 * [2] 3.2.1.34 SAPI "n" REJECT
6123 static void
6124 bssmap_sapi_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6126 uint32_t consumed;
6127 uint32_t curr_offset;
6128 unsigned curr_len;
6130 curr_offset = offset;
6131 curr_len = len;
6133 /* DLCI 3.2.2.25 BSS-MSC M 2 */
6134 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 ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6138 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6140 /* 3.2.1.35 (void)
6141 * 3.2.1.36 (void)
6144 * [2] 3.2.1.37 HANDOVER REQUIRED REJECT
6146 static void
6147 bssmap_ho_reqd_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6149 uint32_t curr_offset;
6150 uint32_t consumed;
6151 unsigned curr_len;
6153 curr_offset = offset;
6154 curr_len = len;
6156 /* Cause 3.2.2.5 MSC-BSS M 3-4 */
6157 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 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 ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
6163 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6167 * [2] 3.2.1.38 RESET CIRCUIT
6169 static void
6170 bssmap_reset_cct(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6172 uint32_t curr_offset;
6173 uint32_t consumed;
6174 unsigned curr_len;
6176 curr_offset = offset;
6177 curr_len = len;
6179 /* Circuit Identity Code 3.2.2.2 Both M 3 */
6180 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 ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6184 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6188 * [2] 3.2.1.39 RESET CIRCUIT ACKNOWLEDGE
6190 static void
6191 bssmap_reset_cct_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6193 uint32_t curr_offset;
6194 uint32_t consumed;
6195 unsigned curr_len;
6197 curr_offset = offset;
6198 curr_len = len;
6200 /* Circuit Identity 3.2.2.2 Both M 3 */
6201 ELEM_MAND_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6203 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6207 * 3.2.1.40 HANDOVER DETECT
6209 static void
6210 bssmap_ho_det(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6212 uint32_t curr_offset;
6213 uint32_t consumed;
6214 unsigned curr_len;
6216 curr_offset = offset;
6217 curr_len = len;
6219 /* Talker Priority 3.2.2.89 BSS-MSC O (note 1) 2 */
6220 ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
6222 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6225 * [2] 3.2.1.41 CIRCUIT GROUP BLOCK
6227 static void
6228 bssmap_cct_group_block(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6230 uint32_t curr_offset;
6231 uint32_t consumed;
6232 unsigned curr_len;
6234 curr_offset = offset;
6235 curr_len = len;
6237 /* Cause 3.2.2.5 Both M 3-4 */
6238 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 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 ELEM_MAND_TLV(BE_CIC_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CIC_LIST, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6244 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6248 * [2] 3.2.1.42 CIRCUIT GROUP BLOCKING ACKNOWLEDGE
6250 static void
6251 bssmap_cct_group_block_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6253 uint32_t curr_offset;
6254 uint32_t consumed;
6255 unsigned curr_len;
6257 curr_offset = offset;
6258 curr_len = len;
6260 /* Circuit Identity Code 3.2.2.2 Both M 3 */
6261 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 ELEM_MAND_TLV(BE_CIC_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CIC_LIST, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6265 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6269 * [2] 3.2.1.43 CIRCUIT GROUP UNBLOCK
6271 static void
6272 bssmap_cct_group_unblock(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6274 uint32_t curr_offset;
6275 uint32_t consumed;
6276 unsigned curr_len;
6278 curr_offset = offset;
6279 curr_len = len;
6281 /* Circuit Identity Code 3.2.2.2 Both M 3 */
6282 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 ELEM_MAND_TLV(BE_CIC_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CIC_LIST, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6286 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6290 * [2] 3.2.1.44 CIRCUIT GROUP UNBLOCKING ACKNOWLEDGE
6292 static void
6293 bssmap_cct_group_unblock_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6295 uint32_t curr_offset;
6296 uint32_t consumed;
6297 unsigned curr_len;
6299 curr_offset = offset;
6300 curr_len = len;
6302 /* Circuit Identity Code 3.2.2.2 Both M 3 */
6303 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 ELEM_MAND_TLV(BE_CIC_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CIC_LIST, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6307 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6311 * [2] 3.2.1.45 CONFUSION
6313 static void
6314 bssmap_confusion(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6316 uint32_t curr_offset;
6317 uint32_t consumed;
6318 unsigned curr_len;
6320 curr_offset = offset;
6321 curr_len = len;
6323 /* Cause 3.2.2.5 Both M 3-4 */
6324 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 ELEM_MAND_TLV(BE_DIAG, GSM_A_PDU_TYPE_BSSMAP, BE_DIAG, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6328 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6331 * 3.2.1.46 CLASSMARK REQUEST
6333 static void
6334 bssmap_cls_m_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6336 uint32_t curr_offset;
6337 uint32_t consumed;
6338 unsigned curr_len;
6340 curr_offset = offset;
6341 curr_len = len;
6343 /* Talker Priority 3.2.2.89 MSC-BSS O (note 1) 2 */
6344 ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
6346 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6349 * [2] 3.2.1.47 UNEQUIPPED CIRCUIT
6351 static void
6352 bssmap_unequipped_cct(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6354 uint32_t curr_offset;
6355 uint32_t consumed;
6356 unsigned curr_len;
6358 curr_offset = offset;
6359 curr_len = len;
6361 /* Circuit Identity Code 3.2.2.2 Both M 3 */
6362 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 ELEM_OPT_TLV(BE_CIC_LIST, GSM_A_PDU_TYPE_BSSMAP, BE_CIC_LIST, NULL);
6366 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6370 * [2] 3.2.1.48 CIPHER MODE REJECT
6372 static void
6373 bssmap_ciph_mode_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6375 uint32_t curr_offset;
6376 uint32_t consumed;
6377 unsigned curr_len;
6379 curr_offset = offset;
6380 curr_len = len;
6382 /* Cause 3.2.2.5 BSS-MSC M 3-4 */
6383 ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6385 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6389 * [2] 3.2.1.49 LOAD INDICATION
6391 static void
6392 bssmap_load_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6394 uint32_t curr_offset;
6395 uint32_t consumed;
6396 unsigned curr_len;
6398 curr_offset = offset;
6399 curr_len = len;
6401 /* Time Indication 3.2.2.47 Both M 2 */
6402 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 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 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 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 ELEM_OPT_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL);
6412 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6415 * 3.2.1.50 VGCS/VBS SETUP
6417 static void
6418 bssmap_vgcs_vbs_setup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6420 uint32_t curr_offset;
6421 uint32_t consumed;
6422 unsigned curr_len;
6424 curr_offset = offset;
6425 curr_len = len;
6427 /* Group Call Reference 3.2.2.55 MSC-BSS M 7 */
6428 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 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 ELEM_OPT_TLV(BE_VGCS_FEAT_FLG, GSM_A_PDU_TYPE_BSSMAP, BE_VGCS_FEAT_FLG, NULL);
6434 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6438 * 3.2.1.51 VGCS/VBS SETUP ACK
6440 static void
6441 bssmap_vgcs_vbs_setup_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6443 uint32_t curr_offset;
6444 uint32_t consumed;
6445 unsigned curr_len;
6447 curr_offset = offset;
6448 curr_len = len;
6450 /* VGCS Feature Flags 3.2.2.88 BSS-MSC O(note 1) 3 */
6451 ELEM_OPT_TLV(BE_VGCS_FEAT_FLG, GSM_A_PDU_TYPE_BSSMAP, BE_VGCS_FEAT_FLG, NULL);
6453 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6457 * 3.2.1.52 VGCS/VBS SETUP REFUSE
6459 static void
6460 bssmap_vgcs_vbs_setup_refuse(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6462 uint32_t curr_offset;
6463 uint32_t consumed;
6464 unsigned curr_len;
6466 curr_offset = offset;
6467 curr_len = len;
6469 /* Cause 3.2.2.5 BSS-MSC M 3-4 */
6470 ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6472 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6476 * 3.2.1.53 VGCS/VBS ASSIGNMENT REQUEST
6478 static void
6479 bssmap_vgcs_vbs_ass_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6481 uint32_t curr_offset;
6482 uint32_t consumed;
6483 unsigned curr_len;
6485 curr_offset = offset;
6486 curr_len = len;
6488 /* Channel Type 3.2.2.11 MSC-BSS M (note 2) 5-13 */
6489 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 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 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 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 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 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 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 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 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 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 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 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 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 ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(MSC Preferred)");
6518 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6521 * 3.2.1.54 VGCS/VBS ASSIGNMENT RESULT
6523 static void
6524 bssmap_vgcs_vbs_ass_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6526 uint32_t curr_offset;
6527 uint32_t consumed;
6528 unsigned curr_len;
6530 curr_offset = offset;
6531 curr_len = len;
6533 /* Channel Type 3.2.2.11 BSS-MSC M (note 3, 4) 5 */
6534 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 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 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 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 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 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 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 ELEM_OPT_TV(BE_CALL_ID, GSM_A_PDU_TYPE_BSSMAP, BE_CALL_ID, NULL);
6550 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6553 * 3.2.1.55 VGCS/VBS ASSIGNMENT FAILURE
6555 static void
6556 bssmap_vgcs_vbs_ass_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6558 uint32_t curr_offset;
6559 uint32_t consumed;
6560 unsigned curr_len;
6562 curr_offset = offset;
6563 curr_len = len;
6565 /* Cause 3.2.2.5 BSS-MSC M 3-4 */
6566 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 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 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 ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(BSS Supported)");
6574 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6577 * 3.2.1.56 VGCS/VBS QUEUING INDICATION
6578 * No data
6581 * 3.2.1.57 UPLINK REQUEST
6583 static void
6584 bssmap_uplink_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6586 uint32_t curr_offset;
6587 uint32_t consumed;
6588 unsigned curr_len;
6590 curr_offset = offset;
6591 curr_len = len;
6593 /* Talker Priority 3.2.2.89 BSS-MSC O (note 1) 2 */
6594 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 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 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 ELEM_OPT_TLV(BE_MID, GSM_A_PDU_TYPE_COMMON, DE_MID, NULL);
6602 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6605 * 3.2.1.58 UPLINK REQUEST ACKNOWLEDGE
6607 static void
6608 bssmap_uplink_req_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6610 uint32_t curr_offset;
6611 uint32_t consumed;
6612 unsigned curr_len;
6614 curr_offset = offset;
6615 curr_len = len;
6617 /* Talker Priority 3.2.2.89 MSC-BSS O (note 1) 2 */
6618 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 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 ELEM_MAND_TLV(BE_TALKER_ID, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6624 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6627 * 3.2.1.59 UPLINK REQUEST CONFIRMATION
6629 static void
6630 bssmap_uplink_req_conf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6632 uint32_t curr_offset;
6633 uint32_t consumed;
6634 unsigned curr_len;
6636 curr_offset = offset;
6637 curr_len = len;
6639 /* Cell Identifier 3.2.2.17 BSS-MSC M 3-10 */
6640 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 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 ELEM_MAND_TLV(BE_L3_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_L3_INFO, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6646 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6649 * 3.2.1.59a UPLINK APPLICATION DATA
6651 static void
6652 bssmap_uplink_app_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6654 uint32_t curr_offset;
6655 uint32_t consumed;
6656 unsigned curr_len;
6658 curr_offset = offset;
6659 curr_len = len;
6661 /* Cell Identifier 3.2.2.17 BSS-MSC M 3-10 */
6662 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 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 ELEM_MAND_TLV(BE_APP_DATA_INF, GSM_A_PDU_TYPE_BSSMAP, BE_APP_DATA_INF, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6668 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6671 * 3.2.1.60 UPLINK RELEASE INDICATION
6673 static void
6674 bssmap_uplink_rel_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6676 uint32_t curr_offset;
6677 uint32_t consumed;
6678 unsigned curr_len;
6680 curr_offset = offset;
6681 curr_len = len;
6683 /* Cause 3.2.2.5 BSS-MSC M 3-4 */
6684 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 ELEM_OPT_TV(BE_TALKER_PRI, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_PRI, NULL);
6689 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6692 * 3.2.1.61 UPLINK REJECT COMMAND
6694 static void
6695 bssmap_uplink_rej_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6697 uint32_t curr_offset;
6698 uint32_t consumed;
6699 unsigned curr_len;
6701 curr_offset = offset;
6702 curr_len = len;
6704 /* Cause 3.2.2.5 MSC-BSS M 3-4 */
6705 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 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 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 ELEM_OPT_TLV(BE_TALKER_ID, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_ID, NULL);
6713 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6716 * 3.2.1.62 UPLINK RELEASE COMMAND
6718 static void
6719 bssmap_uplink_rel_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6721 uint32_t curr_offset;
6722 uint32_t consumed;
6723 unsigned curr_len;
6725 curr_offset = offset;
6726 curr_len = len;
6728 /* Cause 3.2.2.5 MSC-BSS M 3-4 */
6729 ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6731 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6735 * 3.2.1.63 UPLINK SEIZED COMMAND
6737 static void
6738 bssmap_uplink_seized_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6740 uint32_t curr_offset;
6741 uint32_t consumed;
6742 unsigned curr_len;
6744 curr_offset = offset;
6745 curr_len = len;
6747 /* Cause 3.2.2.5 MSC-BSS M 3-4 */
6748 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 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 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 ELEM_MAND_TLV(BE_TALKER_ID, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6756 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6759 * 3.2.1.64 SUSPEND
6761 static void
6762 bssmap_sus(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6764 uint32_t curr_offset;
6765 uint32_t consumed;
6766 unsigned curr_len;
6768 curr_offset = offset;
6769 curr_len = len;
6771 /* DLCI 3.2.2.25 BSS-MSC M 2 */
6772 ELEM_MAND_TV(BE_DLCI, GSM_A_PDU_TYPE_BSSMAP, BE_DLCI, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6774 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6777 * 3.2.1.65 RESUME
6779 static void
6780 bssmap_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6782 uint32_t curr_offset;
6783 uint32_t consumed;
6784 unsigned curr_len;
6786 curr_offset = offset;
6787 curr_len = len;
6789 /* DLCI 3.2.2.25 BSS-MSC M 2 */
6790 ELEM_MAND_TV(BE_DLCI, GSM_A_PDU_TYPE_BSSMAP, BE_DLCI, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6792 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6795 * [2] 3.2.1.66 CHANGE CIRCUIT
6797 static void
6798 bssmap_change_cct(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6800 uint32_t curr_offset;
6801 uint32_t consumed;
6802 unsigned curr_len;
6804 curr_offset = offset;
6805 curr_len = len;
6807 /* Cause 3.2.2.5 MSC-BSS M 3-4 */
6808 ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6810 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6814 * [2] 3.2.1.67 CHANGE CIRCUIT ACKNOWLEDGE
6816 static void
6817 bssmap_change_cct_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6819 uint32_t curr_offset;
6820 uint32_t consumed;
6821 unsigned curr_len;
6823 curr_offset = offset;
6824 curr_len = len;
6826 /* Circuit identity 3.2.2.2 BSS-MSC M 3 */
6827 ELEM_MAND_TV(BE_CIC, GSM_A_PDU_TYPE_BSSMAP, BE_CIC, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6829 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6833 * [2] 3.2.1.68 Common ID
6835 static void
6836 bssmap_common_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6838 uint32_t curr_offset;
6839 uint32_t consumed;
6840 unsigned curr_len;
6842 curr_offset = offset;
6843 curr_len = len;
6845 /* IMSI 3.2.2.6 MSC-BSS M 3-10 */
6846 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 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 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 ELEM_OPT_TV(BE_LAST_USED_E_UTRAN_PLMN_ID, GSM_A_PDU_TYPE_BSSMAP, BE_LAST_USED_E_UTRAN_PLMN_ID, NULL);
6854 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6858 * [2] 3.2.1.69 LSA INFORMATION
6860 static void
6861 bssmap_lsa_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6863 uint32_t curr_offset;
6864 uint32_t consumed;
6865 unsigned curr_len;
6867 curr_offset = offset;
6868 curr_len = len;
6870 /* LSA Information 3.2.2.23 MSC-BSS M 3+4n */
6871 ELEM_MAND_TLV(BE_LSA_INFO, GSM_A_PDU_TYPE_BSSMAP, BE_LSA_INFO, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6873 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6877 * [2] 3.2.1.70 (void)
6879 void
6880 bssmap_conn_oriented(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6882 uint32_t curr_offset;
6883 uint32_t consumed;
6884 unsigned curr_len;
6886 curr_offset = offset;
6887 curr_len = len;
6889 ELEM_MAND_TLV_E(BE_APDU, GSM_A_PDU_TYPE_BSSMAP, BE_APDU, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
6891 ELEM_OPT_TLV(BE_SEG, GSM_A_PDU_TYPE_BSSMAP, BE_SEG, NULL);
6893 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6897 * 3.2.1.71 PERFORM LOCATION REQUEST
6899 static void
6900 bssmap_perf_loc_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6902 uint32_t curr_offset;
6903 uint32_t consumed;
6904 unsigned curr_len;
6906 curr_offset = offset;
6907 curr_len = len;
6909 /* Location Type 3.2.2.63 M 3-n */
6910 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 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 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 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 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 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 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 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 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 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 ELEM_OPT_TLV(BE_IMEI, GSM_A_PDU_TYPE_BSSMAP, BE_IMEI, NULL);
6931 /* GANSS Location Type 3.2.2.97 C 3 */
6932 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 ELEM_OPT_TLV(BE_GANSS_ASS_DTA, GSM_A_PDU_TYPE_BSSMAP, BE_GANSS_ASS_DTA, NULL);
6936 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6939 * 3.2.1.72 PERFORM LOCATION RESPONSE
6941 static void
6942 bssmap_perf_loc_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6944 uint32_t curr_offset;
6945 uint32_t consumed;
6946 unsigned curr_len;
6948 curr_offset = offset;
6949 curr_len = len;
6951 /* Location Estimate 3.2.2.64 C (note 1) 3-n */
6952 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 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 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 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 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 ELEM_OPT_TLV(BE_GANSS_POS_DTA, GSM_A_PDU_TYPE_BSSMAP, BE_GANSS_POS_DTA, NULL);
6964 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6967 * 3.2.1.73 PERFORM LOCATION ABORT
6969 void
6970 bssmap_perf_loc_abort(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6972 uint32_t curr_offset;
6973 uint32_t consumed;
6974 unsigned curr_len;
6976 curr_offset = offset;
6977 curr_len = len;
6979 /* LCS Cause 3.2.2.66 M 3-n */
6980 ELEM_OPT_TLV(BE_LCS_CAUSE, GSM_PDU_TYPE_BSSMAP_LE, DE_BMAPLE_LCS_CAUSE, NULL);
6982 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
6986 * 3.2.1.74 CONNECTIONLESS INFORMATION
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
6997 * 3.2.1.75 CHANNEL MODIFY REQUEST
7000 static void
7001 bssmap_chan_mod_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7003 uint32_t curr_offset;
7004 uint32_t consumed;
7005 unsigned curr_len;
7007 curr_offset = offset;
7008 curr_len = len;
7010 /* Cause 3.2.2.5 BSS-MSC M 3-4 */
7011 ELEM_MAND_TLV(BE_CAUSE, GSM_A_PDU_TYPE_BSSMAP, BE_CAUSE, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7013 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7016 * 3.2.1.76 EMERGENCY RESET INDICATION
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
7026 * 3.2.1.77 EMERGENCY RESET COMMAND
7027 * No data
7030 * 3.2.1.78 VGCS ADDITIONAL INFORMATION
7032 static void
7033 bssmap_vgcs_add_inf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7035 uint32_t curr_offset;
7036 uint32_t consumed;
7037 unsigned curr_len;
7039 curr_offset = offset;
7040 curr_len = len;
7042 /* Talker Identity 3.2.2.91 MSC-BSS M 3-20 */
7043 ELEM_MAND_TLV(BE_TALKER_ID, GSM_A_PDU_TYPE_BSSMAP, BE_TALKER_ID, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7045 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7048 * 3.2.1.79 VGCS/VBS AREA CELL INFO
7050 static void
7051 bssmap_vgcs_vbs_area_cell_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7053 uint32_t curr_offset;
7054 uint32_t consumed;
7055 unsigned curr_len;
7057 curr_offset = offset;
7058 curr_len = len;
7060 /* Cell Identifier List Segment 3.2.2.27a MSC-BSS M 4-? */
7061 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 ELEM_MAND_TV(BE_ASS_REQ, GSM_A_PDU_TYPE_BSSMAP, BE_ASS_REQ, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7065 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7068 * 3.2.1.80 VGCS/VBS ASSIGNMENT STATUS
7070 static void
7071 bssmap_vgcs_vbs_assign_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7073 uint32_t curr_offset;
7074 uint32_t consumed;
7075 unsigned curr_len;
7077 curr_offset = offset;
7078 curr_len = len;
7080 /* Cell Identifier List Segment for established cells 3.2.2.27b BSS-MSC O (note 1) 3-? */
7081 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 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 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 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 ELEM_OPT_TLV(BE_VGS_VBS_CELL_STAT, GSM_A_PDU_TYPE_BSSMAP, BE_VGS_VBS_CELL_STAT, NULL);
7091 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7094 * 3.2.1.81 VGCS SMS
7096 static void
7097 bssmap_vgcs_sms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7099 uint32_t curr_offset;
7100 uint32_t consumed;
7101 unsigned curr_len;
7103 curr_offset = offset;
7104 curr_len = len;
7106 /* SMS to VGCS 3.2.2.92 MSC-BSS M 2-250 */
7107 ELEM_MAND_TLV(BE_SMS_TO_VGCS, GSM_A_PDU_TYPE_BSSMAP, BE_SMS_TO_VGCS, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7109 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7112 * 3.2.1.82 NOTIFICATION DATA
7114 static void
7115 bssmap_notification_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7117 uint32_t curr_offset;
7118 uint32_t consumed;
7119 unsigned curr_len;
7121 curr_offset = offset;
7122 curr_len = len;
7124 /* Application Data 3.2.2.98 MSC-BSS M 11 */
7125 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 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 ELEM_MAND_TLV(BE_MSISDN, GSM_A_PDU_TYPE_BSSMAP, BE_MSISDN, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7131 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7134 * 3.2.1.83 INTERNAL HANDOVER REQUIRED
7136 static void
7137 bssmap_int_ho_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7139 uint32_t curr_offset;
7140 uint32_t consumed;
7141 unsigned curr_len;
7143 curr_offset = offset;
7144 curr_len = len;
7146 /* Cause 3.2.2.5 BSS-MSC M 3-4 */
7147 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 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 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 ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(BSS Supported)");
7155 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7158 * 3.2.1.84 INTERNAL HANDOVER REQUIRED REJECT
7160 static void
7161 bssmap_int_ho_req_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7163 uint32_t curr_offset;
7164 uint32_t consumed;
7165 unsigned curr_len;
7167 curr_offset = offset;
7168 curr_len = len;
7170 /* Cause 3.2.2.5 MSC-BSS M 3-4 */
7171 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 ELEM_OPT_TLV(BE_SPEECH_CODEC_LST, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC_LST, "(BSS Supported)");
7175 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7179 * 3.2.1.85 INTERNAL HANDOVER COMMAND
7181 static void
7182 bssmap_int_ho_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7184 uint32_t curr_offset;
7185 uint32_t consumed;
7186 unsigned curr_len;
7188 curr_offset = offset;
7189 curr_len = len;
7191 /* Speech Codec (MSC Chosen) 3.2.2.nn MSC-BSS M (note 1) 3-n */
7192 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 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 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 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 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 ELEM_OPT_TV(BE_LCLS_CON_STATUS_CONTROL, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_CON_STATUS_CONTROL, NULL);
7204 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7207 * 3.2.1.86 INTERNAL HANDOVER ENQUIRY
7210 static void
7211 bssmap_int_ho_enq(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7213 uint32_t curr_offset;
7214 uint32_t consumed;
7215 unsigned curr_len;
7217 curr_offset = offset;
7218 curr_len = len;
7220 /* Speech Codec (MSC Chosen) 3.2.2.104 MSC-BSS M 3-n */
7221 ELEM_OPT_TLV(BE_SPEECH_CODEC, GSM_A_PDU_TYPE_BSSMAP, BE_SPEECH_CODEC, "(Chosen)");
7223 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7226 * 3.2.1.87 RESET IP RESOURCE
7228 static void
7229 bssmap_reset_ip_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7231 uint32_t curr_offset;
7232 uint32_t consumed;
7233 unsigned curr_len;
7235 curr_offset = offset;
7236 curr_len = len;
7238 /* Cause 3.2.2.5 Both M 3-4 */
7239 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 ELEM_OPT_TLV(BE_CALL_ID_LST, GSM_A_PDU_TYPE_BSSMAP, BE_CALL_ID_LST, NULL);
7243 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7246 * 3.2.1.88 RESET IP RESOURCE ACKNOWLEDGE
7248 static void
7249 bssmap_reset_ip_res_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7251 uint32_t curr_offset;
7252 uint32_t consumed;
7253 unsigned curr_len;
7255 curr_offset = offset;
7256 curr_len = len;
7258 /* Call Identifier List 3.2.2.106 Both M 6-n */
7259 ELEM_OPT_TLV(BE_CALL_ID_LST, GSM_A_PDU_TYPE_BSSMAP, BE_CALL_ID_LST, NULL);
7261 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7265 * 3.2.1.89 REROUTE COMMAND
7267 static void
7268 bssmap_reroute_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7270 uint32_t curr_offset;
7271 uint32_t consumed;
7272 unsigned curr_len;
7274 curr_offset = offset;
7275 curr_len = len;
7277 /* Initial Layer 3 Information 3.2.2.24 MSC-BSS M (note 1) 3-n */
7278 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 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 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 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 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 */
7289 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7293 * 3.2.1.90 REROUTE COMPLETE
7296 static void
7297 bssmap_reroute_complete(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7299 uint32_t curr_offset;
7300 uint32_t consumed;
7301 unsigned curr_len;
7303 curr_offset = offset;
7304 curr_len = len;
7306 /* Reroute complete outcome 3.2.2.114 MSC-BSS M 2 */
7307 ELEM_MAND_TV(BE_REROUTE_OUTCOME, GSM_A_PDU_TYPE_BSSMAP, BE_REROUTE_OUTCOME, NULL, ei_gsm_a_bssmap_missing_mandatory_element);
7309 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7313 * 3.2.1.91 LCLS-CONNECT-CONTROL
7315 static void
7316 bssmap_lcls_conn_ctrl(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7318 uint32_t curr_offset;
7319 uint32_t consumed;
7320 unsigned curr_len;
7322 curr_offset = offset;
7323 curr_len = len;
7326 /* LCLS-Configuration 3.2.2.116 MSC-BSS O (note1) 2 */
7327 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 ELEM_OPT_TV(BE_LCLS_CON_STATUS_CONTROL, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_CON_STATUS_CONTROL, NULL);
7331 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7335 * 3.2.1.92 LCLS-CONNECT-CONTROL-ACK
7337 static void
7338 bssmap_lcls_conn_ctrl_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7340 uint32_t curr_offset;
7341 uint32_t consumed;
7342 unsigned curr_len;
7344 curr_offset = offset;
7345 curr_len = len;
7347 /* LCLS-BSS-Status 3.2.2.119 BSS-MSC M 2 */
7348 ELEM_OPT_TV(BE_LCLS_BSS_STATUS, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_BSS_STATUS, NULL);
7350 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7354 * 3.2.1.93 LCLS-NOTIFICATION
7356 static void
7357 bssmap_lcls_notif(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7359 uint32_t curr_offset;
7360 uint32_t consumed;
7361 unsigned curr_len;
7363 curr_offset = offset;
7364 curr_len = len;
7366 /* LCLS-BSS-Status 3.2.2.119 BSS-MSC O (note 1) 2 */
7367 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 ELEM_OPT_T(BE_LCLS_BREAK_REQ, GSM_A_PDU_TYPE_BSSMAP, BE_LCLS_BREAK_REQ, NULL);
7371 EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_bssmap_extraneous_data);
7374 #if 0
7376 * 3.2.1.94 MS REGISTRATION ENQUIRY
7378 /* IMSI 3.2.2.6 BSS-MSC M 3-10 */
7380 * 3.2.1.95 MS REGISTRATION ENQUIRY RESPONSE
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 */
7386 #endif
7387 #define NUM_GSM_BSSMAP_MSG (int)array_length(gsm_a_bssmap_msg_strings)
7388 static int ett_gsm_bssmap_msg[NUM_GSM_BSSMAP_MSG];
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 */
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 */
7448 NULL, /* 0x38 unallocated */
7449 NULL, /* 0x39 unallocated */
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 */
7485 NULL, /* 0x5b unallocated */
7486 NULL, /* 0x5c unallocated */
7487 NULL, /* 0x5d unallocated */
7488 NULL, /* 0x5e unallocated */
7489 NULL, /* 0x5f unallocated */
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 */
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 */
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 */
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 */
7521 NULL, /* NONE */
7523 #define NUM_BSSMAP_MSG_FCNS (int)array_length(bssmap_msg_fcn)
7525 static int
7526 dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
7528 static gsm_a_tap_rec_t tap_rec[4];
7529 static gsm_a_tap_rec_t *tap_p;
7530 static unsigned tap_current = 0;
7531 uint8_t oct;
7532 uint32_t offset, saved_offset;
7533 uint32_t len;
7534 int idx;
7535 proto_item *bssmap_item = NULL;
7536 proto_tree *bssmap_tree = NULL;
7537 const char *str;
7538 sccp_msg_info_t* sccp_msg_p = (sccp_msg_info_t*)data;
7540 if (!(sccp_msg_p && sccp_msg_p->data.co.assoc)) {
7541 sccp_msg_p = NULL;
7544 col_append_str(pinfo->cinfo, COL_INFO, "(BSSMAP) ");
7547 * set tap record pointer
7549 tap_current++;
7550 if (tap_current >= 4)
7552 tap_current = 0;
7554 tap_p = &tap_rec[tap_current];
7557 offset = 0;
7558 saved_offset = offset;
7560 g_tree = tree;
7562 len = tvb_reported_length(tvb);
7565 * add BSSMAP message name
7567 oct = tvb_get_uint8(tvb, offset++);
7569 str = try_val_to_str_idx_ext((uint32_t) oct, &gsm_a_bssmap_msg_strings_ext, &idx);
7571 if (sccp_msg_p && !sccp_msg_p->data.co.label) {
7572 sccp_msg_p->data.co.label = wmem_strdup(wmem_file_scope(),
7573 val_to_str_ext((uint32_t)oct,
7574 &gsm_a_bssmap_msg_strings_ext,
7575 "BSSMAP (0x%02x)"));
7579 * create the protocol tree
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.
7585 if (str == NULL || idx < 0 || idx >= NUM_GSM_BSSMAP_MSG)
7587 bssmap_item =
7588 proto_tree_add_protocol_format(tree, proto_a_bssmap, tvb, 0, len,
7589 "GSM A-I/F BSSMAP - Unknown BSSMAP Message Type (0x%02x)",
7590 oct);
7592 bssmap_tree = proto_item_add_subtree(bssmap_item, ett_bssmap_msg);
7594 else
7596 bssmap_item =
7597 proto_tree_add_protocol_format(tree, proto_a_bssmap, tvb, 0, -1,
7598 "GSM A-I/F BSSMAP - %s",
7599 str);
7601 bssmap_tree = proto_item_add_subtree(bssmap_item, ett_gsm_bssmap_msg[idx]);
7603 col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", str);
7606 * add BSSMAP message name
7608 proto_tree_add_uint_format(bssmap_tree, hf_gsm_a_bssmap_msg_type,
7609 tvb, saved_offset, 1, oct, "Message Type %s",str);
7612 tap_p->pdu_type = GSM_A_PDU_TYPE_BSSMAP;
7613 tap_p->message_type = oct;
7615 tap_queue_packet(gsm_a_tap, pinfo, tap_p);
7617 if (str == NULL) return len;
7619 if ((len - offset) <= 0) return len;
7622 * decode elements
7624 if (idx < 0 || idx >= NUM_BSSMAP_MSG_FCNS || bssmap_msg_fcn[idx] == NULL) {
7625 proto_tree_add_bytes_format(bssmap_tree, hf_gsm_a_bssmap_message_elements,
7626 tvb, offset, len - offset, NULL, "Message Elements");
7627 }else{
7628 if (sccp_msg_p && ((sccp_msg_p->data.co.assoc->app_info & 0xCD00) == 0xCD00)) {
7629 cell_discriminator = sccp_msg_p->data.co.assoc->app_info & 0xFF;
7630 }else{
7631 cell_discriminator = 0xFF;
7633 (*bssmap_msg_fcn[idx])(tvb, bssmap_tree, pinfo, offset, len - offset);
7634 if (sccp_msg_p) {
7635 sccp_msg_p->data.co.assoc->app_info = cell_discriminator | 0xCDF0;
7638 g_tree = NULL;
7639 return len;
7642 /* Register the protocol with Wireshark */
7643 void
7644 proto_register_gsm_a_bssmap(void)
7646 unsigned i;
7647 unsigned last_offset;
7649 /* Setup list of header fields */
7651 static hf_register_info hf[] =
7653 { &hf_gsm_a_bssmap_msg_type,
7654 { "BSSMAP Message Type", "gsm_a.bssmap.msgtype",
7655 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &gsm_a_bssmap_msg_strings_ext, 0x0,
7656 NULL, HFILL }
7658 { &hf_gsm_a_bssmap_elem_id,
7659 { "Element ID", "gsm_a.bssmap.elem_id",
7660 FT_UINT8, BASE_HEX, NULL, 0,
7661 NULL, HFILL }
7663 { &hf_gsm_a_bssmap_field_elem_id,
7664 { "Field Element ID", "gsm_a.bssmap.field_elem_id",
7665 FT_UINT8, BASE_HEX, VALS(bssmap_field_element_ids), 0,
7666 NULL, HFILL }
7668 { &hf_gsm_a_bssmap_field_elem_id_len,
7669 { "Length", "gsm_a.bssmap.field_elem_id_len",
7670 FT_UINT8, BASE_DEC, NULL, 0,
7671 NULL, HFILL }
7673 { &hf_gsm_a_bssmap_cell_ci,
7674 { "Cell CI", "gsm_a.bssmap.cell_ci",
7675 FT_UINT16, BASE_HEX_DEC, 0, 0x0,
7676 NULL, HFILL }
7678 { &hf_gsm_a_bssmap_cell_lac,
7679 { "Cell LAC", "gsm_a.bssmap.cell_lac",
7680 FT_UINT16, BASE_HEX_DEC, 0, 0x0,
7681 NULL, HFILL }
7683 { &hf_gsm_a_bssmap_sac,
7684 { "SAC", "gsm_a.bssmap.sac",
7685 FT_UINT16, BASE_HEX, 0, 0x0,
7686 NULL, HFILL }
7688 { &hf_gsm_a_bssmap_dlci_cc,
7689 { "Control Channel", "gsm_a.bssmap.dlci.cc",
7690 FT_UINT8, BASE_HEX, VALS(bssap_cc_values), 0xc0,
7691 NULL, HFILL}
7693 { &hf_gsm_a_bssmap_dlci_spare,
7694 { "Spare", "gsm_a.bssmap.dlci.spare",
7695 FT_UINT8, BASE_HEX, NULL, 0x38,
7696 NULL, HFILL}
7698 { &hf_gsm_a_bssmap_dlci_sapi,
7699 { "SAPI", "gsm_a.bssmap.dlci.sapi",
7700 FT_UINT8, BASE_HEX, VALS(bssap_sapi_values), 0x07,
7701 NULL, HFILL}
7703 { &hf_gsm_a_bssmap_cause,
7704 { "BSSMAP Cause", "gsm_a.bssmap.cause",
7705 FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(gsm_a_bssap_cause_rvals), 0x7F,
7706 NULL, HFILL }
7708 { &hf_gsm_a_bssmap_be_cell_id_disc,
7709 { "Cell identification discriminator","gsm_a.bssmap.be.cell_id_disc",
7710 FT_UINT8,BASE_DEC|BASE_EXT_STRING, &gsm_a_be_cell_id_disc_vals_ext, 0x0f,
7711 NULL, HFILL }
7713 { &hf_gsm_a_bssmap_pci,
7714 { "Preemption Capability indicator(PCI)","gsm_a.bssmap.pci",
7715 FT_BOOLEAN,8, TFS(&bssmap_pci_value), 0x40,
7716 NULL, HFILL }
7718 { &hf_gsm_a_bssmap_qa,
7719 { "Queuing Allowed Indicator(QA)","gsm_a.bssmap.qa",
7720 FT_BOOLEAN,8, TFS(&tfs_allowed_not_allowed), 0x02,
7721 NULL, HFILL }
7723 { &hf_gsm_a_bssmap_pvi,
7724 { "Preemption Vulnerability Indicator(PVI)","gsm_a.bssmap.pvi",
7725 FT_BOOLEAN,8, TFS(&bssmap_pvi_value), 0x01,
7726 NULL, HFILL }
7728 { &hf_gsm_a_bssmap_interference_bands,
7729 { "Acceptable interference bands","gsm_a.bssmap.interference_bands",
7730 FT_UINT8, BASE_HEX, NULL, 0x1f,
7731 NULL, HFILL }
7733 { &hf_gsm_a_bssmap_lsa_only,
7734 { "LSA only","gsm_a.bssmap.lsa_only",
7735 FT_BOOLEAN,8, TFS(&bssmap_lsa_only_value), 0x01,
7736 NULL, HFILL }
7738 { &hf_gsm_a_bssmap_act,
7739 { "Active mode support","gsm_a.bssmap.act",
7740 FT_BOOLEAN,8, NULL, 0x20,
7741 NULL, HFILL }
7743 { &hf_gsm_a_bssmap_pref,
7744 { "Preferential access","gsm_a.bssmap.pref",
7745 FT_BOOLEAN,8, NULL, 0x10,
7746 NULL, HFILL }
7748 { &hf_gsm_a_bssmap_lsa_inf_prio,
7749 { "Priority","gsm_a.bssmap.lsa_inf_prio",
7750 FT_UINT8,BASE_DEC, NULL, 0x0f,
7751 NULL, HFILL }
7753 { &hf_gsm_a_bssmap_seq_len,
7754 { "Sequence Length","gsm_a.bssmap.seq_len",
7755 FT_UINT8,BASE_DEC, NULL, 0xf0,
7756 NULL, HFILL }
7758 { &hf_gsm_a_bssmap_seq_no,
7759 { "Sequence Number","gsm_a.bssmap.seq_no",
7760 FT_UINT8,BASE_DEC, NULL, 0xf,
7761 NULL, HFILL }
7763 { &hf_gsm_a_bssap_cell_id_list_seg_cell_id_disc,
7764 { "Cell identification discriminator","gsm_a.bssmap.cell_id_list_seg_cell_id_disc",
7765 FT_UINT8,BASE_DEC, VALS(gsm_a_bssap_cell_id_list_seg_cell_id_disc_vals), 0xf,
7766 NULL, HFILL }
7768 { &hf_gsm_a_bssap_res_ind_method,
7769 { "Resource indication method","gsm_a.bssmap.res_ind_method",
7770 FT_UINT8,BASE_DEC, VALS(gsm_a_bssap_resource_indication_vals), 0xf,
7771 NULL, HFILL }
7773 { &hf_gsm_a_bssap_cic_list_range,
7774 { "Range","gsm_a.bssmap.cic_list_range",
7775 FT_UINT8, BASE_DEC, NULL, 0,
7776 NULL, HFILL }
7778 { &hf_gsm_a_bssap_cic_list_status,
7779 { "Status","gsm_a.bssmap.cic_list_status",
7780 FT_BYTES, BASE_NONE, NULL, 0,
7781 NULL, HFILL }
7783 { &hf_gsm_a_bssap_diag_error_pointer,
7784 { "Error pointer","gsm_a.bssmap.diag_error_pointer",
7785 FT_UINT16, BASE_HEX, NULL, 0,
7786 NULL, HFILL }
7788 { &hf_gsm_a_bssap_diag_msg_rcv,
7789 { "Message received","gsm_a.bssmap.diag_msg_rcv",
7790 FT_BYTES, BASE_NONE, NULL, 0,
7791 NULL, HFILL }
7793 { &hf_gsm_a_bssmap_ch_mode,
7794 { "Channel mode","gsm_a.bssmap.cch_mode",
7795 FT_UINT8,BASE_DEC, VALS(gsm_a_bssmap_ch_mode_vals), 0xf0,
7796 NULL, HFILL }
7798 { &hf_gsm_a_bssmap_cur_ch_mode,
7799 { "Channel Mode", "gsm_a.bssmap.fe_cur_chan_type2.chan_mode",
7800 FT_UINT8, BASE_HEX, VALS(chan_mode_vals), 0xf0,
7801 NULL, HFILL }
7803 { &hf_gsm_a_bssmap_channel,
7804 { "Channel","gsm_a.bssmap.channel",
7805 FT_UINT8,BASE_DEC, VALS(gsm_a_bssmap_channel_vals), 0x0f,
7806 NULL, HFILL }
7808 { &hf_gsm_a_bssmap_trace_trigger_id,
7809 { "Priority Indication","gsm_a.bssmap.trace_trigger_id",
7810 FT_STRING, BASE_NONE, NULL, 0x0,
7811 NULL, HFILL }
7813 { &hf_gsm_a_bssmap_trace_priority_indication,
7814 { "Priority Indication","gsm_a.bssmap.trace_priority_indication",
7815 FT_UINT8,BASE_DEC, NULL, 0x00,
7816 NULL, HFILL }
7818 { &hf_gsm_a_bssmap_trace_bss_record_type,
7819 { "BSS Record Type","gsm_a.bssmap.bss_record__type",
7820 FT_UINT8,BASE_DEC, VALS(gsm_a_bssmap_trace_bss_record_type_vals), 0x00,
7821 NULL, HFILL }
7823 { &hf_gsm_a_bssmap_trace_msc_record_type,
7824 { "MSC Record Type","gsm_a.bssmap.msc_record_type",
7825 FT_UINT8,BASE_DEC, VALS(gsm_a_bssmap_trace_msc_record_type_vals), 0x00,
7826 NULL, HFILL }
7828 { &hf_gsm_a_bssmap_trace_invoking_event,
7829 { "Invoking Event","gsm_a.bssmap.trace_invoking_event",
7830 FT_UINT8,BASE_DEC, VALS(gsm_a_bssmap_trace_invoking_event_vals), 0x0,
7831 NULL, HFILL }
7833 { &hf_gsm_a_bssmap_trace_reference,
7834 { "Trace Reference","gsm_a.bssmap.trace_id",
7835 FT_UINT16,BASE_DEC, NULL, 0x0,
7836 NULL, HFILL }
7838 { &hf_gsm_a_bssmap_trace_omc_id,
7839 { "OMC ID","gsm_a.bssmap.trace_omc_id",
7840 FT_STRING, BASE_NONE, NULL, 0x0,
7841 NULL, HFILL }
7843 { &hf_gsm_a_bssmap_be_rnc_id,
7844 { "RNC-ID","gsm_a.bssmap.be.rnc_id",
7845 FT_UINT16,BASE_DEC, NULL, 0x0,
7846 NULL, HFILL }
7848 { &hf_gsm_a_bssmap_apdu_protocol_id,
7849 { "Protocol ID", "gsm_a.bssmap.apdu_protocol_id",
7850 FT_UINT8, BASE_DEC, VALS(gsm_a_apdu_protocol_id_strings), 0x0,
7851 "APDU embedded protocol id", HFILL }
7853 { &hf_gsm_a_bssmap_periodicity,
7854 { "Periodicity", "gsm_a.bssmap.periodicity",
7855 FT_UINT8, BASE_DEC, NULL, 0x0,
7856 NULL, HFILL }
7858 { &hf_gsm_a_bssmap_sm,
7859 { "Subsequent Mode","gsm_a.bssmap.sm",
7860 FT_BOOLEAN,8, NULL, 0x02,
7861 NULL, HFILL }
7863 { &hf_gsm_a_bssmap_tarr,
7864 { "Total Accessible Resource Requested","gsm_a.bssmap.tarr",
7865 FT_BOOLEAN,8, NULL, 0x01,
7866 NULL, HFILL }
7868 { &hf_gsm_a_bssmap_tot_no_of_fullr_ch,
7869 { "Total number of accessible full rate channels", "gsm_a.bssmap.tot_no_of_fullr_ch",
7870 FT_UINT16, BASE_DEC, NULL, 0x0,
7871 NULL, HFILL }
7873 { &hf_gsm_a_bssmap_tot_no_of_hr_ch,
7874 { "Total number of accessible half rate channels", "gsm_a.bssmap.tot_no_of_hr_ch",
7875 FT_UINT16, BASE_DEC, NULL, 0x0,
7876 NULL, HFILL }
7878 { &hf_gsm_a_bssmap_lsa_id,
7879 { "Identification of Localised Service Area", "gsm_a.bssmap.lsa_id",
7880 FT_UINT24, BASE_HEX, NULL, 0x0,
7881 NULL, HFILL }
7883 { &hf_gsm_a_bssmap_ep,
7884 { "EP", "gsm_a.bssmap.ep",
7885 FT_UINT8, BASE_DEC, NULL, 0x01,
7886 NULL, HFILL }
7888 { &hf_gsm_a_bssmap_smi,
7889 { "Subsequent Modification Indication(SMI)", "gsm_a.bssmap.smi",
7890 FT_UINT8, BASE_DEC, VALS(gsm_a_bssmap_smi_vals), 0x0f,
7891 NULL, HFILL }
7893 { &hf_gsm_a_bssmap_lcs_pri,
7894 { "Periodicity", "gsm_a.bssmap.lcs_pri",
7895 FT_UINT8, BASE_DEC, VALS(lcs_priority_vals), 0x0,
7896 NULL, HFILL }
7898 { &hf_gsm_a_bssmap_num_ms,
7899 { "Number of handover candidates", "gsm_a.bssmap.num_ms",
7900 FT_UINT8, BASE_DEC,NULL, 0x0,
7901 NULL, HFILL }
7903 { &hf_gsm_a_bssmap_talker_pri,
7904 { "Priority", "gsm_a.bssmap.talker_pri",
7905 FT_UINT8, BASE_DEC,VALS(gsm_a_bssmap_talker_pri_vals), 0x03,
7906 NULL, HFILL }
7908 { &hf_gsm_a_bssmap_rr_mode,
7909 { "RR mode", "gsm_a.bssmap.rr_mode",
7910 FT_UINT8, BASE_DEC, VALS(gsm_a_bssmap_rr_mode_vals), 0xc0,
7911 NULL, HFILL }
7913 { &hf_gsm_a_bssmap_group_cipher_key_nb,
7914 { "Group cipher key number", "gsm_a.bssmap.group_cipher_key_nb",
7915 FT_UINT8, BASE_DEC, VALS(gsm_a_bssmap_group_cipher_key_nb_vals), 0x3c,
7916 NULL, HFILL }
7918 { &hf_gsm_a_bssmap_vgcs_vbs_cell_status,
7919 { "Status", "gsm_a.bssmap.vgcs_vbs_cell_status",
7920 FT_UINT8, BASE_DEC, VALS(gsm_a_bssmap_vgcs_vbs_cell_status_vals), 0x07,
7921 NULL, HFILL }
7923 { &hf_gsm_a_bssmap_paging_cause,
7924 { "Paging Cause", "gsm_a.bssmap.paging_cause",
7925 FT_UINT8, BASE_DEC,VALS(gsm_a_bssmap_paging_cause_vals), 0x06,
7926 NULL, HFILL }
7928 { &hf_gsm_a_bssmap_paging_inf_flg,
7929 { "VGCS/VBS flag","gsm_a.bssmap.paging_inf_flg",
7930 FT_BOOLEAN,8, TFS(&bssmap_paging_inf_flg_value), 0x01,
7931 "If 1, a member of a VGCS/VBS-group", HFILL }
7933 { &hf_gsm_a_bssmap_serv_ho_inf,
7934 { "Service Handover information", "gsm_a.bssmap.serv_ho_inf",
7935 FT_UINT8, BASE_DEC, VALS(gsm_a_bssmap_serv_ho_inf_vals), 0x07,
7936 NULL, HFILL }
7938 { &hf_gsm_a_bssmap_max_nb_traffic_chan,
7939 { "Maximum Number of Traffic Channels", "gsm_a.bssmap.max_nb_traffic_chan",
7940 FT_UINT8, BASE_DEC, VALS(gsm_a_max_nb_traffic_chan_vals), 0x07,
7941 NULL, HFILL }
7943 { &hf_gsm_a_bssmap_acceptable_chan_coding_bit5,
7944 { "TCH/F43.2", "gsm_a.bssmap.acceptable_chan_coding_bit5",
7945 FT_BOOLEAN, 8, TFS(&gsm_a_bssmap_accept_not_accept_vals), 0x10,
7946 NULL, HFILL }
7948 { &hf_gsm_a_bssmap_acceptable_chan_coding_bit4,
7949 { "TCH/F43.2", "gsm_a.bssmap.acceptable_chan_coding_bit4",
7950 FT_BOOLEAN, 8, TFS(&gsm_a_bssmap_accept_not_accept_vals), 0x08,
7951 NULL, HFILL }
7953 { &hf_gsm_a_bssmap_acceptable_chan_coding_bit3,
7954 { "TCH/F43.2", "gsm_a.bssmap.acceptable_chan_coding_bit3",
7955 FT_BOOLEAN, 8, TFS(&gsm_a_bssmap_accept_not_accept_vals), 0x04,
7956 NULL, HFILL }
7958 { &hf_gsm_a_bssmap_acceptable_chan_coding_bit2,
7959 { "TCH/F43.2", "gsm_a.bssmap.acceptable_chan_coding_bit2",
7960 FT_BOOLEAN, 8, TFS(&gsm_a_bssmap_accept_not_accept_vals), 0x02,
7961 NULL, HFILL }
7963 { &hf_gsm_a_bssmap_acceptable_chan_coding_bit1,
7964 { "TCH/F43.2", "gsm_a.bssmap.acceptable_chan_coding_bit1",
7965 FT_BOOLEAN, 8, TFS(&gsm_a_bssmap_accept_not_accept_vals), 0x01,
7966 NULL, HFILL }
7968 { &hf_gsm_a_bssmap_allowed_data_rate_bit8,
7969 { "43.5 kbit/s (TCH/F43.2)", "gsm_a.bssmap.allowed_data_rate_bit8",
7970 FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x80,
7971 NULL, HFILL }
7973 { &hf_gsm_a_bssmap_allowed_data_rate_bit7,
7974 { "32.0 kbit/s (TCH/F32.0)", "gsm_a.bssmap.allowed_data_rate_bit7",
7975 FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x40,
7976 NULL, HFILL }
7978 { &hf_gsm_a_bssmap_allowed_data_rate_bit6,
7979 { "29.0 kbit/s (TCH/F28.8)", "gsm_a.bssmap.allowed_data_rate_bit6",
7980 FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x20,
7981 NULL, HFILL }
7983 { &hf_gsm_a_bssmap_allowed_data_rate_bit5,
7984 { "14.5/14.4 kbit/s (TCH/F14.4)", "gsm_a.bssmap.allowed_data_rate_bit5",
7985 FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x10,
7986 NULL, HFILL }
7988 { &hf_gsm_a_bssmap_allowed_data_rate_bit4,
7989 { "12.0/9.6 kbit/s (TCH F/9.6)", "gsm_a.bssmap.allowed_data_rate_bit4",
7990 FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x08,
7991 NULL, HFILL }
7993 { &hf_gsm_a_bssmap_vstk_rand,
7994 { "VSTK_RAND", "gsm_a.bssmap.vstk_rand",
7995 FT_UINT64, BASE_HEX, NULL, 0,
7996 NULL, HFILL }
7998 { &hf_gsm_a_bssmap_vstk,
7999 { "VSTK", "gsm_a.bssmap.vstk",
8000 FT_BYTES, BASE_NONE, NULL, 0,
8001 NULL, HFILL }
8004 { &hf_gsm_a_bssmap_spare_bits,
8005 { "Spare bit(s)", "gsm_a.bssmap.spare_bits",
8006 FT_UINT8, BASE_HEX, NULL, 0x0,
8007 NULL, HFILL }
8009 { &hf_gsm_a_bssmap_tpind,
8010 { "Talker priority indicator (TP Ind)","gsm_a.bssmap.tpind",
8011 FT_BOOLEAN,8, TFS(&gsm_bssmap_tpind_vals), 0x01,
8012 NULL, HFILL }
8014 { &hf_gsm_a_bssmap_asind_b2,
8015 { "A-interface resource sharing indicator (AS Ind) bit 2","gsm_a.bssmap.asind_b2",
8016 FT_BOOLEAN,8, TFS(&gsm_bssmap_asind_b2_vals), 0x02,
8017 NULL, HFILL }
8019 { &hf_gsm_a_bssmap_asind_b3,
8020 { "A-interface resource sharing indicator (AS Ind) bit 3","gsm_a.bssmap.asind_b3",
8021 FT_BOOLEAN,8, TFS(&gsm_bssmap_asind_b3_vals), 0x04,
8022 NULL, HFILL }
8024 { &hf_gsm_a_bssmap_bss_res,
8025 { "Group or broadcast call re-establishment by the BSS indicator","gsm_a.bssmap.bss_res",
8026 FT_BOOLEAN,8, TFS(&gsm_bssmap_bss_res_vals), 0x08,
8027 NULL, HFILL }
8029 { &hf_gsm_a_bssmap_tcp,
8030 { "Talker Channel Parameter (TCP)","gsm_a.bssmap.tcp",
8031 FT_BOOLEAN,8, TFS(&gsm_bssmap_bss_tcp_vals), 0x10,
8032 NULL, HFILL }
8034 { &hf_gsm_a_bssmap_filler_bits,
8035 { "Filler Bits","gsm_a.bssmap.filler_bits",
8036 FT_UINT8, BASE_DEC,NULL, 0x07,
8037 NULL, HFILL }
8039 { &hf_gsm_a_bssmap_method,
8040 { "Method","gsm_a.bssmap.method",
8041 FT_UINT8, BASE_DEC,VALS(gsm_a_bssmap_method_vals), 0xc0,
8042 NULL, HFILL }
8044 { &hf_gsm_a_bssmap_ganss_id,
8045 { "GANSS Id","gsm_a.bssmap.ganss_id",
8046 FT_UINT8, BASE_DEC,VALS(gsm_a_bssmap_ganss_id_vals), 0x38,
8047 NULL, HFILL }
8049 { &hf_gsm_a_bssmap_usage,
8050 { "Usage","gsm_a.bssmap.usage",
8051 FT_UINT8, BASE_DEC,VALS(gsm_a_bssmap_usage_vals), 0x07,
8052 NULL, HFILL }
8054 { &hf_gsm_a_bssmap_data_id,
8055 { "Data Identity","gsm_a.bssmap.data_id",
8056 FT_UINT8, BASE_DEC_HEX, NULL, 0,
8057 NULL, HFILL }
8059 { &hf_gsm_a_bssmap_bt_ind,
8060 { "BT Ind","gsm_a.bssmap.bt_ind",
8061 FT_BOOLEAN, 8, TFS(&gsm_a_bssmap_bt_ind_val), 0x01,
8062 NULL, HFILL }
8064 { &hf_gsm_a_bssmap_aoip_trans_ipv4,
8065 { "Transport Layer Address (IPv4)","gsm_a.bssmap.aoip_trans_ipv4",
8066 FT_IPv4,BASE_NONE, NULL, 0x0,
8067 NULL, HFILL }
8069 { &hf_gsm_a_bssmap_aoip_trans_ipv6,
8070 { "Transport Layer Address (IPv6)","gsm_a.bssmap.aoip_trans_ipv6",
8071 FT_IPv6,BASE_NONE, NULL, 0x0,
8072 NULL, HFILL }
8074 { &hf_gsm_a_bssmap_aoip_trans_port,
8075 { "UDP Port","gsm_a.bssmap.aoip_trans_port",
8076 FT_UINT16, BASE_DEC,NULL, 0x0,
8077 NULL, HFILL }
8079 { &hf_gsm_a_bssmap_fi,
8080 { "FI(Full IP)","gsm_a.bssmap.fi",
8081 FT_BOOLEAN,8, TFS(&bssmap_fi_vals), 0x80,
8082 NULL, HFILL }
8084 { &hf_gsm_a_bssmap_pi,
8085 { "PI","gsm_a.bssmap.pi",
8086 FT_BOOLEAN,8, TFS(&bssmap_pi_vals), 0x40,
8087 NULL, HFILL }
8089 { &hf_gsm_a_bssmap_pt,
8090 { "PT","gsm_a.bssmap.pt",
8091 FT_BOOLEAN,8, TFS(&bssmap_pt_vals), 0x20,
8092 NULL, HFILL }
8094 { &hf_gsm_a_bssmap_tf,
8095 { "TF","gsm_a.bssmap.tf",
8096 FT_BOOLEAN,8, TFS(&bssmap_tf_vals), 0x10,
8097 NULL, HFILL }
8099 { &hf_gsm_a_bssap_speech_codec,
8100 { "Codec Type","gsm_a.bssmap.speech_codec",
8101 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &bssap_speech_codec_values_ext, 0x0f,
8102 NULL, HFILL }
8104 { &hf_gsm_a_bssap_extended_codec,
8105 { "Extended Codec Type","gsm_a.bssmap.extended_codec",
8106 FT_UINT8, BASE_DEC, VALS(bssap_extended_codec_values), 0x0,
8107 NULL, HFILL }
8109 { &hf_gsm_a_bssap_extended_codec_r2,
8110 { "Redundancy Level 2","gsm_a.bssmap.r2",
8111 FT_BOOLEAN,8, TFS(&tfs_supported_not_supported), 0x80,
8112 NULL, HFILL }
8114 { &hf_gsm_a_bssap_extended_codec_r3,
8115 { "Redundancy Level 3","gsm_a.bssmap.r3",
8116 FT_BOOLEAN,8, TFS(&tfs_supported_not_supported), 0x40,
8117 NULL, HFILL }
8119 { &hf_gsm_a_bssmap_fi2,
8120 { "FI(Full IP)","gsm_a.bssmap.fi2",
8121 FT_BOOLEAN,8, TFS(&bssmap_fi2_vals), 0x80,
8122 NULL, HFILL }
8124 { &hf_gsm_a_bssmap_pi2,
8125 { "PI","gsm_a.bssmap.pi2",
8126 FT_BOOLEAN,8, TFS(&bssmap_pi2_vals), 0x40,
8127 NULL, HFILL }
8129 { &hf_gsm_a_bssmap_pt2,
8130 { "PT","gsm_a.bssmap.pt2",
8131 FT_BOOLEAN,8, TFS(&bssmap_pt2_vals), 0x20,
8132 NULL, HFILL }
8134 { &hf_gsm_a_bssmap_tf2,
8135 { "TF","gsm_a.bssmap.tf2",
8136 FT_BOOLEAN,8, TFS(&bssmap_tf2_vals), 0x10,
8137 NULL, HFILL }
8139 { &hf_gsm_a_bssmap_call_id,
8140 { "Call Identifier","gsm_a.bssmap.callid",
8141 FT_UINT32, BASE_DEC,NULL, 0x0,
8142 NULL, HFILL }
8144 { &hf_gsm_a_bssmap_spare,
8145 { "Spare", "gsm_a.bssmap.spare",
8146 FT_UINT8, BASE_HEX, NULL, 0x0,
8147 NULL, HFILL}
8149 { &hf_gsm_a_bssmap_positioning_data_discriminator,
8150 { "Positioning Data Discriminator", "gsm_a.bssmap.posData.discriminator",
8151 FT_UINT8, BASE_HEX, NULL, 0x0,
8152 NULL, HFILL }
8154 { &hf_gsm_a_bssmap_positioning_method,
8155 { "Positioning method", "gsm_a.bssmap.posData.method",
8156 FT_UINT8, BASE_HEX, VALS(bssmap_positioning_methods), 0x0,
8157 NULL, HFILL }
8159 { &hf_gsm_a_bssmap_positioning_method_usage,
8160 { "Usage", "gsm_a.bssmap.posData.usage",
8161 FT_UINT8, BASE_HEX, VALS(bssmap_positioning_methods_usage), 0x0,
8162 NULL, HFILL }
8164 { &hf_gsm_a_bssmap_location_type_location_information,
8165 { "Location Information", "gsm_a.bssmap.locationType.locationInformation",
8166 FT_UINT8, BASE_HEX, VALS(bssmap_location_information_vals), 0x0,
8167 NULL, HFILL }
8169 { &hf_gsm_a_bssmap_location_type_positioning_method,
8170 { "Positioning Method", "gsm_a.bssmap.locationType.positioningMethod",
8171 FT_UINT8, BASE_HEX, VALS(bssmap_positioning_method_vals), 0x0,
8172 NULL, HFILL }
8174 { &hf_gsm_a_bssmap_chan_type_extension,
8175 { "Extension", "gsm_a.bssmap.chanType.permittedIndicator.extension",
8176 FT_BOOLEAN, 8, TFS(&bssmap_chan_type_extension_value), 0x80,
8177 NULL, HFILL }
8179 { &hf_gsm_a_bssmap_cause_extension,
8180 { "Extension", "gsm_a.bssmap.causeType.extension",
8181 FT_BOOLEAN, 8, TFS(&bssmap_cause_extension_value), 0x80,
8182 NULL, HFILL }
8184 { &hf_gsm_a_bssmap_ass_req,
8185 { "Assignment Requirement", "gsm_a.bssmap.assignment_requirement",
8186 FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_assignment_requirement_vals), 0x0,
8187 NULL, HFILL }
8189 { &hf_gsm_a_bssmap_emlpp_prio,
8190 { "eMLPP Priority", "gsm_a.bssmap.emlpp_priority",
8191 FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_call_priority_vals), 0x07,
8192 NULL, HFILL }
8194 { &hf_gsm_a_bssmap_rip,
8195 { "RIP", "gsm_a.bssmap.rip",
8196 FT_BOOLEAN, 8, TFS(&gsm_a_bssmap_rip_value), 0x02,
8197 NULL, HFILL }
8199 { &hf_gsm_a_bssmap_rtd,
8200 { "RTD", "gsm_a.bssmap.rtd",
8201 FT_BOOLEAN, 8, TFS(&gsm_a_bssmap_rtd_value), 0x01,
8202 NULL, HFILL }
8204 { &hf_gsm_a_bssmap_kc128,
8205 { "Kc128", "gsm_a.bssmap.kc128",
8206 FT_BYTES, BASE_NONE, NULL, 0,
8207 NULL, HFILL }
8209 { &hf_gsm_a_bssmap_csg_id,
8210 { "CSG Identity", "gsm_a.bssmap.csg_id",
8211 FT_UINT32, BASE_DEC, NULL, 0,
8212 NULL, HFILL }
8214 { &hf_gsm_a_bssmap_cell_access_mode,
8215 { "Cell Access Mode", "gsm_a.bssmap.cell_access_mode",
8216 FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_bssmap_cell_access_mode_value), 0,
8217 NULL, HFILL }
8220 { &hf_fe_extra_info_prec,
8221 { "Pre-emption Recommendation", "gsm_a.bssmap.fe_extra_info.prec",
8222 FT_UINT8, BASE_DEC, VALS(fe_extra_info_prec_vals), 0x01,
8223 NULL, HFILL }
8225 { &hf_fe_extra_info_lcs,
8226 { "LCS Information", "gsm_a.bssmap.fe_extra_info.lcs",
8227 FT_UINT8, BASE_DEC, VALS(fe_extra_info_lcs_vals), 0x02,
8228 NULL, HFILL }
8230 { &hf_fe_extra_info_ue_prob,
8231 { "UE support of UMTS", "gsm_a.bssmap.fe_extra_info.ue_prob",
8232 FT_UINT8, BASE_DEC, VALS(fe_extra_info_ue_prob_vals), 0x04,
8233 NULL, HFILL }
8235 { &hf_fe_extra_info_spare,
8236 { "Extra Information Spare bits", "gsm_a.bssmap.fe_extra_info.spare",
8237 FT_UINT8, BASE_HEX, NULL, 0xf8,
8238 NULL, HFILL }
8240 { &hf_fe_cur_chan_type2_chan_mode,
8241 { "Channel Mode", "gsm_a.bssmap.fe_cur_chan_type2.chan_mode",
8242 FT_UINT8, BASE_HEX, VALS(chan_mode_vals), 0x0f,
8243 NULL, HFILL }
8245 { &hf_fe_cur_chan_type2_chan_mode_spare,
8246 { "Channel Mode Spare bits", "gsm_a.bssmap.fe_cur_chan_type2_chan_mode.spare",
8247 FT_UINT8, BASE_HEX, NULL, 0xf0,
8248 NULL, HFILL }
8250 { &hf_fe_cur_chan_type2_chan_field,
8251 { "Channel Field", "gsm_a.bssmap.fe_cur_chan_type2.chan_field",
8252 FT_UINT8, BASE_HEX, VALS(fe_cur_chan_type2_chan_field_vals),0x0f,
8253 NULL, HFILL }
8255 { &hf_fe_cur_chan_type2_chan_field_spare,
8256 { "Channel field Spare bits", "gsm_a.bssmap.fe_cur_chan_type2_chan_field.spare",
8257 FT_UINT8, BASE_HEX, NULL, 0xf0,
8258 NULL, HFILL }
8260 { &hf_fe_target_radio_cell_info_rxlev_ncell,
8261 { "RXLEV-NCELL", "gsm_a.bssmap.fe_target_radio_cell_info.rxlev_ncell",
8262 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &gsm_a_rr_rxlev_vals_ext, 0x3f,
8263 NULL, HFILL }
8265 { &hf_fe_target_radio_cell_info_rxlev_ncell_spare,
8266 { "RXLEV-NCELL Spare bits", "gsm_a.bssmap.fe_target_radio_cell_info.rxlev_ncell_spare",
8267 FT_UINT8, BASE_HEX, NULL, 0xc0,
8268 NULL, HFILL }
8270 { &hf_fe_dtm_info_dtm_ind,
8271 { "DTM indicator", "gsm_a.bssmap.fe_dtm_info.dtm_ind",
8272 FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_dtm_info_dtm_ind_vals), 0x01,
8273 NULL, HFILL }
8275 { &hf_fe_dtm_info_sto_ind,
8276 { "Time Slot Operation indicator", "gsm_a.bssmap.fe_dtm_info.sto_ind",
8277 FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_dtm_info_sto_ind_vals), 0x02,
8278 NULL, HFILL }
8280 { &hf_fe_dtm_info_egprs_ind,
8281 { "EGPRS indicator", "gsm_a.bssmap.fe_dtm_info.egprs_ind",
8282 FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_dtm_info_egprs_ind_vals), 0x04,
8283 NULL, HFILL }
8285 { &hf_fe_dtm_info_spare_bits,
8286 { "DTM Info Spare bits", "gsm_a.bssmap.fe_dtm_info.spare_bits",
8287 FT_UINT8, BASE_HEX, NULL, 0xf8,
8288 NULL, HFILL }
8290 { &hf_fe_cell_load_info_cell_capacity_class,
8291 { "Cell capacity class", "gsm_a.bssmap.fe_cell_load_info.cell_capacity_class",
8292 FT_UINT8, BASE_DEC, NULL, 0,
8293 NULL, HFILL }
8295 { &hf_fe_cell_load_info_load_value,
8296 { "Load value", "gsm_a.bssmap.fe_cell_load_info.load_info",
8297 FT_UINT8, BASE_DEC, NULL, 0,
8298 NULL, HFILL }
8300 { &hf_fe_cell_load_info_rt_load_value,
8301 { "Realtime load value", "gsm_a.bssmap.fe_cell_load_info.rt_load_value",
8302 FT_UINT8, BASE_DEC, NULL, 0,
8303 NULL, HFILL }
8305 { &hf_fe_cell_load_info_nrt_load_information_value,
8306 { "Non-Realtime load information value", "gsm_a.bssmap.fe_cell_load_info.nrt_load_info_value",
8307 FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_cell_load_nrt_vals), 0,
8308 NULL, HFILL }
8310 { &hf_fe_ps_indication,
8311 { "PS Indication", "gsm_a.bssmap.fe_ps_indication.value",
8312 FT_UINT8, BASE_HEX, NULL, 0,
8313 NULL, HFILL }
8315 { &hf_fe_dtm_ho_command_ind_spare,
8316 { "Spare octet", "gsm_a.bssmap.fe_dtm_ho_command_ind.spare",
8317 FT_UINT8, BASE_HEX, NULL, 0,
8318 NULL, HFILL }
8320 { &hf_gsm_a_bssmap_speech_data_ind,
8321 { "Speech/Data Indicator", "gsm_a.bssmap.speech_data_ind",
8322 FT_UINT8, BASE_DEC, VALS(gsm_a_bssap_speech_data_ind_vals), 0x0f,
8323 NULL, HFILL }
8325 { &hf_gsm_a_bssmap_channel_rate_and_type,
8326 { "Channel Rate and Type", "gsm_a.bssmap.rate_and_type",
8327 FT_UINT8, BASE_DEC, VALS(gsm_a_bssap_channel_rate_and_type_vals), 0x0,
8328 NULL, HFILL }
8330 { &hf_gsm_a_bssmap_perm_speech_v_ind,
8331 { "Permitted speech version indication", "gsm_a.bssmap.perm_speech_v_ind",
8332 FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(speech_version_id_rvals), 0x7f,
8333 NULL, HFILL }
8335 { &hf_gsm_a_bssmap_reroute_rej_cause,
8336 { "Reroute Reject cause", "gsm_a.bssmap.reroute_rej_cause",
8337 FT_UINT8, BASE_HEX, VALS(gsm_a_bssap_reroute_rej_cause_vals), 0x0,
8338 NULL, HFILL }
8340 { &hf_gsm_a_bssmap_send_seqn,
8341 { "Send Sequence Number", "gsm_a.bssmap.send_seqn",
8342 FT_UINT8, BASE_HEX, NULL, 0xc0,
8343 NULL, HFILL }
8345 { &hf_gsm_a_bssmap_reroute_outcome,
8346 { "Outcome", "gsm_a.bssmap.reroute_outcome",
8347 FT_UINT8, BASE_HEX, VALS(gsm_a_bssap_reroute_outcome_vals), 0x0,
8348 NULL, HFILL }
8350 { &hf_gsm_a_bssmap_lcls_conf,
8351 { "LCLS-Configuration", "gsm_a.bssmap.lcls_conf",
8352 FT_UINT8, BASE_HEX, VALS(gsm_a_bssap_lcls_conf_vals), 0x0f,
8353 NULL, HFILL }
8355 { &hf_gsm_a_bssmap_lcls_con_status_control,
8356 { "LCLS-Connection-Status-Control", "gsm_a.bssmap.lcls_con_status_control",
8357 FT_UINT8, BASE_HEX, VALS(gsm_a_bssap_lcls_con_status_control_vals), 0x0f,
8358 NULL, HFILL }
8360 { &hf_gsm_a_bssmap_lcls_bss_status,
8361 { "LCLS-BSS-Status", "gsm_a.bssmap.lcls_bss_status",
8362 FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_lcls_bss_status_vals), 0x0f,
8363 NULL, HFILL }
8365 { &hf_gsm_a_bssmap_osmocom_osmux_cid,
8366 { "Osmux CID", "gsm_a.bssmap.osmocom_osmux_cid",
8367 FT_UINT8, BASE_DEC, NULL, 0,
8368 NULL, HFILL }
8371 /* Generated from convert_proto_tree_add_text.pl */
8372 { &hf_gsm_a_bssmap_pcm_multiplexer, { "PCM Multiplexer", "gsm_a_bssmap.pcm_multiplexer", FT_UINT16, BASE_DEC, NULL, 0xffe0, NULL, HFILL }},
8373 { &hf_gsm_a_bssmap_timeslot, { "Timeslot", "gsm_a_bssmap.timeslot", FT_UINT16, BASE_DEC, NULL, 0x001f, NULL, HFILL }},
8374 { &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 { &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 { &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 { &hf_gsm_a_bssmap_national_cause, { "National Cause", "gsm_a_bssmap.national_cause", FT_UINT8, BASE_DEC, NULL, 0x0f, NULL, HFILL }},
8378 { &hf_gsm_a_bssmap_cause_value, { "Cause Value", "gsm_a_bssmap.cause_value", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
8379 { &hf_gsm_a_bssmap_cause16, { "Cause", "gsm_a_bssmap.cause", FT_UINT16, BASE_DEC, NULL, 0x07ff, NULL, HFILL }},
8380 { &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 { &hf_gsm_a_bssmap_tio, { "TIO", "gsm_a_bssmap.tio", FT_UINT8, BASE_DEC, NULL, 0x07, NULL, HFILL }},
8382 { &hf_gsm_a_bssmap_enc_info_key, { "Key", "gsm_a_bssmap.enc_info_key", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8383 { &hf_gsm_a_bssmap_transparent_service, { "Service", "gsm_a_bssmap.transparent_service", FT_BOOLEAN, 8, TFS(&tfs_non_transparent_transparent), 0x40, NULL, HFILL }},
8384 { &hf_gsm_a_bssmap_rate, { "Rate", "gsm_a_bssmap.rate", FT_UINT8, BASE_DEC, NULL, 0x3f, NULL, HFILL }},
8385 { &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 { &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 { &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 { &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 { &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 { &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 { &hf_gsm_a_bssmap_unknown_format, { "Unknown format", "gsm_a_bssmap.unknown_format", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8392 { &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 { &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 { &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 { &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 { &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 { &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 { &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 { &hf_gsm_a_bssmap_qri, { "qri recommended queuing", "gsm_a_bssmap.qri", FT_BOOLEAN, 8, TFS(&tfs_allowed_not_allowed), 0x02, NULL, HFILL }},
8400 { &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 { &hf_gsm_a_bssmap_apdu, { "APDU", "gsm_a_bssmap.apdu", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8402 { &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 { &hf_gsm_a_bssmap_s0_s15, { "S0 - S15", "gsm_a_bssmap.s0_s15", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8404 { &hf_gsm_a_bssmap_s0_s7, { "S0 - S7", "gsm_a_bssmap.s0_s7", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8405 { &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 { &hf_gsm_a_bssmap_message_elements, { "Message Elements", "gsm_a_bssmap.message_elements", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
8407 { &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 { &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 { &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 { &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 { &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 { &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 { &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 { &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 { &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 { &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 { &hf_gsm_a_bssmap_cell_discriminator, { "Cell Discriminator", "gsm_a_bssmap.cell_discriminator", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
8418 { &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 }},
8421 expert_module_t* expert_gsm_a_bssmap;
8423 static ei_register_info ei[] = {
8424 { &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 { &ei_gsm_a_bssmap_not_decoded_yet, { "gsm_a_bssmap.not_decoded_yet", PI_UNDECODED, PI_WARN, "Not decoded yet", EXPFILL }},
8426 { &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 { &ei_gsm_a_bssmap_bogus_length, { "gsm_a_bssmap.bogus_length", PI_PROTOCOL, PI_WARN, "Bogus length", EXPFILL }},
8428 { &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 }},
8431 /* Setup protocol subtree array */
8432 #define NUM_INDIVIDUAL_ELEMS 5
8433 int *ett[NUM_INDIVIDUAL_ELEMS + NUM_GSM_BSSMAP_MSG +
8434 NUM_GSM_BSSMAP_ELEM];
8436 ett[0] = &ett_bssmap_msg;
8437 ett[1] = &ett_cell_list;
8438 ett[2] = &ett_dlci;
8439 ett[3] = &ett_codec_lst;
8440 ett[4] = &ett_bss_to_bss_info;
8442 last_offset = NUM_INDIVIDUAL_ELEMS;
8444 for (i=0; i < NUM_GSM_BSSMAP_MSG; i++, last_offset++)
8446 ett[last_offset] = &ett_gsm_bssmap_msg[i];
8449 for (i=0; i < NUM_GSM_BSSMAP_ELEM; i++, last_offset++)
8451 ett[last_offset] = &ett_gsm_bssmap_elem[i];
8454 /* Register the protocol name and description */
8456 proto_a_bssmap =
8457 proto_register_protocol("GSM A-I/F BSSMAP", "GSM BSSMAP", "gsm_a.bssmap");
8459 proto_register_field_array(proto_a_bssmap, hf, array_length(hf));
8461 proto_register_subtree_array(ett, array_length(ett));
8463 expert_gsm_a_bssmap = expert_register_protocol(proto_a_bssmap);
8464 expert_register_field_array(expert_gsm_a_bssmap, ei, array_length(ei));
8466 bssmap_handle = register_dissector("gsm_a_bssmap", dissect_bssmap, proto_a_bssmap);
8470 void
8471 proto_reg_handoff_gsm_a_bssmap(void)
8473 dissector_add_uint("bssap.pdu_type", GSM_A_PDU_TYPE_BSSMAP, bssmap_handle);
8475 dtap_handle = find_dissector_add_dependency("gsm_a_dtap", proto_a_bssmap);
8476 gsm_bsslap_handle = find_dissector_add_dependency("gsm_bsslap", proto_a_bssmap);
8477 bssgp_handle = find_dissector_add_dependency("bssgp", proto_a_bssmap);
8478 rrc_handle = find_dissector_add_dependency("rrc", proto_a_bssmap);
8479 bicc_mst_handle = find_dissector_add_dependency("bicc_mst", proto_a_bssmap);
8483 * Editor modelines - https://www.wireshark.org/tools/modelines.html
8485 * Local variables:
8486 * c-basic-offset: 4
8487 * tab-width: 8
8488 * indent-tabs-mode: nil
8489 * End:
8491 * vi: set shiftwidth=4 tabstop=8 expandtab:
8492 * :indentSize=4:tabSize=8:noTabs=true: