Coverage Report

Created: 2025-08-04 07:15

/src/wireshark/epan/dissectors/packet-gsm_a_gm.c
Line
Count
Source (jump to first uncovered line)
1
/* packet-gsm_a_gm.c
2
 * Routines for GSM A Interface GPRS Mobility Management and GPRS Session Management
3
 *
4
 * Copyright 2003, Michael Lum <mlum [AT] telostech.com>
5
 * In association with Telos Technology Inc.
6
 *
7
 * Added the GPRS Mobility Management Protocol and
8
 * the GPRS Session Management Protocol
9
 *   Copyright 2004, Rene Pilz <rene.pilz [AT] ftw.com>
10
 *   In association with Telecommunications Research Center
11
 *   Vienna (ftw.)Betriebs-GmbH within the Project Metawin.
12
 *
13
 * Various updates, enhancements and fixes
14
 * Copyright 2009, Gerasimos Dimitriadis <dimeg [AT] intracom.gr>
15
 * In association with Intracom Telecom SA
16
 *
17
 * Title    3GPP      Other
18
 *
19
 *   Reference [7]
20
 *   Mobile radio interface Layer 3 specification;
21
 *   Core network protocols;
22
 *   Stage 3
23
 *   (3GPP TS 24.008 version 5.9.0 Release 5)
24
 *
25
 *   Reference [8]
26
 *   Mobile radio interface Layer 3 specification;
27
 *   Core network protocols;
28
 *   Stage 3
29
 *   (3GPP TS 24.008 version 6.7.0 Release 6)
30
 *   (3GPP TS 24.008 version 6.8.0 Release 6)
31
 *
32
 *   Reference [9]
33
 *   Mobile radio interface Layer 3 specification;
34
 *   Core network protocols;
35
 *   Stage 3
36
 *   (3GPP TS 24.008 version 9.6.0 Release 9)
37
 *
38
 *   Reference [10]
39
 *   Mobile radio interface Layer 3 specification;
40
 *   Core network protocols;
41
 *   Stage 3
42
 *   (3GPP TS 24.008 version 10.6.1 Release 10)
43
 *
44
 *   Reference [11]
45
 *   Mobile radio interface Layer 3 specification;
46
 *   Core network protocols;
47
 *   Stage 3
48
 *   (3GPP TS 24.008 version 11.7.0 Release 11)
49
 *
50
 *   Reference [12]
51
 *   Mobile radio interface Layer 3 specification;
52
 *   Core network protocols;
53
 *   Stage 3
54
 *   (3GPP TS 24.008 version 12.10.0 Release 12)
55
 *
56
 *   Reference [13]
57
 *   Mobile radio interface Layer 3 specification;
58
 *   Core network protocols;
59
 *   Stage 3
60
 *   (3GPP TS 24.008 version 13.8.0 Release 13)
61
 *
62
 *   Reference [14]
63
 *   Mobile radio interface Layer 3 specification;
64
 *   Core network protocols;
65
 *   Stage 3
66
 *   (3GPP TS 24.008 version 14.6.0 Release 14)
67
 *
68
 *   Reference [15]
69
 *   Mobile radio interface Layer 3 specification;
70
 *   Core network protocols;
71
 *   Stage 3
72
 *   (3GPP TS 24.008 version 15.6.0 Release 15)
73
 *
74
 *   Reference [16]
75
 *   Mobile radio interface Layer 3 specification;
76
 *   Core network protocols;
77
 *   Stage 3
78
 *   (3GPP TS 24.008 version 16.6.0 Release 16)
79
 *
80
 *   Reference [17]
81
 *   Mobile radio interface Layer 3 specification;
82
 *   Core network protocols;
83
 *   Stage 3
84
 *   (3GPP TS 24.008 version 17.8.0 Release 17)
85
 *
86
 *   Reference [18]
87
 *   Mobile radio interface Layer 3 specification;
88
 *   Core network protocols;
89
 *   Stage 3
90
 *   (3GPP TS 24.008 version 18.8.0 Release 18)
91
 *
92
 * Wireshark - Network traffic analyzer
93
 * By Gerald Combs <gerald@wireshark.org>
94
 * Copyright 1998 Gerald Combs
95
 *
96
 * SPDX-License-Identifier: GPL-2.0-or-later
97
 */
98
99
#include "config.h"
100
101
102
#include <epan/packet.h>
103
#include <epan/expert.h>
104
#include <epan/ipproto.h>
105
#include <epan/etypes.h>
106
#include <epan/tfs.h>
107
#include <epan/unit_strings.h>
108
#include <wsutil/array.h>
109
#include "packet-ber.h"
110
#include "packet-gsm_a_common.h"
111
#include "packet-e212.h"
112
#include "packet-ppp.h"
113
#include "packet-e164.h"
114
115
void proto_register_gsm_a_gm(void);
116
void proto_reg_handoff_gsm_a_gm(void);
117
118
/* PROTOTYPES/FORWARDS */
119
120
const value_string gsm_a_dtap_msg_gmm_strings[] = {
121
  { 0x01, "Attach Request" },
122
  { 0x02, "Attach Accept" },
123
  { 0x03, "Attach Complete" },
124
  { 0x04, "Attach Reject" },
125
  { 0x05, "Detach Request" },
126
  { 0x06, "Detach Accept" },
127
  { 0x08, "Routing Area Update Request" },
128
  { 0x09, "Routing Area Update Accept" },
129
  { 0x0a, "Routing Area Update Complete" },
130
  { 0x0b, "Routing Area Update Reject" },
131
  { 0x0c, "Service Request" },
132
  { 0x0d, "Service Accept" },
133
  { 0x0e, "Service Reject" },
134
  { 0x10, "P-TMSI Reallocation Command" },
135
  { 0x11, "P-TMSI Reallocation Complete" },
136
  { 0x12, "Authentication and Ciphering Req" },
137
  { 0x13, "Authentication and Ciphering Resp" },
138
  { 0x14, "Authentication and Ciphering Rej" },
139
  { 0x15, "Identity Request" },
140
  { 0x16, "Identity Response" },
141
  { 0x1c, "Authentication and Ciphering Failure" },
142
  { 0x20, "GMM Status" },
143
  { 0x21, "GMM Information" },
144
  { 0, NULL }
145
};
146
static value_string_ext gsm_a_dtap_msg_gmm_strings_ext = VALUE_STRING_EXT_INIT(gsm_a_dtap_msg_gmm_strings);
147
148
149
const value_string gsm_a_dtap_msg_sm_strings[] = {
150
  { 0x41, "Activate PDP Context Request" },
151
  { 0x42, "Activate PDP Context Accept" },
152
  { 0x43, "Activate PDP Context Reject" },
153
  { 0x44, "Request PDP Context Activation" },
154
  { 0x45, "Request PDP Context Activation rej." },
155
  { 0x46, "Deactivate PDP Context Request" },
156
  { 0x47, "Deactivate PDP Context Accept" },
157
  { 0x48, "Modify PDP Context Request(Network to MS direction)" },
158
  { 0x49, "Modify PDP Context Accept (MS to network direction)" },
159
  { 0x4a, "Modify PDP Context Request(MS to network direction)" },
160
  { 0x4b, "Modify PDP Context Accept (Network to MS direction)" },
161
  { 0x4c, "Modify PDP Context Reject" },
162
  { 0x4d, "Activate Secondary PDP Context Request" },
163
  { 0x4e, "Activate Secondary PDP Context Accept" },
164
  { 0x4f, "Activate Secondary PDP Context Reject" },
165
  { 0x50, "Reserved: was allocated in earlier phases of the protocol" },
166
  { 0x51, "Reserved: was allocated in earlier phases of the protocol" },
167
  { 0x52, "Reserved: was allocated in earlier phases of the protocol" },
168
  { 0x53, "Reserved: was allocated in earlier phases of the protocol" },
169
  { 0x54, "Reserved: was allocated in earlier phases of the protocol" },
170
  { 0x55, "SM Status" },
171
  { 0x56, "Activate MBMS Context Request" },
172
  { 0x57, "Activate MBMS Context Accept" },
173
  { 0x58, "Activate MBMS Context Reject" },
174
  { 0x59, "Request MBMS Context Activation" },
175
  { 0x5a, "Request MBMS Context Activation Reject" },
176
  { 0x5b, "Request Secondary PDP Context Activation" },
177
  { 0x5c, "Request Secondary PDP Context Activation Reject" },
178
  { 0x5d, "Notification" },
179
  { 0, NULL }
180
};
181
static value_string_ext gsm_a_dtap_msg_sm_strings_ext = VALUE_STRING_EXT_INIT(gsm_a_dtap_msg_sm_strings);
182
183
184
static const value_string gsm_gm_elem_strings[] = {
185
  /* GPRS Mobility Management Information Elements 10.5.5 */
186
  { DE_ADD_UPD_TYPE,     "Additional Update Type" },
187
  { DE_ATTACH_RES,     "Attach Result" },
188
  { DE_ATTACH_TYPE,    "Attach Type" },
189
  { DE_CIPH_ALG,       "Ciphering Algorithm" },
190
  { DE_INTEG_ALG,      "Integrity Algorithm" },
191
  { DE_TMSI_STAT,      "TMSI Status" },
192
  { DE_DETACH_TYPE,    "Detach Type" },
193
  { DE_DRX_PARAM,      "DRX Parameter" },
194
  { DE_FORCE_TO_STAND,     "Force to Standby" },
195
  { DE_FORCE_TO_STAND_H,     "Force to Standby" },
196
  { DE_P_TMSI_SIG,     "P-TMSI Signature" },
197
  { DE_P_TMSI_SIG_2,     "P-TMSI Signature 2" },
198
  { DE_ID_TYPE_2,      "Identity Type 2" },
199
  { DE_IMEISV_REQ,     "IMEISV Request" },
200
  { DE_REC_N_PDU_NUM_LIST,   "Receive N-PDU Numbers List" },
201
  { DE_MS_NET_CAP,     "MS Network Capability" },
202
  { DE_MS_RAD_ACC_CAP,     "MS Radio Access Capability" },
203
  { DE_GMM_CAUSE,      "GMM Cause" },
204
  { DE_RAI,      "Routing Area Identification" },
205
  { DE_RAI_2,      "Routing Area Identification 2" },
206
  { DE_UPD_RES,      "Update Result" },
207
  { DE_UPD_TYPE,       "Update Type" },
208
  { DE_AC_REF_NUM,     "A&C Reference Number" },
209
  { DE_AC_REF_NUM_H,     "A&C Reference Number" },
210
  { DE_SRVC_TYPE,      "Service Type" },
211
  { DE_CELL_NOT,       "Cell Notification" },
212
  { DE_PS_LCS_CAP,     "PS LCS Capability" },
213
  { DE_NET_FEAT_SUP,     "Network Feature Support" },
214
  { DE_ADD_NET_FEAT_SUP,     "Additional Network Feature Support" },
215
  { DE_RAT_INFO_CONTAINER,   "Inter RAT Information Container" },
216
  { DE_REQ_MS_INFO,    "Requested MS Information" },
217
  { DE_UE_NETWORK_CAP,     "UE Network Capability" },
218
  { DE_EUTRAN_IRAT_INFO_CONTAINER, "E-UTRAN Inter RAT Information Container" },
219
  { DE_VOICE_DOMAIN_PREF,    "Voice Domain Preference and UE's Usage Setting" },
220
  { DE_PTMSI_TYPE,     "P-TMSI Type" },
221
  { DE_LAI_2,      "Location Area Identification 2" },
222
  { DE_NET_RES_ID_CONT,    "Network Resource Identifier Container" },
223
  { DE_EXT_DRX_PARAMS,     "Extended DRX Parameters" },
224
  { DE_MAC,      "Message Authentication Code" },
225
  { DE_UP_INTEG_IND,     "User Plane Integrity Indicator" },
226
  { DE_DCN_ID,       "DCN-ID"},
227
  { DE_PLMN_ID_CN_OPERATOR,  "PLMN identity of the CN operator"},
228
  { DE_NON_3GPP_NW_PROV_POL,   "Non-3GPP NW provided policies"},
229
  /* Session Management Information Elements 10.5.6 */
230
  { DE_ACC_POINT_NAME,     "Access Point Name" },
231
  { DE_NET_SAPI,       "Network Service Access Point Identifier" },
232
  { DE_PRO_CONF_OPT,     "Protocol Configuration Options" },
233
  { DE_EXT_PRO_CONF_OPT,     "Extended Protocol Configuration Options" },
234
  { DE_PD_PRO_ADDR,    "Packet Data Protocol Address" },
235
  { DE_QOS,      "Quality Of Service" },
236
  { DE_RE_ATTEMPT_IND,     "Re-attempt Indicator" },
237
  { DE_EXT_QOS,      "Extended Quality Of Service" },
238
  { DE_SM_CAUSE,       "SM Cause" },
239
  { DE_SM_CAUSE_2,     "SM Cause 2" },
240
  { DE_LINKED_TI,      "Linked TI" },
241
  { DE_LLC_SAPI,       "LLC Service Access Point Identifier" },
242
  { DE_TEAR_DOWN_IND,    "Tear Down Indicator" },
243
  { DE_PACKET_FLOW_ID,     "Packet Flow Identifier" },
244
  { DE_TRAFFIC_FLOW_TEMPLATE,  "Traffic Flow Template" },
245
  { DE_TMGI,       "Temporary Mobile Group Identity (TMGI)" },
246
  { DE_MBMS_BEARER_CAP,    "MBMS bearer capabilities" },
247
  { DE_MBMS_PROT_CONF_OPT,   "MBMS protocol configuration options" },
248
  { DE_ENH_NSAPI,      "Enhanced network service access point identifier" },
249
  { DE_REQ_TYPE,       "Request type" },
250
  { DE_SM_NOTIF_IND,     "Notification indicator" },
251
  { DE_SM_CONNECTIVITY_TYPE,   "Connectivity type" },
252
  { DE_SM_WLAN_OFFLOAD_ACCEPT,   "WLAN offload acceptability" },
253
  { DE_NBIFOM_CONT,    "NBIFOM container" },
254
  /* GPRS Common Information Elements 10.5.7 */
255
  { DE_PDP_CONTEXT_STAT,     "PDP Context Status" },
256
  { DE_RAD_PRIO,       "Radio Priority" },
257
  { DE_GPRS_TIMER,     "GPRS Timer" },
258
  { DE_GPRS_TIMER_2,     "GPRS Timer 2" },
259
  { DE_GPRS_TIMER_3,     "GPRS Timer 3" },
260
  { DE_RAD_PRIO_2,     "Radio Priority 2"},
261
  { DE_MBMS_CTX_STATUS,    "MBMS context status"},
262
  { DE_UPLINK_DATA_STATUS,   "Uplink data status"},
263
  { DE_DEVICE_PROPERTIES,    "Device properties"},
264
  { 0, NULL }
265
};
266
value_string_ext gsm_gm_elem_strings_ext = VALUE_STRING_EXT_INIT(gsm_gm_elem_strings);
267
268
764
#define DTAP_GMM_IEI_MASK 0xff
269
259
#define DTAP_SM_IEI_MASK  0xff
270
271
/* Initialize the protocol and registered fields */
272
static int proto_a_gm;
273
274
static int hf_gsm_a_dtap_msg_gmm_type;
275
static int hf_gsm_a_dtap_msg_sm_type;
276
int hf_gsm_a_gm_elem_id;
277
static int hf_gsm_a_sm_qos_delay_cls;
278
static int hf_gsm_a_sm_qos_reliability_cls;
279
static int hf_gsm_a_sm_qos_traffic_cls;
280
static int hf_gsm_a_sm_qos_del_order;
281
static int hf_gsm_a_sm_qos_del_of_err_sdu;
282
static int hf_gsm_a_sm_qos_ber;
283
static int hf_gsm_a_sm_qos_sdu_err_rat;
284
static int hf_gsm_a_sm_qos_traff_hdl_pri;
285
286
static int hf_gsm_a_gmm_split_pg_cycle_code;
287
static int hf_gsm_a_gmm_split_on_ccch;
288
static int hf_gsm_a_gmm_non_drx_timer;
289
static int hf_gsm_a_gmm_cn_spec_drx_cycle_len_coef;
290
291
static int hf_gsm_a_gmm_ptmsi_sig;
292
static int hf_gsm_a_gmm_ptmsi_sig2;
293
294
static int hf_gsm_a_sm_tft_op_code;
295
static int hf_gsm_a_sm_tft_e_bit;
296
static int hf_gsm_a_sm_tft_pkt_flt;
297
static int hf_gsm_a_sm_tft_pkt_flt_id;
298
static int hf_gsm_a_sm_tft_pkt_flt_dir;
299
static int hf_gsm_a_sm_ip4_address;
300
static int hf_gsm_a_sm_ip4_mask;
301
static int hf_gsm_a_sm_ip6_address;
302
static int hf_gsm_a_sm_ip6_mask;
303
static int hf_gsm_a_sm_ip6_prefix_length;
304
static int hf_gsm_a_sm_tft_protocol_header;
305
static int hf_gsm_a_sm_tft_port;
306
static int hf_gsm_a_sm_tft_port_low;
307
static int hf_gsm_a_sm_tft_port_high;
308
static int hf_gsm_a_sm_tft_security;
309
static int hf_gsm_a_sm_tft_traffic_class;
310
static int hf_gsm_a_sm_tft_traffic_mask;
311
static int hf_gsm_a_sm_tft_flow_label_type;
312
static int hf_gsm_a_sm_tft_param_id;
313
static int hf_gsm_a_sm_tft_packet_filter;
314
static int hf_gsm_a_sm_tft_packet_evaluation_precedence;
315
static int hf_gsm_a_sm_tft_packet_filter_length;
316
static int hf_gsm_a_sm_tft_authorization_token_value;
317
static int hf_gsm_a_sm_tft_media_component_number_value;
318
static int hf_gsm_a_sm_tft_ip_flow_number;
319
static int hf_gsm_a_sm_tft_packet_filter_identifier;
320
static int hf_gsm_a_sm_tft_parameter_content;
321
static int hf_gsm_a_sm_tft_packet_filter_component_type_id;
322
static int hf_gsm_a_sm_tft_mac_addr;
323
static int hf_gsm_a_sm_tft_vlan_tag_vid;
324
static int hf_gsm_a_sm_tft_vlan_tag_pcp;
325
static int hf_gsm_a_sm_tft_vlan_tag_dei;
326
static int hf_gsm_a_sm_tft_ethertype;
327
static int hf_gsm_a_gm_acc_tech_type;
328
static int hf_gsm_a_gm_acc_cap_struct_len;
329
static int hf_gsm_a_gm_sms_value;
330
static int hf_gsm_a_gm_sm_value;
331
static int hf_gsm_a_gm_link_dir;
332
static int hf_gsm_a_gm_cause;
333
334
static int hf_gsm_a_gm_add_upd_type;
335
static int hf_gsm_a_gm_fop;
336
static int hf_gsm_a_gm_res_of_attach;
337
static int hf_gsm_a_gm_type_of_ciph_alg;
338
static int hf_gsm_a_gm_type_of_integ_alg;
339
static int hf_gsm_a_gm_imeisv_req;
340
static int hf_gsm_a_gm_nsapi;
341
static int hf_gsm_a_gm_ac_ref_nr;
342
static int hf_gsm_a_gm_force_to_standby;
343
static int hf_gsm_a_gm_serv_type;
344
static int hf_gsm_a_gm_for;
345
static int hf_gsm_a_gm_type_of_attach;
346
static int hf_gsm_a_gm_tmsi_flag;
347
static int hf_gsm_a_gm_power_off;
348
static int hf_gsm_a_gm_type_of_detach_mo;
349
static int hf_gsm_a_gm_type_of_detach_mt;
350
static int hf_gsm_a_gm_update_type;
351
static int hf_gsm_a_gm_gprs_timer;
352
static int hf_gsm_a_gm_gprs_timer_unit;
353
static int hf_gsm_a_gm_gprs_timer_value;
354
static int hf_gsm_a_gm_gprs_timer2;
355
static int hf_gsm_a_gm_gprs_timer2_unit;
356
static int hf_gsm_a_gm_gprs_timer2_value;
357
static int hf_gsm_a_gm_gprs_timer3;
358
static int hf_gsm_a_gm_gprs_timer3_unit;
359
static int hf_gsm_a_gm_gprs_timer3_value;
360
static int hf_gsm_a_gm_nsapi_5_ul_stat;
361
static int hf_gsm_a_gm_nsapi_6_ul_stat;
362
static int hf_gsm_a_gm_nsapi_7_ul_stat;
363
static int hf_gsm_a_gm_nsapi_8_ul_stat;
364
static int hf_gsm_a_gm_nsapi_9_ul_stat;
365
static int hf_gsm_a_gm_nsapi_10_ul_stat;
366
static int hf_gsm_a_gm_nsapi_11_ul_stat;
367
static int hf_gsm_a_gm_nsapi_12_ul_stat;
368
static int hf_gsm_a_gm_nsapi_13_ul_stat;
369
static int hf_gsm_a_gm_nsapi_14_ul_stat;
370
static int hf_gsm_a_gm_nsapi_15_ul_stat;
371
static int hf_gsm_a_gm_device_prop_low_prio;
372
static int hf_gsm_a_gm_apn;
373
static int hf_gsm_a_gm_pco_pid;
374
static int hf_gsm_a_gm_pco_app_spec_info;
375
static int hf_gsm_a_gm_type_of_identity;
376
int hf_gsm_a_gm_rac;
377
static int hf_gsm_a_gm_mta_e;
378
static int hf_gsm_a_gm_mta_r;
379
static int hf_gsm_a_gm_apc;
380
static int hf_gsm_a_gm_otd_a;
381
static int hf_gsm_a_gm_otd_b;
382
static int hf_gsm_a_gm_gps_a;
383
static int hf_gsm_a_gm_gps_b;
384
static int hf_gsm_a_gm_gps_c;
385
static int hf_gsm_a_gm_motd;
386
static int hf_gsm_a_gm_mta_a;
387
static int hf_gsm_a_gm_lcs_molr;
388
static int hf_gsm_a_gm_mbms;
389
static int hf_gsm_a_gm_ims_vops;
390
static int hf_gsm_a_gm_emc_bs;
391
static int hf_gsm_a_gm_epco;
392
static int hf_gsm_a_gm_restrict_ec;
393
static int hf_gsm_a_gm_gprs_sms;
394
static int hf_gsm_a_gm_req_ms_info_irat;
395
static int hf_gsm_a_gm_req_ms_info_irat2;
396
static int hf_gsm_a_gm_ue_usage_setting;
397
static int hf_gsm_a_gm_voice_domain_pref_for_eutran;
398
static int hf_gsm_a_gm_ptmsi_type;
399
static int hf_gsm_a_gm_nri_cont;
400
static int hf_gsm_a_gm_paging_time_window;
401
static int hf_gsm_a_gm_edrx_value;
402
static int hf_gsm_a_gm_ext_paging_time_window;
403
static int hf_gsm_a_gm_mac;
404
static int hf_gsm_a_gm_up_integ_ind;
405
static int hf_gsm_a_gm_dcn_id;
406
static int hf_gsm_a_gm_n3en_ind;
407
static int hf_gsm_a_sm_pdp_type_org;
408
static int hf_gsm_a_sm_qos_mean_thr;
409
static int hf_gsm_a_sm_qos_peak_thr;
410
static int hf_gsm_a_sm_qos_prec_class;
411
static int hf_gsm_a_sm_qos_trans_delay;
412
static int hf_gsm_a_sm_qos_signalling_ind;
413
static int hf_gsm_a_sm_qos_source_stat_desc;
414
static int hf_gsm_a_sm_qos_max_bitrate_upl;
415
static int hf_gsm_a_sm_qos_max_bitrate_downl;
416
static int hf_gsm_a_sm_qos_guar_bitrate_upl;
417
static int hf_gsm_a_sm_qos_guar_bitrate_downl;
418
static int hf_gsm_a_sm_qos_max_bitrate_upl_ext;
419
static int hf_gsm_a_sm_qos_max_bitrate_downl_ext;
420
static int hf_gsm_a_sm_qos_guar_bitrate_upl_ext;
421
static int hf_gsm_a_sm_qos_guar_bitrate_downl_ext;
422
static int hf_gsm_a_sm_qos_max_bitrate_upl_ext2;
423
static int hf_gsm_a_sm_qos_max_bitrate_downl_ext2;
424
static int hf_gsm_a_sm_qos_guar_bitrate_upl_ext2;
425
static int hf_gsm_a_sm_qos_guar_bitrate_downl_ext2;
426
static int hf_gsm_a_sm_qos_maximum_sdu_size;
427
static int hf_gsm_a_sm_eplmnc;
428
static int hf_gsm_a_sm_ratc;
429
static int hf_gsm_a_sm_cause;
430
static int hf_gsm_a_sm_cause_2;
431
static int hf_gsm_a_sm_llc_sapi;
432
static int hf_gsm_a_sm_tdi;
433
static int hf_gsm_a_sm_packet_flow_id;
434
static int hf_gsm_a_sm_tmgi;
435
static int hf_gsm_a_sm_enh_nsapi;
436
static int hf_gsm_a_sm_req_type;
437
static int hf_gsm_a_sm_notif_ind;
438
static int hf_gsm_a_sm_connectivity_type;
439
static int hf_gsm_a_sm_wlan_utran_offload_accept;
440
static int hf_gsm_a_sm_wlan_eutran_offload_accept;
441
static int hf_gsm_a_sm_nbifom_cont;
442
static int hf_gsm_a_gm_rac_ctrled_early_cm_sending;
443
static int hf_gsm_a_gm_rac_pseudo_sync;
444
static int hf_gsm_a_gm_rac_vgcs;
445
static int hf_gsm_a_gm_rac_vbs;
446
static int hf_gsm_a_gm_rac_multislot_capability;
447
static int hf_gsm_a_gm_rac_hscsd_multi_slot_class;
448
static int hf_gsm_a_gm_rac_gprs_multi_slot_class;
449
static int hf_gsm_a_gm_rac_gprs_ext_dyn_alloc_cap;
450
static int hf_gsm_a_gm_rac_ecsd_multi_slot_class;
451
static int hf_gsm_a_gm_rac_egprs_multi_slot_class;
452
static int hf_gsm_a_gm_rac_egprs_ext_dyn_alloc_cap;
453
static int hf_gsm_a_gm_rac_dtm_gprs_multi_slot_class;
454
static int hf_gsm_a_gm_rac_single_slt_dtm;
455
static int hf_gsm_a_gm_rac_dtm_egprs_multi_slot_cls_pres;
456
static int hf_gsm_a_gm_rac_dtm_egprs_multi_slot_class;
457
static int hf_gsm_a_gm_rac_8psk_pow_cap_pres;
458
static int hf_gsm_a_gm_rac_comp_int_meas_cap;
459
static int hf_gsm_a_gm_rel_lev_ind;
460
static int hf_gsm_a_gm_rac_geran_feat_pkg;
461
static int hf_gsm_a_gm_rac_umts_fdd_cap;
462
static int hf_gsm_a_gm_rac_umts_384_tdd_ra_cap;
463
static int hf_gsm_a_gm_rac_cdma2000_cap;
464
static int hf_gsm_a_gm_rac_umts_128_tdd_ra_cap;
465
static int hf_gsm_a_gm_rac_mod_based_multi_slot_class_support;
466
static int hf_gsm_a_gm_rac_geran_iu_mode_cap;
467
static int hf_gsm_a_gm_rac_flo_iu_cap;
468
static int hf_gsm_a_gm_rac_mult_tbf_cap;
469
static int hf_gsm_a_gm_rac_down_adv_rec_perf;
470
static int hf_gsm_a_gm_rac_ext_rlc_mac_ctrl_msg_seg_cap;
471
static int hf_gsm_a_gm_rac_dtm_enh_cap;
472
static int hf_gsm_a_gm_rac_dtm_gprs_high_multi_slot_class;
473
static int hf_gsm_a_gm_rac_dtm_egprs_high_multi_slot_class;
474
static int hf_gsm_a_gm_rac_ps_ho_cap;
475
static int hf_gsm_a_gm_rac_dtm_ho_cap;
476
static int hf_gsm_a_gm_rac_multi_slot_cap_red_down_dual_carrier;
477
static int hf_gsm_a_gm_rac_down_dual_carrier_dtm_cap;
478
static int hf_gsm_a_gm_rac_flex_ts_assign;
479
static int hf_gsm_a_gm_rac_gan_ps_ho_cap;
480
static int hf_gsm_a_gm_rac_rlc_non_pers_mode;
481
static int hf_gsm_a_gm_rac_reduced_lat_cap;
482
static int hf_gsm_a_gm_rac_ul_egprs2;
483
static int hf_gsm_a_gm_rac_dl_egprs2;
484
static int hf_gsm_a_gm_rac_eutra_fdd_support;
485
static int hf_gsm_a_gm_rac_eutra_tdd_support;
486
static int hf_gsm_a_gm_rac_geran_to_eutra_support_in_geran_ptm;
487
static int hf_gsm_a_gm_rac_prio_based_resel_support;
488
static int hf_gsm_a_gm_rac_alt_efta_multi_slot_class;
489
static int hf_gsm_a_gm_rac_efta_multi_slot_cap_red_down_dual_carrier;
490
static int hf_gsm_a_gm_rac_ind_up_layer_pdu_start_cap_for_rlc_um;
491
static int hf_gsm_a_gm_rac_emst_cap;
492
static int hf_gsm_a_gm_rac_mtti_cap;
493
static int hf_gsm_a_gm_rac_utra_csg_cell_report;
494
static int hf_gsm_a_gm_rac_eutra_csg_cell_report;
495
static int hf_gsm_a_gm_rac_dtr_cap;
496
static int hf_gsm_a_gm_rac_emsr_cap;
497
static int hf_gsm_a_gm_rac_fast_down_freq_switch_cap;
498
static int hf_gsm_a_gm_rac_tighter_cap;
499
static int hf_gsm_a_gm_rac_fanr_cap;
500
static int hf_gsm_a_gm_rac_ipa_cap;
501
static int hf_gsm_a_gm_rac_geran_nw_sharing_support;
502
static int hf_gsm_a_gm_rac_eutra_wb_rsrq_support;
503
static int hf_gsm_a_gm_rac_utra_mfbi_support;
504
static int hf_gsm_a_gm_rac_eutra_mfbi_support;
505
static int hf_gsm_a_gm_rac_dlmc_non_contig_intra_band_recep;
506
static int hf_gsm_a_gm_rac_dlmc_inter_band_recep;
507
static int hf_gsm_a_gm_rac_dlmc_max_bandwidth;
508
static int hf_gsm_a_gm_rac_dlmc_max_nb_dl_ts;
509
static int hf_gsm_a_gm_rac_dlmc_max_nb_dl_carriers;
510
static int hf_gsm_a_gm_rac_ext_tsc_set_cap_support;
511
static int hf_gsm_a_gm_rac_ext_earfcn_value_range;
512
static int hf_gsm_a_gm_rac_ec_pch_mon_support;
513
static int hf_gsm_a_gm_rac_ms_sync_accuracy;
514
static int hf_gsm_a_gm_rac_ec_ul_cov_enh_support;
515
static int hf_gsm_a_gm_rac_mta_access_sec_support;
516
static int hf_gsm_a_gm_rac_ec_paging_ind_chan_mon_support;
517
static int hf_gsm_a_sm_ti_flag;
518
static int hf_gsm_a_sm_ext;
519
520
static int hf_gsm_a_gmm_net_cap_gea1;
521
static int hf_gsm_a_gmm_net_cap_smdch;
522
static int hf_gsm_a_gmm_net_cap_smgprs;
523
static int hf_gsm_a_gmm_net_cap_ucs2;
524
static int hf_gsm_a_gmm_net_cap_ss_scr_ind;
525
static int hf_gsm_a_gmm_net_cap_solsa;
526
static int hf_gsm_a_gmm_net_cap_rev;
527
static int hf_gsm_a_gmm_net_cap_pfc;
528
static int hf_gsm_a_gmm_net_cap_ext_gea_bits;
529
static int hf_gsm_a_gmm_net_cap_gea2;
530
static int hf_gsm_a_gmm_net_cap_gea3;
531
static int hf_gsm_a_gmm_net_cap_gea4;
532
static int hf_gsm_a_gmm_net_cap_gea5;
533
static int hf_gsm_a_gmm_net_cap_gea6;
534
static int hf_gsm_a_gmm_net_cap_gea7;
535
static int hf_gsm_a_gmm_net_cap_lcs;
536
static int hf_gsm_a_gmm_net_cap_ps_irat_iu;
537
static int hf_gsm_a_gmm_net_cap_ps_irat_s1;
538
static int hf_gsm_a_gmm_net_cap_comb_proc;
539
static int hf_gsm_a_gmm_net_cap_isr;
540
static int hf_gsm_a_gmm_net_cap_srvcc_to_geran;
541
static int hf_gsm_a_gmm_net_cap_epc;
542
static int hf_gsm_a_gmm_net_cap_nf;
543
static int hf_gsm_a_gmm_net_geran_net_sharing;
544
static int hf_gsm_a_gmm_net_cap_up_int_prot;
545
static int hf_gsm_a_gmm_net_cap_up_gia4;
546
static int hf_gsm_a_gmm_net_cap_up_gia5;
547
static int hf_gsm_a_gmm_net_cap_up_gia6;
548
static int hf_gsm_a_gmm_net_cap_up_gia7;
549
static int hf_gsm_a_gmm_net_cap_epco_ie_ind;
550
static int hf_gsm_a_gmm_net_cap_restrict_use_enh_cov;
551
static int hf_gsm_a_gmm_net_cap_dc_eutra_nr_cap;
552
553
/* Generated from convert_proto_tree_add_text.pl */
554
static int hf_gsm_a_gm_presence;
555
static int hf_gsm_a_gm_8psk_power_class;
556
static int hf_gsm_a_gm_rf_power_capability;
557
static int hf_gsm_a_gm_a5_bits;
558
static int hf_gsm_a_gm_8psk_power_capability;
559
static int hf_gsm_a_gm_extended_dtm_gprs_multi_slot_class;
560
static int hf_gsm_a_gm_extended_dtm_egprs_multi_slot_class;
561
static int hf_gsm_a_gm_high_multislot_capability;
562
static int hf_gsm_a_gm_gmsk_multislot_power_profile;
563
static int hf_gsm_a_gm_8psk_multislot_power_profile;
564
static int hf_gsm_a_gm_update_result;
565
static int hf_gsm_a_gm_radio_priority_pdp;
566
static int hf_gsm_a_gm_radio_priority_tom8;
567
static int hf_gsm_a_gm_configuration_protocol;
568
static int hf_gsm_a_gm_sm_pco_length;
569
static int hf_gsm_a_gm_sm_pco_length2;
570
static int hf_gsm_a_gm_sm_pco_pcscf_ipv6;
571
static int hf_gsm_a_gm_sm_pco_dns_ipv6;
572
static int hf_gsm_a_gm_sm_pco_dsmipv6_home_agent_ipv6;
573
static int hf_gsm_a_gm_sm_pco_dsmipv6_home_network_ipv6;
574
static int hf_gsm_a_gm_sm_pco_reject_code;
575
static int hf_gsm_a_gm_sm_pco_dsmipv6_home_network_prefix_length;
576
static int hf_gsm_a_gm_sm_pco_dsmipv6_home_agent_ipv4;
577
static int hf_gsm_a_gm_sm_pco_pcscf_ipv4;
578
static int hf_gsm_a_gm_sm_pco_dns_ipv4;
579
static int hf_gsm_a_gm_sm_pco_ipv4_link_mtu_size;
580
static int hf_gsm_a_gm_sm_pco_nbifom_mode;
581
static int hf_gsm_a_gm_sm_pco_non_ip_link_mtu_size;
582
static int hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_aer;
583
static int hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_ul_time_unit;
584
static int hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_max_ul_rate;
585
static int hf_gsm_a_gm_sm_pco_3gpp_data_off_ue_status;
586
static int hf_gsm_a_gm_sm_pco_sel_bearer_ctrl_mode;
587
static int hf_gsm_a_gm_sm_pco_add_apn_rate_ctrl_params_ul_time_unit;
588
static int hf_gsm_a_gm_sm_pco_add_apn_rate_ctrl_params_max_ul_rate;
589
static int hf_gsm_a_gm_sm_pco_pdu_session_id;
590
static int hf_gsm_a_gm_sm_pco_pdu_session_address_lifetime;
591
static int hf_gsm_a_gm_sm_pco_eth_frame_payload_mtu;
592
static int hf_gsm_a_gm_sm_pco_unstruct_link_mtu;
593
static int hf_gsm_a_gm_sm_pco_5gsm_cause;
594
static int hf_gsm_a_gm_sm_pco_acs_info;
595
static int hf_gsm_a_gm_sm_pco_init_small_data_rate_ctrl_params_max_ul_rate_allowed;
596
static int hf_gsm_a_gm_sm_pco_init_small_data_rate_ctrl_params_termination_timestamp;
597
static int hf_gsm_a_gm_sm_pco_atsss_response;
598
static int hf_gsm_a_gm_sm_pco_dns_serv_sec_info_type;
599
static int hf_gsm_a_gm_sm_pco_dns_serv_sec_info_sec_proto_type;
600
static int hf_gsm_a_gm_sm_pco_dns_serv_sec_info_port_number;
601
static int hf_gsm_a_gm_sm_pco_dns_serv_sec_info_auth_domain_name;
602
static int hf_gsm_a_gm_sm_pco_dns_serv_sec_info_spki_pin_set;
603
static int hf_gsm_a_gm_sm_pco_dns_serv_sec_info_root_certificate;
604
static int hf_gsm_a_gm_sm_pco_dns_serv_sec_info_raw_public_key;
605
static int hf_gsm_a_gm_sm_pco_dns_serv_sec_info_value_part;
606
static int hf_gsm_a_gm_sm_pco_ecs_addr_type;
607
static int hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_type;
608
static int hf_gsm_a_gm_sm_pco_ecs_addr_ipv4;
609
static int hf_gsm_a_gm_sm_pco_ecs_addr_ipv6;
610
static int hf_gsm_a_gm_sm_pco_ecs_addr_fqdn_len;
611
static int hf_gsm_a_gm_sm_pco_ecs_addr_fqdn;
612
static int hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_cont_len;
613
static int hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_cont;
614
static int hf_gsm_a_gm_sm_pco_ecs_addr_espili;
615
static int hf_gsm_a_gm_sm_pco_ecs_addr_eami;
616
static int hf_gsm_a_gm_sm_pco_ecs_addr_tlsgi;
617
static int hf_gsm_a_gm_sm_pco_ecs_addr_tlsai;
618
static int hf_gsm_a_gm_sm_pco_ecs_addr_tlscsci;
619
static int hf_gsm_a_gm_sm_pco_ecs_addr_supported_plmns_info_list_cont_len;
620
static int hf_gsm_a_gm_sm_pco_ecs_addr_supported_plmns_info_list_cont;
621
static int hf_gsm_a_gm_sm_pco_ecsp_id;
622
static int hf_gsm_a_gm_sm_pco_pvs_ipv4;
623
static int hf_gsm_a_gm_sm_pco_pvs_ipv6;
624
static int hf_gsm_a_gm_sm_pco_pvs_name_len;
625
static int hf_gsm_a_gm_sm_pco_pvs_name;
626
static int hf_gsm_a_gm_sm_pco_pvs_s_nssai_ind;
627
static int hf_gsm_a_gm_sm_pco_pvs_dnn_ind;
628
static int hf_gsm_a_gm_sm_pco_pvs_dnn_len;
629
static int hf_gsm_a_gm_sm_pco_pvs_s_nssai_len;
630
static int hf_gsm_a_gm_sm_pco_dns_serv_sec_prot_support;
631
static int hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_fqdn;
632
static int hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_ipv6;
633
static int hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_ipv4;
634
static int hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv4_range_low;
635
static int hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv4_range_high;
636
static int hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv6_range_low;
637
static int hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv6_range_high;
638
static int hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_fqdn;
639
static int hf_gsm_a_gm_sm_pco_sdnaepc_dn_specific_id;
640
static int hf_gsm_a_sm_pdp_type_number;
641
static int hf_gsm_a_sm_pdp_address;
642
static int hf_gsm_a_gm_ti_value;
643
644
/* Initialize the subtree pointers */
645
static int ett_gmm_radio_cap;
646
static int ett_gmm_network_cap;
647
static int ett_gsm_a_gm_msrac_multislot_capability;
648
static int ett_gmm_rai;
649
static int ett_gmm_gprs_timer;
650
651
static int ett_sm_tft;
652
static int ett_sm_pco;
653
654
static expert_field ei_gsm_a_gm_extraneous_data;
655
static expert_field ei_gsm_a_gm_not_enough_data;
656
static expert_field ei_gsm_a_gm_undecoded;
657
static expert_field ei_gsm_a_gm_missing_mandatory_element;
658
659
static dissector_handle_t rrc_irat_ho_info_handle;
660
static dissector_handle_t lte_rrc_ue_eutra_cap_handle;
661
static dissector_handle_t nbifom_handle;
662
static dissector_handle_t eap_handle;
663
664
static dissector_table_t gprs_sm_pco_subdissector_table; /* GPRS SM PCO PPP Protocols */
665
666
static const unit_name_string units_message_messages = { " message", " messages" };
667
668
1.09k
#define NUM_GSM_GM_ELEM array_length(gsm_gm_elem_strings)
669
int ett_gsm_gm_elem[NUM_GSM_GM_ELEM];
670
671
static const char *pdp_str[2]={ "PDP-INACTIVE", "PDP-ACTIVE" };
672
673
/*
674
 * [9] 10.5.5.0 Additional Update Type
675
 */
676
static const true_false_string gsm_a_gm_add_upd_type_value = {
677
  "SMS only",
678
  "No additional information (shall be interpreted as request for combined attach or combined tracking area updating)"
679
};
680
static uint16_t
681
de_gmm_add_upd_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_)
682
46
{
683
46
  uint32_t curr_offset, bit_offset;
684
685
46
  curr_offset = offset;
686
46
  bit_offset  = (curr_offset<<3)+4;
687
688
46
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
689
46
  bit_offset += 3;
690
46
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_add_upd_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
691
46
  curr_offset++;
692
693
46
  return (curr_offset - offset);
694
46
}
695
696
 /*
697
 * [9] 10.5.5.1 Attach result
698
 */
699
static const value_string gsm_a_gm_res_of_attach_vals[] = {
700
  { 0x01, "GPRS only attached" },
701
  { 0x03, "Combined GPRS/IMSI attached" },
702
  { 0, NULL }
703
};
704
705
static uint16_t
706
de_gmm_attach_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
707
39
{
708
39
  proto_tree_add_item(tree, hf_gsm_a_gm_fop, tvb, offset, 1, ENC_BIG_ENDIAN);
709
39
  proto_tree_add_item(tree, hf_gsm_a_gm_res_of_attach, tvb, offset, 1, ENC_BIG_ENDIAN);
710
711
  /* no length check possible */
712
39
  return 1;
713
39
}
714
715
/*
716
 * [9] 10.5.5.2 Attach type
717
 */
718
static const value_string gsm_a_gm_type_of_attach_vals[] = {
719
  { 0x01, "GPRS attach" },
720
  { 0x02, "Not used (In earlier versions: GPRS attach while IMSI attached)" },
721
  { 0x03, "Combined GPRS/IMSI attached" },
722
  { 0, NULL }
723
};
724
725
static uint16_t
726
de_gmm_attach_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_)
727
124
{
728
124
  proto_tree_add_item(tree, hf_gsm_a_gm_for, tvb, offset, 1, ENC_BIG_ENDIAN);
729
124
  proto_tree_add_item(tree, hf_gsm_a_gm_type_of_attach, tvb, offset, 1, ENC_BIG_ENDIAN);
730
731
  /* no length check possible */
732
124
  return 1;
733
124
}
734
735
/*
736
 * [9] 10.5.5.3 Ciphering algorithm
737
 */
738
const value_string gsm_a_gm_type_of_ciph_alg_vals[] = {
739
  { 0x00, "ciphering not used" },
740
  { 0x01, "GPRS Encryption Algorithm GEA/1" },
741
  { 0x02, "GPRS Encryption Algorithm GEA/2" },
742
  { 0x03, "GPRS Encryption Algorithm GEA/3" },
743
  { 0x04, "GPRS Encryption Algorithm GEA/4" },
744
  { 0x05, "GPRS Encryption Algorithm GEA/5" },
745
  { 0x06, "GPRS Encryption Algorithm GEA/6" },
746
  { 0x07, "GPRS Encryption Algorithm GEA/7" },
747
  { 0, NULL }
748
};
749
750
static uint16_t
751
de_gmm_ciph_alg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
752
2
{
753
2
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 1, ENC_BIG_ENDIAN);
754
2
  proto_tree_add_item(tree, hf_gsm_a_gm_type_of_ciph_alg, tvb, offset, 1, ENC_BIG_ENDIAN);
755
756
  /* no length check possible */
757
2
  return 1;
758
2
}
759
760
/*
761
 * [13] 10.5.5.3a Integrity protection algorithm
762
 */
763
static const value_string gsm_a_gm_type_of_integ_alg_vals[] = {
764
  { 0x00, "GPRS Integrity Algorithm GIA/4" },
765
  { 0x01, "GPRS Integrity Algorithm GIA/5" },
766
  { 0x02, "GPRS Integrity Algorithm GIA/6" },
767
  { 0x03, "GPRS Integrity Algorithm GIA/7" },
768
  { 0, NULL }
769
};
770
771
static uint16_t
772
de_gmm_integ_alg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
773
0
{
774
0
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 1, ENC_BIG_ENDIAN);
775
0
  proto_tree_add_item(tree, hf_gsm_a_gm_type_of_integ_alg, tvb, offset, 1, ENC_BIG_ENDIAN);
776
777
  /* no length check possible */
778
0
  return 1;
779
0
}
780
781
/*
782
 * [9] 10.5.5.4 TMSI status
783
 */
784
static const true_false_string gsm_a_gm_tmsi_flag_value = {
785
  "valid TMSI available",
786
  "no valid TMSI available"
787
};
788
789
static uint16_t
790
de_gmm_tmsi_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
791
10
{
792
10
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 3, ENC_BIG_ENDIAN);
793
10
  proto_tree_add_item(tree, hf_gsm_a_gm_tmsi_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
794
795
  /* no length check possible */
796
10
  return 1;
797
10
}
798
799
/*
800
 * [7] 10.5.5.5
801
 */
802
static const true_false_string gsm_a_gm_power_off_value = {
803
  "power switched off",
804
  "normal detach"
805
};
806
807
static const value_string gsm_a_gm_type_of_detach_mo_vals[] = {
808
  { 0x01, "GPRS detach" },
809
  { 0x02, "IMSI detach" },
810
  { 0x03, "Combined GPRS/IMSI detach" },
811
  { 0, NULL }
812
};
813
814
static const value_string gsm_a_gm_type_of_detach_mt_vals[] = {
815
  { 0x01, "re-attach required" },
816
  { 0x02, "re-attach not required" },
817
  { 0x03, "IMSI detach (after VLR failure)" },
818
  { 0, NULL }
819
};
820
821
static uint16_t
822
de_gmm_detach_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_)
823
1
{
824
1
  uint32_t curr_offset;
825
826
1
  curr_offset = offset;
827
828
1
  if (pinfo->p2p_dir == P2P_DIR_RECV) {
829
1
    proto_tree_add_item(tree, hf_gsm_a_gm_power_off, tvb, offset, 1, ENC_BIG_ENDIAN);
830
1
    proto_tree_add_item(tree, hf_gsm_a_gm_type_of_detach_mo, tvb, offset, 1, ENC_BIG_ENDIAN);
831
1
  } else {
832
0
    proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 1, ENC_BIG_ENDIAN);
833
0
    proto_tree_add_item(tree, hf_gsm_a_gm_type_of_detach_mt, tvb, offset, 1, ENC_BIG_ENDIAN);
834
0
  }
835
836
1
  curr_offset++;
837
838
  /* no length check possible */
839
840
1
  return (curr_offset - offset);
841
1
}
842
843
/*
844
 * [7] 10.5.5.6
845
 */
846
847
/* SPLIT PG CYCLE CODE, octet 2 */
848
static const value_string gsm_a_gmm_split_pg_cycle_code_strings[] = {
849
  {  0, "704 (equivalent to no DRX)" },
850
  {  1, "1" },
851
  {  2, "2" },
852
  {  3, "3" },
853
  {  4, "4" },
854
  {  5, "5" },
855
  {  6, "6" },
856
  {  7, "7" },
857
  {  8, "8" },
858
  {  9, "9" },
859
  { 10, "10" },
860
  { 11, "11" },
861
  { 12, "12" },
862
  { 13, "13" },
863
  { 14, "14" },
864
  { 15, "15" },
865
  { 16, "16" },
866
  { 17, "17" },
867
  { 18, "18" },
868
  { 19, "19" },
869
  { 20, "20" },
870
  { 21, "21" },
871
  { 22, "22" },
872
  { 23, "23" },
873
  { 24, "24" },
874
  { 25, "25" },
875
  { 26, "26" },
876
  { 27, "27" },
877
  { 28, "28" },
878
  { 29, "29" },
879
  { 30, "30" },
880
  { 31, "31" },
881
  { 32, "32" },
882
  { 33, "33" },
883
  { 34, "34" },
884
  { 35, "35" },
885
  { 36, "36" },
886
  { 37, "37" },
887
  { 38, "38" },
888
  { 39, "39" },
889
  { 40, "40" },
890
  { 41, "41" },
891
  { 42, "42" },
892
  { 43, "43" },
893
  { 44, "44" },
894
  { 45, "45" },
895
  { 46, "46" },
896
  { 47, "47" },
897
  { 48, "48" },
898
  { 49, "49" },
899
  { 50, "50" },
900
  { 51, "51" },
901
  { 52, "52" },
902
  { 53, "53" },
903
  { 54, "54" },
904
  { 55, "55" },
905
  { 56, "56" },
906
  { 57, "57" },
907
  { 58, "58" },
908
  { 59, "59" },
909
  { 60, "60" },
910
  { 61, "61" },
911
  { 62, "62" },
912
  { 63, "63" },
913
  { 64, "64" },
914
  { 65, "71" },
915
  { 66, "72" },
916
  { 67, "74" },
917
  { 68, "75" },
918
  { 69, "77" },
919
  { 70, "79" },
920
  { 71, "80" },
921
  { 72, "83" },
922
  { 73, "86" },
923
  { 74, "88" },
924
  { 75, "90" },
925
  { 76, "92" },
926
  { 77, "96" },
927
  { 78, "101" },
928
  { 79, "103" },
929
  { 80, "107" },
930
  { 81, "112" },
931
  { 82, "116" },
932
  { 83, "118" },
933
  { 84, "128" },
934
  { 85, "141" },
935
  { 86, "144" },
936
  { 87, "150" },
937
  { 88, "160" },
938
  { 89, "171" },
939
  { 90, "176" },
940
  { 91, "192" },
941
  { 92, "214" },
942
  { 93, "224" },
943
  { 94, "235" },
944
  { 95, "256" },
945
  { 96, "288" },
946
  { 97, "320" },
947
  { 98, "352" },
948
  { 0, NULL }
949
};
950
static value_string_ext gsm_a_gmm_split_pg_cycle_code_strings_ext = VALUE_STRING_EXT_INIT(gsm_a_gmm_split_pg_cycle_code_strings);
951
952
/* SPLIT on CCCH, octet 3 (bit 4)
953
 * 0 Split pg cycle on CCCH is not supported by the mobile station
954
 * 1 Split pg cycle on CCCH is supported by the mobile station
955
 */
956
static const true_false_string gsm_a_gmm_split_on_ccch_value = {
957
  "Split pg cycle on CCCH is supported by the mobile station",
958
  "Split pg cycle on CCCH is not supported by the mobile station"
959
};
960
961
/* non-DRX timer, octet 3
962
 * bit
963
 * 3 2 1
964
 */
965
static const value_string gsm_a_gmm_non_drx_timer_strings[] = {
966
  { 0x00, "no non-DRX mode after transfer state" },
967
  { 0x01, "max. 1 sec non-DRX mode after transfer state" },
968
  { 0x02, "max. 2 sec non-DRX mode after transfer state" },
969
  { 0x03, "max. 4 sec non-DRX mode after transfer state" },
970
  { 0x04, "max. 8 sec non-DRX mode after transfer state" },
971
  { 0x05, "max. 16 sec non-DRX mode after transfer state" },
972
  { 0x06, "max. 32 sec non-DRX mode after transfer state" },
973
  { 0x07, "max. 64 sec non-DRX mode after transfer state" },
974
  { 0, NULL },
975
};
976
/*
977
 * CN Specific DRX cycle length coefficient, octet 3
978
 * bit
979
 * 8 7 6 5 Iu and S1 mode specific
980
 * 0 0 0 0 For Iu mode, CN Specific DRX cycle length coefficient not specified by the MS, ie. the
981
 * system information value 'CN domain specific DRX cycle length' is used.
982
 * For S1 mode, DRX value not specified by the MS.
983
 * (Ref 3GPP TS 25.331 and 36.304)
984
 * 0 1 1 0 CN Specific DRX cycle length coefficient 6 and T = 32
985
 * 0 1 1 1 CN Specific DRX cycle length coefficient 7 and T = 64
986
 * 1 0 0 0 CN Specific DRX cycle length coefficient 8 and T = 128
987
 * 1 0 0 1 CN Specific DRX cycle length coefficient 9 and T = 256
988
 * All other values shall be interpreted as "CN Specific DRX cycle length coefficient not
989
 * specified by the MS" and "DRX value not specified by the MS" by this version of the protocol.
990
 * NOTE: For Iu mode and S1 mode, this field (octet 3 bits 8 to 5) is used, but was spare in earlier
991
 * versions of this protocol.
992
 */
993
static const range_string gsm_a_gmm_cn_spec_drx_cycle_len_coef_strings[] = {
994
  { 0x00, 0x05, "CN Specific DRX cycle length coefficient / value not specified by the MS" },
995
  { 0x06, 0x06, "CN Specific DRX cycle length coefficient 6 and T = 32" },
996
  { 0x07, 0x07, "CN Specific DRX cycle length coefficient 7 and T = 64" },
997
  { 0x08, 0x08, "CN Specific DRX cycle length coefficient 8 and T = 128" },
998
  { 0x09, 0x09, "CN Specific DRX cycle length coefficient 9 and T = 256" },
999
  { 0x0a, 0x0f, "CN Specific DRX cycle length coefficient / value not specified by the MS" },
1000
  { 0, 0, NULL },
1001
};
1002
uint16_t
1003
de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
1004
154
{
1005
154
  uint32_t curr_offset;
1006
1007
154
  curr_offset = offset;
1008
1009
154
  proto_tree_add_item(tree, hf_gsm_a_gmm_split_pg_cycle_code, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1010
154
  curr_offset++;
1011
154
  proto_tree_add_item(tree, hf_gsm_a_gmm_cn_spec_drx_cycle_len_coef, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1012
154
  proto_tree_add_item(tree, hf_gsm_a_gmm_split_on_ccch, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1013
154
  proto_tree_add_item(tree, hf_gsm_a_gmm_non_drx_timer, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1014
1015
154
  curr_offset++;
1016
1017
  /* no length check possible */
1018
1019
154
  return (curr_offset - offset);
1020
154
}
1021
1022
/*
1023
 * [9] 10.5.5.7 Force to standby (lower nibble)
1024
 */
1025
static const range_string gsm_a_gm_force_to_standby_vals[] = {
1026
  { 0x00, 0x00, "Force to standby not indicated" },
1027
  { 0x01, 0x01, "Force to standby indicated" },
1028
  { 0x02, 0x07, "Unknown, interpreted as Force to standby not indicated" },
1029
  { 0, 0, NULL }
1030
};
1031
1032
static uint16_t
1033
de_gmm_ftostby(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
1034
25
{
1035
25
  uint32_t  bit_offset;
1036
1037
  /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE LOWER NIBBLE */
1038
25
  bit_offset = (offset << 3) + 4;
1039
25
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1040
25
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_force_to_standby, tvb, bit_offset + 1, 3, ENC_BIG_ENDIAN);
1041
1042
  /* no length check possible */
1043
25
  return 1;
1044
25
}
1045
1046
/*
1047
 * [9] 10.5.5.7 Force to standby (higher nibble)
1048
 */
1049
static uint16_t
1050
de_gmm_ftostby_h(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
1051
40
{
1052
40
  uint32_t  bit_offset;
1053
1054
  /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
1055
40
  bit_offset = offset << 3;
1056
40
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1057
40
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_force_to_standby, tvb, bit_offset + 1, 3, ENC_BIG_ENDIAN);
1058
1059
  /* no length check possible */
1060
40
  return 1;
1061
40
}
1062
1063
/*
1064
 * [7] 10.5.5.8
1065
 */
1066
static uint16_t
1067
de_gmm_ptmsi_sig(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
1068
4
{
1069
4
  uint32_t    curr_offset;
1070
4
  proto_item *curr_item;
1071
1072
4
  curr_offset = offset;
1073
1074
4
  curr_item= proto_tree_add_item(tree, hf_gsm_a_gmm_ptmsi_sig, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
1075
4
  proto_item_append_text(curr_item, "%s", add_string ? add_string : "");
1076
1077
4
  curr_offset += 3;
1078
1079
  /* no length check possible */
1080
1081
4
  return (curr_offset - offset);
1082
4
}
1083
1084
/*
1085
 * [7] 10.5.5.8a
1086
 */
1087
static uint16_t
1088
de_gmm_ptmsi_sig2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len _U_)
1089
0
{
1090
0
  uint32_t    curr_offset;
1091
0
  proto_item *curr_item;
1092
1093
0
  curr_offset = offset;
1094
1095
0
  curr_item= proto_tree_add_item(tree, hf_gsm_a_gmm_ptmsi_sig2, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
1096
0
  proto_item_append_text(curr_item, "%s", add_string ? add_string : "");
1097
0
  curr_offset += 3;
1098
1099
0
  EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
1100
1101
0
  return (curr_offset - offset);
1102
0
}
1103
1104
/*
1105
 * [9] 10.5.5.9 Identity type 2
1106
 */
1107
static const value_string gsm_a_gm_type_of_identity_vals[] = {
1108
  { 0x01, "IMSI" },
1109
  { 0x02, "IMEI" },
1110
  { 0x03, "IMEISV" },
1111
  { 0x04, "TMSI" },
1112
  { 0, NULL }
1113
};
1114
1115
static uint16_t
1116
de_gmm_ident_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_)
1117
1
{
1118
1
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 1, ENC_BIG_ENDIAN);
1119
1
  proto_tree_add_item(tree, hf_gsm_a_gm_type_of_identity, tvb, offset, 1, ENC_BIG_ENDIAN);
1120
1121
  /* no length check possible */
1122
1
  return 1;
1123
1
}
1124
1125
/*
1126
 * [9] 10.5.5.10 IMEISV request
1127
 */
1128
static const range_string gsm_a_gm_imeisv_req_vals[] = {
1129
  { 0x00, 0x00, "IMEISV not requested" },
1130
  { 0x01, 0x01, "IMEISV requested" },
1131
  { 0x02, 0x07, "Unknown, interpreted as IMEISV not requested" },
1132
  { 0, 0, NULL }
1133
};
1134
1135
static uint16_t
1136
de_gmm_imeisv_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_)
1137
2
{
1138
2
  uint32_t  bit_offset;
1139
1140
  /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
1141
2
  bit_offset = offset << 3;
1142
2
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
1143
2
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_imeisv_req, tvb, bit_offset + 1, 3, ENC_BIG_ENDIAN);
1144
1145
  /* no length check possible */
1146
2
  return 1;
1147
2
}
1148
1149
/*
1150
 * [7] 10.5.5.11
1151
 */
1152
static uint16_t
1153
de_gmm_rec_npdu_lst(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
1154
1
{
1155
1
  uint32_t  curr_offset;
1156
1
  unsigned  curr_len;
1157
1158
1
  curr_len    = len;
1159
1
  curr_offset = offset;
1160
1161
1
  if (len == 0) return 0;
1162
1163
1
  do
1164
4
  {
1165
4
    uint32_t  oct;
1166
4
    oct = tvb_get_uint8(tvb, curr_offset);
1167
4
    oct <<= 8;
1168
4
    oct |= tvb_get_uint8(tvb, curr_offset+1);
1169
4
    curr_len -= 2;
1170
4
    oct <<= 8;
1171
1172
4
    proto_tree_add_uint_format(tree, hf_gsm_a_gm_nsapi, tvb, curr_offset, 2, (oct>>12)&0xff, "NSAPI %d: 0x%02x (%u)", oct>>20, (oct>>12)&0xff, (oct>>12)&0xff);
1173
4
    curr_offset +=  2;
1174
1175
4
    if (curr_len > 2)
1176
4
    {
1177
4
      oct |= tvb_get_uint8(tvb, curr_offset+2);
1178
4
      curr_len--;
1179
4
      oct <<= 12;
1180
1181
4
      proto_tree_add_uint_format(tree, hf_gsm_a_gm_nsapi, tvb, curr_offset-1, 2, (oct>>12)&0xff, "NSAPI %d: 0x%02x (%u)", oct>>20, (oct>>12)&0xff, (oct>>12)&0xff);
1182
4
      curr_offset++;
1183
4
    }
1184
1185
4
  } while (curr_len > 1);
1186
1187
1
  EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
1188
1189
1
  return (curr_offset - offset);
1190
1
}
1191
1192
/*
1193
 * [9] 10.5.5.12 MS network capability
1194
 */
1195
static const true_false_string gsm_a_gmm_net_cap_gea_vals = {
1196
  "Encryption algorithm available",
1197
  "Encryption algorithm not available"
1198
};
1199
1200
static const true_false_string gsm_a_gmm_net_cap_smdch_vals = {
1201
  "Mobile station supports mobile terminated point to point SMS via dedicated signalling channels",
1202
  "Mobile station does not support mobile terminated point to point SMS via dedicated signalling channels"
1203
};
1204
1205
static const true_false_string gsm_a_gmm_net_cap_smgprs_vals = {
1206
  "Mobile station supports mobile terminated point to point SMS via GPRS packet data channels",
1207
  "Mobile station does not support mobile terminated point to point SMS via GPRS packet data channels"
1208
};
1209
1210
static const true_false_string gsm_a_gmm_net_cap_ucs2_vals = {
1211
  "The ME has no preference between the use of the default alphabet and the use of UCS2",
1212
  "The ME has a preference for the default alphabet (defined in 3GPP TS 23.038 [8b]) over UCS2"
1213
};
1214
1215
static const value_string gsm_a_gmm_net_cap_ss_scr_ind_vals[]={
1216
  { 0x00, "Default value of phase 1" },
1217
  { 0x01, "capability of handling of ellipsis notation and phase 2 error handling" },
1218
  { 0x02, "For future use, interpreted as Capability of handling of ellipsis notation and phase 2 error handling" },
1219
  { 0x03, "For future use, interpreted as Capability of handling of ellipsis notation and phase 2 error handling" },
1220
  { 0x00, NULL }
1221
};
1222
1223
static const true_false_string gsm_a_gmm_net_cap_solsa_vals = {
1224
  "The ME supports SoLSA",
1225
  "The ME does not support SoLSA"
1226
};
1227
1228
static const true_false_string gsm_a_gmm_net_cap_rev_vals = {
1229
  "Used by a mobile station supporting R99 or later versions of the protocol",
1230
  "Used by a mobile station not supporting R99 or later versions of the protocol"
1231
};
1232
1233
static const true_false_string gsm_a_gmm_net_cap_pfc_vals = {
1234
  "Mobile station does support BSS packet flow procedures",
1235
  "Mobile station does not support BSS packet flow procedures"
1236
};
1237
1238
static const true_false_string gsm_a_gmm_net_cap_lcs_vals = {
1239
  "LCS value added location request notification capability supported",
1240
  "LCS value added location request notification capability not supported"
1241
};
1242
1243
static const true_false_string gsm_a_gmm_net_cap_ps_irat_iu_vals = {
1244
  "PS inter-RAT HO to UTRAN Iu mode supported",
1245
  "PS inter-RAT HO to UTRAN Iu mode not supported"
1246
};
1247
1248
static const true_false_string gsm_a_gmm_net_cap_ps_irat_s1_vals = {
1249
  "PS inter-RAT HO to E-UTRAN S1 mode supported",
1250
  "PS inter-RAT HO to E-UTRAN S1 mode not supported"
1251
};
1252
1253
static const true_false_string gsm_a_gmm_net_cap_comb_proc_vals = {
1254
  "Mobile station supports EMM combined procedures",
1255
  "Mobile station does not support EMM combined procedures"
1256
};
1257
1258
static const true_false_string gsm_a_gmm_net_cap_isr_vals = {
1259
  "The mobile station supports ISR",
1260
  "The mobile station does not support ISR"
1261
};
1262
1263
static const true_false_string gsm_a_gmm_net_cap_srvcc_to_geran_vals = {
1264
  "SRVCC from UTRAN HSPA or E-UTRAN to GERAN/UTRAN supported",
1265
  "SRVCC from UTRAN HSPA or E-UTRAN to GERAN/UTRAN not supported"
1266
};
1267
1268
static const true_false_string gsm_a_gmm_net_cap_epc_vals = {
1269
  "EPC supported",
1270
  "EPC not supported"
1271
};
1272
1273
static const true_false_string gsm_a_gmm_net_cap_nf_vals = {
1274
  "Mobile station supports the notification procedure",
1275
  "Mobile station does not support the notification procedure"
1276
};
1277
1278
static const true_false_string gsm_a_gmm_net_geran_net_vals = {
1279
  "Mobile station supports GERAN network sharing",
1280
  "Mobile station does not support GERAN network sharing"
1281
};
1282
1283
static const true_false_string gsm_a_gmm_net_cap_gia_vals = {
1284
  "Integrity algorithm available",
1285
  "Integrity algorithm not available"
1286
};
1287
1288
static const true_false_string gsm_a_gmm_net_cap_epco_ie_ind_vals = {
1289
  "Used by a mobile station supporting extended protocol configuration options IE",
1290
  "Used by a mobile station not supporting extended protocol configuration options IE"
1291
};
1292
1293
static const true_false_string gsm_a_gmm_net_cap_restrict_use_enh_cov_vals = {
1294
  "Mobile station supports restriction on use of enhanced coverage",
1295
  "Mobile station does not support restriction on use of enhanced coverage"
1296
};
1297
1298
static const true_false_string gsm_a_gmm_net_cap_dc_eutra_nr_cap_vals = {
1299
  "Mobile station supports dual connectivity of E-UTRA with NR",
1300
  "Mobile station does not support dual connectivity of E-UTRA with NR"
1301
};
1302
1303
uint16_t
1304
de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
1305
140
{
1306
140
  uint32_t    curr_offset;
1307
140
  proto_tree *subtree;
1308
140
  proto_item *item;
1309
1310
140
  curr_offset = offset;
1311
1312
  /* bit 8: GEA1 */
1313
140
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_gea1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1314
1315
  /* bit 7: SM capabilities via dedicated channels */
1316
140
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_smdch, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1317
1318
  /* bit 6: SM capabilities via GPRS channels */
1319
140
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_smgprs, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1320
1321
  /* bit 5: UCS2 support */
1322
140
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ucs2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1323
1324
  /* bits 4 3: SS Screening Indicator */
1325
140
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ss_scr_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1326
1327
  /* bit 2: SoLSA Capability */
1328
140
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_solsa, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1329
1330
  /* bit 1 */
1331
140
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_rev, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1332
1333
140
  curr_offset++;
1334
140
  NO_MORE_DATA_CHECK(len);
1335
1336
  /* bit 8: PFC feature mode */
1337
133
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_pfc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1338
1339
  /* bits 7 6 5 4 3 2: Extended GEA bits */
1340
133
  item = proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ext_gea_bits, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1341
133
  subtree = proto_item_add_subtree(item, ett_gmm_network_cap);
1342
133
  proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea2, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1343
133
  proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea3, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1344
133
  proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1345
133
  proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1346
133
  proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1347
133
  proto_tree_add_item(subtree, hf_gsm_a_gmm_net_cap_gea7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1348
1349
  /* bit 1: LCS VA capability */
1350
133
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_lcs, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1351
1352
133
  curr_offset++;
1353
133
  NO_MORE_DATA_CHECK(len);
1354
1355
  /* bit 8: PS inter-RAT HO from GERAN to UTRAN Iu mode capability */
1356
127
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ps_irat_iu, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1357
1358
  /* bit 7: PS inter-RAT HO from GERAN to E-UTRAN S1 mode capability */
1359
127
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_ps_irat_s1, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1360
1361
  /* bit 6: EMM Combined procedures capability */
1362
127
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_comb_proc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1363
1364
  /* bit 5: ISR support */
1365
127
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_isr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1366
1367
  /* bit 4: SRVCC to GERAN/UTRAN capability */
1368
127
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_srvcc_to_geran, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1369
1370
  /* bit 3: EPC capability */
1371
127
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_epc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1372
1373
  /* bit 2: NF capability */
1374
127
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_nf, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1375
1376
  /* bits 1: GERAN network sharing capability */
1377
127
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_geran_net_sharing, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1378
1379
127
  curr_offset++;
1380
127
  NO_MORE_DATA_CHECK(len);
1381
1382
  /* bit 8: User plane integrity protection support */
1383
120
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_up_int_prot, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1384
1385
  /* bit 7: GIA/4 */
1386
120
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_up_gia4, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1387
1388
  /* bit 6: GIA/5 */
1389
120
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_up_gia5, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1390
1391
  /* bit 5: GIA/6 */
1392
120
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_up_gia6, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1393
1394
  /* bit 4: GIA/7 */
1395
120
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_up_gia7, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1396
1397
  /* bit 3: ePCO IE indicator */
1398
120
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_epco_ie_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1399
1400
  /* bit 2: Restriction on use of enhanced coverage capability */
1401
120
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_restrict_use_enh_cov, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1402
1403
  /* bit 1: Dual connectivity of E-UTRA with NR capability */
1404
120
  proto_tree_add_item(tree, hf_gsm_a_gmm_net_cap_dc_eutra_nr_cap, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
1405
1406
120
  curr_offset++;
1407
120
  EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
1408
1409
120
  return (curr_offset - offset);
1410
127
}
1411
1412
/*
1413
 * [7] 10.5.5.12a
1414
 */
1415
#define GET_DATA        /* check if we have enough bits left */ \
1416
456k
  if (curr_bits_length < bits_needed) \
1417
456k
    continue; \
1418
456k
  /* check if oct has enough bits */ \
1419
456k
  if (bits_in_oct < bits_needed) \
1420
445k
  { \
1421
98.7k
    uint32_t tmp_oct; \
1422
98.7k
    if (curr_len == 0) \
1423
98.7k
    { \
1424
494
      proto_tree_add_expert(tf_tree, pinfo, &ei_gsm_a_gm_not_enough_data, tvb, curr_offset, 1); \
1425
494
    } \
1426
98.7k
    tmp_oct = tvb_get_uint8(tvb, curr_offset); \
1427
98.7k
    oct |= tmp_oct<<(32-8-bits_in_oct); \
1428
98.7k
    curr_len--; \
1429
98.7k
    curr_offset++; \
1430
98.7k
    if (bits_in_oct != 0) \
1431
98.7k
      add_octets = 1; \
1432
98.7k
    else \
1433
98.7k
      add_octets = 0; \
1434
98.7k
    bits_in_oct += 8; \
1435
98.7k
  } \
1436
445k
  else \
1437
445k
    add_octets = 0;
1438
1439
/* Access Technology Type */
1440
1441
static const value_string gsm_a_gm_acc_tech_type_vals[] = {
1442
  { 0x00, "GSM P" },
1443
  { 0x01, "GSM E --note that GSM E covers GSM P" },
1444
  { 0x02, "GSM R --note that GSM R covers GSM E and GSM P" },
1445
  { 0x03, "GSM 1800" },
1446
  { 0x04, "GSM 1900" },
1447
  { 0x05, "GSM 450" },
1448
  { 0x06, "GSM 480" },
1449
  { 0x07, "GSM 850" },
1450
  { 0x08, "GSM 750" },
1451
  { 0x09, "GSM T 380" },
1452
  { 0x0a, "GSM T 410" },
1453
  { 0x0b, "GSM T 900" },
1454
  { 0x0c, "GSM 710" },
1455
  { 0x0d, "GSM T 810" },
1456
  { 0x0f, "Indicates the presence of a list of Additional access technologies" },
1457
  { 0, NULL }
1458
};
1459
1460
static const true_false_string gsm_a_gm_vgcs = {
1461
  "VGCS capability and notifications wanted",
1462
  "no VGCS capability or no notifications wanted"
1463
};
1464
1465
static const true_false_string gsm_a_gm_vbs = {
1466
  "VBS capability and notifications wanted",
1467
  "no VBS capability or no notifications wanted"
1468
};
1469
1470
static const value_string gsm_a_gm_multi_slot_vals[] = {
1471
  { 0x00, "Not specified" },
1472
  { 0x01, "Max Rx-Slot/TDMA:1 Max Tx-Slot/TDMA:1 Max-Sum-Slot/TDMA:2 Tta:3 Ttb:2 Tra:4 Trb:2 Type:1" },
1473
  { 0x02, "Max Rx-Slot/TDMA:2 Max Tx-Slot/TDMA:1 Max-Sum-Slot/TDMA:3 Tta:3 Ttb:2 Tra:3 Trb:1 Type:1" },
1474
  { 0x03, "Max Rx-Slot/TDMA:2 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:3 Tta:3 Ttb:2 Tra:3 Trb:1 Type:1" },
1475
  { 0x04, "Max Rx-Slot/TDMA:3 Max Tx-Slot/TDMA:1 Max-Sum-Slot/TDMA:4 Tta:3 Ttb:1 Tra:3 Trb:1 Type:1" },
1476
  { 0x05, "Max Rx-Slot/TDMA:2 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:4 Tta:3 Ttb:1 Tra:3 Trb:1 Type:1" },
1477
  { 0x06, "Max Rx-Slot/TDMA:3 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:4 Tta:3 Ttb:1 Tra:3 Trb:1 Type:1" },
1478
  { 0x07, "Max Rx-Slot/TDMA:3 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:4 Tta:3 Ttb:1 Tra:3 Trb:1 Type:1" },
1479
  { 0x08, "Max Rx-Slot/TDMA:4 Max Tx-Slot/TDMA:1 Max-Sum-Slot/TDMA:5 Tta:3 Ttb:1 Tra:2 Trb:1 Type:1" },
1480
  { 0x09, "Max Rx-Slot/TDMA:3 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:5 Tta:3 Ttb:1 Tra:2 Trb:1 Type:1" },
1481
  { 0x0a, "Max Rx-Slot/TDMA:4 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:5 Tta:3 Ttb:1 Tra:2 Trb:1 Type:1" },
1482
  { 0x0b, "Max Rx-Slot/TDMA:4 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:5 Tta:3 Ttb:1 Tra:2 Trb:1 Type:1" },
1483
  { 0x0c, "Max Rx-Slot/TDMA:4 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:5 Tta:2 Ttb:1 Tra:2 Trb:1 Type:1" },
1484
  { 0x0d, "Max Rx-Slot/TDMA:3 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:a) Tra:3 Trb:a) Type:2 (a: 1 with frequency hopping, 0 otherwise)" },
1485
  { 0x0e, "Max Rx-Slot/TDMA:4 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:a) Tra:3 Trb:a) Type:2 (a: 1 with frequency hopping, 0 otherwise)" },
1486
  { 0x0f, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:5 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:a) Tra:3 Trb:a) Type:2 (a: 1 with frequency hopping, 0 otherwise)" },
1487
  { 0x10, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:6 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:a) Tra:2 Trb:a) Type:2 (a: 1 with frequency hopping, 0 otherwise)" },
1488
  { 0x11, "Max Rx-Slot/TDMA:7 Max Tx-Slot/TDMA:7 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:a) Tra:1 Trb:0 Type:2 (a: 1 with frequency hopping, 0 otherwise)" },
1489
  { 0x12, "Max Rx-Slot/TDMA:8 Max Tx-Slot/TDMA:8 Max-Sum-Slot/TDMA:NA Tta:NA Ttb:0 Tra:0 Trb:0 Type:2" },
1490
  { 0x13, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1491
  { 0x14, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1492
  { 0x15, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1493
  { 0x16, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1494
  { 0x17, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:6 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1495
  { 0x18, "Max Rx-Slot/TDMA:8 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1496
  { 0x19, "Max Rx-Slot/TDMA:8 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1497
  { 0x1a, "Max Rx-Slot/TDMA:8 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1498
  { 0x1b, "Max Rx-Slot/TDMA:8 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1499
  { 0x1c, "Max Rx-Slot/TDMA:8 Max Tx-Slot/TDMA:6 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1500
  { 0x1d, "Max Rx-Slot/TDMA:8 Max Tx-Slot/TDMA:8 Max-Sum-Slot/TDMA:NA Tta:3 Ttb:b) Tra:2 Trb:c) Type:1 (b: 1 with frequency hopping or change from Rx to Tx, 0 otherwise; c: 1 with frequency hopping or change from Tx to Rx, 0 otherwise" },
1501
  { 0x1e, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:1 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1 Trb:1 Type:1" },
1502
  { 0x1f, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1 Trb:1 Type:1" },
1503
  { 0x20, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1 Trb:1 Type:1" },
1504
  { 0x21, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1 Trb:1 Type:1" },
1505
  { 0x22, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:5 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1 Trb:1 Type:1" },
1506
  { 0x23, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:1 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1+to Trb:1 Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1507
  { 0x24, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1+to Trb:1 Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1508
  { 0x25, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1+to Trb:1 Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1509
  { 0x26, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1+to Trb:1 Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1510
  { 0x27, "Max Rx-Slot/TDMA:5 Max Tx-Slot/TDMA:5 Max-Sum-Slot/TDMA:6 Tta:2 Ttb:1 Tra:1+to Trb:1 Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1511
  { 0x28, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:1 Max-Sum-Slot/TDMA:7 Tta:1 Ttb:1 Tra:1 Trb:to Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1512
  { 0x29, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:7 Tta:1 Ttb:1 Tra:1 Trb:to Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1513
  { 0x2a, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:3 Max-Sum-Slot/TDMA:7 Tta:1 Ttb:1 Tra:1 Trb:to Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1514
  { 0x2b, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:4 Max-Sum-Slot/TDMA:7 Tta:1 Ttb:1 Tra:1 Trb:to Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1515
  { 0x2c, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:5 Max-Sum-Slot/TDMA:7 Tta:1 Ttb:1 Tra:1 Trb:to Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1516
  { 0x2d, "Max Rx-Slot/TDMA:6 Max Tx-Slot/TDMA:6 Max-Sum-Slot/TDMA:7 Tta:1 Ttb:1 Tra:1 Trb:to Type:1 (to: to = 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value))" },
1517
  { 0, NULL }
1518
};
1519
1520
static const value_string gsm_a_gm_dtm_gprs_multi_slot_class_vals[] = {
1521
  { 0x00, "Unused. If received, the network shall interpret this as Multislot class 5" },
1522
  { 0x01, "Multislot class 5 supported" },
1523
  { 0x02, "Multislot class 9 supported" },
1524
  { 0x03, "Multislot class 11 supported" },
1525
  { 0, NULL }
1526
};
1527
1528
static const true_false_string gsm_a_gm_revision_level_indicator = {
1529
  "The ME is Release '99 onwards",
1530
  "The ME is Release '98 or older"
1531
};
1532
1533
static const value_string gsm_a_gm_down_adv_rec_perf_vals[] = {
1534
  { 0x00, "Downlink Advanced Receiver Performance not supported" },
1535
  { 0x01, "Downlink Advanced Receiver Performance - phase I supported" },
1536
  { 0x02, "Downlink Advanced Receiver Performance - phase II supported" },
1537
  { 0, NULL }
1538
};
1539
1540
static const true_false_string gsm_a_gm_dtm_enh_cap = {
1541
  "The mobile station supports enhanced DTM CS establishment and enhanced DTM CS release procedures",
1542
  "The mobile station does not support enhanced DTM CS establishment and enhanced DTM CS release procedures"
1543
};
1544
1545
static const value_string gsm_a_gm_dtm_gprs_high_multi_slot_class_vals[] = {
1546
  { 0x00, "Unused. If received, the network shall interpret this as 'Multislot class 31 or 36 supported'" },
1547
  { 0x01, "Multislot class 31 or 36 supported" },
1548
  { 0x02, "Multislot class 32 or 37 supported" },
1549
  { 0x03, "Multislot class 33 or 38 supported" },
1550
  { 0x04, "Multislot class 41 supported" },
1551
  { 0x05, "Multislot class 42 supported" },
1552
  { 0x06, "Multislot class 43 supported" },
1553
  { 0x07, "Multislot class 44 supported" },
1554
  { 0, NULL }
1555
};
1556
1557
static const value_string gsm_a_gm_multi_slot_cap_red_down_dual_carrier_vals[] = {
1558
  { 0x00, "No reduction" },
1559
  { 0x01, "The MS supports 1 timeslot fewer than the maximum number of receive timeslots" },
1560
  { 0x02, "The MS supports 2 timeslots fewer than the maximum number of receive timeslots" },
1561
  { 0x03, "The MS supports 3 timeslots fewer than the maximum number of receive timeslots" },
1562
  { 0x04, "The MS supports 4 timeslots fewer than the maximum number of receive timeslots" },
1563
  { 0x05, "The MS supports 5 timeslots fewer than the maximum number of receive timeslots" },
1564
  { 0x06, "The MS supports 6 timeslots fewer than the maximum number of receive timeslots" },
1565
  { 0x07, "Reserved for future use" },
1566
  { 0, NULL }
1567
};
1568
1569
static const value_string gsm_a_gm_ul_egprs2_vals[] = {
1570
  { 0x00, "The mobile station does not support either EGPRS2-A or EGPRS2-B in the uplink" },
1571
  { 0x01, "The mobile station supports EGPRS2-A in the uplink" },
1572
  { 0x02, "The mobile station supports both EGPRS2-A and EGPRS2-B in the uplink" },
1573
  { 0x03, "The mobile station supports both EGPRS2-A and EGPRS2-B in the uplink" },
1574
  { 0, NULL }
1575
};
1576
1577
static const value_string gsm_a_gm_dl_egprs2_vals[] = {
1578
  { 0x00, "The mobile station does not support either EGPRS2-A or EGPRS2-B in the downlink" },
1579
  { 0x01, "The mobile station supports EGPRS2-A in the downlink" },
1580
  { 0x02, "The mobile station supports both EGPRS2-A and EGPRS2-B in the downlink" },
1581
  { 0x03, "The mobile station supports both EGPRS2-A and EGPRS2-B in the downlink" },
1582
  { 0, NULL }
1583
};
1584
1585
static const value_string gsm_a_gm_geran_to_eutra_support_in_geran_ptm_vals[] = {
1586
  { 0x00, "None" },
1587
  { 0x01, "E-UTRAN neighbour cell measurements and MS autonomous cell reselection to E-UTRAN supported" },
1588
  { 0x02, "E-UTRAN neighbour cell meas and report, MS autonomous cell resel, CCN and network controlled cell reselection to E-UTRAN" },
1589
  { 0x03, "E-UTRAN neighbour cell meas and report, MS autonomous cell resel, CCN, network controlled cell reselection and PS Handover to E-UTRAN" },
1590
  { 0, NULL }
1591
};
1592
1593
static const value_string gsm_a_gm_alt_efta_multi_slot_class_vals[] = {
1594
  { 0x00, "No Alternative EFTA multislot class is indicated. Use (DTM) EGPRS (high) multislot class only" },
1595
  { 0x01, "Alternative EFTA multislot class 1" },
1596
  { 0x02, "Alternative EFTA multislot class 2" },
1597
  { 0x03, "Alternative EFTA multislot class 3" },
1598
  { 0x04, "Unused" },
1599
  { 0x05, "Unused" },
1600
  { 0x06, "Unused" },
1601
  { 0x07, "Unused" },
1602
  { 0x08, "Unused" },
1603
  { 0x09, "Unused" },
1604
  { 0x0a, "Unused" },
1605
  { 0x0b, "Unused" },
1606
  { 0x0c, "Unused" },
1607
  { 0x0d, "Unused" },
1608
  { 0x0e, "Unused" },
1609
  { 0x0f, "Unused" },
1610
  { 0, NULL }
1611
};
1612
1613
static const value_string gsm_a_gm_dlmc_non_contig_intra_band_recep_vals[] = {
1614
  { 0x00, "Not supported" },
1615
  { 0x01, "Supported in band E-GSM or GSM850" },
1616
  { 0x02, "Supported in band DCS1800 or PCS1900" },
1617
  { 0x03, "Supported in band E-GSM, or GSM850, or DCS1800 or PCS1900" },
1618
  { 0, NULL }
1619
};
1620
1621
static const true_false_string gsm_a_gm_dlmc_inter_band_recep_val = {
1622
  "Supported in band combination (E-GSM, DCS1800), or band combination (GSM850, PCS1900)",
1623
  "Not supported"
1624
};
1625
1626
static const value_string gsm_a_gm_dlmc_max_bandwidth_vals[] = {
1627
  { 0x00, "5 MHz" },
1628
  { 0x01, "10 MHz" },
1629
  { 0x02, "15 MHz" },
1630
  { 0x03, "20 MHz" },
1631
  { 0, NULL }
1632
};
1633
1634
static void
1635
gsm_a_gm_dlmc_max_nb_dl_ts_fmt(char *s, uint32_t v)
1636
791
{
1637
791
  if (v < 0x3E)
1638
650
    snprintf(s, ITEM_LABEL_LENGTH, "%u TS supported (%u)",
1639
791
               2*v + 6, v);
1640
141
  else
1641
141
    snprintf(s, ITEM_LABEL_LENGTH, "Reserved (%u)", v);
1642
791
}
1643
1644
static const value_string gsm_a_gm_dlmc_max_nb_dl_carriers_vals[] = {
1645
  { 0x00, "2 carriers supported" },
1646
  { 0x01, "4 carriers supported" },
1647
  { 0x02, "6 carriers supported" },
1648
  { 0x03, "8 carriers supported" },
1649
  { 0x04, "10 carriers supported" },
1650
  { 0x05, "12 carriers supported" },
1651
  { 0x06, "14 carriers supported" },
1652
  { 0x07, "16 carriers supported" },
1653
  { 0, NULL }
1654
};
1655
1656
static const value_string gsm_a_gm_8psk_power_class_vals[] = {
1657
  {0x00, "8PSK modulation not supported for uplink" },
1658
  {0x01, "Power class E1"},
1659
  {0x02, "Power class E2"},
1660
  {0x03, "Power class E3"},
1661
  {0, NULL},
1662
};
1663
1664
1665
static const value_string gsm_a_gm_8psk_power_cap_vals[] = {
1666
  {0x00, "Reserved" },
1667
  {0x01, "Power class E1"},
1668
  {0x02, "Power class E2"},
1669
  {0x03, "Power class E3"},
1670
  {0, NULL},
1671
};
1672
1673
static const value_string gsm_a_gm_extended_dtm_gprs_multi_slot_class_vals[] = {
1674
  {0x00,  "Unused. If received, it shall be interpreted as Multislot class 5 supported" },
1675
  {0x01,  "Unused. If received, it shall be interpreted as Multislot class 5 supported"},
1676
  {0x02,  "Unused. If received, it shall be interpreted as Multislot class 5 supported"},
1677
  {0x03,  "Unused. If received, it shall be interpreted as Multislot class 5 supported"},
1678
  {0x10,  "Multislot class 5 supported"},
1679
  {0x11,  "Multislot class 6 supported"},
1680
  {0x12,  "Unused. If received, it shall be interpreted as Multislot class 5 supported"},
1681
  {0x13,  "Unused. If received, it shall be interpreted as Multislot class 5 supported"},
1682
  {0x20,  "Multislot class 9 supported"},
1683
  {0x21,  "Multislot class 10 supported"},
1684
  {0x22,  "Unused. If received, it shall be interpreted as Multislot class 9 supported"},
1685
  {0x23,  "Unused. If received, it shall be interpreted as Multislot class 9 supported"},
1686
  {0x30,  "Multislot class 11 supported"},
1687
  {0x31,  "Unused. If received, it shall be interpreted as Multislot class 11 supported"},
1688
  {0x32,  "Unused. If received, it shall be interpreted as Multislot class 11 supported"},
1689
  {0x33,  "Unused. If received, it shall be interpreted as Multislot class 11 supported"},
1690
  {0, NULL}
1691
};
1692
1693
static const value_string gsm_a_gm_gmsk_multislot_power_profile_vals[] = {
1694
  {0x00,  "GMSK_MULTISLOT_POWER_PROFILE 0" },
1695
  {0x01,  "GMSK_MULTISLOT_POWER_PROFILE 1"},
1696
  {0x02,  "GMSK_MULTISLOT_POWER_PROFILE 2"},
1697
  {0x03,  "GMSK_MULTISLOT_POWER_PROFILE 3"},
1698
  {0, NULL}
1699
};
1700
1701
static const value_string gsm_a_gm_8psk_multislot_power_profile_vals[] = {
1702
  {0x00,  "8-PSK_MULTISLOT_POWER_PROFILE 0" },
1703
  {0x01,  "8-PSK_MULTISLOT_POWER_PROFILE 1"},
1704
  {0x02,  "8-PSK_MULTISLOT_POWER_PROFILE 2"},
1705
  {0x03,  "8-PSK_MULTISLOT_POWER_PROFILE 3"},
1706
  {0, NULL}
1707
};
1708
1709
static const value_string gsm_a_gm_ec_pch_mon_support_vals[] = {
1710
  {0x00, "PCH supported"},
1711
  {0x01, "EC-PCH supported"},
1712
  {0x02, "PCH and EC-PCH supported"},
1713
  {0x03, "Reserved"},
1714
  {0, NULL}
1715
};
1716
1717
uint16_t
1718
de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
1719
1.70k
{
1720
1.70k
  uint32_t     curr_offset;
1721
1.70k
  unsigned     curr_len;
1722
1.70k
  int          bit_offset;
1723
1.70k
  proto_item  *tf = NULL, *mc_item = NULL, *ti;
1724
1.70k
  proto_tree  *tf_tree = NULL, *mc_tree = NULL;
1725
1.70k
  uint32_t     oct;
1726
1.70k
  unsigned char       bits_in_oct;
1727
1.70k
  unsigned char       bits_needed;
1728
1.70k
  unsigned     bits_length;
1729
1.70k
  unsigned     add_octets;  /* octets which are covered by one element -1 */
1730
1.70k
  unsigned     curr_bits_length;
1731
1.70k
  unsigned char       acc_type;
1732
1.70k
  unsigned     value;
1733
1.70k
  const char *str;
1734
1.70k
  unsigned indx = 0;
1735
1736
1.70k
  unsigned char   dtm_gprs_mslot  = 0;
1737
1.70k
  unsigned char   dtm_egprs_mslot = 4;
1738
1.70k
  bool finished = true;
1739
1740
1.70k
  curr_len    = len;
1741
1.70k
  curr_offset = offset;
1742
1.70k
  bit_offset  = offset<<3;
1743
1744
1.70k
  bits_in_oct = 0;
1745
1.70k
  oct = 0;
1746
1747
1748
1.70k
  do
1749
12.3k
  {
1750
    /* check for a new round */
1751
12.3k
    if ((curr_len*8 + bits_in_oct) < 11)
1752
40
      break;
1753
1754
    /* now read the first 11 bits */
1755
12.3k
    curr_bits_length = 11;
1756
    /*
1757
     *
1758
     */
1759
12.3k
    if (curr_len != len)
1760
10.6k
    {
1761
10.6k
      bits_needed = 1;
1762
10.6k
      GET_DATA;
1763
1764
10.6k
      if ((oct>>(32-bits_needed)) != 1)
1765
1.30k
      {
1766
1.30k
        break;
1767
1.30k
      }
1768
9.32k
      oct     <<= bits_needed;
1769
9.32k
      bits_in_oct  -= bits_needed;
1770
9.32k
      bit_offset++;
1771
1772
9.32k
      if ((curr_len*8 + bits_in_oct) < 11)
1773
6
        break;
1774
9.32k
      curr_bits_length = 11;
1775
9.32k
    }
1776
1777
11.0k
    indx++;
1778
11.0k
    tf_tree = proto_tree_add_subtree_format(tree,
1779
11.0k
        tvb, curr_offset, 1,
1780
11.0k
        ett_gmm_radio_cap, &tf, "MS RA capability %d", indx);
1781
1782
    /*
1783
     * Access Technology
1784
     */
1785
11.0k
    bits_needed = 4;
1786
11.0k
    GET_DATA;
1787
1788
11.0k
    acc_type = oct>>(32-bits_needed);
1789
1790
11.0k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_acc_tech_type, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
1791
11.0k
    bit_offset += 4;
1792
1793
11.0k
    curr_bits_length  -= bits_needed;
1794
11.0k
    oct    <<= bits_needed;
1795
11.0k
    bits_in_oct   -= bits_needed;
1796
1797
    /* < Access capabilities struct > ::= */
1798
    /*
1799
     * get bits_length
1800
     */
1801
11.0k
    bits_needed = 7;
1802
11.0k
    GET_DATA;
1803
1804
11.0k
    bits_length = curr_bits_length = oct>>(32-bits_needed);
1805
1806
11.0k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_acc_cap_struct_len, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
1807
11.0k
    proto_item_set_len(tf, (bits_length>>3)+1);
1808
    /* This is already done - length doesn't contain this field
1809
     curr_bits_length -= bits_needed;
1810
    */
1811
11.0k
    bit_offset   += 7;
1812
11.0k
    oct     <<= bits_needed;
1813
11.0k
    bits_in_oct  -= bits_needed;
1814
1815
11.0k
    if (acc_type == 0x0f)
1816
1.62k
    {
1817
1.62k
      do
1818
15.0k
      {
1819
        /*
1820
         * Additional access technologies:
1821
         */
1822
15.0k
        finished = true; /* Break out of the loop unless proven unfinished */
1823
1824
        /*
1825
         * Presence bit
1826
         */
1827
15.0k
        bits_needed = 1;
1828
15.0k
        GET_DATA;
1829
1830
        /* analyse bits */
1831
14.4k
        switch (oct>>(32-bits_needed))
1832
14.4k
        {
1833
945
          case 0x00: str = "Not Present"; finished = true; break;
1834
13.4k
          case 0x01: str = "Present"; finished = false;    break;
1835
0
          default:   str = "This should not happen";
1836
14.4k
        }
1837
1838
14.4k
        proto_tree_add_uint_format_value(tf_tree, hf_gsm_a_gm_presence, tvb, curr_offset-1-add_octets, 1+add_octets, oct>>(32-bits_needed), "%s (%u)", str, oct>>(32-bits_needed));
1839
14.4k
        bit_offset++;
1840
14.4k
        curr_bits_length  -= bits_needed;
1841
14.4k
        oct    <<= bits_needed;
1842
14.4k
        bits_in_oct   -= bits_needed;
1843
1844
14.4k
        if (finished)
1845
945
        {
1846
          /*
1847
           * No more valid data, get spare bits if any
1848
           */
1849
8.70k
          while (curr_bits_length > 0)
1850
7.76k
          {
1851
7.76k
            if (curr_bits_length > 8)
1852
6.90k
              bits_needed = 8;
1853
860
            else
1854
860
              bits_needed = curr_bits_length;
1855
7.76k
            GET_DATA;
1856
7.76k
            curr_bits_length  -= bits_needed;
1857
7.76k
            oct    <<= bits_needed;
1858
7.76k
            bits_in_oct   -= bits_needed;
1859
7.76k
            bit_offset    += bits_needed;
1860
7.76k
          }
1861
945
          continue;
1862
945
        }
1863
1864
        /*
1865
         * Access Technology
1866
         */
1867
13.4k
        bits_needed = 4;
1868
13.4k
        GET_DATA;
1869
1870
12.2k
        acc_type = oct>>(32-bits_needed);
1871
1872
12.2k
        proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_acc_tech_type, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
1873
12.2k
        bit_offset += 4;
1874
1875
12.2k
        curr_bits_length  -= bits_needed;
1876
12.2k
        oct    <<= bits_needed;
1877
12.2k
        bits_in_oct   -= bits_needed;
1878
1879
        /*
1880
         * RF Power
1881
         */
1882
12.2k
        bits_needed = 3;
1883
12.2k
        GET_DATA;
1884
1885
11.5k
        value = tvb_get_bits8(tvb, bit_offset, 3);
1886
        /* analyse bits */
1887
11.5k
        if (acc_type == 0x04)  /* GSM 1900 */
1888
104
        {
1889
104
          switch (value)
1890
104
          {
1891
0
            case 0x01: str = "1 W (30 dBm)";    break;
1892
7
            case 0x02: str = "0,25 W (24 dBm)"; break;
1893
23
            case 0x03: str = "2 W (33 dBm)";    break;
1894
74
            default:   str = "Not specified";
1895
104
          }
1896
104
        }
1897
11.4k
        else if (acc_type == 0x03)
1898
116
        {
1899
          /*
1900
           * 3 GSM 1800
1901
           */
1902
116
          switch (value)
1903
116
          {
1904
3
            case 0x01: str = "1 W (30 dBm)";    break;
1905
1
            case 0x02: str = "0,25 W (24 dBm)"; break;
1906
16
            case 0x03: str = "4 W (36 dBm)";    break;
1907
96
            default:   str = "Not specified";
1908
116
          }
1909
116
        }
1910
11.3k
        else if (acc_type <= 0x08)
1911
541
        {
1912
          /* 0 GSM P
1913
           * 1 GSM E
1914
           * 2 GSM R
1915
           * 5 GSM 450
1916
           * 6 GSM 480
1917
           * 7 GSM 850
1918
           */
1919
1920
541
          switch (value)
1921
541
          {
1922
101
            case 0x02: str = "8 W (39 dBm)";   break;
1923
62
            case 0x03: str = "5 W (37 dBm)";   break;
1924
24
            case 0x04: str = "2 W (33 dBm)";   break;
1925
36
            case 0x05: str = "0,8 W (29 dBm)"; break;
1926
318
            default:   str = "Not specified";
1927
541
          }
1928
541
        }
1929
10.7k
        else
1930
10.7k
          str = "Not specified??";
1931
1932
        /* decode_bits_in_field(int bit_offset, int no_of_bits, uint64_t value)*/
1933
11.5k
        proto_tree_add_uint_format(tf_tree, hf_gsm_a_gm_rf_power_capability, tvb, curr_offset-1-add_octets, 1+add_octets, value,
1934
11.5k
                        "%s RF Power Capability, GMSK Power Class: %s (%u)", decode_bits_in_field(pinfo->pool, bit_offset, 3, value, ENC_BIG_ENDIAN), str, value);
1935
11.5k
        bit_offset    += 3;
1936
11.5k
        curr_bits_length  -= bits_needed;
1937
11.5k
        oct    <<= bits_needed;
1938
11.5k
        bits_in_oct   -= bits_needed;
1939
1940
        /*
1941
         * 8PSK Power Class
1942
         */
1943
11.5k
        bits_needed = 2;
1944
11.5k
        GET_DATA;
1945
1946
11.5k
        value = tvb_get_bits8(tvb, bit_offset, 2);
1947
        /* analyse bits */
1948
11.5k
        proto_tree_add_uint(tf_tree, hf_gsm_a_gm_8psk_power_class, tvb, curr_offset-1-add_octets, 1+add_octets, value);
1949
11.5k
        bit_offset    += 2;
1950
11.5k
        curr_bits_length  -= bits_needed;
1951
11.5k
        oct    <<= bits_needed;
1952
11.5k
        bits_in_oct   -= bits_needed;
1953
1954
15.0k
      } while (!finished);
1955
1956
      /* goto next one */
1957
1.62k
      continue;
1958
1.62k
    }
1959
    /*
1960
     * RF Power
1961
     */
1962
9.39k
    bits_needed = 3;
1963
9.39k
    GET_DATA;
1964
1965
9.14k
    value = tvb_get_bits8(tvb, bit_offset, 3);
1966
    /* analyse bits */
1967
9.14k
    if (acc_type == 0x04)  /* GSM 1900 */
1968
182
    {
1969
182
      switch (value)
1970
182
      {
1971
47
        case 0x01: str = "1 W (30 dBm)";    break;
1972
18
        case 0x02: str = "0,25 W (24 dBm)"; break;
1973
25
        case 0x03: str = "2 W (33 dBm)";    break;
1974
92
        default:   str = "Not specified";
1975
182
      }
1976
182
    }
1977
8.96k
    else if (acc_type == 0x03)
1978
502
    {
1979
502
      switch (value)
1980
502
      {
1981
12
        case 0x01: str = "1 W (30 dBm)";    break;
1982
11
        case 0x02: str = "0,25 W (24 dBm)"; break;
1983
138
        case 0x03: str = "4 W (36 dBm)";    break;
1984
341
        default:   str = "Not specified";
1985
502
      }
1986
502
    }
1987
8.46k
    else if (acc_type <= 0x08)
1988
3.70k
    {
1989
3.70k
      switch (value)
1990
3.70k
      {
1991
240
        case 0x02: str = "8 W (39 dBm)";   break;
1992
471
        case 0x03: str = "5 W (37 dBm)";   break;
1993
453
        case 0x04: str = "2 W (33 dBm)";   break;
1994
488
        case 0x05: str = "0,8 W (29 dBm)"; break;
1995
2.05k
        default:   str = "Not specified";
1996
3.70k
      }
1997
3.70k
    }
1998
4.75k
    else
1999
4.75k
      str = "Not specified??";
2000
2001
9.14k
    proto_tree_add_uint_format(tf_tree, hf_gsm_a_gm_rf_power_capability, tvb, curr_offset-1-add_octets, 1+add_octets, value,
2002
9.14k
            "%s RF Power Capability, GMSK Power Class: %s (%u)", decode_bits_in_field(pinfo->pool, bit_offset, 3, value, ENC_BIG_ENDIAN), str, value);
2003
2004
9.14k
    bit_offset    += 3;
2005
9.14k
    curr_bits_length  -= bits_needed;
2006
9.14k
    oct    <<= bits_needed;
2007
9.14k
    bits_in_oct   -= bits_needed;
2008
2009
    /*
2010
     * A5 Bits?
2011
     */
2012
9.14k
    bits_needed = 1;
2013
9.14k
    GET_DATA;
2014
2015
    /* analyse bits */
2016
9.13k
    if ((oct>>(32-bits_needed)) == 0)
2017
3.77k
    {
2018
3.77k
      proto_tree_add_uint_format_value(tf_tree, hf_gsm_a_gm_a5_bits, tvb, curr_offset-1-add_octets, 1+add_octets, oct>>(32-bits_needed),
2019
3.77k
            "Same values apply for parameters as in the immediately preceding Access capabilities field within this IE (%u)",
2020
3.77k
            oct>>(32-bits_needed));
2021
3.77k
      bit_offset++;
2022
3.77k
      curr_bits_length  -= bits_needed;
2023
3.77k
      oct    <<= bits_needed;
2024
3.77k
      bits_in_oct   -= bits_needed;
2025
3.77k
    }
2026
5.35k
    else
2027
5.35k
    {
2028
5.35k
      int i;
2029
2030
5.35k
      proto_tree_add_uint_format_value(tf_tree, hf_gsm_a_gm_a5_bits, tvb, curr_offset-1-add_octets, 1+add_octets, oct>>(32-bits_needed), "A5 bits follow (%u)", oct>>(32-bits_needed));
2031
2032
5.35k
      bit_offset++;
2033
5.35k
      curr_bits_length  -= bits_needed;
2034
5.35k
      oct    <<= bits_needed;
2035
5.35k
      bits_in_oct   -= bits_needed;
2036
2037
42.5k
      for (i=1; i<=7 ; i++)
2038
37.1k
      {
2039
        /*
2040
         * A5 Bits decoding
2041
         */
2042
37.1k
        bits_needed = 1;
2043
37.1k
        GET_DATA;
2044
2045
        /* analyse bits */
2046
36.9k
        switch (oct>>(32-bits_needed))
2047
36.9k
        {
2048
17.8k
          case 0x00: str = "encryption algorithm not available"; break;
2049
19.1k
          case 0x01: str = "encryption algorithm available";     break;
2050
0
          default:   str = "This should not happen";
2051
36.9k
        }
2052
2053
36.9k
        proto_tree_add_uint_format(tf_tree, hf_gsm_a_gm_a5_bits, tvb, curr_offset-1-add_octets, 1+add_octets, oct>>(32-bits_needed), "A5/%d: %s (%u)", i, str, oct>>(32-bits_needed));
2054
36.9k
        bit_offset++;
2055
36.9k
        curr_bits_length  -= bits_needed;
2056
36.9k
        oct    <<= bits_needed;
2057
36.9k
        bits_in_oct   -= bits_needed;
2058
36.9k
      }
2059
5.35k
    }
2060
2061
    /*
2062
     * ES IND
2063
     */
2064
9.11k
    bits_needed = 1;
2065
9.11k
    GET_DATA;
2066
2067
9.04k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ctrled_early_cm_sending, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2068
9.04k
    bit_offset++;
2069
9.04k
    curr_bits_length  -= bits_needed;
2070
9.04k
    oct    <<= bits_needed;
2071
9.04k
    bits_in_oct   -= bits_needed;
2072
2073
    /*
2074
     * PS
2075
     */
2076
9.04k
    bits_needed = 1;
2077
9.04k
    GET_DATA;
2078
2079
9.02k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_pseudo_sync, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2080
9.02k
    bit_offset++;
2081
9.02k
    curr_bits_length  -= bits_needed;
2082
9.02k
    oct    <<= bits_needed;
2083
9.02k
    bits_in_oct   -= bits_needed;
2084
2085
    /*
2086
     * VGCS
2087
     */
2088
9.02k
    bits_needed = 1;
2089
9.02k
    GET_DATA;
2090
2091
8.98k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_vgcs, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2092
8.98k
    bit_offset++;
2093
8.98k
    curr_bits_length  -= bits_needed;
2094
8.98k
    oct    <<= bits_needed;
2095
8.98k
    bits_in_oct   -= bits_needed;
2096
2097
    /*
2098
     * VBS
2099
     */
2100
8.98k
    bits_needed = 1;
2101
8.98k
    GET_DATA;
2102
2103
8.97k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_vbs, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2104
8.97k
    bit_offset++;
2105
8.97k
    curr_bits_length  -= bits_needed;
2106
8.97k
    oct    <<= bits_needed;
2107
8.97k
    bits_in_oct   -= bits_needed;
2108
2109
    /*
2110
     * Multislot capability?
2111
     */
2112
8.97k
    bits_needed = 1;
2113
8.97k
    GET_DATA;
2114
2115
8.64k
    value = oct>>(32-bits_needed);
2116
2117
8.64k
    mc_item = proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_multislot_capability, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2118
8.64k
    bit_offset++;
2119
2120
8.64k
    curr_bits_length  -= bits_needed;
2121
8.64k
    oct    <<= bits_needed;
2122
8.64k
    bits_in_oct   -= bits_needed;
2123
2124
    /* analyse bits */
2125
8.64k
    if (value == 1)
2126
4.79k
    {
2127
4.79k
      mc_tree = proto_item_add_subtree(mc_item, ett_gsm_a_gm_msrac_multislot_capability);
2128
      /*
2129
       * HSCSD multislot class?
2130
       */
2131
4.79k
      bits_needed = 1;
2132
4.79k
      GET_DATA;
2133
2134
      /* analyse bits */
2135
4.76k
      if ((oct>>(32-bits_needed)) == 0)
2136
3.01k
      {
2137
3.01k
        proto_tree_add_uint_format_value(mc_tree, hf_gsm_a_gm_rac_hscsd_multi_slot_class, tvb, curr_offset-1-add_octets, 1+add_octets, 0xFF,
2138
3.01k
                         "Bits are not available (%u)", oct>>(32-bits_needed));
2139
3.01k
        bit_offset++;
2140
3.01k
        curr_bits_length  -= bits_needed;
2141
3.01k
        oct    <<= bits_needed;
2142
3.01k
        bits_in_oct   -= bits_needed;
2143
3.01k
      }
2144
1.74k
      else
2145
1.74k
      {
2146
1.74k
        curr_bits_length  -= bits_needed;
2147
1.74k
        oct    <<= bits_needed;
2148
1.74k
        bits_in_oct   -= bits_needed;
2149
1.74k
        bit_offset++;
2150
2151
        /*
2152
         * HSCSD multislot class
2153
         */
2154
1.74k
        bits_needed = 5;
2155
1.74k
        GET_DATA;
2156
2157
1.71k
        proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_hscsd_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
2158
1.71k
        bit_offset    += 5;
2159
1.71k
        curr_bits_length  -= bits_needed;
2160
1.71k
        oct    <<= bits_needed;
2161
1.71k
        bits_in_oct   -= bits_needed;
2162
1.71k
      }
2163
2164
      /*
2165
       * GPRS multislot class?
2166
       */
2167
4.73k
      bits_needed = 1;
2168
4.73k
      GET_DATA;
2169
2170
      /* analyse bits */
2171
4.69k
      if ((oct>>(32-bits_needed)) == 0)
2172
3.35k
      {
2173
3.35k
        proto_tree_add_uint_format_value(mc_tree, hf_gsm_a_gm_rac_gprs_multi_slot_class, tvb, curr_offset-1-add_octets, 1+add_octets, 0xFF,
2174
3.35k
                        "Bits are not available (%u)", oct>>(32-bits_needed));
2175
3.35k
        bit_offset++;
2176
3.35k
        curr_bits_length  -= bits_needed;
2177
3.35k
        oct    <<= bits_needed;
2178
3.35k
        bits_in_oct   -= bits_needed;
2179
3.35k
      }
2180
1.34k
      else
2181
1.34k
      {
2182
1.34k
        curr_bits_length  -= bits_needed;
2183
1.34k
        oct    <<= bits_needed;
2184
1.34k
        bits_in_oct   -= bits_needed;
2185
1.34k
        bit_offset++;
2186
2187
        /*
2188
         * GPRS multislot class
2189
         */
2190
1.34k
        bits_needed = 5;
2191
1.34k
        GET_DATA;
2192
2193
1.23k
        proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_gprs_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
2194
1.23k
        bit_offset    += 5;
2195
1.23k
        curr_bits_length  -= bits_needed;
2196
1.23k
        oct    <<= bits_needed;
2197
1.23k
        bits_in_oct   -= bits_needed;
2198
2199
        /*
2200
         * GPRS Extended Dynamic Allocation Capability
2201
         */
2202
1.23k
        bits_needed = 1;
2203
1.23k
        GET_DATA;
2204
2205
1.22k
        proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_gprs_ext_dyn_alloc_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2206
1.22k
        bit_offset++;
2207
1.22k
        curr_bits_length  -= bits_needed;
2208
1.22k
        oct    <<= bits_needed;
2209
1.22k
        bits_in_oct   -= bits_needed;
2210
1.22k
      }
2211
2212
      /*
2213
       * SMS/SM values
2214
       */
2215
4.57k
      bits_needed = 1;
2216
4.57k
      GET_DATA;
2217
2218
      /* analyse bits */
2219
4.55k
      if ((oct>>(32-bits_needed)) == 0)
2220
2.77k
      {
2221
2.77k
        proto_tree_add_uint_format_value(mc_tree, hf_gsm_a_gm_sms_value, tvb, curr_offset-1-add_octets, 1+add_octets, 0xFF,
2222
2.77k
                        "Bits are not available (%u)", oct>>(32-bits_needed));
2223
2.77k
        bit_offset++;
2224
2.77k
        curr_bits_length  -= bits_needed;
2225
2.77k
        oct    <<= bits_needed;
2226
2.77k
        bits_in_oct   -= bits_needed;
2227
2.77k
      }
2228
1.77k
      else
2229
1.77k
      {
2230
1.77k
        curr_bits_length  -= bits_needed;
2231
1.77k
        oct    <<= bits_needed;
2232
1.77k
        bits_in_oct   -= bits_needed;
2233
1.77k
        bit_offset++;
2234
2235
        /*
2236
         * Switch-Measure-Switch value
2237
         */
2238
1.77k
        bits_needed = 4;
2239
1.77k
        GET_DATA;
2240
2241
        /* analyse bits */
2242
1.45k
        proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_sms_value, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
2243
1.45k
        bit_offset    += 4;
2244
1.45k
        curr_bits_length  -= bits_needed;
2245
1.45k
        oct    <<= bits_needed;
2246
1.45k
        bits_in_oct   -= bits_needed;
2247
2248
        /*
2249
         * Switch-Measure value
2250
         */
2251
1.45k
        bits_needed = 4;
2252
1.45k
        GET_DATA;
2253
2254
        /* analyse bits */
2255
1.24k
        proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_sm_value, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
2256
1.24k
        bit_offset    += 4;
2257
1.24k
        curr_bits_length  -= bits_needed;
2258
1.24k
        oct    <<= bits_needed;
2259
1.24k
        bits_in_oct   -= bits_needed;
2260
1.24k
      }
2261
2262
      /*
2263
       * ECSD multislot class?
2264
       */
2265
4.02k
      bits_needed = 1;
2266
4.02k
      GET_DATA;
2267
2268
      /* analyse bits */
2269
3.63k
      if ((oct>>(32-bits_needed)) == 0)
2270
484
      {
2271
484
        proto_tree_add_uint_format_value(mc_tree, hf_gsm_a_gm_rac_ecsd_multi_slot_class, tvb, curr_offset-1-add_octets, 1+add_octets, 0xFF,
2272
484
                        "Bits are not available (%u)", oct>>(32-bits_needed));
2273
484
        bit_offset++;
2274
484
        curr_bits_length  -= bits_needed;
2275
484
        oct    <<= bits_needed;
2276
484
        bits_in_oct   -= bits_needed;
2277
484
      }
2278
3.15k
      else
2279
3.15k
      {
2280
3.15k
        curr_bits_length  -= bits_needed;
2281
3.15k
        oct    <<= bits_needed;
2282
3.15k
        bits_in_oct   -= bits_needed;
2283
3.15k
        bit_offset++;
2284
2285
        /*
2286
         * ECSD multislot class
2287
         */
2288
3.15k
        bits_needed = 5;
2289
3.15k
        GET_DATA;
2290
2291
2.66k
        proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ecsd_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
2292
2.66k
        bit_offset    += 5;
2293
2.66k
        curr_bits_length  -= bits_needed;
2294
2.66k
        oct    <<= bits_needed;
2295
2.66k
        bits_in_oct   -= bits_needed;
2296
2.66k
      }
2297
2298
      /*
2299
       * EGPRS multislot class?
2300
       */
2301
3.15k
      bits_needed = 1;
2302
3.15k
      GET_DATA;
2303
2304
      /* analyse bits */
2305
3.13k
      if ((oct>>(32-bits_needed)) == 0)
2306
2.00k
      {
2307
2.00k
        proto_tree_add_uint_format_value(mc_tree, hf_gsm_a_gm_rac_egprs_multi_slot_class, tvb, curr_offset-1-add_octets, 1+add_octets, 0xFF,
2308
2.00k
                        "Bits are not available (%u)", oct>>(32-bits_needed));
2309
2.00k
        curr_bits_length  -= bits_needed;
2310
2.00k
        oct    <<= bits_needed;
2311
2.00k
        bits_in_oct   -= bits_needed;
2312
2.00k
        bit_offset++;
2313
2.00k
      }
2314
1.13k
      else
2315
1.13k
      {
2316
1.13k
        curr_bits_length  -= bits_needed;
2317
1.13k
        oct    <<= bits_needed;
2318
1.13k
        bits_in_oct   -= bits_needed;
2319
1.13k
        bit_offset++;
2320
2321
        /*
2322
         * EGPRS multislot class
2323
         */
2324
1.13k
        bits_needed = 5;
2325
1.13k
        GET_DATA;
2326
2327
1.10k
        proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_egprs_multi_slot_class, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
2328
1.10k
        bit_offset    += 5;
2329
1.10k
        curr_bits_length  -= bits_needed;
2330
1.10k
        oct    <<= bits_needed;
2331
1.10k
        bits_in_oct   -= bits_needed;
2332
2333
        /*
2334
         * EGPRS Extended Dynamic Allocation Capability
2335
         */
2336
1.10k
        bits_needed = 1;
2337
1.10k
        GET_DATA;
2338
2339
1.08k
        proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_egprs_ext_dyn_alloc_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2340
1.08k
        bit_offset++;
2341
1.08k
        curr_bits_length  -= bits_needed;
2342
1.08k
        oct    <<= bits_needed;
2343
1.08k
        bits_in_oct   -= bits_needed;
2344
1.08k
      }
2345
2346
      /*
2347
       * DTM GPRS Multi Slot Class ?
2348
      */
2349
3.08k
      bits_needed = 1;
2350
3.08k
      GET_DATA;
2351
2352
      /* analyse bits */
2353
3.08k
      if ((oct>>(32-bits_needed)) == 0)
2354
1.86k
      {
2355
1.86k
        proto_tree_add_uint_format_value(mc_tree, hf_gsm_a_gm_rac_dtm_gprs_multi_slot_class, tvb, curr_offset-1-add_octets, 1+add_octets, 0xFF,
2356
1.86k
                        "Bits are not available (%u)", oct>>(32-bits_needed));
2357
1.86k
        bit_offset++;
2358
1.86k
        curr_bits_length  -= bits_needed;
2359
1.86k
        oct    <<= bits_needed;
2360
1.86k
        bits_in_oct   -= bits_needed;
2361
1.86k
      }
2362
1.22k
      else
2363
1.22k
      {
2364
1.22k
        curr_bits_length  -= bits_needed;
2365
1.22k
        oct    <<= bits_needed;
2366
1.22k
        bits_in_oct   -= bits_needed;
2367
1.22k
        bit_offset++;
2368
2369
        /*
2370
         * DTM GPRS Multi Slot Class
2371
         */
2372
1.22k
        bits_needed = 2;
2373
1.22k
        GET_DATA;
2374
2375
        /* analyse bits */
2376
1.18k
        dtm_gprs_mslot = oct>>(32-bits_needed);
2377
2378
1.18k
        proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_gprs_multi_slot_class, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2379
1.18k
        bit_offset    += 2;
2380
1.18k
        curr_bits_length  -= bits_needed;
2381
1.18k
        oct    <<= bits_needed;
2382
1.18k
        bits_in_oct   -= bits_needed;
2383
2384
        /*
2385
         * Single Slot DTM
2386
         */
2387
1.18k
        bits_needed = 1;
2388
1.18k
        GET_DATA;
2389
2390
1.17k
        proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_rac_single_slt_dtm, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2391
1.17k
        bit_offset++;
2392
1.17k
        curr_bits_length  -= bits_needed;
2393
1.17k
        oct    <<= bits_needed;
2394
1.17k
        bits_in_oct   -= bits_needed;
2395
2396
        /*
2397
         * DTM EGPRS Multi Slot Class ?
2398
        */
2399
1.17k
        bits_needed = 1;
2400
1.17k
        GET_DATA;
2401
2402
        /* analyse bits */
2403
1.16k
        dtm_egprs_mslot    = oct>>(32-bits_needed);
2404
1.16k
        proto_tree_add_bits_item(mc_tree, hf_gsm_a_gm_rac_dtm_egprs_multi_slot_cls_pres, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2405
1.16k
        bit_offset++;
2406
1.16k
        curr_bits_length  -= bits_needed;
2407
1.16k
        oct    <<= bits_needed;
2408
1.16k
        bits_in_oct   -= bits_needed;
2409
2410
1.16k
        if ((oct>>(32-bits_needed)) == 1)
2411
848
        {
2412
          /*
2413
           * DTM EGPRS Multi Slot Class
2414
           */
2415
848
          bits_needed = 2;
2416
848
          GET_DATA;
2417
2418
830
          proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_egprs_multi_slot_class, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2419
830
          bit_offset    += 2;
2420
830
          curr_bits_length  -= bits_needed;
2421
830
          oct    <<= bits_needed;
2422
830
          bits_in_oct   -= bits_needed;
2423
830
        }
2424
1.16k
      }
2425
3.08k
    }
2426
2427
    /*
2428
     * 8PSK Power Capability?
2429
     */
2430
6.86k
    bits_needed = 1;
2431
6.86k
    GET_DATA;
2432
6.43k
    value = oct>>(32-bits_needed);
2433
2434
6.43k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_8psk_pow_cap_pres, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2435
6.43k
    bit_offset++;
2436
6.43k
    curr_bits_length  -= bits_needed;
2437
6.43k
    oct    <<= bits_needed;
2438
6.43k
    bits_in_oct   -= bits_needed;
2439
2440
    /* analyse bits */
2441
6.43k
    if (value == 1)
2442
3.46k
    {
2443
      /*
2444
       * 8PSK Power Capability
2445
       */
2446
3.46k
      bits_needed = 2;
2447
3.46k
      GET_DATA;
2448
2449
2450
3.10k
      proto_tree_add_uint(tf_tree, hf_gsm_a_gm_8psk_power_capability, tvb, curr_offset-1-add_octets, 1+add_octets, oct>>(32-bits_needed));
2451
3.10k
      bit_offset    += 2;
2452
3.10k
      curr_bits_length  -= bits_needed;
2453
3.10k
      oct    <<= bits_needed;
2454
3.10k
      bits_in_oct   -= bits_needed;
2455
3.10k
    }
2456
2457
    /*
2458
     * COMPACT Interference Measurement Capability
2459
     */
2460
6.07k
    bits_needed = 1;
2461
6.07k
    GET_DATA;
2462
2463
6.04k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_comp_int_meas_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2464
6.04k
    bit_offset++;
2465
6.04k
    curr_bits_length  -= bits_needed;
2466
6.04k
    oct    <<= bits_needed;
2467
6.04k
    bits_in_oct   -= bits_needed;
2468
2469
    /*
2470
     * Revision Level Indicator
2471
     */
2472
6.04k
    bits_needed = 1;
2473
6.04k
    GET_DATA;
2474
2475
5.99k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rel_lev_ind, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2476
5.99k
    bit_offset++;
2477
5.99k
    curr_bits_length  -= bits_needed;
2478
5.99k
    oct    <<= bits_needed;
2479
5.99k
    bits_in_oct   -= bits_needed;
2480
2481
    /*
2482
     * UMTS FDD Radio Access Technology Capability
2483
     */
2484
5.99k
    bits_needed = 1;
2485
5.99k
    GET_DATA;
2486
2487
5.66k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_fdd_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2488
5.66k
    bit_offset++;
2489
5.66k
    curr_bits_length  -= bits_needed;
2490
5.66k
    oct    <<= bits_needed;
2491
5.66k
    bits_in_oct   -= bits_needed;
2492
2493
    /*
2494
     * UMTS 3.84 Mcps TDD Radio Access Technology Capability
2495
     */
2496
5.66k
    bits_needed = 1;
2497
5.66k
    GET_DATA;
2498
2499
5.61k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_384_tdd_ra_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2500
5.61k
    bit_offset++;
2501
5.61k
    curr_bits_length  -= bits_needed;
2502
5.61k
    oct    <<= bits_needed;
2503
5.61k
    bits_in_oct   -= bits_needed;
2504
2505
    /*
2506
     * CDMA 2000 Radio Access Technology Capability
2507
     */
2508
5.61k
    bits_needed = 1;
2509
5.61k
    GET_DATA;
2510
2511
5.59k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_cdma2000_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2512
5.59k
    bit_offset++;
2513
5.59k
    curr_bits_length  -= bits_needed;
2514
5.59k
    oct    <<= bits_needed;
2515
5.59k
    bits_in_oct   -= bits_needed;
2516
2517
    /*
2518
     * UMTS 1.28 Mcps TDD Radio Access Technology Capability
2519
     */
2520
5.59k
    bits_needed = 1;
2521
5.59k
    GET_DATA;
2522
2523
5.54k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_umts_128_tdd_ra_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2524
5.54k
    bit_offset++;
2525
5.54k
    curr_bits_length  -= bits_needed;
2526
5.54k
    oct    <<= bits_needed;
2527
5.54k
    bits_in_oct   -= bits_needed;
2528
2529
    /*
2530
     * GERAN Feature Package 1
2531
     */
2532
5.54k
    bits_needed = 1;
2533
5.54k
    GET_DATA;
2534
2535
5.50k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_geran_feat_pkg, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2536
5.50k
    bit_offset++;
2537
5.50k
    curr_bits_length  -= bits_needed;
2538
5.50k
    oct    <<= bits_needed;
2539
5.50k
    bits_in_oct   -= bits_needed;
2540
2541
    /*
2542
     * Extended DTM (E)GPRS Multi Slot Class
2543
     */
2544
2545
5.50k
    bits_needed = 1;
2546
5.50k
    GET_DATA;
2547
2548
    /* analyse bits */
2549
5.27k
    if ((oct>>(32-bits_needed)) == 0)
2550
3.85k
    {
2551
3.85k
      proto_tree_add_uint_format_value(tf_tree, hf_gsm_a_gm_extended_dtm_egprs_multi_slot_class, tvb, curr_offset-1-add_octets, 1+add_octets, 0xFF, "Bits are not available (%u)", oct>>(32-bits_needed));
2552
3.85k
      curr_bits_length  -= bits_needed;
2553
3.85k
      oct    <<= bits_needed;
2554
3.85k
      bits_in_oct   -= bits_needed;
2555
3.85k
      bit_offset++;
2556
3.85k
    }
2557
1.41k
    else
2558
1.41k
    {
2559
1.41k
      curr_bits_length  -= bits_needed;
2560
1.41k
      oct    <<= bits_needed;
2561
1.41k
      bits_in_oct   -= bits_needed;
2562
1.41k
      bit_offset++;
2563
2564
      /*
2565
       * Extended DTM GPRS Multi Slot Class
2566
       */
2567
1.41k
      bits_needed = 2;
2568
1.41k
      GET_DATA;
2569
2570
      /* analyse bits */
2571
1.35k
      proto_tree_add_uint(tf_tree, hf_gsm_a_gm_extended_dtm_gprs_multi_slot_class, tvb, curr_offset-1-add_octets, 1+add_octets, (oct>>(32-bits_needed))|(dtm_gprs_mslot<<4));
2572
1.35k
      bit_offset    += 2;
2573
1.35k
      curr_bits_length  -= bits_needed;
2574
1.35k
      oct    <<= bits_needed;
2575
1.35k
      bits_in_oct   -= bits_needed;
2576
2577
1.35k
      if (dtm_egprs_mslot <= 3)
2578
348
      {
2579
        /*
2580
         * Extended DTM EGPRS Multi Slot Class
2581
         */
2582
348
        bits_needed = 2;
2583
348
        GET_DATA;
2584
2585
        /* analyse bits */
2586
320
        proto_tree_add_uint(tf_tree, hf_gsm_a_gm_extended_dtm_egprs_multi_slot_class, tvb, curr_offset-1-add_octets, 1+add_octets, (oct>>(32-bits_needed))|(dtm_egprs_mslot<<4));
2587
320
        bit_offset    += 2;
2588
320
        curr_bits_length  -= bits_needed;
2589
320
        oct    <<= bits_needed;
2590
320
        bits_in_oct   -= bits_needed;
2591
320
      }
2592
1.35k
    }
2593
2594
    /*
2595
     * Modulation based multislot class support
2596
     */
2597
5.18k
    bits_needed = 1;
2598
5.18k
    GET_DATA;
2599
2600
5.12k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_mod_based_multi_slot_class_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2601
5.12k
    bit_offset++;
2602
5.12k
    curr_bits_length  -= bits_needed;
2603
5.12k
    oct    <<= bits_needed;
2604
5.12k
    bits_in_oct   -= bits_needed;
2605
2606
    /*
2607
     * High Multislot Capability
2608
     */
2609
5.12k
    bits_needed = 1;
2610
5.12k
    GET_DATA;
2611
2612
    /* analyse bits */
2613
4.63k
    if ((oct>>(32-bits_needed)) == 0)
2614
1.77k
    {
2615
1.77k
      proto_tree_add_uint_format_value(tf_tree, hf_gsm_a_gm_high_multislot_capability, tvb, curr_offset-1-add_octets, 1+add_octets, 0xFF, "Bits are not available (%u)", oct>>(32-bits_needed));
2616
1.77k
      bit_offset++;
2617
1.77k
      curr_bits_length  -= bits_needed;
2618
1.77k
      oct    <<= bits_needed;
2619
1.77k
      bits_in_oct   -= bits_needed;
2620
1.77k
    }
2621
2.85k
    else
2622
2.85k
    {
2623
2.85k
      curr_bits_length  -= bits_needed;
2624
2.85k
      oct    <<= bits_needed;
2625
2.85k
      bits_in_oct   -= bits_needed;
2626
2.85k
      bit_offset++;
2627
2628
      /*
2629
       * High Multislot Capability
2630
       */
2631
2.85k
      bits_needed = 2;
2632
2.85k
      GET_DATA;
2633
2634
      /* analyse bits */
2635
2.79k
      ti = proto_tree_add_uint(tf_tree, hf_gsm_a_gm_high_multislot_capability, tvb, curr_offset-1-add_octets, 1+add_octets, oct>>(32-bits_needed));
2636
2.79k
      proto_item_append_text(ti, " - This field effect all other multislot fields."
2637
2.79k
                      " To understand the value please read TS 24.008 5.6.0"
2638
2.79k
                      " Release 5 Chap 10.5.5.12 Page 406");
2639
2.79k
      bit_offset    += 2;
2640
2.79k
      curr_bits_length  -= bits_needed;
2641
2.79k
      oct    <<= bits_needed;
2642
2.79k
      bits_in_oct   -= bits_needed;
2643
2.79k
    }
2644
2645
    /*
2646
     * GERAN Iu Mode Capability
2647
     */
2648
4.56k
    bits_needed = 1;
2649
4.56k
    GET_DATA;
2650
2651
4.53k
    value      = tvb_get_bits8(tvb, bit_offset, 1);
2652
4.53k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_geran_iu_mode_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2653
4.53k
    bit_offset    += bits_needed;
2654
4.53k
    curr_bits_length  -= bits_needed;
2655
4.53k
    oct    <<= bits_needed;
2656
4.53k
    bits_in_oct   -= bits_needed;
2657
4.53k
    if (value)
2658
1.34k
    {
2659
      /* GERAN Iu Mode Capabilities struct present */
2660
1.34k
      bits_needed    = 4;
2661
1.34k
      GET_DATA;
2662
988
      value      = tvb_get_bits8(tvb, bit_offset, 4);
2663
988
      bit_offset    += bits_needed;
2664
988
      curr_bits_length  -= bits_needed;
2665
988
      oct    <<= bits_needed;
2666
988
      bits_in_oct   -= bits_needed;
2667
988
      if (value)
2668
874
      {
2669
        /*
2670
         * FLO Iu Capability
2671
         */
2672
874
        bits_needed    = 1;
2673
874
        GET_DATA;
2674
839
        proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_flo_iu_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2675
839
        bit_offset    += bits_needed;
2676
839
        curr_bits_length  -= bits_needed;
2677
839
        oct    <<= bits_needed;
2678
839
        bits_in_oct   -= bits_needed;
2679
839
        value--;
2680
2681
        /* skip spare bits */
2682
839
        bit_offset    += value;
2683
839
        curr_bits_length  -= value;
2684
839
        oct    <<= value;
2685
839
        bits_in_oct   -= value;
2686
839
      }
2687
988
    }
2688
2689
    /*
2690
     * GMSK Multislot Power Profile
2691
     */
2692
4.14k
    bits_needed = 2;
2693
4.14k
    GET_DATA;
2694
2695
    /* analyse bits */
2696
4.00k
    proto_tree_add_uint(tf_tree, hf_gsm_a_gm_gmsk_multislot_power_profile, tvb, curr_offset-1-add_octets, 1+add_octets, oct>>(32-bits_needed));
2697
4.00k
    bit_offset    += 2;
2698
4.00k
    curr_bits_length  -= bits_needed;
2699
4.00k
    oct    <<= bits_needed;
2700
4.00k
    bits_in_oct   -= bits_needed;
2701
2702
    /*
2703
     * 8-PSK Multislot Power Profile
2704
     */
2705
4.00k
    bits_needed = 2;
2706
4.00k
    GET_DATA;
2707
2708
    /* analyse bits */
2709
3.95k
    proto_tree_add_uint(tf_tree, hf_gsm_a_gm_8psk_multislot_power_profile, tvb, curr_offset-1-add_octets, 1+add_octets, oct>>(32-bits_needed));
2710
3.95k
    bit_offset    += 2;
2711
3.95k
    curr_bits_length  -= bits_needed;
2712
3.95k
    oct    <<= bits_needed;
2713
3.95k
    bits_in_oct   -= bits_needed;
2714
2715
    /*
2716
     * Release 6
2717
     */
2718
2719
    /*
2720
     * Multiple TBF Capability
2721
     */
2722
3.95k
    bits_needed    = 1;
2723
3.95k
    GET_DATA;
2724
3.91k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_mult_tbf_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2725
3.91k
    bit_offset    += bits_needed;
2726
3.91k
    curr_bits_length  -= bits_needed;
2727
3.91k
    oct    <<= bits_needed;
2728
3.91k
    bits_in_oct   -= bits_needed;
2729
2730
    /*
2731
     * Downlink Advanced Receiver Performance
2732
     */
2733
3.91k
    bits_needed    = 2;
2734
3.91k
    GET_DATA;
2735
3.73k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_down_adv_rec_perf, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2736
3.73k
    bit_offset    += bits_needed;
2737
3.73k
    curr_bits_length  -= bits_needed;
2738
3.73k
    oct    <<= bits_needed;
2739
3.73k
    bits_in_oct   -= bits_needed;
2740
2741
    /*
2742
     * Extended RLC/MAC Control Message Segmentation Capability
2743
     */
2744
3.73k
    bits_needed    = 1;
2745
3.73k
    GET_DATA;
2746
3.70k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ext_rlc_mac_ctrl_msg_seg_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2747
3.70k
    bit_offset    += bits_needed;
2748
3.70k
    curr_bits_length  -= bits_needed;
2749
3.70k
    oct    <<= bits_needed;
2750
3.70k
    bits_in_oct   -= bits_needed;
2751
2752
    /*
2753
     * DTM Enhancements Capability
2754
     */
2755
3.70k
    bits_needed    = 1;
2756
3.70k
    GET_DATA;
2757
3.66k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_enh_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2758
3.66k
    bit_offset    += bits_needed;
2759
3.66k
    curr_bits_length  -= bits_needed;
2760
3.66k
    oct    <<= bits_needed;
2761
3.66k
    bits_in_oct   -= bits_needed;
2762
2763
    /*
2764
     * DTM GPRS High Multi Slot Class & DTM EGPRS High Multi Slot Class
2765
     */
2766
3.66k
    bits_needed = 1;
2767
3.66k
    GET_DATA;
2768
3.65k
    if ((oct>>(32-bits_needed)) == 0)
2769
1.61k
    {
2770
1.61k
      bit_offset    += bits_needed;
2771
1.61k
      curr_bits_length  -= bits_needed;
2772
1.61k
      oct    <<= bits_needed;
2773
1.61k
      bits_in_oct   -= bits_needed;
2774
1.61k
    }
2775
2.03k
    else
2776
2.03k
    {
2777
2.03k
      bit_offset    += bits_needed;
2778
2.03k
      curr_bits_length  -= bits_needed;
2779
2.03k
      oct    <<= bits_needed;
2780
2.03k
      bits_in_oct   -= bits_needed;
2781
2782
      /*
2783
       * DTM GPRS High Multi Slot Class
2784
       */
2785
2.03k
      bits_needed    = 3;
2786
2.03k
      GET_DATA;
2787
2.00k
      proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_gprs_high_multi_slot_class, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
2788
2.00k
      bit_offset    += bits_needed;
2789
2.00k
      curr_bits_length  -= bits_needed;
2790
2.00k
      oct    <<= bits_needed;
2791
2.00k
      bits_in_oct   -= bits_needed;
2792
2793
2.00k
      bits_needed = 1;
2794
2.00k
      GET_DATA;
2795
1.97k
      if ((oct>>(32-bits_needed)) == 0)
2796
800
      {
2797
800
        bit_offset    += bits_needed;
2798
800
        curr_bits_length  -= bits_needed;
2799
800
        oct    <<= bits_needed;
2800
800
        bits_in_oct   -= bits_needed;
2801
800
      }
2802
1.17k
      else
2803
1.17k
      {
2804
1.17k
        bit_offset    += bits_needed;
2805
1.17k
        curr_bits_length  -= bits_needed;
2806
1.17k
        oct    <<= bits_needed;
2807
1.17k
        bits_in_oct   -= bits_needed;
2808
2809
        /*
2810
         * DTM EGPRS High Multi Slot Class
2811
         */
2812
1.17k
        bits_needed    = 3;
2813
1.17k
        GET_DATA;
2814
1.15k
        proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_egprs_high_multi_slot_class, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
2815
1.15k
        bit_offset    += bits_needed;
2816
1.15k
        curr_bits_length  -= bits_needed;
2817
1.15k
        oct    <<= bits_needed;
2818
1.15k
        bits_in_oct   -= bits_needed;
2819
1.15k
      }
2820
1.97k
    }
2821
2822
    /*
2823
     * PS Handover Capability
2824
     */
2825
3.57k
    bits_needed    = 1;
2826
3.57k
    GET_DATA;
2827
3.54k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ps_ho_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2828
3.54k
    bit_offset    += bits_needed;
2829
3.54k
    curr_bits_length  -= bits_needed;
2830
3.54k
    oct    <<= bits_needed;
2831
3.54k
    bits_in_oct   -= bits_needed;
2832
2833
    /*
2834
     * Release 7
2835
     */
2836
2837
    /*
2838
     * DTM Handover Capability
2839
     */
2840
3.54k
    bits_needed    = 1;
2841
3.54k
    GET_DATA;
2842
3.52k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtm_ho_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2843
3.52k
    bit_offset    += bits_needed;
2844
3.52k
    curr_bits_length  -= bits_needed;
2845
3.52k
    oct    <<= bits_needed;
2846
3.52k
    bits_in_oct   -= bits_needed;
2847
2848
    /*
2849
     * Multislot Capability Reduction for Downlink Dual Carrier & Downlink Dual Carrier for DTM Capability
2850
     */
2851
2852
3.52k
    bits_needed = 1;
2853
3.52k
    GET_DATA;
2854
3.49k
    if ((oct>>(32-bits_needed)) == 0)
2855
1.47k
    {
2856
1.47k
      bit_offset    += bits_needed;
2857
1.47k
      curr_bits_length  -= bits_needed;
2858
1.47k
      oct    <<= bits_needed;
2859
1.47k
      bits_in_oct   -= bits_needed;
2860
1.47k
    }
2861
2.01k
    else
2862
2.01k
    {
2863
2.01k
      bit_offset    += bits_needed;
2864
2.01k
      curr_bits_length  -= bits_needed;
2865
2.01k
      oct    <<= bits_needed;
2866
2.01k
      bits_in_oct   -= bits_needed;
2867
2868
      /*
2869
       * Multislot Capability Reduction for Downlink Dual Carrier
2870
       */
2871
2.01k
      bits_needed    = 3;
2872
2.01k
      GET_DATA;
2873
1.99k
      proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_multi_slot_cap_red_down_dual_carrier, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
2874
1.99k
      bit_offset    += bits_needed;
2875
1.99k
      curr_bits_length  -= bits_needed;
2876
1.99k
      oct    <<= bits_needed;
2877
1.99k
      bits_in_oct   -= bits_needed;
2878
2879
      /*
2880
       * Downlink Dual Carrier for DTM Capability
2881
       */
2882
1.99k
      bits_needed    = 1;
2883
1.99k
      GET_DATA;
2884
1.97k
      proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_down_dual_carrier_dtm_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2885
1.97k
      bit_offset    += bits_needed;
2886
1.97k
      curr_bits_length  -= bits_needed;
2887
1.97k
      oct    <<= bits_needed;
2888
1.97k
      bits_in_oct   -= bits_needed;
2889
1.97k
    }
2890
2891
    /*
2892
     * Flexible Timeslot Assignment
2893
     */
2894
3.45k
    bits_needed    = 1;
2895
3.45k
    GET_DATA;
2896
3.42k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_flex_ts_assign, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2897
3.42k
    bit_offset    += bits_needed;
2898
3.42k
    curr_bits_length  -= bits_needed;
2899
3.42k
    oct    <<= bits_needed;
2900
3.42k
    bits_in_oct   -= bits_needed;
2901
2902
    /*
2903
     * GAN PS Handover Capability
2904
     */
2905
3.42k
    bits_needed    = 1;
2906
3.42k
    GET_DATA;
2907
3.39k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_gan_ps_ho_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2908
3.39k
    bit_offset    += bits_needed;
2909
3.39k
    curr_bits_length  -= bits_needed;
2910
3.39k
    oct    <<= bits_needed;
2911
3.39k
    bits_in_oct   -= bits_needed;
2912
2913
    /*
2914
     * RLC Non-persistent Mode
2915
     */
2916
3.39k
    bits_needed    = 1;
2917
3.39k
    GET_DATA;
2918
3.37k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_rlc_non_pers_mode, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2919
3.37k
    bit_offset    += bits_needed;
2920
3.37k
    curr_bits_length  -= bits_needed;
2921
3.37k
    oct    <<= bits_needed;
2922
3.37k
    bits_in_oct   -= bits_needed;
2923
2924
    /*
2925
     * Reduced Latency Capability
2926
     */
2927
3.37k
    bits_needed    = 1;
2928
3.37k
    GET_DATA;
2929
3.21k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_reduced_lat_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2930
3.21k
    bit_offset    += bits_needed;
2931
3.21k
    curr_bits_length  -= bits_needed;
2932
3.21k
    oct    <<= bits_needed;
2933
3.21k
    bits_in_oct   -= bits_needed;
2934
2935
    /*
2936
     * Uplink EGPRS2
2937
     */
2938
3.21k
    bits_needed    = 2;
2939
3.21k
    GET_DATA;
2940
3.15k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ul_egprs2, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2941
3.15k
    bit_offset    += bits_needed;
2942
3.15k
    curr_bits_length  -= bits_needed;
2943
3.15k
    oct    <<= bits_needed;
2944
3.15k
    bits_in_oct   -= bits_needed;
2945
2946
    /*
2947
     * Downlink EGPRS2
2948
     */
2949
3.15k
    bits_needed    = 2;
2950
3.15k
    GET_DATA;
2951
3.10k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dl_egprs2, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2952
3.10k
    bit_offset    += bits_needed;
2953
3.10k
    curr_bits_length  -= bits_needed;
2954
3.10k
    oct    <<= bits_needed;
2955
3.10k
    bits_in_oct   -= bits_needed;
2956
2957
    /*
2958
     * Release 8
2959
     */
2960
2961
    /*
2962
     * E-UTRA FDD support
2963
     */
2964
3.10k
    bits_needed    = 1;
2965
3.10k
    GET_DATA;
2966
3.08k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_fdd_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2967
3.08k
    bit_offset    += bits_needed;
2968
3.08k
    curr_bits_length  -= bits_needed;
2969
3.08k
    oct    <<= bits_needed;
2970
3.08k
    bits_in_oct   -= bits_needed;
2971
2972
    /*
2973
     * E-UTRA TDD support
2974
     */
2975
3.08k
    bits_needed    = 1;
2976
3.08k
    GET_DATA;
2977
3.03k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_tdd_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
2978
3.03k
    bit_offset    += bits_needed;
2979
3.03k
    curr_bits_length  -= bits_needed;
2980
3.03k
    oct    <<= bits_needed;
2981
3.03k
    bits_in_oct   -= bits_needed;
2982
2983
    /*
2984
     * GERAN to E-UTRA support in GERAN packet transfer mode
2985
     */
2986
3.03k
    bits_needed    = 2;
2987
3.03k
    GET_DATA;
2988
2.88k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_geran_to_eutra_support_in_geran_ptm, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
2989
2.88k
    bit_offset    += bits_needed;
2990
2.88k
    curr_bits_length  -= bits_needed;
2991
2.88k
    oct    <<= bits_needed;
2992
2.88k
    bits_in_oct   -= bits_needed;
2993
2994
    /*
2995
     * Priority-based reselection support
2996
     */
2997
2.88k
    bits_needed    = 1;
2998
2.88k
    GET_DATA;
2999
2.84k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_prio_based_resel_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3000
2.84k
    bit_offset    += bits_needed;
3001
2.84k
    curr_bits_length  -= bits_needed;
3002
2.84k
    oct    <<= bits_needed;
3003
2.84k
    bits_in_oct   -= bits_needed;
3004
3005
    /*
3006
     * Release 9
3007
     */
3008
3009
    /*
3010
     * Enhanced Flexible Timeslot Assignment
3011
     */
3012
2.84k
    bits_needed = 1;
3013
2.84k
    GET_DATA;
3014
2.79k
    if ((oct>>(32-bits_needed)) == 0)
3015
1.12k
    {
3016
1.12k
      bit_offset    += bits_needed;
3017
1.12k
      curr_bits_length  -= bits_needed;
3018
1.12k
      oct    <<= bits_needed;
3019
1.12k
      bits_in_oct   -= bits_needed;
3020
1.12k
    }
3021
1.66k
    else
3022
1.66k
    {
3023
1.66k
      bit_offset    += bits_needed;
3024
1.66k
      curr_bits_length  -= bits_needed;
3025
1.66k
      oct    <<= bits_needed;
3026
1.66k
      bits_in_oct   -= bits_needed;
3027
3028
      /*
3029
       * Alternative EFTA Multislot Class
3030
       */
3031
1.66k
      bits_needed    = 4;
3032
1.66k
      GET_DATA;
3033
1.63k
      proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_alt_efta_multi_slot_class, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3034
1.63k
      bit_offset    += bits_needed;
3035
1.63k
      curr_bits_length  -= bits_needed;
3036
1.63k
      oct    <<= bits_needed;
3037
1.63k
      bits_in_oct   -= bits_needed;
3038
3039
      /*
3040
       * EFTA Multislot Capability Reduction for Downlink Dual Carrier
3041
       */
3042
1.63k
      bits_needed    = 3;
3043
1.63k
      GET_DATA;
3044
1.52k
      proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_efta_multi_slot_cap_red_down_dual_carrier, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3045
1.52k
      bit_offset    += bits_needed;
3046
1.52k
      curr_bits_length  -= bits_needed;
3047
1.52k
      oct    <<= bits_needed;
3048
1.52k
      bits_in_oct   -= bits_needed;
3049
1.52k
    }
3050
3051
    /*
3052
     * Indication of Upper Layer PDU Start Capability for RLC UM
3053
     */
3054
2.65k
    bits_needed = 1;
3055
2.65k
    GET_DATA;
3056
2.62k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ind_up_layer_pdu_start_cap_for_rlc_um, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3057
2.62k
    bit_offset    += bits_needed;
3058
2.62k
    curr_bits_length  -= bits_needed;
3059
2.62k
    oct    <<= bits_needed;
3060
2.62k
    bits_in_oct   -= bits_needed;
3061
3062
    /*
3063
     * EMST Capability
3064
     */
3065
2.62k
    bits_needed       = 1;
3066
2.62k
    GET_DATA;
3067
2.60k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_emst_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3068
2.60k
    bit_offset    += bits_needed;
3069
2.60k
    curr_bits_length  -= bits_needed;
3070
2.60k
    oct    <<= bits_needed;
3071
2.60k
    bits_in_oct   -= bits_needed;
3072
3073
    /*
3074
     * MTTI Capability
3075
     */
3076
2.60k
    bits_needed    = 1;
3077
2.60k
    GET_DATA;
3078
2.59k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_mtti_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3079
2.59k
    bit_offset    += bits_needed;
3080
2.59k
    curr_bits_length  -= bits_needed;
3081
2.59k
    oct    <<= bits_needed;
3082
2.59k
    bits_in_oct   -= bits_needed;
3083
3084
    /*
3085
     * UTRA CSG Cells Reporting
3086
     */
3087
2.59k
    bits_needed    = 1;
3088
2.59k
    GET_DATA;
3089
2.56k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_utra_csg_cell_report, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3090
2.56k
    bit_offset    += bits_needed;
3091
2.56k
    curr_bits_length  -= bits_needed;
3092
2.56k
    oct    <<= bits_needed;
3093
2.56k
    bits_in_oct   -= bits_needed;
3094
3095
    /*
3096
     * E-UTRA CSG Cells Reporting
3097
     */
3098
2.56k
    bits_needed    = 1;
3099
2.56k
    GET_DATA;
3100
2.52k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_csg_cell_report, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3101
2.52k
    bit_offset    += bits_needed;
3102
2.52k
    curr_bits_length  -= bits_needed;
3103
2.52k
    oct    <<= bits_needed;
3104
2.52k
    bits_in_oct   -= bits_needed;
3105
3106
    /*
3107
     * Release 10
3108
     */
3109
3110
     /*
3111
     * DTR Capability
3112
     */
3113
2.52k
    bits_needed = 1;
3114
2.52k
    GET_DATA;
3115
2.46k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dtr_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3116
2.46k
    bit_offset += bits_needed;
3117
2.46k
    curr_bits_length -= bits_needed;
3118
2.46k
    oct <<= bits_needed;
3119
2.46k
    bits_in_oct -= bits_needed;
3120
3121
     /*
3122
     * EMSR Capability
3123
     */
3124
2.46k
    bits_needed = 1;
3125
2.46k
    GET_DATA;
3126
2.43k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_emsr_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3127
2.43k
    bit_offset += bits_needed;
3128
2.43k
    curr_bits_length -= bits_needed;
3129
2.43k
    oct <<= bits_needed;
3130
2.43k
    bits_in_oct -= bits_needed;
3131
3132
     /*
3133
     * Fast Downlink Frequency Switching Capability
3134
     */
3135
2.43k
    bits_needed = 1;
3136
2.43k
    GET_DATA;
3137
2.39k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_fast_down_freq_switch_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3138
2.39k
    bit_offset += bits_needed;
3139
2.39k
    curr_bits_length -= bits_needed;
3140
2.39k
    oct <<= bits_needed;
3141
2.39k
    bits_in_oct -= bits_needed;
3142
3143
     /*
3144
     * TIGHTER Capability
3145
     */
3146
2.39k
    bits_needed = 2;
3147
2.39k
    GET_DATA;
3148
2.24k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_tighter_cap, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
3149
2.24k
    bit_offset += bits_needed;
3150
2.24k
    curr_bits_length -= bits_needed;
3151
2.24k
    oct <<= bits_needed;
3152
2.24k
    bits_in_oct -= bits_needed;
3153
3154
    /*
3155
     * Release 11
3156
     */
3157
3158
     /*
3159
     * FANR Capability
3160
     */
3161
2.24k
    bits_needed = 1;
3162
2.24k
    GET_DATA;
3163
2.21k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_fanr_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3164
2.21k
    bit_offset += bits_needed;
3165
2.21k
    curr_bits_length -= bits_needed;
3166
2.21k
    oct <<= bits_needed;
3167
2.21k
    bits_in_oct -= bits_needed;
3168
3169
     /*
3170
     * IPA Capability
3171
     */
3172
2.21k
    bits_needed = 1;
3173
2.21k
    GET_DATA;
3174
2.19k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ipa_cap, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3175
2.19k
    bit_offset += bits_needed;
3176
2.19k
    curr_bits_length -= bits_needed;
3177
2.19k
    oct <<= bits_needed;
3178
2.19k
    bits_in_oct -= bits_needed;
3179
3180
     /*
3181
     * GERAN Network Sharing support
3182
     */
3183
2.19k
    bits_needed = 1;
3184
2.19k
    GET_DATA;
3185
2.11k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_geran_nw_sharing_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3186
2.11k
    bit_offset += bits_needed;
3187
2.11k
    curr_bits_length -= bits_needed;
3188
2.11k
    oct <<= bits_needed;
3189
2.11k
    bits_in_oct -= bits_needed;
3190
3191
     /*
3192
     * E-UTRA Wideband RSRQ measurements support
3193
     */
3194
2.11k
    bits_needed = 1;
3195
2.11k
    GET_DATA;
3196
2.08k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_wb_rsrq_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3197
2.08k
    bit_offset += bits_needed;
3198
2.08k
    curr_bits_length -= bits_needed;
3199
2.08k
    oct <<= bits_needed;
3200
2.08k
    bits_in_oct -= bits_needed;
3201
3202
    /*
3203
     * Release 12
3204
     */
3205
3206
     /*
3207
     * UTRA Multiple Frequency Band Indicators support
3208
     */
3209
2.08k
    bits_needed = 1;
3210
2.08k
    GET_DATA;
3211
2.03k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_utra_mfbi_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3212
2.03k
    bit_offset += bits_needed;
3213
2.03k
    curr_bits_length -= bits_needed;
3214
2.03k
    oct <<= bits_needed;
3215
2.03k
    bits_in_oct -= bits_needed;
3216
3217
     /*
3218
     * E-UTRA Multiple Frequency Band Indicators support
3219
     */
3220
2.03k
    bits_needed = 1;
3221
2.03k
    GET_DATA;
3222
1.78k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_eutra_mfbi_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3223
1.78k
    bit_offset += bits_needed;
3224
1.78k
    curr_bits_length -= bits_needed;
3225
1.78k
    oct <<= bits_needed;
3226
1.78k
    bits_in_oct -= bits_needed;
3227
3228
     /*
3229
     * DLMC Capability
3230
     */
3231
1.78k
    bits_needed = 1;
3232
1.78k
    GET_DATA;
3233
1.75k
    if ((oct>>(32-bits_needed)) == 0)
3234
564
    {
3235
564
      bit_offset += bits_needed;
3236
564
      curr_bits_length -= bits_needed;
3237
564
      oct <<= bits_needed;
3238
564
      bits_in_oct -= bits_needed;
3239
564
    }
3240
1.19k
    else
3241
1.19k
    {
3242
1.19k
      bit_offset += bits_needed;
3243
1.19k
      curr_bits_length -= bits_needed;
3244
1.19k
      oct  <<= bits_needed;
3245
1.19k
      bits_in_oct -= bits_needed;
3246
3247
1.19k
      bits_needed = 1;
3248
1.19k
      GET_DATA;
3249
1.16k
      if ((oct>>(32-bits_needed)) == 0)
3250
255
      {
3251
255
        bit_offset += bits_needed;
3252
255
        curr_bits_length -= bits_needed;
3253
255
        oct <<= bits_needed;
3254
255
        bits_in_oct -= bits_needed;
3255
255
      }
3256
911
      else
3257
911
      {
3258
911
        bit_offset += bits_needed;
3259
911
        curr_bits_length -= bits_needed;
3260
911
        oct <<= bits_needed;
3261
911
        bits_in_oct -= bits_needed;
3262
3263
        /*
3264
         * DLMC - Non-contiguous intra-band reception
3265
        */
3266
911
        bits_needed = 2;
3267
911
        GET_DATA;
3268
887
        proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dlmc_non_contig_intra_band_recep, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
3269
887
        bit_offset += bits_needed;
3270
887
        curr_bits_length -= bits_needed;
3271
887
        oct <<= bits_needed;
3272
887
        bits_in_oct -= bits_needed;
3273
3274
        /*
3275
         * DLMC - Inter-band reception
3276
        */
3277
887
        bits_needed = 1;
3278
887
        GET_DATA;
3279
877
        proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dlmc_inter_band_recep, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3280
877
        bit_offset += bits_needed;
3281
877
        curr_bits_length -= bits_needed;
3282
877
        oct <<= bits_needed;
3283
877
        bits_in_oct -= bits_needed;
3284
877
      }
3285
3286
      /*
3287
       * DLMC - Maximum Bandwidth
3288
      */
3289
1.13k
      bits_needed = 2;
3290
1.13k
      GET_DATA;
3291
1.07k
      proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dlmc_max_bandwidth, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
3292
1.07k
      bit_offset += bits_needed;
3293
1.07k
      curr_bits_length -= bits_needed;
3294
1.07k
      oct <<= bits_needed;
3295
1.07k
      bits_in_oct -= bits_needed;
3296
3297
      /*
3298
       * DLMC - Maximum Number of Downlink Timeslots
3299
      */
3300
1.07k
      bits_needed = 6;
3301
1.07k
      GET_DATA;
3302
995
      proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dlmc_max_nb_dl_ts, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
3303
995
      bit_offset += bits_needed;
3304
995
      curr_bits_length -= bits_needed;
3305
995
      oct <<= bits_needed;
3306
995
      bits_in_oct -= bits_needed;
3307
3308
      /*
3309
       * DLMC - Maximum Number of Downlink Carriers
3310
      */
3311
995
      bits_needed = 3;
3312
995
      GET_DATA;
3313
952
      proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_dlmc_max_nb_dl_carriers, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3314
952
      bit_offset += bits_needed;
3315
952
      curr_bits_length -= bits_needed;
3316
952
      oct <<= bits_needed;
3317
952
      bits_in_oct -= bits_needed;
3318
952
    }
3319
3320
    /*
3321
     * Extended TSC Set Capability support
3322
     */
3323
1.51k
    bits_needed = 1;
3324
1.51k
    GET_DATA;
3325
1.48k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ext_tsc_set_cap_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3326
1.48k
    bit_offset += bits_needed;
3327
1.48k
    curr_bits_length -= bits_needed;
3328
1.48k
    oct <<= bits_needed;
3329
1.48k
    bits_in_oct -= bits_needed;
3330
3331
    /*
3332
     * Extended EARFCN value range
3333
     */
3334
1.48k
    bits_needed = 1;
3335
1.48k
    GET_DATA;
3336
1.43k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ext_earfcn_value_range, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3337
1.43k
    bit_offset += bits_needed;
3338
1.43k
    curr_bits_length -= bits_needed;
3339
1.43k
    oct <<= bits_needed;
3340
1.43k
    bits_in_oct -= bits_needed;
3341
3342
    /*
3343
     * Release 13
3344
     */
3345
3346
    /*
3347
     * (EC-)PCH monitoring support
3348
     */
3349
1.43k
    bits_needed = 2;
3350
1.43k
    GET_DATA;
3351
1.39k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ec_pch_mon_support, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
3352
1.39k
    bit_offset += bits_needed;
3353
1.39k
    curr_bits_length -= bits_needed;
3354
1.39k
    oct <<= bits_needed;
3355
1.39k
    bits_in_oct -= bits_needed;
3356
3357
    /*
3358
     * Release 14
3359
     */
3360
3361
    /*
3362
     * MS Sync Accuracy
3363
     */
3364
1.39k
    bits_needed = 1;
3365
1.39k
    GET_DATA;
3366
1.35k
    if ((oct>>(32-bits_needed)) == 0)
3367
687
    {
3368
687
      bit_offset += bits_needed;
3369
687
      curr_bits_length -= bits_needed;
3370
687
      oct <<= bits_needed;
3371
687
      bits_in_oct -= bits_needed;
3372
687
    }
3373
671
    else
3374
671
    {
3375
671
      bits_needed = 4;
3376
671
      GET_DATA;
3377
607
      proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ms_sync_accuracy, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
3378
607
      bit_offset += bits_needed;
3379
607
      curr_bits_length -= bits_needed;
3380
607
      oct <<= bits_needed;
3381
607
      bits_in_oct -= bits_needed;
3382
607
    }
3383
3384
    /*
3385
     * EC uplink coverage enhancement support
3386
     */
3387
1.29k
    bits_needed = 1;
3388
1.29k
    GET_DATA;
3389
1.21k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ec_ul_cov_enh_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3390
1.21k
    bit_offset += bits_needed;
3391
1.21k
    curr_bits_length -= bits_needed;
3392
1.21k
    oct <<= bits_needed;
3393
1.21k
    bits_in_oct -= bits_needed;
3394
3395
    /*
3396
     * Release 15
3397
     */
3398
3399
    /*
3400
     * MTA Access Security support
3401
     */
3402
1.21k
    bits_needed = 1;
3403
1.21k
    GET_DATA;
3404
1.16k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_mta_access_sec_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3405
1.16k
    bit_offset += bits_needed;
3406
1.16k
    curr_bits_length -= bits_needed;
3407
1.16k
    oct <<= bits_needed;
3408
1.16k
    bits_in_oct -= bits_needed;
3409
3410
    /*
3411
     * EC paging indication channel monitoring support
3412
     */
3413
1.16k
    bits_needed = 1;
3414
1.16k
    GET_DATA;
3415
1.13k
    proto_tree_add_bits_item(tf_tree, hf_gsm_a_gm_rac_ec_paging_ind_chan_mon_support, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3416
1.13k
    bit_offset += bits_needed;
3417
1.13k
    curr_bits_length -= bits_needed;
3418
1.13k
    oct <<= bits_needed;
3419
1.13k
    bits_in_oct -= bits_needed;
3420
3421
     /*
3422
     * we are too long ... so jump over it
3423
     */
3424
5.45k
    while (curr_bits_length > 0)
3425
4.32k
    {
3426
4.32k
      if (curr_bits_length > 8)
3427
3.53k
        bits_needed = 8;
3428
788
      else
3429
788
        bits_needed = curr_bits_length;
3430
4.32k
      GET_DATA;
3431
4.32k
      curr_bits_length  -= bits_needed;
3432
4.32k
      oct    <<= bits_needed;
3433
4.32k
      bits_in_oct   -= bits_needed;
3434
4.32k
    }
3435
3436
3437
10.9k
  } while (1);
3438
3439
1.69k
  curr_offset += curr_len;
3440
3441
1.69k
  EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
3442
3443
1.69k
  return (curr_offset - offset);
3444
1.70k
}
3445
3446
/*
3447
 * [9] 10.5.5.14
3448
 */
3449
static const range_string gmm_cause_vals[] = {
3450
  { 0x00, 0x01, "Protocol error, unspecified"},
3451
  { 0x02, 0x02, "IMSI unknown in HLR"},
3452
  { 0x03, 0x03, "Illegal MS"},
3453
  { 0x04, 0x04, "IMSI unknown in VLR"}, /* Annex G.1 */
3454
  { 0x05, 0x05, "IMEI not accepted"}, /* Annex G.1 */
3455
  { 0x06, 0x06, "Illegal ME"},
3456
  { 0x07, 0x07, "GPRS services not allowed"},
3457
  { 0x08, 0x08, "GPRS services and non-GPRS services not allowed"},
3458
  { 0x09, 0x09, "MS identity cannot be derived by the network"},
3459
  { 0x0a, 0x0a, "Implicitly detached"},
3460
  { 0x0b, 0x0b, "PLMN not allowed"},
3461
  { 0x0c, 0x0c, "Location Area not allowed"},
3462
  { 0x0d, 0x0d, "Roaming not allowed in this location area"},
3463
  { 0x0e, 0x0e, "GPRS services not allowed in this PLMN"},
3464
  { 0x0f, 0x0f, "No Suitable Cells In Location Area"},
3465
  { 0x10, 0x10, "MSC temporarily not reachable"},
3466
  { 0x11, 0x11, "Network failure"},
3467
  { 0x12, 0x13, "Protocol error, unspecified"},
3468
  { 0x14, 0x14, "MAC failure"},
3469
  { 0x15, 0x15, "Synch failure"},
3470
  { 0x16, 0x16, "Congestion"},
3471
  { 0x17, 0x17, "GSM authentication unacceptable"},
3472
  { 0x18, 0x18, "Protocol error, unspecified"},
3473
  { 0x19, 0x19, "Not authorized for this CSG"},
3474
  { 0x1c, 0x1c, "SMS provided via GPRS in this routing area"},
3475
  { 0x20, 0x20, "Service option not supported"},            /* Annex G.4 */
3476
  { 0x21, 0x21, "Requested service option not subscribed"},     /* Annex G.4 */
3477
  { 0x22, 0x22, "Service option temporarily out of order"},     /* Annex G.4 */
3478
  { 0x23, 0x25, "Protocol error, unspecified"},
3479
  { 0x26, 0x26, "Call cannot be identified(non-GPRS services only)"}, /* Annex G.4 */
3480
  { 0x27, 0x27, "Protocol error, unspecified"},
3481
  { 0x28, 0x28, "No PDP context activated"},
3482
  { 0x29, 0x2f, "Protocol error, unspecified"},
3483
  { 0x30, 0x3f, "Retry upon entry into a new cell"},
3484
  { 0x40, 0x5e, "Protocol error, unspecified"},
3485
  { 0x5f, 0x5f, "Semantically incorrect message"},
3486
  { 0x60, 0x60, "Invalid mandatory information"},
3487
  { 0x61, 0x61, "Message type non-existent or not implemented"},
3488
  { 0x62, 0x62, "Message type not compatible with the protocol state"},
3489
  { 0x63, 0x63, "Information element non-existent or not implemented"},
3490
  { 0x64, 0x64, "Conditional IE error"},
3491
  { 0x65, 0x65, "Message not compatible with the protocol state"},
3492
  { 0x66, 0x6e, "Protocol error, unspecified"},
3493
  { 0x6f, 0x6f, "Protocol error, unspecified"},
3494
  { 0x70, 0xff, "Protocol error, unspecified"},
3495
  { 0, 0, NULL }
3496
};
3497
/* NOTE 1 TS 124 008 V8.6.0 (2009-07)
3498
  "Any other value received by the mobile station shall be treated as 0110 1111, "Protocol
3499
  error, unspecified". Any other value received by the network shall be treated as
3500
  0110 1111, "Protocol error, unspecified".
3501
 */
3502
3503
/* NOTE: The listed reject cause values are defined in annex G. */
3504
3505
static uint16_t
3506
de_gmm_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_)
3507
12
{
3508
12
  uint32_t curr_offset;
3509
3510
12
  curr_offset = offset;
3511
3512
12
  proto_tree_add_item(tree, hf_gsm_a_gm_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3513
3514
12
  curr_offset++;
3515
3516
  /* no length check possible */
3517
3518
12
  return (curr_offset - offset);
3519
12
}
3520
3521
/*
3522
 * [7] 10.5.5.15 Routing area identification
3523
 */
3524
uint16_t
3525
de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3526
945
{
3527
945
  proto_tree *subtree;
3528
945
  uint32_t      mcc;
3529
945
  uint32_t      mnc;
3530
945
  uint32_t      lac;
3531
945
  uint32_t      rac;
3532
945
  uint32_t      curr_offset;
3533
3534
945
  curr_offset = offset;
3535
3536
945
  mcc = (tvb_get_uint8(tvb, curr_offset) & 0x0f) <<8;
3537
945
  mcc |= (tvb_get_uint8(tvb, curr_offset) & 0xf0);
3538
945
  mcc |= (tvb_get_uint8(tvb, curr_offset+1) & 0x0f);
3539
945
  mnc = (tvb_get_uint8(tvb, curr_offset+2) & 0x0f) <<8;
3540
945
  mnc |= (tvb_get_uint8(tvb, curr_offset+2) & 0xf0);
3541
945
  mnc |= (tvb_get_uint8(tvb, curr_offset+1) & 0xf0) >>4;
3542
945
  if ((mnc&0x000f) == 0x000f)
3543
80
     mnc = mnc>>4;
3544
3545
945
  lac = tvb_get_ntohs(tvb, curr_offset+3);
3546
945
  rac = tvb_get_uint8(tvb, curr_offset+5);
3547
3548
945
  subtree = proto_tree_add_subtree_format(tree,
3549
945
    tvb, curr_offset, 6, ett_gmm_rai, NULL,
3550
945
    "Routing area identification: %x-%x-%u-%u",
3551
945
    mcc, mnc, lac, rac);
3552
3553
945
  dissect_e212_mcc_mnc(tvb, pinfo, subtree, offset, E212_RAI, true);
3554
3555
945
  proto_tree_add_item(subtree, hf_gsm_a_lac, tvb, curr_offset+3, 2, ENC_BIG_ENDIAN);
3556
945
  proto_tree_add_item(subtree, hf_gsm_a_gm_rac, tvb, curr_offset+5, 1, ENC_BIG_ENDIAN);
3557
3558
945
  curr_offset += 6;
3559
945
  if (add_string)
3560
890
  {
3561
890
    if (add_string[0] == '\0')
3562
890
    {
3563
890
      snprintf(add_string, string_len, " - RAI: %x-%x-%u-%u", mcc, mnc, lac, rac);
3564
890
    }
3565
890
  }
3566
3567
3568
  /* no length check possible */
3569
3570
945
  return (curr_offset - offset);
3571
945
}
3572
3573
/*
3574
 * [7] 10.5.5.15a Routing area identification 2
3575
 */
3576
static uint16_t
3577
de_gmm_rai2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3578
5
{
3579
  /* The routing area identification 2 value is coded as octet 2 to 7 of the Routing area identification information element. */
3580
5
  return de_gmm_rai(tvb, tree, pinfo, offset, len, add_string, string_len);
3581
5
}
3582
3583
/*
3584
 * [7] 10.5.5.17
3585
 */
3586
static const value_string gsm_a_gm_update_res_vals[] = {
3587
  {0,  "RA updated" },
3588
  {1,  "Combined RA/LA updated"},
3589
  {2,  "Reserved"},
3590
  {3,  "Reserved"},
3591
  {4,  "Reserved"},
3592
  {5,  "Reserved"},
3593
  {6,  "Reserved"},
3594
  {7,  "Reserved"},
3595
  {0, NULL}
3596
};
3597
3598
3599
static uint16_t
3600
de_gmm_update_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3601
17
{
3602
17
  uint32_t     curr_offset = offset;
3603
3604
  /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
3605
17
  proto_tree_add_item(tree, hf_gsm_a_gm_update_result, tvb, curr_offset, 1, ENC_NA);
3606
3607
17
  curr_offset++;
3608
3609
  /* no length check possible */
3610
3611
17
  return (curr_offset - offset);
3612
17
}
3613
3614
/*
3615
 * [9] 10.5.5.18 Update Type
3616
 */
3617
static const value_string gsm_a_gm_update_type_vals[] = {
3618
  { 0x00, "RA updating" },
3619
  { 0x01, "combined RA/LA updating" },
3620
  { 0x02, "combined RA/LA updating with IMSI attach" },
3621
  { 0x03, "Periodic updating" },
3622
  { 0, NULL }
3623
};
3624
3625
static uint16_t
3626
de_gmm_update_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_)
3627
473
{
3628
473
  proto_tree_add_item(tree, hf_gsm_a_gm_for, tvb, offset, 1, ENC_BIG_ENDIAN);
3629
473
  proto_tree_add_item(tree, hf_gsm_a_gm_update_type, tvb, offset, 1, ENC_BIG_ENDIAN);
3630
3631
  /* no length check possible */
3632
473
  return 1;
3633
473
}
3634
3635
/*
3636
 * [9] 10.5.5.19 A&C reference number (lower nibble)
3637
 */
3638
static uint16_t
3639
de_gmm_ac_ref_nr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3640
1
{
3641
  /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE LOWER NIBBLE */
3642
1
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_ac_ref_nr, tvb, (offset << 3) + 4, 4, ENC_BIG_ENDIAN);
3643
3644
  /* no length check possible */
3645
1
  return 1;
3646
1
}
3647
3648
/*
3649
 * [9] 10.5.5.19 A&C reference number (higher nibble)
3650
 */
3651
static uint16_t
3652
de_gmm_ac_ref_nr_h(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3653
2
{
3654
  /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
3655
2
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_ac_ref_nr, tvb, offset << 3, 4, ENC_BIG_ENDIAN);
3656
3657
  /* no length check possible */
3658
2
  return 1;
3659
2
}
3660
3661
/*
3662
 * [9] 10.5.5.20 Service type
3663
 */
3664
static const value_string gsm_a_gm_serv_type_vals[] = {
3665
  { 0x00, "Signalling" },
3666
  { 0x01, "Data" },
3667
  { 0x02, "Paging response" },
3668
  { 0x03, "MBMS Multicast Service Reception" },
3669
  { 0x04, "MBMS Broadcast Service Reception" },
3670
  { 0, NULL }
3671
};
3672
3673
static uint16_t
3674
de_gmm_service_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_)
3675
6
{
3676
6
  uint32_t  bit_offset;
3677
3678
6
  bit_offset = offset << 3;
3679
6
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3680
6
  bit_offset  +=  1;
3681
6
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_serv_type, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3682
  /*bit_offset  +=  3;*/
3683
3684
  /* no length check possible */
3685
6
  return 1;
3686
6
}
3687
3688
/*
3689
 * [9] 10.5.5.21 Cell Notification
3690
 * No data
3691
 */
3692
3693
/*
3694
 * [9] 10.5.5.22 PS LCS Capability
3695
 */
3696
static const true_false_string gsm_a_gm_mta_e_vals = {
3697
  "Multilateration Timing Advance using Extended Access Burst method supported",
3698
  "Multilateration Timing Advance using Extended Access Burst method not supported"
3699
};
3700
3701
static const true_false_string gsm_a_gm_mta_r_vals = {
3702
  "Multilateration Timing Advance using RLC data block method supported",
3703
  "Multilateration Timing Advance using RLC data block method not supported"
3704
};
3705
3706
static const true_false_string gsm_a_gm_apc_vals = {
3707
  "Additional Positioning Capabilities which can be retrieved by RRLP are supported",
3708
  "Additional Positioning Capabilities which can be retrieved by RRLP are not supported"
3709
};
3710
3711
static const true_false_string gsm_a_gm_otd_a_vals = {
3712
  "MS assisted E-OTD supported",
3713
  "MS assisted E-OTD not supported"
3714
};
3715
3716
static const true_false_string gsm_a_gm_otd_b_vals = {
3717
  "MS based E-OTD supported",
3718
  "MS based E-OTD not supported"
3719
};
3720
3721
static const true_false_string gsm_a_gm_gps_a_vals = {
3722
  "MS assisted GPS supported",
3723
  "MS assisted GPS not supported"
3724
};
3725
3726
static const true_false_string gsm_a_gm_gps_b_vals = {
3727
  "MS based GPS supported",
3728
  "MS based GPS not supported"
3729
};
3730
3731
static const true_false_string gsm_a_gm_gps_c_vals = {
3732
  "Conventional GPS supported",
3733
  "Conventional GPS not supported"
3734
};
3735
3736
static const true_false_string gsm_a_gm_motd_vals = {
3737
  "Multilateration Observed Time Difference supported",
3738
  "Multilateration Observed Time Difference not supported"
3739
};
3740
3741
static const true_false_string gsm_a_gm_mta_a_vals = {
3742
  "Multilateration Timing Advance using Access Burst method supported",
3743
  "Multilateration Timing Advance using Access Burst method not supported"
3744
};
3745
3746
static uint16_t
3747
de_gmm_ps_lcs_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3748
7
{
3749
7
  uint32_t  curr_offset;
3750
3751
7
  curr_offset = offset;
3752
7
  proto_tree_add_item(tree, hf_gsm_a_gm_mta_e, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3753
7
  proto_tree_add_item(tree, hf_gsm_a_gm_mta_r, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3754
7
  proto_tree_add_item(tree, hf_gsm_a_gm_apc, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3755
7
  proto_tree_add_item(tree, hf_gsm_a_gm_otd_a, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3756
7
  proto_tree_add_item(tree, hf_gsm_a_gm_otd_b, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3757
7
  proto_tree_add_item(tree, hf_gsm_a_gm_gps_a, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3758
7
  proto_tree_add_item(tree, hf_gsm_a_gm_gps_b, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3759
7
  proto_tree_add_item(tree, hf_gsm_a_gm_gps_c, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3760
3761
7
  curr_offset++;
3762
3763
7
  if (len > 2) {
3764
3
    proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset << 3, 6, ENC_BIG_ENDIAN);
3765
3
    proto_tree_add_item(tree, hf_gsm_a_gm_motd, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3766
3
    proto_tree_add_item(tree, hf_gsm_a_gm_mta_a, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3767
3
  }
3768
3769
7
  EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
3770
3771
7
  return (curr_offset - offset);
3772
7
}
3773
3774
/*
3775
 * [7] 10.5.5.23
3776
 */
3777
static const true_false_string gsm_a_gm_lcs_molr_value = {
3778
  "LCS-MOLR via PS domain supported",
3779
  "LCS-MOLR via PS domain not supported"
3780
};
3781
static const true_false_string gsm_a_gm_ims_vops_value = {
3782
  "IMS voice over PS session supported in Iu mode, but not supported in A/Gb mode",
3783
  "IMS voice over PS session in Iu mode and A/Gb mode not supported"
3784
};
3785
static const true_false_string gsm_a_gm_emc_bs_value = {
3786
  "Emergency bearer services supported in Iu mode, but not supported in A/Gb mode",
3787
  "Emergency bearer services in Iu mode and A/Gb mode not supported"
3788
};
3789
static uint16_t
3790
de_gmm_net_feat_supp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3791
2
{
3792
2
  uint32_t curr_offset;
3793
3794
2
  curr_offset = offset;
3795
3796
2
  proto_tree_add_item(tree, hf_gsm_a_gm_lcs_molr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3797
2
  proto_tree_add_item(tree, hf_gsm_a_gm_mbms, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3798
2
  proto_tree_add_item(tree, hf_gsm_a_gm_ims_vops, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3799
2
  proto_tree_add_item(tree, hf_gsm_a_gm_emc_bs, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3800
2
  curr_offset++;
3801
3802
2
  return (curr_offset - offset);
3803
2
}
3804
3805
/*
3806
 * [7] 10.5.5.23a Additional network feature support
3807
 */
3808
static const true_false_string gsm_a_gm_epco_value = {
3809
  "Extended protocol configuration options IE supported",
3810
  "Extended protocol configuration options IE not supported"
3811
};
3812
static const true_false_string gsm_a_gm_restrict_ec_value = {
3813
  "Enhanced coverage restricted",
3814
  "Enhanced coverage not restricted"
3815
};
3816
static const true_false_string gsm_a_gm_gprs_sms_value = {
3817
  "SMS via GPRS not supported",
3818
  "SMS via GPRS supported"
3819
};
3820
static uint16_t
3821
de_gmm_add_net_feat_supp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
3822
0
{
3823
0
  uint32_t curr_offset;
3824
3825
0
  curr_offset = offset;
3826
3827
0
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset << 3, 5, ENC_BIG_ENDIAN);
3828
0
  proto_tree_add_item(tree, hf_gsm_a_gm_epco, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3829
0
  proto_tree_add_item(tree, hf_gsm_a_gm_restrict_ec, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3830
0
  proto_tree_add_item(tree, hf_gsm_a_gm_gprs_sms, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
3831
0
  curr_offset++;
3832
3833
0
  return (curr_offset - offset);
3834
0
}
3835
3836
/* [7] 10.5.5.24 Inter RAT information container */
3837
static uint16_t
3838
de_gmm_rat_info_container(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
3839
0
{
3840
0
  uint32_t  curr_offset;
3841
0
  tvbuff_t *rrc_irat_ho_info_tvb;
3842
3843
0
  curr_offset = offset;
3844
3845
/* The value part of the Inter RAT information container information element is the INTER RAT HANDOVER INFO as
3846
defined in 3GPP TS 25.331 [23c]. If this field includes padding bits, they are defined in 3GPP TS 25.331 [23c].*/
3847
0
  rrc_irat_ho_info_tvb = tvb_new_subset_length(tvb, curr_offset, len);
3848
0
  if (rrc_irat_ho_info_handle)
3849
0
    call_dissector(rrc_irat_ho_info_handle, rrc_irat_ho_info_tvb, pinfo, tree);
3850
0
  else
3851
0
    proto_tree_add_expert_format(tree, pinfo, &ei_gsm_a_gm_undecoded, tvb, curr_offset, len, "INTER RAT HANDOVER INFO - Not decoded");
3852
3853
0
  return len;
3854
3855
0
}
3856
3857
/* [7] 10.5.5.25 Requested MS information */
3858
static const true_false_string gsm_a_gm_req_ms_info_irat_vals = {
3859
  "Inter RAT information container IE requested",
3860
  "Inter RAT information container IE not requested"
3861
};
3862
static const true_false_string gsm_a_gm_req_ms_info_irat2_vals = {
3863
  "E-UTRAN inter RAT information container IE requested",
3864
  "E-UTRAN inter RAT information container IE not requested"
3865
};
3866
3867
static uint16_t
3868
de_gmm_req_ms_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
3869
4
{
3870
4
  uint32_t  curr_offset;
3871
4
  uint32_t bit_offset;
3872
3873
4
  curr_offset = offset;
3874
4
  bit_offset  = (curr_offset<<3)+4;
3875
3876
4
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_req_ms_info_irat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3877
4
  bit_offset++;
3878
4
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_req_ms_info_irat2, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3879
4
  bit_offset++;
3880
4
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
3881
  /*bit_offset += 2;
3882
  curr_offset++;*/
3883
3884
4
  return len;
3885
4
}
3886
3887
/* [7] 10.5.5.26 UE network capability
3888
 * See subclause 9.9.3.x in 3GPP TS 24.301 [120].
3889
 */
3890
3891
/* [7] 10.5.5.27 E-UTRAN inter RAT information container */
3892
static uint16_t
3893
de_gmm_eutran_irat_info_container(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
3894
0
{
3895
0
  uint32_t  curr_offset;
3896
0
  tvbuff_t *lte_rrc_ue_eutra_cap_tvb;
3897
3898
0
  curr_offset = offset;
3899
3900
/* The value part of the E-UTRAN inter RAT information container information element
3901
   is formatted and coded according to the UE-EUTRA-Capability IE defined in 3GPP TS 36.331 [129]*/
3902
0
  lte_rrc_ue_eutra_cap_tvb = tvb_new_subset_length(tvb, curr_offset, len);
3903
0
  if (lte_rrc_ue_eutra_cap_handle)
3904
0
    call_dissector(lte_rrc_ue_eutra_cap_handle, lte_rrc_ue_eutra_cap_tvb, pinfo, tree);
3905
0
  else
3906
0
    proto_tree_add_expert_format(tree, pinfo, &ei_gsm_a_gm_undecoded, tvb, curr_offset, len, "E-UTRAN Inter RAT information container - Not decoded");
3907
3908
0
  return len;
3909
0
}
3910
3911
/* [7] 10.5.5.28 Voice domain preference and UE's usage setting */
3912
static const true_false_string gsm_a_gm_ue_usage_setting_vals = {
3913
  "Data centric",
3914
  "Voice centric"
3915
};
3916
static const value_string gsm_a_gm_voice_domain_pref_for_eutran_vals[] = {
3917
  {0x0, "CS Voice only"},
3918
  {0x1, "IMS PS Voice only"},
3919
  {0x2, "CS voice preferred, IMS PS Voice as secondary"},
3920
  {0x3, "IMS PS voice preferred, CS Voice as secondary"},
3921
  {  0, NULL }
3922
};
3923
3924
uint16_t
3925
de_gmm_voice_domain_pref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
3926
4
{
3927
4
  uint32_t  curr_offset;
3928
4
  uint32_t bit_offset;
3929
3930
4
  curr_offset = offset;
3931
4
  bit_offset  = curr_offset<<3;
3932
3933
4
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
3934
4
  bit_offset += 5;
3935
4
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_ue_usage_setting, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3936
4
  bit_offset++;
3937
4
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_voice_domain_pref_for_eutran, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
3938
  /*bit_offset += 2;
3939
  curr_offset++;*/
3940
3941
4
  return len;
3942
4
}
3943
3944
/* [10] 10.5.5.29 P-TMSI type */
3945
static const true_false_string gsm_a_gm_ptmsi_type_value = {
3946
  "Mapped P-TMSI",
3947
  "Native P-TMSI"
3948
};
3949
3950
static uint16_t
3951
de_gmm_ptmsi_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_)
3952
20
{
3953
20
  uint32_t curr_offset, bit_offset;
3954
3955
20
  curr_offset = offset;
3956
20
  bit_offset  = (curr_offset<<3)+4;
3957
3958
20
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
3959
20
  bit_offset += 3;
3960
20
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_ptmsi_type, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
3961
20
  curr_offset++;
3962
3963
20
  return (curr_offset - offset);
3964
20
}
3965
3966
/* [10] 10.5.5.30 Location Area Identification 2 */
3967
static uint16_t
3968
de_gmm_lai_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string, int string_len)
3969
2
{
3970
  /* The Location Area Identification 2 value is coded as octet 2 to 6 of the */
3971
  /* Location Area Identification information element */
3972
2
  return de_lai(tvb, tree, pinfo, offset, len, add_string, string_len);
3973
2
}
3974
3975
/* [11] 10.5.5.31 Network resource identifier container */
3976
static uint16_t
3977
de_gmm_net_res_id_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
3978
5
{
3979
5
  uint32_t  curr_offset;
3980
5
  uint32_t bit_offset;
3981
3982
5
  curr_offset = offset;
3983
5
  bit_offset  = curr_offset<<3;
3984
3985
5
  proto_tree_add_item(tree, hf_gsm_a_gm_nri_cont, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
3986
5
  bit_offset += 10;
3987
5
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
3988
3989
5
  return len;
3990
5
}
3991
3992
/* [13] 10.5.5.32 Extended DRX parameters */
3993
static const value_string gsm_a_gm_paging_time_window_vals[] = {
3994
  {0x0, "Iu: 0 s / WB-S1/WB-N1: 1.28 s / NB-S1/NB-N1: 2.56 s"},
3995
  {0x1, "Iu: 1 s / WB-S1/WB-N1: 2.56 s / NB-S1/NB-N1: 5.12 s"},
3996
  {0x2, "Iu: 2 s / WB-S1/WB-N1: 3.84 s / NB-S1/NB-N1: 7.68 s"},
3997
  {0x3, "Iu: 3 s / WB-S1/WB-N1: 5.12 s / NB-S1/NB-N1: 10.24 s"},
3998
  {0x4, "Iu: 4 s / WB-S1/WB-N1: 6.4 s / NB-S1/NB-N1: 12.8 s"},
3999
  {0x5, "Iu: 5 s / WB-S1/WB-N1: 7.68 s / NB-S1/NB-N1: 15.36 s"},
4000
  {0x6, "Iu: 6 s / WB-S1/WB-N1: 8.96 s / NB-S1/NB-N1: 17.92 s"},
4001
  {0x7, "Iu: 7 s / WB-S1/WB-N1: 10.24 s / NB-S1/NB-N1: 20.48 s"},
4002
  {0x8, "Iu: 8 s / WB-S1/WB-N1: 11.52 s / NB-S1/NB-N1: 23.04 s"},
4003
  {0x9, "Iu: 9 s / WB-S1/WB-N1: 12.8 s / NB-S1/NB-N1: 25.6 s"},
4004
  {0xa, "Iu: 10 s / WB-S1/WB-N1: 14.08 s / NB-S1/NB-N1: 28.16 s"},
4005
  {0xb, "Iu: 12 s / WB-S1/WB-N1: 15.36 s / NB-S1/NB-N1: 30.72 s"},
4006
  {0xc, "Iu: 14 s / WB-S1/WB-N1: 16.64 s / NB-S1/NB-N1: 33.28 s"},
4007
  {0xd, "Iu: 16 s / WB-S1/WB-N1: 17.92 s / NB-S1/NB-N1: 35.84 s"},
4008
  {0xe, "Iu: 18 s / WB-S1/WB-N1: 19.2 s / NB-S1/NB-N1: 38.4 s"},
4009
  {0xf, "Iu: 20 s / WB-S1/WB-N1: 20.48 s / NB-S1/NB-N1: 40.96 s"},
4010
  {  0, NULL }
4011
};
4012
4013
static const value_string gsm_a_gm_edrx_vals[] = {
4014
  {0x0, "GERAN: 1.88 s / UTRAN: 10.24 s / S1,NB-N1,WB-N1: 5.12 s / NR-5GCN: 2.56 s"},
4015
  {0x1, "GERAN: 3.76 s / UTRAN: 20.48 s / S1,NB-N1,WB-N1: 10.24 s / NR-5GCN: 5.12 s"},
4016
  {0x2, "GERAN: 7.53 s / UTRAN: 40.96 s / S1,NB-N1,WB-N1: 20.48 s / NR-5GCN: 10.24 s"},
4017
  {0x3, "GERAN: 12.24 s / UTRAN: 81.92 s / S1,NB-N1,WB-N1: 40.96 s / NR-5GCN: 20,48 s"},
4018
  {0x4, "GERAN: 24.48 s / UTRAN: 163.84 s / S1,NB-N1,WB-N1: 61.44 s / NR-5GCN: 40.96 s"},
4019
  {0x5, "GERAN: 48.96 s / UTRAN: 327.68 s / S1,NB-N1,WB-N1: 81.92 s / NR-5GCN: 81.92 s"},
4020
  {0x6, "GERAN: 97.92 s / UTRAN: 655.36 s / S1,NB-N1,WB-N1: 102.4 s / NR-5GCN: 163.84 s"},
4021
  {0x7, "GERAN: 195.84 s / UTRAN: 1310.72 s / S1,NB-N1,WB-N1: 122.88 s / NR-5GCN: 327.68 s"},
4022
  {0x8, "GERAN: 391.68 s / UTRAN: 1966.08 s / S1,NB-N1,WB-N1: 143.36 s / NR-5GCN: 655.36 s"},
4023
  {0x9, "GERAN: 783.36 s / UTRAN: 2621.44 s / S1,NB-N1,WB-N1: 163.84 s / NR-5GCN: 1310.72 s"},
4024
  {0xa, "GERAN: 1566.72 s / UTRAN: 10.24 s / S1,NB-N1,WB-N1: 327.68 s / NR-5GCN: 2621.44 s"},
4025
  {0xb, "GERAN: 3133.44 s / UTRAN: 10.24 s / S1,NB-N1,WB-N1: 655.36 s / NR-5GCN: 5242.88 s"},
4026
  {0xc, "GERAN: 1.88 s / UTRAN: 10.24 s / S1,NB-N1,WB-N1: 1310.72 s / NR-5GCN: 10485.76 s"},
4027
  {0xd, "GERAN: 1.88 s / UTRAN: 10.24 s / S1,NB-N1,WB-N1: 2621.44 s / NR-5GCN: 2.56 s"},
4028
  {0xe, "GERAN: 1.88 s / UTRAN: 10.24 s / S1,NB-N1,WB-N1: 5242.88 s / NR-5GCN: 2.56 s"},
4029
  {0xf, "GERAN: 1.88 s / UTRAN: 10.24 s / S1,NB-N1,WB-N1: 10485.76 s / NR-5GCN: 2.56 s"},
4030
  {  0, NULL }
4031
};
4032
4033
static const value_string gsm_a_gm_paging_time_window_nr_5gcn_vals[] = {
4034
  {0x00,  "NR-5GCN: 1.28 s"},
4035
  {0x01,  "NR-5GCN: 2.56 s"},
4036
  {0x02,  "NR-5GCN: 3.84 s"},
4037
  {0x03,  "NR-5GCN: 5.12 s"},
4038
  {0x04,  "NR-5GCN: 6.4 s"},
4039
  {0x05,  "NR-5GCN: 7.68 s"},
4040
  {0x06,  "NR-5GCN: 8.96 s"},
4041
  {0x07,  "NR-5GCN: 10.24 s"},
4042
  {0x08,  "NR-5GCN: 11.52 s"},
4043
  {0x09,  "NR-5GCN: 12.8 s"},
4044
  {0x0a,  "NR-5GCN: 14.08 s"},
4045
  {0x0b,  "NR-5GCN: 15.36 s"},
4046
  {0x0c,  "NR-5GCN: 16.64 s"},
4047
  {0x0d,  "NR-5GCN: 17.92 s"},
4048
  {0x0e,  "NR-5GCN: 19.2 s"},
4049
  {0x0f,  "NR-5GCN: 20.48 s"},
4050
  {0x10,  "NR-5GCN: 21.76 s"},
4051
  {0x11,  "NR-5GCN: 23.04 s"},
4052
  {0x12,  "NR-5GCN: 24.32 s"},
4053
  {0x13,  "NR-5GCN: 25.6 s"},
4054
  {0x14,  "NR-5GCN: 26.88 s"},
4055
  {0x15,  "NR-5GCN: 28.16 s"},
4056
  {0x16,  "NR-5GCN: 29.44 s"},
4057
  {0x17,  "NR-5GCN: 30.72 s"},
4058
  {0x18,  "NR-5GCN: 32 s"},
4059
  {0x19,  "NR-5GCN: 33.28 s"},
4060
  {0x1a,  "NR-5GCN: 34.56 s"},
4061
  {0x1b,  "NR-5GCN: 35.84 s"},
4062
  {0x1c,  "NR-5GCN: 37.12 s"},
4063
  {0x1d,  "NR-5GCN: 38.4 s"},
4064
  {0x1e,  "NR-5GCN: 39.68 s"},
4065
  {0x1f,  "NR-5GCN: 40.96 s"},
4066
  {  0, NULL }
4067
};
4068
4069
static uint16_t
4070
de_gmm_ext_drx_params(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4071
4
{
4072
4
  uint32_t  curr_offset;
4073
4074
4
  curr_offset = offset;
4075
4076
4
  proto_tree_add_item(tree, hf_gsm_a_gm_paging_time_window, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4077
4
  proto_tree_add_item(tree, hf_gsm_a_gm_edrx_value, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4078
4
  curr_offset++;
4079
4080
4
  if ((curr_offset - offset) >= len)
4081
0
    return len;
4082
4083
4
  proto_tree_add_item(tree, hf_gsm_a_gm_ext_paging_time_window, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4084
4085
4
  return len;
4086
4
}
4087
4088
/* [13] 10.5.5.33 Message authentication code */
4089
static uint16_t
4090
de_gmm_mac(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4091
0
{
4092
0
  proto_tree_add_item(tree, hf_gsm_a_gm_mac, tvb, offset, 4, ENC_BIG_ENDIAN);
4093
4094
0
  return len;
4095
0
}
4096
4097
/* [13] 10.5.5.34 User Plane integrity indicator */
4098
static const true_false_string gsm_a_gm_up_integ_ind_value = {
4099
  "MS shall enable integrity protection of user plane data in LLC layer",
4100
  "MS shall disable integrity protection of user plane data in LLC layer"
4101
};
4102
4103
static uint16_t
4104
de_gmm_up_integ_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_)
4105
4
{
4106
4
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 3, ENC_BIG_ENDIAN);
4107
4
  proto_tree_add_item(tree, hf_gsm_a_gm_up_integ_ind, tvb, offset, 1, ENC_BIG_ENDIAN);
4108
4109
  /* no length check possible */
4110
4
  return 1;
4111
4
}
4112
4113
/* [14] 10.5.5.35 DCN-ID */
4114
static uint16_t
4115
de_gmm_dcn_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_)
4116
1
{
4117
1
  proto_tree_add_item(tree, hf_gsm_a_gm_dcn_id, tvb, offset, 2, ENC_BIG_ENDIAN);
4118
4119
1
  return 2;
4120
1
}
4121
4122
/* [14] 10.5.5.36 PLMN identity of the CN operator */
4123
static uint16_t
4124
de_gmm_plmn_id_cn_operator(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4125
1
{
4126
1
  dissect_e212_mcc_mnc(tvb, pinfo, tree, offset, E212_NONE, true);
4127
4128
1
  return 3;
4129
1
}
4130
4131
/* [14] 10.5.5.37 Non-3GPP NW provided policies */
4132
static const true_false_string gsm_a_gm_n3en_ind_value = {
4133
  "Use of non-3GPP emergency numbers permitted",
4134
  "Use of non-3GPP emergency numbers not permitted"
4135
};
4136
4137
static uint16_t
4138
de_gmm_non_3gpp_nw_prov_pol(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4139
3
{
4140
3
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 3, ENC_BIG_ENDIAN);
4141
3
  proto_tree_add_item(tree, hf_gsm_a_gm_n3en_ind, tvb, offset, 1, ENC_BIG_ENDIAN);
4142
4143
  /* no length check possible */
4144
3
  return 1;
4145
3
}
4146
4147
/*
4148
 * [7] 10.5.7.1
4149
 */
4150
static uint16_t
4151
de_gc_context_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4152
10
{
4153
10
  uint8_t     oct;
4154
10
  uint16_t    pdp_nr;
4155
10
  uint32_t    curr_offset;
4156
4157
10
  curr_offset = offset;
4158
4159
10
  oct = tvb_get_uint8(tvb, curr_offset);
4160
4161
170
  for (pdp_nr=0; pdp_nr<16; pdp_nr++)
4162
160
  {
4163
160
    if (pdp_nr == 8)
4164
10
    {
4165
10
      curr_offset++;
4166
10
      oct = tvb_get_uint8(tvb, curr_offset);
4167
10
    }
4168
160
    proto_tree_add_uint_format(tree, hf_gsm_a_gm_nsapi, tvb, curr_offset, 1, oct&1, "NSAPI %d: %s (%u)", pdp_nr, pdp_str[oct&1], oct&1);
4169
160
    oct>>=1;
4170
160
  }
4171
4172
10
  curr_offset++;
4173
4174
10
  EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
4175
4176
10
  return (curr_offset - offset);
4177
10
}
4178
4179
/*
4180
 * [7] 10.5.7.2
4181
 */
4182
static const value_string gsm_a_gm_radio_prio_vals[] = {
4183
  {0,  "priority level 4 (lowest)" },
4184
  {1,  "priority level 1 (highest)"},
4185
  {2,  "priority level 2"},
4186
  {3,  "priority level 3"},
4187
  {4,  "priority level 4 (lowest)"},
4188
  {5,  "priority level 4 (lowest)"},
4189
  {6,  "priority level 4 (lowest)"},
4190
  {7,  "priority level 4 (lowest)"},
4191
  {0, NULL}
4192
};
4193
4194
static uint16_t
4195
de_gc_radio_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_)
4196
162
{
4197
162
  uint32_t     curr_offset = offset;
4198
4199
162
  proto_tree_add_item(tree, hf_gsm_a_gm_radio_priority_pdp, tvb, curr_offset, 1, ENC_NA);
4200
4201
162
  curr_offset++;
4202
4203
162
  return (curr_offset - offset);
4204
162
}
4205
4206
/*
4207
 * [9] 10.5.7.3 GPRS Timer
4208
 */
4209
static const value_string gsm_a_gm_gprs_timer_unit_vals[] = {
4210
  { 0x00, "value is incremented in multiples of 2 seconds" },
4211
  { 0x01, "value is incremented in multiples of 1 minute" },
4212
  { 0x02, "value is incremented in multiples of decihours" },
4213
  { 0x07, "value indicates that the timer is deactivated" },
4214
  { 0, NULL }
4215
};
4216
4217
uint16_t
4218
de_gc_timer(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4219
60
{
4220
60
  uint8_t      oct;
4221
60
  uint16_t     val;
4222
60
  const char *str;
4223
60
  proto_item  *item = NULL;
4224
60
  proto_tree  *subtree;
4225
4226
60
  oct = tvb_get_uint8(tvb, offset);
4227
60
  val = oct&0x1f;
4228
4229
60
  switch (oct>>5)
4230
60
  {
4231
40
    case 0:
4232
40
      str = "sec";
4233
40
      val *= 2;
4234
40
      break;
4235
3
    case 1:
4236
3
      str = "min";
4237
3
      break;
4238
2
    case 2:
4239
2
      str = "min";
4240
2
      val *= 6;
4241
2
      break;
4242
3
    case 7:
4243
3
      str = "";
4244
3
      item = proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_gprs_timer, tvb, offset, 1, val, "timer is deactivated");
4245
3
      break;
4246
12
    default:
4247
12
      str = "min";
4248
12
      break;
4249
60
  }
4250
4251
60
  if (item == NULL) {
4252
57
    item = proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_gprs_timer, tvb, offset, 1, val, "%u %s", val, str);
4253
57
  }
4254
4255
60
  subtree = proto_item_add_subtree(item, ett_gmm_gprs_timer);
4256
60
  proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer_unit, tvb, offset, 1, ENC_BIG_ENDIAN);
4257
60
  proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer_value, tvb, offset, 1, ENC_BIG_ENDIAN);
4258
4259
  /* no length check possible */
4260
60
  return 1;
4261
60
}
4262
4263
/*
4264
 * [7] 10.5.7.4
4265
 */
4266
static uint16_t
4267
de_gc_timer2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string, int string_len _U_)
4268
13
{
4269
13
  uint8_t      oct;
4270
13
  uint16_t     val;
4271
13
  uint32_t     curr_offset;
4272
13
  const char *str = NULL;
4273
13
  proto_tree  *subtree;
4274
13
  proto_item  *item = NULL;
4275
4276
13
  curr_offset = offset;
4277
4278
13
  oct = tvb_get_uint8(tvb, curr_offset);
4279
4280
13
  val = oct&0x1f;
4281
4282
13
  switch (oct>>5)
4283
13
  {
4284
4
    case 0:
4285
4
      str = "sec";
4286
4
      val *= 2;
4287
4
      break;
4288
0
    case 1:
4289
0
      str = "min";
4290
0
      break;
4291
1
    case 2:
4292
1
      str = "min";
4293
1
      val *= 6;
4294
1
      break;
4295
1
    case 7:
4296
1
      item = proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_gprs_timer2, tvb, curr_offset, 1, val, "timer is deactivated");
4297
1
      break;
4298
7
    default:
4299
7
      str = "min";
4300
7
      break;
4301
13
  }
4302
4303
13
  if (item == NULL) {
4304
12
    item = proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_gprs_timer2, tvb, curr_offset, 1, val, "%u %s %s", val, str, add_string ? add_string : "");
4305
12
  }
4306
4307
13
  subtree = proto_item_add_subtree(item, ett_gmm_gprs_timer);
4308
13
  proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer2_unit, tvb, offset, 1, ENC_BIG_ENDIAN);
4309
13
  proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer2_value, tvb, offset, 1, ENC_BIG_ENDIAN);
4310
13
  curr_offset++;
4311
4312
13
  return (curr_offset - offset);
4313
13
}
4314
4315
/*
4316
 * [10] 10.5.7.4a
4317
 */
4318
static const value_string gsm_a_gm_gprs_timer3_unit_vals[] = {
4319
  { 0x00, "value is incremented in multiples of 10 minutes" },
4320
  { 0x01, "value is incremented in multiples of 1 hour" },
4321
  { 0x02, "value is incremented in multiples of 10 hours" },
4322
  { 0x03, "value is incremented in multiples of 2 seconds" },
4323
  { 0x04, "value is incremented in multiples of 30 seconds" },
4324
  { 0x05, "value is incremented in multiples of 1 minute" },
4325
  { 0x06, "value is incremented in multiples of 320 hours (for T3312/T3412 extended), 1 hour otherwise" },
4326
  { 0x07, "value indicates that the timer is deactivated" },
4327
  { 0, NULL }
4328
};
4329
4330
uint16_t
4331
de_gc_timer3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4332
12
{
4333
12
  uint8_t      oct;
4334
12
  uint16_t     val;
4335
12
  uint32_t     curr_offset;
4336
12
  const char *str = NULL;
4337
12
  proto_tree  *subtree;
4338
12
  proto_item  *item = NULL;
4339
4340
12
  curr_offset = offset;
4341
4342
12
  oct = tvb_get_uint8(tvb, curr_offset);
4343
4344
12
  val = oct&0x1f;
4345
4346
12
  switch (oct>>5)
4347
12
  {
4348
2
    case 0:
4349
2
      str = "min";
4350
2
      val *= 10;
4351
2
      break;
4352
3
    case 1:
4353
3
      if (val == 1) {
4354
0
        str = "hour";
4355
3
      } else {
4356
3
        str = "hours";
4357
3
      }
4358
3
      break;
4359
0
    case 2:
4360
0
      str = "hours";
4361
0
      val *= 10;
4362
0
      break;
4363
0
    case 3:
4364
0
      str = "sec";
4365
0
      val *= 2;
4366
0
      break;
4367
1
    case 4:
4368
1
      str = "sec";
4369
1
      val *= 30;
4370
1
      break;
4371
2
    case 5:
4372
2
      str = "min";
4373
2
      break;
4374
2
    case 6:
4375
2
      str = "hours";
4376
2
      val *= 320;
4377
2
      break;
4378
2
    case 7:
4379
2
      item = proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_gprs_timer3, tvb, curr_offset, 1, val, "timer is deactivated");
4380
2
      break;
4381
12
  }
4382
4383
12
  if (item == NULL) {
4384
10
    item = proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_gprs_timer3, tvb, curr_offset, 1, val, "%u %s", val, str);
4385
10
  }
4386
4387
12
  subtree = proto_item_add_subtree(item, ett_gmm_gprs_timer);
4388
12
  proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer3_unit, tvb, offset, 1, ENC_BIG_ENDIAN);
4389
12
  proto_tree_add_item(subtree, hf_gsm_a_gm_gprs_timer3_value, tvb, offset, 1, ENC_BIG_ENDIAN);
4390
12
  curr_offset++;
4391
4392
12
  return (curr_offset - offset);
4393
12
}
4394
4395
/*
4396
 * [7] 10.5.7.5
4397
 */
4398
static uint16_t
4399
de_gc_radio_prio2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4400
38
{
4401
38
  uint32_t     curr_offset = offset;
4402
4403
  /* IMPORTANT - IT'S ASSUMED THAT THE INFORMATION IS IN THE HIGHER NIBBLE */
4404
38
  proto_tree_add_item(tree, hf_gsm_a_gm_radio_priority_tom8, tvb, curr_offset, 1, ENC_NA);
4405
4406
38
  curr_offset++;
4407
4408
38
  return (curr_offset - offset);
4409
38
}
4410
4411
/*
4412
 * [8] 10.5.7.6 MBMS context status
4413
 */
4414
static uint16_t
4415
de_gc_mbms_context_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4416
10
{
4417
10
  uint32_t    curr_offset;
4418
10
  unsigned    i;
4419
10
  uint8_t     oct, j;
4420
4421
10
  curr_offset = offset;
4422
4423
375
  for (i=0; i<len; i++)
4424
365
  {
4425
365
    oct = tvb_get_uint8(tvb, curr_offset);
4426
4427
3.22k
    for (j=0; j<8; j++)
4428
2.86k
    {
4429
2.86k
      proto_tree_add_uint_format(tree, hf_gsm_a_gm_nsapi, tvb, curr_offset, 1, oct&1, "NSAPI %d: %s (%u)", 128+i*8+j, pdp_str[oct&1], oct&1);
4430
2.86k
      oct>>=1;
4431
2.86k
    }
4432
365
    curr_offset++;
4433
365
  }
4434
4435
10
  return (len);
4436
10
}
4437
4438
/*
4439
 * [8] 10.5.7.7 Uplink data status
4440
 */
4441
static const true_false_string gsm_a_gm_nsapi_ul_stat_vals = {
4442
  "uplink data are pending for the preserved PDP context",
4443
  "no uplink data are pending for the preserved PDP context or the PDP context is PDP-INACTIVE or is PDP-ACTIVE with a RAB already established"
4444
};
4445
4446
static uint16_t
4447
de_gc_uplink_data_stat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4448
0
{
4449
0
  uint32_t  curr_offset;
4450
0
  uint32_t bit_offset;
4451
4452
0
  curr_offset = offset;
4453
0
  bit_offset  = curr_offset<<3;
4454
4455
0
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_7_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4456
0
  bit_offset++;
4457
0
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_6_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4458
0
  bit_offset++;
4459
0
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_5_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4460
0
  bit_offset++;
4461
0
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
4462
0
  bit_offset += 5;
4463
0
  curr_offset++;
4464
0
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_15_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4465
0
  bit_offset++;
4466
0
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_14_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4467
0
  bit_offset++;
4468
0
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_13_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4469
0
  bit_offset++;
4470
0
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_12_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4471
0
  bit_offset++;
4472
0
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_11_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4473
0
  bit_offset++;
4474
0
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_10_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4475
0
  bit_offset++;
4476
0
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_9_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4477
0
  bit_offset++;
4478
0
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_nsapi_8_ul_stat, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4479
/*
4480
  bit_offset++;
4481
  curr_offset++;
4482
*/
4483
0
  return (len);
4484
0
}
4485
4486
/*
4487
 * [8] 10.5.7.8 Device properties
4488
 */
4489
static const true_false_string gsm_a_gm_device_prop_low_prio_value = {
4490
  "MS is configured for NAS signalling low priority",
4491
  "MS is not configured for NAS signalling low priority"
4492
};
4493
4494
static uint16_t
4495
de_gc_device_properties(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
4496
22
{
4497
22
  uint32_t  curr_offset;
4498
22
  uint32_t bit_offset;
4499
4500
22
  curr_offset = offset;
4501
22
  bit_offset  = (curr_offset<<3)+4;
4502
4503
22
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
4504
22
  bit_offset += 3;
4505
22
  proto_tree_add_bits_item(tree, hf_gsm_a_gm_device_prop_low_prio, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
4506
22
  curr_offset++;
4507
4508
22
  return (curr_offset - offset);
4509
22
}
4510
4511
/*
4512
 * [7] 10.5.6.1
4513
 */
4514
uint16_t
4515
de_sm_apn(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4516
22
{
4517
22
  uint32_t    curr_offset;
4518
4519
22
  curr_offset = offset;
4520
4521
22
  proto_tree_add_item(tree, hf_gsm_a_gm_apn, tvb, curr_offset, len, ENC_APN_STR);
4522
22
  curr_offset += len;
4523
4524
22
  EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
4525
4526
22
  return (curr_offset - offset);
4527
22
}
4528
4529
/*
4530
 * [7] 10.5.6.2
4531
 */
4532
static uint16_t
4533
de_sm_nsapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string, int string_len _U_)
4534
27
{
4535
27
  uint8_t oct;
4536
27
  uint32_t  curr_offset;
4537
4538
27
  curr_offset = offset;
4539
4540
27
  oct = tvb_get_uint8(tvb, curr_offset);
4541
4542
27
  proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_nsapi, tvb, curr_offset, 1, oct&0x0f, "0x%02x (%u) %s", oct&0x0f, oct&0x0f, add_string ? add_string : "");
4543
4544
27
  curr_offset++;
4545
4546
27
  return (curr_offset - offset);
4547
27
}
4548
4549
/*
4550
 * [7] 10.5.6.3 Protocol configuration options
4551
 */
4552
static const range_string gsm_a_sm_pco_ms2net_prot_vals[] = {
4553
  { 0x0001, 0x0001, "P-CSCF IPv6 Address Request" },
4554
  { 0x0002, 0x0002, "IM CN Subsystem Signaling Flag" },
4555
  { 0x0003, 0x0003, "DNS Server IPv6 Address Request" },
4556
  { 0x0004, 0x0004, "Not Supported" },
4557
  { 0x0005, 0x0005, "MS Support of Network Requested Bearer Control indicator" },
4558
  { 0x0006, 0x0006, "Reserved" },
4559
  { 0x0007, 0x0007, "DSMIPv6 Home Agent Address Request" },
4560
  { 0x0008, 0x0008, "DSMIPv6 Home Network Prefix Request" },
4561
  { 0x0009, 0x0009, "DSMIPv6 IPv4 Home Agent Address Request" },
4562
  { 0x000a, 0x000a, "IP address allocation via NAS signalling" },
4563
  { 0x000b, 0x000b, "IPv4 address allocation via DHCPv4" },
4564
  { 0x000c, 0x000c, "P-CSCF IPv4 Address Request" },
4565
  { 0x000d, 0x000d, "DNS Server IPv4 Address Request" },
4566
  { 0x000e, 0x000e, "MSISDN Request" },
4567
  { 0x000f, 0x000f, "IFOM-Support-Request" },
4568
  { 0x0010, 0x0010, "IPv4 Link MTU Request" },
4569
  { 0x0011, 0x0011, "MS support of Local address in TFT indicator" },
4570
  { 0x0012, 0x0012, "P-CSCF Re-selection support" },
4571
  { 0x0013, 0x0013, "NBIFOM request indicator" },
4572
  { 0x0014, 0x0014, "NBIFOM mode" },
4573
  { 0x0015, 0x0015, "Non-IP Link MTU Request" },
4574
  { 0x0016, 0x0016, "APN rate control support indicator" },
4575
  { 0x0017, 0x0017, "3GPP PS data off UE status" },
4576
  { 0x0018, 0x0018, "Reliable Data Service request indicator" },
4577
  { 0x0019, 0x0019, "Additional APN rate control for exception data support indicator" },
4578
  { 0x001a, 0x001a, "PDU session ID" },
4579
  { 0x001b, 0x001f, "Reserved" },
4580
  { 0x0020, 0x0020, "Ethernet Frame Payload MTU Request" },
4581
  { 0x0021, 0x0021, "Unstructured Link MTU Request" },
4582
  { 0x0022, 0x0022, "5GSM cause value" },
4583
  { 0x0023, 0x0023, "QoS rules with the length of two octets support indicator" },
4584
  { 0x0024, 0x0024, "QoS flow descriptions with the length of two octets support indicator" },
4585
  { 0x0027, 0x0027, "ACS information request" },
4586
  { 0x0030, 0x0030, "ATSSS request" },
4587
  { 0x0031, 0x0031, "DNS server security information indicator" },
4588
  { 0x0032, 0x0032, "ECS configuration information provisioning support indicator" },
4589
  { 0x0036, 0x0036, "PVS information request" },
4590
  { 0x0039, 0x0039, "DNS server security protocol support" },
4591
  { 0x003a, 0x003a, "EAS rediscovery support indication" },
4592
  { 0x0041, 0x0041, "Service-level-AA container with the length of two octets" },
4593
  { 0x0047, 0x0047, "EDC support indicator" },
4594
  { 0x004a, 0x004a, "MS support of MAC address range in 5GS indicator" },
4595
  { 0x0050, 0x0050, "SDNAEPC support indicator" },
4596
  { 0x0051, 0x0051, "SDNAEPC EAP message with the length of two octets" },
4597
  { 0x0052, 0x0052, "SDNAEPC DN-specific identity" },
4598
  { 0x0056, 0x0056, "UE policy container with the length of two octets" },
4599
  { 0x0057, 0x0057, "URSP provisioning in EPS support indicator" },
4600
  { 0xff00, 0xffff, "Operator Specific Use" },
4601
  { 0, 0, NULL }
4602
};
4603
static const range_string gsm_a_sm_pco_net2ms_prot_vals[] = {
4604
  { 0x0001, 0x0001, "P-CSCF IPv6 Address" },
4605
  { 0x0002, 0x0002, "IM CN Subsystem Signaling Flag" },
4606
  { 0x0003, 0x0003, "DNS Server IPv6 Address" },
4607
  { 0x0004, 0x0004, "Policy Control rejection code" },
4608
  { 0x0005, 0x0005, "Selected Bearer Control Mode" },
4609
  { 0x0006, 0x0006, "Reserved" },
4610
  { 0x0007, 0x0007, "DSMIPv6 Home Agent Address" },
4611
  { 0x0008, 0x0008, "DSMIPv6 Home Network Prefix" },
4612
  { 0x0009, 0x0009, "DSMIPv6 IPv4 Home Agent Address" },
4613
  { 0x000a, 0x000a, "Reserved" },
4614
  { 0x000b, 0x000b, "Reserved" },
4615
  { 0x000c, 0x000c, "P-CSCF IPv4 Address" },
4616
  { 0x000d, 0x000d, "DNS Server IPv4 Address" },
4617
  { 0x000e, 0x000e, "MSISDN" },
4618
  { 0x000f, 0x000f, "IFOM-Support" },
4619
  { 0x0010, 0x0010, "IPv4 Link MTU" },
4620
  { 0x0011, 0x0011, "Network support of Local address in TFT indicator" },
4621
  { 0x0012, 0x0012, "Reserved" },
4622
  { 0x0013, 0x0013, "NBIFOM accepted indicator" },
4623
  { 0x0014, 0x0014, "NBIFOM mode" },
4624
  { 0x0015, 0x0015, "Non-IP Link MTU" },
4625
  { 0x0016, 0x0016, "APN rate control parameters" },
4626
  { 0x0017, 0x0017, "3GPP PS data off support indication" },
4627
  { 0x0018, 0x0018, "Reliable Data Service accepted indicator" },
4628
  { 0x0019, 0x0019, "Additional APN rate control for exception data parameters" },
4629
  { 0x001a, 0x001a, "Reserved" },
4630
  { 0x001b, 0x001b, "S-NSSAI" },
4631
  { 0x001c, 0x001c, "QoS rules" },
4632
  { 0x001d, 0x001d, "Session-AMBR" },
4633
  { 0x001e, 0x001e, "PDU session address lifetime" },
4634
  { 0x001f, 0x001f, "QoS flow descriptions" },
4635
  { 0x0020, 0x0020, "Ethernet Frame Payload MTU" },
4636
  { 0x0021, 0x0021, "Unstructured Link MTU" },
4637
  { 0x0022, 0x0022, "Reserved" },
4638
  { 0x0023, 0x0023, "QoS rules with the length of two octets" },
4639
  { 0x0024, 0x0024, "QoS flow descriptions with the length of two octets" },
4640
  { 0x0025, 0x0025, "Small data rate control parameters" },
4641
  { 0x0026, 0x0026, "Additional small data rate control for exception data parameters" },
4642
  { 0x0027, 0x0027, "ACS information" },
4643
  { 0x0028, 0x0028, "Initial small data rate control parameters" },
4644
  { 0x0029, 0x0029, "Initial additional small data rate control for exception data parameters" },
4645
  { 0x002a, 0x002a, "Initial APN rate control parameters" },
4646
  { 0x002b, 0x002b, "Initial additional APN rate control for exception data parameters" },
4647
  { 0x0030, 0x0030, "ATSSS response with the length of two octets" },
4648
  { 0x0031, 0x0031, "DNS server security information with length of two octets" },
4649
  { 0x0032, 0x0032, "ECS address with the length of two octets" },
4650
  { 0x0035, 0x0035, "ECSP identifier" },
4651
  { 0x0036, 0x0036, "PVS IPv4 Address" },
4652
  { 0x0037, 0x0037, "PVS IPv6 Address" },
4653
  { 0x0038, 0x0038, "PVS name" },
4654
  { 0x003a, 0x003a, "EAS rediscovery indication without indicated impact" },
4655
  { 0x003b, 0x003b, "EAS rediscovery indication with impacted EAS IPv4 address range" },
4656
  { 0x003c, 0x003c, "EAS rediscovery indication with impacted EAS IPv6 address range" },
4657
  { 0x003d, 0x003d, "EAS rediscovery indication with impacted EAS FQDN" },
4658
  { 0x003e, 0x003e, "Uplink data not allowed" },
4659
  { 0x003f, 0x003f, "Uplink data allowed" },
4660
  { 0x0040, 0x0040, "UAS services not allowed indication" },
4661
  { 0x0041, 0x0041, "Service-level-AA container with the length of two octets" },
4662
  { 0x0048, 0x0048, "EDC usage allowed indicator" },
4663
  { 0x0049, 0x0049, "EDC usage required indicator" },
4664
  { 0x004a, 0x004a, "Network support of MAC address range in 5GS indicator" },
4665
  { 0x0051, 0x0051, "SDNAEPC EAP message with the length of two octets" },
4666
  { 0x0056, 0x0056, "UE policy container with the length of two octets" },
4667
  { 0x0057, 0x0057, "URSP provisioning in EPS support indicator" },
4668
  { 0xff00, 0xffff, "Operator Specific Use" },
4669
  { 0, 0, NULL }
4670
};
4671
4672
static const value_string gsm_a_gm_link_dir_vals[] = {
4673
  { -1, "Unknown" },
4674
  { 0x0, "MS to network" },
4675
  { 0x1, "Network to MS" },
4676
  { 0, NULL }
4677
};
4678
4679
static const value_string gsm_a_gm_sel_bearer_ctrl_mode_vals[] = {
4680
  { 1, "MS only" },
4681
  { 2, "MS/NW" },
4682
  { 0, NULL }
4683
};
4684
4685
static const value_string gsm_a_gm_nbifom_mode_vals[] = {
4686
  { 0, "UE-initiated" },
4687
  { 1, "Network-initiated" },
4688
  { 0, NULL }
4689
};
4690
4691
static const true_false_string gsm_a_gm_apn_rate_ctrl_params_aer_value = {
4692
  "Additional exception reports at maximum rate reached are allowed",
4693
  "Additional exception reports at maximum rate reached are not allowed"
4694
};
4695
4696
static const value_string gsm_a_gm_apn_rate_ctrl_ul_time_unit_vals[] = {
4697
  { 0, "Unrestricted" },
4698
  { 1, "Minute" },
4699
  { 2, "Hour" },
4700
  { 3, "Day" },
4701
  { 4, "Week" },
4702
  { 0, NULL }
4703
};
4704
4705
static const value_string gsm_a_gm_sm_pco_3gpp_data_off_ue_status_vals[] = {
4706
  { 1, "Deactivated"},
4707
  { 2, "Activated"},
4708
  { 0, NULL}
4709
};
4710
4711
static const value_string gsm_a_gm_sm_pco_dns_serv_sec_info_type_vals[] = {
4712
  { 0, "Security protocol type"},
4713
  { 1, "Port number"},
4714
  { 2, "Authentication domain name"},
4715
  { 3, "SPKI pin set"},
4716
  { 4, "Root certificate"},
4717
  { 5, "Raw public key"},
4718
  { 0, NULL}
4719
};
4720
4721
static const value_string gsm_a_gm_sm_pco_dns_serv_sec_info_sec_proto_vals[] = {
4722
  { 0, "TLS"},
4723
  { 1, "DTLS"},
4724
  { 0, NULL}
4725
};
4726
4727
static const value_string gsm_a_gm_sm_pco_ecs_addr_type_vals[] = {
4728
  { 0, "IPv4"},
4729
  { 1, "IPv6"},
4730
  { 2, "FQDN"},
4731
  { 0, NULL}
4732
};
4733
4734
static const value_string gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_type_vals[] = {
4735
  { 0, "No spatial validity condition"},
4736
  { 1, "Geographical service area"},
4737
  { 2, "Tracking area"},
4738
  { 3, "Country-wide"},
4739
  { 0, NULL}
4740
};
4741
4742
static const value_string gsm_a_gm_sm_pco_dns_serv_sec_prot_support_vals[] = {
4743
  { 1, "TLS"},
4744
  { 2, "DTLS"},
4745
  { 0, NULL}
4746
};
4747
4748
uint16_t
4749
de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
4750
624
{
4751
624
  proto_item        *generated_item;
4752
624
  uint32_t           curr_offset;
4753
624
  int                curr_len;
4754
624
  unsigned char      oct;
4755
624
  int                link_dir;
4756
624
  proto_item        *pco_item;
4757
624
  proto_tree        *pco_tree;
4758
4759
624
  curr_len    = (int)len; /* length field is only 1 or 2 bytes long */
4760
624
  curr_offset = offset;
4761
4762
624
  oct = tvb_get_uint8(tvb, curr_offset);
4763
4764
624
  link_dir = pinfo->link_dir;
4765
624
  generated_item = proto_tree_add_int(tree, hf_gsm_a_gm_link_dir, tvb, curr_offset, 0, link_dir);
4766
624
  proto_item_set_generated(generated_item);
4767
4768
4769
  /* 1 ext 0 0 0 0 Spare  Configuration protocol */
4770
624
  proto_tree_add_item(tree, hf_gsm_a_sm_ext, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4771
  /* Configuration protocol (octet 3)
4772
   * Bits
4773
   * 3 2 1
4774
   * 0 0 0 PPP for use with IP PDP type or IP PDN type (see 3GPP TS 24.301 [120])
4775
   *
4776
   * All other values are interpreted as PPP in this version of the protocol.
4777
   * (3GPP TS 24.008 version 9.4.0 Release 9)
4778
   */
4779
624
  proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_configuration_protocol, tvb, curr_offset, 1, oct&0x07, "PPP for use with IP PDP type or IP PDN type (%u)", oct&0x07);
4780
624
  curr_len--;
4781
624
  curr_offset++;
4782
4783
8.61k
  while (curr_len >= 3) /* 2 bytes protocol/container ID + 1 byte length */
4784
8.57k
  {
4785
8.57k
    uint32_t e_len;
4786
8.57k
    uint16_t prot;
4787
8.57k
    tvbuff_t *l3_tvb;
4788
4789
    /* Protocol ID 1                    octet 4
4790
     *                                  octet 5
4791
     * Length of protocol ID 1 contents octet 6
4792
     * Protocol ID 1 contents           octet 7
4793
     */
4794
4795
8.57k
    prot = tvb_get_ntohs(tvb, curr_offset);
4796
8.57k
    pco_item = proto_tree_add_uint_format_value(tree, hf_gsm_a_gm_pco_pid, tvb, curr_offset, 2, (uint32_t)prot,
4797
8.57k
        "%s (0x%04x)",
4798
8.57k
        link_dir ?
4799
7.34k
          rval_to_str_const((uint32_t)prot, gsm_a_sm_pco_net2ms_prot_vals, val_to_str_ext_const(prot, &ppp_vals_ext, "Unknown")) :
4800
8.57k
          rval_to_str_const((uint32_t)prot, gsm_a_sm_pco_ms2net_prot_vals, val_to_str_ext_const(prot, &ppp_vals_ext, "Unknown")),
4801
8.57k
        (uint32_t)prot);
4802
8.57k
    pco_tree = proto_item_add_subtree(pco_item, ett_sm_pco);
4803
4804
8.57k
    curr_len    -= 2;
4805
8.57k
    curr_offset += 2;
4806
8.57k
    if ((link_dir == P2P_DIR_DL && (prot == 0x0023 || prot == 0x0024 || prot == 0x0030 || prot == 0x0031 ||
4807
4.67k
                                    prot == 0x0032 || prot == 0x0041 || prot == 0x0051 || prot == 0x0056)) ||
4808
8.57k
        (link_dir == P2P_DIR_UL && (prot == 0x0041 || prot == 0x0051 || prot == 0x0056))) {
4809
293
      proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_length2, tvb, curr_offset, 2, ENC_BIG_ENDIAN, &e_len);
4810
293
      curr_len    -= 2;
4811
293
      curr_offset += 2;
4812
8.28k
    } else {
4813
8.28k
      proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_length, tvb, curr_offset, 1, ENC_NA, &e_len);
4814
8.28k
      curr_len    -= 1;
4815
8.28k
      curr_offset += 1;
4816
8.28k
    }
4817
4818
8.57k
    switch (prot)
4819
8.57k
    {
4820
94
      case 0x0001:
4821
94
        if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
4822
8
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_pcscf_ipv6, tvb, curr_offset, 16, ENC_NA);
4823
8
        }
4824
94
        break;
4825
57
      case 0x0003:
4826
57
        if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
4827
8
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_ipv6, tvb, curr_offset, 16, ENC_NA);
4828
8
        }
4829
57
        break;
4830
15
      case 0x0007:
4831
15
        if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
4832
2
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dsmipv6_home_agent_ipv6, tvb, curr_offset, 16, ENC_NA);
4833
2
        }
4834
15
        break;
4835
48
      case 0x0002:
4836
69
      case 0x0006:
4837
74
      case 0x000A:
4838
77
      case 0x000B:
4839
91
      case 0x000F:
4840
93
      case 0x0011:
4841
96
      case 0x0012:
4842
105
      case 0x0013:
4843
108
      case 0x0018:
4844
111
      case 0x003e:
4845
122
      case 0x003f:
4846
127
      case 0x0040:
4847
131
      case 0x0047:
4848
135
      case 0x0048:
4849
137
      case 0x0049:
4850
145
      case 0x004a:
4851
148
      case 0x0050:
4852
148
        break;
4853
72
      case 0x0004:
4854
72
        if ((link_dir == P2P_DIR_DL) && (e_len == 1)) {
4855
0
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_reject_code, tvb, curr_offset, 1, ENC_NA);
4856
0
        }
4857
72
        break;
4858
21
      case 0x0005:
4859
21
        if ((link_dir == P2P_DIR_DL) && (e_len == 1)) {
4860
1
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_sel_bearer_ctrl_mode, tvb, curr_offset, 1, ENC_NA);
4861
1
        }
4862
21
        break;
4863
79
      case 0x0008:
4864
79
        if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
4865
8
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dsmipv6_home_network_ipv6, tvb, curr_offset, 16, ENC_NA);
4866
8
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dsmipv6_home_network_prefix_length, tvb, curr_offset+16, 1, ENC_NA);
4867
8
        }
4868
79
        break;
4869
23
      case 0x0009:
4870
23
        if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
4871
2
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dsmipv6_home_agent_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
4872
2
        }
4873
23
        break;
4874
9
      case 0x000C:
4875
9
        if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
4876
2
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_pcscf_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
4877
2
        }
4878
9
        break;
4879
12
      case 0x000D:
4880
12
        if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
4881
4
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_ipv4, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
4882
4
        }
4883
12
        break;
4884
47
      case 0x000E:
4885
47
        if ((link_dir == P2P_DIR_DL) && (e_len > 0)) {
4886
11
          dissect_e164_msisdn(tvb, pinfo, pco_tree, curr_offset, e_len, E164_ENC_BCD);
4887
11
        }
4888
47
        break;
4889
16
      case 0x0010:
4890
16
        if ((link_dir == P2P_DIR_DL) && (e_len == 2)) {
4891
1
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_ipv4_link_mtu_size, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
4892
1
        }
4893
16
        break;
4894
3
      case 0x0014:
4895
3
        if (e_len == 1) {
4896
0
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_nbifom_mode, tvb, curr_offset, 1, ENC_NA);
4897
0
        }
4898
3
        break;
4899
3
      case 0x0015:
4900
3
        if ((link_dir == P2P_DIR_DL) && (e_len == 2)) {
4901
0
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_non_ip_link_mtu_size, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
4902
0
        }
4903
3
        break;
4904
24
      case 0x0016:
4905
32
      case 0x0025:
4906
32
        if (link_dir == P2P_DIR_DL) {
4907
19
          proto_tree_add_bits_item(pco_tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 4, ENC_BIG_ENDIAN);
4908
19
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_aer, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4909
19
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_ul_time_unit, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4910
19
          if (e_len >= 4) {
4911
18
            proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_max_ul_rate, tvb, curr_offset+1, 3, ENC_BIG_ENDIAN);
4912
18
          }
4913
19
        }
4914
32
        break;
4915
5
      case 0x0017:
4916
5
        if (link_dir == P2P_DIR_UL && e_len >= 1) {
4917
2
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_3gpp_data_off_ue_status, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4918
2
        }
4919
5
        break;
4920
11
      case 0x0019:
4921
18
      case 0x0026:
4922
18
        if (link_dir == P2P_DIR_DL) {
4923
9
          proto_tree_add_bits_item(pco_tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 5, ENC_BIG_ENDIAN);
4924
9
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_add_apn_rate_ctrl_params_ul_time_unit, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4925
9
          if (e_len >= 3) {
4926
7
            proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_add_apn_rate_ctrl_params_max_ul_rate, tvb, curr_offset+1, 2, ENC_BIG_ENDIAN);
4927
7
          }
4928
9
        }
4929
18
        break;
4930
12
      case 0x001a:
4931
12
        if (link_dir == P2P_DIR_UL) {
4932
2
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_pdu_session_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4933
2
        }
4934
12
        break;
4935
10
      case 0x001b:
4936
10
        if (link_dir == P2P_DIR_DL && e_len >= 4) {
4937
3
          de_nas_5gs_cmn_s_nssai(tvb, pco_tree, pinfo, curr_offset, e_len - 3, NULL, 0);
4938
3
          dissect_e212_mcc_mnc(tvb, pinfo, pco_tree, curr_offset + e_len - 3, E212_NONE, true);
4939
3
        }
4940
10
        break;
4941
35
      case 0x001c:
4942
173
      case 0x0023:
4943
173
        if (link_dir == P2P_DIR_DL) {
4944
159
          de_nas_5gs_sm_qos_rules(tvb, pco_tree, pinfo, curr_offset, e_len, NULL, 0);
4945
159
        }
4946
173
        break;
4947
23
      case 0x001d:
4948
23
        if (link_dir == P2P_DIR_DL) {
4949
          /* Network to MS direction */
4950
12
          de_nas_5gs_sm_session_ambr(tvb, pco_tree, pinfo, curr_offset, e_len, NULL, 0);
4951
12
        }
4952
23
        break;
4953
6
      case 0x001e:
4954
6
        if (link_dir == P2P_DIR_DL && e_len == 2) {
4955
          /* When the container identifier indicates PDU session address lifetime,
4956
           * the length of container identifier contents indicates a length equal to two.
4957
           * The container identifier contents field contains the binary coded representation
4958
           * of how long the network is willing to maintain the PDU session in units of seconds.
4959
           * ...If the length of container identifier contents is different from two octets,
4960
           * then it shall be ignored by the receiver
4961
           */
4962
0
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_pdu_session_address_lifetime, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
4963
0
        }
4964
6
        break;
4965
32
      case 0x001f:
4966
92
      case 0x0024:
4967
92
        if (link_dir == P2P_DIR_DL && e_len > 0) {
4968
65
          de_nas_5gs_sm_qos_flow_des(tvb, pco_tree, pinfo, curr_offset, e_len, NULL, 0);
4969
65
        }
4970
92
        break;
4971
19
      case 0x0020:
4972
19
        if (link_dir == P2P_DIR_DL && e_len == 2) {
4973
0
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_eth_frame_payload_mtu, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
4974
0
        }
4975
19
        break;
4976
16
      case 0x0021:
4977
16
        if (link_dir == P2P_DIR_DL && e_len == 2) {
4978
0
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_unstruct_link_mtu, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
4979
0
        }
4980
16
        break;
4981
2
      case 0x0022:
4982
2
        if (link_dir == P2P_DIR_UL && e_len == 1) {
4983
0
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_5gsm_cause, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
4984
0
        }
4985
2
        break;
4986
17
      case 0x0027:
4987
17
        if (link_dir == P2P_DIR_DL && e_len > 0) {
4988
1
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_acs_info, tvb, curr_offset, e_len, ENC_UTF_8);
4989
1
        }
4990
17
        break;
4991
39
      case 0x0028:
4992
46
      case 0x0029:
4993
75
      case 0x002a:
4994
80
      case 0x002b:
4995
80
        if (link_dir == P2P_DIR_DL && e_len == 7) {
4996
0
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_init_small_data_rate_ctrl_params_max_ul_rate_allowed, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
4997
0
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_init_small_data_rate_ctrl_params_termination_timestamp, tvb, curr_offset+4, 4, ENC_TIME_SECS_NTP|ENC_BIG_ENDIAN);
4998
0
        }
4999
80
        break;
5000
34
      case 0x0030:
5001
34
        if (link_dir == P2P_DIR_DL && e_len > 0) {
5002
5
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_atsss_response, tvb, curr_offset, e_len, ENC_NA);
5003
5
        }
5004
34
        break;
5005
15
      case 0x0031:
5006
15
        if (link_dir == P2P_DIR_DL && e_len > 1) {
5007
7
          uint32_t type;
5008
5009
7
          proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_info_type, tvb, curr_offset, 1, ENC_BIG_ENDIAN, &type);
5010
7
          switch (type) {
5011
1
            case 0:
5012
1
              proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_info_sec_proto_type, tvb, curr_offset+1, 1, ENC_BIG_ENDIAN);
5013
1
              break;
5014
1
            case 1:
5015
1
              proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_info_port_number, tvb, curr_offset+1, 2, ENC_BIG_ENDIAN);
5016
1
              break;
5017
1
            case 2:
5018
1
              proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_info_auth_domain_name, tvb, curr_offset+1, e_len-1, ENC_APN_STR);
5019
1
              break;
5020
0
            case 3:
5021
0
              proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_info_spki_pin_set, tvb, curr_offset+1, e_len-1, ENC_NA);
5022
0
              break;
5023
1
            case 4:
5024
1
              proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_info_root_certificate, tvb, curr_offset+1, e_len-1, ENC_NA);
5025
1
              break;
5026
0
            case 5:
5027
0
              proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_info_raw_public_key, tvb, curr_offset+1, e_len-1, ENC_NA);
5028
0
              break;
5029
3
            default:
5030
3
              proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_info_value_part, tvb, curr_offset+1, e_len-1, ENC_NA);
5031
3
              break;
5032
7
          }
5033
7
        }
5034
12
        break;
5035
18
      case 0x0032:
5036
18
        if (link_dir == P2P_DIR_DL && e_len > 1) {
5037
9
          uint32_t ecs_addr_type, ie_offset, fqdn_len;
5038
5039
9
          ie_offset = curr_offset;
5040
9
          proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_type, tvb, ie_offset, 1, ENC_BIG_ENDIAN, &ecs_addr_type);
5041
9
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_type, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
5042
9
          ie_offset++;
5043
9
          switch (ecs_addr_type) {
5044
2
            case 0:
5045
2
              proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_ipv4, tvb, ie_offset, 4, ENC_BIG_ENDIAN);
5046
2
              ie_offset += 4;
5047
2
              break;
5048
1
            case 1:
5049
1
              proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_ipv6, tvb, ie_offset, 16, ENC_NA);
5050
1
              ie_offset += 16;
5051
1
              break;
5052
3
            case 2:
5053
3
              proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_fqdn_len, tvb, ie_offset, 1, ENC_BIG_ENDIAN, &fqdn_len);
5054
3
              ie_offset++;
5055
3
              proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_fqdn, tvb, ie_offset, fqdn_len, ENC_APN_STR);
5056
3
              ie_offset += fqdn_len;
5057
3
              break;
5058
3
            default:
5059
3
              goto skip_ecs_addr;
5060
9
          }
5061
6
          if ((ie_offset - curr_offset) < e_len) {
5062
6
            uint32_t cont_len;
5063
5064
6
            proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_cont_len, tvb, ie_offset, 1, ENC_BIG_ENDIAN, &cont_len);
5065
6
            ie_offset++;
5066
6
            proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_cont, tvb, ie_offset, cont_len, ENC_NA);
5067
6
            ie_offset += cont_len;
5068
6
            if ((ie_offset - curr_offset) < e_len) {
5069
4
              uint64_t flags;
5070
4
              static int* const ecs_flags[] = {
5071
4
                &hf_gsm_a_gm_sm_pco_ecs_addr_espili,
5072
4
                &hf_gsm_a_gm_sm_pco_ecs_addr_eami,
5073
4
                NULL
5074
4
              };
5075
5076
4
              proto_tree_add_bitmask_list_ret_uint64(pco_tree, tvb, ie_offset, 1, ecs_flags, ENC_BIG_ENDIAN, &flags);
5077
4
              ie_offset++;
5078
4
              if (flags & 0x01) {
5079
2
                static int* const ecs_auth_meth[] = {
5080
2
                  &hf_gsm_a_gm_sm_pco_ecs_addr_tlsgi,
5081
2
                  &hf_gsm_a_gm_sm_pco_ecs_addr_tlsai,
5082
2
                  &hf_gsm_a_gm_sm_pco_ecs_addr_tlscsci,
5083
2
                  NULL
5084
2
                };
5085
2
                proto_tree_add_bitmask_list(pco_tree, tvb, ie_offset, 1, ecs_auth_meth, ENC_BIG_ENDIAN);
5086
2
                ie_offset++;
5087
2
              }
5088
4
              if (flags & 0x02) {
5089
1
                proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_supported_plmns_info_list_cont_len, tvb, ie_offset, 1, ENC_BIG_ENDIAN, &cont_len);
5090
1
                ie_offset++;
5091
1
                proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_ecs_addr_supported_plmns_info_list_cont, tvb, ie_offset, cont_len, ENC_NA);
5092
1
              }
5093
4
            }
5094
6
          }
5095
7
          skip_ecs_addr:;
5096
7
        }
5097
16
        break;
5098
16
      case 0x0035:
5099
14
        if (link_dir == P2P_DIR_DL && e_len > 1) {
5100
3
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_ecsp_id, tvb, curr_offset, e_len, ENC_UTF_8);
5101
3
        }
5102
14
        break;
5103
7
      case 0x0036:
5104
14
      case 0x0037:
5105
17
      case 0x0038:
5106
17
        if (link_dir == P2P_DIR_DL) {
5107
15
          uint64_t flags;
5108
15
          uint32_t field_len, ie_offset = curr_offset;
5109
15
          static int* const ind[] = {
5110
15
            &hf_gsm_a_gm_sm_pco_pvs_s_nssai_ind,
5111
15
            &hf_gsm_a_gm_sm_pco_pvs_dnn_ind,
5112
15
            NULL
5113
15
          };
5114
5115
15
          if (prot == 0x0036) {
5116
7
            proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_pvs_ipv4, tvb, ie_offset, 4, ENC_BIG_ENDIAN);
5117
7
            ie_offset += 4;
5118
8
          } else if (prot == 0x0037) {
5119
6
            proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_pvs_ipv6, tvb, ie_offset, 16, ENC_NA);
5120
6
            ie_offset += 16;
5121
6
          } else {
5122
2
            proto_tree_add_item_ret_uint(pco_tree, hf_gsm_a_gm_sm_pco_pvs_name_len, tvb, ie_offset, 1, ENC_BIG_ENDIAN, &field_len);
5123
2
            ie_offset++;
5124
2
            proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_pvs_name, tvb, ie_offset, field_len, ENC_APN_STR);
5125
2
            ie_offset += field_len;
5126
2
          }
5127
15
          proto_tree_add_bitmask_list_ret_uint64(pco_tree, tvb, ie_offset, 1, ind, ENC_BIG_ENDIAN, &flags);
5128
15
          ie_offset++;
5129
15
          if (flags & 0x01) {
5130
7
            proto_tree_add_item_ret_uint(tree, hf_gsm_a_gm_sm_pco_pvs_dnn_len, tvb, ie_offset, 1, ENC_BIG_ENDIAN, &field_len);
5131
7
            ie_offset++;
5132
7
            ie_offset += de_nas_5gs_cmn_dnn(tvb, pco_tree, pinfo, ie_offset, field_len, NULL, 0);
5133
7
          }
5134
15
          if (flags & 0x02) {
5135
6
            proto_tree_add_item_ret_uint(tree, hf_gsm_a_gm_sm_pco_pvs_s_nssai_len, tvb, ie_offset, 1, ENC_BIG_ENDIAN, &field_len);
5136
6
            ie_offset++;
5137
6
            de_nas_5gs_cmn_s_nssai(tvb, pco_tree, pinfo, ie_offset, field_len, NULL, 0);
5138
6
          }
5139
15
        }
5140
17
        break;
5141
3
      case 0x0039:
5142
3
        if (link_dir == P2P_DIR_UL && e_len == 1) {
5143
1
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_dns_serv_sec_prot_support, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5144
1
        }
5145
3
        break;
5146
14
      case 0x003a:
5147
14
        if (link_dir == P2P_DIR_UL && e_len > 0) {
5148
0
          static int* const oct1_flags[] = {
5149
0
            &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_fqdn,
5150
0
            &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_ipv6,
5151
0
            &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_ipv4,
5152
0
            NULL
5153
0
          };
5154
0
          proto_tree_add_bitmask_list(pco_tree, tvb, curr_offset, 1, oct1_flags, ENC_BIG_ENDIAN);
5155
0
        }
5156
14
        break;
5157
7
      case 0x003b:
5158
7
        if (link_dir == P2P_DIR_DL && e_len == 8) {
5159
0
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv4_range_low, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
5160
0
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv4_range_high, tvb, curr_offset+4, 4, ENC_BIG_ENDIAN);
5161
0
        }
5162
7
        break;
5163
6
      case 0x003c:
5164
6
        if (link_dir == P2P_DIR_DL && e_len == 32) {
5165
0
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv6_range_low, tvb, curr_offset, 16, ENC_NA);
5166
0
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv6_range_high, tvb, curr_offset+16, 16, ENC_NA);
5167
0
        }
5168
6
        break;
5169
32
      case 0x003d:
5170
32
        if (link_dir == P2P_DIR_DL && e_len > 0) {
5171
5
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_fqdn, tvb, curr_offset, e_len, ENC_APN_STR);
5172
5
        }
5173
32
        break;
5174
60
       case 0x0041:
5175
60
        de_nas_5gs_cmn_service_level_aa_cont(tvb, pco_tree, pinfo, curr_offset, e_len, NULL, 0);
5176
60
        break;
5177
3
      case 0x0051:
5178
3
        if (eap_handle) {
5179
3
          col_append_str(pinfo->cinfo, COL_PROTOCOL, "/");
5180
3
          col_set_fence(pinfo->cinfo, COL_PROTOCOL);
5181
3
          col_append_str(pinfo->cinfo, COL_INFO, ", ");
5182
3
          col_set_fence(pinfo->cinfo, COL_INFO);
5183
3
          call_dissector(eap_handle, tvb_new_subset_length(tvb, curr_offset, e_len), pinfo, pco_tree);
5184
3
        } else {
5185
0
          call_data_dissector(tvb_new_subset_length(tvb, curr_offset, e_len), pinfo, pco_tree);
5186
0
        }
5187
3
        break;
5188
12
      case 0x0052:
5189
12
        if (link_dir == P2P_DIR_UL && e_len > 0) {
5190
2
          proto_tree_add_item(pco_tree, hf_gsm_a_gm_sm_pco_sdnaepc_dn_specific_id, tvb, curr_offset, e_len, ENC_UTF_8);
5191
2
        }
5192
12
        break;
5193
5
      case 0x0056:
5194
5
        if (e_len > 0) {
5195
5
          dissect_nas_5gs_updp(tvb_new_subset_length(tvb, curr_offset, e_len), pinfo, pco_tree);
5196
5
        }
5197
5
        break;
5198
6.92k
      default:
5199
6.92k
      {
5200
6.92k
        if (e_len > 0) {
5201
2.02k
          if (prot >= 0xff00) {
5202
81
            dissect_e212_mcc_mnc(tvb, pinfo, pco_tree, curr_offset, E212_NONE, true);
5203
81
            if ((e_len - 3) > 0) {
5204
78
              proto_tree_add_item(pco_tree, hf_gsm_a_gm_pco_app_spec_info, tvb, curr_offset+3, e_len-3, ENC_NA);
5205
78
            }
5206
1.94k
          } else {
5207
1.94k
            dissector_handle_t handle;
5208
1.94k
            handle = dissector_get_uint_handle (gprs_sm_pco_subdissector_table, prot);
5209
1.94k
            l3_tvb = tvb_new_subset_length(tvb, curr_offset, e_len);
5210
1.94k
            if (handle != NULL)
5211
3
            {
5212
              /*
5213
               * dissect the embedded message
5214
              */
5215
              /* In this case we do not want the columns updated */
5216
3
              col_set_writable(pinfo->cinfo, -1, false);
5217
3
              call_dissector(handle, l3_tvb, pinfo, pco_tree);
5218
3
              col_set_writable(pinfo->cinfo, -1, true);
5219
3
            }
5220
1.94k
            else
5221
1.94k
            {
5222
              /*
5223
              * dissect the embedded DATA message
5224
              */
5225
1.94k
              call_data_dissector(l3_tvb, pinfo, pco_tree);
5226
1.94k
            }
5227
1.94k
          }
5228
2.02k
        }
5229
6.92k
      }
5230
8.57k
    }
5231
7.99k
    curr_len    -= e_len;
5232
7.99k
    curr_offset += e_len;
5233
7.99k
  }
5234
5235
38
  if (curr_len < 0) {
5236
30
    proto_tree_add_expert(tree, pinfo, &ei_gsm_a_gm_not_enough_data, tvb, offset, len);
5237
30
  } else {
5238
8
    EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
5239
8
  }
5240
5241
38
  return len;
5242
624
}
5243
5244
/*
5245
 * [9] 10.5.6.4 Packet data protocol address
5246
 */
5247
static const value_string gsm_a_sm_pdp_type_org_vals[] = {
5248
  { 0x00, "ETSI allocated address" },
5249
  { 0x01, "IETF allocated address" },
5250
  { 0x0f, "Empty PDP type" },
5251
  { 0, NULL }
5252
};
5253
5254
uint16_t
5255
de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
5256
19
{
5257
19
  uint32_t     curr_offset;
5258
19
  const char *str;
5259
19
  unsigned char       pdp_type_org, pdp_type_num;
5260
5261
19
  curr_offset = offset;
5262
5263
19
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 4, ENC_BIG_ENDIAN);
5264
19
  proto_tree_add_item(tree, hf_gsm_a_sm_pdp_type_org, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5265
5266
19
  pdp_type_org = tvb_get_uint8(tvb, curr_offset) & 0x0f;
5267
19
  curr_offset += 1;
5268
19
  pdp_type_num = tvb_get_uint8(tvb, curr_offset);
5269
5270
19
  if (pdp_type_org == 0)
5271
6
  {
5272
    /* ETSI allocated address */
5273
6
    switch (pdp_type_num)
5274
6
    {
5275
3
      case 0x00: str = "Reserved, used in earlier version of this protocol"; break;
5276
0
      case 0x01: str = "PDP-type PPP"; break;
5277
0
      case 0x02: str = "non IP"; break;
5278
3
      default:   str = "reserved";
5279
6
    }
5280
6
  }
5281
13
  else if (pdp_type_org == 1)
5282
4
  {
5283
    /* IETF allocated address */
5284
4
    switch (pdp_type_num)
5285
4
    {
5286
1
      case 0x21: str = "IPv4 address"; break;
5287
0
      case 0x57: str = "IPv6 address"; break;
5288
0
      case 0x8d: str = "IPv4v6 address"; break;
5289
3
      default:   str = "Unknown, interpreted as IPv4 address";
5290
4
    }
5291
4
  }
5292
9
  else if ((pdp_type_num == 0) && (pdp_type_org == 0x0f))
5293
1
    str = "Empty";
5294
8
  else
5295
8
    str = "Not specified";
5296
5297
19
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_pdp_type_number, tvb, curr_offset, 1, pdp_type_num, "%s (%u)", str, pdp_type_num);
5298
5299
19
  if ((len == 2) && ((pdp_type_num == 0x21) || (pdp_type_num == 0x57) || (pdp_type_num == 0x8d)))
5300
0
  {
5301
0
    proto_tree_add_uint_format(tree, hf_gsm_a_sm_pdp_address, tvb, curr_offset, 1, pdp_type_num, "Dynamic addressing");
5302
0
    curr_offset += 1;
5303
0
    return (curr_offset - offset);
5304
0
  }
5305
19
  else if (len == 2)
5306
1
  {
5307
1
    proto_tree_add_uint_format(tree, hf_gsm_a_sm_pdp_address, tvb, curr_offset, 1, 0, "No PDP address is included");
5308
1
    curr_offset += 1;
5309
1
    return (curr_offset - offset);
5310
1
  }
5311
5312
18
  curr_offset += 1;
5313
18
  if (pdp_type_org == 1)
5314
3
  switch (pdp_type_num)
5315
3
  {
5316
0
    case 0x57:
5317
0
      proto_tree_add_item(tree, hf_gsm_a_sm_ip6_address, tvb, curr_offset, 16, ENC_NA);
5318
0
      curr_offset += 16;
5319
0
      break;
5320
5321
0
    case 0x8d:
5322
0
      proto_tree_add_item(tree, hf_gsm_a_sm_ip4_address, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
5323
0
      curr_offset += 4;
5324
0
      proto_tree_add_item(tree, hf_gsm_a_sm_ip6_address, tvb, curr_offset, 16, ENC_NA);
5325
0
      curr_offset += 16;
5326
0
      break;
5327
5328
3
    default:
5329
3
      proto_tree_add_item(tree, hf_gsm_a_sm_ip4_address, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
5330
3
      curr_offset += 4;
5331
3
  }
5332
5333
18
  EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
5334
5335
18
  return (curr_offset - offset);
5336
18
}
5337
5338
/*
5339
 * [9] 10.5.6.5 Quality of service
5340
 */
5341
static const value_string gsm_a_sm_qos_delay_cls_vals[] = {
5342
  { 0x00, "Subscribed delay class (in MS to network direction)" },
5343
  { 0x01, "Delay class 1" },
5344
  { 0x02, "Delay class 2" },
5345
  { 0x03, "Delay class 3" },
5346
  { 0x04, "Delay class 4 (best effort)" },
5347
  { 0x07, "Reserved" },
5348
  { 0, NULL }
5349
};
5350
5351
static const value_string gsm_a_sm_qos_reliability_vals[] = {
5352
  { 0x00, "Subscribed reliability class (in MS to network direction)" },
5353
  { 0x01, "Acknowledged GTP, LLC, and RLC; Protected data" },
5354
  { 0x02, "Unacknowledged GTP, Ack LLC/RLC, Protected data" },
5355
  { 0x03, "Unacknowledged GTP/LLC, Ack RLC, Protected data" },
5356
  { 0x04, "Unacknowledged GTP/LLC/RLC, Protected data" },
5357
  { 0x05, "Unacknowledged GTP/LLC/RLC, Unprotected data" },
5358
  { 0x07, "Reserved" },
5359
  { 0, NULL }
5360
};
5361
 /* Delivery of erroneous SDUs, octet 6 (see 3GPP TS 23.107) Bits 3 2 1 */
5362
const value_string gsm_a_sm_qos_del_of_err_sdu_vals[] = {
5363
  { 0, "Subscribed delivery of erroneous SDUs/Reserved" },
5364
  { 1, "No detect('-')" },
5365
  { 2, "Erroneous SDUs are delivered('yes')" },
5366
  { 3, "Erroneous SDUs are not delivered('No')" },
5367
  { 7, "Reserved" },
5368
  { 0, NULL }
5369
};
5370
5371
 /* Delivery order, octet 6 (see 3GPP TS 23.107) Bits 5 4 */
5372
static const value_string gsm_a_sm_qos_del_order_vals[] = {
5373
  { 0, "Subscribed delivery order/Reserved" },
5374
  { 1, "With delivery order ('yes')" },
5375
  { 2, "Without delivery order ('no')" },
5376
  { 3, "Reserved" },
5377
  { 0, NULL }
5378
};
5379
/* Traffic class, octet 6 (see 3GPP TS 23.107) Bits 8 7 6 */
5380
const value_string gsm_a_sm_qos_traffic_cls_vals[] = {
5381
  { 0, "Subscribed traffic class/Reserved" },
5382
  { 1, "Conversational class" },
5383
  { 2, "Streaming class" },
5384
  { 3, "Interactive class" },
5385
  { 4, "Background class" },
5386
  { 7, "Reserved" },
5387
  { 0, NULL }
5388
};
5389
5390
/* Residual Bit Error Rate (BER), octet 10 (see 3GPP TS 23.107) Bits 8 7 6 5 */
5391
const value_string gsm_a_sm_qos_ber_vals[] = {
5392
  { 0, "Subscribed residual BER/Reserved" },
5393
  { 1, "5*10-2" },
5394
  { 2, "1*10-2" },
5395
  { 3, "5*10-3" },
5396
  { 4, "4*10-3" },
5397
  { 5, "1*10-3" },
5398
  { 6, "1*10-4" },
5399
  { 7, "1*10-5" },
5400
  { 8, "1*10-6" },
5401
  { 9, "6*10-8" },
5402
  { 10, "Reserved" },
5403
  { 0, NULL }
5404
};
5405
5406
/* SDU error ratio, octet 10 (see 3GPP TS 23.107) Bits 4 3 2 1 */
5407
const value_string gsm_a_sm_qos_sdu_err_rat_vals[] = {
5408
  { 0, "Subscribed SDU error ratio/Reserved" },
5409
  { 1, "1*10-2" },
5410
  { 2, "7*10-3" },
5411
  { 3, "1*10-3" },
5412
  { 4, "1*10-4" },
5413
  { 5, "1*10-5" },
5414
  { 6, "1*10-6" },
5415
  { 7, "1*10-1" },
5416
  { 15, "Reserved" },
5417
  { 0, NULL }
5418
};
5419
5420
/* Traffic handling priority, octet 11 (see 3GPP TS 23.107) Bits 2 1 */
5421
const value_string gsm_a_sm_qos_traff_hdl_pri_vals[] = {
5422
  { 0, "Subscribed traffic handling priority/Reserved" },
5423
  { 1, "Priority level 1" },
5424
  { 2, "Priority level 2" },
5425
  { 3, "Priority level 3" },
5426
  { 0, NULL }
5427
};
5428
5429
static const range_string gsm_a_sm_qos_peak_thr_vals[] = {
5430
  { 0x00, 0x00, "Subscribed peak throughput/reserved" },
5431
  { 0x01, 0x01, "Up to 1 000 octet/s" },
5432
  { 0x02, 0x02, "Up to 2 000 octet/s" },
5433
  { 0x03, 0x03, "Up to 4 000 octet/s" },
5434
  { 0x04, 0x04, "Up to 8 000 octet/s" },
5435
  { 0x05, 0x05, "Up to 16 000 octet/s" },
5436
  { 0x06, 0x06, "Up to 32 000 octet/s" },
5437
  { 0x07, 0x07, "Up to 64 000 octet/s" },
5438
  { 0x08, 0x08, "Up to 128 000 octet/s" },
5439
  { 0x09, 0x09, "Up to 256 000 octet/s" },
5440
  { 0x0a, 0x0e, "Interpreted as Up to 1 000 octet/s" },
5441
  { 0x0f, 0x0f, "Reserved" },
5442
  { 0, 0, NULL }
5443
};
5444
5445
static const range_string gsm_a_sm_qos_mean_thr_vals[] = {
5446
  { 0x00, 0x00, "Subscribed peak throughput/reserved" },
5447
  { 0x01, 0x01, "100 octet/h" },
5448
  { 0x02, 0x02, "200 octet/h" },
5449
  { 0x03, 0x03, "500 octet/h" },
5450
  { 0x04, 0x04, "1 000 octet/h" },
5451
  { 0x05, 0x05, "2 000 octet/h" },
5452
  { 0x06, 0x06, "5 000 octet/h" },
5453
  { 0x07, 0x07, "10 000 octet/h" },
5454
  { 0x08, 0x08, "20 000 octet/h" },
5455
  { 0x09, 0x09, "50 000 octet/h" },
5456
  { 0x0a, 0x0a, "100 000 octet/h" },
5457
  { 0x0b, 0x0b, "200 000 octet/h" },
5458
  { 0x0c, 0x0c, "500 000 octet/h" },
5459
  { 0x0d, 0x0d, "1 000 000 octet/h" },
5460
  { 0x0e, 0x0e, "2 000 000 octet/h" },
5461
  { 0x0f, 0x0f, "5 000 000 octet/h" },
5462
  { 0x10, 0x10, "10 000 000 octet/h" },
5463
  { 0x11, 0x11, "20 000 000 octet/h" },
5464
  { 0x12, 0x12, "50 000 000 octet/h" },
5465
  { 0x13, 0x1d, "Interpreted as Best effort" },
5466
  { 0x1e, 0x1e, "Reserved" },
5467
  { 0x1f, 0x1f, "Best effort" },
5468
  { 0, 0, NULL }
5469
};
5470
5471
static const range_string gsm_a_sm_qos_prec_class_vals[] = {
5472
  { 0x00, 0x00, "Subscribed precedence/reserved" },
5473
  { 0x01, 0x01, "High priority" },
5474
  { 0x02, 0x02, "Normal priority" },
5475
  { 0x03, 0x03, "Low priority" },
5476
  { 0x04, 0x06, "Interpreted as Normal priority" },
5477
  { 0x07, 0x07, "Reserved" },
5478
  { 0, 0, NULL }
5479
};
5480
5481
static const true_false_string gsm_a_sm_qos_signalling_ind_value = {
5482
  "Optimised for signalling traffic",
5483
  "Not optimised for signalling traffic"
5484
};
5485
5486
/* Helper function returning the main bitrates in kbps */
5487
static uint32_t
5488
qos_calc_bitrate(uint8_t oct)
5489
1.50k
{
5490
1.50k
  if (oct <= 0x3f)
5491
559
    return oct;
5492
942
  if (oct <= 0x7f)
5493
399
    return 64 + (oct-0x40) * 8;
5494
5495
543
  return 576 + (oct-0x80) * 64;
5496
942
}
5497
5498
/* Helper function returning the extended bitrates in kbps */
5499
static uint32_t
5500
qos_calc_ext_bitrate(uint8_t oct)
5501
1.83k
{
5502
1.83k
  if (oct <= 0x4a)
5503
648
    return 8600 + oct * 100;
5504
1.19k
  if (oct <= 0xba)
5505
590
    return 16000 + (oct-0x4a) * 1000;
5506
5507
601
  return 128000 + (oct - 0xba) * 2000;
5508
1.19k
}
5509
5510
static uint32_t
5511
qos_calc_ext2_bitrate(uint8_t oct)
5512
377
{
5513
377
  if (oct <= 0x3d)
5514
62
    return (256 + oct * 4);
5515
315
  if (oct <= 0xa1)
5516
63
    return (500 + (oct-0x3d) * 10);
5517
252
  if (oct <= 0xf6)
5518
79
    return (1500 + (oct-0xa1) * 100);
5519
5520
173
  return 10000;
5521
252
}
5522
5523
/*
5524
 * 10.5.6.5 Quality of service
5525
 */
5526
uint16_t
5527
de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
5528
675
{
5529
675
  uint32_t     curr_offset;
5530
675
  unsigned char       oct, tmp_oct;
5531
675
  const char *str;
5532
675
  uint32_t     temp32;
5533
5534
675
  curr_offset = offset;
5535
5536
  /* Octet 3 */
5537
675
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 2, ENC_BIG_ENDIAN);
5538
675
  proto_tree_add_item(tree, hf_gsm_a_sm_qos_delay_cls, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5539
675
  proto_tree_add_item(tree, hf_gsm_a_sm_qos_reliability_cls, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5540
675
  curr_offset += 1;
5541
5542
  /* Octet 4 */
5543
675
  proto_tree_add_item(tree, hf_gsm_a_sm_qos_peak_thr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5544
675
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3) + 4, 1, ENC_BIG_ENDIAN);
5545
675
  proto_tree_add_item(tree, hf_gsm_a_sm_qos_prec_class, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5546
675
  curr_offset += 1;
5547
5548
  /* Octet 5 */
5549
675
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 3, ENC_BIG_ENDIAN);
5550
675
  proto_tree_add_item(tree, hf_gsm_a_sm_qos_mean_thr, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5551
675
  curr_offset += 1;
5552
5553
675
  NO_MORE_DATA_CHECK(len);
5554
5555
  /* Octet 6 */
5556
674
  proto_tree_add_item(tree, hf_gsm_a_sm_qos_traffic_cls, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5557
674
  proto_tree_add_item(tree, hf_gsm_a_sm_qos_del_order, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5558
674
  proto_tree_add_item(tree, hf_gsm_a_sm_qos_del_of_err_sdu, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5559
674
  curr_offset += 1;
5560
5561
674
  NO_MORE_DATA_CHECK(len);
5562
5563
  /* Octet 7 */
5564
674
  oct = tvb_get_uint8(tvb, curr_offset);
5565
5566
674
  switch (oct)
5567
674
  {
5568
132
    case 0x00: str = "Subscribed maximum SDU size/reserved"; break;
5569
24
    case 0x97: str = "1502 octets"; break;
5570
7
    case 0x98: str = "1510 octets"; break;
5571
7
    case 0x99: str = "1520 octets"; break;
5572
82
    case 0xff: str = "Reserved"; break;
5573
409
    default:   str = "Unspecified";
5574
674
  }
5575
5576
661
  if ((oct >= 1) && (oct <= 0x96))
5577
338
    proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_maximum_sdu_size, tvb, curr_offset, 1, oct, "%u octets (%u)", oct*10, oct);
5578
323
  else
5579
323
    proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_maximum_sdu_size, tvb, curr_offset, 1, oct, "%s (%u)", str, oct);
5580
5581
661
  curr_offset += 1;
5582
5583
661
  NO_MORE_DATA_CHECK(len);
5584
5585
  /* Octet 8 */
5586
660
  oct = tvb_get_uint8(tvb, curr_offset);
5587
5588
660
  switch (oct)
5589
660
  {
5590
197
    case 0x00: str = "Subscribed maximum bit rate for uplink/reserved"; break;
5591
91
    case 0xff: str = "0 kbps"; break;
5592
368
    default:   str = wmem_strdup_printf(pinfo->pool, "%u kbps", qos_calc_bitrate(oct));
5593
660
  }
5594
5595
656
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_upl, tvb,
5596
656
    curr_offset, 1, oct, "%s (%u)", str, oct);
5597
656
  curr_offset += 1;
5598
5599
656
  NO_MORE_DATA_CHECK(len);
5600
5601
  /* Octet 9 */
5602
654
  oct = tvb_get_uint8(tvb, curr_offset);
5603
5604
654
  switch (oct)
5605
654
  {
5606
156
    case 0x00: str = "Subscribed maximum bit rate for downlink/reserved"; break;
5607
86
    case 0xff: str = "0 kbps"; break;
5608
408
    default:   str = wmem_strdup_printf(pinfo->pool, "%u kbps", qos_calc_bitrate(oct));
5609
654
  }
5610
5611
650
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_downl, tvb,
5612
650
    curr_offset, 1, oct, "%s (%u)", str, oct);
5613
650
  curr_offset += 1;
5614
5615
650
  NO_MORE_DATA_CHECK(len);
5616
5617
  /* Octet 10 */
5618
649
  proto_tree_add_item(tree, hf_gsm_a_sm_qos_ber, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5619
649
  proto_tree_add_item(tree, hf_gsm_a_sm_qos_sdu_err_rat, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5620
5621
649
  curr_offset += 1;
5622
649
  NO_MORE_DATA_CHECK(len);
5623
5624
  /* Octet 11 */
5625
648
  oct = tvb_get_uint8(tvb, curr_offset);
5626
5627
648
  tmp_oct = oct>>2;
5628
648
  switch (tmp_oct)
5629
648
  {
5630
162
    case 0x00: str = "Subscribed transfer delay/reserved"; break;
5631
92
    case 0x3f: str = "Reserved"; break;
5632
391
    default:
5633
391
      if (tmp_oct <= 0x0f)
5634
129
        temp32 = tmp_oct * 10;
5635
262
      else if (tmp_oct <= 0x1f)
5636
89
        temp32 = (tmp_oct - 0x10) * 50 + 200;
5637
173
      else
5638
173
        temp32 = (tmp_oct - 0x20) * 100 + 1000;
5639
391
      str = wmem_strdup_printf(pinfo->pool, "%u ms", temp32);
5640
648
  }
5641
5642
645
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_trans_delay, tvb,
5643
645
    curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
5644
5645
645
  proto_tree_add_item(tree, hf_gsm_a_sm_qos_traff_hdl_pri, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5646
5647
645
  curr_offset += 1;
5648
645
  NO_MORE_DATA_CHECK(len);
5649
5650
  /* Octet 12 */
5651
643
  oct = tvb_get_uint8(tvb, curr_offset);
5652
5653
643
  switch (oct)
5654
643
  {
5655
199
    case 0x00: str = "Subscribed guaranteed bit rate for uplink/reserved"; break;
5656
87
    case 0xff: str = "0 kbps"; break;
5657
352
    default:   str = wmem_strdup_printf(pinfo->pool, "%u kbps", qos_calc_bitrate(oct));
5658
643
  }
5659
5660
638
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_upl, tvb,
5661
638
    curr_offset, 1, oct, "%s (%u)", str, oct);
5662
5663
638
  curr_offset += 1;
5664
638
  NO_MORE_DATA_CHECK(len);
5665
5666
  /* Octet 13 */
5667
636
  oct = tvb_get_uint8(tvb, curr_offset);
5668
5669
636
  switch (oct)
5670
636
  {
5671
187
    case 0x00: str = "Subscribed guaranteed bit rate for downlink/reserved"; break;
5672
85
    case 0xff: str = "0 kbps"; break;
5673
359
    default:   str = wmem_strdup_printf(pinfo->pool, "%u kbps", qos_calc_bitrate(oct));
5674
636
  }
5675
5676
631
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_downl, tvb,
5677
631
    curr_offset, 1, oct, "%s (%u)", str, oct);
5678
5679
631
  curr_offset += 1;
5680
631
  NO_MORE_DATA_CHECK(len);
5681
5682
  /* Ocet 14 */
5683
631
  oct = tvb_get_uint8(tvb, curr_offset);
5684
631
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 3, ENC_BIG_ENDIAN);
5685
631
  proto_tree_add_item(tree, hf_gsm_a_sm_qos_signalling_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
5686
5687
631
  tmp_oct = oct & 7;
5688
631
  if (tmp_oct == 0x01)
5689
47
    str = "speech";
5690
584
  else
5691
584
    str = "unknown";
5692
5693
631
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_source_stat_desc, tvb,
5694
631
    curr_offset, 1, oct, "%s (%u)", str, tmp_oct);
5695
5696
631
  curr_offset += 1;
5697
631
  NO_MORE_DATA_CHECK(len);
5698
5699
  /* Octet 15 */
5700
630
  oct = tvb_get_uint8(tvb, curr_offset);
5701
5702
630
  if (oct == 0x00)
5703
172
    str = "Use the value indicated by the Maximum bit rate for downlink";
5704
458
  else
5705
458
  {
5706
458
    temp32 = qos_calc_ext_bitrate(oct);
5707
458
    if (temp32 % 1000 == 0)
5708
300
      str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000);
5709
158
    else
5710
158
      str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32);
5711
458
  }
5712
630
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_downl_ext, tvb,
5713
630
    curr_offset, 1, oct, "%s (%u)", str, oct);
5714
5715
630
  curr_offset += 1;
5716
630
  NO_MORE_DATA_CHECK(len);
5717
5718
  /* Octet 16 */
5719
630
  oct = tvb_get_uint8(tvb, curr_offset);
5720
5721
630
  if (oct == 0x00)
5722
213
    str = "Use the value indicated by the Guaranteed bit rate for downlink";
5723
417
  else
5724
417
  {
5725
417
    temp32 = qos_calc_ext_bitrate(oct);
5726
417
    if (temp32 % 1000 == 0)
5727
279
      str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000);
5728
138
    else
5729
138
      str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32);
5730
417
  }
5731
630
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_downl_ext, tvb,
5732
630
    curr_offset, 1, oct, "%s (%u)", str, oct);
5733
5734
630
  curr_offset += 1;
5735
630
  NO_MORE_DATA_CHECK(len);
5736
5737
  /* Maximum bit rate for uplink (extended) Octet 17 */
5738
630
  oct = tvb_get_uint8(tvb, curr_offset);
5739
5740
630
  if (oct == 0x00)
5741
123
    str = "Use the value indicated by the Maximum bit rate for uplink";
5742
507
  else
5743
507
  {
5744
507
    temp32 = qos_calc_ext_bitrate(oct);
5745
507
    if (temp32 % 1000 == 0)
5746
320
      str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000);
5747
187
    else
5748
187
      str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32);
5749
507
  }
5750
630
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_upl_ext, tvb,
5751
630
    curr_offset, 1, oct, "%s (%u)", str, oct);
5752
5753
630
  curr_offset += 1;
5754
630
  NO_MORE_DATA_CHECK(len);
5755
5756
  /* Guaranteed bit rate for uplink (extended) Octet 18 */
5757
629
  oct = tvb_get_uint8(tvb, curr_offset);
5758
5759
629
  if (oct == 0x00)
5760
135
    str = "Use the value indicated by the Guaranteed bit rate for uplink";
5761
494
  else
5762
494
  {
5763
494
    temp32 = qos_calc_ext_bitrate(oct);
5764
494
    if (temp32 % 1000 == 0)
5765
362
      str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000);
5766
132
    else
5767
132
      str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32);
5768
494
  }
5769
629
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_upl_ext, tvb,
5770
629
    curr_offset, 1, oct, "%s (%u)", str, oct);
5771
5772
629
  curr_offset += 1;
5773
629
  NO_MORE_DATA_CHECK(len);
5774
5775
  /* Maximum bit rate for downlink (extended-2) Octet 19 */
5776
163
  oct = tvb_get_uint8(tvb, curr_offset);
5777
5778
163
  if (oct == 0x00)
5779
35
    str = "Use the value indicated by the Maximum bit rate for downlink";
5780
128
  else
5781
128
  {
5782
128
    temp32 = qos_calc_ext2_bitrate(oct);
5783
128
    str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32);
5784
128
  }
5785
163
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_downl_ext2, tvb,
5786
163
    curr_offset, 1, oct, "%s (%u)", str, oct);
5787
5788
163
  curr_offset += 1;
5789
163
  NO_MORE_DATA_CHECK(len);
5790
5791
  /* Guaranteed bit rate for downlink (extended-2) Octet 20 */
5792
162
  oct = tvb_get_uint8(tvb, curr_offset);
5793
5794
162
  if (oct == 0x00)
5795
77
    str = "Use the value indicated by the Guaranteed bit rate for downlink";
5796
85
  else
5797
85
  {
5798
85
    temp32 = qos_calc_ext2_bitrate(oct);
5799
85
    str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32);
5800
85
  }
5801
162
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_downl_ext2, tvb,
5802
162
    curr_offset, 1, oct, "%s (%u)", str, oct);
5803
5804
162
  curr_offset += 1;
5805
162
  NO_MORE_DATA_CHECK(len);
5806
5807
  /* Maximum bit rate for uplink (extended-2) Octet 21 */
5808
162
  oct = tvb_get_uint8(tvb, curr_offset);
5809
5810
162
  if (oct == 0x00)
5811
42
    str = "Use the value indicated by the Maximum bit rate for uplink";
5812
120
  else
5813
120
  {
5814
120
    temp32 = qos_calc_ext2_bitrate(oct);
5815
120
    str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32);
5816
120
  }
5817
162
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_upl_ext2, tvb,
5818
162
    curr_offset, 1, oct, "%s (%u)", str, oct);
5819
5820
162
  curr_offset += 1;
5821
162
  NO_MORE_DATA_CHECK(len);
5822
5823
  /* Guaranteed bit rate for uplink (extended-2) Octet 22 */
5824
161
  oct = tvb_get_uint8(tvb, curr_offset);
5825
5826
161
  if (oct == 0x00)
5827
44
    str = "Use the value indicated by the Guaranteed bit rate for uplink";
5828
117
  else
5829
117
  {
5830
117
    temp32 = qos_calc_ext2_bitrate(oct);
5831
117
    str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32);
5832
117
  }
5833
161
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_guar_bitrate_upl_ext2, tvb,
5834
161
    curr_offset, 1, oct, "%s (%u)", str, oct);
5835
5836
161
  curr_offset += 1;
5837
5838
161
  EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
5839
5840
161
  return (curr_offset - offset);
5841
162
}
5842
5843
/*
5844
 * [12] 10.5.6.5a Re-attempt indicator
5845
 */
5846
static const true_false_string gsm_a_gm_eplmnc_value = {
5847
  "MS is not allowed to re-attempt the procedure in an equivalent PLMN",
5848
  "MS is allowed to re-attempt the procedure in an equivalent PLMN"
5849
};
5850
5851
static const true_false_string gsm_a_gm_ratc_value = {
5852
  "MS is not allowed to re-attempt the procedure in S1 mode",
5853
  "MS is allowed to re-attempt the procedure in S1 mode"
5854
};
5855
5856
static uint16_t
5857
de_sm_re_attempt_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
5858
0
{
5859
0
  uint32_t curr_offset;
5860
5861
0
  curr_offset = offset;
5862
5863
0
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, offset << 3, 6, ENC_BIG_ENDIAN);
5864
0
  proto_tree_add_item(tree, hf_gsm_a_sm_eplmnc, tvb, offset, 1, ENC_BIG_ENDIAN);
5865
0
  proto_tree_add_item(tree, hf_gsm_a_sm_ratc, tvb, offset, 1, ENC_BIG_ENDIAN);
5866
0
  curr_offset++;
5867
5868
0
  EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
5869
5870
0
  return len;
5871
0
}
5872
5873
/*
5874
 * [15] 10.5.6.5b Extended quality of service
5875
 */
5876
static uint16_t
5877
de_sm_ext_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
5878
2
{
5879
2
  uint32_t curr_offset;
5880
5881
2
  curr_offset = offset;
5882
5883
2
  EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
5884
5885
2
  return len;
5886
2
}
5887
5888
/*
5889
 * [9] 10.5.6.6 SM cause
5890
 */
5891
static const value_string gsm_a_sm_cause_vals[] = {
5892
  { 0x08, "Operator Determined Barring" },
5893
  { 0x18, "MBMS bearer capabilities insufficient for the service" },
5894
  { 0x19, "LLC or SNDCP failure(A/Gb only)" },
5895
  { 0x1a, "Insufficient resources" },
5896
  { 0x1b, "Missing or unknown APN" },
5897
  { 0x1c, "Unknown PDP address or PDP type" },
5898
  { 0x1d, "User authentication failed" },
5899
  { 0x1e, "Activation rejected by GGSN, Serving GW or PDN GW" },
5900
  { 0x1f, "Activation rejected, unspecified" },
5901
  { 0x20, "Service option not supported" },
5902
  { 0x21, "Requested service option not subscribed" },
5903
  { 0x22, "Service option temporarily out of order" },
5904
  { 0x23, "NSAPI already used (not sent)" },
5905
  { 0x24, "Regular deactivation" },
5906
  { 0x25, "QoS not accepted" },
5907
  { 0x26, "Network failure" },
5908
  { 0x27, "Reactivation requested" },
5909
  { 0x28, "Feature not supported" },
5910
  { 0x29, "Semantic error in the TFT operation" },
5911
  { 0x2a, "Syntactical error in the TFT operation" },
5912
  { 0x2b, "Unknown PDP context" },
5913
  { 0x2c, "Semantic errors in packet filter(s)" },
5914
  { 0x2d, "Syntactical errors in packet filter(s)" },
5915
  { 0x2e, "PDP context without TFT already activated" },
5916
  { 0x2f, "Multicast group membership time-out" },
5917
  { 0x30, "Request rejected, BCM violation" },
5918
  { 0x32, "PDP type IPv4 only allowed" },
5919
  { 0x33, "PDP type IPv6 only allowed" },
5920
  { 0x34, "Single address bearers only allowed" },
5921
  { 0x38, "Collision with network initiated request" },
5922
  { 0x39, "PDP type IPv4v6 only allowed" },
5923
  { 0x3a, "PDP type non IP only allowed" },
5924
  { 0x3c, "Bearer handling not supported" },
5925
  { 0x41, "Maximum number of PDP contexts reached" },
5926
  { 0x42, "Requested APN not supported in current RAT and PLMN combination" },
5927
  { 0x51, "Invalid transaction identifier value" },
5928
  { 0x5f, "Semantically incorrect message" },
5929
  { 0x60, "Invalid mandatory information" },
5930
  { 0x61, "Message type non-existent or not implemented" },
5931
  { 0x62, "Message type not compatible with the protocol state" },
5932
  { 0x63, "Information element non-existent or not implemented" },
5933
  { 0x64, "Conditional IE error" },
5934
  { 0x65, "Message not compatible with the protocol state" },
5935
  { 0x6f, "Protocol error, unspecified" },
5936
  { 0x70, "APN restriction value incompatible with active PDP context" },
5937
  { 0x71, "Multiple accesses to a PDN connection not allowed" },
5938
  { 0, NULL }
5939
};
5940
static value_string_ext gsm_a_sm_cause_vals_ext = VALUE_STRING_EXT_INIT(gsm_a_sm_cause_vals);
5941
5942
uint16_t
5943
de_sm_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_)
5944
33
{
5945
33
  uint8_t      oct;
5946
33
  const char *str;
5947
5948
33
  oct = tvb_get_uint8(tvb, offset);
5949
5950
  /* SM Cause can be sent in both directions */
5951
33
  str = val_to_str_ext_const(oct, &gsm_a_sm_cause_vals_ext,
5952
33
             "Protocol error, unspecified / Service option temporarily out of order");
5953
5954
33
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_cause, tvb,
5955
33
        offset, 1, oct, "%s (%u)", str, oct);
5956
5957
  /* no length check possible */
5958
33
  return 1;
5959
33
}
5960
5961
/*
5962
 * [9] 10.5.6.6a SM cause 2
5963
 */
5964
static uint16_t
5965
de_sm_cause_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
5966
0
{
5967
0
  uint8_t      oct;
5968
0
  const char *str;
5969
5970
0
  oct = tvb_get_uint8(tvb, offset);
5971
5972
  /* SM Cause 2 is sent only in the Network-to-MS direction */
5973
0
  str = val_to_str_ext_const(oct, &gsm_a_sm_cause_vals_ext,
5974
0
             "Service option temporarily out of order");
5975
5976
0
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_cause_2, tvb,
5977
0
        offset, 1, oct, "%s (%u)", str, oct);
5978
5979
  /* no length check possible */
5980
0
  return 1;
5981
0
}
5982
/*
5983
 * [7] 10.5.6.7
5984
 */
5985
5986
static const true_false_string gsm_a_sm_ti_flag_vals = {
5987
  "The message is sent to the side that originates the TI",
5988
  "The message is sent from the side that originates the TI"
5989
};
5990
5991
static uint16_t
5992
de_sm_linked_ti(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
5993
16
{
5994
16
  uint32_t  curr_offset;
5995
16
  unsigned  curr_len;
5996
16
  char  oct;
5997
5998
16
  curr_len    = len;
5999
16
  curr_offset = offset;
6000
6001
16
  oct = tvb_get_uint8(tvb, curr_offset);
6002
6003
16
  proto_tree_add_item(tree, hf_gsm_a_sm_ti_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
6004
6005
  /* The TI value and the TI flag occupy bits 5 - 7 and bit 8 of the first octet respectively.
6006
   * The extended TI shall not be used unless TI values of 7 or greater are needed.
6007
   * Where the extended TI is used, the TI IE includes a second octet. The TI value in the first octet is ignored, and the TI
6008
   * value is encoded in bits 7-1 of the second octet.
6009
   */
6010
6011
16
  if (curr_len > 1)
6012
15
  {
6013
15
    curr_offset++;
6014
15
    oct = tvb_get_uint8(tvb, curr_offset);
6015
6016
15
    proto_tree_add_uint(tree, hf_gsm_a_gm_ti_value, tvb, curr_offset, 1, oct&0x7f);
6017
6018
15
    proto_tree_add_item(tree, hf_gsm_a_sm_ext, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6019
6020
15
    curr_offset++;
6021
15
  }
6022
1
  else
6023
1
  {
6024
1
    proto_tree_add_uint(tree, hf_gsm_a_gm_ti_value, tvb, curr_offset, 1, (oct>>4)&7);
6025
1
    curr_offset++;
6026
1
  }
6027
6028
6029
16
  EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
6030
6031
16
  return (curr_offset - offset);
6032
16
}
6033
6034
/*
6035
 * [9] 10.5.6.9 LLC service access point identifier
6036
 */
6037
static const value_string gsm_a_sm_llc_sapi_vals[] = {
6038
  { 0, "LLC SAPI not assigned" },
6039
  { 3, "SAPI 3" },
6040
  { 5, "SAPI 5" },
6041
  { 9, "SAPI 9" },
6042
  { 11, "SAPI 11" },
6043
  { 0, NULL }
6044
};
6045
6046
static uint16_t
6047
de_sm_sapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
6048
167
{
6049
167
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, offset << 3, 4, ENC_BIG_ENDIAN);
6050
167
  proto_tree_add_item(tree, hf_gsm_a_sm_llc_sapi, tvb, offset, 1, ENC_BIG_ENDIAN);
6051
6052
  /* no length check possible */
6053
167
  return 1;
6054
167
}
6055
6056
/*
6057
 * [9] 10.5.6.10 Tear down indicator
6058
 */
6059
static const true_false_string gsm_a_sm_tdi_value = {
6060
  "Tear down requested",
6061
  "Tear down not requested"
6062
};
6063
6064
static uint16_t
6065
de_sm_tear_down(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
6066
0
{
6067
0
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset << 3) + 4, 3, ENC_BIG_ENDIAN);
6068
0
  proto_tree_add_item(tree, hf_gsm_a_sm_tdi, tvb, offset, 1, ENC_BIG_ENDIAN);
6069
6070
  /* no length check possible */
6071
0
  return 1;
6072
0
}
6073
6074
/*
6075
 * [9] 10.5.6.11 Packet Flow Identifier
6076
 */
6077
static const range_string gsm_a_sm_packet_flow_id_vals[] = {
6078
  { 0x00, 0x00, "Best Effort"},
6079
  { 0x01, 0x01, "Signalling"},
6080
  { 0x02, 0x02, "SMS"},
6081
  { 0x03, 0x03, "TOM8"},
6082
  { 0x04, 0x07, "Reserved"},
6083
  { 0x08, 0x7f, "Dynamically assigned"},
6084
  { 0x00, 0x00, NULL }
6085
};
6086
6087
uint16_t
6088
de_sm_pflow_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6089
577
{
6090
577
  uint32_t  curr_offset;
6091
577
  unsigned   value;
6092
6093
577
  curr_offset = offset;
6094
577
  value = tvb_get_uint8(tvb, curr_offset);
6095
577
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset << 3, 1, ENC_BIG_ENDIAN);
6096
577
  proto_tree_add_item(tree, hf_gsm_a_sm_packet_flow_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6097
577
  curr_offset++;
6098
6099
577
  if (add_string)
6100
3
    snprintf(add_string, string_len, " - %s", rval_to_str_const(value, gsm_a_sm_packet_flow_id_vals, "Unknown"));
6101
6102
577
  EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
6103
6104
577
  return (curr_offset - offset);
6105
577
}
6106
6107
/*
6108
 * [7] 10.5.6.12     TFT - Traffic Flow Template
6109
 */
6110
/* TFT operation code (octet 3) */
6111
static const value_string gsm_a_sm_tft_op_code_vals[] = {
6112
  { 0,    "Ignore this IE"},
6113
  { 1,    "Create new TFT"},
6114
  { 2,    "Delete existing TFT"},
6115
  { 3,    "Add packet filters to existing TFT"},
6116
  { 4,    "Replace packet filters in existing TFT"},
6117
  { 5,    "Delete packet filters from existing TFT"},
6118
  { 6,    "No TFT operation"},
6119
  { 7,    "Reserved"},
6120
  { 0,  NULL }
6121
};
6122
6123
static const true_false_string gsm_a_sm_tft_e_bit  = {
6124
  "Parameters list is included",
6125
  "Parameters list is not included"
6126
};
6127
6128
static const value_string gsm_a_sm_tft_pkt_flt_dir_vals[] = {
6129
  { 0,  "Pre Rel-7 TFT filter"},
6130
  { 1,  "Downlink only"},
6131
  { 2,  "Uplink only"},
6132
  { 3,  "Bidirectional"},
6133
  { 0,  NULL }
6134
};
6135
6136
static const value_string gsm_a_sm_tft_param_id_vals[] = {
6137
  { 1,  "Authorization Token"},
6138
  { 2,  "Flow Identifier"},
6139
  { 3,  "Packet Filter Identifier"},
6140
  { 0,  NULL }
6141
};
6142
6143
static const value_string packet_filter_component_type_vals[] = {
6144
  {0x10,  "IPv4 remote address type" },
6145
  {0x11,  "IPv4 local address type"},
6146
  {0x20,  "IPv6 remote address type"},
6147
  {0x21,  "IPv6 remote address/prefix length type"},
6148
  {0x23,  "IPv6 local address/prefix length type"},
6149
  {0x30,  "Protocol identifier/Next header type"},
6150
  {0x40,  "Single local port type"},
6151
  {0x41,  "Local port range type"},
6152
  {0x50,  "Single remote port type"},
6153
  {0x51,  "Remote port range type"},
6154
  {0x60,  "Security parameter index type"},
6155
  {0x70,  "Type of service/Traffic class type"},
6156
  {0x80,  "Flow label type"},
6157
  {0x81,  "Destination MAC address type" },
6158
  {0x82,  "Source MAC address type" },
6159
  {0x83,  "802.1Q C-TAG VID type" },
6160
  {0x84,  "802.1Q S-TAG VID type" },
6161
  {0x85,  "802.1Q C-TAG PCP/DEI type" },
6162
  {0x86,  "802.1Q S-TAG PCP/DEI type" },
6163
  {0x87,  "Ethertype type" },
6164
  {0, NULL}
6165
};
6166
6167
uint16_t
6168
de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6169
217
{
6170
217
  uint32_t        curr_offset, prev_offset;
6171
217
  unsigned        curr_len;
6172
217
  uint8_t       op_code;
6173
217
  uint8_t       pkt_fil_count;
6174
217
  uint8_t       e_bit;
6175
217
  uint8_t       count;
6176
217
  uint8_t       oct;
6177
217
  int           pf_length;
6178
217
  int           i;
6179
217
  int           pack_component_type;
6180
217
  int           param;
6181
6182
217
  curr_len    = len;
6183
217
  curr_offset = offset;
6184
6185
  /*
6186
   * parse first octet. It contain TFT operation code, E bit and Number of packet filters
6187
   */
6188
217
  oct = tvb_get_uint8(tvb, curr_offset);
6189
6190
217
  op_code = oct>>5;
6191
217
  pkt_fil_count = oct&0x0f;
6192
217
  e_bit = (oct>>4)&1;
6193
6194
217
  proto_tree_add_item(tree, hf_gsm_a_sm_tft_op_code, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6195
217
  proto_tree_add_item(tree, hf_gsm_a_sm_tft_e_bit,   tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6196
217
  proto_tree_add_item(tree, hf_gsm_a_sm_tft_pkt_flt, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6197
6198
217
  curr_offset++;
6199
217
  curr_len--;
6200
6201
  /* Packet filter list dissect */
6202
6203
217
  count = 0;
6204
217
  if (op_code == 2)      /* delete TFT contains no packet filters. so we will jump over it */
6205
9
    count = pkt_fil_count;
6206
1.33k
  while (count < pkt_fil_count)
6207
1.13k
  {
6208
1.13k
    proto_item *tf_pf;
6209
1.13k
    proto_tree *tf_tree;
6210
1.13k
    prev_offset = curr_offset;
6211
1.13k
    tf_pf = proto_tree_add_uint(tree, hf_gsm_a_sm_tft_packet_filter, tvb, curr_offset, 1, count);   /* 0-> 7 */
6212
6213
1.13k
    tf_tree = proto_item_add_subtree(tf_pf, ett_sm_tft);
6214
6215
1.13k
    if ((curr_offset-offset)<1) {
6216
0
      proto_tree_add_expert(tf_tree, pinfo, &ei_gsm_a_gm_not_enough_data, tvb, curr_offset, 1);
6217
0
      return (len);
6218
0
    }
6219
6220
1.13k
    if (op_code == 5)  /* Delete packet filters from existing TFT - just a list of identifiers */
6221
42
    {
6222
42
      proto_tree_add_bits_item(tf_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 4, ENC_BIG_ENDIAN);
6223
42
      oct = tvb_get_uint8(tvb, curr_offset) & 0x0f;
6224
42
      proto_tree_add_uint_format_value(tf_tree, hf_gsm_a_sm_tft_pkt_flt_id, tvb, curr_offset, 1, oct, "%d (%d)", oct+1, oct);
6225
42
      curr_offset++;
6226
42
      curr_len--;
6227
42
      count++;
6228
42
    }
6229
1.08k
    else        /* create new, Add packet filters or Replace packet filters */
6230
1.08k
    {
6231
1.08k
      proto_tree_add_bits_item(tf_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 2, ENC_BIG_ENDIAN);
6232
1.08k
      proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_pkt_flt_dir, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6233
1.08k
      oct = tvb_get_uint8(tvb, curr_offset) & 0x0f;
6234
1.08k
      proto_tree_add_uint_format_value(tf_tree, hf_gsm_a_sm_tft_pkt_flt_id, tvb, curr_offset, 1, oct, "%d (%d)", oct+1, oct);
6235
1.08k
      curr_offset++;
6236
1.08k
      curr_len--;
6237
6238
1.08k
      if ((curr_offset-offset) < 1) {
6239
0
        proto_tree_add_expert(tf_tree, pinfo, &ei_gsm_a_gm_not_enough_data, tvb, curr_offset, 1);
6240
0
        return (len);
6241
0
      }
6242
1.08k
      proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_packet_evaluation_precedence, tvb, curr_offset, 1, ENC_NA);
6243
1.08k
      curr_offset++;
6244
1.08k
      curr_len--;
6245
6246
1.08k
      if ((curr_offset-offset)<1) {
6247
0
        proto_tree_add_expert(tf_tree, pinfo, &ei_gsm_a_gm_not_enough_data, tvb, curr_offset, 1);
6248
0
        return (len);
6249
0
      }
6250
1.08k
      pf_length = tvb_get_uint8(tvb, curr_offset);
6251
1.08k
      proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_packet_filter_length, tvb, curr_offset, 1, ENC_NA);
6252
1.08k
      curr_offset++;
6253
1.08k
      curr_len--;
6254
6255
      /* New tree for component */
6256
6257
      /* Dissect Packet filter Component */
6258
      /* while (filter_len > 1) */
6259
      /* packet filter component type identifier: */
6260
6261
3.09k
      while (pf_length > 0) {
6262
2.02k
        proto_item *tf;
6263
2.02k
        proto_tree *comp_tree;
6264
2.02k
        if ((curr_offset-offset) < 1) {
6265
0
          proto_tree_add_expert(tf_tree, pinfo, &ei_gsm_a_gm_not_enough_data, tvb, curr_offset, 1);
6266
0
          return (len);
6267
0
        }
6268
2.02k
        pack_component_type = tvb_get_uint8(tvb, curr_offset);
6269
2.02k
        tf = proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_packet_filter_component_type_id, tvb, curr_offset, 1, ENC_NA);
6270
2.02k
        comp_tree = proto_item_add_subtree(tf, ett_sm_tft);
6271
6272
2.02k
        curr_offset++;
6273
2.02k
        curr_len--;
6274
2.02k
        pf_length--;
6275
6276
2.02k
        switch (pack_component_type) {
6277
6278
24
        case 0x10:
6279
24
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip4_address, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
6280
24
          curr_offset += 4;
6281
24
          curr_len    -= 4;
6282
24
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip4_mask, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
6283
24
          curr_offset += 4;
6284
24
          curr_len    -= 4;
6285
24
          pf_length   -= 8;
6286
24
          break;
6287
6288
47
        case 0x11:
6289
47
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip4_address, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
6290
47
          curr_offset += 4;
6291
47
          curr_len    -= 4;
6292
47
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip4_mask, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
6293
47
          curr_offset += 4;
6294
47
          curr_len    -= 4;
6295
47
          pf_length   -= 8;
6296
47
          break;
6297
6298
13
        case 0x20:
6299
13
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip6_address, tvb, curr_offset, 16, ENC_NA);
6300
13
          curr_offset += 16;
6301
13
          curr_len    -= 16;
6302
13
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip6_mask, tvb, curr_offset, 16, ENC_NA);
6303
13
          curr_offset += 16;
6304
13
          curr_len    -= 16;
6305
13
          pf_length   -= 32;
6306
13
          break;
6307
6308
32
        case 0x21:
6309
32
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip6_address, tvb, curr_offset, 16, ENC_NA);
6310
32
          curr_offset += 16;
6311
32
          curr_len    -= 16;
6312
32
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip6_prefix_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6313
32
          curr_offset += 1;
6314
32
          curr_len    -= 1;
6315
32
          pf_length   -= 17;
6316
32
          break;
6317
6318
32
        case 0x23:
6319
32
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip6_address, tvb, curr_offset, 16, ENC_NA);
6320
32
          curr_offset += 16;
6321
32
          curr_len    -= 16;
6322
32
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_ip6_prefix_length, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6323
32
          curr_offset += 1;
6324
32
          curr_len    -= 1;
6325
32
          pf_length   -= 17;
6326
32
          break;
6327
6328
125
        case 0x30:
6329
125
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_protocol_header, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6330
125
          curr_offset += 1;
6331
125
          curr_len    -= 1;
6332
125
          pf_length   -= 1;
6333
125
          break;
6334
6335
56
        case 0x40:
6336
56
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_port, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6337
56
          curr_offset += 2;
6338
56
          curr_len    -= 2;
6339
56
          pf_length   -= 2;
6340
56
          break;
6341
6342
104
        case 0x41:
6343
104
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_port_low, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6344
104
          curr_offset += 2;
6345
104
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_port_high, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6346
104
          curr_offset += 2;
6347
104
          curr_len    -= 4;
6348
104
          pf_length   -= 4;
6349
104
          break;
6350
6351
100
        case 0x50:
6352
100
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_port, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6353
100
          curr_offset += 2;
6354
100
          curr_len    -= 2;
6355
100
          pf_length   -= 2;
6356
100
          break;
6357
6358
84
        case 0x51:
6359
84
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_port_low, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6360
84
          curr_offset += 2;
6361
84
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_port_high, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6362
84
          curr_offset += 2;
6363
84
          curr_len    -= 4;
6364
84
          pf_length   -= 4;
6365
84
          break;
6366
6367
37
        case 0x60:
6368
37
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_security, tvb, curr_offset, 4, ENC_BIG_ENDIAN);
6369
37
          curr_offset += 4;
6370
37
          curr_len    -= 4;
6371
37
          pf_length   -= 4;
6372
37
          break;
6373
6374
6375
166
        case 0x70:
6376
166
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_traffic_class, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6377
166
          curr_offset++;
6378
166
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_traffic_mask, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6379
166
          curr_offset++;
6380
166
          curr_len-=2;
6381
166
          pf_length-=2;
6382
166
          break;
6383
6384
58
        case 0x80:
6385
58
          proto_tree_add_bits_item(comp_tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 4, ENC_BIG_ENDIAN);
6386
58
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_flow_label_type, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
6387
58
          curr_offset += 3;
6388
58
          curr_len    -= 3;
6389
58
          pf_length   -= 3;
6390
58
          break;
6391
6392
20
        case 0x81:
6393
40
        case 0x82:
6394
40
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_mac_addr, tvb, curr_offset, 6, ENC_NA);
6395
40
          curr_offset += 6;
6396
40
          curr_len    -= 6;
6397
40
          pf_length   -= 6;
6398
40
          break;
6399
6400
46
        case 0x83:
6401
153
        case 0x84:
6402
153
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_vlan_tag_vid, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6403
153
          curr_offset += 2;
6404
153
          curr_len    -= 2;
6405
153
          pf_length   -= 2;
6406
153
          break;
6407
6408
119
        case 0x85:
6409
244
        case 0x86:
6410
244
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_vlan_tag_pcp, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6411
244
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_vlan_tag_dei, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6412
244
          curr_offset += 1;
6413
244
          curr_len    -= 1;
6414
244
          pf_length   -= 1;
6415
244
          break;
6416
6417
48
        case 0x87:
6418
48
          proto_tree_add_item(comp_tree, hf_gsm_a_sm_tft_ethertype, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6419
48
          curr_offset += 2;
6420
48
          curr_len    -= 2;
6421
48
          pf_length   -= 2;
6422
48
          break;
6423
6424
650
        default:
6425
650
          curr_offset += pf_length;
6426
650
          curr_len    -= pf_length;
6427
650
          pf_length    = 0;
6428
2.02k
        }
6429
2.02k
      }
6430
1.07k
      count++;
6431
1.07k
    }
6432
1.11k
    proto_item_set_len(tf_pf, curr_offset - prev_offset);
6433
1.11k
  }
6434
6435
  /* The parameters list contains a variable number of parameters that might need to be
6436
   * transferred in addition to the packet filters. If the parameters list is included, the E
6437
   * bit is set to 1; otherwise, the E bit is set to 0.
6438
   */
6439
203
  if ((e_bit == 1) && curr_len) {
6440
63
    count = 0;
6441
626
    while (curr_len) {
6442
625
      proto_tree *tf_tree;
6443
625
      pf_length = tvb_get_uint8(tvb, curr_offset+1);
6444
625
      tf_tree   = proto_tree_add_subtree_format(tree, tvb, curr_offset, pf_length+2, ett_sm_tft, NULL, "Parameter %d", count);
6445
625
      param     = tvb_get_uint8(tvb, curr_offset);
6446
625
      proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_param_id, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6447
625
      curr_offset += 2;
6448
625
      curr_len    -= 2;
6449
625
      switch (param) {
6450
42
      case 0x01:
6451
42
        proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_authorization_token_value, tvb, curr_offset, pf_length, ENC_NA);
6452
42
        break;
6453
6454
45
      case 0x02:
6455
45
        proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_media_component_number_value, tvb, curr_offset, 2, ENC_BIG_ENDIAN);
6456
45
        proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_ip_flow_number, tvb, curr_offset+2, 2, ENC_BIG_ENDIAN);
6457
45
        break;
6458
6459
59
      case 0x03:
6460
698
        for (i=0; i<pf_length; i++) {
6461
639
          oct = tvb_get_uint8(tvb, curr_offset+i) & 0x0f;
6462
639
          proto_tree_add_uint_format(tf_tree, hf_gsm_a_sm_tft_packet_filter_identifier, tvb, curr_offset+i, 1, oct+1, "Packet filter identifier %d: %d (%d)", i, oct+1, oct);
6463
639
        }
6464
59
        break;
6465
6466
466
      default:
6467
466
        proto_tree_add_item(tf_tree, hf_gsm_a_sm_tft_parameter_content, tvb, curr_offset, pf_length, ENC_NA);
6468
466
        break;
6469
625
      }
6470
563
      curr_offset += pf_length;
6471
563
      curr_len    -= pf_length;
6472
563
      count++;
6473
563
    }
6474
63
  }
6475
6476
141
  EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
6477
6478
141
  return (len);
6479
203
}
6480
6481
/*
6482
 * [9] 10.5.6.13 Temporary Mobile Group Identity (TMGI)
6483
 */
6484
uint16_t
6485
de_sm_tmgi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6486
1
{
6487
1
  uint32_t  curr_offset;
6488
6489
1
  curr_offset = offset;
6490
6491
1
  proto_tree_add_item(tree, hf_gsm_a_sm_tmgi, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
6492
1
  curr_offset += 3;
6493
6494
1
  NO_MORE_DATA_CHECK(len);
6495
1
  curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, tree, curr_offset, E212_NONE, true);
6496
6497
1
  EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
6498
6499
1
  return (curr_offset - offset);
6500
1
}
6501
6502
/*
6503
 * [9] 10.5.6.14 MBMS bearer capabilities
6504
 */
6505
static uint16_t
6506
de_sm_mbms_bearer_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6507
17
{
6508
17
  uint32_t     curr_offset, temp32;
6509
17
  uint8_t      oct;
6510
17
  const char *str;
6511
6512
17
  curr_offset = offset;
6513
6514
17
  oct = tvb_get_uint8(tvb, curr_offset);
6515
6516
17
  switch (oct)
6517
17
  {
6518
2
    case 0x00: str = "Subscribed maximum bit rate for downlink/reserved"; break;
6519
1
    case 0xff: str = "0 kbps"; break;
6520
14
    default:   str = wmem_strdup_printf(pinfo->pool, "%u kbps", qos_calc_bitrate(oct));
6521
17
  }
6522
6523
17
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_downl, tvb,
6524
17
    curr_offset, 1, oct, "%s (%u)", str, oct);
6525
17
  curr_offset += 1;
6526
6527
17
  NO_MORE_DATA_CHECK(len);
6528
6529
17
  oct = tvb_get_uint8(tvb, curr_offset);
6530
6531
17
  if (oct == 0x00)
6532
1
    str = "Use the value indicated by the Maximum bit rate for downlink";
6533
16
  else
6534
16
  {
6535
16
    temp32 = qos_calc_ext_bitrate(oct);
6536
16
    if (temp32 % 1000 == 0)
6537
8
      str = wmem_strdup_printf(pinfo->pool, "%u Mbps", temp32 / 1000);
6538
8
    else
6539
8
      str = wmem_strdup_printf(pinfo->pool, "%u kbps", temp32);
6540
16
  }
6541
17
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_qos_max_bitrate_downl_ext, tvb,
6542
17
    curr_offset, 1, oct, "%s (%u)", str, oct);
6543
6544
17
  curr_offset += 1;
6545
6546
17
  EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
6547
6548
17
  return (curr_offset - offset);
6549
17
}
6550
6551
/*
6552
 * [9] 10.5.6.15 MBMS protocol configuration options
6553
 */
6554
uint16_t
6555
de_sm_mbms_prot_conf_opt(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6556
3
{
6557
3
  uint32_t  curr_offset;
6558
6559
3
  curr_offset = offset;
6560
3
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset<<3), 8, ENC_BIG_ENDIAN);
6561
3
  curr_offset++;
6562
6563
3
  EXTRANEOUS_DATA_CHECK(len, curr_offset - offset, pinfo, &ei_gsm_a_gm_extraneous_data);
6564
6565
3
  return (curr_offset - offset);
6566
3
}
6567
6568
/*
6569
 * [9] 10.5.6.16 Enhanced network service access point identifier
6570
 */
6571
static uint16_t
6572
de_sm_enh_nsapi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len _U_, char *add_string _U_, int string_len _U_)
6573
17
{
6574
17
  uint8_t      oct;
6575
17
  const char *str;
6576
6577
17
  oct = tvb_get_uint8(tvb, offset);
6578
6579
17
  if(oct < 0x80)
6580
16
    str = "Reserved";
6581
1
  else if (oct < 0xff)
6582
1
      str = wmem_strdup_printf(pinfo->pool, "NSAPI %u for Multimedia Broadcast/Multicast Service (MBMS) Multicast mode", oct);
6583
0
    else
6584
0
      str = "Reserved for use by lower layers in the p2p radio bearer allocation message for MBMS Broadcast mode";
6585
6586
6587
17
  proto_tree_add_uint_format_value(tree, hf_gsm_a_sm_enh_nsapi, tvb,
6588
17
    offset, 1, oct, "%s (%u)", str, oct);
6589
6590
  /* no length check possible */
6591
17
  return 1;
6592
17
}
6593
6594
/*
6595
 * [9] 10.5.6.17 Request type
6596
 */
6597
static const value_string gsm_a_sm_req_type_vals[] = {
6598
  { 0x01, "Initial request" },
6599
  { 0x02, "Handover" },
6600
  { 0x03, "RLOS" },
6601
  { 0x04, "Emergency" },
6602
  { 0x06, "Handover of emergency bearer services" },
6603
  { 0, NULL }
6604
};
6605
6606
static uint16_t
6607
de_sm_req_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_)
6608
1
{
6609
1
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset<<3) + 4, 1, ENC_BIG_ENDIAN);
6610
1
  proto_tree_add_item(tree, hf_gsm_a_sm_req_type, tvb, offset, 1, ENC_BIG_ENDIAN);
6611
6612
  /* no length check possible */
6613
1
  return 1;
6614
1
}
6615
6616
/*
6617
 * [9] 10.5.6.18 Notification indicator
6618
 */
6619
static const value_string gsm_a_sm_notif_ind_vals[] = {
6620
  { 0x0,  "Reserved"},
6621
  { 0x1,  "SRVCC handover cancelled, IMS session re-establishment required"},
6622
  { 0, NULL }
6623
};
6624
6625
static uint16_t
6626
de_sm_notif_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6627
1
{
6628
1
  uint32_t  curr_offset;
6629
6630
1
  curr_offset = offset;
6631
6632
1
  proto_tree_add_item(tree, hf_gsm_a_sm_notif_ind, tvb, curr_offset, 1, ENC_BIG_ENDIAN);
6633
6634
1
  return (len);
6635
1
}
6636
6637
/*
6638
 * [10] 10.5.6.19 Connectivity type
6639
 */
6640
static const range_string gsm_a_sm_connectivity_type_vals[] = {
6641
  { 0x0,  0x0, "The PDN connection type is not indicated"},
6642
  { 0x1,  0x1, "The PDN connection is considered a LIPA PDN connection"},
6643
  { 0x2,  0xF, "The PDN connection type is not indicated"},
6644
  { 0, 0, NULL }
6645
};
6646
6647
static uint16_t
6648
de_sm_connectivity_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6649
1
{
6650
1
  proto_tree_add_item(tree, hf_gsm_a_sm_connectivity_type, tvb, offset, 1, ENC_BIG_ENDIAN);
6651
6652
1
  return (len);
6653
1
}
6654
6655
/*
6656
 * [12] 10.5.6.20 WLAN offload acceptability
6657
 */
6658
static const true_false_string gsm_a_sm_wlan_utran_offload_accept_value = {
6659
  "Offloading the traffic of the PDN connection via a WLAN when in Iu mode is acceptable",
6660
  "Offloading the traffic of the PDN connection via a WLAN when in Iu mode is not acceptable"
6661
};
6662
6663
static const true_false_string gsm_a_sm_wlan_eutran_offload_accept_value = {
6664
  "Offloading the traffic of the PDN connection via a WLAN when in S1 mode is acceptable",
6665
  "Offloading the traffic of the PDN connection via a WLAN when in S1 mode is not acceptable"
6666
};
6667
6668
static uint16_t
6669
de_sm_wlan_offload_accept(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6670
6
{
6671
6
  proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (offset<<3)+4, 2, ENC_BIG_ENDIAN);
6672
6
  proto_tree_add_bits_item(tree, hf_gsm_a_sm_wlan_utran_offload_accept, tvb, (offset<<3)+6, 1, ENC_BIG_ENDIAN);
6673
6
  proto_tree_add_bits_item(tree, hf_gsm_a_sm_wlan_eutran_offload_accept, tvb, (offset<<3)+7, 1, ENC_BIG_ENDIAN);
6674
6675
6
  return (len);
6676
6
}
6677
6678
/*
6679
 * [13] 10.5.6.21 NBIFOM container
6680
 */
6681
static uint16_t
6682
de_sm_nbifom_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string _U_, int string_len _U_)
6683
67
{
6684
67
  if (nbifom_handle) {
6685
67
    tvbuff_t *nbifom_tvb = tvb_new_subset_length(tvb, offset, len);
6686
6687
67
    call_dissector(nbifom_handle, nbifom_tvb, pinfo, tree);
6688
67
  } else {
6689
0
    proto_tree_add_item(tree, hf_gsm_a_sm_nbifom_cont, tvb, offset, len, ENC_NA);
6690
0
  }
6691
6692
67
  return len;
6693
67
}
6694
6695
uint16_t (*gm_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, uint32_t offset, unsigned len, char *add_string, int string_len) = {
6696
  /* GPRS Mobility Management Information Elements 10.5.5 */
6697
  de_gmm_add_upd_type,               /* Additional Update Type */
6698
  de_gmm_attach_res,                 /* Attach Result */
6699
  de_gmm_attach_type,                /* Attach Type */
6700
  de_gmm_ciph_alg,                   /* Ciphering Algorithm */
6701
  de_gmm_integ_alg,                  /* Integrity Algorithm */
6702
  de_gmm_tmsi_stat,                  /* TMSI Status */
6703
  de_gmm_detach_type,                /* Detach Type */
6704
  de_gmm_drx_param,                  /* DRX Parameter */
6705
  de_gmm_ftostby,                    /* Force to Standby */
6706
  de_gmm_ftostby_h,                  /* Force to Standby - Info is in the high nibble */
6707
  de_gmm_ptmsi_sig,                  /* P-TMSI Signature */
6708
  de_gmm_ptmsi_sig2,                 /* P-TMSI Signature 2 */
6709
  de_gmm_ident_type2,                /* Identity Type 2 */
6710
  de_gmm_imeisv_req,                 /* IMEISV Request */
6711
  de_gmm_rec_npdu_lst,               /* Receive N-PDU Numbers List */
6712
  de_gmm_ms_net_cap,                 /* MS Network Capability */
6713
  de_gmm_ms_radio_acc_cap,           /* MS Radio Access Capability */
6714
  de_gmm_cause,                      /* GMM Cause */
6715
  de_gmm_rai,                        /* Routing Area Identification */
6716
  de_gmm_rai2,                       /* Routing Area Identification 2 */
6717
  de_gmm_update_res,                 /* Update Result */
6718
  de_gmm_update_type,                /* Update Type */
6719
  de_gmm_ac_ref_nr,                  /* A&C Reference Number */
6720
  de_gmm_ac_ref_nr_h,                /* A&C Reference Number - Info is in the high nibble */
6721
  de_gmm_service_type,               /* Service Type */
6722
  NULL  /* no associated data */,    /* Cell Notification */
6723
  de_gmm_ps_lcs_cap,                 /* PS LCS Capability */
6724
  de_gmm_net_feat_supp,              /* Network Feature Support */
6725
  de_gmm_add_net_feat_supp,          /* Network Feature Support */
6726
  de_gmm_rat_info_container,         /* Inter RAT information container */
6727
  de_gmm_req_ms_info,                /* Requested MS information */
6728
  NULL,                              /* UE network capability */
6729
  de_gmm_eutran_irat_info_container, /* E-UTRAN inter RAT information container */
6730
  de_gmm_voice_domain_pref,          /* Voice domain preference and UE's usage setting */
6731
  de_gmm_ptmsi_type,                 /* P-TMSI type */
6732
  de_gmm_lai_2,                      /* Location Area Identification 2 */
6733
  de_gmm_net_res_id_cont,            /* Network resource identifier container */
6734
  de_gmm_ext_drx_params,             /* Extended DRX parameters */
6735
  de_gmm_mac,                        /* Message authentication code */
6736
  de_gmm_up_integ_ind,               /* User Plane integrity indicator */
6737
  de_gmm_dcn_id,                     /* DCN-ID */
6738
  de_gmm_plmn_id_cn_operator,        /* PLMN identity of the CN operator */
6739
  de_gmm_non_3gpp_nw_prov_pol,       /* Non-3GPP NW provided policies */
6740
  /* Session Management Information Elements 10.5.6 */
6741
  de_sm_apn,                         /* Access Point Name */
6742
  de_sm_nsapi,                       /* Network Service Access Point Identifier */
6743
  de_sm_pco,                         /* Protocol Configuration Options */
6744
  de_sm_pco,                         /* Extended Protocol Configuration Options */
6745
  de_sm_pdp_addr,                    /* Packet Data Protocol Address */
6746
  de_sm_qos,                         /* Quality Of Service */
6747
  de_sm_re_attempt_ind,              /* Re-attempt indicator */
6748
  de_sm_ext_qos,                     /* Extended quality of service */
6749
  de_sm_cause,                       /* SM Cause */
6750
  de_sm_cause_2,                     /* SM Cause 2 */
6751
  de_sm_linked_ti,                   /* Linked TI */
6752
  de_sm_sapi,                        /* LLC Service Access Point Identifier */
6753
  de_sm_tear_down,                   /* Tear Down Indicator */
6754
  de_sm_pflow_id,                    /* Packet Flow Identifier */
6755
  de_sm_tflow_temp,                  /* Traffic Flow Template */
6756
  de_sm_tmgi,                        /* Temporary Mobile Group Identity (TMGI) */
6757
  de_sm_mbms_bearer_cap,             /* MBMS bearer capabilities */
6758
  de_sm_mbms_prot_conf_opt,          /* MBMS protocol configuration options */
6759
  de_sm_enh_nsapi,                   /* Enhanced network service access point identifier */
6760
  de_sm_req_type,                    /* Request type */
6761
  de_sm_notif_ind,                   /* Notification indicator */
6762
  de_sm_connectivity_type,           /* Connectivity type */
6763
  de_sm_wlan_offload_accept,         /* WLAN offload acceptability */
6764
  de_sm_nbifom_cont,                 /* NBIFOM container */
6765
  /* GPRS Common Information Elements 10.5.7 */
6766
  de_gc_context_stat,                /* PDP Context Status */
6767
  de_gc_radio_prio,                  /* Radio Priority */
6768
  de_gc_timer,                       /* GPRS Timer */
6769
  de_gc_timer2,                      /* GPRS Timer 2 */
6770
  de_gc_timer3,                      /* GPRS Timer 3 */
6771
  de_gc_radio_prio2,                 /* Radio Priority 2 */
6772
  de_gc_mbms_context_stat,           /* 10.5.7.6 MBMS context status */
6773
  de_gc_uplink_data_stat,            /* 10.5.7.7 Uplink data status */
6774
  de_gc_device_properties,           /* 10.5.7.8 Device properties */
6775
  NULL, /* NONE */
6776
};
6777
6778
/* MESSAGE FUNCTIONS */
6779
6780
/*
6781
 * [7] 9.4.1
6782
 */
6783
static void
6784
dtap_gmm_attach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6785
126
{
6786
126
  uint32_t  curr_offset;
6787
126
  uint32_t  consumed;
6788
126
  unsigned  curr_len;
6789
6790
126
  curr_offset = offset;
6791
126
  curr_len    = len;
6792
6793
126
  pinfo->p2p_dir = P2P_DIR_RECV;
6794
6795
126
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP, NULL, ei_gsm_a_gm_missing_mandatory_element);
6796
6797
126
  ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_ATTACH_TYPE, GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, ei_gsm_a_gm_missing_mandatory_element);
6798
6799
126
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_DRX_PARAM, NULL, ei_gsm_a_gm_missing_mandatory_element);
6800
6801
126
  ELEM_MAND_LV( GSM_A_PDU_TYPE_COMMON, DE_MID, NULL, ei_gsm_a_gm_missing_mandatory_element);
6802
6803
126
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAI, " - Old routing area identification", ei_gsm_a_gm_missing_mandatory_element);
6804
6805
126
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP, NULL, ei_gsm_a_gm_missing_mandatory_element);
6806
6807
126
  ELEM_OPT_TV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - Old P-TMSI Signature");
6808
6809
118
  ELEM_OPT_TV( 0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Ready Timer");
6810
6811
118
  ELEM_OPT_TV_SHORT( 0x90, GSM_A_PDU_TYPE_GM, DE_TMSI_STAT, NULL);
6812
6813
118
  ELEM_OPT_TLV( 0x33, GSM_A_PDU_TYPE_GM, DE_PS_LCS_CAP, NULL);
6814
6815
118
  ELEM_OPT_TLV( 0x11, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL);
6816
6817
118
  ELEM_OPT_TLV( 0x20, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_3, NULL);
6818
6819
118
  ELEM_OPT_TLV( 0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, NULL);
6820
6821
118
  ELEM_OPT_TLV( 0x58, NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL);
6822
6823
118
  ELEM_OPT_TLV( 0x1A, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Additional mobile identity");
6824
6825
118
  ELEM_OPT_TLV( 0x1B, GSM_A_PDU_TYPE_GM, DE_RAI_2, " - Additional old routing area identification");
6826
6827
118
  ELEM_OPT_TLV( 0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL);
6828
6829
118
  ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
6830
6831
118
  ELEM_OPT_TV_SHORT(0xE0, GSM_A_PDU_TYPE_GM, DE_PTMSI_TYPE, NULL);
6832
6833
118
  ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_COMMON, DE_MS_NET_FEAT_SUP, NULL);
6834
6835
118
  ELEM_OPT_TLV(0x14, GSM_A_PDU_TYPE_GM, DE_LAI_2, " - Old location area identification");
6836
6837
118
  ELEM_OPT_TV_SHORT(0xF0, GSM_A_PDU_TYPE_GM, DE_ADD_UPD_TYPE, NULL);
6838
6839
118
  ELEM_OPT_TLV(0x10, GSM_A_PDU_TYPE_GM, DE_NET_RES_ID_CONT, " - TMSI based NRI container");
6840
6841
118
  ELEM_OPT_TLV(0x6A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3324 value");
6842
6843
117
  ELEM_OPT_TLV(0x39, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3312 extended value");
6844
6845
117
  ELEM_OPT_TLV(0x6E, GSM_A_PDU_TYPE_GM, DE_EXT_DRX_PARAMS, NULL);
6846
6847
117
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
6848
117
}
6849
6850
/*
6851
 * [7] 9.4.2
6852
 */
6853
static void
6854
dtap_gmm_attach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6855
39
{
6856
39
  uint32_t  curr_offset;
6857
39
  uint32_t  consumed;
6858
39
  unsigned  curr_len;
6859
6860
39
  curr_offset = offset;
6861
39
  curr_len    = len;
6862
6863
39
  pinfo->p2p_dir = P2P_DIR_SENT;
6864
6865
39
  ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_ATTACH_RES, GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, ei_gsm_a_gm_missing_mandatory_element);
6866
6867
39
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, NULL, ei_gsm_a_gm_missing_mandatory_element);
6868
6869
39
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAD_PRIO_2, " - Radio priority for TOM8", ei_gsm_a_gm_missing_mandatory_element);
6870
39
  curr_len++;
6871
39
  curr_offset--;
6872
6873
39
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, " - Radio priority for SMS", ei_gsm_a_gm_missing_mandatory_element);
6874
6875
39
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAI, NULL, ei_gsm_a_gm_missing_mandatory_element);
6876
6877
39
  ELEM_OPT_TV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, NULL);
6878
6879
38
  ELEM_OPT_TV( 0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Negotiated Ready Timer");
6880
6881
38
  ELEM_OPT_TLV( 0x18, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Allocated P-TMSI");
6882
6883
38
  ELEM_OPT_TLV( 0x23, GSM_A_PDU_TYPE_COMMON, DE_MID, NULL);
6884
6885
38
  ELEM_OPT_TV( 0x25, GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
6886
6887
37
  ELEM_OPT_TLV( 0x2A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3302 value");
6888
6889
37
  ELEM_OPT_T( 0x8C, GSM_A_PDU_TYPE_GM, DE_CELL_NOT, NULL);
6890
6891
37
  ELEM_OPT_TLV( 0x4A, GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST, NULL);
6892
6893
37
  ELEM_OPT_TV_SHORT( 0xB0, GSM_A_PDU_TYPE_GM, DE_NET_FEAT_SUP, NULL);
6894
6895
37
  ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST, NULL);
6896
6897
37
  ELEM_OPT_TV_SHORT( 0xA0, GSM_A_PDU_TYPE_GM, DE_REQ_MS_INFO, NULL);
6898
6899
37
  ELEM_OPT_TLV( 0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3319 value");
6900
6901
37
  ELEM_OPT_TLV( 0x38, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3323 value" );
6902
6903
37
  ELEM_OPT_TLV(0x39, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3312 extended value");
6904
6905
37
  ELEM_OPT_TLV(0x66, GSM_A_PDU_TYPE_GM, DE_ADD_NET_FEAT_SUP, NULL);
6906
6907
37
  ELEM_OPT_TLV(0x6A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3324 value");
6908
6909
37
  ELEM_OPT_TLV(0x6E, GSM_A_PDU_TYPE_GM, DE_EXT_DRX_PARAMS, NULL);
6910
6911
37
  ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_GM, DE_UP_INTEG_IND, NULL);
6912
6913
37
  ELEM_OPT_TLV(0x31, GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP, " - Replayed MS network capability");
6914
6915
37
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP, " - Replayed MS Radio Access capability");
6916
6917
37
  ELEM_OPT_TLV(0x65, GSM_A_PDU_TYPE_GM, DE_DCN_ID, NULL);
6918
6919
36
  ELEM_OPT_TLV(0x63, GSM_A_PDU_TYPE_GM, DE_PLMN_ID_CN_OPERATOR, NULL);
6920
6921
36
  ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_NON_3GPP_NW_PROV_POL, NULL);
6922
6923
36
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
6924
36
}
6925
6926
/*
6927
 * [7] 9.4.3
6928
 */
6929
static void
6930
dtap_gmm_attach_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6931
39
{
6932
6933
39
  uint32_t  curr_offset;
6934
39
  uint32_t  consumed;
6935
39
  unsigned  curr_len;
6936
6937
39
  curr_offset = offset;
6938
39
  curr_len    = len;
6939
6940
39
  pinfo->p2p_dir = P2P_DIR_RECV;
6941
6942
39
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_RAT_INFO_CONTAINER, " - Inter RAT handover information");
6943
6944
39
  ELEM_OPT_TLV( 0x2B, GSM_A_PDU_TYPE_GM, DE_EUTRAN_IRAT_INFO_CONTAINER, " - E-UTRAN inter RAT handover information");
6945
6946
39
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
6947
39
}
6948
6949
/*
6950
 * [7] 9.4.4
6951
 */
6952
static void
6953
dtap_gmm_attach_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6954
1
{
6955
1
  uint32_t  curr_offset;
6956
1
  uint32_t  consumed;
6957
1
  unsigned  curr_len;
6958
6959
1
  curr_offset = offset;
6960
1
  curr_len    = len;
6961
6962
1
  pinfo->p2p_dir = P2P_DIR_SENT;
6963
6964
1
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
6965
6966
1
  ELEM_OPT_TLV( 0x2A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3302 value" );
6967
6968
1
  ELEM_OPT_TLV(0x3A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
6969
6970
1
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
6971
1
}
6972
6973
/*
6974
 * [7] 9.4.5
6975
 */
6976
static void
6977
dtap_gmm_detach_req_MT(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6978
0
{
6979
0
  uint32_t  curr_offset;
6980
0
  uint32_t  consumed;
6981
0
  unsigned  curr_len;
6982
6983
0
  curr_offset = offset;
6984
0
  curr_len    = len;
6985
6986
0
  pinfo->p2p_dir = P2P_DIR_SENT;
6987
6988
0
  ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_DETACH_TYPE, GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, ei_gsm_a_gm_missing_mandatory_element);
6989
6990
0
  ELEM_OPT_TV( 0x25, GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
6991
6992
0
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
6993
0
}
6994
6995
static void
6996
dtap_gmm_detach_req_MO(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
6997
1
{
6998
1
  uint32_t  curr_offset;
6999
1
  uint32_t  consumed;
7000
1
  unsigned  curr_len;
7001
7002
1
  curr_offset = offset;
7003
1
  curr_len    = len;
7004
7005
1
  pinfo->p2p_dir = P2P_DIR_RECV;
7006
7007
1
  ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_DETACH_TYPE, GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, ei_gsm_a_gm_missing_mandatory_element);
7008
7009
1
  ELEM_OPT_TLV( 0x18, GSM_A_PDU_TYPE_COMMON, DE_MID, NULL);
7010
7011
1
  ELEM_OPT_TLV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG_2, NULL);
7012
7013
1
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7014
1
}
7015
7016
static void
7017
dtap_gmm_detach_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7018
1
{
7019
1
  if (pinfo->link_dir == P2P_DIR_UL) {
7020
0
    dtap_gmm_detach_req_MO(tvb, tree, pinfo, offset, len);
7021
0
    return;
7022
1
  }else if (pinfo->link_dir == P2P_DIR_DL) {
7023
0
    dtap_gmm_detach_req_MT(tvb, tree, pinfo, offset, len);
7024
0
    return;
7025
1
  } else {
7026
    /* Unknown direction. Try heuristics based on message length. */
7027
1
    if (len > 5) {
7028
1
      dtap_gmm_detach_req_MO(tvb, tree, pinfo, offset, len);
7029
1
    } else {
7030
0
      dtap_gmm_detach_req_MT(tvb, tree, pinfo, offset, len);
7031
0
    }
7032
1
  }
7033
1
}
7034
7035
/*
7036
 * [7] 9.4.6
7037
 */
7038
static void
7039
dtap_gmm_detach_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7040
3
{
7041
3
  uint32_t  curr_offset;
7042
3
  unsigned  curr_len;
7043
7044
3
  curr_offset = offset;
7045
3
  curr_len    = len;
7046
7047
3
  pinfo->p2p_dir = P2P_DIR_RECV;
7048
7049
3
  if (curr_len == 0) {
7050
1
    return;
7051
1
  }
7052
7053
2
  ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, ei_gsm_a_gm_missing_mandatory_element);
7054
7055
2
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7056
2
}
7057
7058
/*
7059
 * [7] 9.4.7
7060
 */
7061
static void
7062
dtap_gmm_ptmsi_realloc_cmd(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7063
8
{
7064
8
  uint32_t  curr_offset;
7065
8
  uint32_t  consumed;
7066
8
  unsigned  curr_len;
7067
7068
8
  curr_offset = offset;
7069
8
  curr_len    = len;
7070
7071
8
  pinfo->p2p_dir = P2P_DIR_SENT;
7072
7073
8
  ELEM_MAND_LV( GSM_A_PDU_TYPE_COMMON, DE_MID, " - Allocated P-TMSI", ei_gsm_a_gm_missing_mandatory_element);
7074
7075
8
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAI, NULL, ei_gsm_a_gm_missing_mandatory_element);
7076
7077
8
  ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, ei_gsm_a_gm_missing_mandatory_element);
7078
7079
8
  ELEM_OPT_TV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - P-TMSI Signature" );
7080
7081
7
  ELEM_OPT_TLV(0x65, GSM_A_PDU_TYPE_GM, DE_DCN_ID, NULL);
7082
7083
7
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7084
7
}
7085
7086
/*
7087
 * [7] 9.4.8
7088
 */
7089
static void
7090
dtap_gmm_ptmsi_realloc_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7091
2
{
7092
2
  uint32_t  curr_offset;
7093
/*    uint32_t  consumed; */
7094
2
  unsigned  curr_len;
7095
7096
2
  curr_offset = offset;
7097
2
  curr_len    = len;
7098
7099
2
  pinfo->p2p_dir = P2P_DIR_RECV;
7100
7101
2
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7102
2
}
7103
7104
/*
7105
 * [7] 9.4.9
7106
 */
7107
static void
7108
dtap_gmm_auth_ciph_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7109
3
{
7110
3
  uint32_t  curr_offset;
7111
3
  uint32_t  consumed;
7112
3
  unsigned   curr_len;
7113
7114
3
  curr_offset = offset;
7115
3
  curr_len    = len;
7116
7117
3
  pinfo->p2p_dir = P2P_DIR_SENT;
7118
7119
3
  ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_CIPH_ALG, GSM_A_PDU_TYPE_GM, DE_IMEISV_REQ, ei_gsm_a_gm_missing_mandatory_element);
7120
7121
3
  ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, GSM_A_PDU_TYPE_GM, DE_AC_REF_NUM_H, ei_gsm_a_gm_missing_mandatory_element);
7122
7123
3
  ELEM_OPT_TV(0x21, GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_RAND, NULL);
7124
7125
2
  ELEM_OPT_TV_SHORT(0x80, GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, NULL);
7126
7127
2
  ELEM_OPT_TLV(0x28, GSM_A_PDU_TYPE_DTAP, DE_AUTH_PARAM_AUTN, NULL);
7128
7129
1
  ELEM_OPT_TLV(0x31, GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP, " - Replayed MS network capability");
7130
7131
1
  ELEM_OPT_TLV(0x42, GSM_A_PDU_TYPE_GM, DE_INTEG_ALG, NULL);
7132
7133
1
  ELEM_OPT_TLV(0x43, GSM_A_PDU_TYPE_GM, DE_MAC, NULL);
7134
7135
1
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP, " - Replayed MS Radio Access capability");
7136
7137
1
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7138
1
}
7139
7140
/*
7141
 * [7] 9.4.10
7142
 */
7143
static void
7144
dtap_gmm_auth_ciph_resp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7145
1
{
7146
1
  uint32_t  curr_offset;
7147
1
  uint32_t  consumed;
7148
1
  unsigned  curr_len;
7149
7150
1
  curr_offset = offset;
7151
1
  curr_len    = len;
7152
7153
1
  pinfo->p2p_dir = P2P_DIR_RECV;
7154
7155
1
  ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_AC_REF_NUM, GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, ei_gsm_a_gm_missing_mandatory_element);
7156
7157
1
  ELEM_OPT_TV(0x22, GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM, NULL);
7158
7159
1
  ELEM_OPT_TLV(0x23, GSM_A_PDU_TYPE_COMMON, DE_MID, " - IMEISV" );
7160
7161
1
  ELEM_OPT_TLV(0x29, GSM_A_PDU_TYPE_DTAP, DE_AUTH_RESP_PARAM_EXT, NULL);
7162
7163
1
  ELEM_OPT_TLV(0x43, GSM_A_PDU_TYPE_GM, DE_MAC, NULL);
7164
7165
1
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7166
1
}
7167
7168
/*
7169
 * [7] 9.4.11
7170
 */
7171
static void
7172
dtap_gmm_auth_ciph_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7173
3
{
7174
3
  uint32_t  curr_offset;
7175
3
  unsigned  curr_len;
7176
7177
3
  curr_offset = offset;
7178
3
  curr_len    = len;
7179
7180
3
  pinfo->p2p_dir = P2P_DIR_SENT;
7181
7182
3
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7183
3
}
7184
7185
/*
7186
 * [7] 9.4.10a
7187
 */
7188
static void
7189
dtap_gmm_auth_ciph_fail(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7190
3
{
7191
3
  uint32_t  curr_offset;
7192
3
  uint32_t  consumed;
7193
3
  unsigned  curr_len;
7194
7195
3
  curr_offset = offset;
7196
3
  curr_len    = len;
7197
7198
3
  pinfo->p2p_dir = P2P_DIR_RECV;
7199
7200
3
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7201
7202
3
  ELEM_OPT_TLV( 0x30, GSM_A_PDU_TYPE_DTAP, DE_AUTH_FAIL_PARAM, NULL);
7203
7204
3
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7205
3
}
7206
7207
/*
7208
 * [7] 9.4.12
7209
 */
7210
static void
7211
dtap_gmm_ident_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7212
1
{
7213
1
  uint32_t  curr_offset;
7214
1
  unsigned  curr_len;
7215
7216
1
  curr_offset = offset;
7217
1
  curr_len    = len;
7218
7219
1
  pinfo->p2p_dir = P2P_DIR_SENT;
7220
7221
1
  ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_ID_TYPE_2, GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND_H, ei_gsm_a_gm_missing_mandatory_element);
7222
7223
1
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7224
1
}
7225
7226
/*
7227
 * [7] 9.4.13
7228
 */
7229
static void
7230
dtap_gmm_ident_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7231
3
{
7232
3
  uint32_t  curr_offset;
7233
3
  uint32_t  consumed;
7234
3
  unsigned  curr_len;
7235
7236
3
  curr_offset = offset;
7237
3
  curr_len    = len;
7238
7239
3
  pinfo->p2p_dir = P2P_DIR_RECV;
7240
7241
3
  ELEM_MAND_LV( GSM_A_PDU_TYPE_COMMON, DE_MID, NULL, ei_gsm_a_gm_missing_mandatory_element);
7242
7243
3
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7244
3
}
7245
7246
/*
7247
 * [7] 9.4.14
7248
 */
7249
static void
7250
dtap_gmm_rau_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7251
474
{
7252
474
  uint32_t  curr_offset;
7253
474
  uint32_t  consumed;
7254
474
  unsigned  curr_len;
7255
7256
474
  curr_offset = offset;
7257
474
  curr_len    = len;
7258
7259
474
  pinfo->p2p_dir = P2P_DIR_RECV;
7260
7261
474
  ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_UPD_TYPE, GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, ei_gsm_a_gm_missing_mandatory_element);
7262
7263
474
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAI, " - Old routing area identification", ei_gsm_a_gm_missing_mandatory_element);
7264
7265
474
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP, NULL, ei_gsm_a_gm_missing_mandatory_element);
7266
7267
474
  ELEM_OPT_TV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, " - Old P-TMSI Signature" );
7268
7269
462
  ELEM_OPT_TV( 0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Requested Ready Timer" );
7270
7271
461
  ELEM_OPT_TV( 0x27, GSM_A_PDU_TYPE_GM, DE_DRX_PARAM, NULL);
7272
7273
461
  ELEM_OPT_TV_SHORT( 0x90, GSM_A_PDU_TYPE_GM, DE_TMSI_STAT, NULL);
7274
7275
461
  ELEM_OPT_TLV( 0x18, GSM_A_PDU_TYPE_COMMON, DE_MID, " - P-TMSI" );
7276
7277
461
  ELEM_OPT_TLV( 0x31, GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP, NULL);
7278
7279
460
  ELEM_OPT_TLV( 0x32, GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT, NULL);
7280
7281
460
  ELEM_OPT_TLV( 0x33, GSM_A_PDU_TYPE_GM, DE_PS_LCS_CAP, NULL);
7282
7283
460
  ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS, NULL);
7284
7285
460
  ELEM_OPT_TLV( 0x58, NAS_PDU_TYPE_EMM, DE_EMM_UE_NET_CAP, NULL);
7286
7287
459
  ELEM_OPT_TLV( 0x1A, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Additional mobile identity");
7288
7289
459
  ELEM_OPT_TLV( 0x1B, GSM_A_PDU_TYPE_GM, DE_RAI_2, " - Additional old routing area identification");
7290
7291
458
  ELEM_OPT_TLV( 0x11, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_2, NULL);
7292
7293
458
  ELEM_OPT_TLV( 0x20, GSM_A_PDU_TYPE_COMMON, DE_MS_CM_3, NULL);
7294
7295
458
  ELEM_OPT_TLV( 0x40, GSM_A_PDU_TYPE_DTAP, DE_SUP_CODEC_LIST, NULL);
7296
7297
458
  ELEM_OPT_TLV( 0x5D, GSM_A_PDU_TYPE_GM, DE_VOICE_DOMAIN_PREF, NULL);
7298
7299
457
  ELEM_OPT_TV_SHORT(0xE0, GSM_A_PDU_TYPE_GM, DE_PTMSI_TYPE, NULL);
7300
7301
457
  ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
7302
7303
456
  ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_COMMON, DE_MS_NET_FEAT_SUP, NULL);
7304
7305
456
  ELEM_OPT_TLV(0x14, GSM_A_PDU_TYPE_GM, DE_LAI_2, " - Old location area identification");
7306
7307
455
  ELEM_OPT_TV_SHORT(0xF0, GSM_A_PDU_TYPE_GM, DE_ADD_UPD_TYPE, NULL);
7308
7309
455
  ELEM_OPT_TLV(0x10, GSM_A_PDU_TYPE_GM, DE_NET_RES_ID_CONT, " - TMSI based NRI container");
7310
7311
454
  ELEM_OPT_TLV(0x6A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3324 value");
7312
7313
452
  ELEM_OPT_TLV(0x39, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3312 extended value");
7314
7315
452
  ELEM_OPT_TLV(0x6E, GSM_A_PDU_TYPE_GM, DE_EXT_DRX_PARAMS, NULL);
7316
7317
452
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7318
452
}
7319
7320
/*
7321
 * [7] 9.4.15
7322
 */
7323
static void
7324
dtap_gmm_rau_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7325
17
{
7326
17
  uint32_t  curr_offset;
7327
17
  uint32_t  consumed;
7328
17
  unsigned  curr_len;
7329
7330
17
  curr_offset = offset;
7331
17
  curr_len    = len;
7332
7333
17
  pinfo->p2p_dir = P2P_DIR_SENT;
7334
7335
17
  ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, GSM_A_PDU_TYPE_GM, DE_UPD_RES, ei_gsm_a_gm_missing_mandatory_element);
7336
7337
17
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Periodic RA update timer", ei_gsm_a_gm_missing_mandatory_element);
7338
7339
17
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAI, NULL, ei_gsm_a_gm_missing_mandatory_element);
7340
7341
17
  ELEM_OPT_TV( 0x19, GSM_A_PDU_TYPE_GM, DE_P_TMSI_SIG, NULL);
7342
7343
15
  ELEM_OPT_TLV( 0x18, GSM_A_PDU_TYPE_COMMON, DE_MID, " - Allocated P-TMSI");
7344
7345
15
  ELEM_OPT_TLV( 0x23, GSM_A_PDU_TYPE_COMMON, DE_MID, " - MS identity");
7346
7347
15
  ELEM_OPT_TLV( 0x26, GSM_A_PDU_TYPE_GM, DE_REC_N_PDU_NUM_LIST, NULL);
7348
7349
15
  ELEM_OPT_TV( 0x17, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER, " - Negotiated Ready Timer" );
7350
7351
15
  ELEM_OPT_TV( 0x25, GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL);
7352
7353
15
  ELEM_OPT_TLV( 0x2A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3302 value" );
7354
7355
15
  ELEM_OPT_T( 0x8C, GSM_A_PDU_TYPE_GM, DE_CELL_NOT, NULL);
7356
7357
15
  ELEM_OPT_TLV( 0x4A, GSM_A_PDU_TYPE_COMMON, DE_PLMN_LIST, NULL);
7358
7359
15
  ELEM_OPT_TLV( 0x32, GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT, NULL);
7360
7361
15
  ELEM_OPT_TV_SHORT( 0xB0, GSM_A_PDU_TYPE_GM, DE_NET_FEAT_SUP, NULL);
7362
7363
15
  ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_DTAP, DE_EMERGENCY_NUM_LIST, NULL);
7364
7365
15
  ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS, NULL);
7366
7367
15
  ELEM_OPT_TV_SHORT( 0xA0, GSM_A_PDU_TYPE_GM, DE_REQ_MS_INFO, NULL);
7368
7369
15
  ELEM_OPT_TLV( 0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3319 value");
7370
7371
15
  ELEM_OPT_TLV( 0x38, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3323 value");
7372
7373
15
  ELEM_OPT_TLV(0x39, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3312 extended value");
7374
7375
15
  ELEM_OPT_TLV(0x66, GSM_A_PDU_TYPE_GM, DE_ADD_NET_FEAT_SUP, NULL);
7376
7377
15
  ELEM_OPT_TLV(0x6A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3324 value");
7378
7379
15
  ELEM_OPT_TLV(0x6E, GSM_A_PDU_TYPE_GM, DE_EXT_DRX_PARAMS, NULL);
7380
7381
15
  ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_GM, DE_UP_INTEG_IND, NULL);
7382
7383
15
  ELEM_OPT_TLV(0x31, GSM_A_PDU_TYPE_GM, DE_MS_NET_CAP, " - Replayed MS network capability");
7384
7385
15
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_MS_RAD_ACC_CAP, " - Replayed MS Radio Access capability");
7386
7387
15
  ELEM_OPT_TLV(0x65, GSM_A_PDU_TYPE_GM, DE_DCN_ID, NULL);
7388
7389
15
  ELEM_OPT_TLV(0x63, GSM_A_PDU_TYPE_GM, DE_PLMN_ID_CN_OPERATOR, NULL);
7390
7391
15
  ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_NON_3GPP_NW_PROV_POL, NULL);
7392
7393
15
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7394
15
}
7395
7396
/*
7397
 * [7] 9.4.16
7398
 */
7399
static void
7400
dtap_gmm_rau_com(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7401
1
{
7402
1
  uint32_t  curr_offset;
7403
1
  uint32_t  consumed;
7404
1
  unsigned  curr_len;
7405
7406
1
  curr_offset = offset;
7407
1
  curr_len    = len;
7408
7409
1
  pinfo->p2p_dir = P2P_DIR_RECV;
7410
  /* [7] 10.5.5.11 */
7411
1
  ELEM_OPT_TLV( 0x26, GSM_A_PDU_TYPE_GM, DE_REC_N_PDU_NUM_LIST, NULL);
7412
  /* Inter RAT information container 10.5.5.24 TS 24.008 version 6.8.0 Release 6 */
7413
1
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_RAT_INFO_CONTAINER, " - Inter RAT handover information");
7414
7415
1
  ELEM_OPT_TLV( 0x2B, GSM_A_PDU_TYPE_GM, DE_EUTRAN_IRAT_INFO_CONTAINER, " - E-UTRAN inter RAT handover information");
7416
7417
1
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7418
1
}
7419
7420
/*
7421
 * [7] 9.4.17
7422
 */
7423
static void
7424
dtap_gmm_rau_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7425
3
{
7426
3
  uint32_t  curr_offset;
7427
3
  uint32_t  consumed;
7428
3
  unsigned  curr_len;
7429
7430
3
  curr_offset = offset;
7431
3
  curr_len    = len;
7432
7433
3
  pinfo->p2p_dir = P2P_DIR_SENT;
7434
7435
3
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7436
7437
3
  ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_GM, DE_FORCE_TO_STAND, GSM_A_PDU_TYPE_COMMON, DE_SPARE_NIBBLE, ei_gsm_a_gm_missing_mandatory_element);
7438
7439
3
  ELEM_OPT_TLV(0x2A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3302 value");
7440
7441
3
  ELEM_OPT_TLV(0x3A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
7442
7443
3
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7444
3
}
7445
7446
/*
7447
 * [7] 9.4.18
7448
 */
7449
static void
7450
dtap_gmm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7451
4
{
7452
4
  uint32_t  curr_offset;
7453
4
  uint32_t  consumed;
7454
4
  unsigned  curr_len;
7455
7456
4
  curr_offset = offset;
7457
4
  curr_len    = len;
7458
7459
4
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7460
7461
4
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7462
7463
4
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7464
4
}
7465
7466
/*
7467
 * [8] 9.4.19 GMM Information
7468
 */
7469
static void
7470
dtap_gmm_information(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7471
1
{
7472
1
  uint32_t  curr_offset;
7473
1
  uint32_t  consumed;
7474
1
  unsigned  curr_len;
7475
7476
1
  curr_offset = offset;
7477
1
  curr_len    = len;
7478
7479
1
  pinfo->p2p_dir = P2P_DIR_SENT;
7480
7481
1
  ELEM_OPT_TLV( 0x43, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Full Name" );
7482
7483
1
  ELEM_OPT_TLV( 0x45, GSM_A_PDU_TYPE_DTAP, DE_NETWORK_NAME, " - Short Name" );
7484
7485
1
  ELEM_OPT_TV( 0x46, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE, NULL);
7486
7487
1
  ELEM_OPT_TV( 0x47, GSM_A_PDU_TYPE_DTAP, DE_TIME_ZONE_TIME, NULL);
7488
7489
1
  ELEM_OPT_TLV( 0x48, GSM_A_PDU_TYPE_DTAP, DE_LSA_ID, NULL);
7490
7491
1
  ELEM_OPT_TLV( 0x49, GSM_A_PDU_TYPE_DTAP, DE_DAY_SAVING_TIME, NULL);
7492
7493
1
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7494
1
}
7495
7496
/*
7497
 * [7] 9.4.20
7498
 */
7499
static void
7500
dtap_gmm_service_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7501
6
{
7502
6
  uint32_t  curr_offset;
7503
6
  uint32_t  consumed;
7504
6
  unsigned  curr_len;
7505
7506
6
  curr_offset = offset;
7507
6
  curr_len    = len;
7508
7509
6
  pinfo->p2p_dir = P2P_DIR_RECV;
7510
7511
6
  ELEM_MAND_VV_SHORT(GSM_A_PDU_TYPE_COMMON, DE_CIPH_KEY_SEQ_NUM, GSM_A_PDU_TYPE_GM, DE_SRVC_TYPE, ei_gsm_a_gm_missing_mandatory_element);
7512
7513
  /* P-TMSI Mobile station identity 10.5.1.4 M LV 6 */
7514
6
  ELEM_MAND_LV( GSM_A_PDU_TYPE_COMMON, DE_MID, NULL, ei_gsm_a_gm_missing_mandatory_element);
7515
7516
6
  ELEM_OPT_TLV( 0x32, GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT, NULL);
7517
7518
  /* MBMS context status 10.5.7.6 TLV 2 - 18 */
7519
4
  ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS, NULL);
7520
7521
4
  ELEM_OPT_TLV( 0x36, GSM_A_PDU_TYPE_GM, DE_UPLINK_DATA_STATUS, NULL);
7522
7523
4
  ELEM_OPT_TV_SHORT(0xD0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
7524
7525
4
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7526
4
}
7527
7528
/*
7529
 * [7] 9.4.21
7530
 */
7531
static void
7532
dtap_gmm_service_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7533
2
{
7534
2
  uint32_t  curr_offset;
7535
2
  uint32_t  consumed;
7536
2
  unsigned  curr_len;
7537
7538
2
  curr_offset = offset;
7539
2
  curr_len    = len;
7540
7541
2
  pinfo->p2p_dir = P2P_DIR_SENT;
7542
7543
2
  ELEM_OPT_TLV( 0x32, GSM_A_PDU_TYPE_GM, DE_PDP_CONTEXT_STAT, NULL);
7544
7545
  /* MBMS context status 10.5.7.6 TLV 2 - 18 */
7546
2
  ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_CTX_STATUS, NULL);
7547
7548
2
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7549
2
}
7550
7551
/*
7552
 * [7] 9.4.22
7553
 */
7554
static void
7555
dtap_gmm_service_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7556
2
{
7557
2
  uint32_t  curr_offset;
7558
2
  uint32_t  consumed;
7559
2
  unsigned  curr_len;
7560
7561
2
  curr_offset = offset;
7562
2
  curr_len    = len;
7563
7564
2
  pinfo->p2p_dir = P2P_DIR_SENT;
7565
7566
2
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_GMM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7567
7568
2
  ELEM_OPT_TLV(0x3A, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_2, " - T3346 value");
7569
7570
1
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7571
1
}
7572
7573
/*
7574
 * [8] 9.5.1 Activate PDP context request
7575
 * Direction:     MS to network
7576
 */
7577
static void
7578
dtap_sm_act_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7579
9
{
7580
9
  uint32_t  curr_offset;
7581
9
  uint32_t  consumed;
7582
9
  unsigned  curr_len;
7583
7584
9
  curr_offset = offset;
7585
9
  curr_len    = len;
7586
7587
9
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7588
  /* MS to network */
7589
9
  pinfo->link_dir = P2P_DIR_UL;
7590
7591
9
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Requested NSAPI", ei_gsm_a_gm_missing_mandatory_element);
7592
7593
9
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI", ei_gsm_a_gm_missing_mandatory_element);
7594
7595
9
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - Requested QoS", ei_gsm_a_gm_missing_mandatory_element);
7596
7597
9
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - Requested PDP address", ei_gsm_a_gm_missing_mandatory_element);
7598
7599
9
  ELEM_OPT_TLV( 0x28, GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME, NULL);
7600
7601
9
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7602
7603
9
  ELEM_OPT_TV_SHORT( 0xA0, GSM_A_PDU_TYPE_GM, DE_REQ_TYPE, NULL);
7604
7605
9
  ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
7606
7607
9
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7608
7609
9
  ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7610
7611
9
  ELEM_OPT_TLV(0x5C, GSM_A_PDU_TYPE_GM, DE_EXT_QOS, NULL);
7612
7613
9
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7614
9
}
7615
7616
/*
7617
 * [9] 9.5.2 Activate PDP context accept
7618
 * Direction:     network to MS
7619
 */
7620
static void
7621
dtap_sm_act_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7622
8
{
7623
8
  uint32_t  curr_offset;
7624
8
  uint32_t  consumed;
7625
8
  unsigned  curr_len;
7626
7627
8
  curr_offset = offset;
7628
8
  curr_len    = len;
7629
7630
8
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7631
  /* Network to MS*/
7632
8
  pinfo->link_dir = P2P_DIR_DL;
7633
7634
8
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI", ei_gsm_a_gm_missing_mandatory_element);
7635
7636
8
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - Negotiated QoS", ei_gsm_a_gm_missing_mandatory_element);
7637
7638
#if 0
7639
  /* This is done automatically */
7640
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SPARE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7641
  curr_offset--;
7642
  curr_len++;
7643
#endif
7644
7645
8
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, NULL, ei_gsm_a_gm_missing_mandatory_element);
7646
7647
8
  ELEM_OPT_TLV( 0x2B, GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - PDP address");
7648
7649
8
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7650
7651
8
  ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID, NULL);
7652
7653
8
  ELEM_OPT_TLV( 0x39, GSM_A_PDU_TYPE_GM, DE_SM_CAUSE_2, " - SM cause");
7654
7655
8
  ELEM_OPT_TV_SHORT(0xB0 , GSM_A_PDU_TYPE_GM, DE_SM_CONNECTIVITY_TYPE, NULL);
7656
7657
8
  ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication");
7658
7659
8
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7660
7661
8
  ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7662
7663
8
  ELEM_OPT_TLV(0x5C, GSM_A_PDU_TYPE_GM, DE_EXT_QOS, NULL);
7664
7665
8
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7666
8
}
7667
7668
/*
7669
 * [8] 9.5.3 Activate PDP context reject
7670
 * Direction:     network to MS
7671
 */
7672
static void
7673
dtap_sm_act_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7674
1
{
7675
1
  uint32_t  curr_offset;
7676
1
  uint32_t  consumed;
7677
1
  unsigned  curr_len;
7678
7679
1
  curr_offset = offset;
7680
1
  curr_len    = len;
7681
7682
1
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7683
  /* Network to MS*/
7684
1
  pinfo->link_dir = P2P_DIR_DL;
7685
7686
1
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7687
7688
1
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7689
7690
1
  ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Back-off timer value");
7691
7692
1
  ELEM_OPT_TLV(0x6B, GSM_A_PDU_TYPE_GM, DE_RE_ATTEMPT_IND, NULL);
7693
7694
1
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7695
7696
1
  ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7697
7698
1
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7699
1
}
7700
7701
/*
7702
 * [8] 9.5.4 Activate Secondary PDP Context Request
7703
 * Direction:     MS to network
7704
 */
7705
static void
7706
dtap_sm_act_sec_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7707
17
{
7708
17
  uint32_t  curr_offset;
7709
17
  uint32_t  consumed;
7710
17
  unsigned  curr_len;
7711
7712
17
  curr_offset = offset;
7713
17
  curr_len    = len;
7714
7715
17
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7716
  /* MS to Network */
7717
17
  pinfo->link_dir = P2P_DIR_UL;
7718
7719
17
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Requested NSAPI", ei_gsm_a_gm_missing_mandatory_element);
7720
7721
17
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI", ei_gsm_a_gm_missing_mandatory_element);
7722
7723
17
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - Requested QoS", ei_gsm_a_gm_missing_mandatory_element);
7724
7725
17
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_LINKED_TI, NULL, ei_gsm_a_gm_missing_mandatory_element);
7726
7727
  /* 3GPP TS 24.008 version 6.8.0 Release 6, 36 TFT Traffic Flow Template 10.5.6.12 O TLV 3-257 */
7728
17
  ELEM_OPT_TLV( 0x36, GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE, NULL);
7729
7730
16
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7731
7732
16
  ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
7733
7734
16
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7735
7736
16
  ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7737
7738
16
  ELEM_OPT_TLV(0x5C, GSM_A_PDU_TYPE_GM, DE_EXT_QOS, NULL);
7739
7740
16
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7741
16
}
7742
7743
/*
7744
 * [7] 9.5.5  Activate Secondary PDP Context Accept
7745
 * Direction:     network to MS
7746
 */
7747
static void
7748
dtap_sm_act_sec_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7749
1
{
7750
1
  uint32_t  curr_offset;
7751
1
  uint32_t  consumed;
7752
1
  unsigned  curr_len;
7753
7754
1
  curr_offset = offset;
7755
1
  curr_len    = len;
7756
7757
1
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7758
  /* Network to MS*/
7759
1
  pinfo->link_dir = P2P_DIR_DL;
7760
7761
1
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI", ei_gsm_a_gm_missing_mandatory_element);
7762
7763
1
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - Negotiated QoS", ei_gsm_a_gm_missing_mandatory_element);
7764
7765
1
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, NULL, ei_gsm_a_gm_missing_mandatory_element);
7766
7767
#if 0
7768
  /* This is done automatically */
7769
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SPARE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7770
  curr_offset--;
7771
  curr_len++;
7772
#endif
7773
7774
1
  ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID, NULL);
7775
7776
1
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7777
7778
1
  ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication");
7779
7780
1
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7781
7782
1
  ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7783
7784
1
  ELEM_OPT_TLV(0x5C, GSM_A_PDU_TYPE_GM, DE_EXT_QOS, NULL);
7785
7786
1
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7787
1
}
7788
7789
/*
7790
 * [8] 9.5.6 Activate Secondary PDP Context Reject
7791
 * Direction:     network to MS
7792
 */
7793
static void
7794
dtap_sm_act_sec_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7795
2
{
7796
2
  uint32_t  curr_offset;
7797
2
  uint32_t  consumed;
7798
2
  unsigned  curr_len;
7799
7800
2
  curr_offset = offset;
7801
2
  curr_len    = len;
7802
7803
2
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7804
  /* Network to MS*/
7805
2
  pinfo->link_dir = P2P_DIR_DL;
7806
7807
2
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7808
7809
2
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7810
7811
2
  ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Back-off timer value");
7812
7813
2
  ELEM_OPT_TLV(0x6B, GSM_A_PDU_TYPE_GM, DE_RE_ATTEMPT_IND, NULL);
7814
7815
2
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7816
7817
2
  ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7818
7819
2
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7820
2
}
7821
7822
/*
7823
 * [8] 9.5.7 Request PDP context activation
7824
 * Direction:     network to MS
7825
 */
7826
static void
7827
dtap_sm_req_pdp_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7828
2
{
7829
2
  uint32_t  curr_offset;
7830
2
  uint32_t  consumed;
7831
2
  unsigned  curr_len;
7832
7833
2
  curr_offset = offset;
7834
2
  curr_len    = len;
7835
7836
2
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7837
  /* Network to MS*/
7838
2
  pinfo->link_dir = P2P_DIR_DL;
7839
7840
2
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - Offered PDP address", ei_gsm_a_gm_missing_mandatory_element);
7841
7842
2
  ELEM_OPT_TLV( 0x28, GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME, NULL);
7843
7844
2
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7845
7846
2
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7847
7848
2
  ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7849
7850
2
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7851
2
}
7852
7853
/*
7854
 * [8] 9.5.8 Request PDP context activation reject
7855
 * Direction:     MS to network
7856
 */
7857
static void
7858
dtap_sm_req_pdp_act_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7859
2
{
7860
2
  uint32_t  curr_offset;
7861
2
  uint32_t  consumed;
7862
2
  unsigned  curr_len;
7863
7864
2
  curr_offset = offset;
7865
2
  curr_len    = len;
7866
7867
2
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7868
  /* MS to  Network */
7869
2
  pinfo->link_dir = P2P_DIR_UL;
7870
7871
2
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7872
7873
2
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7874
7875
2
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7876
7877
2
  ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7878
7879
2
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7880
2
}
7881
7882
/*
7883
 * [8] 9.5.9 Modify PDP context request (Network to MS direction)
7884
 * Direction:     network to MS
7885
 */
7886
static void
7887
dtap_sm_mod_pdp_req_net(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7888
115
{
7889
115
  uint32_t  curr_offset;
7890
115
  uint32_t  consumed;
7891
115
  unsigned  curr_len;
7892
7893
115
  curr_offset = offset;
7894
115
  curr_len    = len;
7895
7896
115
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7897
  /* Network to MS */
7898
115
  pinfo->link_dir = P2P_DIR_DL;
7899
7900
115
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, NULL, ei_gsm_a_gm_missing_mandatory_element);
7901
#if 0
7902
  /* This is done automatically */
7903
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SPARE, NULL, ei_gsm_a_gm_missing_mandatory_element);
7904
  curr_offset--;
7905
  curr_len++;
7906
#endif
7907
7908
115
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI", ei_gsm_a_gm_missing_mandatory_element);
7909
7910
115
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - New QoS", ei_gsm_a_gm_missing_mandatory_element);
7911
7912
115
  ELEM_OPT_TLV( 0x2B, GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - PDP address");
7913
7914
115
  ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID, NULL);
7915
7916
115
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7917
7918
115
  ELEM_OPT_TLV( 0x36, GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE, NULL);
7919
7920
115
  ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication");
7921
7922
115
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7923
7924
115
  ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7925
7926
115
  ELEM_OPT_TLV(0x5C, GSM_A_PDU_TYPE_GM, DE_EXT_QOS, NULL);
7927
7928
115
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7929
115
}
7930
7931
/*
7932
 * [8] 9.5.10 Modify PDP context request (MS to network direction)
7933
 * Direction:     MS to network
7934
 */
7935
static void
7936
dtap_sm_mod_pdp_req_ms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7937
2
{
7938
2
  uint32_t  curr_offset;
7939
2
  uint32_t  consumed;
7940
2
  unsigned  curr_len;
7941
7942
2
  curr_offset = offset;
7943
2
  curr_len    = len;
7944
7945
2
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7946
  /* MS to Network */
7947
2
  pinfo->link_dir = P2P_DIR_UL;
7948
7949
2
  ELEM_OPT_TV( 0x32, GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI" );
7950
7951
2
  ELEM_OPT_TLV( 0x30, GSM_A_PDU_TYPE_GM, DE_QOS, " - Requested new QoS" );
7952
7953
2
  ELEM_OPT_TLV( 0x31, GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE, " - New TFT" );
7954
7955
2
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7956
7957
2
  ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
7958
7959
2
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7960
7961
2
  ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7962
7963
2
  ELEM_OPT_TLV(0x5C, GSM_A_PDU_TYPE_GM, DE_EXT_QOS, NULL);
7964
7965
2
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7966
2
}
7967
7968
/*
7969
 * [8] 9.5.11 Modify PDP context accept (MS to network direction)
7970
 * Direction:     MS to network
7971
 */
7972
static void
7973
dtap_sm_mod_pdp_acc_ms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
7974
3
{
7975
3
  uint32_t  curr_offset;
7976
3
  uint32_t  consumed;
7977
3
  unsigned  curr_len;
7978
7979
3
  curr_offset = offset;
7980
3
  curr_len    = len;
7981
7982
3
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
7983
  /* MS to Network */
7984
3
  pinfo->link_dir = P2P_DIR_UL;
7985
7986
3
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
7987
7988
3
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
7989
7990
3
  ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
7991
7992
3
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
7993
3
}
7994
7995
/*
7996
 * [8] 9.5.12 Modify PDP context accept (Network to MS direction)
7997
 * Direction:     Network to MS
7998
 */
7999
static void
8000
dtap_sm_mod_pdp_acc_net(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8001
3
{
8002
3
  uint32_t  curr_offset;
8003
3
  uint32_t  consumed;
8004
3
  unsigned  curr_len;
8005
8006
3
  curr_offset = offset;
8007
3
  curr_len    = len;
8008
8009
3
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
8010
  /* Network to MS */
8011
3
  pinfo->link_dir = P2P_DIR_DL;
8012
8013
3
  ELEM_OPT_TLV( 0x30, GSM_A_PDU_TYPE_GM, DE_QOS, " - Negotiated QoS" );
8014
8015
3
  ELEM_OPT_TV( 0x32, GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI" );
8016
8017
3
  ELEM_OPT_TV_SHORT ( 0x80, GSM_A_PDU_TYPE_GM, DE_RAD_PRIO, " - New radio priority" );
8018
8019
3
  ELEM_OPT_TLV( 0x34, GSM_A_PDU_TYPE_GM, DE_PACKET_FLOW_ID, NULL);
8020
8021
3
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
8022
8023
3
  ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication");
8024
8025
3
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
8026
8027
3
  ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
8028
8029
3
  ELEM_OPT_TLV(0x5C, GSM_A_PDU_TYPE_GM, DE_EXT_QOS, NULL);
8030
8031
3
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8032
3
}
8033
8034
/*
8035
 * [8] 9.5.13 Modify PDP Context Reject
8036
 * Direction:     both
8037
 */
8038
static void
8039
dtap_sm_mod_pdp_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8040
1
{
8041
1
  uint32_t  curr_offset;
8042
1
  uint32_t  consumed;
8043
1
  unsigned  curr_len;
8044
8045
1
  curr_offset = offset;
8046
1
  curr_len    = len;
8047
8048
1
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
8049
  /* Network or the MS; do not reset link_dir in case it was set by lower layers */
8050
  /* pinfo->link_dir = LINK_DIR_UNKNOWN; */
8051
8052
8053
1
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
8054
8055
1
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
8056
8057
1
  ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - Back-off timer value");
8058
8059
1
  ELEM_OPT_TLV(0x6B, GSM_A_PDU_TYPE_GM, DE_RE_ATTEMPT_IND, NULL);
8060
8061
1
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
8062
8063
1
  ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
8064
8065
1
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8066
1
}
8067
8068
/*
8069
 * [8] 9.5.14 Deactivate PDP context request
8070
 * Direction:     both
8071
 */
8072
static void
8073
dtap_sm_deact_pdp_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8074
1
{
8075
1
  uint32_t  curr_offset;
8076
1
  uint32_t  consumed;
8077
1
  unsigned  curr_len;
8078
8079
1
  curr_offset = offset;
8080
1
  curr_len    = len;
8081
8082
1
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
8083
1
  pinfo->link_dir = LINK_DIR_UNKNOWN;
8084
8085
1
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
8086
8087
1
  ELEM_OPT_TV_SHORT( 0x90, GSM_A_PDU_TYPE_GM, DE_TEAR_DOWN_IND, NULL);
8088
8089
1
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
8090
8091
1
  ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL);
8092
8093
1
  ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3396 value");
8094
8095
1
  ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication");
8096
8097
1
  ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
8098
8099
1
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8100
1
}
8101
8102
/*
8103
 * [8] 9.5.15 Deactivate PDP context accept
8104
 * Direction:     both
8105
 */
8106
static void
8107
dtap_sm_deact_pdp_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8108
3
{
8109
3
  uint32_t  curr_offset;
8110
3
  uint32_t  consumed;
8111
3
  unsigned  curr_len;
8112
8113
3
  curr_offset = offset;
8114
3
  curr_len    = len;
8115
8116
3
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
8117
3
  pinfo->link_dir = LINK_DIR_UNKNOWN;
8118
8119
3
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
8120
8121
3
  ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL);
8122
8123
3
  ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
8124
8125
3
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8126
3
}
8127
8128
/*
8129
 * [8] 9.5.15a Request Secondary PDP Context Activation
8130
 * Direction:     network to MS
8131
 */
8132
static void
8133
dtap_sm_req_sec_pdp_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8134
7
{
8135
7
  uint32_t  curr_offset;
8136
7
  uint32_t  consumed;
8137
7
  unsigned  curr_len;
8138
8139
7
  curr_offset = offset;
8140
7
  curr_len    = len;
8141
8142
7
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
8143
7
  pinfo->link_dir = P2P_DIR_DL;
8144
8145
  /* Required QoS Quality of service 10.5.6.5 M LV 13-17 */
8146
7
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_QOS, " - Required QoS", ei_gsm_a_gm_missing_mandatory_element);
8147
8148
  /* Linked TI Linked TI 10.5.6.7 M LV 2-3 */
8149
7
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_LINKED_TI, NULL, ei_gsm_a_gm_missing_mandatory_element);
8150
8151
  /* 36 TFT Traffic Flow Template 10.5.6.12 O TLV 3-257 */
8152
7
  ELEM_OPT_TLV( 0x36, GSM_A_PDU_TYPE_GM, DE_TRAFFIC_FLOW_TEMPLATE, NULL);
8153
8154
  /* 27 Protocol configuration options Protocol configuration options 10.5.6.3 O TLV 3 - 253 */
8155
6
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
8156
8157
  /* C- WLAN offload acceptability 10.5.6.20 O TV 1 */
8158
6
  ELEM_OPT_TV_SHORT(0xC0 , GSM_A_PDU_TYPE_GM, DE_SM_WLAN_OFFLOAD_ACCEPT, " - WLAN offload indication");
8159
8160
6
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
8161
8162
6
  ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
8163
8164
6
  ELEM_OPT_TLV(0x5C, GSM_A_PDU_TYPE_GM, DE_EXT_QOS, NULL);
8165
8166
6
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8167
6
}
8168
8169
/*
8170
 * [8] 9.5.15b Request Secondary PDP Context Activation Reject
8171
 * Direction:     MS to network
8172
 */
8173
static void
8174
dtap_sm_req_sec_pdp_act_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8175
1
{
8176
1
  uint32_t  curr_offset;
8177
1
  uint32_t  consumed;
8178
1
  unsigned  curr_len;
8179
8180
1
  curr_offset = offset;
8181
1
  curr_len    = len;
8182
8183
1
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
8184
1
  pinfo->link_dir = P2P_DIR_UL;
8185
8186
  /* SM cause SM cause 10.5.6.6 M V 1 */
8187
1
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
8188
8189
  /* 27 Protocol configuration options Protocol configuration options 10.5.6.3 O TLV 3 - 253 */
8190
1
  ELEM_OPT_TLV( 0x27, GSM_A_PDU_TYPE_GM, DE_PRO_CONF_OPT, NULL);
8191
8192
1
  ELEM_OPT_TLV(0x33, GSM_A_PDU_TYPE_GM, DE_NBIFOM_CONT, NULL);
8193
8194
1
  ELEM_OPT_TLV_E(0x7B, GSM_A_PDU_TYPE_GM, DE_EXT_PRO_CONF_OPT, NULL);
8195
8196
1
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8197
1
}
8198
8199
/*
8200
 * [8] 9.5.16a Notification
8201
 * Direction:     network to MS
8202
 */
8203
static void
8204
dtap_sm_notif(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8205
1
{
8206
1
  uint32_t  curr_offset;
8207
1
  uint32_t  consumed;
8208
1
  unsigned  curr_len;
8209
8210
1
  curr_offset = offset;
8211
1
  curr_len    = len;
8212
8213
1
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
8214
1
  pinfo->link_dir = P2P_DIR_DL;
8215
8216
1
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_SM_NOTIF_IND, NULL, ei_gsm_a_gm_missing_mandatory_element);
8217
8218
1
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8219
1
}
8220
8221
/*
8222
 * [8] 9.5.21 SM Status
8223
 * Direction:     both
8224
 */
8225
static void
8226
dtap_sm_status(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8227
1
{
8228
1
  uint32_t  curr_offset;
8229
1
  uint32_t  consumed;
8230
1
  unsigned  curr_len;
8231
8232
1
  curr_offset = offset;
8233
1
  curr_len    = len;
8234
8235
1
  pinfo->p2p_dir = P2P_DIR_UNKNOWN;
8236
1
  pinfo->link_dir = LINK_DIR_UNKNOWN;
8237
8238
1
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
8239
8240
1
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8241
1
}
8242
8243
/*
8244
 * [9] 9.5.22 Activate MBMS Context Request
8245
 * Direction:     MS to network
8246
 */
8247
static void
8248
dtap_sm_act_mbms_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8249
17
{
8250
17
  uint32_t  curr_offset;
8251
17
  uint32_t  consumed;
8252
17
  unsigned  curr_len;
8253
8254
17
  curr_offset = offset;
8255
17
  curr_len    = len;
8256
8257
17
  pinfo->p2p_dir = P2P_DIR_RECV;
8258
8259
  /* Requested MBMS NSAPI Enhanced Network service access point identifier 10.5.6.16 M V */
8260
17
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_ENH_NSAPI, " - Requested MBMS NSAPI", ei_gsm_a_gm_missing_mandatory_element);
8261
8262
  /* Requested LLC SAPI LLC service access point identifier 10.5.6.9 M V 1 */
8263
17
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Requested LLC SAPI", ei_gsm_a_gm_missing_mandatory_element);
8264
8265
  /* Supported MBMS bearer capabilities MBMS bearer capabilities 10.5.6.14 M LV 2 - 3 */
8266
17
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_MBMS_BEARER_CAP, NULL, ei_gsm_a_gm_missing_mandatory_element);
8267
8268
  /* Requested multicast address Packet data protocol address 10.5.6.4 M LV 3 - 19 */
8269
17
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - Requested multicast address", ei_gsm_a_gm_missing_mandatory_element);
8270
8271
  /* Access point name Access point name 10.5.6.1 M LV 2 - 101 */
8272
17
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME, NULL, ei_gsm_a_gm_missing_mandatory_element);
8273
8274
  /* 35 MBMS protocol configuration options MBMS protocol configuration options 10.5.6.15 O TLV 3 - 253 */
8275
17
  ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL);
8276
8277
17
  ELEM_OPT_TV_SHORT(0xC0, GSM_A_PDU_TYPE_GM, DE_DEVICE_PROPERTIES, NULL);
8278
8279
17
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8280
17
}
8281
8282
/*
8283
 * [9] 9.5.23 Activate MBMS Context Accept
8284
 * Direction:     network to MS
8285
 */
8286
static void
8287
dtap_sm_act_mbms_acc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8288
0
{
8289
0
  uint32_t  curr_offset;
8290
0
  uint32_t  consumed;
8291
0
  unsigned  curr_len;
8292
8293
0
  curr_offset = offset;
8294
0
  curr_len    = len;
8295
8296
0
  pinfo->p2p_dir = P2P_DIR_SENT;
8297
8298
0
  ELEM_MAND_LV(  GSM_A_PDU_TYPE_GM, DE_TMGI, NULL, ei_gsm_a_gm_missing_mandatory_element);
8299
8300
0
  ELEM_MAND_V(  GSM_A_PDU_TYPE_GM, DE_LLC_SAPI, " - Negotiated LLC SAPI", ei_gsm_a_gm_missing_mandatory_element);
8301
8302
0
  ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL);
8303
8304
0
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8305
0
}
8306
8307
/*
8308
 * [9] 9.5.24 Activate MBMS Context Reject
8309
 * Direction:     network to MS
8310
 */
8311
static void
8312
dtap_sm_act_mbms_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8313
1
{
8314
1
  uint32_t  curr_offset;
8315
1
  uint32_t  consumed;
8316
1
  unsigned  curr_len;
8317
8318
1
  curr_offset = offset;
8319
1
  curr_len    = len;
8320
8321
1
  pinfo->p2p_dir = P2P_DIR_SENT;
8322
8323
1
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
8324
8325
1
  ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL);
8326
8327
1
  ELEM_OPT_TLV(0x37, GSM_A_PDU_TYPE_GM, DE_GPRS_TIMER_3, " - T3396 value");
8328
8329
1
  ELEM_OPT_TLV(0x6B, GSM_A_PDU_TYPE_GM, DE_RE_ATTEMPT_IND, NULL);
8330
8331
1
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8332
1
}
8333
8334
/*
8335
 * [9] 9.5.25 Request MBMS Context Activation
8336
 * Direction:     network to MS
8337
 */
8338
static void
8339
dtap_sm_req_mbms_act(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8340
1
{
8341
1
  uint32_t  curr_offset;
8342
1
  uint32_t  consumed;
8343
1
  unsigned  curr_len;
8344
8345
1
  curr_offset = offset;
8346
1
  curr_len    = len;
8347
8348
1
  pinfo->p2p_dir = P2P_DIR_SENT;
8349
8350
1
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_NET_SAPI, " - Linked NSAPI", ei_gsm_a_gm_missing_mandatory_element);
8351
8352
1
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_PD_PRO_ADDR, " - Offered multicast address", ei_gsm_a_gm_missing_mandatory_element);
8353
8354
1
  ELEM_MAND_LV( GSM_A_PDU_TYPE_GM, DE_ACC_POINT_NAME, NULL, ei_gsm_a_gm_missing_mandatory_element);
8355
8356
1
  ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL);
8357
8358
1
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8359
1
}
8360
8361
/*
8362
 * [8] 9.5.26 Request MBMS Context Activation Reject
8363
 * Direction:     MS to network
8364
 */
8365
static void
8366
dtap_sm_req_mbms_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len)
8367
3
{
8368
3
  uint32_t  curr_offset;
8369
3
  uint32_t  consumed;
8370
3
  unsigned  curr_len;
8371
8372
3
  curr_offset = offset;
8373
3
  curr_len    = len;
8374
8375
3
  pinfo->p2p_dir = P2P_DIR_RECV;
8376
8377
3
  ELEM_MAND_V( GSM_A_PDU_TYPE_GM, DE_SM_CAUSE, NULL, ei_gsm_a_gm_missing_mandatory_element);
8378
8379
3
  ELEM_OPT_TLV( 0x35, GSM_A_PDU_TYPE_GM, DE_MBMS_PROT_CONF_OPT, NULL);
8380
8381
2
  EXTRANEOUS_DATA_CHECK(curr_len, 0, pinfo, &ei_gsm_a_gm_extraneous_data);
8382
2
}
8383
8384
350
#define NUM_GSM_DTAP_MSG_GMM array_length(gsm_a_dtap_msg_gmm_strings)
8385
static int ett_gsm_dtap_msg_gmm[NUM_GSM_DTAP_MSG_GMM];
8386
static void (*dtap_msg_gmm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len) = {
8387
  dtap_gmm_attach_req,    /* Attach Request */
8388
  dtap_gmm_attach_acc,    /* Attach Accept */
8389
  dtap_gmm_attach_com,    /* Attach Complete */
8390
  dtap_gmm_attach_rej,    /* Attach Reject */
8391
  dtap_gmm_detach_req,    /* Detach Request */
8392
  dtap_gmm_detach_acc,    /* Detach Accept */
8393
  dtap_gmm_rau_req,   /* Routing Area Update Request */
8394
  dtap_gmm_rau_acc,   /* Routing Area Update Accept */
8395
  dtap_gmm_rau_com,   /* Routing Area Update Complete */
8396
  dtap_gmm_rau_rej,   /* Routing Area Update Reject */
8397
  dtap_gmm_service_req,   /* Service Request */
8398
  dtap_gmm_service_acc,   /* Service Accept */
8399
  dtap_gmm_service_rej,   /* Service Reject */
8400
  dtap_gmm_ptmsi_realloc_cmd, /* P-TMSI Reallocation Command */
8401
  dtap_gmm_ptmsi_realloc_com, /* P-TMSI Reallocation Complete */
8402
  dtap_gmm_auth_ciph_req,   /* Authentication and Ciphering Req */
8403
  dtap_gmm_auth_ciph_resp,  /* Authentication and Ciphering Resp */
8404
  dtap_gmm_auth_ciph_rej,   /* Authentication and Ciphering Rej */
8405
  dtap_gmm_ident_req,   /* Identity Request */
8406
  dtap_gmm_ident_res,   /* Identity Response */
8407
  dtap_gmm_auth_ciph_fail,  /* Authentication and Ciphering Failure */
8408
  dtap_gmm_status,    /* GMM Status */
8409
  dtap_gmm_information,   /* GMM Information */
8410
  NULL, /* NONE */
8411
};
8412
8413
434
#define NUM_GSM_DTAP_MSG_SM array_length(gsm_a_dtap_msg_sm_strings)
8414
static int ett_gsm_dtap_msg_sm[NUM_GSM_DTAP_MSG_SM];
8415
static void (*dtap_msg_sm_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, uint32_t offset, unsigned len) = {
8416
  dtap_sm_act_pdp_req,    /* Activate PDP Context Request */
8417
  dtap_sm_act_pdp_acc,    /* Activate PDP Context Accept */
8418
  dtap_sm_act_pdp_rej,    /* Activate PDP Context Reject */
8419
  dtap_sm_req_pdp_act,    /* Request PDP Context Activation */
8420
  dtap_sm_req_pdp_act_rej,  /* Request PDP Context Activation rej. */
8421
  dtap_sm_deact_pdp_req,    /* Deactivate PDP Context Request */
8422
  dtap_sm_deact_pdp_acc,    /* Deactivate PDP Context Accept */
8423
  dtap_sm_mod_pdp_req_net,  /* Modify PDP Context Request(Network to MS direction) */
8424
  dtap_sm_mod_pdp_acc_ms,   /* Modify PDP Context Accept (MS to network direction) */
8425
  dtap_sm_mod_pdp_req_ms,   /* Modify PDP Context Request(MS to network direction) */
8426
  dtap_sm_mod_pdp_acc_net,  /* Modify PDP Context Accept (Network to MS direction) */
8427
  dtap_sm_mod_pdp_rej,    /* Modify PDP Context Reject */
8428
  dtap_sm_act_sec_pdp_req,  /* Activate Secondary PDP Context Request */
8429
  dtap_sm_act_sec_pdp_acc,  /* Activate Secondary PDP Context Accept */
8430
  dtap_sm_act_sec_pdp_rej,  /* Activate Secondary PDP Context Reject */
8431
  NULL,       /* Reserved: was allocated in earlier phases of the protocol */
8432
  NULL,       /* Reserved: was allocated in earlier phases of the protocol */
8433
  NULL,       /* Reserved: was allocated in earlier phases of the protocol */
8434
  NULL,       /* Reserved: was allocated in earlier phases of the protocol */
8435
  NULL,       /* Reserved: was allocated in earlier phases of the protocol */
8436
  dtap_sm_status,     /* SM Status */
8437
  dtap_sm_act_mbms_req,   /* Activate MBMS Context Request */
8438
  dtap_sm_act_mbms_acc,   /* Activate MBMS Context Accept */
8439
  dtap_sm_act_mbms_rej,   /* Activate MBMS Context Reject */
8440
  dtap_sm_req_mbms_act,   /* Request MBMS Context Activation */
8441
  dtap_sm_req_mbms_rej,   /* Request MBMS Context Activation Reject */
8442
  dtap_sm_req_sec_pdp_act,  /* Request Secondary PDP Context Activation */
8443
  dtap_sm_req_sec_pdp_act_rej,  /* Request Secondary PDP Context Activation Reject */
8444
  dtap_sm_notif,                /* Notification */
8445
  NULL, /* NONE */
8446
};
8447
8448
void
8449
get_gmm_msg_params(uint8_t oct, const char **msg_str, int *ett_tree, int *hf_idx, msg_fcn *dtap_msg_fcn)
8450
764
{
8451
764
  int idx;
8452
8453
764
  *msg_str      = try_val_to_str_idx_ext((uint32_t) (oct & DTAP_GMM_IEI_MASK), &gsm_a_dtap_msg_gmm_strings_ext, &idx);
8454
764
  *hf_idx       = hf_gsm_a_dtap_msg_gmm_type;
8455
764
  if (*msg_str != NULL) {
8456
743
    *ett_tree     = ett_gsm_dtap_msg_gmm[idx];
8457
743
    *dtap_msg_fcn = dtap_msg_gmm_fcn[idx];
8458
743
  }
8459
8460
764
  return;
8461
764
}
8462
8463
void
8464
get_sm_msg_params(uint8_t oct, const char **msg_str, int *ett_tree, int *hf_idx, msg_fcn *dtap_msg_fcn)
8465
259
{
8466
259
  int idx;
8467
8468
259
  *msg_str      = try_val_to_str_idx_ext((uint32_t) (oct & DTAP_SM_IEI_MASK), &gsm_a_dtap_msg_sm_strings_ext, &idx);
8469
259
  *hf_idx       = hf_gsm_a_dtap_msg_sm_type;
8470
259
  if (*msg_str != NULL) {
8471
202
    *ett_tree     = ett_gsm_dtap_msg_sm[idx];
8472
202
    *dtap_msg_fcn = dtap_msg_sm_fcn[idx];
8473
202
  }
8474
8475
259
  return;
8476
259
}
8477
8478
/* Register the protocol with Wireshark */
8479
void
8480
proto_register_gsm_a_gm(void)
8481
14
{
8482
14
  unsigned i;
8483
14
  unsigned last_offset;
8484
8485
  /* Setup list of header fields */
8486
8487
14
  static hf_register_info hf[] = {
8488
14
    { &hf_gsm_a_dtap_msg_gmm_type,
8489
14
      { "DTAP GPRS Mobility Management Message Type", "gsm_a.dtap.msg_gmm_type",
8490
14
        FT_UINT8, BASE_HEX | BASE_EXT_STRING, &gsm_a_dtap_msg_gmm_strings_ext, 0x0,
8491
14
        NULL, HFILL }
8492
14
    },
8493
14
    { &hf_gsm_a_dtap_msg_sm_type,
8494
14
      { "DTAP GPRS Session Management Message Type",  "gsm_a.dtap.msg_sm_type",
8495
14
        FT_UINT8, BASE_HEX | BASE_EXT_STRING, &gsm_a_dtap_msg_sm_strings_ext, 0x0,
8496
14
        NULL, HFILL }
8497
14
    },
8498
14
    { &hf_gsm_a_gm_elem_id,
8499
14
      { "Element ID", "gsm_a.gm.elem_id",
8500
14
        FT_UINT8, BASE_HEX, NULL, 0,
8501
14
        NULL, HFILL }
8502
14
    },
8503
14
    { &hf_gsm_a_sm_qos_delay_cls,
8504
14
      { "Quality of Service Delay class", "gsm_a.gm.sm.qos.delay_cls",
8505
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_sm_qos_delay_cls_vals), 0x38,
8506
14
        NULL, HFILL }
8507
14
    },
8508
14
    { &hf_gsm_a_sm_qos_reliability_cls,
8509
14
      { "Reliability class", "gsm_a.gm.sm.qos.reliability_cls",
8510
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_sm_qos_reliability_vals), 0x07,
8511
14
        NULL, HFILL }
8512
14
    },
8513
14
    { &hf_gsm_a_sm_qos_traffic_cls,
8514
14
      { "Traffic class", "gsm_a.gm.sm.qos.traffic_cls",
8515
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_sm_qos_traffic_cls_vals), 0xe0,
8516
14
        NULL, HFILL }
8517
14
    },
8518
14
    { &hf_gsm_a_sm_qos_del_order,
8519
14
      { "Delivery order", "gsm_a.gm.sm.qos.del_order",
8520
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_sm_qos_del_order_vals), 0x18,
8521
14
        NULL, HFILL }
8522
14
    },
8523
14
    { &hf_gsm_a_sm_qos_del_of_err_sdu,
8524
14
      { "Delivery of erroneous SDUs", "gsm_a.gm.sm.qos.del_of_err_sdu",
8525
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_sm_qos_del_of_err_sdu_vals), 0x07,
8526
14
        NULL, HFILL }
8527
14
    },
8528
14
    { &hf_gsm_a_sm_qos_ber,
8529
14
      { "Residual Bit Error Rate (BER)", "gsm_a.gm.sm.qos.ber",
8530
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_sm_qos_ber_vals), 0xf0,
8531
14
        NULL, HFILL }
8532
14
    },
8533
14
    { &hf_gsm_a_sm_qos_sdu_err_rat,
8534
14
      { "SDU error ratio", "gsm_a.gm.sm.qos.sdu_err_rat",
8535
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_sm_qos_sdu_err_rat_vals), 0x0f,
8536
14
        NULL, HFILL }
8537
14
    },
8538
14
    { &hf_gsm_a_sm_qos_traff_hdl_pri,
8539
14
      { "Traffic handling priority", "gsm_a.gm.sm.qos.traff_hdl_pri",
8540
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_sm_qos_traff_hdl_pri_vals), 0x03,
8541
14
        NULL, HFILL }
8542
14
    },
8543
14
    { &hf_gsm_a_gmm_split_pg_cycle_code,
8544
14
      { "SPLIT PG CYCLE CODE", "gsm_a.gm.gmm.split_pg_cycle_code",
8545
14
        FT_UINT8, BASE_DEC|BASE_EXT_STRING, &gsm_a_gmm_split_pg_cycle_code_strings_ext, 0x00,
8546
14
        NULL, HFILL }
8547
14
    },
8548
14
    { &hf_gsm_a_gmm_split_on_ccch,
8549
14
      { "SPLIT on CCCH", "gsm_a.gm.gmm.split_on_ccch",
8550
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_split_on_ccch_value), 0x08,
8551
14
        NULL, HFILL }
8552
14
    },
8553
14
    { &hf_gsm_a_gmm_non_drx_timer,
8554
14
      { "Non-DRX timer", "gsm_a.gm.gmm.non_drx_timer",
8555
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gmm_non_drx_timer_strings), 0x07,
8556
14
        NULL, HFILL }
8557
14
    },
8558
14
    { &hf_gsm_a_gmm_cn_spec_drx_cycle_len_coef,
8559
14
      { "CN Specific DRX cycle length coefficient", "gsm_a.gm.gmm.cn_spec_drx_cycle_len_coef",
8560
14
        FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gmm_cn_spec_drx_cycle_len_coef_strings), 0xf0,
8561
14
        NULL, HFILL }
8562
14
    },
8563
14
    { &hf_gsm_a_sm_tft_op_code,
8564
14
      { "TFT operation code", "gsm_a.gm.sm.tft.op_code",
8565
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_sm_tft_op_code_vals), 0xe0,
8566
14
        NULL, HFILL }
8567
14
    },
8568
14
    { &hf_gsm_a_sm_tft_e_bit,
8569
14
      { "E bit", "gsm_a.gm.sm.tft.e_bit",
8570
14
        FT_BOOLEAN, 8, TFS(&gsm_a_sm_tft_e_bit), 0x10,
8571
14
        NULL, HFILL }
8572
14
    },
8573
14
    { &hf_gsm_a_sm_tft_pkt_flt,
8574
14
      { "Number of packet filters", "gsm_a.gm.sm.tft.pkt_flt",
8575
14
        FT_UINT8, BASE_DEC, NULL, 0x0f,
8576
14
        NULL, HFILL }
8577
14
    },
8578
14
    { &hf_gsm_a_sm_tft_pkt_flt_dir,
8579
14
      { "Packet filter direction", "gsm_a.gm.sm.tft.pkt_flt_dir",
8580
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_sm_tft_pkt_flt_dir_vals), 0x30,
8581
14
        NULL, HFILL }
8582
14
    },
8583
14
    { &hf_gsm_a_sm_tft_pkt_flt_id,
8584
14
      { "Packet filter identifier", "gsm_a.gm.sm.tft.pkt_flt_id",
8585
14
        FT_UINT8, BASE_DEC, NULL, 0x0f,
8586
14
        NULL, HFILL }
8587
14
    },
8588
14
    { &hf_gsm_a_sm_ip4_address,
8589
14
      { "IPv4 address", "gsm_a.gm.sm.ip4_address",
8590
14
        FT_IPv4, BASE_NONE, NULL, 0x0,
8591
14
        NULL, HFILL }
8592
14
    },
8593
14
    { &hf_gsm_a_sm_ip4_mask,
8594
14
      { "IPv4 address mask", "gsm_a.gm.sm.ip4_mask",
8595
14
        FT_IPv4, BASE_NONE, NULL, 0x0,
8596
14
        NULL, HFILL }
8597
14
    },
8598
14
    { &hf_gsm_a_sm_ip6_address,
8599
14
      { "IPv6 address", "gsm_a.gm.sm.ip6_address",
8600
14
        FT_IPv6, BASE_NONE, NULL, 0x0,
8601
14
        NULL, HFILL }
8602
14
    },
8603
14
    { &hf_gsm_a_sm_ip6_mask,
8604
14
      { "IPv6 address mask", "gsm_a.gm.sm.ip6_mask",
8605
14
        FT_IPv6, BASE_NONE, NULL, 0x0,
8606
14
        NULL, HFILL }
8607
14
    },
8608
14
    { &hf_gsm_a_sm_ip6_prefix_length,
8609
14
      { "IPv6 prefix length", "gsm_a.gm.sm.ip6_prefix_length",
8610
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
8611
14
        NULL, HFILL }
8612
14
    },
8613
14
    { &hf_gsm_a_sm_tft_protocol_header,
8614
14
      { "Protocol/header", "gsm_a.gm.sm.tft.protocol_header",
8615
14
        FT_UINT8, BASE_HEX|BASE_EXT_STRING, &ipproto_val_ext, 0x0,
8616
14
        NULL, HFILL }
8617
14
    },
8618
14
    { &hf_gsm_a_sm_tft_port,
8619
14
      { "Port", "gsm_a.gm.sm.tft.port",
8620
14
        FT_UINT16, BASE_DEC, NULL, 0x0,
8621
14
        NULL, HFILL }
8622
14
    },
8623
14
    { &hf_gsm_a_sm_tft_port_low,
8624
14
      { "Low limit port", "gsm_a.gm.sm.tft.port_low",
8625
14
        FT_UINT16, BASE_DEC, NULL, 0x0,
8626
14
        NULL, HFILL }
8627
14
    },
8628
14
    { &hf_gsm_a_sm_tft_port_high,
8629
14
      { "High limit port", "gsm_a.gm.sm.tft.port_high",
8630
14
        FT_UINT16, BASE_DEC, NULL, 0x0,
8631
14
        NULL, HFILL }
8632
14
    },
8633
14
    { &hf_gsm_a_sm_tft_security,
8634
14
      { "IPSec security parameter index", "gsm_a.gm.sm.tft.security",
8635
14
        FT_UINT32, BASE_HEX, NULL, 0x0,
8636
14
        NULL, HFILL }
8637
14
    },
8638
14
    { &hf_gsm_a_sm_tft_traffic_class,
8639
14
      { "Type of service/Traffic class field", "gsm_a.gm.sm.tft.traffic_class",
8640
14
        FT_UINT8, BASE_HEX, NULL, 0x0,
8641
14
        NULL, HFILL }
8642
14
    },
8643
14
    { &hf_gsm_a_sm_tft_traffic_mask,
8644
14
      { "Mask field", "gsm_a.gm.sm.tft.traffic_mask",
8645
14
        FT_UINT8, BASE_HEX, NULL, 0x0,
8646
14
        NULL, HFILL }
8647
14
    },
8648
14
    { &hf_gsm_a_sm_tft_flow_label_type,
8649
14
      { "Flow Label Type", "gsm_a.gm.sm.tft.flow_label_type",
8650
14
        FT_UINT24, BASE_HEX, NULL, 0x0FFFFF,
8651
14
        NULL, HFILL }
8652
14
    },
8653
14
    { &hf_gsm_a_sm_tft_param_id,
8654
14
      { "Parameter identifier", "gsm_a.gm.sm.tft.param_id",
8655
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_sm_tft_param_id_vals), 0x0,
8656
14
        NULL, HFILL }
8657
14
    },
8658
14
    { &hf_gsm_a_sm_tft_mac_addr,
8659
14
      { "MAC address", "gsm_a.gm.sm.tft.mac_addr",
8660
14
        FT_ETHER, BASE_NONE, NULL, 0x0,
8661
14
        NULL, HFILL }
8662
14
    },
8663
14
    { &hf_gsm_a_sm_tft_vlan_tag_vid,
8664
14
      { "VID", "gsm_a.gm.sm.tft.vlan_tag_vid",
8665
14
        FT_UINT16, BASE_HEX, NULL, 0x0fff,
8666
14
        NULL, HFILL }
8667
14
    },
8668
14
    { &hf_gsm_a_sm_tft_vlan_tag_pcp,
8669
14
      { "PCP", "gsm_a.gm.sm.tft.vlan_tag_pcp",
8670
14
        FT_UINT8, BASE_HEX, NULL, 0x0e,
8671
14
        NULL, HFILL }
8672
14
    },
8673
14
    { &hf_gsm_a_sm_tft_vlan_tag_dei,
8674
14
      { "DEI", "gsm_a.gm.sm.tft.vlan_tag_dei",
8675
14
        FT_UINT8, BASE_HEX, NULL, 0x01,
8676
14
        NULL, HFILL }
8677
14
    },
8678
14
    { &hf_gsm_a_sm_tft_ethertype,
8679
14
      { "Ethertype", "gsm_a.gm.sm.tft.ethertype",
8680
14
        FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0,
8681
14
        NULL, HFILL }
8682
14
    },
8683
8684
14
    { &hf_gsm_a_gmm_ptmsi_sig,
8685
14
      { "P-TMSI Signature", "gsm_a.gm.gmm.ptmsi_sig",
8686
14
        FT_UINT24, BASE_HEX, NULL, 0x0,
8687
14
        NULL, HFILL }
8688
14
    },
8689
14
    { &hf_gsm_a_gmm_ptmsi_sig2,
8690
14
      { "P-TMSI Signature 2", "gsm_a.gm.gmm.ptmsi_sig2",
8691
14
        FT_UINT24, BASE_HEX, NULL, 0x0,
8692
14
        NULL, HFILL }
8693
14
    },
8694
14
    { &hf_gsm_a_gm_acc_tech_type,
8695
14
      { "Access Technology Type", "gsm_a.gm.gmm.acc_tech_type",
8696
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_acc_tech_type_vals), 0x0,
8697
14
        NULL, HFILL }
8698
14
    },
8699
14
    { &hf_gsm_a_gm_acc_cap_struct_len,
8700
14
      { "Length in bits", "gsm_a.gm.gmm.acc_cap_struct_len",
8701
14
        FT_UINT8, BASE_HEX_DEC, NULL, 0x0,
8702
14
        NULL, HFILL }
8703
14
    },
8704
14
    { &hf_gsm_a_gm_sms_value,
8705
14
      { "SMS_VALUE (Switch-Measure-Switch)", "gsm_a.gm.gmm.sms",
8706
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_sms_vals), 0x0,
8707
14
        NULL, HFILL }
8708
14
    },
8709
14
    { &hf_gsm_a_gm_sm_value,
8710
14
      { "(SM_VALUE) Switch-Measure", "gsm_a.gm.gmm.sm",
8711
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_sms_vals), 0x0,
8712
14
        NULL, HFILL }
8713
14
    },
8714
14
    { &hf_gsm_a_gm_link_dir,
8715
14
      { "Link direction", "gsm_a.gm.sm.link_dir",
8716
14
        FT_INT32, BASE_DEC, VALS(gsm_a_gm_link_dir_vals), 0x0,
8717
14
        NULL, HFILL }
8718
14
    },
8719
14
    { &hf_gsm_a_gm_cause,
8720
14
      { "GMM Cause", "gsm_a.gm.gmm.cause",
8721
14
        FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gmm_cause_vals), 0x0,
8722
14
        NULL, HFILL }
8723
14
    },
8724
14
    { &hf_gsm_a_gm_add_upd_type,
8725
14
      { "Additional update type", "gsm_a.gm.gmm.add_upd_type",
8726
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_add_upd_type_value), 0x0,
8727
14
        NULL, HFILL }
8728
14
    },
8729
14
    { &hf_gsm_a_gm_fop,
8730
14
      { "Follow-on proceed", "gsm_a.gm.gmm.fop",
8731
14
        FT_BOOLEAN, 8, NULL, 0x08,
8732
14
        NULL, HFILL }
8733
14
    },
8734
14
    { &hf_gsm_a_gm_res_of_attach,
8735
14
      { "Result of attach", "gsm_a.gm.gmm.res_of_attach",
8736
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_res_of_attach_vals), 0x07,
8737
14
        NULL, HFILL }
8738
14
    },
8739
14
    { &hf_gsm_a_gm_type_of_ciph_alg,
8740
14
      { "Type of ciphering algorithm", "gsm_a.gm.gmm.type_of_ciph_alg",
8741
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_ciph_alg_vals), 0x07,
8742
14
        NULL, HFILL }
8743
14
    },
8744
14
    { &hf_gsm_a_gm_type_of_integ_alg,
8745
14
      { "Type of integrity algorithm", "gsm_a.gm.gmm.type_of_integ_alg",
8746
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_integ_alg_vals), 0x07,
8747
14
        NULL, HFILL }
8748
14
    },
8749
14
    { &hf_gsm_a_gm_imeisv_req,
8750
14
      { "IMEISV request", "gsm_a.gm.gmm.imeisv_req",
8751
14
        FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gm_imeisv_req_vals), 0x00,
8752
14
        NULL, HFILL }
8753
14
    },
8754
14
    { &hf_gsm_a_gm_nsapi,
8755
14
      { "NSAPI", "gsm_a.gm.gmm.nsapi",
8756
14
        FT_UINT16, BASE_HEX_DEC, NULL, 0x0,
8757
14
        NULL, HFILL }
8758
14
    },
8759
14
    { &hf_gsm_a_gm_ac_ref_nr,
8760
14
      { "A&C reference number", "gsm_a.gm.gmm.ac_ref_nr",
8761
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
8762
14
        NULL, HFILL }
8763
14
    },
8764
14
    { &hf_gsm_a_gm_force_to_standby,
8765
14
      { "Force to standby", "gsm_a.gm.gmm.force_to_standby",
8766
14
        FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_gm_force_to_standby_vals), 0x00,
8767
14
        NULL, HFILL }
8768
14
    },
8769
14
    { &hf_gsm_a_gm_serv_type,
8770
14
      { "Service type", "gsm_a.gm.gmm.serv_type",
8771
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_serv_type_vals), 0x00,
8772
14
        NULL, HFILL }
8773
14
    },
8774
14
    { &hf_gsm_a_gm_for,
8775
14
      { "Follow-on request pending", "gsm_a.gm.gmm.for",
8776
14
        FT_BOOLEAN, 8, NULL, 0x08,
8777
14
        NULL, HFILL }
8778
14
    },
8779
14
    { &hf_gsm_a_gm_type_of_attach,
8780
14
      { "Type of attach", "gsm_a.gm.gmm.type_of_attach",
8781
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_attach_vals), 0x07,
8782
14
        NULL, HFILL }
8783
14
    },
8784
14
    { &hf_gsm_a_gm_tmsi_flag,
8785
14
      { "TMSI flag", "gsm_a.gm.gmm.tmsi_flag",
8786
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_tmsi_flag_value), 0x01,
8787
14
        NULL, HFILL }
8788
14
    },
8789
14
    { &hf_gsm_a_gm_power_off,
8790
14
      { "Power off", "gsm_a.gm.gmm.power_off",
8791
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_power_off_value), 0x08,
8792
14
        NULL, HFILL }
8793
14
    },
8794
14
    { &hf_gsm_a_gm_type_of_detach_mo,
8795
14
      { "Type of detach", "gsm_a.gm.gmm.type_of_detach",
8796
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_detach_mo_vals), 0x07,
8797
14
        NULL, HFILL }
8798
14
    },
8799
14
    { &hf_gsm_a_gm_type_of_detach_mt,
8800
14
      { "Type of detach", "gsm_a.gm.gmm.type_of_detach",
8801
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_detach_mt_vals), 0x07,
8802
14
        NULL, HFILL }
8803
14
    },
8804
14
    { &hf_gsm_a_gm_update_type,
8805
14
      { "Update type", "gsm_a.gm.gmm.update_type",
8806
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_update_type_vals), 0x07,
8807
14
        NULL, HFILL }
8808
14
    },
8809
14
    { &hf_gsm_a_gm_gprs_timer,
8810
14
      { "GPRS Timer", "gsm_a.gm.gmm.gprs_timer",
8811
14
        FT_UINT8, BASE_HEX, NULL, 0x0,
8812
14
        NULL, HFILL }
8813
14
    },
8814
14
    { &hf_gsm_a_gm_gprs_timer_unit,
8815
14
      { "Unit", "gsm_a.gm.gmm.gprs_timer_unit",
8816
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_gprs_timer_unit_vals), 0xe0,
8817
14
        NULL, HFILL }
8818
14
    },
8819
14
    { &hf_gsm_a_gm_gprs_timer_value,
8820
14
      { "Timer value", "gsm_a.gm.gmm.gprs_timer_value",
8821
14
        FT_UINT8, BASE_DEC, NULL, 0x1f,
8822
14
        NULL, HFILL }
8823
14
    },
8824
14
    { &hf_gsm_a_gm_gprs_timer2,
8825
14
      { "GPRS Timer", "gsm_a.gm.gmm.gprs_timer2",
8826
14
        FT_UINT8, BASE_HEX, NULL, 0x0,
8827
14
        NULL, HFILL }
8828
14
    },
8829
14
    { &hf_gsm_a_gm_gprs_timer2_unit,
8830
14
      { "Unit", "gsm_a.gm.gmm.gprs_timer2_unit",
8831
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_gprs_timer_unit_vals), 0xe0,
8832
14
        NULL, HFILL }
8833
14
    },
8834
14
    { &hf_gsm_a_gm_gprs_timer2_value,
8835
14
      { "Timer value", "gsm_a.gm.gmm.gprs_timer2_value",
8836
14
        FT_UINT8, BASE_DEC, NULL, 0x1f,
8837
14
        NULL, HFILL }
8838
14
    },
8839
14
    { &hf_gsm_a_gm_gprs_timer3,
8840
14
      { "GPRS Timer", "gsm_a.gm.gmm.gprs_timer3",
8841
14
        FT_UINT8, BASE_HEX, NULL, 0x0,
8842
14
        NULL, HFILL }
8843
14
    },
8844
14
    { &hf_gsm_a_gm_gprs_timer3_unit,
8845
14
      { "Unit", "gsm_a.gm.gmm.gprs_timer3_unit",
8846
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_gprs_timer3_unit_vals), 0xe0,
8847
14
        NULL, HFILL }
8848
14
    },
8849
14
    { &hf_gsm_a_gm_gprs_timer3_value,
8850
14
      { "Timer value", "gsm_a.gm.gmm.gprs_timer3_value",
8851
14
        FT_UINT8, BASE_DEC, NULL, 0x1f,
8852
14
        NULL, HFILL }
8853
14
    },
8854
14
    { &hf_gsm_a_gm_nsapi_5_ul_stat,
8855
14
      { "NSAPI(5) uplink status", "gsm_a.gm.gmm.nsapi_5_ul_stat",
8856
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8857
14
        NULL, HFILL }
8858
14
    },
8859
14
    { &hf_gsm_a_gm_nsapi_6_ul_stat,
8860
14
      { "NSAPI(6) uplink status", "gsm_a.gm.gmm.nsapi_6_ul_stat",
8861
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8862
14
        NULL, HFILL }
8863
14
    },
8864
14
    { &hf_gsm_a_gm_nsapi_7_ul_stat,
8865
14
      { "NSAPI(7) uplink status", "gsm_a.gm.gmm.nsapi_7_ul_stat",
8866
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8867
14
        NULL, HFILL }
8868
14
    },
8869
14
    { &hf_gsm_a_gm_nsapi_8_ul_stat,
8870
14
      { "NSAPI(8) uplink status", "gsm_a.gm.gmm.nsapi_8_ul_stat",
8871
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8872
14
        NULL, HFILL }
8873
14
    },
8874
14
    { &hf_gsm_a_gm_nsapi_9_ul_stat,
8875
14
      { "NSAPI(9) uplink status", "gsm_a.gm.gmm.nsapi_9_ul_stat",
8876
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8877
14
        NULL, HFILL }
8878
14
    },
8879
14
    { &hf_gsm_a_gm_nsapi_10_ul_stat,
8880
14
      { "NSAPI(10) uplink status", "gsm_a.gm.gmm.nsapi_10_ul_stat",
8881
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8882
14
        NULL, HFILL }
8883
14
    },
8884
14
    { &hf_gsm_a_gm_nsapi_11_ul_stat,
8885
14
      { "NSAPI(11) uplink status", "gsm_a.gm.gmm.nsapi_11_ul_stat",
8886
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8887
14
        NULL, HFILL }
8888
14
    },
8889
14
    { &hf_gsm_a_gm_nsapi_12_ul_stat,
8890
14
      { "NSAPI(12) uplink status", "gsm_a.gm.gmm.nsapi_12_ul_stat",
8891
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8892
14
        NULL, HFILL }
8893
14
    },
8894
14
    { &hf_gsm_a_gm_nsapi_13_ul_stat,
8895
14
      { "NSAPI(13) uplink status", "gsm_a.gm.gmm.nsapi_13_ul_stat",
8896
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8897
14
        NULL, HFILL }
8898
14
    },
8899
14
    { &hf_gsm_a_gm_nsapi_14_ul_stat,
8900
14
      { "NSAPI(14) uplink status", "gsm_a.gm.gmm.nsapi_14_ul_stat",
8901
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8902
14
        NULL, HFILL }
8903
14
    },
8904
14
    { &hf_gsm_a_gm_nsapi_15_ul_stat,
8905
14
      { "NSAPI(15) uplink status", "gsm_a.gm.gmm.nsapi_15_ul_stat",
8906
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_nsapi_ul_stat_vals), 0x0,
8907
14
        NULL, HFILL }
8908
14
    },
8909
14
    { &hf_gsm_a_gm_device_prop_low_prio,
8910
14
      { "Low priority", "gsm_a.gm.gmm.device_prop_low_prio",
8911
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_device_prop_low_prio_value), 0x0,
8912
14
        NULL, HFILL }
8913
14
    },
8914
14
    { &hf_gsm_a_gm_apn,
8915
14
      { "APN", "gsm_a.gm.sm.apn",
8916
14
        FT_STRING,BASE_NONE, NULL,0x0,
8917
14
        NULL, HFILL }
8918
14
    },
8919
14
    { &hf_gsm_a_gm_pco_pid,
8920
14
      { "Protocol or Container ID", "gsm_a.gm.sm.pco_pid",
8921
14
        FT_UINT16, BASE_HEX, NULL, 0x0,
8922
14
        NULL, HFILL }
8923
14
    },
8924
14
    { &hf_gsm_a_gm_pco_app_spec_info,
8925
14
      { "Application specific information", "gsm_a.gm.sm.app_spec_info",
8926
14
        FT_BYTES, BASE_NONE, NULL, 0x0,
8927
14
        NULL, HFILL }
8928
14
    },
8929
14
    { &hf_gsm_a_gm_type_of_identity,
8930
14
      { "Type of identity", "gsm_a.gm.gmm.type_of_identity",
8931
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_type_of_identity_vals), 0x07,
8932
14
        NULL, HFILL }
8933
14
    },
8934
14
    { &hf_gsm_a_gm_rac,
8935
14
      { "Routing Area Code (RAC)", "gsm_a.gm.gmm.rac",
8936
14
        FT_UINT8, BASE_HEX_DEC, NULL, 0x00,
8937
14
        NULL, HFILL }
8938
14
    },
8939
14
    { &hf_gsm_a_gm_mta_e,
8940
14
      { "MTA-E", "gsm_a.gm.gmm.mta_e",
8941
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_mta_e_vals), 0x80,
8942
14
        NULL, HFILL }
8943
14
    },
8944
14
    { &hf_gsm_a_gm_mta_r,
8945
14
      { "MTA-R", "gsm_a.gm.gmm.mta_r",
8946
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_mta_r_vals), 0x40,
8947
14
        NULL, HFILL }
8948
14
    },
8949
14
    { &hf_gsm_a_gm_apc,
8950
14
      { "APC", "gsm_a.gm.gmm.apc",
8951
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_apc_vals), 0x20,
8952
14
        NULL, HFILL }
8953
14
    },
8954
14
    { &hf_gsm_a_gm_otd_a,
8955
14
      { "OTD-A", "gsm_a.gm.gmm.otd_a",
8956
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_otd_a_vals), 0x10,
8957
14
        NULL, HFILL }
8958
14
    },
8959
14
    { &hf_gsm_a_gm_otd_b,
8960
14
      { "OTD-B", "gsm_a.gm.gmm.otd_b",
8961
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_otd_b_vals), 0x08,
8962
14
        NULL, HFILL }
8963
14
    },
8964
14
    { &hf_gsm_a_gm_gps_a,
8965
14
      { "GPS-A", "gsm_a.gm.gmm.gps_a",
8966
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_a_vals), 0x04,
8967
14
        NULL, HFILL }
8968
14
    },
8969
14
    { &hf_gsm_a_gm_gps_b,
8970
14
      { "GPS-B", "gsm_a.gm.gmm.gps_b",
8971
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_b_vals), 0x02,
8972
14
        NULL, HFILL }
8973
14
    },
8974
14
    { &hf_gsm_a_gm_gps_c,
8975
14
      { "GPS-C", "gsm_a.gm.gmm.gps_c",
8976
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_gps_c_vals), 0x01,
8977
14
        NULL, HFILL }
8978
14
    },
8979
14
    { &hf_gsm_a_gm_motd,
8980
14
      { "MOTD", "gsm_a.gm.gmm.motd",
8981
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_motd_vals), 0x02,
8982
14
        NULL, HFILL }
8983
14
    },
8984
14
    { &hf_gsm_a_gm_mta_a,
8985
14
      { "MTA-A", "gsm_a.gm.gmm.mta_a",
8986
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_mta_a_vals), 0x01,
8987
14
        NULL, HFILL }
8988
14
    },
8989
14
    { &hf_gsm_a_gm_lcs_molr,
8990
14
      { "LCS-MOLR", "gsm_a.gm.gmm.lcs_molr",
8991
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_lcs_molr_value), 0x08,
8992
14
        NULL, HFILL }
8993
14
    },
8994
14
    { &hf_gsm_a_gm_mbms,
8995
14
      { "MBMS", "gsm_a.gm.gmm.mbms",
8996
14
        FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
8997
14
        NULL, HFILL }
8998
14
    },
8999
14
    { &hf_gsm_a_gm_ims_vops,
9000
14
      { "IMS VoPS", "gsm_a.gm.gmm.ims_vops",
9001
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_ims_vops_value), 0x02,
9002
14
        "IMS voice over PS session indicator", HFILL }
9003
14
    },
9004
14
    { &hf_gsm_a_gm_emc_bs,
9005
14
      { "EMC BS", "gsm_a.gm.gmm.emc_bs",
9006
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_emc_bs_value), 0x01,
9007
14
        "Emergency bearer services indicator", HFILL }
9008
14
    },
9009
14
    { &hf_gsm_a_gm_epco,
9010
14
      { "ePCO", "gsm_a.gm.gmm.epco",
9011
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_epco_value), 0x04,
9012
14
        NULL, HFILL }
9013
14
    },
9014
14
    { &hf_gsm_a_gm_restrict_ec,
9015
14
      { "RestrictEC", "gsm_a.gm.gmm.restrict_ec",
9016
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_restrict_ec_value), 0x02,
9017
14
        NULL, HFILL }
9018
14
    },
9019
14
    { &hf_gsm_a_gm_gprs_sms,
9020
14
      { "GPRS-SMS", "gsm_a.gm.gmm.gprs_sms",
9021
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_gprs_sms_value), 0x01,
9022
14
        NULL, HFILL }
9023
14
    },
9024
14
    { &hf_gsm_a_gm_req_ms_info_irat,
9025
14
      { "I-RAT", "gsm_a.gm.gmm.req_ms_info_irat",
9026
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_req_ms_info_irat_vals), 0x0,
9027
14
        NULL, HFILL }
9028
14
    },
9029
14
    { &hf_gsm_a_gm_req_ms_info_irat2,
9030
14
      { "I-RAT2", "gsm_a.gm.gmm.req_ms_info_irat2",
9031
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_req_ms_info_irat2_vals), 0x0,
9032
14
        NULL, HFILL }
9033
14
    },
9034
14
    { &hf_gsm_a_gm_ue_usage_setting,
9035
14
      { "UE's usage setting", "gsm_a.gm.gmm.ue_usage_setting",
9036
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_ue_usage_setting_vals), 0x0,
9037
14
        NULL, HFILL }
9038
14
    },
9039
14
    { &hf_gsm_a_gm_voice_domain_pref_for_eutran,
9040
14
      { "Voice domain preference for E-UTRAN", "gsm_a.gm.gmm.voice_domain_pref_for_eutran",
9041
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_voice_domain_pref_for_eutran_vals), 0x0,
9042
14
        NULL, HFILL }
9043
14
    },
9044
14
    { &hf_gsm_a_gm_ptmsi_type,
9045
14
      { "P-TMSI type", "gsm_a.gm.gmm.ptmsi_type",
9046
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_ptmsi_type_value), 0x0,
9047
14
        NULL, HFILL }
9048
14
    },
9049
14
    { &hf_gsm_a_gm_nri_cont,
9050
14
      { "NRI container value", "gsm_a.gm.gmm.nri_cont_value",
9051
14
        FT_UINT16, BASE_HEX, NULL, 0xffc0,
9052
14
        NULL, HFILL }
9053
14
    },
9054
14
    { &hf_gsm_a_gm_paging_time_window,
9055
14
      { "Paging Time Window", "gsm_a.gm.gmm.paging_time_window",
9056
14
        FT_UINT8, BASE_HEX, VALS(gsm_a_gm_paging_time_window_vals), 0xf0,
9057
14
        NULL, HFILL }
9058
14
    },
9059
14
    { &hf_gsm_a_gm_edrx_value,
9060
14
      { "eDRX value", "gsm_a.gm.gmm.edrx_value",
9061
14
        FT_UINT8, BASE_HEX, VALS(gsm_a_gm_edrx_vals), 0x0f,
9062
14
        NULL, HFILL }
9063
14
    },
9064
14
    { &hf_gsm_a_gm_ext_paging_time_window,
9065
14
      { "Extended Paging Time Window", "gsm_a.gm.gmm.extended_paging_time_window",
9066
14
        FT_UINT8, BASE_HEX, VALS(gsm_a_gm_paging_time_window_nr_5gcn_vals), 0x0,
9067
14
        NULL, HFILL }
9068
14
    },
9069
14
    { &hf_gsm_a_gm_mac,
9070
14
      { "Message authentication code value", "gsm_a.gm.gmm.mac",
9071
14
        FT_UINT32, BASE_HEX, NULL, 0x0,
9072
14
        NULL, HFILL }
9073
14
    },
9074
14
    { &hf_gsm_a_gm_up_integ_ind,
9075
14
      { "Integrity indicator", "gsm_a.gm.gmm.up_integ_ind",
9076
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_up_integ_ind_value), 0x01,
9077
14
        NULL, HFILL }
9078
14
    },
9079
14
    { &hf_gsm_a_gm_dcn_id,
9080
14
      { "DCN-ID", "gsm_a.gm.gmm.dcn_id",
9081
14
        FT_UINT16, BASE_HEX, NULL, 0x0,
9082
14
        NULL, HFILL }
9083
14
    },
9084
14
    { &hf_gsm_a_gm_n3en_ind,
9085
14
      { "N3EN indicator", "gsm_a.gm.gmm.n3en_ind",
9086
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_n3en_ind_value), 0x01,
9087
14
        NULL, HFILL }
9088
14
    },
9089
14
    { &hf_gsm_a_sm_pdp_type_org,
9090
14
      { "PDP type organization", "gsm_a.gm.sm.pdp_type_org",
9091
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_sm_pdp_type_org_vals), 0x0f,
9092
14
        NULL, HFILL }
9093
14
    },
9094
14
    { &hf_gsm_a_sm_qos_mean_thr,
9095
14
      { "Mean throughput", "gsm_a.gm.sm.qos.mean_throughput",
9096
14
        FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_sm_qos_mean_thr_vals), 0x1f,
9097
14
        NULL, HFILL }
9098
14
    },
9099
14
    { &hf_gsm_a_sm_qos_peak_thr,
9100
14
      { "Peak throughput", "gsm_a.gm.sm.qos.peak_throughput",
9101
14
        FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_sm_qos_peak_thr_vals), 0xf0,
9102
14
        NULL, HFILL }
9103
14
    },
9104
14
    { &hf_gsm_a_sm_qos_prec_class,
9105
14
      { "Precedence class", "gsm_a.gm.sm.qos.prec_class",
9106
14
        FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_sm_qos_prec_class_vals), 0x07,
9107
14
        NULL, HFILL }
9108
14
    },
9109
14
    { &hf_gsm_a_sm_qos_trans_delay,
9110
14
      { "Transfer delay", "gsm_a.gm.sm.qos.trans_delay",
9111
14
        FT_UINT8, BASE_DEC, NULL, 0xfc,
9112
14
        NULL, HFILL }
9113
14
    },
9114
14
    { &hf_gsm_a_sm_qos_signalling_ind,
9115
14
      { "Signalling indication", "gsm_a.gm.sm.qos.signalling_ind",
9116
14
        FT_BOOLEAN, 8, TFS(&gsm_a_sm_qos_signalling_ind_value), 0x10,
9117
14
        NULL, HFILL }
9118
14
    },
9119
14
    { &hf_gsm_a_sm_qos_source_stat_desc,
9120
14
      { "Source statistics description", "gsm_a.gm.sm.qos.source_stat_desc",
9121
14
        FT_UINT8, BASE_DEC, NULL, 0x0f,
9122
14
        NULL, HFILL }
9123
14
    },
9124
14
    { &hf_gsm_a_sm_qos_max_bitrate_upl,
9125
14
      { "Maximum bitrate for uplink", "gsm_a.gm.sm.qos.max_bitrate_upl",
9126
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9127
14
        NULL, HFILL }
9128
14
    },
9129
14
    { &hf_gsm_a_sm_qos_max_bitrate_downl,
9130
14
      { "Maximum bitrate for downlink", "gsm_a.gm.sm.qos.max_bitrate_downl",
9131
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9132
14
        NULL, HFILL }
9133
14
    },
9134
14
    { &hf_gsm_a_sm_qos_guar_bitrate_upl,
9135
14
      { "Guaranteed bitrate for uplink", "gsm_a.gm.sm.qos.guar_bitrate_upl",
9136
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9137
14
        NULL, HFILL }
9138
14
    },
9139
14
    { &hf_gsm_a_sm_qos_guar_bitrate_downl,
9140
14
      { "Guaranteed bitrate for downlink", "gsm_a.gm.sm.qos.guar_bitrate_downl",
9141
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9142
14
        NULL, HFILL }
9143
14
    },
9144
14
    { &hf_gsm_a_sm_qos_max_bitrate_upl_ext,
9145
14
      { "Maximum bitrate for uplink (extended)", "gsm_a.gm.sm.qos.max_bitrate_upl_ext",
9146
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9147
14
        NULL, HFILL }
9148
14
    },
9149
14
    { &hf_gsm_a_sm_qos_max_bitrate_downl_ext,
9150
14
      { "Maximum bitrate for downlink (extended)", "gsm_a.gm.sm.qos.max_bitrate_downl_ext",
9151
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9152
14
        NULL, HFILL }
9153
14
    },
9154
14
    { &hf_gsm_a_sm_qos_guar_bitrate_upl_ext,
9155
14
      { "Guaranteed bitrate for uplink (extended)", "gsm_a.gm.sm.qos.guar_bitrate_upl_ext",
9156
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9157
14
        NULL, HFILL }
9158
14
    },
9159
14
    { &hf_gsm_a_sm_qos_guar_bitrate_downl_ext,
9160
14
      { "Guaranteed bitrate for downlink (extended)", "gsm_a.gm.sm.qos.guar_bitrate_downl_ext",
9161
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9162
14
        NULL, HFILL }
9163
14
    },
9164
14
    { &hf_gsm_a_sm_qos_max_bitrate_upl_ext2,
9165
14
      { "Maximum bitrate for uplink (extended-2)", "gsm_a.gm.sm.qos.max_bitrate_upl_ext2",
9166
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9167
14
        NULL, HFILL }
9168
14
    },
9169
14
    { &hf_gsm_a_sm_qos_max_bitrate_downl_ext2,
9170
14
      { "Maximum bitrate for downlink (extended-2)", "gsm_a.gm.sm.qos.max_bitrate_downl_ext2",
9171
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9172
14
        NULL, HFILL }
9173
14
    },
9174
14
    { &hf_gsm_a_sm_qos_guar_bitrate_upl_ext2,
9175
14
      { "Guaranteed bitrate for uplink (extended-2)", "gsm_a.gm.sm.qos.guar_bitrate_upl_ext2",
9176
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9177
14
        NULL, HFILL }
9178
14
    },
9179
14
    { &hf_gsm_a_sm_qos_guar_bitrate_downl_ext2,
9180
14
      { "Guaranteed bitrate for downlink (extended-2)", "gsm_a.gm.sm.qos.guar_bitrate_downl_ext2",
9181
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9182
14
        NULL, HFILL }
9183
14
    },
9184
14
    { &hf_gsm_a_sm_eplmnc,
9185
14
      { "EPLMNC", "gsm_a.gm.sm.re_attempt_ind.eplmnc",
9186
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_eplmnc_value), 0x02,
9187
14
        NULL, HFILL }
9188
14
    },
9189
14
    { &hf_gsm_a_sm_ratc,
9190
14
      { "RATC", "gsm_a.gm.sm.re_attempt_ind.ratc",
9191
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_ratc_value), 0x01,
9192
14
        NULL, HFILL }
9193
14
    },
9194
14
    { &hf_gsm_a_sm_cause,
9195
14
      { "SM Cause", "gsm_a.gm.sm.cause",
9196
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9197
14
        NULL, HFILL }
9198
14
    },
9199
14
    { &hf_gsm_a_sm_cause_2,
9200
14
      { "SM Cause 2", "gsm_a.gm.sm.cause_2",
9201
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9202
14
        NULL, HFILL }
9203
14
    },
9204
14
    { &hf_gsm_a_sm_llc_sapi,
9205
14
      { "LLC SAPI", "gsm_a.gm.sm.llc_sapi",
9206
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_sm_llc_sapi_vals), 0x0f,
9207
14
        NULL, HFILL }
9208
14
    },
9209
14
    { &hf_gsm_a_sm_tdi,
9210
14
      { "Tear Down Indicator (TDI)", "gsm_a.gm.sm.tdi",
9211
14
        FT_BOOLEAN, 8, TFS(&gsm_a_sm_tdi_value), 0x01,
9212
14
        NULL, HFILL }
9213
14
    },
9214
14
    { &hf_gsm_a_sm_packet_flow_id,
9215
14
      { "Packet Flow Identifier (PFI)", "gsm_a.gm.sm.packet_flow_id",
9216
14
        FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_sm_packet_flow_id_vals), 0x7f,
9217
14
        NULL, HFILL }
9218
14
    },
9219
14
    { &hf_gsm_a_gmm_net_cap_gea1,
9220
14
      { "GEA/1", "gsm_a.gm.gmm.net_cap.gea1",
9221
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x80,
9222
14
        NULL, HFILL }
9223
14
    },
9224
14
    { &hf_gsm_a_gmm_net_cap_smdch,
9225
14
      { "SM capabilities via dedicated channels", "gsm_a.gm.gmm.net_cap.smdch",
9226
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smdch_vals), 0x40,
9227
14
        NULL, HFILL }
9228
14
    },
9229
14
    { &hf_gsm_a_gmm_net_cap_smgprs,
9230
14
      { "SM capabilities via GPRS channels", "gsm_a.gm.gmm.net_cap.smgprs",
9231
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_smgprs_vals), 0x20,
9232
14
        NULL, HFILL }
9233
14
    },
9234
14
    { &hf_gsm_a_gmm_net_cap_ucs2,
9235
14
      { "UCS2 support", "gsm_a.gm.gmm.net_cap.ucs2",
9236
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_ucs2_vals), 0x10,
9237
14
        NULL, HFILL }
9238
14
    },
9239
14
    { &hf_gsm_a_gmm_net_cap_ss_scr_ind,
9240
14
      { "SS Screening Indicator", "gsm_a.gm.gmm.net_cap.ss_scr_ind",
9241
14
        FT_UINT8, BASE_HEX, VALS(gsm_a_gmm_net_cap_ss_scr_ind_vals), 0x0c,
9242
14
        NULL, HFILL }
9243
14
    },
9244
14
    { &hf_gsm_a_gmm_net_cap_solsa,
9245
14
      { "SoLSA Capability", "gsm_a.gm.gmm.net_cap.solsa",
9246
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_solsa_vals), 0x02,
9247
14
        NULL, HFILL }
9248
14
    },
9249
14
    { &hf_gsm_a_gmm_net_cap_rev,
9250
14
      { "Revision level indicator", "gsm_a.gm.gmm.net_cap.rev",
9251
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_rev_vals), 0x01,
9252
14
        NULL, HFILL }
9253
14
    },
9254
14
    { &hf_gsm_a_gmm_net_cap_pfc,
9255
14
      { "PFC feature mode", "gsm_a.gm.gmm.net_cap.pfc",
9256
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_pfc_vals), 0x80,
9257
14
        NULL, HFILL }
9258
14
    },
9259
14
    { &hf_gsm_a_gmm_net_cap_ext_gea_bits,
9260
14
      { "Extended GEA bits", "gsm_a.gm.gmm.net_cap.ext_gea_bits",
9261
14
        FT_UINT8, BASE_HEX, NULL, 0x7e,
9262
14
        NULL, HFILL }
9263
14
    },
9264
14
    { &hf_gsm_a_gmm_net_cap_gea2,
9265
14
      { "GEA/2", "gsm_a.gm.gmm.net_cap.gea2",
9266
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x40,
9267
14
        NULL, HFILL }
9268
14
    },
9269
14
    { &hf_gsm_a_gmm_net_cap_gea3,
9270
14
      { "GEA/3", "gsm_a.gm.gmm.net_cap.gea3",
9271
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x20,
9272
14
        NULL, HFILL }
9273
14
    },
9274
14
    { &hf_gsm_a_gmm_net_cap_gea4,
9275
14
      { "GEA/4", "gsm_a.gm.gmm.net_cap.gea4",
9276
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x10,
9277
14
        NULL, HFILL }
9278
14
    },
9279
14
    { &hf_gsm_a_gmm_net_cap_gea5,
9280
14
      { "GEA/5", "gsm_a.gm.gmm.net_cap.gea5",
9281
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x08,
9282
14
        NULL, HFILL }
9283
14
    },
9284
14
    { &hf_gsm_a_gmm_net_cap_gea6,
9285
14
      { "GEA/6", "gsm_a.gm.gmm.net_cap.gea6",
9286
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x04,
9287
14
        NULL, HFILL }
9288
14
    },
9289
14
    { &hf_gsm_a_gmm_net_cap_gea7,
9290
14
      { "GEA/7", "gsm_a.gm.gmm.net_cap.gea7",
9291
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gea_vals), 0x02,
9292
14
        NULL, HFILL }
9293
14
    },
9294
14
    { &hf_gsm_a_gmm_net_cap_lcs,
9295
14
      { "LCS VA capability", "gsm_a.gm.gmm.net_cap.lcs",
9296
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_lcs_vals), 0x01,
9297
14
        NULL, HFILL }
9298
14
    },
9299
14
    { &hf_gsm_a_gmm_net_cap_ps_irat_iu,
9300
14
      { "PS inter-RAT HO from GERAN to UTRAN Iu mode capability", "gsm_a.gm.gmm.net_cap.ps_irat_iu",
9301
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_ps_irat_iu_vals), 0x80,
9302
14
        NULL, HFILL }
9303
14
    },
9304
14
    { &hf_gsm_a_gmm_net_cap_ps_irat_s1,
9305
14
      { "PS inter-RAT HO from GERAN to E-UTRAN S1 mode capability", "gsm_a.gm.gmm.net_cap.ps_irat_s1",
9306
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_ps_irat_s1_vals), 0x40,
9307
14
        NULL, HFILL }
9308
14
    },
9309
14
    { &hf_gsm_a_gmm_net_cap_comb_proc,
9310
14
      { "EMM Combined procedures capability", "gsm_a.gm.gmm.net_cap.comb_proc",
9311
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_comb_proc_vals), 0x20,
9312
14
        NULL, HFILL }
9313
14
    },
9314
14
    { &hf_gsm_a_gmm_net_cap_isr,
9315
14
      { "ISR support", "gsm_a.gm.gmm.net_cap.isr",
9316
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_isr_vals), 0x10,
9317
14
        NULL, HFILL }
9318
14
    },
9319
14
    { &hf_gsm_a_gmm_net_cap_srvcc_to_geran,
9320
14
      { "SRVCC to GERAN/UTRAN capability", "gsm_a.gm.gmm.net_cap.srvcc_to_geran",
9321
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_srvcc_to_geran_vals), 0x08,
9322
14
        NULL, HFILL }
9323
14
    },
9324
14
    { &hf_gsm_a_gmm_net_cap_epc,
9325
14
      { "EPC capability", "gsm_a.gm.gmm.net_cap.epc",
9326
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_epc_vals), 0x04,
9327
14
        NULL, HFILL }
9328
14
    },
9329
14
    { &hf_gsm_a_gmm_net_cap_nf,
9330
14
      { "NF capability", "gsm_a.gm.gmm.net_cap.nf",
9331
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_nf_vals), 0x02,
9332
14
        NULL, HFILL }
9333
14
    },
9334
14
    { &hf_gsm_a_gmm_net_geran_net_sharing,
9335
14
      { "GERAN network sharing capability", "gsm_a.gm.gmm.net_cap.geran_net_sharing",
9336
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_geran_net_vals), 0x01,
9337
14
        NULL, HFILL }
9338
14
    },
9339
14
    { &hf_gsm_a_gmm_net_cap_up_int_prot,
9340
14
      { "User plane integrity protection support", "gsm_a.gm.gmm.net_cap.up_int_prot",
9341
14
        FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
9342
14
        NULL, HFILL }
9343
14
    },
9344
14
    { &hf_gsm_a_gmm_net_cap_up_gia4,
9345
14
      { "GIA/4", "gsm_a.gm.gmm.net_cap.gia4",
9346
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gia_vals), 0x40,
9347
14
        NULL, HFILL }
9348
14
    },
9349
14
    { &hf_gsm_a_gmm_net_cap_up_gia5,
9350
14
      { "GIA/5", "gsm_a.gm.gmm.net_cap.gia5",
9351
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gia_vals), 0x20,
9352
14
        NULL, HFILL }
9353
14
    },
9354
14
    { &hf_gsm_a_gmm_net_cap_up_gia6,
9355
14
      { "GIA/6", "gsm_a.gm.gmm.net_cap.gia6",
9356
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gia_vals), 0x10,
9357
14
        NULL, HFILL }
9358
14
    },
9359
14
    { &hf_gsm_a_gmm_net_cap_up_gia7,
9360
14
      { "GIA/7", "gsm_a.gm.gmm.net_cap.gia7",
9361
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_gia_vals), 0x08,
9362
14
        NULL, HFILL }
9363
14
    },
9364
14
    { &hf_gsm_a_gmm_net_cap_epco_ie_ind,
9365
14
      { "ePCO IE indicator", "gsm_a.gm.gmm.net_cap.epco_ie_ind",
9366
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_epco_ie_ind_vals), 0x04,
9367
14
        NULL, HFILL }
9368
14
    },
9369
14
    { &hf_gsm_a_gmm_net_cap_restrict_use_enh_cov,
9370
14
      { "Restriction on use of enhanced coverage capability", "gsm_a.gm.gmm.net_cap.restrict_use_enh_cov",
9371
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_restrict_use_enh_cov_vals), 0x02,
9372
14
        NULL, HFILL }
9373
14
    },
9374
14
    { &hf_gsm_a_gmm_net_cap_dc_eutra_nr_cap,
9375
14
      { "Dual connectivity of E-UTRA with NR capability", "gsm_a.gm.gmm.net_cap.dc_eutra_nr_cap",
9376
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gmm_net_cap_dc_eutra_nr_cap_vals), 0x01,
9377
14
        NULL, HFILL }
9378
14
    },
9379
14
    { &hf_gsm_a_sm_tmgi,
9380
14
      { "Temporary Mobile Group Identity (TMGI)", "gsm_a.gm.sm.tmgi",
9381
14
        FT_UINT24, BASE_HEX, NULL, 0x0,
9382
14
        NULL, HFILL }
9383
14
    },
9384
14
    { &hf_gsm_a_sm_enh_nsapi,
9385
14
      { "Enhanced NSAPI", "gsm_a.gm.sm.enh_nsapi",
9386
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9387
14
        NULL, HFILL }
9388
14
    },
9389
14
    { &hf_gsm_a_sm_req_type,
9390
14
      { "Request type", "gsm_a.gm.sm.req_type",
9391
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_sm_req_type_vals), 0x07,
9392
14
        NULL, HFILL }
9393
14
    },
9394
14
    { &hf_gsm_a_sm_notif_ind,
9395
14
      { "Notification indicator", "gsm_a.gm.sm.notif_ind",
9396
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_sm_notif_ind_vals), 0x0,
9397
14
        NULL, HFILL }
9398
14
    },
9399
14
    { &hf_gsm_a_sm_connectivity_type,
9400
14
      { "Connectivity type", "gsm_a.gm.sm.connectivity_type",
9401
14
        FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gsm_a_sm_connectivity_type_vals), 0x0F,
9402
14
        NULL, HFILL }
9403
14
    },
9404
14
    { &hf_gsm_a_sm_wlan_utran_offload_accept,
9405
14
      { "WLAN UTRAN offload acceptability", "gsm_a.gm.sm.wlan_utran_offload_accept",
9406
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_sm_wlan_utran_offload_accept_value), 0x0,
9407
14
        NULL, HFILL }
9408
14
    },
9409
14
    { &hf_gsm_a_sm_wlan_eutran_offload_accept,
9410
14
      { "WLAN E-UTRAN offload acceptability", "gsm_a.gm.sm.wlan_eutran_offload_accept",
9411
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_sm_wlan_eutran_offload_accept_value), 0x0,
9412
14
        NULL, HFILL }
9413
14
    },
9414
14
    { &hf_gsm_a_sm_nbifom_cont,
9415
14
      { "NBIFOM container content", "gsm_a.gm.sm.nbifom_cont",
9416
14
        FT_BYTES, BASE_NONE, NULL, 0x0,
9417
14
        NULL, HFILL }
9418
14
    },
9419
14
    { &hf_gsm_a_gm_rac_ctrled_early_cm_sending,
9420
14
      { "Controlled early Classmark Sending", "gsm_a.gm.gmm.rac.ctrled_early_cm_sending",
9421
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_implemented_not_implemented), 0x0,
9422
14
        NULL, HFILL }
9423
14
    },
9424
14
    { &hf_gsm_a_gm_rac_pseudo_sync,
9425
14
      { "Pseudo Synchronisation", "gsm_a.gm.gmm.rac.pseudo_sync",
9426
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x0,
9427
14
        NULL, HFILL }
9428
14
    },
9429
14
    { &hf_gsm_a_gm_rac_vgcs,
9430
14
      { "Voice Group Call Service", "gsm_a.gm.gmm.rac.vgcs",
9431
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_vgcs), 0x0,
9432
14
        NULL, HFILL }
9433
14
    },
9434
14
    { &hf_gsm_a_gm_rac_vbs,
9435
14
      { "Voice Broadcast Service", "gsm_a.gm.gmm.rac.vbs",
9436
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_vbs), 0x0,
9437
14
        NULL, HFILL }
9438
14
    },
9439
14
    { &hf_gsm_a_gm_rac_multislot_capability,
9440
14
      { "Multislot capability struct", "gsm_a.gm.gmm.rac.multislot_capability",
9441
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x0,
9442
14
        NULL, HFILL }
9443
14
    },
9444
14
    { &hf_gsm_a_gm_rac_hscsd_multi_slot_class,
9445
14
      { "HSCSD multislot class", "gsm_a.gm.gmm.rac.hscsd_multi_slot_class",
9446
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0,
9447
14
        NULL, HFILL }
9448
14
    },
9449
14
    { &hf_gsm_a_gm_rac_gprs_multi_slot_class,
9450
14
      { "GPRS multislot class", "gsm_a.gm.gmm.rac.gprs_multi_slot_class",
9451
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0,
9452
14
        NULL, HFILL }
9453
14
    },
9454
14
    { &hf_gsm_a_gm_rac_gprs_ext_dyn_alloc_cap,
9455
14
      { "GPRS Extended Dynamic Allocation Capability", "gsm_a.gm.gmm.rac.gprs_ext_dyn_alloc_cap",
9456
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_implemented_not_implemented), 0x0,
9457
14
        NULL, HFILL }
9458
14
    },
9459
14
    { &hf_gsm_a_gm_rac_ecsd_multi_slot_class,
9460
14
      { "ECSD multislot class", "gsm_a.gm.gmm.rac.ecsd_multi_slot_class",
9461
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0,
9462
14
        NULL, HFILL }
9463
14
    },
9464
14
    { &hf_gsm_a_gm_rac_egprs_multi_slot_class,
9465
14
      { "EGPRS multislot class", "gsm_a.gm.gmm.rac.egprs_multi_slot_class",
9466
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_vals), 0x0,
9467
14
        NULL, HFILL }
9468
14
    },
9469
14
    { &hf_gsm_a_gm_rac_egprs_ext_dyn_alloc_cap,
9470
14
      { "EGPRS Extended Dynamic Allocation Capability", "gsm_a.gm.gmm.rac.egprs_ext_dyn_alloc_cap",
9471
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_implemented_not_implemented), 0x0,
9472
14
        NULL, HFILL }
9473
14
    },
9474
14
    { &hf_gsm_a_gm_rac_dtm_gprs_multi_slot_class,
9475
14
      { "DTM GPRS Multi Slot Class", "gsm_a.gm.gmm.rac.dtm_gprs_multi_slot_class",
9476
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_multi_slot_class_vals), 0x0,
9477
14
        NULL, HFILL }
9478
14
    },
9479
14
    { &hf_gsm_a_gm_rac_single_slt_dtm,
9480
14
      { "Single Slot DTM", "gsm_a.gm.gmm.rac.single_slt_dtm",
9481
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9482
14
        NULL, HFILL }
9483
14
    },
9484
14
    { &hf_gsm_a_gm_rac_dtm_egprs_multi_slot_cls_pres,
9485
14
      { "DTM EGPRS Multi Slot Class", "gsm_a.gm.gmm.rac.dtm_egprs_multi_slot_cls_pres",
9486
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x0,
9487
14
        NULL, HFILL }
9488
14
    },
9489
14
    { &hf_gsm_a_gm_rac_dtm_egprs_multi_slot_class,
9490
14
      { "DTM EGPRS Multi Slot Class", "gsm_a.gm.gmm.rac.dtm_egprs_multi_slot_class",
9491
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_multi_slot_class_vals), 0x0,
9492
14
        NULL, HFILL }
9493
14
    },
9494
14
    { &hf_gsm_a_gm_rac_8psk_pow_cap_pres,
9495
14
      { "8PSK Power Capability Bits", "gsm_a.gm.gmm.rac.8psk_pow_cap_pres",
9496
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_present_not_present), 0x0,
9497
14
        NULL, HFILL }
9498
14
    },
9499
14
    { &hf_gsm_a_gm_rac_comp_int_meas_cap,
9500
14
      { "COMPACT Interference Measurement Capability", "gsm_a.gm.gmm.rac.comp_int_meas_cap",
9501
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_implemented_not_implemented), 0x0,
9502
14
        NULL, HFILL }
9503
14
    },
9504
14
    { &hf_gsm_a_gm_rel_lev_ind,
9505
14
      { "Revision Level Indicator", "gsm_a.gm.gmm.rel_lev_ind",
9506
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_revision_level_indicator), 0x0,
9507
14
        NULL, HFILL }
9508
14
    },
9509
14
    { &hf_gsm_a_gm_rac_umts_fdd_cap,
9510
14
      { "UMTS FDD Radio Access Technology Capability", "gsm_a.gm.gmm.rac.umts_fdd_cap",
9511
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9512
14
        NULL, HFILL }
9513
14
    },
9514
14
    { &hf_gsm_a_gm_rac_umts_384_tdd_ra_cap,
9515
14
      { "UMTS 3.84 Mcps TDD Radio Access Technology Capability", "gsm_a.gm.gmm.rac.umts_384_tdd_ra_cap",
9516
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9517
14
        NULL, HFILL }
9518
14
    },
9519
14
    { &hf_gsm_a_gm_rac_cdma2000_cap,
9520
14
      { "CDMA 2000 Radio Access Technology Capability", "gsm_a.gm.gmm.rac.cdma2000_cap",
9521
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9522
14
        NULL, HFILL }
9523
14
    },
9524
14
    { &hf_gsm_a_gm_rac_umts_128_tdd_ra_cap,
9525
14
      { "UMTS 1.28 Mcps TDD Radio Access Technology Capability", "gsm_a.gm.gmm.rac.umts_128_tdd_ra_cap",
9526
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9527
14
        NULL, HFILL }
9528
14
    },
9529
14
    { &hf_gsm_a_gm_rac_geran_feat_pkg,
9530
14
      { "GERAN Feature Package 1", "gsm_a.gm.gmm.rac.geran_feat_pkg",
9531
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9532
14
        NULL, HFILL }
9533
14
    },
9534
14
    { &hf_gsm_a_gm_rac_mod_based_multi_slot_class_support,
9535
14
      { "Modulation based multislot class support", "gsm_a.gm.gmm.rac.mod_based_multi_slot_class_support",
9536
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9537
14
        NULL, HFILL }
9538
14
    },
9539
14
    { &hf_gsm_a_gm_rac_geran_iu_mode_cap,
9540
14
      { "GERAN Iu mode", "gsm_a.gm.gmm.rac.geran_iu_mode_cap",
9541
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9542
14
        NULL, HFILL }
9543
14
    },
9544
14
    { &hf_gsm_a_gm_rac_flo_iu_cap,
9545
14
      { "FLO Iu Capability", "gsm_a.gm.gmm.rac.flo_iu_cap",
9546
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9547
14
        NULL, HFILL }
9548
14
    },
9549
14
    { &hf_gsm_a_gm_rac_mult_tbf_cap,
9550
14
      { "Multiple TBF Capability", "gsm_a.gm.gmm.rac.mult_tbf_cap",
9551
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9552
14
        NULL, HFILL }
9553
14
    },
9554
14
    { &hf_gsm_a_gm_rac_down_adv_rec_perf,
9555
14
      { "Downlink Advanced Receiver Performance", "gsm_a.gm.gmm.rac.down_adv_rec_perf",
9556
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_down_adv_rec_perf_vals), 0x0,
9557
14
        NULL, HFILL }
9558
14
    },
9559
14
    { &hf_gsm_a_gm_rac_ext_rlc_mac_ctrl_msg_seg_cap,
9560
14
      { "Extended RLC/MAC Control Message Segmentation Capability", "gsm_a.gm.gmm.rac.ext_rlc_mac_ctrl_msg_seg_cap",
9561
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9562
14
        NULL, HFILL }
9563
14
    },
9564
14
    { &hf_gsm_a_gm_rac_dtm_enh_cap,
9565
14
      { "DTM Enhancements Capability", "gsm_a.gm.gmm.rac.dtm_enh_cap",
9566
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_dtm_enh_cap), 0x0,
9567
14
        NULL, HFILL }
9568
14
    },
9569
14
    { &hf_gsm_a_gm_rac_dtm_gprs_high_multi_slot_class,
9570
14
      { "DTM GPRS High Multi Slot Class", "gsm_a.gm.gmm.rac.dtm_gprs_high_multi_slot_class",
9571
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_high_multi_slot_class_vals), 0x0,
9572
14
        NULL, HFILL }
9573
14
    },
9574
14
    { &hf_gsm_a_gm_rac_dtm_egprs_high_multi_slot_class,
9575
14
      { "DTM EGPRS High Multi Slot Class", "gsm_a.gm.gmm.rac.dtm_egprs_high_multi_slot_class",
9576
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dtm_gprs_high_multi_slot_class_vals), 0x0,
9577
14
        NULL, HFILL }
9578
14
    },
9579
14
    { &hf_gsm_a_gm_rac_ps_ho_cap,
9580
14
      { "PS Handover Capability", "gsm_a.gm.gmm.rac.ps_ho_cap",
9581
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9582
14
        NULL, HFILL }
9583
14
    },
9584
14
    { &hf_gsm_a_gm_rac_dtm_ho_cap,
9585
14
      { "DTM Handover Capability", "gsm_a.gm.gmm.rac.dtm_ho_cap",
9586
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9587
14
        NULL, HFILL }
9588
14
    },
9589
14
    { &hf_gsm_a_gm_rac_multi_slot_cap_red_down_dual_carrier,
9590
14
      { "Multislot Capability Reduction for Downlink Dual Carrier", "gsm_a.gm.gmm.rac.multi_slot_cap_red_down_dual_carrier",
9591
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_cap_red_down_dual_carrier_vals), 0x0,
9592
14
        NULL, HFILL }
9593
14
    },
9594
14
    { &hf_gsm_a_gm_rac_down_dual_carrier_dtm_cap,
9595
14
      { "Downlink Dual Carrier for DTM Capability", "gsm_a.gm.gmm.rac.down_dual_carrier_dtm_cap",
9596
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9597
14
        NULL, HFILL }
9598
14
    },
9599
14
    { &hf_gsm_a_gm_rac_flex_ts_assign,
9600
14
      { "Flexible Timeslot Assignment", "gsm_a.gm.gmm.rac.flex_ts_assign",
9601
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9602
14
        NULL, HFILL }
9603
14
    },
9604
14
    { &hf_gsm_a_gm_rac_gan_ps_ho_cap,
9605
14
      { "GAN PS Handover Capability", "gsm_a.gm.gmm.rac.gan_ps_ho_cap",
9606
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9607
14
        NULL, HFILL }
9608
14
    },
9609
14
    { &hf_gsm_a_gm_rac_rlc_non_pers_mode,
9610
14
      { "RLC Non-persistent Mode", "gsm_a.gm.gmm.rac.rlc_non_pers_mode",
9611
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9612
14
        NULL, HFILL }
9613
14
    },
9614
14
    { &hf_gsm_a_gm_rac_reduced_lat_cap,
9615
14
      { "Reduced Latency Capability", "gsm_a.gm.gmm.rac.reduced_lat_cap",
9616
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9617
14
        NULL, HFILL }
9618
14
    },
9619
14
    { &hf_gsm_a_gm_rac_ul_egprs2,
9620
14
      { "Uplink EGPRS2", "gsm_a.gm.gmm.rac.ul_egprs2",
9621
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_ul_egprs2_vals), 0x0,
9622
14
        NULL, HFILL }
9623
14
    },
9624
14
    { &hf_gsm_a_gm_rac_dl_egprs2,
9625
14
      { "Downlink EGPRS2", "gsm_a.gm.gmm.rac.dl_egprs2",
9626
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dl_egprs2_vals), 0x0,
9627
14
        NULL, HFILL }
9628
14
    },
9629
14
    { &hf_gsm_a_gm_rac_eutra_fdd_support,
9630
14
      { "E-UTRA FDD support", "gsm_a.gm.gmm.rac.eutra_fdd_support",
9631
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9632
14
        NULL, HFILL }
9633
14
    },
9634
14
    { &hf_gsm_a_gm_rac_eutra_tdd_support,
9635
14
      { "E-UTRA TDD support", "gsm_a.gm.gmm.rac.eutra_tdd_support",
9636
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9637
14
        NULL, HFILL }
9638
14
    },
9639
14
    { &hf_gsm_a_gm_rac_geran_to_eutra_support_in_geran_ptm,
9640
14
      { "GERAN to E-UTRA support in GERAN packet transfer mode", "gsm_a.gm.gmm.rac.geran_to_eutra_support_in_geran_ptm",
9641
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_geran_to_eutra_support_in_geran_ptm_vals), 0x0,
9642
14
        NULL, HFILL }
9643
14
    },
9644
14
    { &hf_gsm_a_gm_rac_prio_based_resel_support,
9645
14
      { "Priority-based reselection support", "gsm_a.gm.gmm.rac.prio_based_resel_support",
9646
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9647
14
        NULL, HFILL }
9648
14
    },
9649
14
    { &hf_gsm_a_gm_rac_alt_efta_multi_slot_class,
9650
14
      { "Alternative EFTA Multislot Class", "gsm_a.gm.gmm.rac.alt_efta_multi_slot_class",
9651
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_alt_efta_multi_slot_class_vals), 0x0,
9652
14
        NULL, HFILL }
9653
14
    },
9654
14
    { &hf_gsm_a_gm_rac_efta_multi_slot_cap_red_down_dual_carrier,
9655
14
      { "EFTA Multislot Capability Reduction for Downlink Dual Carrier", "gsm_a.gm.gmm.rac.efta_multi_slot_cap_red_down_dual_carrier",
9656
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_multi_slot_cap_red_down_dual_carrier_vals), 0x0,
9657
14
        NULL, HFILL }
9658
14
    },
9659
14
    { &hf_gsm_a_gm_rac_ind_up_layer_pdu_start_cap_for_rlc_um,
9660
14
      { "Indication of Upper Layer PDU Start Capability for RLC UM", "gsm_a.gm.gmm.rac.ind_up_layer_pdu_start_cap_for_rlc_um",
9661
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9662
14
        NULL, HFILL }
9663
14
    },
9664
14
    { &hf_gsm_a_gm_rac_emst_cap,
9665
14
      { "Enhanced Multiplexing for Single TBF Capability", "gsm_a.gm.gmm.rac.emst_cap",
9666
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9667
14
        NULL, HFILL }
9668
14
    },
9669
14
    { &hf_gsm_a_gm_rac_mtti_cap,
9670
14
      { "Multiple TTI Capability", "gsm_a.gm.gmm.rac.mtti_cap",
9671
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9672
14
        NULL, HFILL }
9673
14
    },
9674
14
    { &hf_gsm_a_gm_rac_utra_csg_cell_report,
9675
14
      { "Reporting of UTRAN CSG cells in packet transfer mode", "gsm_a.gm.gmm.rac.utra_csg_cell_report",
9676
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9677
14
        NULL, HFILL }
9678
14
    },
9679
14
    { &hf_gsm_a_gm_rac_eutra_csg_cell_report,
9680
14
      { "Reporting of E-UTRAN CSG cells in packet transfer mode", "gsm_a.gm.gmm.rac.eutra_csg_cell_report",
9681
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9682
14
        NULL, HFILL }
9683
14
    },
9684
14
    { &hf_gsm_a_gm_rac_dtr_cap,
9685
14
      { "Dynamic Timeslot Reduction Capability", "gsm_a.gm.gmm.rac.dtr_cap",
9686
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9687
14
        NULL, HFILL }
9688
14
    },
9689
14
    { &hf_gsm_a_gm_rac_emsr_cap,
9690
14
      { "Enhanced Multiplexing for Single RLC Entity Capability", "gsm_a.gm.gmm.rac.emsr_cap",
9691
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9692
14
        NULL, HFILL }
9693
14
    },
9694
14
    { &hf_gsm_a_gm_rac_fast_down_freq_switch_cap,
9695
14
      { "Fast Downlink Frequency Switching Capability", "gsm_a.gm.gmm.rac.fast_down_freq_switch_cap",
9696
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9697
14
        NULL, HFILL }
9698
14
    },
9699
14
    { &hf_gsm_a_gm_rac_tighter_cap,
9700
14
      { "TIGHTER Capability", "gsm_a.gm.gmm.rac.tighter_cap",
9701
14
        FT_UINT8, BASE_DEC, VALS(tighter_cap_level_vals), 0x0,
9702
14
        NULL, HFILL }
9703
14
    },
9704
14
    { &hf_gsm_a_gm_rac_fanr_cap,
9705
14
      { "Fast Ack/Nack Reporting Capability", "gsm_a.gm.gmm.rac.fanr_cap",
9706
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9707
14
        NULL, HFILL }
9708
14
    },
9709
14
    { &hf_gsm_a_gm_rac_ipa_cap,
9710
14
      { "Immediate Packet Assignment Capability", "gsm_a.gm.gmm.rac.ipa_cap",
9711
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9712
14
        NULL, HFILL }
9713
14
    },
9714
14
    { &hf_gsm_a_gm_rac_geran_nw_sharing_support,
9715
14
      { "GERAN Network Sharing support", "gsm_a.gm.gmm.rac.geran_nw_sharing_support",
9716
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9717
14
        NULL, HFILL }
9718
14
    },
9719
14
    { &hf_gsm_a_gm_rac_eutra_wb_rsrq_support,
9720
14
      { "E-UTRA Wideband RSRQ measurements support", "gsm_a.gm.gmm.rac.eutra_wb_rsrq_support",
9721
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9722
14
        NULL, HFILL }
9723
14
    },
9724
14
    { &hf_gsm_a_gm_rac_utra_mfbi_support,
9725
14
      { "UTRA Multiple Frequency Band Indicators support", "gsm_a.gm.gmm.rac.utra_mfbi_support",
9726
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9727
14
        NULL, HFILL }
9728
14
    },
9729
14
    { &hf_gsm_a_gm_rac_eutra_mfbi_support,
9730
14
      { "E-UTRA Multiple Frequency Band Indicators support", "gsm_a.gm.gmm.rac.eutra_mfbi_support",
9731
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9732
14
        NULL, HFILL }
9733
14
    },
9734
14
    { &hf_gsm_a_gm_rac_dlmc_non_contig_intra_band_recep,
9735
14
      { "DLMC - Non-contiguous intra-band reception", "gsm_a.gm.gmm.rac.dlmc.non_contig_intra_band_recep",
9736
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dlmc_non_contig_intra_band_recep_vals), 0x0,
9737
14
        NULL, HFILL }
9738
14
    },
9739
14
    { &hf_gsm_a_gm_rac_dlmc_inter_band_recep,
9740
14
      { "DLMC - Inter-band reception", "gsm_a.gm.gmm.rac.dlmc.inter_band_recep",
9741
14
        FT_BOOLEAN, BASE_NONE, TFS(&gsm_a_gm_dlmc_inter_band_recep_val), 0x0,
9742
14
        NULL, HFILL }
9743
14
    },
9744
14
    { &hf_gsm_a_gm_rac_dlmc_max_bandwidth,
9745
14
      { "DLMC - Maximum Bandwidth", "gsm_a.gm.gmm.rac.dlmc.max_bandwidth",
9746
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dlmc_max_bandwidth_vals), 0x0,
9747
14
        NULL, HFILL }
9748
14
    },
9749
14
    { &hf_gsm_a_gm_rac_dlmc_max_nb_dl_ts,
9750
14
      { "DLMC - Maximum Number of Downlink Timeslots", "gsm_a.gm.gmm.rac.dlmc.max_nb_dl_ts",
9751
14
        FT_UINT8, BASE_CUSTOM, CF_FUNC(gsm_a_gm_dlmc_max_nb_dl_ts_fmt), 0x0,
9752
14
        NULL, HFILL }
9753
14
    },
9754
14
    { &hf_gsm_a_gm_rac_dlmc_max_nb_dl_carriers,
9755
14
      { "DLMC - Maximum Number of Downlink Carriers", "gsm_a.gm.gmm.rac.dlmc.max_nb_dl_carriers",
9756
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_dlmc_max_nb_dl_carriers_vals), 0x0,
9757
14
        NULL, HFILL }
9758
14
    },
9759
14
    { &hf_gsm_a_gm_rac_ext_tsc_set_cap_support,
9760
14
      { "Extended TSC Set Capability support", "gsm_a.gm.gmm.rac.ext_tsc_set_cap_support",
9761
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x0,
9762
14
        NULL, HFILL }
9763
14
    },
9764
14
    { &hf_gsm_a_gm_rac_ext_earfcn_value_range,
9765
14
      { "Extended EARFCN value range", "gsm_a.gm.gmm.rac.ext_earfcn_value_range",
9766
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9767
14
        NULL, HFILL }
9768
14
    },
9769
14
    { &hf_gsm_a_gm_rac_ec_pch_mon_support,
9770
14
      { "(EC-)PCH monitoring support", "gsm_a.gm.gmm.rac.ec_pch_mon_support",
9771
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_ec_pch_mon_support_vals), 0x0,
9772
14
        NULL, HFILL }
9773
14
    },
9774
14
    { &hf_gsm_a_gm_rac_ms_sync_accuracy,
9775
14
      { "MS Sync Accuracy", "gsm_a.gm.gmm.rac.ms_sync_accuracy",
9776
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9777
14
        NULL, HFILL }
9778
14
    },
9779
14
    { &hf_gsm_a_gm_rac_ec_ul_cov_enh_support,
9780
14
      { "EC uplink coverage enhancement support", "gsm_a.gm.gmm.rac.ec_ul_cov_enh_support",
9781
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9782
14
        NULL, HFILL }
9783
14
    },
9784
14
    { &hf_gsm_a_gm_rac_mta_access_sec_support,
9785
14
      { "MTA Access Security support", "gsm_a.gm.gmm.rac.mta_access_sec_support",
9786
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9787
14
        NULL, HFILL }
9788
14
    },
9789
14
    { &hf_gsm_a_gm_rac_ec_paging_ind_chan_mon_support,
9790
14
      { "EC paging indication channel monitoring support", "gsm_a.gm.gmm.rac.ec_paging_ind_chan_mon_support",
9791
14
        FT_BOOLEAN, BASE_NONE, TFS(&tfs_supported_not_supported), 0x0,
9792
14
        NULL, HFILL }
9793
14
    },
9794
14
    { &hf_gsm_a_sm_ti_flag,
9795
14
      { "TI Flag", "gsm_a.gm.sm.ti_flag",
9796
14
        FT_BOOLEAN, 8, TFS(&gsm_a_sm_ti_flag_vals), 0x80,
9797
14
        NULL, HFILL }
9798
14
    },
9799
14
    { &hf_gsm_a_sm_ext,
9800
14
      { "Extension", "gsm_a.gm.sm.ext",
9801
14
        FT_BOOLEAN, 8, NULL, 0x80,
9802
14
        NULL, HFILL }
9803
14
    },
9804
14
    { &hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_aer,
9805
14
      { "AER", "gsm_a.gm.sm.pco.apn_rate_ctrl_params.aer",
9806
14
        FT_BOOLEAN, 8, TFS(&gsm_a_gm_apn_rate_ctrl_params_aer_value), 0x08,
9807
14
        NULL, HFILL }
9808
14
    },
9809
14
    { &hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_ul_time_unit,
9810
14
      { "Uplink time unit", "gsm_a.gm.sm.pco.apn_rate_ctrl_params.ul_time_unit",
9811
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_apn_rate_ctrl_ul_time_unit_vals), 0x07,
9812
14
        NULL, HFILL }
9813
14
    },
9814
14
    { &hf_gsm_a_gm_sm_pco_apn_rate_ctrl_params_max_ul_rate,
9815
14
      { "Maximum uplink rate", "gsm_a.gm.sm.pco.apn_rate_ctrl_params.max_ul_rate",
9816
14
        FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_message_messages), 0x0,
9817
14
        NULL, HFILL }
9818
14
    },
9819
14
    { &hf_gsm_a_gm_sm_pco_3gpp_data_off_ue_status,
9820
14
      { "3GPP PS data off UE status", "gsm_a.gm.sm.pco.3gpp_data_off_ue_status",
9821
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_sm_pco_3gpp_data_off_ue_status_vals), 0x0,
9822
14
        NULL, HFILL }
9823
14
    },
9824
14
    { &hf_gsm_a_gm_sm_pco_add_apn_rate_ctrl_params_ul_time_unit,
9825
14
      { "Uplink time unit", "gsm_a.gm.sm.pco.add_apn_rate_ctrl_params.ul_time_unit",
9826
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_apn_rate_ctrl_ul_time_unit_vals), 0x07,
9827
14
        NULL, HFILL }
9828
14
    },
9829
14
    { &hf_gsm_a_gm_sm_pco_add_apn_rate_ctrl_params_max_ul_rate,
9830
14
      { "Additional uplink rate for exception data", "gsm_a.gm.sm.pco.add_apn_rate_ctrl_params.max_ul_rate",
9831
14
        FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_message_messages), 0x0,
9832
14
        NULL, HFILL }
9833
14
    },
9834
14
    { &hf_gsm_a_gm_sm_pco_pdu_session_id,
9835
14
      { "PDU session identity", "gsm_a.gm.sm.pco.pdu_session_id",
9836
14
        FT_UINT8, BASE_DEC, VALS(nas_5gs_pdu_session_id_vals), 0x0,
9837
14
        NULL, HFILL }
9838
14
    },
9839
14
    { &hf_gsm_a_gm_sm_pco_pdu_session_address_lifetime,
9840
14
      { "PDU session address lifetime", "gsm_a.gm.sm.pco.pdu_session_address_lifetime",
9841
14
        FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_second_seconds), 0x0,
9842
14
        NULL, HFILL }
9843
14
    },
9844
14
    { &hf_gsm_a_gm_sm_pco_eth_frame_payload_mtu,
9845
14
      { "Ethernet Frame Payload MTU", "gsm_a.gm.sm.pco.eth_frame_payload_mtu",
9846
14
        FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
9847
14
        NULL, HFILL }
9848
14
    },
9849
14
    { &hf_gsm_a_gm_sm_pco_unstruct_link_mtu,
9850
14
      { "Unstructured Link MTU", "gsm_a.gm.sm.pco.unstruct_link_mtu",
9851
14
        FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
9852
14
        NULL, HFILL }
9853
14
    },
9854
14
    { &hf_gsm_a_gm_sm_pco_5gsm_cause,
9855
14
      { "5GSM cause", "gsm_a.gm.sm.pco.5gsm_cause",
9856
14
        FT_UINT8, BASE_DEC, VALS(nas_5gs_sm_cause_vals), 0x0,
9857
14
        NULL, HFILL }
9858
14
    },
9859
14
    { &hf_gsm_a_gm_sm_pco_acs_info,
9860
14
      { "ACS information", "gsm_a.gm.sm.pco.acs_info",
9861
14
        FT_STRING, BASE_NONE, NULL, 0x0,
9862
14
        NULL, HFILL }
9863
14
    },
9864
14
    { &hf_gsm_a_gm_sm_pco_init_small_data_rate_ctrl_params_max_ul_rate_allowed,
9865
14
      { "Maximum uplink rate allowed", "gsm_a.gm.sm.pco.init_small_data_rate_ctrl_params.max_ul_rate_allowed",
9866
14
        FT_UINT24, BASE_DEC, NULL, 0x0,
9867
14
        NULL, HFILL }
9868
14
    },
9869
14
    { &hf_gsm_a_gm_sm_pco_init_small_data_rate_ctrl_params_termination_timestamp,
9870
14
      { "Termination timestamp", "gsm_a.gm.sm.pco.init_small_data_rate_ctrl_params.termination_timestamp",
9871
14
        FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0,
9872
14
        NULL, HFILL }
9873
14
    },
9874
14
    { &hf_gsm_a_gm_sm_pco_atsss_response,
9875
14
      { "ATSSS response", "gsm_a.gm.sm.pco.atsss_response",
9876
14
        FT_BYTES, BASE_NONE, NULL, 0x0,
9877
14
        NULL, HFILL }
9878
14
    },
9879
14
    { &hf_gsm_a_gm_sm_pco_dns_serv_sec_info_type,
9880
14
      { "Type", "gsm_a.gm.sm.pco.dns_serv_sec_info.type",
9881
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_sm_pco_dns_serv_sec_info_type_vals), 0x0,
9882
14
        NULL, HFILL }
9883
14
    },
9884
14
    { &hf_gsm_a_gm_sm_pco_dns_serv_sec_info_sec_proto_type,
9885
14
      { "Security protocol type", "gsm_a.gm.sm.pco.dns_serv_sec_info.sec_proto_type",
9886
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_sm_pco_dns_serv_sec_info_sec_proto_vals), 0x0,
9887
14
        NULL, HFILL }
9888
14
    },
9889
14
    { &hf_gsm_a_gm_sm_pco_dns_serv_sec_info_port_number,
9890
14
      { "Port number", "gsm_a.gm.sm.pco.dns_serv_sec_info.port_number",
9891
14
        FT_UINT16, BASE_DEC, NULL, 0x0,
9892
14
        NULL, HFILL }
9893
14
    },
9894
14
    { &hf_gsm_a_gm_sm_pco_dns_serv_sec_info_auth_domain_name,
9895
14
      { "Authentication domain name", "gsm_a.gm.sm.pco.dns_serv_sec_info.auth_domain_name",
9896
14
        FT_STRING, BASE_NONE, NULL, 0x0,
9897
14
        NULL, HFILL }
9898
14
    },
9899
14
    { &hf_gsm_a_gm_sm_pco_dns_serv_sec_info_spki_pin_set,
9900
14
      { "SPKI pin set", "gsm_a.gm.sm.pco.dns_serv_sec_info.spki_pin_set",
9901
14
        FT_BYTES, BASE_NONE, NULL, 0x0,
9902
14
        NULL, HFILL }
9903
14
    },
9904
14
    { &hf_gsm_a_gm_sm_pco_dns_serv_sec_info_root_certificate,
9905
14
      { "Root certificate", "gsm_a.gm.sm.pco.dns_serv_sec_info.root_certificate",
9906
14
        FT_BYTES, BASE_NONE, NULL, 0x0,
9907
14
        NULL, HFILL }
9908
14
    },
9909
14
    { &hf_gsm_a_gm_sm_pco_dns_serv_sec_info_raw_public_key,
9910
14
      { "Raw public key", "gsm_a.gm.sm.pco.dns_serv_sec_info.raw_public_key",
9911
14
        FT_BYTES, BASE_NONE, NULL, 0x0,
9912
14
        NULL, HFILL }
9913
14
    },
9914
14
    { &hf_gsm_a_gm_sm_pco_dns_serv_sec_info_value_part,
9915
14
      { "Value part", "gsm_a.gm.sm.pco.dns_serv_sec_info.value_part",
9916
14
        FT_BYTES, BASE_NONE, NULL, 0x0,
9917
14
        NULL, HFILL }
9918
14
    },
9919
14
    { &hf_gsm_a_gm_sm_pco_ecs_addr_type,
9920
14
      { "Type of ECS address", "gsm_a.gm.sm.pco.ecs_addr.type",
9921
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_sm_pco_ecs_addr_type_vals), 0xf0,
9922
14
        NULL, HFILL }
9923
14
    },
9924
14
    { &hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_type,
9925
14
      { "Type of spatial validity condition", "gsm_a.gm.sm.pco.ecs_addr.spatial_valid_cond_type",
9926
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_type_vals), 0x0f,
9927
14
        NULL, HFILL }
9928
14
    },
9929
14
    { &hf_gsm_a_gm_sm_pco_ecs_addr_ipv4,
9930
14
      { "ECS IPv4 address", "gsm_a.gm.sm.pco.ecs_addr.ipv4",
9931
14
        FT_IPv4, BASE_NONE, NULL, 0x0,
9932
14
        NULL, HFILL }
9933
14
    },
9934
14
    { &hf_gsm_a_gm_sm_pco_ecs_addr_ipv6,
9935
14
      { "ECS IPv6 address", "gsm_a.gm.sm.pco.ecs_addr.ipv6",
9936
14
        FT_IPv6, BASE_NONE, NULL, 0x0,
9937
14
        NULL, HFILL }
9938
14
    },
9939
14
    { &hf_gsm_a_gm_sm_pco_ecs_addr_fqdn_len,
9940
14
      { "ECS FQDN address length", "gsm_a.gm.sm.pco.ecs_addr.fqdn.len",
9941
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9942
14
        NULL, HFILL }
9943
14
    },
9944
14
    { &hf_gsm_a_gm_sm_pco_ecs_addr_fqdn,
9945
14
      { "ECS FQDN address", "gsm_a.gm.sm.pco.ecs_addr.fqdn",
9946
14
        FT_STRING, BASE_NONE, NULL, 0x0,
9947
14
        NULL, HFILL }
9948
14
    },
9949
14
    { &hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_cont_len,
9950
14
      { "Spatial validity condition contents length", "gsm_a.gm.sm.pco.ecs_addr.spatial_valid_cond_cont_len",
9951
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9952
14
        NULL, HFILL }
9953
14
    },
9954
14
    { &hf_gsm_a_gm_sm_pco_ecs_addr_spatial_valid_cond_cont,
9955
14
      { "Spatial validity condition contents", "gsm_a.gm.sm.pco.ecs_addr.spatial_valid_cond_cont",
9956
14
        FT_BYTES, BASE_NONE, NULL, 0x0,
9957
14
        NULL, HFILL }
9958
14
    },
9959
14
    { &hf_gsm_a_gm_sm_pco_ecs_addr_espili,
9960
14
      { "ESPILI", "gsm_a.gm.sm.pco.ecs_addr.espili",
9961
14
        FT_BOOLEAN, 8, TFS(&tfs_included_not_included), 0x02,
9962
14
        NULL, HFILL }
9963
14
    },
9964
14
    { &hf_gsm_a_gm_sm_pco_ecs_addr_eami,
9965
14
      { "EAMI", "gsm_a.gm.sm.pco.ecs_addr.eami",
9966
14
        FT_BOOLEAN, 8, TFS(&tfs_included_not_included), 0x01,
9967
14
        NULL, HFILL }
9968
14
    },
9969
14
    { &hf_gsm_a_gm_sm_pco_ecs_addr_tlsgi,
9970
14
      { "TLSGI", "gsm_a.gm.sm.pco.ecs_addr.tlsgi",
9971
14
        FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
9972
14
        NULL, HFILL }
9973
14
    },
9974
14
    { &hf_gsm_a_gm_sm_pco_ecs_addr_tlsai,
9975
14
      { "TLSAI", "gsm_a.gm.sm.pco.ecs_addr.tlsai",
9976
14
        FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
9977
14
        NULL, HFILL }
9978
14
    },
9979
14
    { &hf_gsm_a_gm_sm_pco_ecs_addr_tlscsci,
9980
14
      { "TLSCSCI", "gsm_a.gm.sm.pco.ecs_addr.tlscsci",
9981
14
        FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
9982
14
        NULL, HFILL }
9983
14
    },
9984
14
    { &hf_gsm_a_gm_sm_pco_ecs_addr_supported_plmns_info_list_cont_len,
9985
14
      { "ECS supported PLMNs information list length", "gsm_a.gm.sm.pco.ecs_addr.supported_plmns_info_list_cont_len",
9986
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
9987
14
        NULL, HFILL }
9988
14
    },
9989
14
    { &hf_gsm_a_gm_sm_pco_ecs_addr_supported_plmns_info_list_cont,
9990
14
      { "ECS supported PLMNs information list", "gsm_a.gm.sm.pco.ecs_addr.supported_plmns_info_list_cont",
9991
14
        FT_BYTES, BASE_NONE, NULL, 0x0,
9992
14
        NULL, HFILL }
9993
14
    },
9994
14
    { &hf_gsm_a_gm_sm_pco_ecsp_id,
9995
14
      { "ECSP identifier", "gsm_a.gm.sm.pco.ecsp_id",
9996
14
        FT_STRING, BASE_NONE, NULL, 0x0,
9997
14
        NULL, HFILL }
9998
14
    },
9999
14
    { &hf_gsm_a_gm_sm_pco_pvs_ipv4,
10000
14
      { "PVS IPv4 address", "gsm_a.gm.sm.pco.pvs.ipv4",
10001
14
        FT_IPv4, BASE_NONE, NULL, 0x0,
10002
14
        NULL, HFILL }
10003
14
    },
10004
14
    { &hf_gsm_a_gm_sm_pco_pvs_ipv6,
10005
14
      { "PVS IPv6 address", "gsm_a.gm.sm.pco.pvs.ipv6",
10006
14
        FT_IPv6, BASE_NONE, NULL, 0x0,
10007
14
        NULL, HFILL }
10008
14
    },
10009
14
    { &hf_gsm_a_gm_sm_pco_pvs_name_len,
10010
14
      { "PVS name length", "gsm_a.gm.sm.pco.pvs.name.len",
10011
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
10012
14
        NULL, HFILL }
10013
14
    },
10014
14
    { &hf_gsm_a_gm_sm_pco_pvs_name,
10015
14
      { "PVS name", "gsm_a.gm.sm.pco.pvs.name",
10016
14
        FT_STRING, BASE_NONE, NULL, 0x0,
10017
14
        NULL, HFILL }
10018
14
    },
10019
14
    { &hf_gsm_a_gm_sm_pco_pvs_s_nssai_ind,
10020
14
      { "S-NSSAI indicator", "gsm_a.gm.sm.pco.pvs.s_nssai_ind",
10021
14
        FT_BOOLEAN, 8, TFS(&tfs_present_absent), 0x02,
10022
14
        NULL, HFILL }
10023
14
    },
10024
14
    { &hf_gsm_a_gm_sm_pco_pvs_dnn_ind,
10025
14
      { "DNN indicator", "gsm_a.gm.sm.pco.pvs.dnn_ind",
10026
14
        FT_BOOLEAN, 8, TFS(&tfs_present_absent), 0x01,
10027
14
        NULL, HFILL }
10028
14
    },
10029
14
    { &hf_gsm_a_gm_sm_pco_pvs_dnn_len,
10030
14
      { "DNN length", "gsm_a.gm.sm.pco.pvs.dnn_len",
10031
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
10032
14
        NULL, HFILL }
10033
14
    },
10034
14
    { &hf_gsm_a_gm_sm_pco_pvs_s_nssai_len,
10035
14
      { "S-NSSAI length", "gsm_a.gm.sm.pco.pvs.s_nssai_len",
10036
14
        FT_UINT8, BASE_DEC, NULL, 0x0,
10037
14
        NULL, HFILL }
10038
14
    },
10039
14
    { &hf_gsm_a_gm_sm_pco_dns_serv_sec_prot_support,
10040
14
      { "DNS server security protocol type", "gsm_a.gm.sm.pco.dns_serv_sec_prot_support",
10041
14
        FT_UINT8, BASE_DEC, VALS(gsm_a_gm_sm_pco_dns_serv_sec_prot_support_vals), 0x0,
10042
14
        NULL, HFILL }
10043
14
    },
10044
14
    { &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_fqdn,
10045
14
      { "With impacted EAS FQDN address range", "gsm_a.gm.sm.pco.eas_rediscovery_support_ind.fqdn",
10046
14
        FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
10047
14
        NULL, HFILL }
10048
14
    },
10049
14
    { &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_ipv6,
10050
14
      { "With impacted EAS IPv6 address range", "gsm_a.gm.sm.pco.eas_rediscovery_support_ind.ipv6",
10051
14
        FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
10052
14
        NULL, HFILL }
10053
14
    },
10054
14
    { &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_ipv4,
10055
14
      { "With impacted EAS IPv4 address range", "gsm_a.gm.sm.pco.eas_rediscovery_support_ind.ipv4",
10056
14
        FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
10057
14
        NULL, HFILL }
10058
14
    },
10059
14
    { &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv4_range_low,
10060
14
      { "With impacted EAS IPv4 address range low", "gsm_a.gm.sm.pco.eas_rediscovery_support_ind_with_impacted_eas_ipv4_range.low",
10061
14
        FT_IPv4, BASE_NONE, NULL, 0x0,
10062
14
        NULL, HFILL }
10063
14
    },
10064
14
    { &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv4_range_high,
10065
14
      { "With impacted EAS IPv4 address range high", "gsm_a.gm.sm.pco.eas_rediscovery_support_ind_with_impacted_eas_ipv4_range.high",
10066
14
        FT_IPv4, BASE_NONE, NULL, 0x0,
10067
14
        NULL, HFILL }
10068
14
    },
10069
14
    { &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv6_range_low,
10070
14
      { "With impacted EAS IPv6 address range low", "gsm_a.gm.sm.pco.eas_rediscovery_support_ind_with_impacted_eas_ipv6_range.low",
10071
14
        FT_IPv6, BASE_NONE, NULL, 0x0,
10072
14
        NULL, HFILL }
10073
14
    },
10074
14
    { &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_ipv6_range_high,
10075
14
      { "With impacted EAS IPv6 address range high", "gsm_a.gm.sm.pco.eas_rediscovery_support_ind_with_impacted_eas_ipv6_range.high",
10076
14
        FT_IPv6, BASE_NONE, NULL, 0x0,
10077
14
        NULL, HFILL }
10078
14
    },
10079
14
    { &hf_gsm_a_gm_sm_pco_eas_rediscovery_support_ind_with_impacted_eas_fqdn,
10080
14
      { "With impacted EAS FQDN", "gsm_a.gm.sm.pco.eas_rediscovery_support_ind_with_impacted_eas_fqdn",
10081
14
        FT_STRING, BASE_NONE, NULL, 0x0,
10082
14
        NULL, HFILL }
10083
14
    },
10084
14
    { &hf_gsm_a_gm_sm_pco_sdnaepc_dn_specific_id,
10085
14
      { "SDNAEPC DN-specific identity", "gsm_a.gm.sm.pco.sdnaepc_dn_specific_id",
10086
14
        FT_STRING, BASE_NONE, NULL, 0x0,
10087
14
        NULL, HFILL }
10088
14
    },
10089
    /* Generated from convert_proto_tree_add_text.pl */
10090
14
    { &hf_gsm_a_gm_presence, { "Presence", "gsm_a.gm.gmm.presence", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10091
14
    { &hf_gsm_a_gm_8psk_power_class, { "8PSK Power Class", "gsm_a.gm.8psk_power_class", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_8psk_power_class_vals), 0x0, NULL, HFILL }},
10092
14
    { &hf_gsm_a_gm_rf_power_capability, { "RF Power Capability", "gsm_a.gm.rf_power_capability", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10093
14
    { &hf_gsm_a_gm_a5_bits, { "A5 Bits", "gsm_a.gm.a5_bits", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10094
14
    { &hf_gsm_a_gm_8psk_power_capability, { "8PSK Power Capability", "gsm_a.gm.8psk_power_capability", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_8psk_power_cap_vals), 0x0, NULL, HFILL }},
10095
14
    { &hf_gsm_a_gm_extended_dtm_gprs_multi_slot_class, { "Extended DTM GPRS Multi Slot Class", "gsm_a.gm.extended_dtm_gprs_multi_slot_class", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_extended_dtm_gprs_multi_slot_class_vals), 0x0, NULL, HFILL }},
10096
14
    { &hf_gsm_a_gm_extended_dtm_egprs_multi_slot_class, { "Extended DTM EGPRS Multi Slot Class", "gsm_a.gm.extended_dtm_egprs_multi_slot_class", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_extended_dtm_gprs_multi_slot_class_vals), 0x0, NULL, HFILL }},
10097
14
    { &hf_gsm_a_gm_high_multislot_capability, { "High Multislot Capability", "gsm_a.gm.high_multislot_capability", FT_UINT8, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL }},
10098
14
    { &hf_gsm_a_gm_gmsk_multislot_power_profile, { "GMSK Multislot Power Profile", "gsm_a.gm.gmsk_multislot_power_profile", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_gmsk_multislot_power_profile_vals), 0x0, NULL, HFILL }},
10099
14
    { &hf_gsm_a_gm_8psk_multislot_power_profile, { "8-PSK Multislot Power Profile", "gsm_a.gm.8psk_multislot_power_profile", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_8psk_multislot_power_profile_vals), 0x0, NULL, HFILL }},
10100
14
    { &hf_gsm_a_gm_update_result, { "Update Result", "gsm_a.gm.gmm.update_result", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_update_res_vals), 0x70, NULL, HFILL }},
10101
14
    { &hf_gsm_a_gm_radio_priority_pdp, { "Radio Priority (PDP or SMS)", "gsm_a.gm.radio_priority_pdp", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_radio_prio_vals), 0x07, NULL, HFILL }},
10102
14
    { &hf_gsm_a_gm_radio_priority_tom8, { "Radio Priority (TOM8)", "gsm_a.gm.radio_priority_tom8", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_radio_prio_vals), 0x70, NULL, HFILL }},
10103
14
    { &hf_gsm_a_gm_configuration_protocol, { "Configuration Protocol", "gsm_a.gm.configuration_protocol", FT_UINT8, BASE_DEC, NULL, 0x7, NULL, HFILL }},
10104
14
    { &hf_gsm_a_gm_sm_pco_length, { "Length", "gsm_a.gm.sm.pco.length", FT_UINT8, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL }},
10105
14
    { &hf_gsm_a_gm_sm_pco_length2, { "Length", "gsm_a.gm.sm.pco.length", FT_UINT16, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL }},
10106
14
    { &hf_gsm_a_gm_sm_pco_pcscf_ipv6, { "IPv6", "gsm_a.gm.sm.pco.pcscf.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10107
14
    { &hf_gsm_a_gm_sm_pco_dns_ipv6, { "IPv6", "gsm_a.gm.sm.pco.dns.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10108
14
    { &hf_gsm_a_gm_sm_pco_dsmipv6_home_agent_ipv6, { "IPv6", "gsm_a.gm.sm.pco.dsmipv6_home_agent.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10109
14
    { &hf_gsm_a_gm_sm_pco_dsmipv6_home_network_ipv6, { "IPv6", "gsm_a.gm.sm.pco.dsmipv6_home_network.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10110
14
    { &hf_gsm_a_gm_sm_pco_dsmipv6_home_network_prefix_length, { "Prefix length", "gsm_a.gm.sm.pco.dsmipv6_home_network.ipv6_prefix_length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10111
14
    { &hf_gsm_a_gm_sm_pco_reject_code, { "Reject Code", "gsm_a.gm.sm.pco.reject_code", FT_UINT8, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL }},
10112
14
    { &hf_gsm_a_gm_sm_pco_dsmipv6_home_agent_ipv4, { "IPv4", "gsm_a.gm.sm.pco.dsmipv6_home_agent.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10113
14
    { &hf_gsm_a_gm_sm_pco_pcscf_ipv4, { "IPv4", "gsm_a.gm.sm.pco.pcscf.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10114
14
    { &hf_gsm_a_gm_sm_pco_dns_ipv4, { "IPv4", "gsm_a.gm.sm.pco.dns.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10115
14
    { &hf_gsm_a_gm_sm_pco_ipv4_link_mtu_size, { "IPv4 link MTU size", "gsm_a.gm.sm.pco.ipv4_link_mtu_size", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0, NULL, HFILL }},
10116
14
    { &hf_gsm_a_gm_sm_pco_nbifom_mode, { "NBIFOM mode", "gsm_a.gm.sm.pco.nbifom_mode", FT_UINT8, BASE_HEX, VALS(gsm_a_gm_nbifom_mode_vals), 0x0, NULL, HFILL }},
10117
14
    { &hf_gsm_a_gm_sm_pco_non_ip_link_mtu_size, { "Non-IP link MTU size", "gsm_a.gm.sm.pco.non_ip_link_mtu_size", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0, NULL, HFILL }},
10118
14
    { &hf_gsm_a_gm_sm_pco_sel_bearer_ctrl_mode, { "Selected Bearer Control Mode", "gsm_a.gm.sm.pco.sel_bearer_ctrl_mode", FT_UINT8, BASE_DEC, VALS(gsm_a_gm_sel_bearer_ctrl_mode_vals), 0x0, NULL, HFILL }},
10119
14
    { &hf_gsm_a_sm_pdp_type_number, { "PDP type number", "gsm_a.gm.sm.pdp_type_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10120
14
    { &hf_gsm_a_sm_pdp_address, { "PDP address", "gsm_a.gm.sm.pdp_address", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10121
14
    { &hf_gsm_a_sm_qos_maximum_sdu_size, { "Maximum SDU size", "gsm_a.gm.sm.qos.maximum_sdu_size", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10122
14
    { &hf_gsm_a_gm_ti_value, { "TI value", "gsm_a.gm.ti_value", FT_UINT8, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL }},
10123
14
    { &hf_gsm_a_sm_tft_packet_filter, { "Packet filter", "gsm_a.gm.sm.tft.packet_filter", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10124
14
    { &hf_gsm_a_sm_tft_packet_evaluation_precedence, { "Packet evaluation precedence", "gsm_a.gm.sm.tft.packet_evaluation_precedence", FT_UINT8, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL }},
10125
14
    { &hf_gsm_a_sm_tft_packet_filter_length, { "Packet filter length", "gsm_a.gm.sm.tft.packet_filter_length", FT_UINT8, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL }},
10126
14
    { &hf_gsm_a_sm_tft_authorization_token_value, { "Authorization token value", "gsm_a.gm.sm.tft.authorization_token_value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10127
14
    { &hf_gsm_a_sm_tft_media_component_number_value, { "Media Component number value", "gsm_a.gm.sm.tft.media_component_number_value", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10128
14
    { &hf_gsm_a_sm_tft_ip_flow_number, { "IP flow number", "gsm_a.gm.sm.tft.ip_flow_number", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
10129
14
    { &hf_gsm_a_sm_tft_packet_filter_identifier, { "Packet filter identifier", "gsm_a.gm.sm.tft.packet_filter_identifier", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
10130
14
    { &hf_gsm_a_sm_tft_parameter_content, { "Parameter content", "gsm_a.gm.sm.tft.parameter_content", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
10131
14
    { &hf_gsm_a_sm_tft_packet_filter_component_type_id, { "Packet filter component type identifier", "gsm_a.gm.sm.tft.packet_filter_component_type_id", FT_UINT8, BASE_DEC, VALS(packet_filter_component_type_vals), 0x0, NULL, HFILL }},
10132
14
  };
10133
10134
14
  static ei_register_info ei[] = {
10135
14
    { &ei_gsm_a_gm_extraneous_data, { "gsm_a.gm.extraneous_data", PI_PROTOCOL, PI_NOTE, "Extraneous Data, dissector bug or later version spec (report to wireshark.org)", EXPFILL }},
10136
14
    { &ei_gsm_a_gm_not_enough_data, { "gsm_a.gm.not_enough_data", PI_PROTOCOL, PI_WARN, "Not enough data", EXPFILL }},
10137
14
    { &ei_gsm_a_gm_undecoded, { "gsm_a.gm.undecoded", PI_UNDECODED, PI_WARN, "Not decoded", EXPFILL }},
10138
14
    { &ei_gsm_a_gm_missing_mandatory_element, { "gsm_a.gm.missing_mandatory_element", PI_PROTOCOL, PI_ERROR, "Missing Mandatory element, rest of dissection is suspect", EXPFILL }},
10139
14
  };
10140
10141
14
  expert_module_t* expert_gsm_a_gm;
10142
10143
  /* Setup protocol subtree array */
10144
14
#define NUM_INDIVIDUAL_ELEMS  7
10145
14
  int *ett[NUM_INDIVIDUAL_ELEMS +
10146
14
      NUM_GSM_DTAP_MSG_GMM + NUM_GSM_DTAP_MSG_SM +
10147
14
      NUM_GSM_GM_ELEM];
10148
10149
14
  ett[0]  = &ett_gmm_radio_cap;
10150
14
  ett[1]  = &ett_gmm_rai;
10151
14
  ett[2]  = &ett_sm_tft;
10152
14
  ett[3]  = &ett_gmm_gprs_timer;
10153
14
  ett[4]  = &ett_gmm_network_cap;
10154
14
  ett[5]  = &ett_gsm_a_gm_msrac_multislot_capability;
10155
14
  ett[6]  = &ett_sm_pco;
10156
10157
14
  last_offset = NUM_INDIVIDUAL_ELEMS;
10158
10159
350
  for (i=0; i<NUM_GSM_DTAP_MSG_GMM; i++, last_offset++)
10160
336
  {
10161
336
    ett[last_offset] = &ett_gsm_dtap_msg_gmm[i];
10162
336
  }
10163
10164
434
  for (i=0; i<NUM_GSM_DTAP_MSG_SM; i++, last_offset++)
10165
420
  {
10166
420
    ett[last_offset] = &ett_gsm_dtap_msg_sm[i];
10167
420
  }
10168
10169
1.09k
  for (i=0; i<NUM_GSM_GM_ELEM; i++, last_offset++)
10170
1.07k
  {
10171
1.07k
    ett[last_offset] = &ett_gsm_gm_elem[i];
10172
1.07k
  }
10173
10174
14
  proto_a_gm =
10175
14
    proto_register_protocol("GSM A-I/F GPRS Mobility and Session Management", "GSM Management", "gsm_a.gm");
10176
10177
14
  proto_register_field_array(proto_a_gm, hf, array_length(hf));
10178
10179
14
  proto_register_subtree_array(ett, array_length(ett));
10180
14
  expert_gsm_a_gm = expert_register_protocol(proto_a_gm);
10181
14
  expert_register_field_array(expert_gsm_a_gm, ei, array_length(ei));
10182
10183
  /* subdissector code */
10184
14
  gprs_sm_pco_subdissector_table = register_dissector_table("sm_pco.protocol",
10185
14
    "GPRS SM PCO PPP protocol", proto_a_gm, FT_UINT16, BASE_HEX);
10186
14
}
10187
10188
void
10189
proto_reg_handoff_gsm_a_gm(void)
10190
14
{
10191
14
  rrc_irat_ho_info_handle = find_dissector_add_dependency("rrc.irat.irat_ho_info", proto_a_gm);
10192
14
  lte_rrc_ue_eutra_cap_handle = find_dissector_add_dependency("lte-rrc.ue_eutra_cap", proto_a_gm);
10193
14
  nbifom_handle = find_dissector_add_dependency("nbifom", proto_a_gm);
10194
14
  eap_handle = find_dissector_add_dependency("eap", proto_a_gm);
10195
14
}
10196
10197
/*
10198
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
10199
 *
10200
 * Local variables:
10201
 * c-basic-offset: 8
10202
 * tab-width: 8
10203
 * indent-tabs-mode: t
10204
 * End:
10205
 *
10206
 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
10207
 * :indentSize=8:tabSize=8:noTabs=false:
10208
 */