libosmogsm  0.12.0
Osmocom GSM library
gsm_04_08.h
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include <stdint.h>
7 #include <stdbool.h>
8 
9 #include <osmocom/core/utils.h>
10 #include <osmocom/core/endian.h>
11 
12 struct gsm_lchan;
13 
14 /* Chapter 10.5.1.5 */
16 #if OSMO_IS_LITTLE_ENDIAN == 1
17  uint8_t pwr_lev:3,
18  a5_1:1,
19  es_ind:1,
20  rev_lev:2,
21  spare:1;
22 #else
23  uint8_t spare:1,
24  rev_lev:2,
25  es_ind:1,
26  a5_1:1,
27  pwr_lev:3;
28 #endif
29 } __attribute__ ((packed));
30 
31 /* Chapter 10.5.1.6 */
33 #if OSMO_IS_LITTLE_ENDIAN == 1
34  uint8_t pwr_lev:3,
35  a5_1:1,
36  es_ind:1,
37  rev_lev:2,
38  spare:1;
39  uint8_t fc:1,
40  vgcs:1,
41  vbs:1,
42  sm_cap:1,
43  ss_scr:2,
44  ps_cap:1,
45  spare2:1;
46  uint8_t a5_2:1,
47  a5_3:1,
48  cmsp:1,
49  solsa:1,
50  spare3:1,
51  lcsva_cap:1,
52  spare4:1,
53  cm3:1;
54 #else
55  uint8_t spare:1,
56  rev_lev:2,
57  es_ind:1,
58  a5_1:1,
59  pwr_lev:3;
60  uint8_t
61  spare2:1,
62  ps_cap:1,
63  ss_scr:2,
64  sm_cap:1,
65  vbs:1,
66  vgcs:1,
67  fc:1;
68  uint8_t
69  cm3:1,
70  spare4:1,
71  lcsva_cap:1,
72  spare3:1,
73  solsa:1,
74  cmsp:1,
75  a5_3:1,
76  a5_2:1;
77 #endif
78 } __attribute__ ((packed));
79 
80 /* Chapter 10.5.2.1b.3 */
81 #if OSMO_IS_LITTLE_ENDIAN == 1
82 struct gsm48_range_1024 {
83  uint8_t w1_hi:2,
84  f0:1,
85  form_id:5;
86  uint8_t w1_lo;
87  uint8_t w2_hi;
88  uint8_t w3_hi:7,
89  w2_lo:1;
90  uint8_t w4_hi:6,
91  w3_lo:2;
92  uint8_t w5_hi:6,
93  w4_lo:2;
94  uint8_t w6_hi:6,
95  w5_lo:2;
96  uint8_t w7_hi:6,
97  w6_lo:2;
98  uint8_t w8_hi:6,
99  w7_lo:2;
100  uint8_t w9:7,
101  w8_lo:1;
102  uint8_t w11_hi:1,
103  w10:7;
104  uint8_t w12_hi:2,
106  uint8_t w13_hi:3,
108  uint8_t w14_hi:4,
110  uint8_t w15_hi:5,
112  uint8_t w16:6,
114 } __attribute__ ((packed));
115 #else
117  uint8_t form_id:5,
118  f0:1,
119  w1_hi:2;
120  uint8_t w1_lo;
121  uint8_t w2_hi;
122  uint8_t w2_lo:1,
123  w3_hi:7;
124  uint8_t w3_lo:2,
125  w4_hi:6;
126  uint8_t w4_lo:2,
127  w5_hi:6;
128  uint8_t w5_lo:2,
129  w6_hi:6;
130  uint8_t w6_lo:2,
131  w7_hi:6;
132  uint8_t w7_lo:2,
133  w8_hi:6;
134  uint8_t w8_lo:1,
135  w9:7;
136  uint8_t w10:7,
137  w11_hi:1;
138  uint8_t w11_lo:6,
140  uint8_t w12_lo:5,
141  w13_hi:3;
142  uint8_t w13_lo:4,
144  uint8_t w14_lo:3,
146  uint8_t w15_lo:2,
147  w16:6;
148 } __attribute__ ((packed));
149 #endif
150 
151 /* Chapter 10.5.2.1b.4 */
152 #if OSMO_IS_LITTLE_ENDIAN == 1
153 struct gsm48_range_512 {
154  uint8_t orig_arfcn_hi:1,
155  form_id:7;
156  uint8_t orig_arfcn_mid;
157  uint8_t w1_hi:7,
158  orig_arfcn_lo:1;
159  uint8_t w2_hi:6,
160  w1_lo:2;
161  uint8_t w3_hi:6,
162  w2_lo:2;
163  uint8_t w4_hi:6,
164  w3_lo:2;
165  uint8_t w5:7,
166  w4_lo:1;
167  uint8_t w7_hi:1,
168  w6:7;
169  uint8_t w8_hi:2,
170  w7_lo:6;
171  uint8_t w9_hi:4,
172  w8_lo:4;
173  uint8_t w10:6,
174  w9_lo:2;
175  uint8_t w12_hi:2,
176  w11:6;
177  uint8_t w13_hi:4,
178  w12_lo:4;
179  uint8_t w14:6,
180  w13_lo:2;
181  uint8_t w16_hi:2,
182  w15:6;
183  uint8_t w17:5,
184  w16_lo:3;
185 } __attribute__ ((packed));
186 #else
188  uint8_t form_id:7,
189  orig_arfcn_hi:1;
190  uint8_t orig_arfcn_mid;
191  uint8_t orig_arfcn_lo:1,
192  w1_hi:7;
193  uint8_t w1_lo:2,
194  w2_hi:6;
195  uint8_t w2_lo:2,
196  w3_hi:6;
197  uint8_t w3_lo:2,
198  w4_hi:6;
199  uint8_t w4_lo:1,
200  w5:7;
201  uint8_t w6:7,
202  w7_hi:1;
203  uint8_t w7_lo:6,
204  w8_hi:2;
205  uint8_t w8_lo:4,
206  w9_hi:4;
207  uint8_t w9_lo:2,
208  w10:6;
209  uint8_t w11:6,
210  w12_hi:2;
211  uint8_t w12_lo:4,
212  w13_hi:4;
213  uint8_t w13_lo:2,
214  w14:6;
215  uint8_t w15:6,
216  w16_hi:2;
217  uint8_t w16_lo:3,
218  w17:5;
219 } __attribute__ ((packed));
220 #endif
221 
222 /* Chapter 10.5.2.1b.5 */
223 #if OSMO_IS_LITTLE_ENDIAN == 1
224 struct gsm48_range_256 {
225  uint8_t orig_arfcn_hi:1,
226  form_id:7;
227  uint8_t orig_arfcn_mid;
228  uint8_t w1_hi:7,
229  orig_arfcn_lo:1;
230  uint8_t w2:7,
231  w1_lo:1;
232  uint8_t w4_hi:1,
233  w3:7;
234  uint8_t w5_hi:3,
235  w4_lo:5;
236  uint8_t w6_hi:5,
237  w5_lo:3;
238  uint8_t w8_hi:1,
239  w7:6,
240  w6_lo:1;
241  uint8_t w9_hi:4,
242  w8_lo:4;
243  uint8_t w11_hi:2,
244  w10:5,
245  w9_lo:1;
246  uint8_t w12:5,
247  w11_lo:3;
248  uint8_t w14_hi:3,
249  w13:5;
250  uint8_t w16_hi:1,
251  w15:5,
252  w14_lo:2;
253  uint8_t w18_hi:1,
254  w17:4,
255  w16_lo:3;
256  uint8_t w20_hi:1,
257  w19:4,
258  w18_lo:3;
259  uint8_t spare:1,
260  w21:4,
261  w20_lo:3;
262 } __attribute__ ((packed));
263 #else
265  uint8_t form_id:7,
266  orig_arfcn_hi:1;
267  uint8_t orig_arfcn_mid;
268  uint8_t orig_arfcn_lo:1,
269  w1_hi:7;
270  uint8_t w1_lo:1,
271  w2:7;
272  uint8_t w3:7,
273  w4_hi:1;
274  uint8_t w4_lo:5,
275  w5_hi:3;
276  uint8_t w5_lo:3,
277  w6_hi:5;
278  uint8_t w6_lo:1,
279  w7:6,
280  w8_hi:1;
281  uint8_t w8_lo:4,
282  w9_hi:4;
283  uint8_t w9_lo:1,
284  w10:5,
285  w11_hi:2;
286  uint8_t w11_lo:3,
287  w12:5;
288  uint8_t w13:5,
289  w14_hi:3;
290  uint8_t w14_lo:2,
291  w15:5,
292  w16_hi:1;
293  uint8_t w16_lo:3,
294  w17:4,
295  w18_hi:1;
296  uint8_t w18_lo:3,
297  w19:4,
298  w20_hi:1;
299  uint8_t w20_lo:3,
300  w21:4,
301  spare:1;
302 } __attribute__ ((packed));
303 #endif
304 
305 /* Chapter 10.5.2.1b.6 */
306 #if OSMO_IS_LITTLE_ENDIAN == 1
307 struct gsm48_range_128 {
308  uint8_t orig_arfcn_hi:1,
309  form_id:7;
310  uint8_t orig_arfcn_mid;
311  uint8_t w1:7,
312  orig_arfcn_lo:1;
313  uint8_t w3_hi:2,
314  w2:6;
315  uint8_t w4_hi:4,
316  w3_lo:4;
317  uint8_t w6_hi:2,
318  w5:5,
319  w4_lo:1;
320  uint8_t w7:5,
321  w6_lo:3;
322  uint8_t w9:4,
323  w8:4;
324  uint8_t w11:4,
325  w10:4;
326  uint8_t w13:4,
327  w12:4;
328  uint8_t w15:4,
329  w14:4;
330  uint8_t w18_hi:2,
331  w17:3,
332  w16:3;
333  uint8_t w21_hi:1,
334  w20:3,
335  w19:3,
336  w18_lo:1;
337  uint8_t w23:3,
338  w22:3,
339  w21_lo:2;
340  uint8_t w26_hi:2,
341  w25:3,
342  w24:3;
343  uint8_t spare:1,
344  w28:3,
345  w27:3,
346  w26_lo:1;
347 } __attribute__ ((packed));
348 #else
350  uint8_t form_id:7,
351  orig_arfcn_hi:1;
352  uint8_t orig_arfcn_mid;
353  uint8_t orig_arfcn_lo:1,
354  w1:7;
355  uint8_t w2:6,
356  w3_hi:2;
357  uint8_t w3_lo:4,
358  w4_hi:4;
359  uint8_t w4_lo:1,
360  w5:5,
361  w6_hi:2;
362  uint8_t w6_lo:3,
363  w7:5;
364  uint8_t w8:4,
365  w9:4;
366  uint8_t w10:4,
367  w11:4;
368  uint8_t w12:4,
369  w13:4;
370  uint8_t w14:4,
371  w15:4;
372  uint8_t w16:3,
373  w17:3,
374  w18_hi:2;
375  uint8_t w18_lo:1,
376  w19:3,
377  w20:3,
378  w21_hi:1;
379  uint8_t w21_lo:2,
380  w22:3,
381  w23:3;
382  uint8_t w24:3,
383  w25:3,
384  w26_hi:2;
385  uint8_t w26_lo:1,
386  w27:3,
387  w28:3,
388  spare:1;
389 } __attribute__ ((packed));
390 #endif
391 
392 /* Chapter 10.5.2.1b.7 */
394 #if OSMO_IS_LITTLE_ENDIAN == 1
395  uint8_t orig_arfcn_hi:1,
396  form_id:7;
397  uint8_t orig_arfcn_mid;
398  uint8_t rrfcn1_7:7,
399  orig_arfcn_lo:1;
400  uint8_t rrfcn8_111[13];
401 #else
402  uint8_t form_id:7,
403  orig_arfcn_hi:1;
404  uint8_t orig_arfcn_mid;
405  uint8_t
407  rrfcn1_7:7;
408  uint8_t rrfcn8_111[13];
409 #endif
410 } __attribute__ ((packed));
411 
412 /* Chapter 10.5.2.5 */
414  uint8_t chan_nr;
415  union {
416  struct {
417 #if OSMO_IS_LITTLE_ENDIAN == 1
418  uint8_t maio_high:4,
419  h:1,
420  tsc:3;
421  uint8_t hsn:6,
423 #else
424  uint8_t tsc:3,
425  h:1,
427  uint8_t maio_low:2,
428  hsn:6;
429 #endif
430  } __attribute__ ((packed)) h1;
431  struct {
432 #if OSMO_IS_LITTLE_ENDIAN == 1
433  uint8_t arfcn_high:2,
434  spare:2,
435  h:1,
436  tsc:3;
437 #else
438  uint8_t tsc:3,
439  h:1,
440  spare:2,
441  arfcn_high:2;
442 #endif
443  uint8_t arfcn_low;
444  } __attribute__ ((packed)) h0;
445  } __attribute__ ((packed));
446 } __attribute__ ((packed));
447 
448 /* Chapter 10.5.2.20 */
450 #if OSMO_IS_LITTLE_ENDIAN == 1
451  uint8_t rxlev_full:6,
452  dtx_used:1,
453  ba_used:1;
454  uint8_t rxlev_sub:6,
455  meas_valid:1,
456  spare:1;
457  uint8_t no_nc_n_hi:1,
458  rxqual_sub:3,
459  rxqual_full:3,
460  spare2:1;
461  uint8_t rxlev_nc1:6,
462  no_nc_n_lo:2;
463  uint8_t bsic_nc1_hi:3,
464  bcch_f_nc1:5;
465  uint8_t rxlev_nc2_hi:5,
466  bsic_nc1_lo:3;
467  uint8_t bsic_nc2_hi:2,
468  bcch_f_nc2:5,
469  rxlev_nc2_lo:1;
470  uint8_t rxlev_nc3_hi:4,
471  bsic_nc2_lo:4;
472  uint8_t bsic_nc3_hi:1,
473  bcch_f_nc3:5,
474  rxlev_nc3_lo:2;
475  uint8_t rxlev_nc4_hi:3,
476  bsic_nc3_lo:5;
477  uint8_t bcch_f_nc4:5,
478  rxlev_nc4_lo:3;
479  uint8_t rxlev_nc5_hi:2,
480  bsic_nc4:6;
481  uint8_t bcch_f_nc5_hi:4,
482  rxlev_nc5_lo:4;
483  uint8_t rxlev_nc6_hi:1,
484  bsic_nc5:6,
485  bcch_f_nc5_lo:1;
486  uint8_t bcch_f_nc6_hi:3,
487  rxlev_nc6_lo:5;
488  uint8_t bsic_nc6:6,
489  bcch_f_nc6_lo:2;
490 #else
491  uint8_t ba_used:1,
492  dtx_used:1,
493  rxlev_full:6;
494  uint8_t spare:1,
495  meas_valid:1,
496  rxlev_sub:6;
497  uint8_t spare2:1,
498  rxqual_full:3,
499  rxqual_sub:3,
500  no_nc_n_hi:1;
501  uint8_t no_nc_n_lo:2,
502  rxlev_nc1:6;
503  uint8_t bcch_f_nc1:5,
504  bsic_nc1_hi:3;
505  uint8_t bsic_nc1_lo:3,
506  rxlev_nc2_hi:5;
507  uint8_t rxlev_nc2_lo:1,
508  bcch_f_nc2:5,
509  bsic_nc2_hi:2;
510  uint8_t bsic_nc2_lo:4,
511  rxlev_nc3_hi:4;
512  uint8_t rxlev_nc3_lo:2,
513  bcch_f_nc3:5,
514  bsic_nc3_hi:1;
515  uint8_t bsic_nc3_lo:5,
516  rxlev_nc4_hi:3;
517  uint8_t rxlev_nc4_lo:3,
518  bcch_f_nc4:5;
519  uint8_t bsic_nc4:6,
520  rxlev_nc5_hi:2;
521  uint8_t rxlev_nc5_lo:4,
522  bcch_f_nc5_hi:4;
523  uint8_t bcch_f_nc5_lo:1,
524  bsic_nc5:6,
525  rxlev_nc6_hi:1;
526  uint8_t rxlev_nc6_lo:5,
527  bcch_f_nc6_hi:3;
528  uint8_t
530  bsic_nc6:6;
531 #endif
532 } __attribute__ ((packed));
533 
534 /* Chapter 10.5.2.21aa */
536 #if OSMO_IS_LITTLE_ENDIAN == 1
537  uint8_t smod : 2,
538  spare: 1,
539  icmi : 1,
540  nscb : 1,
541  ver : 3;
542  uint8_t m4_75 : 1,
543  m5_15 : 1,
544  m5_90 : 1,
545  m6_70 : 1,
546  m7_40 : 1,
547  m7_95 : 1,
548  m10_2 : 1,
549  m12_2 : 1;
550 #else
551  uint8_t ver : 3,
552  nscb : 1,
553  icmi : 1,
554  spare: 1,
555  smod : 2;
556  uint8_t m12_2 : 1,
557  m10_2 : 1,
558  m7_95 : 1,
559  m7_40 : 1,
560  m6_70 : 1,
561  m5_90 : 1,
562  m5_15 : 1,
563  m4_75 : 1;
564 #endif
565 } __attribute__((packed));
566 
567 /* Chapter 10.5.2.28(a) */
569 #if OSMO_IS_LITTLE_ENDIAN == 1
570  uint8_t power_level:5,
571  spare:2,
572  atc:1;
573 #else
574  uint8_t atc:1,
575  spare:2,
576  power_level:5;
577 #endif
578 } __attribute__((packed));
579 
580 /* Chapter 10.5.2.29 */
582 #if OSMO_IS_LITTLE_ENDIAN == 1
583  uint8_t re :1,
584  cell_bar :1,
585  tx_integer :4,
586  max_trans :2;
587 #else
588  uint8_t max_trans :2,
589  tx_integer :4,
590  cell_bar :1,
591  re :1;
592 #endif
593  uint8_t t2; /* ACC 8-15 barred flags */
594  uint8_t t3; /* ACC 0-7 barred flags */
595 } __attribute__ ((packed));
596 
597 /*
598  * Mark an Access Control Class as barred.
599  * \param[in] rach_control A Rach Control Information Element.
600  * \param[in] acc Access Control Class number (0 - 15) which shall be barred.
601  */
602 static inline void gsm48_barr_acc(struct gsm48_rach_control *rach_control, unsigned int acc)
603 {
604  OSMO_ASSERT(acc >= 0 && acc <= 15);
605  if (acc >= 8)
606  rach_control->t2 |= (1 << (acc - 8));
607  else
608  rach_control->t3 |= (1 << (acc));
609 }
610 
611 /*
612  * Mark an Access Control Class as allowed.
613  * \param[in] rach_control A Rach Control Information Element.
614  * \param[in] acc Access Control Class number (0 - 15) which shall be allowed.
615  */
616 static inline void gsm48_allow_acc(struct gsm48_rach_control *rach_control, unsigned int acc)
617 {
618  OSMO_ASSERT(acc >= 0 && acc <= 15);
619  if (acc >= 8)
620  rach_control->t2 &= ~(1 << (acc - 8));
621  else
622  rach_control->t3 &= ~(1 << (acc));
623 }
624 
625 /*
626  * Indicate whether an Access Control Class is barred.
627  * \param[in] rach_control A Rach Control Information Element.
628  * \param[in] acc Access Control Class number (0 - 15).
629  * \returns true if the Access Control class is barred, false otherwise
630  */
631 static inline bool gsm48_acc_is_barred(struct gsm48_rach_control *rach_control, unsigned int acc)
632 {
633  OSMO_ASSERT(acc >= 0 && acc <= 15);
634  if (acc >= 8)
635  return (rach_control->t2 & (1 << (acc - 8))) != 0;
636  return (rach_control->t3 & (1 << (acc))) != 0;
637 }
639 /* Chapter 10.5.2.30 */
641  uint8_t ra;
642 #if OSMO_IS_LITTLE_ENDIAN == 1
643  uint8_t t3_high:3,
644  t1:5;
645  uint8_t t2:5,
646  t3_low:3;
647 #else
648  uint8_t t1:5,
649  t3_high:3;
650  uint8_t t3_low:3,
651  t2:5;
652 #endif
653 } __attribute__ ((packed));
654 
655 /* Chapter 10.5.2.38 */
657 #if OSMO_IS_LITTLE_ENDIAN == 1
658  uint8_t t3_high:3,
659  t1:5;
660  uint8_t t2:5,
661  t3_low:3;
662 #else
663  uint8_t t1:5,
664  t3_high:3;
665  uint8_t t3_low:3,
666  t2:5;
667 #endif
668 } __attribute__ ((packed));
669 
670 /* Chapter 10.5.2.39 */
672 #if OSMO_IS_LITTLE_ENDIAN == 1
673  uint8_t si:2,
674  rot:1,
675  nci:1,
676  sync_ie:4;
677 #else
678  uint8_t sync_ie:4,
679  nci:1,
680  rot:1,
681  si:2;
682 #endif
683 } __attribute__((packed));
684 
685 /*
686  * Chapter 9.1.5/9.1.6
687  *
688  * For 9.1.6 the chan_desc has the meaning of 10.5.2.5a
689  */
692  uint8_t mode;
693 } __attribute__ ((packed));
694 
704 };
705 
706 extern const struct value_string gsm48_chan_mode_names[];
707 static inline const char *gsm48_chan_mode_name(enum gsm48_chan_mode val)
708 { return get_value_string(gsm48_chan_mode_names, val); }
710 /* Chapter 9.1.2 */
712  /* Semantic is from 10.5.2.5a */
714  uint8_t power_command;
715  uint8_t data[0];
716 } __attribute__((packed));
718 /* Chapter 9.1.13 */
720  /* Semantic is from 10.5.2.5a */
722  uint8_t mob_alloc_len;
723  uint8_t mob_alloc[0];
724 } __attribute__((packed));
726 /* Chapter 9.1.13b GPRS suspension request */
728  uint32_t tlli;
729  uint8_t ra_id[6];
730  uint8_t cause;
731  uint8_t options[0];
732 } __attribute__ ((packed));
733 
734 /* Chapter 10.5.2.2 */
736 #if OSMO_IS_LITTLE_ENDIAN == 1
737  uint8_t bcc:3,
738  ncc:3,
739  arfcn_hi:2;
740 #else
741  uint8_t arfcn_hi:2,
742  ncc:3,
743  bcc:3;
744 #endif
745  uint8_t arfcn_lo;
746 } __attribute__((packed));
747 
748 /* Chapter 9.1.15 */
749 struct gsm48_ho_cmd {
752  uint8_t ho_ref;
753  uint8_t power_command;
754  uint8_t data[0];
755 } __attribute__((packed));
756 
757 /* Chapter 9.1.18 */
759  uint8_t l2_plen;
760  uint8_t proto_discr;
761  uint8_t msg_type;
762  uint8_t page_mode;
765  uint8_t timing_advance;
766  uint8_t mob_alloc_len;
767  uint8_t mob_alloc[0];
768 } __attribute__ ((packed));
769 
770 /* Chapter 9.1.25 */
772 #if OSMO_IS_LITTLE_ENDIAN == 1
773  uint8_t spare:4,
774  key_seq:4;
775 #else
776  uint8_t key_seq:4,
777  spare:4;
778 #endif
779  uint32_t classmark2;
780  uint8_t mi_len;
781  uint8_t mi[0];
782 } __attribute__ ((packed));
783 
784 /* Chapter 10.5.1.3 */
786  uint8_t digits[3]; /* BCD! */
787  uint16_t lac;
788 } __attribute__ ((packed));
789 
790 /* Section 9.2.2 */
792 #if OSMO_IS_LITTLE_ENDIAN == 1
793  uint8_t key_seq:4,
794  spare:4;
795 #else
796  uint8_t spare:4,
797  key_seq:4;
798 #endif
799  uint8_t rand[16];
800 } __attribute__ ((packed));
801 
802 /* Section 9.2.3 */
804  uint8_t sres[4];
805 } __attribute__ ((packed));
806 
807 /* Section 9.2.15 */
809 #if OSMO_IS_LITTLE_ENDIAN == 1
810  uint8_t type:4,
811  key_seq:4;
812 #else
813  uint8_t key_seq:4,
814  type:4;
815 #endif
818  uint8_t mi_len;
819  uint8_t mi[0];
820 } __attribute__ ((packed));
821 
822 /* Section 10.1 */
823 struct gsm48_hdr {
824  uint8_t proto_discr;
825  uint8_t msg_type;
826  uint8_t data[0];
827 } __attribute__ ((packed));
828 
829 /* Section 9.1.3x System information Type header */
831  uint8_t l2_plen;
832 #if OSMO_IS_LITTLE_ENDIAN == 1
833  uint8_t rr_protocol_discriminator :4,
834  skip_indicator:4;
835 #else
836  uint8_t skip_indicator:4,
838 #endif
840 } __attribute__ ((packed));
841 
842 /* Section 10.5.2.4 Cell Selection Parameters */
844 #if OSMO_IS_LITTLE_ENDIAN == 1
845  uint8_t ms_txpwr_max_ccch:5, /* GSM 05.08 MS-TXPWR-MAX-CCCH */
846  cell_resel_hyst:3; /* GSM 05.08 CELL-RESELECT-HYSTERESIS */
847  uint8_t rxlev_acc_min:6, /* GSM 05.08 RXLEV-ACCESS-MIN */
848  neci:1,
849  acs:1;
850 #else
851  uint8_t cell_resel_hyst:3, /* GSM 05.08 CELL-RESELECT-HYSTERESIS */
852  ms_txpwr_max_ccch:5; /* GSM 05.08 MS-TXPWR-MAX-CCCH */
853  uint8_t acs:1,
854  neci:1,
855  rxlev_acc_min:6; /* GSM 05.08 RXLEV-ACCESS-MIN */
856 #endif
857 } __attribute__ ((packed));
858 
859 /* 3GPP TS 44.018 Section 10.5.2.11 Control Channel Description */
861 #if OSMO_IS_LITTLE_ENDIAN == 1
862  uint8_t ccch_conf :3,
863  bs_ag_blks_res :3,
864  att :1,
865  mscr :1;
866  uint8_t bs_pa_mfrms : 3,
867  spare_1 :2,
868  cbq3 :2,
869  spare_2 :1;
870 #else
871  uint8_t mscr :1,
872  att :1,
873  bs_ag_blks_res :3,
874  ccch_conf :3;
875  uint8_t spare_2 :1,
876  cbq3 :2,
877  spare_1 :2,
878  bs_pa_mfrms : 3;
879 #endif
880  uint8_t t3212;
881 } __attribute__ ((packed));
882 
887 };
888 
889 /* Cell Options for SI6, SACCH (10.5.2.3a.2) or SI3, BCCH (Table 10.5.2.3.1),
890  3GPP TS 44.018 */
892 #if OSMO_IS_LITTLE_ENDIAN == 1
893  uint8_t radio_link_timeout:4,
894  dtx:2,
895  pwrc:1,
896  /* either DN-IND or top bit of DTX IND */
897  d:1;
898 #else
899  uint8_t
900  /* either DN-IND or top bit of DTX IND */
901  d:1,
902  pwrc:1,
903  dtx:2,
905 #endif
906 } __attribute__ ((packed));
907 
908 /* Section 9.2.9 CM service request */
910 #if OSMO_IS_LITTLE_ENDIAN == 1
911  uint8_t cm_service_type : 4,
912  cipher_key_seq : 4;
913 #else
914  uint8_t cipher_key_seq : 4,
915  cm_service_type : 4;
916 #endif
917  /* length + 3 bytes */
918  uint32_t classmark;
919  uint8_t mi_len;
920  uint8_t mi[0];
921  /* optional priority level */
922 } __attribute__ ((packed));
923 
924 /* Section 9.1.31 System information Type 1 */
928  struct gsm48_rach_control rach_control;
929  uint8_t rest_octets[0]; /* NCH position on the CCCH */
930 } __attribute__ ((packed));
931 
932 /* Section 9.1.32 System information Type 2 */
935  uint8_t bcch_frequency_list[16];
936  uint8_t ncc_permitted;
937  struct gsm48_rach_control rach_control;
938 } __attribute__ ((packed));
939 
940 /* Section 9.1.33 System information Type 2bis */
943  uint8_t bcch_frequency_list[16];
944  struct gsm48_rach_control rach_control;
945  uint8_t rest_octets[0];
946 } __attribute__ ((packed));
947 
948 /* Section 9.1.34 System information Type 2ter */
952  uint8_t rest_octets[0];
953 } __attribute__ ((packed));
954 
955 /* Section 9.1.34a System information Type 2quater */
958  uint8_t rest_octets[0];
959 } __attribute__ ((packed));
960 
961 /* Section 9.1.35 System information Type 3 */
964  uint16_t cell_identity;
969  struct gsm48_rach_control rach_control;
970  uint8_t rest_octets[0];
971 } __attribute__ ((packed));
972 
973 /* Section 9.1.36 System information Type 4 */
978  struct gsm48_rach_control rach_control;
979  /* optional CBCH conditional CBCH... followed by
980  mandantory SI 4 Reset Octets
981  */
982  uint8_t data[0];
983 } __attribute__ ((packed));
984 
985 /* Section 9.1.37 System information Type 5 */
987 #if OSMO_IS_LITTLE_ENDIAN == 1
988  uint8_t rr_protocol_discriminator :4,
989  skip_indicator:4;
990 #else
991  uint8_t skip_indicator:4,
993 #endif
995  uint8_t bcch_frequency_list[16];
996 } __attribute__ ((packed));
997 
998 /* Section 9.1.38 System information Type 5bis */
1000 #if OSMO_IS_LITTLE_ENDIAN == 1
1001  uint8_t rr_protocol_discriminator :4,
1002  skip_indicator:4;
1003 #else
1004  uint8_t skip_indicator:4,
1006 #endif
1008  uint8_t bcch_frequency_list[16];
1009 } __attribute__ ((packed));
1010 
1011 /* Section 9.1.39 System information Type 5ter */
1013 #if OSMO_IS_LITTLE_ENDIAN == 1
1014  uint8_t rr_protocol_discriminator :4,
1015  skip_indicator:4;
1016 #else
1017  uint8_t skip_indicator:4,
1019 #endif
1021  uint8_t bcch_frequency_list[16];
1022 } __attribute__ ((packed));
1023 
1024 /* Section 9.1.40 System information Type 6 */
1026 #if OSMO_IS_LITTLE_ENDIAN == 1
1027  uint8_t rr_protocol_discriminator :4,
1028  skip_indicator:4;
1029 #else
1030  uint8_t skip_indicator:4,
1032 #endif
1034  uint16_t cell_identity;
1037  uint8_t ncc_permitted;
1038  uint8_t rest_octets[0];
1039 } __attribute__ ((packed));
1040 
1041 /* Section 9.1.43a System Information type 13 */
1044  uint8_t rest_octets[0];
1045 } __attribute__ ((packed));
1046 
1047 /* Section 9.2.12 IMSI Detach Indication */
1050  uint8_t mi_len;
1051  uint8_t mi[0];
1052 } __attribute__ ((packed));
1053 
1054 /* Section 9.1.1 */
1056  /* Semantic is from 10.5.2.5 */
1058  uint8_t data[0];
1059 } __attribute__((packed));
1060 
1061 /* Section 9.1.3 */
1063  uint8_t rr_cause;
1064 } __attribute__((packed));
1065 
1066 /* Section 9.1.4 */
1068  uint8_t rr_cause;
1069 } __attribute__((packed));
1070 
1071 /* Section 9.1.3 */
1073  uint8_t rr_cause;
1074  uint8_t data[0];
1075 } __attribute__((packed));
1076 
1077 /* Section 9.1.4 */
1079  uint8_t rr_cause;
1080 } __attribute__((packed));
1081 
1082 /* Section 9.1.7 */
1084  uint8_t rr_cause;
1085  uint8_t data[0];
1086 } __attribute__((packed));
1087 
1088 /* Section 9.1.9 */
1090 #if OSMO_IS_LITTLE_ENDIAN == 1
1091  uint8_t sc:1,
1092  alg_id:3,
1093  cr:1,
1094  spare:3;
1095 #else
1096  uint8_t spare:3,
1097  cr:1,
1098  alg_id:3,
1099  sc:1;
1100 #endif
1101 } __attribute__((packed));
1102 
1103 /* Section 9.1.11 */
1105  uint8_t cm2_len;
1107  uint8_t data[0];
1108 } __attribute__((packed));
1109 
1110 /* Section 9.1.19 */
1112  uint8_t l2_plen;
1113  uint8_t proto_discr;
1114  uint8_t msg_type;
1115  uint8_t page_mode;
1122  uint8_t mob_alloc_len;
1123  uint8_t mob_alloc[0];
1124 } __attribute__ ((packed));
1125 
1126 /* Section 9.1.20 */
1128  uint8_t l2_plen;
1129  uint8_t proto_discr;
1130  uint8_t msg_type;
1131  uint8_t page_mode;
1133  uint8_t wait_ind1;
1135  uint8_t wait_ind2;
1137  uint8_t wait_ind3;
1139  uint8_t wait_ind4;
1140  uint8_t rest[0];
1141 } __attribute__ ((packed));
1142 
1143 /* Section 9.1.22 */
1145  uint8_t l2_plen;
1146  uint8_t proto_discr;
1147  uint8_t msg_type;
1148 #if OSMO_IS_LITTLE_ENDIAN == 1
1149  uint8_t pag_mode:2,
1150  spare:2,
1151  cneed1:2,
1152  cneed2:2;
1153 #else
1154  uint8_t cneed2:2,
1155  cneed1:2,
1156  spare:2,
1157  pag_mode:2;
1158 #endif
1159  uint8_t data[0];
1160 } __attribute__((packed));
1161 
1162 /* Section 9.1.23 */
1164  uint8_t l2_plen;
1165  uint8_t proto_discr;
1166  uint8_t msg_type;
1167 #if OSMO_IS_LITTLE_ENDIAN == 1
1168  uint8_t pag_mode:2,
1169  spare:2,
1170  cneed1:2,
1171  cneed2:2;
1172 #else
1173  uint8_t
1175  cneed1:2,
1176  spare:2,
1177  pag_mode:2;
1178 #endif
1179  uint32_t tmsi1;
1180  uint32_t tmsi2;
1181  uint8_t data[0];
1182 } __attribute__((packed));
1183 
1184 /* Section 9.1.24 */
1186  uint8_t l2_plen;
1187  uint8_t proto_discr;
1188  uint8_t msg_type;
1189 #if OSMO_IS_LITTLE_ENDIAN == 1
1190  uint8_t pag_mode:2,
1191  spare:2,
1192  cneed1:2,
1193  cneed2:2;
1194 #else
1195  uint8_t cneed2:2,
1196  cneed1:2,
1197  spare:2,
1198  pag_mode:2;
1199 #endif
1200  uint32_t tmsi1;
1201  uint32_t tmsi2;
1202  uint32_t tmsi3;
1203  uint32_t tmsi4;
1204 #if OSMO_IS_LITTLE_ENDIAN == 1
1205  uint8_t cneed3:2,
1206  cneed4:2,
1207  spare2:4;
1208 #else
1209  uint8_t spare2:4,
1210  cneed4:2,
1211  cneed3:2;
1212 #endif
1213  uint8_t rest[0];
1214 } __attribute__((packed));
1215 
1216 /* Section 9.1.25 */
1218 #if OSMO_IS_LITTLE_ENDIAN == 1
1219  uint8_t key_seq:3,
1220  spare:5;
1221 #else
1222  uint8_t spare:5,
1223  key_seq:3;
1224 #endif
1225  uint8_t cm2_len;
1227  uint8_t data[0];
1228 } __attribute__((packed));
1229 
1230 /* Section 9.1.29 */
1232  uint8_t rr_cause;
1233 } __attribute__((packed));
1234 
1235 /* Section 10.2 + GSM 04.07 12.2.3.1.1 + 3GPP TS 24.007 11.2.3.1.1 */
1236 #define GSM48_PDISC_GROUP_CC 0x00
1237 #define GSM48_PDISC_BCAST_CC 0x01
1238 #define GSM48_PDISC_PDSS1 0x02 /* 04.07 only */
1239 #define GSM48_PDISC_CC 0x03
1240 #define GSM48_PDISC_PDSS2 0x04 /* 04.07 only */
1241 #define GSM48_PDISC_GTTP 0x04 /* 24.007 only */
1242 #define GSM48_PDISC_MM 0x05
1243 #define GSM48_PDISC_RR 0x06
1244 #define GSM48_PDISC_MM_GPRS 0x08
1245 #define GSM48_PDISC_SMS 0x09
1246 #define GSM48_PDISC_SM_GPRS 0x0a
1247 #define GSM48_PDISC_NC_SS 0x0b
1248 #define GSM48_PDISC_LOC 0x0c
1249 #define GSM48_PDISC_EXTEND 0x0e
1250 #define GSM48_PDISC_TEST 0x0f /* as per 11.10, 04.14 */
1251 #define GSM48_PDISC_MASK 0x0f
1252 
1253 extern const struct value_string gsm48_pdisc_names[];
1254 static inline const char *gsm48_pdisc_name(uint8_t val)
1255 { return get_value_string(gsm48_pdisc_names, val); }
1256 
1257 bool gsm48_hdr_gmm_cipherable(const struct gsm48_hdr *hdr);
1258 
1259 static inline uint8_t gsm48_hdr_pdisc(const struct gsm48_hdr *hdr)
1260 {
1261  /*
1262  * 3GPP TS 24.007 version 12.0.0 Release 12,
1263  * 11.2.3.1.1 Protocol discriminator
1264  */
1265  uint8_t pdisc = hdr->proto_discr & GSM48_PDISC_MASK;
1266  if (pdisc == GSM48_PDISC_EXTEND)
1267  return hdr->proto_discr;
1268  return pdisc;
1269 }
1270 
1271 static inline uint8_t gsm48_hdr_trans_id(const struct gsm48_hdr *hdr)
1272 {
1273  /*
1274  * 3GPP TS 24.007 version 12.0.0 Release 12,
1275  * 11.2.3.1.3 Transaction identifier
1276  */
1277  return (hdr->proto_discr & 0xf0) >> 4;
1278 }
1279 
1280 #define GSM48_TA_INVALID 220
1281 
1287 static inline bool gsm48_ta_is_valid(uint8_t ta)
1288 {
1289  return (ta < 64);
1290 }
1291 
1292 static inline uint8_t gsm48_hdr_trans_id_flip_ti(const struct gsm48_hdr *hdr)
1293 {
1294  return gsm48_hdr_trans_id(hdr) ^ 0x08;
1295 }
1296 
1297 static inline uint8_t gsm48_hdr_trans_id_no_ti(const struct gsm48_hdr *hdr)
1298 {
1299  return gsm48_hdr_trans_id(hdr) & 0x07;
1300 }
1301 
1302 static inline uint8_t gsm48_hdr_msg_type_r98(const struct gsm48_hdr *hdr)
1303 {
1304  /*
1305  * 3GPP TS 24.007 version 12.0.0 Release 12,
1306  * 11.2.3.2.1 Message type octet (when accessing Release 98 and older
1307  * networks only)
1308  */
1309  switch (gsm48_hdr_pdisc(hdr)) {
1310  case GSM48_PDISC_MM:
1311  case GSM48_PDISC_CC:
1312  case GSM48_PDISC_NC_SS:
1313  case GSM48_PDISC_GROUP_CC:
1314  case GSM48_PDISC_BCAST_CC:
1315  case GSM48_PDISC_LOC:
1316  return hdr->msg_type & 0x3f;
1317  default:
1318  return hdr->msg_type;
1319  }
1320 }
1321 
1322 static inline uint8_t gsm48_hdr_msg_type_r99(const struct gsm48_hdr *hdr)
1323 {
1324  /*
1325  * 3GPP TS 24.007 version 12.0.0 Release 12,
1326  * 11.2.3.2.2 Message type octet (when accessing Release 99 and newer
1327  * networks)
1328  */
1329  switch (gsm48_hdr_pdisc(hdr)) {
1330  case GSM48_PDISC_MM:
1331  case GSM48_PDISC_CC:
1332  case GSM48_PDISC_NC_SS:
1333  return hdr->msg_type & 0x3f;
1334  case GSM48_PDISC_GROUP_CC:
1335  case GSM48_PDISC_BCAST_CC:
1336  case GSM48_PDISC_LOC:
1337  return hdr->msg_type & 0x3f;
1338  default:
1339  return hdr->msg_type;
1340  }
1341 }
1342 
1343 void gsm48_set_dtx(struct gsm48_cell_options *op, enum gsm48_dtx_mode full,
1344  enum gsm48_dtx_mode half, bool is_bcch);
1345 
1346 #define gsm48_hdr_msg_type gsm48_hdr_msg_type_r99
1347 
1348 /* Section 10.4 */
1349 #define GSM48_MT_RR_INIT_REQ 0x3c
1350 #define GSM48_MT_RR_ADD_ASS 0x3b
1351 #define GSM48_MT_RR_IMM_ASS 0x3f
1352 #define GSM48_MT_RR_IMM_ASS_EXT 0x39
1353 #define GSM48_MT_RR_IMM_ASS_REJ 0x3a
1354 #define GSM48_MT_RR_DTM_ASS_FAIL 0x48
1355 #define GSM48_MT_RR_DTM_REJECT 0x49
1356 #define GSM48_MT_RR_DTM_REQUEST 0x4A
1357 #define GSM48_MT_RR_PACKET_ASS 0x4B
1358 
1359 #define GSM48_MT_RR_CIPH_M_CMD 0x35
1360 #define GSM48_MT_RR_CIPH_M_COMPL 0x32
1361 
1362 #define GSM48_MT_RR_CFG_CHG_CMD 0x30
1363 #define GSM48_MT_RR_CFG_CHG_ACK 0x31
1364 #define GSM48_MT_RR_CFG_CHG_REJ 0x33
1365 
1366 #define GSM48_MT_RR_ASS_CMD 0x2e
1367 #define GSM48_MT_RR_ASS_COMPL 0x29
1368 #define GSM48_MT_RR_ASS_FAIL 0x2f
1369 #define GSM48_MT_RR_HANDO_CMD 0x2b
1370 #define GSM48_MT_RR_HANDO_COMPL 0x2c
1371 #define GSM48_MT_RR_HANDO_FAIL 0x28
1372 #define GSM48_MT_RR_HANDO_INFO 0x2d
1373 #define GSM48_MT_RR_HANDO_INFO 0x2d
1374 #define GSM48_MT_RR_DTM_ASS_CMD 0x4c
1375 
1376 #define GSM48_MT_RR_CELL_CHG_ORDER 0x08
1377 #define GSM48_MT_RR_PDCH_ASS_CMD 0x23
1378 
1379 #define GSM48_MT_RR_CHAN_REL 0x0d
1380 #define GSM48_MT_RR_PART_REL 0x0a
1381 #define GSM48_MT_RR_PART_REL_COMP 0x0f
1382 
1383 #define GSM48_MT_RR_PAG_REQ_1 0x21
1384 #define GSM48_MT_RR_PAG_REQ_2 0x22
1385 #define GSM48_MT_RR_PAG_REQ_3 0x24
1386 #define GSM48_MT_RR_PAG_RESP 0x27
1387 #define GSM48_MT_RR_NOTIF_NCH 0x20
1388 #define GSM48_MT_RR_NOTIF_FACCH 0x25 /* (Reserved) */
1389 #define GSM48_MT_RR_NOTIF_RESP 0x26
1390 #define GSM48_MT_RR_PACKET_NOTIF 0x4e
1391 #define GSM48_MT_RR_UTRAN_CLSM_CHG 0x60
1392 #define GSM48_MT_RR_CDMA2K_CLSM_CHG 0x62
1393 #define GSM48_MT_RR_IS_TO_UTRAN_HANDO 0x63
1394 #define GSM48_MT_RR_IS_TO_CDMA2K_HANDO 0x64
1395 
1396 #define GSM48_MT_RR_SYSINFO_8 0x18
1397 #define GSM48_MT_RR_SYSINFO_1 0x19
1398 #define GSM48_MT_RR_SYSINFO_2 0x1a
1399 #define GSM48_MT_RR_SYSINFO_3 0x1b
1400 #define GSM48_MT_RR_SYSINFO_4 0x1c
1401 #define GSM48_MT_RR_SYSINFO_5 0x1d
1402 #define GSM48_MT_RR_SYSINFO_6 0x1e
1403 #define GSM48_MT_RR_SYSINFO_7 0x1f
1404 
1405 #define GSM48_MT_RR_SYSINFO_2bis 0x02
1406 #define GSM48_MT_RR_SYSINFO_2ter 0x03
1407 #define GSM48_MT_RR_SYSINFO_2quater 0x07
1408 #define GSM48_MT_RR_SYSINFO_5bis 0x05
1409 #define GSM48_MT_RR_SYSINFO_5ter 0x06
1410 #define GSM48_MT_RR_SYSINFO_9 0x04
1411 #define GSM48_MT_RR_SYSINFO_13 0x00
1412 
1413 #define GSM48_MT_RR_SYSINFO_16 0x3d
1414 #define GSM48_MT_RR_SYSINFO_17 0x3e
1415 
1416 #define GSM48_MT_RR_SYSINFO_18 0x40
1417 #define GSM48_MT_RR_SYSINFO_19 0x41
1418 #define GSM48_MT_RR_SYSINFO_20 0x42
1419 
1420 #define GSM48_MT_RR_CHAN_MODE_MODIF 0x10
1421 #define GSM48_MT_RR_STATUS 0x12
1422 #define GSM48_MT_RR_CHAN_MODE_MODIF_ACK 0x17
1423 #define GSM48_MT_RR_FREQ_REDEF 0x14
1424 #define GSM48_MT_RR_MEAS_REP 0x15
1425 #define GSM48_MT_RR_CLSM_CHG 0x16
1426 #define GSM48_MT_RR_CLSM_ENQ 0x13
1427 #define GSM48_MT_RR_EXT_MEAS_REP 0x36
1428 #define GSM48_MT_RR_EXT_MEAS_REP_ORD 0x37
1429 #define GSM48_MT_RR_GPRS_SUSP_REQ 0x34
1430 #define GSM48_MT_RR_DTM_INFO 0x4d
1431 
1432 #define GSM48_MT_RR_VGCS_UPL_GRANT 0x09
1433 #define GSM48_MT_RR_UPLINK_RELEASE 0x0e
1434 #define GSM48_MT_RR_UPLINK_FREE 0x0c
1435 #define GSM48_MT_RR_UPLINK_BUSY 0x2a
1436 #define GSM48_MT_RR_TALKER_IND 0x11
1437 
1438 #define GSM48_MT_RR_APP_INFO 0x38
1439 
1440 /* Table 10.2/3GPP TS 04.08 */
1441 #define GSM48_MT_MM_IMSI_DETACH_IND 0x01
1442 #define GSM48_MT_MM_LOC_UPD_ACCEPT 0x02
1443 #define GSM48_MT_MM_LOC_UPD_REJECT 0x04
1444 #define GSM48_MT_MM_LOC_UPD_REQUEST 0x08
1445 
1446 #define GSM48_MT_MM_AUTH_REJ 0x11
1447 #define GSM48_MT_MM_AUTH_REQ 0x12
1448 #define GSM48_MT_MM_AUTH_RESP 0x14
1449 #define GSM48_MT_MM_AUTH_FAIL 0x1c
1450 #define GSM48_MT_MM_ID_REQ 0x18
1451 #define GSM48_MT_MM_ID_RESP 0x19
1452 #define GSM48_MT_MM_TMSI_REALL_CMD 0x1a
1453 #define GSM48_MT_MM_TMSI_REALL_COMPL 0x1b
1454 
1455 #define GSM48_MT_MM_CM_SERV_ACC 0x21
1456 #define GSM48_MT_MM_CM_SERV_REJ 0x22
1457 #define GSM48_MT_MM_CM_SERV_ABORT 0x23
1458 #define GSM48_MT_MM_CM_SERV_REQ 0x24
1459 #define GSM48_MT_MM_CM_SERV_PROMPT 0x25
1460 #define GSM48_MT_MM_CM_REEST_REQ 0x28
1461 #define GSM48_MT_MM_ABORT 0x29
1462 
1463 #define GSM48_MT_MM_NULL 0x30
1464 #define GSM48_MT_MM_STATUS 0x31
1465 #define GSM48_MT_MM_INFO 0x32
1466 
1467 /* Table 10.3/3GPP TS 04.08 */
1468 #define GSM48_MT_CC_ALERTING 0x01
1469 #define GSM48_MT_CC_CALL_CONF 0x08
1470 #define GSM48_MT_CC_CALL_PROC 0x02
1471 #define GSM48_MT_CC_CONNECT 0x07
1472 #define GSM48_MT_CC_CONNECT_ACK 0x0f
1473 #define GSM48_MT_CC_EMERG_SETUP 0x0e
1474 #define GSM48_MT_CC_PROGRESS 0x03
1475 #define GSM48_MT_CC_ESTAB 0x04
1476 #define GSM48_MT_CC_ESTAB_CONF 0x06
1477 #define GSM48_MT_CC_RECALL 0x0b
1478 #define GSM48_MT_CC_START_CC 0x09
1479 #define GSM48_MT_CC_SETUP 0x05
1480 
1481 #define GSM48_MT_CC_MODIFY 0x17
1482 #define GSM48_MT_CC_MODIFY_COMPL 0x1f
1483 #define GSM48_MT_CC_MODIFY_REJECT 0x13
1484 #define GSM48_MT_CC_USER_INFO 0x10
1485 #define GSM48_MT_CC_HOLD 0x18
1486 #define GSM48_MT_CC_HOLD_ACK 0x19
1487 #define GSM48_MT_CC_HOLD_REJ 0x1a
1488 #define GSM48_MT_CC_RETR 0x1c
1489 #define GSM48_MT_CC_RETR_ACK 0x1d
1490 #define GSM48_MT_CC_RETR_REJ 0x1e
1491 
1492 #define GSM48_MT_CC_DISCONNECT 0x25
1493 #define GSM48_MT_CC_RELEASE 0x2d
1494 #define GSM48_MT_CC_RELEASE_COMPL 0x2a
1495 
1496 #define GSM48_MT_CC_CONG_CTRL 0x39
1497 #define GSM48_MT_CC_NOTIFY 0x3e
1498 #define GSM48_MT_CC_STATUS 0x3d
1499 #define GSM48_MT_CC_STATUS_ENQ 0x34
1500 #define GSM48_MT_CC_START_DTMF 0x35
1501 #define GSM48_MT_CC_STOP_DTMF 0x31
1502 #define GSM48_MT_CC_STOP_DTMF_ACK 0x32
1503 #define GSM48_MT_CC_START_DTMF_ACK 0x36
1504 #define GSM48_MT_CC_START_DTMF_REJ 0x37
1505 #define GSM48_MT_CC_FACILITY 0x3a
1506 
1507 extern const struct value_string gsm48_rr_msgtype_names[];
1508 extern const struct value_string gsm48_mm_msgtype_names[];
1509 extern const struct value_string gsm48_cc_msgtype_names[];
1510 const char *gsm48_pdisc_msgtype_name(uint8_t pdisc, uint8_t msg_type);
1511 
1512 /* FIXME: Table 10.4 / 10.4a (GPRS) */
1513 
1514 /* Section 10.5.3.3 CM service type */
1515 #define GSM48_CMSERV_MO_CALL_PACKET 1
1516 #define GSM48_CMSERV_EMERGENCY 2
1517 #define GSM48_CMSERV_SMS 4
1518 #define GSM48_CMSERV_SUP_SERV 8
1519 #define GSM48_CMSERV_VGCS 9
1520 #define GSM48_CMSERV_VBS 10
1521 #define GSM48_CMSERV_LOC_SERV 11
1522 
1523 /* Section 10.5.2.26, Table 10.5.64 */
1524 #define GSM48_PM_MASK 0x03
1525 #define GSM48_PM_NORMAL 0x00
1526 #define GSM48_PM_EXTENDED 0x01
1527 #define GSM48_PM_REORG 0x02
1528 #define GSM48_PM_SAME 0x03
1529 
1530 /* Chapter 10.5.3.5 / Table 10.5.93 */
1531 #define GSM48_LUPD_NORMAL 0x0
1532 #define GSM48_LUPD_PERIODIC 0x1
1533 #define GSM48_LUPD_IMSI_ATT 0x2
1534 #define GSM48_LUPD_RESERVED 0x3
1535 
1536 /* Table 10.5.4 */
1537 #define GSM_MI_TYPE_MASK 0x07
1538 #define GSM_MI_TYPE_NONE 0x00
1539 #define GSM_MI_TYPE_IMSI 0x01
1540 #define GSM_MI_TYPE_IMEI 0x02
1541 #define GSM_MI_TYPE_IMEISV 0x03
1542 #define GSM_MI_TYPE_TMSI 0x04
1543 #define GSM_MI_ODD 0x08
1544 
1545 #define GSM48_IE_MOBILE_ID 0x17 /* 10.5.1.4 */
1546 #define GSM48_IE_NAME_LONG 0x43 /* 10.5.3.5a */
1547 #define GSM48_IE_NAME_SHORT 0x45 /* 10.5.3.5a */
1548 #define GSM48_IE_UTC 0x46 /* 10.5.3.8 */
1549 #define GSM48_IE_NET_TIME_TZ 0x47 /* 10.5.3.9 */
1550 #define GSM48_IE_LSA_IDENT 0x48 /* 10.5.3.11 */
1551 #define GSM48_IE_NET_DST 0x49 /* 10.5.3.12 [24.008] */
1552 
1553 #define GSM48_IE_BEARER_CAP 0x04 /* 10.5.4.5 */
1554 #define GSM48_IE_CAUSE 0x08 /* 10.5.4.11 */
1555 #define GSM48_IE_CC_CAP 0x15 /* 10.5.4.5a */
1556 #define GSM48_IE_ALERT 0x19 /* 10.5.4.26 */
1557 #define GSM48_IE_FACILITY 0x1c /* 10.5.4.15 */
1558 #define GSM48_IE_PROGR_IND 0x1e /* 10.5.4.21 */
1559 #define GSM48_IE_AUX_STATUS 0x24 /* 10.5.4.4 */
1560 #define GSM48_IE_NOTIFY 0x27 /* 10.5.4.20 */
1561 #define GSM48_IE_KPD_FACILITY 0x2c /* 10.5.4.17 */
1562 #define GSM48_IE_SIGNAL 0x34 /* 10.5.4.23 */
1563 #define GSM48_IE_CONN_BCD 0x4c /* 10.5.4.13 */
1564 #define GSM48_IE_CONN_SUB 0x4d /* 10.5.4.14 */
1565 #define GSM48_IE_CALLING_BCD 0x5c /* 10.5.4.9 */
1566 #define GSM48_IE_CALLING_SUB 0x5d /* 10.5.4.10 */
1567 #define GSM48_IE_CALLED_BCD 0x5e /* 10.5.4.7 */
1568 #define GSM48_IE_CALLED_SUB 0x6d /* 10.5.4.8 */
1569 #define GSM48_IE_REDIR_BCD 0x74 /* 10.5.4.21a */
1570 #define GSM48_IE_REDIR_SUB 0x75 /* 10.5.4.21b */
1571 #define GSM48_IE_LOWL_COMPAT 0x7c /* 10.5.4.18 */
1572 #define GSM48_IE_HIGHL_COMPAT 0x7d /* 10.5.4.16 */
1573 #define GSM48_IE_USER_USER 0x7e /* 10.5.4.25 */
1574 #define GSM48_IE_SS_VERS 0x7f /* 10.5.4.24 */
1575 #define GSM48_IE_MORE_DATA 0xa0 /* 10.5.4.19 */
1576 #define GSM48_IE_CLIR_SUPP 0xa1 /* 10.5.4.11a */
1577 #define GSM48_IE_CLIR_INVOC 0xa2 /* 10.5.4.11b */
1578 #define GSM48_IE_REV_C_SETUP 0xa3 /* 10.5.4.22a */
1579 #define GSM48_IE_REPEAT_CIR 0xd1 /* 10.5.4.22 */
1580 #define GSM48_IE_REPEAT_SEQ 0xd3 /* 10.5.4.22 */
1581 
1582 /* Section 10.5.4.11 / Table 10.5.122 */
1583 #define GSM48_CAUSE_CS_GSM 0x60
1584 
1585 /* Section 9.1.2 / Table 9.3 */
1586 /* RR elements */
1587 #define GSM48_IE_VGCS_TARGET 0x01
1588 //#define GSM48_IE_VGCS_T_MODE_I 0x01
1589 #define GSM48_IE_FRQSHORT_AFTER 0x02
1590 #define GSM48_IE_MUL_RATE_CFG 0x03 /* 10.5.2.21aa */
1591 #define GSM48_IE_FREQ_L_AFTER 0x05
1592 #define GSM48_IE_MSLOT_DESC 0x10
1593 #define GSM48_IE_CHANMODE_2 0x11
1594 #define GSM48_IE_FRQSHORT_BEFORE 0x12
1595 //#define GSM48_IE_FRQSHORT_BEFOR 0x12
1596 #define GSM48_IE_CHANMODE_3 0x13
1597 #define GSM48_IE_CHANMODE_4 0x14
1598 #define GSM48_IE_CHANMODE_5 0x15
1599 #define GSM48_IE_CHANMODE_6 0x16
1600 #define GSM48_IE_CHANMODE_7 0x17
1601 #define GSM48_IE_CHANMODE_8 0x18
1602 #define GSM48_IE_CHANDESC_2 0x64
1603 #define GSM48_IE_MA_AFTER 0x72
1604 #define GSM48_IE_START_TIME 0x7c
1605 #define GSM48_IE_FREQ_L_BEFORE 0x19
1606 //#define GSM48_IE_FRQLIST_BEFORE 0x19
1607 #define GSM48_IE_CH_DESC_1_BEFORE 0x1c
1608 //#define GSM48_IE_CHDES_1_BEFORE 0x1c
1609 #define GSM48_IE_CH_DESC_2_BEFORE 0x1d
1610 //#define GSM48_IE_CHDES_2_BEFORE 0x1d
1611 #define GSM48_IE_F_CH_SEQ_BEFORE 0x1e
1612 //#define GSM48_IE_FRQSEQ_BEFORE 0x1e
1613 #define GSM48_IE_CLASSMARK3 0x20
1614 #define GSM48_IE_MA_BEFORE 0x21
1615 #define GSM48_IE_RR_PACKET_UL 0x22
1616 #define GSM48_IE_RR_PACKET_DL 0x23
1617 #define GSM48_IE_CELL_CH_DESC 0x62
1618 #define GSM48_IE_CHANMODE_1 0x63
1619 #define GSM48_IE_CHDES_2_AFTER 0x64
1620 #define GSM48_IE_MODE_SEC_CH 0x66
1621 #define GSM48_IE_F_CH_SEQ_AFTER 0x69
1622 #define GSM48_IE_MA_AFTER 0x72
1623 #define GSM48_IE_BA_RANGE 0x73
1624 #define GSM48_IE_GROUP_CHDES 0x74
1625 #define GSM48_IE_BA_LIST_PREF 0x75
1626 #define GSM48_IE_MOB_OVSERV_DIF 0x77
1627 #define GSM48_IE_REALTIME_DIFF 0x7b
1628 #define GSM48_IE_START_TIME 0x7c
1629 #define GSM48_IE_TIMING_ADVANCE 0x7d
1630 #define GSM48_IE_GROUP_CIP_SEQ 0x80
1631 #define GSM48_IE_CIP_MODE_SET 0x90
1632 #define GSM48_IE_GPRS_RESUMPT 0xc0
1633 #define GSM48_IE_SYNC_IND 0xd0
1634 /* System Information 4 (types are equal IEs above) */
1635 #define GSM48_IE_CBCH_CHAN_DESC 0x64
1636 #define GSM48_IE_CBCH_MOB_AL 0x72
1637 
1638 /* Additional MM elements */
1639 #define GSM48_IE_LOCATION_AREA 0x13
1640 #define GSM48_IE_AUTN 0x20
1641 #define GSM48_IE_AUTH_RES_EXT 0x21
1642 #define GSM48_IE_AUTS 0x22
1643 #define GSM48_IE_PRIORITY_LEV 0x80
1644 #define GSM48_IE_FOLLOW_ON_PROC 0xa1
1645 #define GSM48_IE_CTS_PERMISSION 0xa2
1646 
1647 /* Section 10.5.4.21 / Table 10.5.127 */
1648 
1657 };
1658 
1659 /* Section 10.5.4.23 / Table 10.5.130 */
1672 };
1673 
1674 /* Section 10.5.4.11 / Table 10.5.122 */
1680 };
1681 
1689  /* not defined */
1692 };
1693 
1694 /* Section 10.5.2.31 RR Cause / Table 10.5.70 */
1713 };
1714 
1715 /* Section 10.5.4.11 CC Cause / Table 10.5.123 */
1766 };
1767 
1768 /* Annex G, GSM specific cause values for mobility management */
1793 
1794  /* according to G.6 Additional cause codes for GMM */
1801 };
1802 
1803 extern const struct value_string gsm48_reject_value_names[];
1804 static inline const char *gsm48_reject_value_name(enum gsm48_reject_value val)
1805 { return get_value_string(gsm48_reject_value_names, val); }
1806 
1827 };
1828 
1829 /* Chapter 11.3 */
1830 #define GSM48_T301 180, 0
1831 #define GSM48_T303 30, 0
1832 #define GSM48_T305 30, 0
1833 #define GSM48_T306 30, 0
1834 #define GSM48_T308 10, 0 /* no spec default */
1835 #define GSM48_T310 30, 0 /* no spec default */
1836 #define GSM48_T313 30, 0 /* no spec default */
1837 #define GSM48_T323 30, 0
1838 #define GSM48_T331 30, 0 /* no spec default */
1839 #define GSM48_T333 30, 0 /* no spec default */
1840 #define GSM48_T334 25, 0 /* min 15s */
1841 #define GSM48_T338 30, 0 /* no spec default */
1842 #define GSM48_T303_MS 30, 0
1843 #define GSM48_T305_MS 30, 0
1844 #define GSM48_T308_MS 30, 0
1845 #define GSM48_T310_MS 30, 0
1846 #define GSM48_T313_MS 30, 0
1847 #define GSM48_T323_MS 30, 0
1848 #define GSM48_T332_MS 30, 0
1849 #define GSM48_T335_MS 30, 0
1850 
1851 /* Chapter 5.1.2.2 */
1852 #define GSM_CSTATE_NULL 0
1853 #define GSM_CSTATE_INITIATED 1
1854 #define GSM_CSTATE_MM_CONNECTION_PEND 2 /* see 10.5.4.6 */
1855 #define GSM_CSTATE_MO_CALL_PROC 3
1856 #define GSM_CSTATE_CALL_DELIVERED 4
1857 #define GSM_CSTATE_CALL_PRESENT 6
1858 #define GSM_CSTATE_CALL_RECEIVED 7
1859 #define GSM_CSTATE_CONNECT_REQUEST 8
1860 #define GSM_CSTATE_MO_TERM_CALL_CONF 9
1861 #define GSM_CSTATE_ACTIVE 10
1862 #define GSM_CSTATE_DISCONNECT_REQ 12
1863 #define GSM_CSTATE_DISCONNECT_IND 12
1864 #define GSM_CSTATE_RELEASE_REQ 19
1865 #define GSM_CSTATE_MO_ORIG_MODIFY 26
1866 #define GSM_CSTATE_MO_TERM_MODIFY 27
1867 #define GSM_CSTATE_CONNECT_IND 28
1868 
1869 #define SBIT(a) (1 << a)
1870 #define ALL_STATES 0xffffffff
1871 
1872 /* Table 10.5.3/3GPP TS 04.08: Location Area Identification information element */
1873 #define GSM_LAC_RESERVED_DETACHED 0x0
1874 #define GSM_LAC_RESERVED_ALL_BTS 0xfffe
1875 
1876 /* GSM 04.08 Bearer Capability: Information Transfer Capability */
1884 };
1885 
1886 /* GSM 04.08 Bearer Capability: Transfer Mode */
1890 };
1891 
1892 /* GSM 04.08 Bearer Capability: Coding Standard */
1895 };
1896 
1897 /* GSM 04.08 Bearer Capability: Radio Channel Requirements */
1902 };
1903 
1904 /* GSM 04.08 Bearer Capability: Rate Adaption */
1910 };
1911 
1912 /* GSM 04.08 Bearer Capability: Signalling access protocol */
1920 };
1921 
1922 /* GSM 04.08 Bearer Capability: User Rate */
1931 };
1932 
1933 /* GSM 04.08 Bearer Capability: Parity */
1940 };
1941 
1942 /* GSM 04.08 Bearer Capability: Intermediate Rate */
1946 };
1947 
1948 /* GSM 04.08 Bearer Capability: Transparency */
1954 };
1955 
1956 /* GSM 04.08 Bearer Capability: Modem Type */
1967 };
1968 
1981 };
1982 
1983 #define GSM48_TMSI_LEN 5
1984 #define GSM48_MID_TMSI_LEN (GSM48_TMSI_LEN + 2)
1985 #define GSM48_MI_SIZE 32
1986 
1987 /* 3GPP TS 24.008 ยง 10.5.5.15 Routing area identification */
1988 struct gsm48_ra_id {
1989  uint8_t digits[3]; /* MCC + MNC BCD digits */
1990  uint16_t lac; /* Location Area Code */
1991  uint8_t rac; /* Routing Area Code */
1992 } __attribute__ ((packed));
1993 
1994 #define GSM48_CELL_CHAN_DESC_SIZE 16
1995 
1996 #define GSM_MACBLOCK_LEN 23
1997 #define GSM_MACBLOCK_PADDING 0x2b
1998 
1999 /* Table 10.5.118 / 3GPP TS 24.008 Section 10.5.4.7 */
2006  /* reserved */
2007 };
2008 
2009 /* Table 10.5.118 / 3GPP TS 24.008 Section 10.5.4.7 */
2018  /* reserved */
2019 };
Definition: gsm_04_08.h:711
gsm48_bcap_parity
Definition: gsm_04_08.h:1934
uint8_t orig_arfcn_hi
Definition: gsm_04_08.h:265
uint16_t lac
Definition: gsm_04_08.h:787
Definition: gsm_04_08.h:1667
Definition: gsm_04_08.h:1936
Definition: gsm_04_08.h:1089
Definition: gsm_04_08.h:697
Definition: gsm_04_08.h:1741
uint8_t msg_type
Definition: gsm_04_08.h:710
Definition: gsm_04_08.h:1062
uint8_t rxlev_nc5_lo
Definition: gsm_04_08.h:521
Definition: gsm_04_08.h:2002
uint8_t w8
Definition: gsm_04_08.h:106
Definition: gsm_04_08.h:823
uint8_t w1_hi
Definition: gsm_04_08.h:268
uint8_t a5_2
Definition: gsm_04_08.h:128
gsm48_bcap_rrq
Definition: gsm_04_08.h:1898
uint8_t cmsp
Definition: gsm_04_08.h:128
uint8_t skip_indicator
Definition: gsm_04_08.h:991
Definition: gsm_04_08.h:1724
uint8_t bsic_nc6
Definition: gsm_04_08.h:529
Definition: gsm_04_08.h:1798
Definition: gsm_04_08.h:1753
Definition: gsm_04_08.h:1727
Definition: gsm_04_08.h:1789
uint8_t maio_low
Definition: gsm_04_08.h:427
uint8_t orig_arfcn_mid
Definition: gsm_04_08.h:94
Definition: gsm_04_08.h:2005
Definition: gsm_04_08.h:2004
gsm48_numbering_plan
Definition: gsm_04_08.h:2010
uint8_t nci
Definition: gsm_04_08.h:638
uint8_t system_information
Definition: gsm_04_08.h:1033
uint8_t system_information
Definition: gsm_04_08.h:1020
uint8_t w17
Definition: gsm_04_08.h:217
Definition: gsm_04_08.h:1770
Definition: gsm_04_08.h:1666
uint8_t w8_lo
Definition: gsm_04_08.h:109
Definition: gsm_04_08.h:1743
uint8_t w6
Definition: gsm_04_08.h:105
uint8_t w9
Definition: gsm_04_08.h:109
gsm48_bcap_sig_access
Definition: gsm_04_08.h:1913
uint8_t wait_ind4
Definition: gsm_04_08.h:1139
uint8_t bsic_nc3_hi
Definition: gsm_04_08.h:154
uint8_t w8_hi
Definition: gsm_04_08.h:278
uint8_t a5_3
Definition: gsm_04_08.h:128
uint8_t rxlev_nc5_lo
Definition: gsm_04_08.h:163
Definition: gsm_04_08.h:1750
uint8_t form_id
Definition: gsm_04_08.h:92
uint8_t rxlev_nc2_hi
Definition: gsm_04_08.h:505
Definition: gsm_04_08.h:1656
uint8_t w9_hi
Definition: gsm_04_08.h:109
uint8_t w11_lo
Definition: gsm_04_08.h:113
uint8_t l2_plen
Definition: gsm_04_08.h:1164
uint8_t w9
Definition: gsm_04_08.h:364
uint8_t m7_95
Definition: gsm_04_08.h:556
uint8_t w2_hi
Definition: gsm_04_08.h:193
Definition: gsm_04_08.h:727
Definition: gsm_04_08.h:1701
Definition: gsm_04_08.h:1679
Definition: gsm_04_08.h:1730
uint8_t tsc
Definition: gsm_04_08.h:424
uint8_t w25
Definition: gsm_04_08.h:124
uint8_t fc
Definition: gsm_04_08.h:120
Definition: gsm_04_08.h:1745
uint8_t sync_ie
Definition: gsm_04_08.h:678
uint8_t w2
Definition: gsm_04_08.h:270
gsm48_chan_mode
Definition: gsm_04_08.h:695
Definition: gsm_04_08.h:749
uint8_t rxlev_nc2_lo
Definition: gsm_04_08.h:507
Definition: gsm_04_08.h:1231
uint8_t w10
Definition: gsm_04_08.h:111
Definition: gsm_04_08.h:656
Definition: gsm_04_08.h:1774
uint8_t rrfcn1_7
Definition: gsm_04_08.h:406
uint8_t orig_arfcn_hi
Definition: gsm_04_08.h:188
Definition: gsm_04_08.h:1025
Definition: gsm_04_08.h:1809
uint8_t t3_low
Definition: gsm_04_08.h:650
Definition: gsm_04_08.h:1721
uint8_t orig_arfcn_lo
Definition: gsm_04_08.h:95
uint8_t w21_lo
Definition: gsm_04_08.h:121
gsm48_rr_cause
Definition: gsm_04_08.h:1695
void gsm48_set_dtx(struct gsm48_cell_options *op, enum gsm48_dtx_mode full, enum gsm48_dtx_mode half, bool is_bcch)
Set DTX mode in Cell Options IE (3GPP TS 44.018)
Definition: gsm48.c:555
Definition: gsm_04_08.h:1746
Definition: gsm_04_08.h:1760
Definition: gsm_04_08.h:703
Definition: gsm_04_08.h:1944
uint8_t mob_alloc_len
Definition: gsm_04_08.h:1122
uint8_t cneed4
Definition: gsm_04_08.h:731
uint8_t w6_hi
Definition: gsm_04_08.h:359
uint8_t w9_hi
Definition: gsm_04_08.h:205
uint8_t w1_hi
Definition: gsm_04_08.h:92
Definition: gsm_04_08.h:1654
Definition: gsm_04_08.h:1739
Definition: gsm_04_08.h:1786
uint8_t w13_hi
Definition: gsm_04_08.h:115
Definition: gsm_04_08.h:696
Definition: gsm_04_08.h:1669
Definition: gsm_04_08.h:956
uint8_t w12_hi
Definition: gsm_04_08.h:209
uint8_t orig_arfcn_mid
Definition: gsm_04_08.h:404
uint8_t t3_low
Definition: gsm_04_08.h:665
uint8_t max_trans
Definition: gsm_04_08.h:98
gsm48_bcap_user_rate
Definition: gsm_04_08.h:1923
uint8_t maio_high
Definition: gsm_04_08.h:422
uint8_t ccch_conf
Definition: gsm_04_08.h:718
Definition: gsm_04_08.h:1705
Definition: gsm_04_08.h:701
uint8_t w28
Definition: gsm_04_08.h:385
Definition: gsm_04_08.h:1811
uint8_t rr_cause
Definition: gsm_04_08.h:1068
uint8_t w7_hi
Definition: gsm_04_08.h:105
uint8_t f0
Definition: gsm_04_08.h:92
uint8_t ho_ref
Definition: gsm_04_08.h:752
Definition: gsm_04_08.h:1698
Definition: gsm_04_08.h:1758
uint8_t cell_bar
Definition: gsm_04_08.h:98
uint8_t dtx_used
Definition: gsm_04_08.h:133
Definition: gsm_04_08.h:1670
uint8_t w26_hi
Definition: gsm_04_08.h:382
uint8_t maio_low
Definition: gsm_04_08.h:425
uint8_t w22
Definition: gsm_04_08.h:121
uint8_t w16_hi
Definition: gsm_04_08.h:119
uint8_t w3_hi
Definition: gsm_04_08.h:355
uint8_t bcch_f_nc1
Definition: gsm_04_08.h:145
uint8_t w3
Definition: gsm_04_08.h:99
Definition: gsm_04_08.h:1665
uint8_t neci
Definition: gsm_04_08.h:717
uint8_t w20_lo
Definition: gsm_04_08.h:126
uint8_t wait_ind1
Definition: gsm_04_08.h:1133
Definition: gsm_04_08.h:1817
Definition: gsm_04_08.h:2016
Definition: gsm_04_08.h:1821
uint8_t si
Definition: gsm_04_08.h:638
uint8_t bcch_f_nc3
Definition: gsm_04_08.h:154
static uint8_t gsm48_hdr_msg_type_r99(const struct gsm48_hdr *hdr)
Definition: gsm_04_08.h:1322
uint8_t ncc_permitted
Definition: gsm_04_08.h:1037
uint8_t w19
Definition: gsm_04_08.h:123
uint8_t m7_40
Definition: gsm_04_08.h:112
uint8_t cm_service_type
Definition: gsm_04_08.h:712
Definition: gsm_04_08.h:1696
Definition: gsm_04_08.h:830
gsm48_reject_value
Definition: gsm_04_08.h:1769
uint8_t sm_cap
Definition: gsm_04_08.h:120
uint8_t rxlev_nc6_hi
Definition: gsm_04_08.h:165
Definition: gsm_04_08.h:1796
Definition: gsm_04_08.h:1723
uint8_t radio_link_timeout
Definition: gsm_04_08.h:901
uint8_t nscb
Definition: gsm_04_08.h:107
uint8_t w12
Definition: gsm_04_08.h:286
Definition: gsm_04_08.h:909
Definition: gsm_04_08.h:1729
Definition: gsm_04_08.h:1749
uint8_t rxlev_nc4_hi
Definition: gsm_04_08.h:157
Definition: gsm_04_08.h:1938
Definition: gsm_04_08.h:1711
Definition: gsm_04_08.h:1683
Definition: gsm_04_08.h:1819
uint8_t ms_txpwr_max_ccch
Definition: gsm_04_08.h:851
uint8_t t3212
Definition: gsm_04_08.h:880
uint8_t w3_hi
Definition: gsm_04_08.h:195
gsm48_bcap_tmod
Definition: gsm_04_08.h:1887
uint8_t w23
Definition: gsm_04_08.h:379
Definition: gsm_04_08.h:393
Definition: gsm_04_08.h:1725
uint8_t m5_15
Definition: gsm_04_08.h:112
Definition: gsm_04_08.h:1771
uint16_t cell_identity
Definition: gsm_04_08.h:1034
uint8_t ext_bcch_frequency_list[16]
Definition: gsm_04_08.h:709
bool gsm48_hdr_gmm_cipherable(const struct gsm48_hdr *hdr)
Checks is particular message is cipherable in A/Gb mode according to 3GPP TS 24.008 ยง 4...
Definition: gsm48.c:441
uint8_t w15_hi
Definition: gsm_04_08.h:119
uint8_t w18_lo
Definition: gsm_04_08.h:123
static bool gsm48_acc_is_barred(struct gsm48_rach_control *rach_control, unsigned int acc)
Definition: gsm_04_08.h:631
gsm48_bcap_modem_type
Definition: gsm_04_08.h:1957
uint8_t proto_discr
Definition: gsm_04_08.h:824
Definition: gsm_04_08.h:1738
Definition: gsm_04_08.h:1709
uint8_t spare4
Definition: gsm_04_08.h:69
Definition: gsm_04_08.h:1718
uint8_t re
Definition: gsm_04_08.h:98
Definition: gsm_04_08.h:1779
uint8_t options[0]
Definition: gsm_04_08.h:711
uint8_t w11
Definition: gsm_04_08.h:366
uint8_t spare
Definition: gsm_04_08.h:1174
Definition: gsm_04_08.h:1671
uint8_t mi_len
Definition: gsm_04_08.h:780
uint8_t rxlev_nc5_hi
Definition: gsm_04_08.h:519
uint8_t w1
Definition: gsm_04_08.h:353
uint8_t w1_hi
Definition: gsm_04_08.h:191
Definition: gsm_04_08.h:1185
Definition: gsm_04_08.h:1752
uint8_t w6_hi
Definition: gsm_04_08.h:103
#define GSM48_PDISC_BCAST_CC
Definition: gsm_04_08.h:1237
uint8_t pwr_lev
Definition: gsm_04_08.h:23
Definition: gsm_04_08.h:1909
gsm48_signal_val
Definition: gsm_04_08.h:1660
uint8_t mode
Definition: gsm_04_08.h:692
Definition: gsm_04_08.h:1958
Definition: gsm_04_08.h:1952
uint8_t rxlev_nc2_lo
Definition: gsm_04_08.h:149
uint8_t type
Definition: gsm_04_08.h:712
Definition: gsm_04_08.h:1918
uint8_t spare
Definition: gsm_04_08.h:55
Definition: gsm_04_08.h:1663
uint8_t w12_lo
Definition: gsm_04_08.h:115
uint8_t bs_ag_blks_res
Definition: gsm_04_08.h:718
uint8_t rxlev_full
Definition: gsm_04_08.h:491
uint8_t dtx
Definition: gsm_04_08.h:717
Definition: gsm_04_08.h:1824
uint8_t spare2
Definition: gsm_04_08.h:120
uint8_t w2_lo
Definition: gsm_04_08.h:97
uint8_t wait_ind3
Definition: gsm_04_08.h:1137
uint8_t ver
Definition: gsm_04_08.h:551
uint8_t ra_id[6]
Definition: gsm_04_08.h:709
uint8_t ver
Definition: gsm_04_08.h:107
static void gsm48_allow_acc(struct gsm48_rach_control *rach_control, unsigned int acc)
Definition: gsm_04_08.h:616
Definition: gsm_04_08.h:886
uint8_t rev_lev
Definition: gsm_04_08.h:23
Definition: gsm_04_08.h:1880
uint8_t hsn
Definition: gsm_04_08.h:425
uint8_t page_mode
Definition: gsm_04_08.h:1131
Definition: gsm_04_08.h:1929
uint8_t spare3
Definition: gsm_04_08.h:128
Definition: gsm_04_08.h:1688
Definition: gsm_04_08.h:2015
Definition: gsm_04_08.h:2013
gsm48_dtx_mode
Definition: gsm_04_08.h:883
Definition: gsm_04_08.h:1676
uint8_t t1
Definition: gsm_04_08.h:639
Definition: gsm_04_08.h:1915
uint8_t w18_hi
Definition: gsm_04_08.h:293
#define GSM48_PDISC_CC
Definition: gsm_04_08.h:1239
const struct value_string gsm48_mm_msgtype_names[]
TS 04.08 MM Message Type names.
Definition: gsm48.c:876
Definition: gsm_04_08.h:581
Definition: gsm_04_08.h:986
uint8_t timing_advance1
Definition: gsm_04_08.h:1118
Definition: gsm_04_08.h:949
Definition: gsm_04_08.h:1763
uint8_t w5_hi
Definition: gsm_04_08.h:274
uint8_t w6_lo
Definition: gsm_04_08.h:105
uint8_t cell_channel_description[16]
Definition: gsm_04_08.h:709
Definition: gsm_04_08.h:719
Definition: gsm_04_08.h:32
uint8_t rr_cause
Definition: gsm_04_08.h:1084
gsm48_cc_cause
Definition: gsm_04_08.h:1716
Definition: gsm_04_08.h:1712
uint8_t w20
Definition: gsm_04_08.h:117
Definition: gsm_04_08.h:1757
#define GSM48_PDISC_NC_SS
Definition: gsm_04_08.h:1247
uint8_t rxlev_nc4_lo
Definition: gsm_04_08.h:159
Definition: gsm_04_08.h:1736
uint8_t cell_resel_hyst
Definition: gsm_04_08.h:715
uint8_t cipher_key_seq
Definition: gsm_04_08.h:712
Definition: gsm_04_08.h:1708
uint8_t ra
Definition: gsm_04_08.h:632
Definition: gsm_04_08.h:1744
uint8_t key_seq
Definition: gsm_04_08.h:712
uint8_t w5
Definition: gsm_04_08.h:103
uint8_t rxlev_nc3_lo
Definition: gsm_04_08.h:512
Definition: gsm_04_08.h:1901
uint8_t w4_hi
Definition: gsm_04_08.h:357
uint8_t w26_hi
Definition: gsm_04_08.h:124
uint8_t w15
Definition: gsm_04_08.h:119
struct gsm48_req_ref req_ref3
Definition: gsm_04_08.h:716
const struct value_string gsm48_cc_msgtype_names[]
TS 04.08 CC Message Type names.
Definition: gsm48.c:906
static const char * gsm48_pdisc_name(uint8_t val)
Definition: gsm_04_08.h:1254
uint8_t mob_alloc_len
Definition: gsm_04_08.h:710
Definition: gsm_04_08.h:264
uint8_t proto_discr
Definition: gsm_04_08.h:1129
Definition: gsm_04_08.h:1787
uint8_t w13_hi
Definition: gsm_04_08.h:211
Definition: gsm_04_08.h:1988
uint8_t w21_hi
Definition: gsm_04_08.h:117
uint8_t rxqual_sub
Definition: gsm_04_08.h:139
uint8_t bcch_f_nc5_lo
Definition: gsm_04_08.h:165
Definition: gsm_04_08.h:1939
uint8_t w9_lo
Definition: gsm_04_08.h:283
static uint8_t gsm48_hdr_trans_id_no_ti(const struct gsm48_hdr *hdr)
Definition: gsm_04_08.h:1297
uint8_t proto_discr
Definition: gsm_04_08.h:1113
Definition: gsm_04_08.h:1883
Definition: gsm_04_08.h:1927
Definition: gsm_04_08.h:2001
struct gsm48_req_ref req_ref
Definition: gsm_04_08.h:713
uint8_t page_mode
Definition: gsm_04_08.h:762
uint8_t bsic_nc6
Definition: gsm_04_08.h:171
gsm48_bcap_coding
Definition: gsm_04_08.h:1893
uint8_t rest[0]
Definition: gsm_04_08.h:720
struct gsm48_chan_desc chan_desc2
Definition: gsm_04_08.h:715
uint8_t w15
Definition: gsm_04_08.h:370
uint8_t bcch_f_nc6_lo
Definition: gsm_04_08.h:171
uint8_t d
Definition: gsm_04_08.h:717
Definition: gsm_04_08.h:1965
uint8_t w1_lo
Definition: gsm_04_08.h:95
uint8_t w7_hi
Definition: gsm_04_08.h:130
Definition: gsm_04_08.h:1012
static uint8_t gsm48_hdr_trans_id(const struct gsm48_hdr *hdr)
Definition: gsm_04_08.h:1271
uint8_t vgcs
Definition: gsm_04_08.h:61
Definition: gsm_04_08.h:843
Definition: gsm_04_08.h:1144
uint8_t m6_70
Definition: gsm_04_08.h:112
const struct value_string gsm48_rr_msgtype_names[]
TS 04.08 RR Message Type names.
Definition: gsm48.c:783
uint8_t l2_plen
Definition: gsm_04_08.h:1145
Definition: gsm_04_08.h:1662
uint8_t orig_arfcn_hi
Definition: gsm_04_08.h:350
Definition: gsm_04_08.h:1078
uint8_t vgcs
Definition: gsm_04_08.h:120
Definition: gsm_04_08.h:702
uint8_t bs_pa_mfrms
Definition: gsm_04_08.h:722
Definition: gsm_04_08.h:1737
gsm48_bcap_ra
Definition: gsm_04_08.h:1905
uint8_t w12_hi
Definition: gsm_04_08.h:113
uint8_t w9_lo
Definition: gsm_04_08.h:207
uint8_t rxlev_nc3_lo
Definition: gsm_04_08.h:154
uint8_t bsic_nc3_lo
Definition: gsm_04_08.h:157
Definition: gsm_04_08.h:1083
#define GSM48_PDISC_MM
Definition: gsm_04_08.h:1242
uint8_t orig_arfcn_hi
Definition: gsm_04_08.h:92
GSM HR V4 (OHR AMR-WB)
Definition: gsm_04_08.h:1978
struct gsm48_cell_desc cell_desc
Definition: gsm_04_08.h:708
uint8_t w13
Definition: gsm_04_08.h:368
uint8_t arfcn_high
Definition: gsm_04_08.h:421
uint8_t spare_2
Definition: gsm_04_08.h:875
Definition: gsm_04_08.h:1960
Definition: gsm_04_08.h:1686
Definition: gsm_04_08.h:1780
struct gsm48_req_ref req_ref4
Definition: gsm_04_08.h:718
Definition: gsm_04_08.h:1775
Definition: gsm_04_08.h:1707
uint8_t cneed2
Definition: gsm_04_08.h:717
Definition: gsm_04_08.h:1706
uint8_t system_information
Definition: gsm_04_08.h:1007
uint8_t ncc_permitted
Definition: gsm_04_08.h:936
uint8_t rxlev_nc5_hi
Definition: gsm_04_08.h:161
uint8_t smod
Definition: gsm_04_08.h:107
uint32_t tlli
Definition: gsm_04_08.h:728
uint8_t t3_high
Definition: gsm_04_08.h:663
uint8_t rr_cause
Definition: gsm_04_08.h:1079
uint8_t mi_len
Definition: gsm_04_08.h:919
Definition: gsm_04_08.h:1690
static uint8_t gsm48_hdr_trans_id_flip_ti(const struct gsm48_hdr *hdr)
Definition: gsm_04_08.h:1292
uint8_t icmi
Definition: gsm_04_08.h:107
Definition: gsm_04_08.h:1823
uint8_t w13_lo
Definition: gsm_04_08.h:117
Definition: gsm_04_08.h:1937
uint8_t w2_hi
Definition: gsm_04_08.h:96
Definition: gsm_04_08.h:1685
uint32_t tmsi1
Definition: gsm_04_08.h:1200
uint8_t w27
Definition: gsm_04_08.h:127
struct gsm48_control_channel_descr control_channel_desc
Definition: gsm_04_08.h:711
GSM HR V6 (OHR AMR)
Definition: gsm_04_08.h:1980
uint8_t spare
Definition: gsm_04_08.h:1195
Definition: gsm_04_08.h:758
Definition: gsm_04_08.h:1762
uint8_t spare
Definition: gsm_04_08.h:23
Definition: gsm_04_08.h:1822
Definition: gsm_04_08.h:1964
GSM FR V5 (FR AMR-WB)
Definition: gsm_04_08.h:1979
struct gsm48_cell_options cell_options
Definition: gsm_04_08.h:712
Definition: gsm_04_08.h:1930
Definition: gsm_04_08.h:1677
Definition: gsm_04_08.h:1697
uint8_t rxlev_nc1
Definition: gsm_04_08.h:501
uint8_t rot
Definition: gsm_04_08.h:638
Definition: gsm_04_08.h:640
Definition: gsm_04_08.h:1953
uint8_t t2
Definition: gsm_04_08.h:593
Definition: gsm_04_08.h:449
Definition: gsm_04_08.h:1908
Definition: gsm_04_08.h:1820
uint8_t w5_lo
Definition: gsm_04_08.h:103
Definition: gsm_04_08.h:1800
uint8_t w1
Definition: gsm_04_08.h:95
uint32_t tmsi3
Definition: gsm_04_08.h:1202
Definition: gsm_04_08.h:808
Definition: gsm_04_08.h:1812
uint8_t rxlev_nc4_lo
Definition: gsm_04_08.h:517
uint8_t power_command
Definition: gsm_04_08.h:753
uint8_t t3_high
Definition: gsm_04_08.h:648
uint8_t l2_plen
Definition: gsm_04_08.h:831
uint8_t pag_mode
Definition: gsm_04_08.h:717
uint8_t bcc
Definition: gsm_04_08.h:713
uint8_t bcch_f_nc2
Definition: gsm_04_08.h:149
uint8_t w20_hi
Definition: gsm_04_08.h:123
Definition: gsm_04_08.h:1652
Definition: gsm_04_08.h:1651
uint8_t skip_indicator
Definition: gsm_04_08.h:1004
struct gsm48_rach_control rach_control
Definition: gsm_04_08.h:710
Definition: gsm_04_08.h:1735
Definition: gsm_04_08.h:1894
Definition: gsm_04_08.h:933
uint8_t m4_75
Definition: gsm_04_08.h:112
Definition: gsm_04_08.h:1733
Definition: gsm_04_08.h:1790
Definition: gsm_04_08.h:1751
uint8_t spare
Definition: gsm_04_08.h:1154
Definition: gsm_04_08.h:187
uint8_t h
Definition: gsm_04_08.h:422
uint8_t w14
Definition: gsm_04_08.h:117
Definition: gsm_04_08.h:1761
uint8_t ss_scr
Definition: gsm_04_08.h:120
Definition: gsm_04_08.h:1777
uint8_t mi_len
Definition: gsm_04_08.h:818
uint8_t rxlev_nc4_hi
Definition: gsm_04_08.h:515
uint8_t bcch_f_nc4
Definition: gsm_04_08.h:159
uint8_t cm_service_type
Definition: gsm_04_08.h:914
Definition: gsm_04_08.h:785
Definition: gsm_04_08.h:1928
uint8_t a5_1
Definition: gsm_04_08.h:23
Definition: gsm_04_08.h:974
uint8_t w18_hi
Definition: gsm_04_08.h:372
uint8_t spare
Definition: gsm_04_08.h:438
Definition: gsm_04_08.h:15
Definition: gsm_04_08.h:1691
uint8_t digits[3]
Definition: gsm_04_08.h:708
uint8_t rand[16]
Definition: gsm_04_08.h:715
uint8_t m5_90
Definition: gsm_04_08.h:112
uint8_t sc
Definition: gsm_04_08.h:714
Definition: gsm_04_08.h:1951
Definition: gsm_04_08.h:1792
uint8_t timing_advance2
Definition: gsm_04_08.h:1121
uint8_t cbq3
Definition: gsm_04_08.h:722
uint8_t bcch_frequency_list[16]
Definition: gsm_04_08.h:709
uint8_t radio_link_timeout
Definition: gsm_04_08.h:717
uint8_t msg_type
Definition: gsm_04_08.h:825
Definition: gsm_04_08.h:1734
uint8_t orig_arfcn_mid
Definition: gsm_04_08.h:267
Definition: gsm_04_08.h:1703
uint8_t w23
Definition: gsm_04_08.h:121
Definition: gsm_04_08.h:1772
uint8_t w21
Definition: gsm_04_08.h:126
Definition: gsm_04_08.h:2003
uint8_t proto_discr
Definition: gsm_04_08.h:1187
Definition: gsm_04_08.h:1784
uint8_t w6_hi
Definition: gsm_04_08.h:276
Definition: gsm_04_08.h:1963
uint8_t msg_type
Definition: gsm_04_08.h:1147
chreq_type
Definition: gsm_04_08.h:1807
gsm48_bcap_itcap
Definition: gsm_04_08.h:1877
uint8_t w9_lo
Definition: gsm_04_08.h:111
uint8_t w8_hi
Definition: gsm_04_08.h:107
uint8_t arfcn_hi
Definition: gsm_04_08.h:713
const struct value_string gsm48_reject_value_names[]
Definition: gsm48.c:994
uint8_t cm3
Definition: gsm_04_08.h:128
uint8_t spare
Definition: gsm_04_08.h:1096
uint8_t spare
Definition: gsm_04_08.h:494
uint8_t rrfcn1_7
Definition: gsm_04_08.h:104
uint8_t w7
Definition: gsm_04_08.h:105
uint32_t tmsi1
Definition: gsm_04_08.h:1179
uint32_t classmark2
Definition: gsm_04_08.h:779
Definition: gsm_04_08.h:1799
Definition: gsm_04_08.h:2017
uint8_t w20_hi
Definition: gsm_04_08.h:296
uint8_t t3_high
Definition: gsm_04_08.h:639
struct gsm48_chan_desc chan_desc
Definition: gsm_04_08.h:632
uint8_t msg_type
Definition: gsm_04_08.h:1166
uint8_t pdisc
Definition: gsm_44_318.h:803
Definition: gsm_04_08.h:1776
uint8_t w26_lo
Definition: gsm_04_08.h:127
uint8_t wait_ind2
Definition: gsm_04_08.h:1135
uint8_t page_mode
Definition: gsm_04_08.h:1115
struct gsm48_classmark2 cm2
Definition: gsm_04_08.h:709
#define GSM48_PDISC_LOC
Definition: gsm_04_08.h:1248
uint8_t spare
Definition: gsm_04_08.h:796
Definition: gsm_04_08.h:1163
const char * gsm48_pdisc_msgtype_name(uint8_t pdisc, uint8_t msg_type)
Compose a string naming the message type for given protocol.
Definition: gsm48.c:963
#define GSM48_PDISC_MASK
Definition: gsm_04_08.h:1251
uint8_t rxlev_nc6_lo
Definition: gsm_04_08.h:526
uint8_t bsic_nc5
Definition: gsm_04_08.h:165
uint8_t cause
Definition: gsm_04_08.h:730
GSM FR V4 (OFR AMR-WB)
Definition: gsm_04_08.h:1977
static const char * gsm48_reject_value_name(enum gsm48_reject_value val)
Definition: gsm_04_08.h:1804
uint8_t w28
Definition: gsm_04_08.h:127
uint8_t bsic_nc1_lo
Definition: gsm_04_08.h:147
Definition: gsm_04_08.h:1661
Definition: gsm_04_08.h:1926
Definition: gsm_04_08.h:884
uint8_t data[0]
Definition: gsm_04_08.h:711
uint8_t w7_lo
Definition: gsm_04_08.h:107
Definition: gsm_04_08.h:1888
uint8_t mob_alloc[0]
Definition: gsm_04_08.h:711
uint8_t rr_protocol_discriminator
Definition: gsm_04_08.h:713
uint8_t spare2
Definition: gsm_04_08.h:497
uint8_t w5_hi
Definition: gsm_04_08.h:101
Definition: gsm_04_08.h:1664
Definition: gsm_04_08.h:1747
uint8_t spare2
Definition: gsm_04_08.h:1209
uint8_t w3_hi
Definition: gsm_04_08.h:97
Definition: gsm_04_08.h:1906
gsm48_bcap_interm_rate
Definition: gsm_04_08.h:1943
uint8_t w14
Definition: gsm_04_08.h:213
Definition: gsm_04_08.h:1072
uint8_t acs
Definition: gsm_04_08.h:717
Definition: gsm_04_08.h:1722
Definition: gsm_04_08.h:1650
Definition: gsm_04_08.h:1907
uint8_t mi[0]
Definition: gsm_04_08.h:717
uint8_t w3_lo
Definition: gsm_04_08.h:99
Definition: gsm_04_08.h:568
uint8_t l2_plen
Definition: gsm_04_08.h:759
uint8_t timing_advance
Definition: gsm_04_08.h:765
uint8_t orig_arfcn_hi
Definition: gsm_04_08.h:402
uint8_t rest_octets[0]
Definition: gsm_04_08.h:711
uint8_t rxlev_full
Definition: gsm_04_08.h:133
Definition: gsm_04_08.h:1826
Definition: gsm_04_08.h:1067
uint8_t spare4
Definition: gsm_04_08.h:128
uint8_t w14_hi
Definition: gsm_04_08.h:288
uint8_t rxlev_acc_min
Definition: gsm_04_08.h:853
Definition: gsm_04_08.h:116
Definition: gsm_04_08.h:1814
uint8_t m7_95
Definition: gsm_04_08.h:112
uint16_t cell_identity
Definition: gsm_04_08.h:964
Definition: gsm_04_08.h:700
uint8_t sync_ie
Definition: gsm_04_08.h:638
Definition: gsm_04_08.h:1959
Definition: gsm_04_08.h:1778
uint8_t w13
Definition: gsm_04_08.h:115
uint8_t cneed1
Definition: gsm_04_08.h:717
struct gsm48_system_information_type_header header
Definition: gsm_04_08.h:708
Definition: gsm_04_08.h:1795
Definition: gsm_04_08.h:1732
Definition: gsm_04_08.h:699
gsm48_bcap_transp
Definition: gsm_04_08.h:1949
GSM HR V1 (GSM HR)
Definition: gsm_04_08.h:1973
uint8_t rac
Definition: gsm_04_08.h:1991
uint8_t msg_type
Definition: gsm_04_08.h:1130
Definition: gsm_04_08.h:1808
uint32_t tmsi2
Definition: gsm_04_08.h:1201
const struct value_string gsm48_chan_mode_names[]
Definition: gsm48.c:397
uint8_t bsic_nc4
Definition: gsm_04_08.h:161
Definition: gsm_04_08.h:925
Definition: gsm_04_08.h:1704
uint8_t m12_2
Definition: gsm_04_08.h:112
Definition: gsm_04_08.h:1055
uint8_t l2_plen
Definition: gsm_04_08.h:1112
uint8_t w4_hi
Definition: gsm_04_08.h:99
uint8_t bsic_nc2_hi
Definition: gsm_04_08.h:149
uint8_t rxqual_full
Definition: gsm_04_08.h:139
uint8_t w11
Definition: gsm_04_08.h:113
uint8_t msg_type
Definition: gsm_04_08.h:1114
uint32_t classmark
Definition: gsm_04_08.h:918
Definition: gsm_04_08.h:791
enum gsm48_chan_mode __attribute__
uint8_t mi_len
Definition: gsm_04_08.h:1050
uint8_t rr_cause
Definition: gsm_04_08.h:1063
Definition: gsm_04_08.h:1754
struct gsm48_req_ref req_ref2
Definition: gsm_04_08.h:716
uint8_t skip_indicator
Definition: gsm_04_08.h:1030
Definition: gsm_04_08.h:1720
Definition: gsm_04_08.h:1719
uint8_t orig_arfcn_mid
Definition: gsm_04_08.h:190
Definition: gsm_04_08.h:962
uint8_t w21
Definition: gsm_04_08.h:299
Definition: gsm_04_08.h:1668
Definition: gsm_04_08.h:1748
uint8_t att
Definition: gsm_04_08.h:718
uint8_t no_nc_n_lo
Definition: gsm_04_08.h:143
Definition: gsm_04_08.h:1882
Definition: gsm_04_08.h:860
uint8_t rxlev_acc_min
Definition: gsm_04_08.h:717
gsm48_progress_desc
Definition: gsm_04_08.h:1649
uint8_t atc
Definition: gsm_04_08.h:97
uint8_t tsc
Definition: gsm_04_08.h:422
#define GSM48_PDISC_EXTEND
Definition: gsm_04_08.h:1249
Definition: gsm_04_08.h:803
uint8_t w24
Definition: gsm_04_08.h:124
Definition: gsm_04_08.h:1756
Definition: gsm_04_08.h:1785
Definition: gsm_04_08.h:1687
uint8_t msg_type
Definition: gsm_04_08.h:761
Definition: gsm_04_08.h:1717
uint8_t no_nc_n_hi
Definition: gsm_04_08.h:139
Definition: gsm_04_08.h:1815
Definition: gsm_04_08.h:2012
uint16_t lac
Definition: gsm_04_08.h:1990
Definition: gsm_04_08.h:1916
Definition: gsm_04_08.h:349
Definition: gsm_04_08.h:1818
uint8_t bsic_nc2_lo
Definition: gsm_04_08.h:152
Definition: gsm_04_08.h:1889
uint8_t spare
Definition: gsm_04_08.h:1222
Definition: gsm_04_08.h:671
uint8_t rr_cause
Definition: gsm_04_08.h:1073
Definition: gsm_04_08.h:771
uint8_t proto_discr
Definition: gsm_04_08.h:1146
uint8_t meas_valid
Definition: gsm_04_08.h:136
uint8_t ba_used
Definition: gsm_04_08.h:133
uint8_t rrfcn8_111[13]
Definition: gsm_04_08.h:106
uint8_t mob_alloc_len
Definition: gsm_04_08.h:766
Definition: gsm_04_08.h:1700
Definition: gsm_04_08.h:1925
uint32_t tmsi4
Definition: gsm_04_08.h:1203
uint8_t sres[4]
Definition: gsm_04_08.h:708
uint8_t proto_discr
Definition: gsm_04_08.h:1165
uint8_t bsic_nc1_hi
Definition: gsm_04_08.h:503
Definition: gsm_04_08.h:1740
gsm48_cause_loc
Definition: gsm_04_08.h:1682
Definition: gsm_04_08.h:1879
Definition: gsm_04_08.h:1710
Definition: gsm_04_08.h:1788
uint8_t cm2_len
Definition: gsm_04_08.h:1225
Definition: gsm_04_08.h:690
uint8_t w11_hi
Definition: gsm_04_08.h:111
Definition: gsm_04_08.h:1759
Definition: gsm_04_08.h:1042
uint8_t t3_low
Definition: gsm_04_08.h:641
uint8_t spare_2
Definition: gsm_04_08.h:722
Definition: gsm_04_08.h:1728
uint8_t w13_hi
Definition: gsm_04_08.h:140
Definition: gsm_04_08.h:885
Definition: gsm_04_08.h:1950
uint8_t system_information
Definition: gsm_04_08.h:994
uint8_t cneed3
Definition: gsm_04_08.h:731
static const char * gsm48_chan_mode_name(enum gsm48_chan_mode val)
Definition: gsm_04_08.h:707
struct gsm48_classmark1 classmark1
Definition: gsm_04_08.h:716
uint8_t spare
Definition: gsm_04_08.h:776
uint8_t ms_txpwr_max_ccch
Definition: gsm_04_08.h:715
Definition: gsm_04_08.h:1935
uint8_t rxlev_nc2_hi
Definition: gsm_04_08.h:147
Definition: gsm_04_08.h:2014
Definition: gsm_04_08.h:999
uint8_t ncc
Definition: gsm_04_08.h:713
uint32_t tmsi2
Definition: gsm_04_08.h:1180
uint8_t solsa
Definition: gsm_04_08.h:128
Definition: gsm_04_08.h:1217
uint8_t w9
Definition: gsm_04_08.h:134
uint8_t w21_hi
Definition: gsm_04_08.h:375
Definition: gsm_04_08.h:1919
Definition: gsm_04_08.h:535
gsm48_type_of_number
Definition: gsm_04_08.h:2000
uint8_t cm2_len
Definition: gsm_04_08.h:1105
uint8_t m10_2
Definition: gsm_04_08.h:112
Definition: gsm_04_08.h:1783
uint8_t type
Definition: gsm_04_08.h:813
const struct value_string gsm48_pdisc_names[]
TS 04.08 Protocol Descriptor names.
Definition: gsm48.c:764
uint8_t rxlev_nc3_hi
Definition: gsm_04_08.h:510
uint8_t w2
Definition: gsm_04_08.h:97
uint8_t tx_integer
Definition: gsm_04_08.h:588
uint8_t w7
Definition: gsm_04_08.h:362
Definition: gsm_04_08.h:941
uint8_t bsic_nc1_hi
Definition: gsm_04_08.h:145
gsm48_cause_coding
Definition: gsm_04_08.h:1675
uint8_t msg_type
Definition: gsm_04_08.h:1188
uint8_t bcch_f_nc5_hi
Definition: gsm_04_08.h:163
GSM FR V3 (FR AMR)
Definition: gsm_04_08.h:1975
uint8_t pwrc
Definition: gsm_04_08.h:717
uint8_t skip_indicator
Definition: gsm_04_08.h:1017
Definition: gsm_04_08.h:1048
gsm48_bcap_speech_ver
GSM 04.08 Bearer Capability: Speech Version Indication (See also 3GPP TS 24.008, Table 10...
Definition: gsm_04_08.h:1971
uint8_t chan_nr
Definition: gsm_04_08.h:414
uint8_t w16_lo
Definition: gsm_04_08.h:121
uint8_t rxlev_nc6_hi
Definition: gsm_04_08.h:523
Definition: gsm_04_08.h:1917
Definition: gsm_04_08.h:1966
struct gsm48_loc_area_id lai
Definition: gsm_04_08.h:715
uint8_t w16_hi
Definition: gsm_04_08.h:215
GSM FR V2 (GSM EFR)
Definition: gsm_04_08.h:1974
uint8_t t2
Definition: gsm_04_08.h:103
Definition: gsm_04_08.h:1684
uint8_t rxlev_nc3_hi
Definition: gsm_04_08.h:152
Definition: gsm_04_08.h:1816
Definition: gsm_04_08.h:1797
Definition: gsm_04_08.h:1765
Definition: gsm_04_08.h:1726
uint8_t w12
Definition: gsm_04_08.h:113
#define GSM48_PDISC_GROUP_CC
Definition: gsm_04_08.h:1236
uint8_t cr
Definition: gsm_04_08.h:714
uint8_t power_command
Definition: gsm_04_08.h:710
struct gsm48_chan_desc chan_desc1
Definition: gsm_04_08.h:712
GSM HR V3 (HR_AMR)
Definition: gsm_04_08.h:1976
struct gsm48_req_ref req_ref1
Definition: gsm_04_08.h:713
uint8_t w18_hi
Definition: gsm_04_08.h:120
uint8_t spare_1
Definition: gsm_04_08.h:722
uint8_t alg_id
Definition: gsm_04_08.h:714
Definition: gsm_04_08.h:1810
uint8_t t3
Definition: gsm_04_08.h:594
Definition: gsm_04_08.h:1878
struct gsm48_cell_sel_par cell_sel_par
Definition: gsm_04_08.h:713
uint8_t w7_hi
Definition: gsm_04_08.h:201
uint8_t skip_indicator
Definition: gsm_04_08.h:713
uint8_t w17
Definition: gsm_04_08.h:121
uint8_t arfcn_lo
Definition: gsm_04_08.h:745
Definition: gsm_04_08.h:1111
Definition: gsm_04_08.h:1699
uint8_t es_ind
Definition: gsm_04_08.h:23
Definition: gsm_04_08.h:1924
Definition: gsm_04_08.h:891
Definition: gsm_04_08.h:1813
Definition: gsm_04_08.h:1655
Definition: gsm_04_08.h:1702
uint8_t ncc
Definition: gsm_04_08.h:741
Definition: gsm_04_08.h:1755
static bool gsm48_ta_is_valid(uint8_t ta)
Check if TA is valid according to 3GPP TS 44.018 ยง 10.5.2.40.
Definition: gsm_04_08.h:1287
Definition: gsm_04_08.h:1742
Definition: gsm_04_08.h:1653
Definition: gsm_04_08.h:1773
uint8_t orig_arfcn_mid
Definition: gsm_04_08.h:352
Definition: gsm_04_08.h:698
uint8_t l2_plen
Definition: gsm_04_08.h:1128
Definition: gsm_04_08.h:735
uint8_t rxlev_sub
Definition: gsm_04_08.h:136
uint8_t lcsva_cap
Definition: gsm_04_08.h:128
Definition: gsm_04_08.h:1900
uint8_t mscr
Definition: gsm_04_08.h:871
uint8_t l2_plen
Definition: gsm_04_08.h:1186
uint8_t w16_hi
Definition: gsm_04_08.h:290
uint8_t system_information
Definition: gsm_04_08.h:839
Definition: gsm_04_08.h:1945
uint8_t w14_lo
Definition: gsm_04_08.h:119
Definition: gsm_04_08.h:1781
Definition: gsm_04_08.h:413
uint8_t rxlev_nc6_lo
Definition: gsm_04_08.h:168
Definition: gsm_04_08.h:1678
Definition: gsm_04_08.h:1791
uint8_t w14_hi
Definition: gsm_04_08.h:117
static void gsm48_barr_acc(struct gsm48_rach_control *rach_control, unsigned int acc)
Definition: gsm_04_08.h:602
Definition: gsm_04_08.h:1961
uint8_t spare
Definition: gsm_04_08.h:574
Definition: gsm_04_08.h:1825
uint8_t vbs
Definition: gsm_04_08.h:120
uint8_t proto_discr
Definition: gsm_04_08.h:760
uint8_t w4_hi
Definition: gsm_04_08.h:272
uint8_t skip_indicator
Definition: gsm_04_08.h:836
uint8_t w16
Definition: gsm_04_08.h:121
uint8_t w4_lo
Definition: gsm_04_08.h:101
uint8_t tx_integer
Definition: gsm_04_08.h:98
uint8_t w9_hi
Definition: gsm_04_08.h:281
Definition: gsm_04_08.h:1782
uint8_t mscr
Definition: gsm_04_08.h:718
Definition: gsm_04_08.h:1881
static uint8_t gsm48_hdr_pdisc(const struct gsm48_hdr *hdr)
Definition: gsm_04_08.h:1259
uint8_t w5
Definition: gsm_04_08.h:199
Definition: gsm_04_08.h:1914
uint8_t rxlev_nc1
Definition: gsm_04_08.h:143
uint8_t arfcn_low
Definition: gsm_04_08.h:443
uint8_t w15_lo
Definition: gsm_04_08.h:121
Definition: gsm_04_08.h:1962
uint8_t bcch_f_nc6_hi
Definition: gsm_04_08.h:168
Definition: gsm_04_08.h:1104
Definition: gsm_04_08.h:1764
static uint8_t gsm48_hdr_msg_type_r98(const struct gsm48_hdr *hdr)
Definition: gsm_04_08.h:1302
Definition: gsm_04_08.h:2011
Definition: gsm_04_08.h:1127
uint8_t rr_cause
Definition: gsm_04_08.h:1232
GSM FR V1 (GSM FR)
Definition: gsm_04_08.h:1972
uint8_t power_level
Definition: gsm_04_08.h:97
uint8_t w4_hi
Definition: gsm_04_08.h:197
Definition: gsm_04_08.h:1899
uint8_t w8_hi
Definition: gsm_04_08.h:203
uint8_t ps_cap
Definition: gsm_04_08.h:120
Definition: gsm_04_08.h:1731