1 /* packet-gsm_rlcmac.h
2  * Definitions for GSM RLC MAC control plane message dissection in wireshark.
3  * TS 44.060 and 24.008
4  * By Vincent Helfre, based on original code by Jari Sassi
5  * with the gracious authorization of STE
6  * Copyright (c) 2011 ST-Ericsson
7  *
8  * Wireshark - Network traffic analyzer
9  * By Gerald Combs <gerald@wireshark.org>
10  * Copyright 1998 Gerald Combs
11  *
12  * SPDX-License-Identifier: GPL-2.0-or-later
13  */
14 
15 #ifndef __PACKET_GSM_RLCMAC_H__
16 #define __PACKET_GSM_RLCMAC_H__
17 
18 #ifndef PRE_PACKED
19 #define PRE_PACKED
20 #endif
21 
22 #ifndef POST_PACKED
23 #define POST_PACKED
24 #endif
25 
26 #define GSM_RLC_MAC_MAGIC_NUMBER  0x67707273
27 
28 typedef guint8 TFI_t;
29 
30 typedef guint8 N32_t;
31 typedef guint8 N51_t;
32 typedef guint8 N26_t;
33 
34 /*  Starting Time IE as specified in 04.08 */
35 typedef struct
36 {
37   N32_t N32;  /* 04.08 refers to T1' := (FN div 1326) mod 32 */
38   N51_t N51;  /* 04.08 refers to T3 := FN mod 51 */
39   N26_t N26;  /* 04.08 refers to T2 := FN mod 26 */
40 } StartingTime_t;
41 
42 typedef struct
43 {
44   guint8 UnionType;/* UnionType is index */
45   union
46   {
47     guint8 UPLINK_TFI;
48     guint8 DOWNLINK_TFI;
49   } u;
50 } Global_TFI_t;
51 
52 typedef struct
53 {
54   guint8 UnionType;
55   union
56   {
57     StartingTime_t StartingTime;
58     guint16 k;
59   } u;
60 } Starting_Frame_Number_t;
61 
62 typedef struct
63 {
64   guint8 FINAL_ACK_INDICATION;
65   guint8 STARTING_SEQUENCE_NUMBER;
66   guint8 RECEIVED_BLOCK_BITMAP[64/8];
67 } Ack_Nack_Description_t;
68 
69 
70 typedef struct
71 {
72   guint8 Exist_TIMING_ADVANCE_VALUE;
73   guint8 TIMING_ADVANCE_VALUE;
74 
75   guint8 Exist_IndexAndtimeSlot;
76   guint8 TIMING_ADVANCE_INDEX;
77   guint8 TIMING_ADVANCE_TIMESLOT_NUMBER;
78 } Packet_Timing_Advance_t;
79 
80 typedef struct
81 {
82   guint8 ALPHA;
83 
84   struct
85   {
86     guint8 Exist;
87     guint8 GAMMA_TN;
88   } Slot[8];
89 } Power_Control_Parameters_t;
90 
91 typedef struct
92 {
93   guint8 ALPHA;
94   guint8 T_AVG_W;
95   guint8 T_AVG_T;
96   guint8 Pb;
97   guint8 PC_MEAS_CHAN;
98   guint8 INT_MEAS_CHANNEL_LIST_AVAIL;
99   guint8 N_AVG_I;
100 } Global_Power_Control_Parameters_t;
101 
102 typedef struct
103 {
104   guint8 Exist_TIMING_ADVANCE_VALUE;
105   guint8 TIMING_ADVANCE_VALUE;
106 
107   guint8 Exist_UPLINK_TIMING_ADVANCE;
108   guint8 UPLINK_TIMING_ADVANCE_INDEX;
109   guint8 UPLINK_TIMING_ADVANCE_TIMESLOT_NUMBER;
110 
111   guint8 Exist_DOWNLINK_TIMING_ADVANCE;
112   guint8 DOWNLINK_TIMING_ADVANCE_INDEX;
113   guint8 DOWNLINK_TIMING_ADVANCE_TIMESLOT_NUMBER;
114 } Global_Packet_Timing_Advance_t;
115 
116 
117 typedef struct
118 {
119   guint8 C_VALUE;
120   guint8 RXQUAL;
121   guint8 SIGN_VAR;
122 
123   struct
124   {
125     guint8 Exist;
126     guint8 I_LEVEL_TN;
127   } Slot[8];
128 } Channel_Quality_Report_t;
129 
130 typedef enum
131 {
132   RLC_MODE_ACKNOWLEDGED = 0,
133   RLC_MODE_UNACKNOWLEDGED = 1
134 } RLC_MODE_t;
135 
136 typedef struct
137 {
138   guint8 PEAK_THROUGHPUT_CLASS;
139   guint8 RADIO_PRIORITY;
140   RLC_MODE_t RLC_MODE;
141   guint8 LLC_PDU_TYPE;
142   guint16 RLC_OCTET_COUNT;
143 } Channel_Request_Description_t;
144 
145 typedef struct
146 {
147   guint16 RANDOM_ACCESS_INFORMATION;
148   guint8 FRAME_NUMBER[2];
149 } Packet_Request_Reference_t;
150 
151 typedef PRE_PACKED struct
152 {
153   guint8 nsapi;
154   guint8 value;
155 } Receive_N_PDU_Number_t POST_PACKED;
156 
157 typedef PRE_PACKED struct
158 {
159   guint8 IEI;
160   guint8 Length;
161 
162   guint8 Count_Receive_N_PDU_Number;
163   Receive_N_PDU_Number_t Receive_N_PDU_Number[11];
164 } Receive_N_PDU_Number_list_t POST_PACKED;
165 
166 /** IMSI length */
167 #define IMSI_LEN  9
168 
169 /** TMSI length */
170 #define TMSI_LEN  4
171 
172 typedef  struct
173 {
174   guint8 MCC1;
175   guint8 MCC2;
176   guint8 MCC3;
177   guint8 MNC3;
178   guint8 MNC1;
179   guint8 MNC2;
180 } PLMN_t;
181 
182 
183 /** This type is used to describe LAI codes */
184 typedef PRE_PACKED struct
185 {
186   PLMN_t  PLMN;
187   guint16  LAC;
188 } LAI_t POST_PACKED;
189 
190 
191 /** Length of LAI */
192 #define LAI_LEN  (sizeof(LAI_t))
193 
194 typedef struct
195 {
196   guint8       TMSI[TMSI_LEN];
197 } TMSI_t;
198 
199 typedef guint16 CellId_t;
200 
201 
202 #define CKSN_NOT_VALID                7
203 
204 #define IMEI_LEN                      9
205 
206 #define IMEISV_LEN                    10
207 
208 #define MAX_ELEMENTS_IN_EQPLMN_LIST   16
209 
210 
211 typedef struct
212 {
213   guint8 NUMBER_CELLS;
214   guint8 CCN_SUPPORTED[16];  /* bit (1), max size: 16 x 8 => 128 bits */
215 } CCN_Support_Description_t;
216 
217 typedef struct
218 {
219   guint8 UnionType;
220   union
221   {
222     guint8 LSA_ID;
223     guint8 ShortLSA_ID;
224   } u;
225 } LSA_ID_Info_Element_t;
226 
227 #define LSA_ID_INFO_ELEMENTS_MAX (16)
228 
229 typedef struct
230 {
231   guint8 Count_LSA_ID_Info_Element;
232   LSA_ID_Info_Element_t LSA_ID_Info_Elements[LSA_ID_INFO_ELEMENTS_MAX];
233 } LSA_ID_Info_t;
234 
235 #define NR_OF_FREQ_OR_CELLS_MAX (32)
236 
237 typedef struct
238 {
239   guint8 NR_OF_FREQ_OR_CELLS;
240   LSA_ID_Info_t LSA_ID_Info[NR_OF_FREQ_OR_CELLS_MAX];
241 } LSA_Parameters_t;
242 
243 #define MAX_REPORT_PRIORITY_CELLS (16)
244 
245 typedef struct
246 {
247   guint8 NUMBER_CELLS;
248   guint8 REPORT_PRIORITY[MAX_REPORT_PRIORITY_CELLS];
249 } ReportPriority_t;
250 
251 typedef ReportPriority_t GPRSReportPriority_t;
252 
253 typedef struct
254 {
255   guint8 REPORTING_OFFSET;
256   guint8 REPORTING_THRESHOLD;
257 } OffsetThreshold_t;
258 
259 
260 typedef struct
261 {
262   guint8             Exist_MULTI_BAND_REPORTING;
263   guint8             MULTI_BAND_REPORTING;
264 
265   guint8             Exist_SERVING_BAND_REPORTING;
266   guint8             SERVING_BAND_REPORTING;
267 
268   /* Warning:
269    *
270    * SI2quater, MI, PMO, and PCCO always specify Scale Ord.  There is no
271    * "exist SCALE_ORD" bit in the CSN.1 descriptions for these messages.
272    * However, this struct is shared with the PSI5 message which may or may
273    * not specify SCALE_ORD, thus necessitating the inclusion of member
274    * Exist_SCALE_ORD in the struct.  This member is never set for SI2quater, MI,
275    * PMO, and PCCO so to check it (in these cases) would be erroneous.
276    */
277   guint8             Exist_SCALE_ORD;
278   guint8             SCALE_ORD;
279 
280   guint8             Exist_OffsetThreshold900;
281   OffsetThreshold_t OffsetThreshold900;
282 
283   guint8             Exist_OffsetThreshold1800;
284   OffsetThreshold_t OffsetThreshold1800;
285 
286   guint8             Exist_OffsetThreshold400;
287   OffsetThreshold_t OffsetThreshold400;
288 
289   guint8             Exist_OffsetThreshold1900;
290   OffsetThreshold_t OffsetThreshold1900;
291 
292   guint8             Exist_OffsetThreshold850;
293   OffsetThreshold_t OffsetThreshold850;
294 
295 } MeasurementParams_t;
296 
297 typedef struct
298 {
299   guint8 Exist_FDD_REPORTING_THRESHOLD_2;
300   guint8 FDD_REPORTING_THRESHOLD_2;
301 } GPRS_AdditionalMeasurementParams3G_t;
302 
303 
304 typedef struct
305 {
306   guint8 NETWORK_CONTROL_ORDER;
307 
308   guint8 Exist_NC;
309   guint8 NC_NON_DRX_PERIOD;
310   guint8 NC_REPORTING_PERIOD_I;
311   guint8 NC_REPORTING_PERIOD_T;
312 } NC_Measurement_Parameters_t;
313 
314 
315 /*
316 **========================================================================
317 **  Global types
318 **========================================================================
319 */
320 
321 struct MobileId     /* Mobile id, -> TMSI, IMEI or IMSI */
322 {
323   guint8 Length;
324   guint8 IdType;
325   guint8 OddEven;
326   guint8 Dig1;
327   union
328   {
329     unsigned char TMSI[TMSI_LEN];
330     unsigned char IMEI[IMEI_LEN - 2];
331     unsigned char IMSI[IMEI_LEN - 2];
332     unsigned char IMEISV[IMEISV_LEN - 2];
333   } Id;
334 };
335 
336 #if 0
337 struct OV_MobileId    /* Struct for optional mobile identity */
338 {
339   unsigned char   IEI;
340   struct MobileId MV;
341 };
342 
343 #define LAC_INVALID 0xFEFF
344 
345 typedef enum
346 {
347   LAI_PRIORITY_AVAILABLE,
348   LAI_PRIORITY_FORBIDDEN,
349   LAI_PRIORITY_FORCED
350 } LAI_Priority_t;
351 
352 typedef enum
353 {
354   NOM_I,
355   NOM_II,
356   NOM_III,
357   NOM_GSM,
358   NOM_PS_ONLY,
359   NOM_UNKNOWN
360 } NMO_t;
361 
362 typedef enum
363 {
364   COMBINED,
365   NOT_COMBINED,
366   SAME_AS_BEFORE
367 } ProcedureMode_t;
368 
369 typedef struct
370 {
371   guint8               Cause;
372   LAI_t               LAI;
373   struct OV_MobileId  MobileId;
374 } CombinedResult_t;
375 
376 typedef enum
377 {
378   R97,
379   R99
380 } MSCR_t, SGSNR_t;
381 
382 typedef struct
383 {
384   guint8    NbrOfElements;
385   PLMN_t   Element[MAX_ELEMENTS_IN_EQPLMN_LIST];
386 } EqPLMN_List_t;
387 #endif
388 
389 #define MAX_PCCCH                       16
390 #define MAX_RFL_LENGTH                  16 /* length of RFL in PSI2 */
391 #define MAX_RFLS                         4 /* Max number of RFLs */
392 #define MAX_MA_LISTS_IN_PSI2             8 /* MAX MA lists = 8 */
393 #define MAX_ALLOCATION_BITMAP_LENGTH   128 /* max length of Fixed Allocation bitmap in BITS (2^7) */
394 #define MAX_VAR_LENGTH_BITMAP_LENGTH   176 /* max length ever possible for variable length fixed allocation bitmap */
395 
396 
397 typedef struct
398 {
399   guint8 MA_LENGTH;/* =(MA_BitLength +7) MA_BitLength_ converted to bytes */
400   guint8 MA_BITMAP[(63+1)/8];/* : bit (val (MA_LENGTH) + 1) > */
401   /* The above should not change order! */
402   guint8 MA_BitLength;
403 } MobileAllocation_t;
404 
405 typedef struct
406 {
407   guint8 ElementsOf_ARFCN_INDEX;
408   guint8 ARFCN_INDEX[16];
409 } ARFCN_index_list_t;
410 
411 typedef struct
412 {
413   guint8 HSN;
414 
415   guint8 ElementsOf_RFL_NUMBER;
416   guint8 RFL_NUMBER[4];
417 
418   guint8 UnionType;
419   union
420   {
421     MobileAllocation_t MA;
422     ARFCN_index_list_t ARFCN_index_list;
423   } u;
424 } GPRS_Mobile_Allocation_t;
425 
426 /* < EGPRS Ack/Nack Description >
427  * CRBB - Compressed Received Blocks Bitmap
428  * URBB - Uncompressed Received Blocks Bitmap
429  */
430 #define EGPRS_ACK_NACK_MAX_BITS 0x0FF /* 255 bits/32 bytes */
431 #define CRBB_MAX_BITS           0x07F /* 127 bits/16 bytes */
432 #define URBB_MAX_BITS           0x150 /* 336 bits/42 bytes */
433 
434 typedef struct
435 {
436   guint8   FINAL_ACK_INDICATION;
437   guint8   BEGINNING_OF_WINDOW;
438   guint8   END_OF_WINDOW;
439   guint16  STARTING_SEQUENCE_NUMBER;
440 
441   gboolean Exist_CRBB;
442   guint8   CRBB_LENGTH;
443   guint8   CRBB_STARTING_COLOR_CODE;
444   guint8   CRBB[CRBB_MAX_BITS/8 + 1];
445 
446   guint16  URBB_LENGTH;
447   guint8   URBB[URBB_MAX_BITS/8];
448 } EGPRS_AckNack_Desc_t;
449 
450 typedef struct
451 {
452   guint8   UnionType;
453   EGPRS_AckNack_Desc_t Desc;
454 } EGPRS_AckNack_t;
455 
456 typedef struct
457 {
458   guint8   LENGTH;
459   EGPRS_AckNack_Desc_t Desc;
460 } EGPRS_AckNack_w_len_t;
461 
462 
463 /* <P1 Rest Octets>
464  * <P2 Rest Octets>
465  */
466 #if 0
467 #define  SF_VBS  0   /* VBS (broadcast call reference) */
468 #define  SF_VGCS  1  /* VGCS (group call reference) */
469 
470 #define  AF_AckIsNotRequired  0  /* acknowledgement is not required */
471 #define  AF_AckIsRequired     1  /* acknowledgement is required */
472 #endif
473 
474 typedef struct
475 {
476   guint32 value;
477   guint8 SF;
478   guint8 AF;
479   guint8 call_priority;
480   guint8 Ciphering_information;
481 } Group_Call_Reference_t;
482 
483 /* Mobile allocation is coded differently but uses the same type! */
484 typedef struct
485 {
486   guint8 Length;
487   guint8 MA[8];
488 } MobileAllocationIE_t;
489 
490 typedef struct
491 {
492   guint8 UnionType;
493   union
494   {
495     MobileAllocationIE_t MA;
496     guint8 Frequency_Short_List[64/8];
497   } u;
498 } MobileAllocation_or_Frequency_Short_List_t;
499 
500 typedef struct
501 {
502   guint8 spare;
503   guint16 ARFCN;
504 } SingleRFChannel_t;
505 
506 typedef struct
507 {
508   guint8 MAIO;
509   guint8 HSN;
510 } RFHoppingChannel_t;
511 
512 typedef struct
513 {
514   guint8 Channel_type_and_TDMA_offset;
515   guint8 TN;
516   guint8 TSC;
517 
518   guint8 UnionType;
519   union
520   {
521     SingleRFChannel_t SingleRFChannel;
522     RFHoppingChannel_t RFHoppingChannel;
523   } u;
524 } Channel_Description_t;
525 
526 typedef struct
527 {
528   Channel_Description_t Channel_Description;
529 
530   guint8 Exist_Hopping;
531   MobileAllocation_or_Frequency_Short_List_t MA_or_Frequency_Short_List;
532 
533 } Group_Channel_Description_t;
534 
535 typedef struct
536 {
537   Group_Call_Reference_t Group_Call_Reference;
538 
539   guint8 Exist_Group_Channel_Description;
540   Group_Channel_Description_t Group_Channel_Description;
541 } Group_Call_information_t;
542 
543 typedef struct
544 {
545   guint8 Exist_NLN_PCH_and_NLN_status;
546   guint8 NLN_PCH;
547   guint8 NLN_status;
548 
549   guint8 Exist_Priority1;
550   guint8 Priority1;
551 
552   guint8 Exist_Priority2;
553   guint8 Priority2;
554 
555   guint8 Exist_Group_Call_information;
556   Group_Call_information_t Group_Call_information;
557 
558   guint8 Packet_Page_Indication_1;
559   guint8 Packet_Page_Indication_2;
560 } P1_Rest_Octets_t;
561 
562 typedef struct
563 {
564   guint8 Exist_CN3;
565   guint8 CN3;
566 
567   guint8 Exist_NLN_and_status;
568   guint8 NLN;
569   guint8 NLN_status;
570 
571   guint8 Exist_Priority1;
572   guint8 Priority1;
573 
574   guint8 Exist_Priority2;
575   guint8 Priority2;
576 
577   guint8 Exist_Priority3;
578   guint8 Priority3;
579 
580   guint8 Packet_Page_Indication_3;
581 } P2_Rest_Octets_t;
582 
583 /* <IA Rest Octets> incl additions for R99 and EGPRS */
584 
585 typedef struct
586 {
587   guint8 USF;
588   guint8 USF_GRANULARITY;
589 
590   guint8 Exist_P0_PR_MODE;
591   guint8 P0;
592   guint8 PR_MODE;
593 } DynamicAllocation_t;
594 
595 typedef struct
596 {
597   gboolean Exist_ALPHA;
598   guint8   ALPHA;
599 
600   guint8   GAMMA;
601   StartingTime_t TBF_STARTING_TIME;
602   guint8   NR_OF_RADIO_BLOCKS_ALLOCATED;
603 
604   gboolean Exist_P0_BTS_PWR_CTRL_PR_MODE;
605   guint8   P0;
606   guint8   BTS_PWR_CTRL_MODE;
607   guint8   PR_MODE;
608 } EGPRS_TwoPhaseAccess_t;
609 
610 typedef struct
611 {
612   guint8 TFI_ASSIGNMENT;
613   guint8 POLLING;
614 
615   guint8 UnionType;
616   union
617   {
618     DynamicAllocation_t DynamicAllocation;
619     guint8               FixedAllocationDummy;   /* Fixed Allocation was removed */
620   } Allocation;
621 
622   guint8   EGPRS_CHANNEL_CODING_COMMAND;
623   guint8   TLLI_BLOCK_CHANNEL_CODING;
624 
625   gboolean Exist_BEP_PERIOD2;
626   guint8   BEP_PERIOD2;
627 
628   guint8   RESEGMENT;
629   guint8   EGPRS_WindowSize;
630 
631   gboolean Exist_ALPHA;
632   guint8   ALPHA;
633 
634   guint8   GAMMA;
635 
636   gboolean Exist_TIMING_ADVANCE_INDEX;
637   guint8   TIMING_ADVANCE_INDEX;
638 
639   gboolean            Exist_TBF_STARTING_TIME;
640   StartingTime_t TBF_STARTING_TIME;
641 } EGPRS_OnePhaseAccess_t;
642 
643 #define MAX_ACCESS_TECHOLOGY_TYPES 12
644 
645 typedef struct
646 {
647   guint8 ExtendedRA;
648 
649   guint8 NrOfAccessTechnologies;
650   guint8 AccessTechnologyType[MAX_ACCESS_TECHOLOGY_TYPES];
651 
652   guint8 UnionType;
653   union
654   {
655     EGPRS_TwoPhaseAccess_t TwoPhaseAccess; /* 04.18/10.5.2.16 Multiblock allocation */
656     EGPRS_OnePhaseAccess_t OnePhaseAccess; /* 04.60/10.5.2.16 TFI using Dynamic or Fixed Allocation */
657   } Access;
658 } IA_EGPRS_00_t;
659 
660 typedef struct
661 {
662   guint8           UnionType;
663   union
664   {
665     IA_EGPRS_00_t IA_EGPRS_PUA; /* 00 < EGPRS Packet Uplink Assignment >*/
666     guint8         IA_EGPRS_01;  /* 01 reserved for future use */
667     guint8         IA_EGPRS_1;   /* 1  reserved for future use */
668   } u;
669 } IA_EGPRS_t;
670 
671 typedef struct
672 {
673   guint8 Length;
674   guint8 MAIO;
675   guint8 MobileAllocation[62];
676 } IA_FreqParamsBeforeTime_t;
677 
678 typedef struct
679 {
680   gboolean Exist_ALPHA;
681   guint8   ALPHA;
682 
683   guint8   GAMMA;
684   guint8   R97_CompatibilityBits;
685   StartingTime_t TBF_STARTING_TIME;
686 
687   gboolean Exist_P0_BTS_PWR_CTRL_PR_MODE;
688   guint8   P0;
689   guint8   BTS_PWR_CTRL_MODE;
690   guint8   PR_MODE;
691 } GPRS_SingleBlockAllocation_t;
692 
693 typedef struct
694 {
695   guint8 TFI_ASSIGNMENT;
696   guint8 POLLING;
697 
698   guint8 UnionType;
699   union
700   {
701     DynamicAllocation_t DynamicAllocation;
702     guint8               FixedAllocationDummy;
703   } Allocation;
704 
705   guint8              CHANNEL_CODING_COMMAND;
706   guint8              TLLI_BLOCK_CHANNEL_CODING;
707 
708   guint8              Exist_ALPHA;
709   guint8              ALPHA;
710 
711   guint8              GAMMA;
712 
713   guint8              Exist_TIMING_ADVANCE_INDEX;
714   guint8              TIMING_ADVANCE_INDEX;
715 
716   guint8              Exist_TBF_STARTING_TIME;
717   StartingTime_t TBF_STARTING_TIME;
718 } GPRS_DynamicOrFixedAllocation_t;
719 
720 typedef struct
721 {
722   gboolean Exist_ExtendedRA;
723   guint8   ExtendedRA;
724 } PU_IA_AdditionsR99_t;
725 
726 typedef struct
727 {
728   guint8 UnionType;
729   union
730   {
731     GPRS_SingleBlockAllocation_t    SingleBlockAllocation;
732     GPRS_DynamicOrFixedAllocation_t DynamicOrFixedAllocation;
733   } Access;
734 
735   gboolean               Exist_AdditionsR99;
736   PU_IA_AdditionsR99_t  AdditionsR99;
737 } Packet_Uplink_ImmAssignment_t;
738 
739 typedef struct
740 {
741   guint8   EGPRS_WindowSize;
742   guint8   LINK_QUALITY_MEASUREMENT_MODE;
743 
744   gboolean Exist_BEP_PERIOD2;
745   guint8   BEP_PERIOD2;
746 } PD_IA_AdditionsR99_t;
747 
748 typedef struct
749 {
750   guint32               TLLI;
751 
752   guint8                Exist_TFI_to_TA_VALID;
753   guint8                TFI_ASSIGNMENT;
754   guint8                RLC_MODE;
755   guint8                Exist_ALPHA;
756   guint8                ALPHA;
757   guint8                GAMMA;
758   guint8                POLLING;
759   guint8                TA_VALID;
760 
761   guint8                Exist_TIMING_ADVANCE_INDEX;
762   guint8                TIMING_ADVANCE_INDEX;
763 
764   guint8                Exist_TBF_STARTING_TIME;
765   StartingTime_t       TBF_STARTING_TIME;
766 
767   guint8                Exist_P0_PR_MODE;
768   guint8                P0;
769   guint8                BTS_PWR_CTRL_MODE;
770   guint8                PR_MODE;
771 
772   gboolean              Exist_AdditionsR99;
773   PD_IA_AdditionsR99_t AdditionsR99;
774 } Packet_Downlink_ImmAssignment_t;
775 
776 typedef struct
777 {
778   gboolean Exist_SecondPart;
779 
780   gboolean Exist_ExtendedRA;
781   guint8   ExtendedRA;
782 } Second_Part_Packet_Assignment_t;
783 
784 typedef struct
785 {
786   guint8 UnionType;
787   union
788   {
789     Packet_Uplink_ImmAssignment_t   Packet_Uplink_ImmAssignment;
790     Packet_Downlink_ImmAssignment_t Packet_Downlink_ImmAssignment;
791   } ul_dl;
792 } IA_PacketAssignment_UL_DL_t;
793 
794 typedef struct
795 {
796   guint8 UnionType;
797   union
798   {
799     IA_PacketAssignment_UL_DL_t     UplinkDownlinkAssignment;
800     Second_Part_Packet_Assignment_t Second_Part_Packet_Assignment;
801   } u;
802 } IA_PacketAssignment_t;
803 
804 #if 0
805 typedef struct
806 {
807   guint8 UnionType;
808   union
809   {
810     IA_FreqParamsBeforeTime_t IA_FrequencyParams;
811     IA_PacketAssignment_t     IA_PacketAssignment;
812   } u;
813 } IA_GPRS_t;
814 
815 typedef struct
816 {
817   guint8 UnionType;
818   union
819   {
820     IA_EGPRS_t IA_EGPRS_Struct;
821     IA_GPRS_t  IA_GPRS_Struct;
822   } u;
823 } IA_t;
824 
825 
826 /* <IAR Rest Octets> ref: 04.18/10.5.2.17 */
827 typedef struct
828 {
829   guint8 Exist_ExtendedRA;
830   guint8 ExtendedRA;
831 } ExtendedRA_Info_t;
832 
833 typedef ExtendedRA_Info_t ExtendedRA_Info_Array_t[4];
834 
835 typedef struct
836 {
837   ExtendedRA_Info_Array_t ExtendedRA_Info;
838 } IAR_t;
839 #endif
840 
841 /* Packet Polling Request */
842 typedef struct
843 {
844   guint8 UnionType;
845   union
846   {
847     Global_TFI_t Global_TFI;
848     guint32 TLLI;
849     guint16 TQI;
850   } u;
851 } PacketPollingID_t;
852 
853 typedef struct
854 {
855   guint8 MESSAGE_TYPE;
856   guint8 PAGE_MODE;
857   PacketPollingID_t ID;
858   guint8 TYPE_OF_ACK;
859 } Packet_Polling_Request_t;
860 
861 /* < SI 13 Rest Octets > */
862 #define MAX_EXTENSION_LENGTH_IN_BYTES (8) /* max value = 64 (coded on 6 bits) */
863 
864 typedef struct
865 {
866   guint8 extension_length;
867   guint8 Extension_Info[MAX_EXTENSION_LENGTH_IN_BYTES];/* ( val (extension length)+1 ) 04.60/12.26 */
868 } Extension_Bits_t;
869 
870 #if 0
871 typedef struct
872 {
873   guint8 DTM_SUPPORT                  : 1;
874   guint8 PFC_FEATURE_MODE             : 1;
875   guint8 BEP_PERIOD                   : 4;
876   guint8 EGPRS_PACKET_CHANNEL_REQUEST : 1;
877   guint8 EGPRS_Support                  : 1;
878 
879   guint8 NotUsed                        : 3;
880   guint8 EXT_UTBF_NODATA              : 1;
881   guint8 MULTIPLE_TBF_CAPABILITY      : 1;
882   guint8 NW_EXT_UTBF                  : 1;
883   guint8 CCN_ACTIVE                   : 1;
884   guint8 BSS_PAGING_COORDINATION      : 1;
885 } GPRS_ExtensionInfoWithEGPRS_t;
886 
887 typedef struct
888 {
889   guint8 EXT_UTBF_NODATA         : 1;
890   guint8 MULTIPLE_TBF_CAPABILITY : 1;
891   guint8 NW_EXT_UTBF             : 1;
892   guint8 CCN_ACTIVE              : 1;
893   guint8 BSS_PAGING_COORDINATION : 1;
894   guint8 DTM_SUPPORT             : 1;
895   guint8 PFC_FEATURE_MODE        : 1;
896   guint8 EGPRS_Support             : 1;
897 } GPRS_ExtensionInfoWithoutEGPRS_t;
898 
899 typedef struct
900 {
901   guint8 NotUsed                   : 7;
902   guint8 EGPRS_Support             : 1;
903 } EGPRS_Support_t;
904 
905 typedef struct
906 {
907   guint8 ECSC    : 1;
908   guint8 ECSR_3G : 1;
909 } NonGPRS_ExtensionInfo_t;
910 
911 typedef struct
912 {
913   guint8 Extension_Length;
914   union
915   {
916     EGPRS_Support_t                  EGPRS_Support;
917     GPRS_ExtensionInfoWithEGPRS_t    GPRS_ExtensionInfoWithEGPRS;
918     GPRS_ExtensionInfoWithoutEGPRS_t GPRS_ExtensionInfoWithoutEGPRS;
919     NonGPRS_ExtensionInfo_t          NonGPRS_ExtensionInfo;
920     guint8                           Extension_Information[MAX_EXTENSION_LENGTH_IN_BYTES];
921   } u;
922 } Optional_Extension_Information_t;
923 
924 typedef struct
925 {
926   gboolean EGPRS_Support;
927   guint8   BEP_PERIOD;
928   gboolean EGPRS_PACKET_CHANNEL_REQUEST;
929 } EGPRS_OptionalExtensionInformation_t;
930 #endif
931 
932 typedef struct
933 {
934   guint8 NMO;
935   guint8 T3168;
936   guint8 T3192;
937   guint8 DRX_TIMER_MAX;
938   guint8 ACCESS_BURST_TYPE;
939   guint8 CONTROL_ACK_TYPE;
940   guint8 BS_CV_MAX;
941 
942   guint8 Exist_PAN;
943   guint8 PAN_DEC;
944   guint8 PAN_INC;
945   guint8 PAN_MAX;
946 
947   guint8 Exist_Extension_Bits;
948   Extension_Bits_t Extension_Bits;
949 } GPRS_Cell_Options_t;
950 
951 typedef struct
952 {
953   guint8 ALPHA;
954   guint8 T_AVG_W;
955   guint8 T_AVG_T;
956   guint8 PC_MEAS_CHAN;
957   guint8 N_AVG_I;
958 } GPRS_Power_Control_Parameters_t;
959 
960 typedef struct
961 {
962   guint8 RAC;
963   guint8 SPGC_CCCH_SUP;
964   guint8 PRIORITY_ACCESS_THR;
965   guint8 NETWORK_CONTROL_ORDER;
966   GPRS_Cell_Options_t GPRS_Cell_Options;
967   GPRS_Power_Control_Parameters_t GPRS_Power_Control_Parameters;
968 } PBCCH_Not_present_t;
969 
970 typedef struct
971 {
972   guint8 Pb;
973   guint8 TSC;
974   guint8 TN;
975 
976   guint8 UnionType;
977   union
978   {
979     guint8 dummy;
980     guint16 ARFCN;
981     guint8 MAIO;
982   } u;
983 } PBCCH_Description_t;
984 
985 typedef struct
986 {
987   guint8 PSI1_REPEAT_PERIOD;
988   PBCCH_Description_t PBCCH_Description;
989 } PBCCH_present_t;
990 
991 
992 
993 /* < Packet TBF Release message content > */
994 typedef guint8 TBF_RELEASE_CAUSE_t;
995 #if 0
996 #define  TBF_RELEASE_CAUSE_NORMAL (0x00)
997 #define  TBF_RELEASE_CAUSE_ABNORMAL (0x02)
998 #endif
999 
1000 typedef struct
1001 {
1002   guint8               MESSAGE_TYPE;
1003   guint8               PAGE_MODE;
1004   Global_TFI_t         Global_TFI;
1005   guint8               UPLINK_RELEASE;
1006   guint8               DOWNLINK_RELEASE;
1007   TBF_RELEASE_CAUSE_t TBF_RELEASE_CAUSE;
1008 } Packet_TBF_Release_t;
1009 
1010 /* < Packet Control Acknowledgement message content > */
1011 typedef struct
1012 {
1013   guint8  Exist_CTRL_ACK_Extension;
1014   guint16 CTRL_ACK_Extension;
1015 } Packet_Control_Acknowledgement_AdditionsR6_t;
1016 
1017 typedef struct
1018 {
1019   guint8 Exist_TN_RRBP;
1020   guint8 TN_RRBP;
1021   guint8 Exist_G_RNTI_Extension;
1022   guint8 G_RNTI_Extension;
1023   gboolean Exist_AdditionsR6;
1024   Packet_Control_Acknowledgement_AdditionsR6_t AdditionsR6;
1025 } Packet_Control_Acknowledgement_AdditionsR5_t;
1026 
1027 typedef struct
1028 {  /* Mac header */
1029   guint8 MESSAGE_TYPE;
1030   guint8 PayloadType;
1031   guint8 spare;
1032   guint8 R;
1033 
1034   guint32 TLLI;
1035   guint8 CTRL_ACK;
1036   gboolean Exist_AdditionsR5;
1037   Packet_Control_Acknowledgement_AdditionsR5_t AdditionsR5;
1038 } Packet_Control_Acknowledgement_t;
1039 
1040 typedef Packet_Control_Acknowledgement_t Packet_Ctrl_Ack_t;
1041 
1042 #if 0
1043 typedef struct
1044 {
1045   guint8 CTRL_ACK;
1046 } Packet_Control_Acknowledgement_11_bit_t, Packet_Control_Acknowledgement_8_bit_t;
1047 #endif
1048 
1049 /* < Packet Downlink Dummy Control Block message content > */
1050 typedef struct
1051 {
1052   guint8 MESSAGE_TYPE;
1053   guint8 PAGE_MODE;
1054 
1055   guint8 Exist_PERSISTENCE_LEVEL;
1056   guint8 PERSISTENCE_LEVEL[4];
1057 } Packet_Downlink_Dummy_Control_Block_t;
1058 
1059 /* < Packet Uplink Dummy Control Block message content > */
1060 typedef struct
1061 { /* Mac header */
1062   guint8 MESSAGE_TYPE;
1063   guint8 PayloadType;
1064   guint8 spare;
1065   guint8 R;
1066 
1067   guint32 TLLI;
1068 } Packet_Uplink_Dummy_Control_Block_t;
1069 
1070 /* MS Radio Access capability IE >
1071  * 24.008 (10.5.5.12a)
1072  */
1073 typedef guint8 A5_bits_t;/* <A5 bits> ::= < A5/1 : bit> <A5/2 : bit> <A5/3 : bit> <A5/4 : bit> <A5/5 : bit> <A5/6 : bit> <A5/7 : bit>; -- bits for circuit mode ciphering algorithms */
1074 
1075 typedef struct
1076 {
1077   guint8 Exist_DTM_EGPRS_multislot_class;
1078   guint8 DTM_EGPRS_multislot_class;
1079 } DTM_EGPRS_t;
1080 
1081 typedef struct
1082 {
1083   guint8 Exist_DTM_EGPRS_HighMultislotClass;
1084   guint8 DTM_EGPRS_HighMultislotClass;
1085 } DTM_EGPRS_HighMultislotClass_t;
1086 
1087 typedef struct
1088 {
1089   guint8 MultislotCapabilityReductionForDL_DualCarrier;
1090   guint8 DL_DualCarrierForDTM;
1091 } DownlinkDualCarrierCapability_r7_t;
1092 
1093 typedef struct
1094 {
1095   guint8 Exist_HSCSD_multislot_class;
1096   guint8 HSCSD_multislot_class;
1097 
1098   guint8 Exist_GPRS_multislot_class;
1099   guint8 GPRS_multislot_class;
1100   guint8 GPRS_Extended_Dynamic_Allocation_Capability;
1101 
1102   guint8 Exist_SM;
1103   guint8 SMS_VALUE;
1104   guint8 SM_VALUE;
1105 
1106 /*-------- Rel 99 additions */
1107   guint8 Exist_ECSD_multislot_class;
1108   guint8 ECSD_multislot_class;
1109 
1110   guint8 Exist_EGPRS_multislot_class;
1111   guint8 EGPRS_multislot_class;
1112   guint8 EGPRS_Extended_Dynamic_Allocation_Capability;
1113 
1114   guint8 Exist_DTM_GPRS_multislot_class;
1115   guint8 DTM_GPRS_multislot_class;
1116   guint8 Single_Slot_DTM;
1117   DTM_EGPRS_t DTM_EGPRS_Params;
1118 } Multislot_capability_t;
1119 
1120 typedef struct
1121 {
1122   guint8 RF_Power_Capability;
1123 
1124   guint8 Exist_A5_bits;
1125   A5_bits_t A5_bits;
1126   /*-- zero means that the same values apply for parameters as in the immediately preceeding Access capabilities field within this IE
1127   *-- The presence of the A5 bits is mandatory in the 1st Access capabilies struct within this IE.
1128   */
1129 
1130   guint8 ES_IND;
1131   guint8 PS;
1132   guint8 VGCS;
1133   guint8 VBS;
1134 
1135   guint8 Exist_Multislot_capability;
1136   Multislot_capability_t Multislot_capability;
1137   /* -- zero means that the same values apply for multislot parameters as in the immediately preceeding Access capabilities field within this IE.
1138    * -- The presence of the Multislot capability struct is mandatory in the 1st Access capabilites struct within this IE.
1139    */
1140   /* -------- Rel 99 additions */
1141   guint8 Exist_Eight_PSK_Power_Capability;
1142   guint8 Eight_PSK_Power_Capability;
1143 
1144   guint8 COMPACT_Interference_Measurement_Capability;
1145   guint8 Revision_Level_Indicator;
1146   guint8 UMTS_FDD_Radio_Access_Technology_Capability;
1147   guint8 UMTS_384_TDD_Radio_Access_Technology_Capability;
1148   guint8 CDMA2000_Radio_Access_Technology_Capability;
1149 
1150   /* -------- R4 additions */
1151   guint8 UMTS_128_TDD_Radio_Access_Technology_Capability;
1152   guint8 GERAN_Feature_Package_1;
1153 
1154   guint8 Exist_Extended_DTM_multislot_class;
1155   guint8 Extended_DTM_GPRS_multislot_class;
1156   guint8 Extended_DTM_EGPRS_multislot_class;
1157 
1158   guint8 Modulation_based_multislot_class_support;
1159 
1160   /* -------- R5 additions */
1161   guint8 Exist_HighMultislotCapability;
1162   guint8 HighMultislotCapability;
1163 
1164   guint8 Exist_GERAN_lu_ModeCapability;
1165   guint8 GERAN_lu_ModeCapability;
1166 
1167   guint8 GMSK_MultislotPowerProfile;
1168   guint8 EightPSK_MultislotProfile;
1169 
1170   /* -------- R6 additions */
1171   guint8 MultipleTBF_Capability;
1172   guint8 DownlinkAdvancedReceiverPerformance;
1173   guint8 ExtendedRLC_MAC_ControlMessageSegmentionsCapability;
1174   guint8 DTM_EnhancementsCapability;
1175 
1176   guint8 Exist_DTM_GPRS_HighMultislotClass;
1177   guint8 DTM_GPRS_HighMultislotClass;
1178   DTM_EGPRS_HighMultislotClass_t DTM_EGPRS_HighMultislotClass;
1179   guint8 PS_HandoverCapability;
1180 
1181   /* -------- R7 additions */
1182   guint8 DTM_Handover_Capability;
1183   guint8 Exist_DownlinkDualCarrierCapability_r7;
1184   DownlinkDualCarrierCapability_r7_t DownlinkDualCarrierCapability_r7;
1185 
1186   guint8 FlexibleTimeslotAssignment;
1187   guint8 GAN_PS_HandoverCapability;
1188   guint8 RLC_Non_persistentMode;
1189   guint8 ReducedLatencyCapability;
1190   guint8 UplinkEGPRS2;
1191   guint8 DownlinkEGPRS2;
1192 
1193   /* -------- R8 additions */
1194   guint8 EUTRA_FDD_Support;
1195   guint8 EUTRA_TDD_Support;
1196   guint8 GERAN_To_EUTRAN_supportInGERAN_PTM;
1197   guint8 PriorityBasedReselectionSupport;
1198 
1199 } Content_t;
1200 
1201 typedef enum
1202 {/* See TS 24.008 table 10.5.146 */
1203   AccTech_GSMP     = 0x0,
1204   AccTech_GSME     = 0x1,
1205   AccTech_GSMR     = 0x2,
1206   AccTech_GSM1800  = 0x3,
1207   AccTech_GSM1900  = 0x4,
1208   AccTech_GSM450   = 0x5,
1209   AccTech_GSM480   = 0x6,
1210   AccTech_GSM850   = 0x7,
1211   AccTech_GSM750   = 0x8,
1212   AccTech_GSMT830  = 0x9,
1213   AccTech_GSMT410  = 0xa,
1214   AccTech_GSMT900  = 0xb,
1215   AccTech_GSM710   = 0xc,
1216   AccTech_GSMT810  = 0xd,
1217   AccTech_GSMOther = 0xf
1218 } AccessTechnology_t;
1219 
1220 /* Maximum entries in one message, Enum above, applying restrictions from section
1221    12.30 "MS Radio Access Capability 2": */
1222 #define MAX_ACCESS_TECHNOLOGIES_COUNT 11
1223 
1224 typedef struct
1225 {
1226   AccessTechnology_t Access_Technology_Type;
1227   guint8              GMSK_Power_class;
1228   guint8              Eight_PSK_Power_class;
1229 } Additional_access_technologies_struct_t;
1230 
1231 typedef struct
1232 {
1233   guint8 Count_additional_access_technologies;
1234   /* The value 0xf cannot be set for the first ATT, therefore we can only have
1235      ABSOLUTE_MAX_BANDS-1 additional access technologies. */
1236   Additional_access_technologies_struct_t Additional_access_technologies[MAX_ACCESS_TECHNOLOGIES_COUNT-1];
1237 } Additional_access_technologies_t;
1238 
1239 typedef struct
1240 {
1241   guint8 IndexOfAccTech; /* Position in AccessTechnology_t */
1242   union
1243   {
1244     /* Long Form */
1245     Content_t                        Content;
1246     /* Short Form */
1247     Additional_access_technologies_t Additional_access_technologies;
1248   } u;
1249 } MS_RA_capability_value_t;
1250 
1251 typedef struct
1252 {
1253   guint8 Count_MS_RA_capability_value; /* Recursive */
1254   MS_RA_capability_value_t MS_RA_capability_value[MAX_ACCESS_TECHNOLOGIES_COUNT];
1255 } MS_Radio_Access_capability_t;
1256 
1257 
1258 typedef struct
1259 {
1260   guint8   ExistEDGE_RF_PwrCap1;
1261   guint8   EDGE_RF_PwrCap1;
1262   guint8   ExistEDGE_RF_PwrCap2;
1263   guint8   EDGE_RF_PwrCap2;
1264 } EDGE_RF_Pwr_t;
1265 
1266 typedef struct
1267 {
1268   guint8 A5_Bits;
1269   guint8 Arc2_Spare;
1270   guint8 Arc1;
1271 } ARC_t;
1272 
1273 typedef struct
1274 {
1275   guint8   Multiband;
1276   union
1277   {
1278     guint8 A5_Bits;
1279     ARC_t ARC;
1280   } u;
1281 } Multiband_t;
1282 
1283 typedef struct              /* MS classmark 3 R99 */
1284 {
1285   guint8         Spare1;
1286   Multiband_t   Multiband;
1287 
1288   guint8         Exist_R_Support;
1289   guint8         R_GSM_Arc;
1290 
1291   guint8         Exist_MultiSlotCapability;
1292   guint8         MultiSlotClass;
1293 
1294   guint8         UCS2;
1295   guint8         ExtendedMeasurementCapability;
1296 
1297   guint8         Exist_MS_MeasurementCapability;
1298   guint8         SMS_VALUE;
1299   guint8         SM_VALUE;
1300 
1301   guint8         Exist_MS_PositioningMethodCapability;
1302   guint8         MS_PositioningMethod;
1303 
1304   guint8         Exist_EDGE_MultiSlotCapability;
1305   guint8         EDGE_MultiSlotClass;
1306 
1307   guint8         Exist_EDGE_Struct;
1308   guint8         ModulationCapability;
1309   EDGE_RF_Pwr_t EDGE_RF_PwrCaps;
1310 
1311   guint8         Exist_GSM400_Info;
1312   guint8         GSM400_Bands;
1313   guint8         GSM400_Arc;
1314 
1315   guint8         Exist_GSM850_Arc;
1316   guint8         GSM850_Arc;
1317 
1318   guint8         Exist_PCS1900_Arc;
1319   guint8         PCS1900_Arc;
1320 
1321   guint8         UMTS_FDD_Radio_Access_Technology_Capability;
1322   guint8         UMTS_384_TDD_Radio_Access_Technology_Capability;
1323   guint8         CDMA2000_Radio_Access_Technology_Capability;
1324 
1325   guint8         Exist_DTM_GPRS_multislot_class;
1326   guint8         DTM_GPRS_multislot_class;
1327   guint8         Single_Slot_DTM;
1328   DTM_EGPRS_t   DTM_EGPRS_Params;
1329 
1330   /* -------- R4 additions */
1331   guint8         Exist_SingleBandSupport;
1332   guint8         GSM_Band;
1333 
1334   guint8         Exist_GSM_700_Associated_Radio_Capability;
1335   guint8         GSM_700_Associated_Radio_Capability;
1336 
1337   guint8         UMTS_128_TDD_Radio_Access_Technology_Capability;
1338   guint8         GERAN_Feature_Package_1;
1339 
1340   guint8         Exist_Extended_DTM_multislot_class;
1341   guint8         Extended_DTM_GPRS_multislot_class;
1342   guint8         Extended_DTM_EGPRS_multislot_class;
1343 
1344   /* -------- R5 additions */
1345   guint8         Exist_HighMultislotCapability;
1346   guint8         HighMultislotCapability;
1347 
1348   guint8         Exist_GERAN_lu_ModeCapability;
1349   guint8         GERAN_lu_ModeCapability;
1350 
1351   guint8         GERAN_FeaturePackage_2;
1352 
1353   guint8         GMSK_MultislotPowerProfile;
1354   guint8         EightPSK_MultislotProfile;
1355 
1356   /* -------- R6 additions */
1357   guint8         Exist_TGSM_400_Bands;
1358   guint8         TGSM_400_BandsSupported;
1359   guint8         TGSM_400_AssociatedRadioCapability;
1360 
1361   guint8         Exist_TGSM_900_AssociatedRadioCapability;
1362   guint8         TGSM_900_AssociatedRadioCapability;
1363 
1364   guint8         DownlinkAdvancedReceiverPerformance;
1365   guint8         DTM_EnhancementsCapability;
1366 
1367   guint8         Exist_DTM_GPRS_HighMultislotClass;
1368   guint8         DTM_GPRS_HighMultislotClass;
1369   guint8         OffsetRequired;
1370   DTM_EGPRS_HighMultislotClass_t   DTM_EGPRS_HighMultislotClass;
1371   guint8         RepeatedSACCH_Capability;
1372 
1373   guint8         Spare2;
1374 } MS_Class3_Unpacked_t;
1375 
1376 
1377 /* < Packet Resource Request message content > */
1378 typedef struct
1379 {
1380   gboolean Exist;
1381   guint8   UnionType;
1382   union
1383   {
1384     guint8 MEAN_BEP_GMSK;
1385     guint8 MEAN_BEP_8PSK;
1386   } u;
1387 } BEP_MeasurementReport_t;
1388 
1389 typedef struct
1390 {
1391   gboolean Exist;
1392   guint8   I_LEVEL;
1393 } InterferenceMeasurementReport_t;
1394 
1395 typedef struct
1396 {
1397   gboolean                 Exist_BEP_MEASUREMENTS;
1398   BEP_MeasurementReport_t BEP_MEASUREMENTS[8];
1399 
1400   gboolean                         Exist_INTERFERENCE_MEASUREMENTS;
1401   InterferenceMeasurementReport_t INTERFERENCE_MEASUREMENTS[8];
1402 } EGPRS_TimeslotLinkQualityMeasurements_t;
1403 
1404 typedef struct
1405 {
1406   gboolean Exist_MEAN_CV_BEP_GMSK;
1407   guint8   MEAN_BEP_GMSK;
1408   guint8   CV_BEP_GMSK;
1409 
1410   gboolean Exist_MEAN_CV_BEP_8PSK;
1411   guint8   MEAN_BEP_8PSK;
1412   guint8   CV_BEP_8PSK;
1413 } EGPRS_BEP_LinkQualityMeasurements_t;
1414 
1415 typedef struct{
1416 guint8  RB_ID;
1417 guint8  RADIO_PRIORITY;
1418 
1419 gboolean  Exist_RLC_BLOCK_COUNT;
1420 guint8   RLC_BLOCK_COUNT;
1421 
1422 gboolean  Exist_Iu_Mode_ChRequestDesk;
1423 //IU_Mode_Channel_Request_Desk_t IU_Mode_Channel_Request_Desk1;
1424 
1425 }IU_Mode_Channel_Request_Desk_t;
1426 
1427 typedef struct{
1428     gboolean   Exist_G_RNTI_Extension;
1429     guint8    G_RNTI_Extension;
1430     IU_Mode_Channel_Request_Desk_t  IU_Mode_Channel_Request_Desk;
1431 
1432 }IU_Mode_Channel_Request_Desk_RNTI_t;
1433 
1434 typedef struct{
1435     guint8  PFI;
1436     guint8  RADIO_PRIORITY;
1437     guint8  RLC_Mode;
1438 
1439     gboolean  Exist_LCC_PDU;
1440     guint8  LCC_PDU;
1441 
1442     gboolean Exist_Ext_Channel_Request_desc;
1443 
1444 }Ext_Channel_Request_desc_t;
1445 
1446 
1447 typedef struct{
1448     gboolean Exist_GMSK_MEAN_BEP;
1449     guint8 GMSK_MEAN_BEP;
1450     guint8 GMSK_CV_BEP;
1451 
1452     gboolean Exist_8PSK_MEAN_BEP;
1453     guint8 p8PSK_MEAN_BEP;
1454     guint8 p8PSK_CV_BEP;
1455 
1456     gboolean Exist_QPSK_MEAN_BEP;
1457     guint8 QPSK_MEAN_BEP;
1458     guint8 QPSK_CV_BEP;
1459 
1460     gboolean Exist_16QAM_NSR_MEAN_BEP;
1461     guint8 p16QAM_NSR_MEAN_BEP;
1462     guint8 p16QAM_NSR_CV_BEP;
1463 
1464     gboolean Exist_32QAM_NSR_MEAN_BEP;
1465     guint8 p32QAM_NSR_MEAN_BEP;
1466     guint8 p32QAM_NSR_CV_BEP;
1467 
1468     gboolean Exist_16QAM_HSR_MEAN_BEP;
1469     guint8 p16QAM_HSR_MEAN_BEP;
1470     guint8 p16QAM_HSR_CV_BEP;
1471 
1472     gboolean Exist_32QAM_HSR_MEAN_BEP;
1473     guint8 p32QAM_HSR_MEAN_BEP;
1474     guint8 p32QAM_HSR_CV_BEP;
1475 
1476     }EGPRS_BEP_LinkQualityMeasurements_type2_t;
1477 
1478 typedef struct
1479 {
1480     gboolean Exist;
1481     guint8 REPORTED_MODULATION;
1482     guint8 MEAN_BEP_TN;
1483 
1484 }BEP_MeasurementReport_type2_t;
1485 
1486 typedef struct
1487 {
1488     gboolean Exist;
1489     guint8 I_LEVEL;
1490 }InterferenceMeasurementReport_type2_t;
1491 
1492 typedef struct
1493 {
1494     gboolean Exist_BEP_MEASUREMENTS;
1495     BEP_MeasurementReport_type2_t BEP_MEASUREMENTS[8];
1496 
1497     gboolean Exist_INTERFERENCE_MEASUREMENTS;
1498     InterferenceMeasurementReport_type2_t INTERFERENCE_MEASUREMENTS[8];
1499 
1500 }EGPRS_TimeslotLinkQualityMeasurements_type2_t;
1501 
1502 
1503 typedef struct
1504 {
1505     gboolean Exist_Downlink_eTFI;
1506     guint8 DOWNLINK_ETFI;
1507 
1508 }PRR_AdditionsR12_t;
1509 
1510 typedef struct
1511 {
1512     guint8 LOW_ACCESS_PRIORITY_SIGNALLING;
1513 
1514     gboolean Exist_AdditionsR12;
1515     PRR_AdditionsR12_t  AdditionsR12;
1516 
1517 }PRR_AdditionsR10_t;
1518 
1519 typedef struct
1520 {
1521     guint8  EARLY_TBF_ESTABLISHMENT;
1522 
1523     gboolean Exist_EGPRS_BEP_LinkQualityMeasurements_type2;
1524     EGPRS_BEP_LinkQualityMeasurements_type2_t EGPRS_BEP_LinkQualityMeasurements_type2;
1525 
1526     gboolean Exist_EGPRS_TimeslotLinkQualityMeasurements_type2;
1527     EGPRS_TimeslotLinkQualityMeasurements_type2_t EGPRS_TimeslotLinkQualityMeasurements_type2;
1528 
1529     gboolean Exist_AdditionsR10;
1530     PRR_AdditionsR10_t AdditionsR10;
1531 
1532 }PRR_AdditionsR7_t;
1533 
1534 typedef struct
1535 {
1536     gboolean Exist_Ext_Channel_Request_desc;
1537     Ext_Channel_Request_desc_t  Ext_Channel_Request_desc;
1538 
1539     guint8 Exist_AdditionsR7;
1540     PRR_AdditionsR7_t  AdditionsR7;
1541 
1542 } PRR_AdditionsR6_t;
1543 
1544 typedef struct
1545 {
1546     guint8  Exist_Iu_Mode_ChRequestDesk;
1547     IU_Mode_Channel_Request_Desk_RNTI_t  IU_Mode_Channel_Request_Desk_RNTI;
1548 
1549     guint8  Exist_HFN_LSB;
1550     guint8    HFN_LSb;
1551 
1552     guint8  Exist_AdditionsR6;
1553     PRR_AdditionsR6_t AdditionsR6;
1554 
1555 }PRR_AdditionsR5_t;
1556 
1557 typedef struct
1558 {
1559   gboolean                                 Exist_EGPRS_BEP_LinkQualityMeasurements;
1560   EGPRS_BEP_LinkQualityMeasurements_t     EGPRS_BEP_LinkQualityMeasurements;
1561 
1562   gboolean                                 Exist_EGPRS_TimeslotLinkQualityMeasurements;
1563   EGPRS_TimeslotLinkQualityMeasurements_t EGPRS_TimeslotLinkQualityMeasurements;
1564 
1565   gboolean                                 Exist_PFI;
1566   guint8                                   PFI;
1567 
1568   guint8                                   MS_RAC_AdditionalInformationAvailable;
1569   guint8                                   RetransmissionOfPRR;
1570 
1571   guint8                                   Exist_AdditionsR5;
1572   PRR_AdditionsR5_t                        AdditionsR5;
1573 } PRR_AdditionsR99_t;
1574 
1575 typedef struct
1576 {
1577   guint8 UnionType;
1578   union
1579   {
1580     Global_TFI_t Global_TFI;
1581     guint32 TLLI;
1582   } u;
1583 } PacketResourceRequestID_t;
1584 
1585 typedef struct
1586 {
1587   guint8 MESSAGE_TYPE;
1588   guint8 PayloadType;
1589   guint8 spare;
1590   guint8 R;
1591 
1592   guint8 Exist_ACCESS_TYPE;
1593   guint8 ACCESS_TYPE;
1594 
1595   PacketResourceRequestID_t ID;
1596 
1597   guint8 Exist_MS_Radio_Access_capability2;
1598   MS_Radio_Access_capability_t MS_Radio_Access_capability2;
1599 
1600   Channel_Request_Description_t Channel_Request_Description;
1601 
1602   guint8 Exist_CHANGE_MARK;
1603   guint8 CHANGE_MARK;
1604 
1605   guint8 C_VALUE;
1606 
1607   guint8 Exist_SIGN_VAR;
1608   guint8 SIGN_VAR;
1609 
1610   InterferenceMeasurementReport_t  I_LEVEL_TN[8];
1611 
1612   guint8                            Exist_AdditionsR99;
1613   PRR_AdditionsR99_t               AdditionsR99;
1614 } Packet_Resource_Request_t;
1615 
1616 /* < Packet Mobile TBF Status message content >*/
1617 typedef struct
1618 {
1619   guint8 MESSAGE_TYPE;
1620   guint8 PayloadType;
1621   guint8 spare;
1622   guint8 R;
1623 
1624   Global_TFI_t Global_TFI;
1625   guint8 TBF_CAUSE;
1626 
1627   guint8 Exist_STATUS_MESSAGE_TYPE;
1628   guint8 STATUS_MESSAGE_TYPE;
1629 } Packet_Mobile_TBF_Status_t;
1630 
1631 /* < Packet PSI Status message content >*/
1632 typedef struct
1633 {
1634   guint8 PSI_MESSAGE_TYPE;
1635   guint8 PSIX_CHANGE_MARK;
1636   guint8 Exist_PSIX_COUNT_and_Instance_Bitmap;
1637 } PSI_Message_t;
1638 
1639 typedef struct
1640 {
1641   guint8 Count_PSI_Message;
1642   PSI_Message_t PSI_Message[10];
1643 
1644   guint8 ADDITIONAL_MSG_TYPE;
1645 } PSI_Message_List_t;
1646 
1647 typedef struct
1648 {
1649   guint8 ADDITIONAL_MSG_TYPE;
1650 } Unknown_PSI_Message_List_t;
1651 
1652 typedef struct
1653 {
1654   guint8 MESSAGE_TYPE;
1655   guint8 PayloadType;
1656   guint8 spare;
1657   guint8 R;
1658 
1659   Global_TFI_t Global_TFI;
1660   guint8 PBCCH_CHANGE_MARK;
1661 
1662   PSI_Message_List_t PSI_Message_List;
1663   Unknown_PSI_Message_List_t Unknown_PSI_Message_List;
1664 } Packet_PSI_Status_t;
1665 
1666 /* < Packet SI Status message content > */
1667 typedef struct
1668 {
1669   guint8 SI_MESSAGE_TYPE;
1670   guint8 MESS_REC;
1671   guint8 SIX_CHANGE_MARK;
1672 
1673   guint8 SIX_COUNT;
1674   guint8 Instance_bitmap[2];
1675 } SI_Message_t;
1676 
1677 typedef struct
1678 {
1679   guint8 Count_SI_Message;
1680   SI_Message_t SI_Message[10];
1681 
1682   guint8 ADDITIONAL_MSG_TYPE;
1683 } SI_Message_List_t;
1684 
1685 typedef struct
1686 {
1687   guint8 ADDITIONAL_MSG_TYPE;
1688 } Unknown_SI_Message_List_t;
1689 
1690 typedef struct
1691 {
1692   guint8 MESSAGE_TYPE;
1693   guint8 PayloadType;
1694   guint8 spare;
1695   guint8 R;
1696 
1697   Global_TFI_t Global_TFI;
1698   guint8 BCCH_CHANGE_MARK;
1699 
1700   SI_Message_List_t SI_Message_List;
1701   Unknown_SI_Message_List_t Unknown_SI_Message_List;
1702 } Packet_SI_Status_t;
1703 
1704 typedef struct
1705 {
1706   guint16 FDD_ARFCN;
1707   guint8 DIVERSITY;
1708   guint8 Exist_Bandwith_FDD;
1709   guint8 BANDWITH_FDD;
1710   guint16 SCRAMBLING_CODE;
1711 } FDD_Target_Cell_t;
1712 
1713 typedef struct
1714 {
1715   guint16 TDD_ARFCN;
1716   guint8  DIVERSITY_TDD;
1717   guint8 Exist_Bandwith_TDD;
1718   guint8  BANDWITH_TDD;
1719   guint16 CELL_PARAMETER;
1720   guint8  Sync_Case_TSTD;
1721 } TDD_Target_Cell_t;
1722 
1723 typedef struct
1724 {
1725   guint16 EARFCN;
1726   guint8 Exist_Measurement_Bandwidth;
1727   guint8 Measurement_Bandwidth;
1728   guint16 Physical_Layer_Cell_Identity;
1729 } EUTRAN_Target_Cell_t;
1730 
1731 typedef struct
1732 {
1733   guint32 UTRAN_CI;
1734   guint8 Exist_PLMN_ID;
1735   PLMN_t  PLMN_ID;
1736 } UTRAN_CSG_Target_Cell_t;
1737 
1738 typedef struct
1739 {
1740   guint32 EUTRAN_CI;
1741   guint16 Tracking_Area_Code;
1742   guint8 Exist_PLMN_ID;
1743   PLMN_t  PLMN_ID;
1744 } EUTRAN_CSG_Target_Cell_t;
1745 
1746 typedef struct
1747 {
1748   guint8 Exist_UTRAN_CSG_Target_Cell;
1749   UTRAN_CSG_Target_Cell_t UTRAN_CSG_Target_Cell;
1750   guint8 Exist_EUTRAN_CSG_Target_Cell;
1751   EUTRAN_CSG_Target_Cell_t EUTRAN_CSG_Target_Cell;
1752 } PCCF_AdditionsR9_t;
1753 
1754 typedef struct
1755 {
1756   guint8 Exist_EUTRAN_Target_Cell;
1757   EUTRAN_Target_Cell_t EUTRAN_Target_Cell;
1758   guint8 Exist_AdditionsR9;
1759   PCCF_AdditionsR9_t AdditionsR9;
1760 } PCCF_AdditionsR8_t;
1761 
1762 typedef struct
1763 {
1764   guint8 Exist_G_RNTI_extention;
1765   guint8  G_RNTI_extention;
1766   guint8 Exist_AdditionsR8;
1767   PCCF_AdditionsR8_t AdditionsR8;
1768 } PCCF_AdditionsR5_t;
1769 
1770 typedef struct
1771 {
1772   guint8 Exist_FDD_Description;
1773   FDD_Target_Cell_t FDD_Target_Cell;
1774   guint8 Exist_TDD_Description;
1775   TDD_Target_Cell_t TDD_Target_Cell;
1776   guint8 Exist_AdditionsR5;
1777   PCCF_AdditionsR5_t AdditionsR5;
1778 } PCCF_AdditionsR99_t;
1779 
1780 /* < Packet Cell Change Failure message content > */
1781 typedef struct
1782 {
1783   guint8 MESSAGE_TYPE;
1784   guint8 PayloadType;
1785   guint8 spare;
1786   guint8 R;
1787 
1788   guint32 TLLI;
1789   guint16 ARFCN;
1790   guint8 BSIC;
1791   guint8 CAUSE;
1792   gboolean Exist_AdditionsR99;
1793   PCCF_AdditionsR99_t AdditionsR99;
1794 } Packet_Cell_Change_Failure_t;
1795 
1796 /* < Packet Downlink Ack/Nack message content > */
1797 typedef struct
1798 {
1799   gboolean Exist_PFI;
1800   guint8   PFI;
1801 } PD_AckNack_AdditionsR99_t;
1802 
1803 typedef struct
1804 {
1805   guint8 MESSAGE_TYPE;
1806   guint8 PayloadType;
1807   guint8 spare;
1808   guint8 R;
1809 
1810   guint8 DOWNLINK_TFI;
1811   Ack_Nack_Description_t Ack_Nack_Description;
1812 
1813   guint8 Exist_Channel_Request_Description;
1814   Channel_Request_Description_t Channel_Request_Description;
1815 
1816   Channel_Quality_Report_t Channel_Quality_Report;
1817 
1818   gboolean                       Exist_AdditionsR99;
1819   PD_AckNack_AdditionsR99_t     AdditionsR99;
1820 } Packet_Downlink_Ack_Nack_t;
1821 
1822 /* < EGPRS Packet Downlink Ack/Nack message content > */
1823 typedef struct
1824 {
1825   EGPRS_BEP_LinkQualityMeasurements_t     EGPRS_BEP_LinkQualityMeasurements;
1826   guint8                                   C_VALUE;
1827   EGPRS_TimeslotLinkQualityMeasurements_t EGPRS_TimeslotLinkQualityMeasurements;
1828 } EGPRS_ChannelQualityReport_t;
1829 
1830 typedef struct
1831 {
1832   guint8   MESSAGE_TYPE;
1833   guint8   PayloadType;
1834   guint8   spare;
1835   guint8   R;
1836 
1837   guint8   DOWNLINK_TFI;
1838   guint8   MS_OUT_OF_MEMORY;
1839 
1840   gboolean                       Exist_EGPRS_ChannelQualityReport;
1841   EGPRS_ChannelQualityReport_t  EGPRS_ChannelQualityReport;
1842 
1843   gboolean                       Exist_ChannelRequestDescription;
1844   Channel_Request_Description_t ChannelRequestDescription;
1845 
1846   gboolean Exist_PFI;
1847   guint8   PFI;
1848 
1849   gboolean          Exist_ExtensionBits;
1850   Extension_Bits_t ExtensionBits;
1851 
1852   EGPRS_AckNack_t  EGPRS_AckNack;
1853 } EGPRS_PD_AckNack_t;
1854 
1855 /* < Packet Uplink Ack/Nack message content  04.60 sec.11.2.28 > */
1856 
1857 typedef struct
1858 {
1859   guint8                      Exist_CONTENTION_RESOLUTION_TLLI;
1860   guint32                     CONTENTION_RESOLUTION_TLLI;
1861 
1862   guint8                      Exist_Packet_Timing_Advance;
1863   Packet_Timing_Advance_t    Packet_Timing_Advance;
1864 
1865   guint8                      Exist_Extension_Bits;
1866   Extension_Bits_t           Extension_Bits;
1867 
1868   guint8                      Exist_Power_Control_Parameters;
1869   Power_Control_Parameters_t Power_Control_Parameters;
1870 } Common_Uplink_Ack_Nack_Data_t;
1871 
1872 typedef struct
1873 {
1874   gboolean Exist_PacketExtendedTimingAdvance;
1875   guint8   PacketExtendedTimingAdvance;
1876   guint8   TBF_EST;
1877 } PU_AckNack_GPRS_AdditionsR99_t;
1878 
1879 /* Table 11.2.28.1: PACKET UPLINK ACK/NACK information elements */
1880 typedef struct
1881 {
1882     guint8 Error;
1883     /* Fixed Allocation Parameters was removed from specs.
1884      * TODO: implement for old versions of spec.
1885      */
1886 } Fixed_Allocation_Parameters_t;
1887 
1888 typedef struct
1889 {
1890   guint8                  CHANNEL_CODING_COMMAND;
1891   Ack_Nack_Description_t Ack_Nack_Description;
1892 
1893   gboolean                        Exist_Fixed_Allocation_Parameters;
1894   Fixed_Allocation_Parameters_t   Fixed_Allocation_Parameters;
1895 
1896   gboolean                        Exist_AdditionsR99;
1897   PU_AckNack_GPRS_AdditionsR99_t AdditionsR99;
1898 
1899   Common_Uplink_Ack_Nack_Data_t Common_Uplink_Ack_Nack_Data;
1900 } PU_AckNack_GPRS_t;
1901 
1902 typedef struct
1903 {
1904   guint8   EGPRS_ChannelCodingCommand;
1905   guint8   RESEGMENT;
1906   guint8   PRE_EMPTIVE_TRANSMISSION;
1907   guint8   PRR_RETRANSMISSION_REQUEST;
1908   guint8   ARAC_RETRANSMISSION_REQUEST;
1909 
1910   guint8   TBF_EST;
1911 
1912   gboolean Exist_Packet_Extended_Timing_Advance;
1913   guint8   Packet_Extended_Timing_Advance;
1914 
1915   EGPRS_AckNack_t  EGPRS_AckNack;
1916 
1917 
1918   Common_Uplink_Ack_Nack_Data_t Common_Uplink_Ack_Nack_Data;
1919 } PU_AckNack_EGPRS_00_t;
1920 
1921 typedef struct
1922 {
1923   guint8   UnionType;
1924   union
1925   {
1926     PU_AckNack_EGPRS_00_t PU_AckNack_EGPRS_00;
1927     guint8                 extension_01;
1928     guint8                 extension_10;
1929     guint8                 extension_11;
1930   } u;
1931 } PU_AckNack_EGPRS_t;
1932 
1933 #if 0
1934 enum PUAN_Type
1935 {
1936   PUAN_GPRS,
1937   PUAN_EGPRS
1938 };
1939 #endif
1940 
1941 typedef struct
1942 {
1943   guint8 MESSAGE_TYPE;
1944   guint8 PAGE_MODE;
1945   guint8 UPLINK_TFI;
1946 
1947   guint8 UnionType;
1948   union
1949   {
1950     PU_AckNack_GPRS_t  PU_AckNack_GPRS_Struct;
1951     PU_AckNack_EGPRS_t PU_AckNack_EGPRS_Struct;
1952   } u;
1953 } Packet_Uplink_Ack_Nack_t;
1954 
1955 /* < Packet Uplink Assignment message content > */
1956 typedef struct
1957 {
1958   guint8 CHANGE_MARK_1;
1959   guint8 Exist_CHANGE_MARK_2;
1960   guint8 CHANGE_MARK_2;
1961 } CHANGE_MARK_t;
1962 
1963 typedef struct
1964 {
1965   guint8 MAIO;
1966   guint8 MA_NUMBER;
1967 
1968   guint8 Exist_CHANGE_MARK;
1969   CHANGE_MARK_t CHANGE_MARK;
1970 } Indirect_encoding_t;
1971 
1972 typedef struct
1973 {
1974   guint8 MAIO;
1975   GPRS_Mobile_Allocation_t GPRS_Mobile_Allocation;
1976 } Direct_encoding_1_t;
1977 
1978 typedef struct
1979 {
1980   guint8 MAIO;
1981   guint8 HSN;
1982   guint8 Length_of_MA_Frequency_List;
1983   guint8 MA_Frequency_List[15+3];
1984 } Direct_encoding_2_t;
1985 
1986 typedef struct
1987 {
1988   guint8 TSC;
1989   guint8 UnionType;
1990   union
1991   {
1992     guint16 ARFCN;
1993     Indirect_encoding_t Indirect_encoding;
1994     Direct_encoding_1_t Direct_encoding_1;
1995     Direct_encoding_2_t Direct_encoding_2;
1996   } u;
1997 } Frequency_Parameters_t;
1998 
1999 typedef struct
2000 {
2001   guint8 Exist;
2002   guint8 USF_TN;
2003 } Timeslot_Allocation_t;
2004 
2005 typedef struct
2006 {
2007   guint8 ALPHA;
2008 
2009   struct
2010   {
2011     guint8 Exist;
2012     guint8 USF_TN;
2013     guint8 GAMMA_TN;
2014   } Slot[8];
2015 } Timeslot_Allocation_Power_Ctrl_Param_t;
2016 
2017 typedef struct
2018 {
2019   guint8 Extended_Dynamic_Allocation;
2020 
2021   guint8 Exist_P0;
2022   guint8 P0;
2023   guint8 PR_MODE;
2024 
2025   guint8 USF_GRANULARITY;
2026 
2027   guint8 Exist_UPLINK_TFI_ASSIGNMENT;
2028   guint8 UPLINK_TFI_ASSIGNMENT;
2029 
2030   guint8 Exist_RLC_DATA_BLOCKS_GRANTED;
2031   guint8 RLC_DATA_BLOCKS_GRANTED;
2032 
2033   guint8 Exist_TBF_Starting_Time;
2034   Starting_Frame_Number_t TBF_Starting_Time;
2035 
2036   guint8 UnionType;
2037   union
2038   {
2039     Timeslot_Allocation_t                  Timeslot_Allocation[8];
2040     Timeslot_Allocation_Power_Ctrl_Param_t Timeslot_Allocation_Power_Ctrl_Param;
2041   } u;
2042 } Dynamic_Allocation_t;
2043 
2044 typedef struct
2045 {
2046   guint8 Extended_Dynamic_Allocation;
2047 
2048   guint8 Exist_P0;
2049   guint8 P0;
2050   guint8 PR_MODE;
2051 
2052   guint8 USF_GRANULARITY;
2053 
2054   guint8 Exist_UPLINK_TFI_ASSIGNMENT;
2055   guint8 UPLINK_TFI_ASSIGNMENT;
2056 
2057   guint8 Exist_RLC_DATA_BLOCKS_GRANTED;
2058   guint8 RLC_DATA_BLOCKS_GRANTED;
2059 
2060   guint8 UnionType;
2061   union
2062   {
2063     Timeslot_Allocation_t Timeslot_Allocation[8];
2064     Timeslot_Allocation_Power_Ctrl_Param_t Timeslot_Allocation_Power_Ctrl_Param;
2065   } u;
2066 } DTM_Dynamic_Allocation_t;
2067 
2068 typedef struct
2069 {
2070   guint8 TIMESLOT_NUMBER;
2071 
2072   guint8 Exist_ALPHA_and_GAMMA_TN;
2073   guint8 ALPHA;
2074   guint8 GAMMA_TN;
2075 
2076   guint8 Exist_P0;
2077   guint8 P0;
2078   guint8 BTS_PWR_CTRL_MODE;
2079   guint8 PR_MODE;
2080 
2081   Starting_Frame_Number_t TBF_Starting_Time;
2082 } Single_Block_Allocation_t;
2083 
2084 typedef struct
2085 {
2086   guint8 TIMESLOT_NUMBER;
2087 
2088   guint8 Exist_ALPHA_and_GAMMA_TN;
2089   guint8 ALPHA;
2090   guint8 GAMMA_TN;
2091 
2092   guint8 Exist_P0;
2093   guint8 P0;
2094   guint8 BTS_PWR_CTRL_MODE;
2095   guint8 PR_MODE;
2096 
2097 } DTM_Single_Block_Allocation_t;
2098 
2099 typedef struct
2100 {
2101   guint8 UnionType;
2102   union
2103   {
2104     Global_TFI_t Global_TFI;
2105     guint32 TLLI;
2106     guint16 TQI;
2107     Packet_Request_Reference_t Packet_Request_Reference;
2108   } u;
2109 } PacketUplinkID_t;
2110 
2111 typedef struct
2112 {
2113   gboolean Exist_Packet_Extended_Timing_Advance;
2114   guint8   Packet_Extended_Timing_Advance;
2115 } PUA_GPRS_AdditionsR99_t;
2116 
2117 typedef struct
2118 {
2119   guint8                       CHANNEL_CODING_COMMAND;
2120   guint8                       TLLI_BLOCK_CHANNEL_CODING;
2121   Packet_Timing_Advance_t     Packet_Timing_Advance;
2122 
2123   guint8                       Exist_Frequency_Parameters;
2124   Frequency_Parameters_t      Frequency_Parameters;
2125 
2126   guint8                       UnionType;
2127   union
2128   {
2129     guint8                     extension;
2130     Dynamic_Allocation_t      Dynamic_Allocation;
2131     Single_Block_Allocation_t Single_Block_Allocation;
2132     guint8                     FixedAllocationDummy;
2133   } u;
2134 
2135   gboolean                     Exist_AdditionsR99;
2136   PUA_GPRS_AdditionsR99_t     AdditionsR99;
2137 } PUA_GPRS_t;
2138 
2139 typedef struct
2140 {
2141   guint8   BitmapLength;
2142   guint8   ReducedMA_Bitmap[127 / 8 + 1];
2143 
2144   gboolean Exist_MAIO_2;
2145   guint8   MAIO_2;
2146 } COMPACT_ReducedMA_t;
2147 
2148 typedef struct
2149 {
2150   guint8                   TIMESLOT_NUMBER;
2151 
2152   gboolean                 Exist_ALPHA_GAMMA_TN;
2153   guint8                   ALPHA;
2154   guint8                   GAMMA_TN;
2155 
2156   gboolean                 Exist_P0_BTS_PWR_CTRL_PR_MODE;
2157   guint8                   P0;
2158   guint8                   BTS_PWR_CTRL_MODE;
2159   guint8                   PR_MODE;
2160 
2161   Starting_Frame_Number_t TBF_Starting_Time;
2162   guint8                   NUMBER_OF_RADIO_BLOCKS_ALLOCATED;
2163 } MultiBlock_Allocation_t;
2164 
2165 typedef struct
2166 {
2167   gboolean                     Exist_CONTENTION_RESOLUTION_TLLI;
2168   guint32                      CONTENTION_RESOLUTION_TLLI;
2169 
2170   gboolean                     Exist_COMPACT_ReducedMA;
2171   COMPACT_ReducedMA_t         COMPACT_ReducedMA;
2172 
2173   guint8                       EGPRS_CHANNEL_CODING_COMMAND;
2174   guint8                       RESEGMENT;
2175   guint8                       EGPRS_WindowSize;
2176 
2177   guint8                       NrOfAccessTechnologies;  /* will hold the number of list elements */
2178   guint8                       AccessTechnologyType[MAX_ACCESS_TECHOLOGY_TYPES]; /* for max size of array see 24.008/Table 10.5.146 */
2179 
2180   guint8                       ARAC_RETRANSMISSION_REQUEST;
2181   guint8                       TLLI_BLOCK_CHANNEL_CODING;
2182 
2183   gboolean                     Exist_BEP_PERIOD2;
2184   guint8                       BEP_PERIOD2;
2185 
2186   Packet_Timing_Advance_t     PacketTimingAdvance;
2187 
2188   gboolean                     Exist_Packet_Extended_Timing_Advance;
2189   guint8                       Packet_Extended_Timing_Advance;
2190 
2191   gboolean                     Exist_Frequency_Parameters;
2192   Frequency_Parameters_t      Frequency_Parameters;
2193 
2194   guint8                       UnionType;
2195   union
2196   {
2197     guint8                     extension;
2198     Dynamic_Allocation_t      Dynamic_Allocation;
2199     MultiBlock_Allocation_t   MultiBlock_Allocation;
2200     guint8                     FixedAllocationDummy;/* Fixed Allocation is not used */
2201   } u;
2202 } PUA_EGPRS_00_t;
2203 
2204 typedef struct
2205 {
2206   guint8            UnionType;
2207   union
2208   {
2209     PUA_EGPRS_00_t PUA_EGPRS_00;
2210     guint8          PUA_EGPRS_01;
2211     guint8          PUA_EGPRS_10;
2212     guint8          PUA_EGPRS_11;
2213   } u;
2214 } PUA_EGPRS_t;
2215 
2216 #if 0
2217 enum PUA_Type
2218 {
2219   PUA_GPRS,
2220   PUA_EGPRS
2221 };
2222 #endif
2223 
2224 typedef struct
2225 {
2226   guint8 MESSAGE_TYPE;
2227   guint8 PAGE_MODE;
2228 
2229   guint8 Exist_PERSISTENCE_LEVEL;
2230   guint8 PERSISTENCE_LEVEL[4];
2231 
2232   PacketUplinkID_t ID;
2233 
2234   guint8 UnionType;
2235   union
2236   {
2237     PUA_GPRS_t  PUA_GPRS_Struct;
2238     PUA_EGPRS_t PUA_EGPRS_Struct;
2239   } u;
2240 } Packet_Uplink_Assignment_t;
2241 
2242 
2243 /* < DTM Packet Uplink Assignment message content > */
2244 typedef struct
2245 {
2246   guint8 CHANNEL_CODING_COMMAND;
2247   guint8 TLLI_BLOCK_CHANNEL_CODING;
2248   Packet_Timing_Advance_t Packet_Timing_Advance;
2249 
2250   guint8 UnionType;
2251   union
2252   {
2253     guint8 extension;
2254     DTM_Dynamic_Allocation_t DTM_Dynamic_Allocation;
2255     DTM_Single_Block_Allocation_t DTM_Single_Block_Allocation;
2256   } u;
2257   gboolean Exist_EGPRS_Parameters;
2258   guint8 EGPRS_CHANNEL_CODING_COMMAND;
2259   guint8 RESEGMENT;
2260   guint8 EGPRS_WindowSize;
2261   gboolean Exist_Packet_Extended_Timing_Advance;
2262   guint8 Packet_Extended_Timing_Advance;
2263 } DTM_Packet_Uplink_Assignment_t;
2264 
2265 typedef struct
2266 {
2267   DTM_Packet_Uplink_Assignment_t DTM_Packet_Uplink_Assignment;
2268 } DTM_UL_t;
2269 
2270 /* < DTM Packet Channel Request message content > */
2271 typedef struct
2272 {
2273   guint8 DTM_Pkt_Est_Cause;
2274   Channel_Request_Description_t Channel_Request_Description;
2275   gboolean                                 Exist_PFI;
2276   guint8                                   PFI;
2277 } DTM_Channel_Request_Description_t;
2278 
2279 /* < Packet Downlink Assignment message content > */
2280 typedef struct
2281 {
2282   Starting_Frame_Number_t Measurement_Starting_Time;
2283   guint8 MEASUREMENT_INTERVAL;
2284   guint8 MEASUREMENT_BITMAP;
2285 } Measurement_Mapping_struct_t;
2286 
2287 typedef struct
2288 {
2289   guint8 UnionType;
2290   union
2291   {
2292     Global_TFI_t Global_TFI;
2293     guint32 TLLI;
2294   } u;
2295 } PacketDownlinkID_t;
2296 
2297 typedef struct
2298 {
2299   gboolean Exist_EGPRS_Params; /* if Exist_EGPRS_Params == FALSE then none of the following 4 vars exist */
2300   guint8   EGPRS_WindowSize;
2301   guint8   LINK_QUALITY_MEASUREMENT_MODE;
2302   gboolean Exist_BEP_PERIOD2;
2303   guint8   BEP_PERIOD2;
2304 
2305   gboolean Exist_Packet_Extended_Timing_Advance;
2306   guint8   Packet_Extended_Timing_Advance;
2307 
2308   gboolean             Exist_COMPACT_ReducedMA;
2309   COMPACT_ReducedMA_t COMPACT_ReducedMA;
2310 } PDA_AdditionsR99_t;
2311 
2312 typedef struct
2313 {
2314   guint8                        MESSAGE_TYPE;
2315   guint8                        PAGE_MODE;
2316 
2317   gboolean                      Exist_PERSISTENCE_LEVEL;
2318   guint8                        PERSISTENCE_LEVEL[4];
2319 
2320   PacketDownlinkID_t           ID;
2321 
2322   guint8                        MAC_MODE;
2323   guint8                        RLC_MODE;
2324   guint8                        CONTROL_ACK;
2325   guint8                        TIMESLOT_ALLOCATION;
2326   Packet_Timing_Advance_t      Packet_Timing_Advance;
2327 
2328   gboolean                      Exist_P0_and_BTS_PWR_CTRL_MODE;
2329   guint8                        P0;
2330   guint8                        BTS_PWR_CTRL_MODE;
2331   guint8                        PR_MODE;
2332 
2333   gboolean                      Exist_Frequency_Parameters;
2334   Frequency_Parameters_t       Frequency_Parameters;
2335 
2336   gboolean                      Exist_DOWNLINK_TFI_ASSIGNMENT;
2337   guint8                        DOWNLINK_TFI_ASSIGNMENT;
2338 
2339   gboolean                      Exist_Power_Control_Parameters;
2340   Power_Control_Parameters_t   Power_Control_Parameters;
2341 
2342   gboolean                      Exist_TBF_Starting_Time;
2343   Starting_Frame_Number_t      TBF_Starting_Time;
2344 
2345   guint8                        Exist_Measurement_Mapping;
2346   Measurement_Mapping_struct_t Measurement_Mapping;
2347 
2348   gboolean                      Exist_AdditionsR99;
2349   PDA_AdditionsR99_t           AdditionsR99;
2350 } Packet_Downlink_Assignment_t;
2351 
2352 /* < DTM Packet Downlink Assignment message content > */
2353 typedef struct
2354 {
2355   guint8 MAC_MODE;
2356   guint8 RLC_MODE;
2357   guint8 TIMESLOT_ALLOCATION;
2358   Packet_Timing_Advance_t Packet_Timing_Advance;
2359 
2360   guint8 Exist_P0_and_BTS_PWR_CTRL_MODE;
2361   guint8 P0;
2362   guint8 BTS_PWR_CTRL_MODE;
2363   guint8 PR_MODE;
2364 
2365   guint8 Exist_Power_Control_Parameters;
2366   Power_Control_Parameters_t Power_Control_Parameters;
2367 
2368   guint8 Exist_DOWNLINK_TFI_ASSIGNMENT;
2369   guint8 DOWNLINK_TFI_ASSIGNMENT;
2370 
2371   guint8 Exist_Measurement_Mapping;
2372   Measurement_Mapping_struct_t Measurement_Mapping;
2373   gboolean EGPRS_Mode;
2374   guint8 EGPRS_WindowSize;
2375   guint8 LINK_QUALITY_MEASUREMENT_MODE;
2376   gboolean Exist_Packet_Extended_Timing_Advance;
2377   guint8   Packet_Extended_Timing_Advance;
2378 } DTM_Packet_Downlink_Assignment_t;
2379 
2380 typedef struct
2381 {
2382   DTM_Packet_Downlink_Assignment_t DTM_Packet_Downlink_Assignment;
2383 } DTM_DL_t;
2384 
2385 typedef struct
2386 {
2387   GPRS_Cell_Options_t GPRS_Cell_Options;
2388   GPRS_Power_Control_Parameters_t GPRS_Power_Control_Parameters;
2389 } DTM_GPRS_Broadcast_Information_t;
2390 
2391 typedef struct
2392 {
2393   DTM_GPRS_Broadcast_Information_t DTM_GPRS_Broadcast_Information;
2394 } DTM_GPRS_B_t;
2395 
2396 /* < Packet Paging Request message content > */
2397 typedef struct
2398 {
2399   guint8 UnionType;
2400   union
2401   {
2402     TMSI_t PTMSI;
2403     struct MobileId Mobile_Identity;
2404   } u;
2405 } Page_request_for_TBF_establishment_t;
2406 
2407 typedef struct
2408 {
2409   guint8 UnionType;
2410   union
2411   {
2412     TMSI_t TMSI;
2413     struct MobileId Mobile_Identity;
2414   } u;
2415 
2416   guint8 CHANNEL_NEEDED;
2417 
2418   guint8 Exist_eMLPP_PRIORITY;
2419   guint8 eMLPP_PRIORITY;
2420 } Page_request_for_RR_conn_t;
2421 
2422 typedef struct
2423 {
2424   guint8 UnionType;
2425   union
2426   {
2427     Page_request_for_TBF_establishment_t Page_req_TBF;
2428     Page_request_for_RR_conn_t Page_req_RR;
2429   } u;
2430 } Repeated_Page_info_t;
2431 
2432 typedef struct
2433 {
2434   guint8 MESSAGE_TYPE;
2435   guint8 PAGE_MODE;
2436 
2437   guint8 Exist_PERSISTENCE_LEVEL;
2438   guint8 PERSISTENCE_LEVEL[4];
2439 
2440   guint8 Exist_NLN;
2441   guint8 NLN;
2442 
2443   guint8 Count_Repeated_Page_info;
2444   Repeated_Page_info_t Repeated_Page_info[5];
2445 } Packet_Paging_Request_t;
2446 
2447 typedef struct
2448 {
2449   guint8 MESSAGE_TYPE;
2450   guint8 PAGE_MODE;
2451 
2452   guint8 TIMESLOTS_AVAILABLE;
2453 } Packet_PDCH_Release_t;
2454 
2455 /* < Packet Power Control/Timing Advance message content > */
2456 typedef struct
2457 {
2458   guint8 UnionType;
2459   union
2460   {
2461     Global_TFI_t Global_TFI;
2462     guint16 TQI;
2463     Packet_Request_Reference_t Packet_Request_Reference;
2464   } u;
2465 } PacketPowerControlTimingAdvanceID_t;
2466 
2467 typedef struct
2468 {
2469   Global_Packet_Timing_Advance_t Global_Packet_Timing_Advance;
2470   Power_Control_Parameters_t Power_Control_Parameters;
2471 } GlobalTimingAndPower_t;
2472 
2473 typedef struct
2474 {
2475   guint8 UnionType;
2476   union
2477   {
2478     Global_Packet_Timing_Advance_t Global_Packet_Timing_Advance;
2479     Power_Control_Parameters_t Power_Control_Parameters;
2480   } u;
2481 } GlobalTimingOrPower_t;
2482 
2483 typedef struct
2484 {
2485   guint8 MESSAGE_TYPE;
2486   guint8 PAGE_MODE;
2487 
2488   PacketPowerControlTimingAdvanceID_t ID;
2489 
2490   /* -- Message escape */
2491   guint8 Exist_Global_Power_Control_Parameters;
2492   Global_Power_Control_Parameters_t Global_Power_Control_Parameters;
2493 
2494   guint8 UnionType;
2495   union
2496   {
2497     GlobalTimingAndPower_t GlobalTimingAndPower;
2498     GlobalTimingOrPower_t GlobalTimingOrPower;
2499   } u;
2500 } Packet_Power_Control_Timing_Advance_t;
2501 
2502 /* < Packet Queueing Notification message content > */
2503 typedef struct
2504 {
2505   guint8 MESSAGE_TYPE;
2506   guint8 PAGE_MODE;
2507 
2508   /* 111 Fixed */
2509   Packet_Request_Reference_t Packet_Request_Reference;
2510   guint16 TQI;
2511 } Packet_Queueing_Notification_t;
2512 
2513 /* < Packet Timeslot Reconfigure message content 04.60 sec. 11.2.31> */
2514 
2515 typedef Dynamic_Allocation_t TRDynamic_Allocation_t;
2516 
2517 typedef struct
2518 {
2519   Global_Packet_Timing_Advance_t Global_Packet_Timing_Advance;
2520 
2521   guint8                          DOWNLINK_RLC_MODE;
2522   guint8                          CONTROL_ACK;
2523 
2524   guint8                          Exist_DOWNLINK_TFI_ASSIGNMENT;
2525   guint8                          DOWNLINK_TFI_ASSIGNMENT;
2526 
2527   guint8                          Exist_UPLINK_TFI_ASSIGNMENT;
2528   guint8                          UPLINK_TFI_ASSIGNMENT;
2529 
2530   guint8                          DOWNLINK_TIMESLOT_ALLOCATION;
2531 
2532   guint8                          Exist_Frequency_Parameters;
2533   Frequency_Parameters_t         Frequency_Parameters;
2534 } Common_Timeslot_Reconfigure_t;
2535 
2536 typedef struct
2537 {
2538   gboolean Exist_Packet_Extended_Timing_Advance;
2539   guint8   Packet_Extended_Timing_Advance;
2540 } PTR_GPRS_AdditionsR99_t;
2541 
2542 typedef struct
2543 {
2544   guint8                          CHANNEL_CODING_COMMAND;
2545 
2546   Common_Timeslot_Reconfigure_t  Common_Timeslot_Reconfigure_Data;
2547 
2548   guint8 UnionType;
2549   union
2550   {
2551     TRDynamic_Allocation_t       Dynamic_Allocation;
2552     guint8                        Fixed_AllocationDummy;
2553   } u;
2554 
2555    gboolean                       Exist_AdditionsR99;
2556    PTR_GPRS_AdditionsR99_t       AdditionsR99;
2557 } PTR_GPRS_t;
2558 
2559 typedef struct
2560 {
2561   gboolean                        Exist_COMPACT_ReducedMA;
2562   COMPACT_ReducedMA_t            COMPACT_ReducedMA;
2563 
2564   guint8                          EGPRS_ChannelCodingCommand;
2565   guint8                          RESEGMENT;
2566 
2567   gboolean                        Exist_DOWNLINK_EGPRS_WindowSize;
2568   guint8                          DOWNLINK_EGPRS_WindowSize;
2569 
2570   gboolean                        Exist_UPLINK_EGPRS_WindowSize;
2571   guint8                          UPLINK_EGPRS_WindowSize;
2572 
2573   guint8                          LINK_QUALITY_MEASUREMENT_MODE;
2574 
2575   gboolean                        Exist_Packet_Extended_Timing_Advance;
2576   guint8                          Packet_Extended_Timing_Advance;
2577 
2578   Common_Timeslot_Reconfigure_t  Common_Timeslot_Reconfigure_Data;
2579 
2580   guint8                          UnionType;
2581   union
2582   {
2583     TRDynamic_Allocation_t       Dynamic_Allocation;
2584     guint8                        FixedAllocationDummy;
2585   } u;
2586 } PTR_EGPRS_00_t;
2587 
2588 typedef struct
2589 {
2590   guint8            UnionType;
2591   union
2592   {
2593     PTR_EGPRS_00_t PTR_EGPRS_00;
2594     guint8          extension_01;
2595     guint8          extension_10;
2596     guint8          extension_11;
2597   } u;
2598 } PTR_EGPRS_t;
2599 
2600 #if 0
2601 enum PTR_Type
2602 {
2603   PTR_GPRS,
2604   PTR_EGPRS
2605 };
2606 #endif
2607 
2608 typedef struct
2609 {
2610   guint8          MESSAGE_TYPE;
2611   guint8          PAGE_MODE;
2612 
2613   Global_TFI_t   Global_TFI;
2614 
2615    guint8         UnionType;
2616    union
2617    {
2618      PTR_GPRS_t  PTR_GPRS_Struct;
2619      PTR_EGPRS_t PTR_EGPRS_Struct;
2620    } u;
2621 } Packet_Timeslot_Reconfigure_t;
2622 
2623 
2624 /* < PSI1 message content > */
2625 typedef struct
2626 {
2627   guint8 ACC_CONTR_CLASS[2];
2628   guint8 MAX_RETRANS[4];
2629   guint8 S;
2630   guint8 TX_INT;
2631 
2632   guint8 Exist_PERSISTENCE_LEVEL;
2633   guint8 PERSISTENCE_LEVEL[4];
2634 } PRACH_Control_t;
2635 
2636 typedef struct
2637 {
2638   guint8 BS_PCC_REL;
2639   guint8 BS_PBCCH_BLKS;
2640   guint8 BS_PAG_BLKS_RES;
2641   guint8 BS_PRACH_BLKS;
2642 } PCCCH_Organization_t;
2643 
2644 typedef struct
2645 {
2646   guint8 LB_MS_TXPWR_MAX_CCH;
2647 } PSI1_AdditionsR6_t;
2648 
2649 typedef struct
2650 {
2651   guint8             MSCR;
2652   guint8             SGSNR;
2653   guint8             BandIndicator;
2654   gboolean           Exist_AdditionsR6;
2655   PSI1_AdditionsR6_t AdditionsR6;
2656 } PSI1_AdditionsR99_t;
2657 
2658 typedef struct
2659 {
2660   guint8                            MESSAGE_TYPE;
2661 
2662   guint8                            PAGE_MODE;
2663   guint8                            PBCCH_CHANGE_MARK;
2664   guint8                            PSI_CHANGE_FIELD;
2665   guint8                            PSI1_REPEAT_PERIOD;
2666   guint8                            PSI_COUNT_LR;
2667 
2668   guint8                            Exist_PSI_COUNT_HR;
2669   guint8                            PSI_COUNT_HR;
2670 
2671   guint8                            MEASUREMENT_ORDER;
2672   GPRS_Cell_Options_t               GPRS_Cell_Options;
2673   PRACH_Control_t                   PRACH_Control;
2674   PCCCH_Organization_t              PCCCH_Organization;
2675   Global_Power_Control_Parameters_t Global_Power_Control_Parameters;
2676   guint8                            PSI_STATUS_IND;
2677 
2678   gboolean                          Exist_AdditionsR99;
2679   PSI1_AdditionsR99_t               AdditionsR99;
2680 } PSI1_t;
2681 
2682 /* < PSI2 message content > */
2683 typedef struct
2684 {
2685   guint8 NUMBER;
2686 
2687   guint8 Length;
2688   guint8 Contents[15 + 3];/* octet (val(Length of RFL contents) + 3) */
2689 } Reference_Frequency_t;
2690 
2691 typedef struct
2692 {
2693   guint8 NoOfRFLs;
2694   guint8 RFL_Number[MAX_RFLS];
2695 } Cell_Allocation_t;
2696 
2697 typedef struct
2698 {
2699   guint8 NUMBER;
2700   GPRS_Mobile_Allocation_t Mobile_Allocation;
2701 } PSI2_MA_t;
2702 
2703 typedef struct
2704 {
2705   guint16 ARFCN;
2706   guint8 TIMESLOT_ALLOCATION;
2707 } Non_Hopping_PCCCH_Carriers_t;
2708 
2709 typedef struct
2710 {
2711   guint8 Count_Carriers;
2712   Non_Hopping_PCCCH_Carriers_t Carriers[7];
2713 } NonHoppingPCCCH_t;
2714 
2715 typedef struct
2716 {
2717   guint8 MAIO;
2718   guint8 TIMESLOT_ALLOCATION;
2719 } Hopping_PCCCH_Carriers_t;
2720 
2721 typedef struct
2722 {
2723   guint8 MA_NUMBER;
2724 
2725   guint8 Count_Carriers;
2726   Hopping_PCCCH_Carriers_t Carriers[10];/* MAX_PCCCH but 10 is theoretical max. */
2727 } HoppingPCCCH_t;
2728 
2729 typedef struct
2730 {
2731   guint8 TSC;
2732 
2733   guint8 UnionType;
2734   union
2735   {
2736     NonHoppingPCCCH_t NonHopping;
2737     HoppingPCCCH_t Hopping;
2738   } u;
2739 } PCCCH_Description_t;
2740 
2741 typedef struct
2742 {
2743   LAI_t LAI;
2744   guint8 RAC;
2745   CellId_t Cell_Identity;
2746 } Cell_Identification_t;
2747 
2748 typedef struct
2749 {
2750   guint8 ATT;
2751 
2752   guint8 Exist_T3212;
2753   guint8 T3212;
2754 
2755   guint8 NECI;
2756   guint8 PWRC;
2757   guint8 DTX;
2758   guint8 RADIO_LINK_TIMEOUT;
2759   guint8 BS_AG_BLKS_RES;
2760   guint8 CCCH_CONF;
2761   guint8 BS_PA_MFRMS;
2762   guint8 MAX_RETRANS;
2763   guint8 TX_INTEGER;
2764   guint8 EC;
2765   guint8 MS_TXPWR_MAX_CCCH;
2766 
2767   guint8 Exist_Extension_Bits;
2768   Extension_Bits_t Extension_Bits;
2769 } Non_GPRS_Cell_Options_t;
2770 
2771 typedef struct
2772 {
2773   guint8 MESSAGE_TYPE;
2774   guint8 PAGE_MODE;
2775   guint8 CHANGE_MARK;
2776   guint8 INDEX;
2777   guint8 COUNT;
2778 
2779   guint8 Exist_Cell_Identification;
2780   Cell_Identification_t Cell_Identification;
2781 
2782   guint8 Exist_Non_GPRS_Cell_Options;
2783   Non_GPRS_Cell_Options_t Non_GPRS_Cell_Options;
2784 
2785   guint8 Count_Reference_Frequency;
2786   Reference_Frequency_t Reference_Frequency[MAX_RFLS];
2787 
2788   Cell_Allocation_t Cell_Allocation;
2789 
2790   guint8 Count_GPRS_MA;
2791   PSI2_MA_t GPRS_MA[MAX_MA_LISTS_IN_PSI2];
2792 
2793   guint8 Count_PCCCH_Description;
2794   PCCCH_Description_t PCCCH_Description[7];/* MAX_PCCCH but it is impossible that more than 7 can be decoded */
2795 } PSI2_t;
2796 
2797 /* < PSI3 message content > */
2798 typedef struct
2799 {
2800   guint8 PRIORITY_CLASS;
2801   guint8 HCS_THR;
2802 } HCS_t;
2803 
2804 typedef struct
2805 {
2806   guint8 CELL_BAR_ACCESS_2;
2807   guint8 EXC_ACC;
2808   guint8 GPRS_RXLEV_ACCESS_MIN;
2809   guint8 GPRS_MS_TXPWR_MAX_CCH;
2810 
2811   guint8 Exist_HCS;
2812   HCS_t HCS;
2813   guint8 MULTIBAND_REPORTING;
2814 } Serving_Cell_params_t;
2815 
2816 typedef struct
2817 {
2818   guint8 GPRS_CELL_RESELECT_HYSTERESIS;
2819   guint8 C31_HYST;
2820   guint8 C32_QUAL;
2821   guint8 RANDOM_ACCESS_RETRY;
2822 
2823   guint8 Exist_T_RESEL;
2824   guint8 T_RESEL;
2825 
2826   guint8 Exist_RA_RESELECT_HYSTERESIS;
2827   guint8 RA_RESELECT_HYSTERESIS;
2828 } Gen_Cell_Sel_t;
2829 
2830 typedef struct
2831 {
2832   guint8 PBCCH_LOCATION;
2833   guint8 PSI1_REPEAT_PERIOD;
2834 } Location_Repeat_t;
2835 
2836 typedef struct
2837 {
2838   guint8 UnionType;
2839   union
2840   {
2841     guint8 SI13_LOCATION;
2842     Location_Repeat_t lr;
2843   } u;
2844 } SI13_PBCCH_Location_t;
2845 
2846 typedef struct
2847 {
2848   guint8 BSIC;
2849   guint8 CELL_BAR_ACCESS_2;
2850   guint8 EXC_ACC;
2851   guint8 SAME_RA_AS_SERVING_CELL;
2852 
2853   guint8 Exist_RXLEV_and_TXPWR;
2854   guint8 GPRS_RXLEV_ACCESS_MIN;
2855   guint8 GPRS_MS_TXPWR_MAX_CCH;
2856 
2857   guint8 Exist_OFFSET_and_TIME;
2858   guint8 GPRS_TEMPORARY_OFFSET;
2859   guint8 GPRS_PENALTY_TIME;
2860 
2861   guint8 Exist_GPRS_RESELECT_OFFSET;
2862   guint8 GPRS_RESELECT_OFFSET;
2863 
2864   guint8 Exist_HCS;
2865   HCS_t HCS;
2866 
2867   guint8 Exist_SI13_PBCCH_Location;
2868   SI13_PBCCH_Location_t SI13_PBCCH_Location;
2869 } Cell_Selection_t;
2870 
2871 /* Neigbour cell list as used in PSI3 and PSI3bis */
2872 typedef struct
2873 {
2874   guint8 FREQ_DIFF_LENGTH;
2875   guint8 FREQUENCY_DIFF;
2876 
2877   Cell_Selection_t Cell_SelectionParams;
2878 } Cell_Selection_Params_With_FreqDiff_t;
2879 
2880 typedef struct
2881 {
2882   guint16 START_FREQUENCY;
2883   Cell_Selection_t Cell_Selection;
2884   guint8 NR_OF_REMAINING_CELLS;
2885   guint8 FREQ_DIFF_LENGTH;
2886 
2887   Cell_Selection_Params_With_FreqDiff_t Cell_Selection_Params_With_FreqDiff[16];
2888 } NeighbourCellParameters_t;
2889 
2890 typedef struct
2891 {
2892   guint8 Count;
2893   NeighbourCellParameters_t Parameters[32];
2894 } NeighbourCellList_t;
2895 
2896 /* < PSI3 message content > */
2897 
2898 typedef struct
2899 {
2900   guint8  bsic;
2901   guint8  CELL_BAR_ACCESS_2;
2902   guint8  EXC_ACC;
2903   guint8  SAME_RA_AS_SERVING_CELL;
2904   guint8 Exist_GPRS_RXLEV_ACCESS_MIN;
2905   guint8  GPRS_RXLEV_ACCESS_MIN;
2906   guint8  GPRS_MS_TXPWR_MAX_CCH;
2907   guint8 Exist_GPRS_TEMPORARY_OFFSET;
2908   guint8  GPRS_TEMPORARY_OFFSET;
2909   guint8  GPRS_PENALTY_TIME;
2910   guint8 Exist_GPRS_RESELECT_OFFSET;
2911   guint8  GPRS_RESELECT_OFFSET;
2912   guint8 Exist_Hcs_Parm;
2913   HCS_t   HCS_Param;
2914   guint8 Exist_TIME_GROUP;
2915   guint8  TIME_GROUP;
2916   guint8 Exist_GUAR_CONSTANT_PWR_BLKS;
2917   guint8  GUAR_CONSTANT_PWR_BLKS;
2918 } COMPACT_Cell_Sel_t;
2919 
2920 typedef struct
2921 {
2922   guint8  FREQ_DIFF_LENGTH;
2923   guint16 FREQUENCY_DIFF;
2924   COMPACT_Cell_Sel_t  COMPACT_Cell_Sel_Remain_Cells;
2925 } COMPACT_Neighbour_Cell_Param_Remaining_t;
2926 
2927 typedef struct
2928 {
2929   guint16 START_FREQUENCY;
2930   COMPACT_Cell_Sel_t COMPACT_Cell_Sel;
2931   guint8  NR_OF_REMAINING_CELLS;
2932   guint8  FREQ_DIFF_LENGTH;
2933   COMPACT_Neighbour_Cell_Param_Remaining_t  COMPACT_Neighbour_Cell_Param_Remaining[16];
2934 } COMPACT_Neighbour_Cell_Param_t;
2935 
2936 typedef struct
2937 {
2938   Cell_Identification_t Cell_Identification;
2939   guint8  COMPACT_Neighbour_Cell_Param_Count;
2940   COMPACT_Neighbour_Cell_Param_t COMPACT_Neighbour_Cell_Param[8];
2941 } COMPACT_Info_t;
2942 
2943 typedef struct
2944 {
2945   guint8  Exist_CCN_Support_Desc;
2946   CCN_Support_Description_t CCN_Support_Desc;
2947 } PSI3_AdditionR4_t;
2948 
2949 typedef struct
2950 {
2951   guint8 Exist_COMPACT_Info;
2952   COMPACT_Info_t COMPACT_Info;
2953   guint8 Exist_AdditionR4;
2954   PSI3_AdditionR4_t AdditionR4;
2955 } PSI3_AdditionR99_t;
2956 
2957 typedef struct
2958 {
2959   LSA_ID_Info_t Scell_LSA_ID_Info;
2960   guint8 Exist_LSA_Parameters;
2961   LSA_Parameters_t LSA_Parameters;
2962   guint8 Exist_AdditionR99;
2963   PSI3_AdditionR99_t AdditionR99;
2964 } PSI3_AdditionR98_t;
2965 
2966 typedef struct
2967 {
2968   guint8 MESSAGE_TYPE;
2969   guint8 PAGE_MODE;
2970   guint8 CHANGE_MARK;
2971   guint8 BIS_COUNT;
2972 
2973   Serving_Cell_params_t Serving_Cell_params;
2974 
2975   Gen_Cell_Sel_t General_Cell_Selection;
2976   NeighbourCellList_t NeighbourCellList;
2977 
2978   guint8 Exist_AdditionR98;
2979   PSI3_AdditionR98_t AdditionR98;
2980 } PSI3_t;
2981 
2982 /* < PSI3_BIS message content > */
2983 typedef struct
2984 {
2985   guint8 MESSAGE_TYPE;
2986   guint8 PAGE_MODE;
2987   guint8 CHANGE_MARK;
2988   guint8 BIS_INDEX;
2989   guint8 BIS_COUNT;
2990 
2991   NeighbourCellList_t NeighbourCellList;
2992 } PSI3_BIS_t;
2993 
2994 /* < PSI4 message content > */
2995 typedef struct
2996 {
2997   guint8 MA_NUMBER;
2998   guint8 MAIO;
2999 } h_CG_t;
3000 
3001 typedef struct
3002 {
3003   guint8 UnionType;
3004   union
3005   {
3006     guint16 ARFCN;
3007     h_CG_t h_CG;
3008   } u;
3009 
3010   guint8 TIMESLOT_ALLOCATION;
3011 } Channel_Group_t;
3012 
3013 typedef struct
3014 {
3015   /* Channel_Group_t Channel_Group
3016    * At least one
3017    * the first one is unpacked in the index
3018    */
3019   guint8 Count_Channel_Group;
3020   Channel_Group_t Channel_Group[8];
3021 } Channel_List_t;
3022 
3023 typedef struct
3024 {
3025   guint8 MESSAGE_TYPE;
3026 
3027   guint8 PAGE_MODE;
3028   guint8 CHANGE_MARK;
3029   guint8 INDEX;
3030   guint8 COUNT;
3031 
3032   Channel_List_t Channel_List;
3033 
3034 } PSI4_t;
3035 
3036 
3037 /* < PSI5 message content > */
3038 typedef struct
3039 {
3040   guint8 existRepParamsFDD;
3041   guint8 RepQuantFDD;
3042   guint8 MultiratReportingFDD;
3043 
3044   guint8 existReportingParamsFDD;
3045   guint8 ReportingOffsetFDD;
3046   guint8 ReportingThresholdFDD;
3047 
3048   guint8 existMultiratReportingTDD;
3049   guint8 MultiratReportingTDD;
3050 
3051   guint8 existOffsetThresholdTDD;
3052   guint8 ReportingOffsetTDD;
3053   guint8 ReportingThresholdTDD;
3054 } GPRSMeasurementParams3G_PSI5_t;
3055 
3056 typedef struct
3057 {
3058   guint8   REPORT_TYPE;
3059   guint8   REPORTING_RATE;
3060   guint8   INVALID_BSIC_REPORTING;
3061   guint8  Exist_NCC_PERMITTED;
3062   guint8   NCC_PERMITTED;
3063 
3064   gboolean Exist_GPRSMeasurementParams;
3065   MeasurementParams_t   GPRSMeasurementParams;
3066   gboolean Exist_GPRSMeasurementParams3G;
3067   GPRSMeasurementParams3G_PSI5_t  GPRSMeasurementParams3G;
3068 } ENH_Reporting_Parameters_t;
3069 
3070 typedef struct
3071 {
3072   guint8 Exist_OffsetThreshold_700;
3073   OffsetThreshold_t OffsetThreshold_700;
3074   guint8 Exist_OffsetThreshold_810;
3075   OffsetThreshold_t OffsetThreshold_810;
3076 } PSI5_AdditionsR7;
3077 
3078 typedef struct
3079 {
3080   guint8 Exist_GPRS_AdditionalMeasurementParams3G;
3081   GPRS_AdditionalMeasurementParams3G_t GPRS_AdditionalMeasurementParams3G;
3082   guint8 Exist_AdditionsR7;
3083   PSI5_AdditionsR7 AdditionsR7;
3084 } PSI5_AdditionsR5;
3085 
3086 typedef struct
3087 {
3088   guint8 Exist_ENH_Reporting_Param;
3089   ENH_Reporting_Parameters_t ENH_Reporting_Param;
3090   guint8 Exist_AdditionsR5;
3091   PSI5_AdditionsR5 AdditionisR5;
3092 } PSI5_AdditionsR99;
3093 
3094 typedef struct
3095 {
3096   guint8 MESSAGE_TYPE;
3097 
3098   guint8 PAGE_MODE;
3099   guint8 CHANGE_MARK;
3100   guint8 INDEX;
3101   guint8 COUNT;
3102 
3103   guint8 Eixst_NC_Meas_Param;
3104   NC_Measurement_Parameters_t NC_Meas_Param;
3105   guint8 Exist_AdditionsR99;
3106   PSI5_AdditionsR99 AdditionsR99;
3107 } PSI5_t;
3108 
3109 
3110 
3111 
3112 /* < PSI13 message content >
3113  * Combined with SI13
3114  */
3115 typedef struct
3116 {
3117   guint8 Exist_LB_MS_TXPWR_MAX_CCH;
3118   guint8 LB_MS_TXPWR_MAX_CCH;
3119   guint8 SI2n_SUPPORT;
3120 }PSI13_AdditionsR6;
3121 
3122 typedef PSI13_AdditionsR6 SI13_AdditionsR6;
3123 
3124 typedef struct
3125 {
3126   guint8                SI_STATUS_IND;
3127   guint8                Exist_AdditionsR6;
3128   PSI13_AdditionsR6     AdditionsR6;
3129 }PSI13_AdditionsR4;
3130 
3131 typedef PSI13_AdditionsR4 SI13_AdditionsR4;
3132 
3133 typedef struct
3134 {
3135   guint8                SGSNR;
3136   gboolean              Exist_AdditionsR4;
3137   PSI13_AdditionsR4     AdditionsR4;
3138 }PSI13_AdditionR99;
3139 
3140 typedef PSI13_AdditionR99 SI13_AdditionR99;
3141 
3142 typedef struct
3143 {
3144   guint8 Exist;
3145   guint8 MESSAGE_TYPE;
3146 
3147   guint8 PAGE_MODE;
3148   guint8 BCCH_CHANGE_MARK;
3149   guint8 SI_CHANGE_FIELD;
3150 
3151   guint8 Exist_MA;
3152   guint8 SI13_CHANGE_MARK;
3153   GPRS_Mobile_Allocation_t GPRS_Mobile_Allocation;
3154 
3155   guint8 UnionType;
3156   union
3157   {
3158     PBCCH_Not_present_t PBCCH_Not_present;
3159     PBCCH_present_t PBCCH_present;
3160   } u;
3161 
3162   gboolean              Exist_AdditionsR99;
3163   PSI13_AdditionR99     AdditionsR99;
3164 } PSI13_t;
3165 
3166 /* SI_13_t is combined in the PSI13 structure */
3167 typedef PSI13_t SI_13_t;
3168 
3169 /* < Packet PRACH Parameters message content > */
3170 typedef struct
3171 {
3172   guint8 MESSAGE_TYPE;
3173   guint8 PAGE_MODE;
3174 
3175 
3176   PRACH_Control_t PRACH_Control;
3177 } Packet_PRACH_Parameters_t;
3178 
3179 /* < Packet Access Reject message content > */
3180 typedef struct
3181 {
3182   guint8 UnionType;
3183   union
3184   {
3185     guint32 TLLI;
3186     Packet_Request_Reference_t Packet_Request_Reference;
3187     Global_TFI_t Global_TFI;
3188   } u;
3189 } RejectID_t;
3190 
3191 typedef struct
3192 {
3193   RejectID_t ID;
3194 
3195   guint8 Exist_Wait;
3196   guint8 WAIT_INDICATION;
3197   guint8 WAIT_INDICATION_SIZE;
3198 } Reject_t;
3199 
3200 typedef struct
3201 {
3202   guint8 MESSAGE_TYPE;
3203   guint8 PAGE_MODE;
3204 
3205   guint8 IndexToOur;
3206   guint8 Count_Reject;
3207   Reject_t Reject[5];
3208 } Packet_Access_Reject_t;
3209 
3210 /* < Packet Cell Change Order message content > */
3211 typedef struct
3212 {
3213   guint8 CELL_BAR_ACCESS_2;
3214   guint8 EXC_ACC;
3215   guint8 SAME_RA_AS_SERVING_CELL;
3216 
3217   guint8 Exist_RXLEV_and_TXPWR;
3218   guint8 GPRS_RXLEV_ACCESS_MIN;
3219   guint8 GPRS_MS_TXPWR_MAX_CCH;
3220 
3221   guint8 Exist_OFFSET_and_TIME;
3222   guint8 GPRS_TEMPORARY_OFFSET;
3223   guint8 GPRS_PENALTY_TIME;
3224 
3225   guint8 Exist_GPRS_RESELECT_OFFSET;
3226   guint8 GPRS_RESELECT_OFFSET;
3227 
3228   guint8 Exist_HCS;
3229   HCS_t HCS;
3230 
3231   guint8 Exist_SI13_PBCCH_Location;
3232   SI13_PBCCH_Location_t SI13_PBCCH_Location;
3233 } Cell_Selection_2_t;
3234 
3235 typedef struct
3236 {
3237   guint8 FREQUENCY_DIFF;
3238   guint8 BSIC;
3239   Cell_Selection_t Cell_Selection;
3240 } h_FreqBsicCell_t;
3241 
3242 typedef struct
3243 {
3244   guint8 FREQ_DIFF_LENGTH;
3245   guint8 FREQUENCY_DIFF;
3246   guint8 BSIC;
3247 
3248   gboolean Exist_CellSelectionParams;
3249   Cell_Selection_2_t CellSelectionParams;
3250 } CellSelectionParamsWithFreqDiff_t;
3251 
3252 typedef struct
3253 {
3254   guint16 START_FREQUENCY;
3255   guint8 BSIC;
3256 
3257   guint8 Exist_Cell_Selection;
3258   Cell_Selection_2_t Cell_Selection;
3259 
3260   guint8 NR_OF_FREQUENCIES;
3261   guint8 FREQ_DIFF_LENGTH;
3262 
3263 
3264   CellSelectionParamsWithFreqDiff_t CellSelectionParamsWithFreqDiff[32];
3265 } Add_Frequency_list_t;
3266 
3267 typedef struct
3268 {
3269   guint8 REMOVED_FREQ_INDEX;
3270 } Removed_Freq_Index_t;
3271 
3272 typedef struct
3273 {
3274   guint8 Exist_REMOVED_FREQ;
3275   guint8 NR_OF_REMOVED_FREQ;
3276   Removed_Freq_Index_t Removed_Freq_Index[32];
3277 
3278   guint8 Count_Add_Frequency;
3279   Add_Frequency_list_t Add_Frequency[32];
3280 } NC_Frequency_list_t;
3281 
3282 
3283 typedef struct
3284 {
3285   guint8 NETWORK_CONTROL_ORDER;
3286 
3287   guint8 Exist_NC;
3288   guint8 NC_NON_DRX_PERIOD;
3289   guint8 NC_REPORTING_PERIOD_I;
3290   guint8 NC_REPORTING_PERIOD_T;
3291 
3292   guint8 Exist_NC_FREQUENCY_LIST;
3293   NC_Frequency_list_t NC_Frequency_list;
3294 } NC_Measurement_Parameters_with_Frequency_List_t;
3295 
3296 
3297 typedef struct
3298 {
3299   guint8 BA_IND;
3300   guint8 BA_IND_3G;
3301 } BA_IND_t;
3302 
3303 typedef struct
3304 {
3305   guint8 BA_USED;
3306   guint8 BA_USED_3G;
3307 } BA_USED_t;
3308 
3309 typedef struct
3310 {
3311   guint8 RXLEV_SERVING_CELL;
3312 } Serving_Cell_Data_t;
3313 
3314 typedef struct
3315 {
3316   guint8 FREQUENCY_N;
3317   guint8 Exist_BSIC_N;
3318   guint8 BSIC_N;
3319   guint8 RXLEV_N;
3320 } NC_Measurements_t;
3321 
3322 typedef struct
3323 {
3324   guint8 BCCH_FREQ_N;
3325   guint8 BSIC_N;
3326   guint8 RXLEV_N;
3327 } RepeatedInvalid_BSIC_Info_t;
3328 
3329 typedef struct
3330 {
3331   guint8 Exist_REPORTING_QUANTITY;
3332   guint8 REPORTING_QUANTITY;
3333 } REPORTING_QUANTITY_Instance_t;
3334 
3335 typedef struct
3336 {
3337   guint8 NC_MODE;
3338   Serving_Cell_Data_t Serving_Cell_Data;
3339 
3340   guint8 NUMBER_OF_NC_MEASUREMENTS;
3341   NC_Measurements_t NC_Measurements[6];  /* NC_Measurements * (val(NUMBER_OF_NC_MEASUREMENTS))
3342                                            Max 7 NC Measurements in one PACKET MEASUREMENT REPORT,
3343                                            but only 6 cells are updated in PACKET IDLE. */
3344 } NC_Measurement_Report_t;
3345 
3346 typedef struct
3347 {
3348   guint8 EXT_REPORTING_TYPE;
3349 
3350   guint8 Exist_I_LEVEL;
3351   struct
3352   {
3353     guint8 Exist;
3354     guint8 I_LEVEL;
3355   } Slot[8];
3356 
3357   guint8 NUMBER_OF_EXT_MEASUREMENTS;
3358   NC_Measurements_t EXT_Measurements[9];  /* EXT_Measurements * (val(NUMBER_OF_NC_MEASUREMENTS))
3359                                             Max 9 Ext Measurements in one PACKET MEASUREMENT REPORT */
3360 } EXT_Measurement_Report_t;
3361 
3362 typedef struct
3363 {
3364   guint8 CELL_LIST_INDEX_3G;
3365   guint8 REPORTING_QUANTITY;
3366 } Measurements_3G_t;
3367 
3368 typedef struct
3369 {
3370   guint32  UTRAN_CGI;
3371   guint8 Exist_PLMN_ID;
3372   PLMN_t   Plmn_ID;
3373   guint32  CSG_ID;
3374   gboolean Access_Mode;
3375   guint8   REPORTING_QUANTITY;
3376 } UTRAN_CSG_Measurement_Report_t;
3377 
3378 typedef struct
3379 {
3380   guint32  EUTRAN_CGI;
3381   guint16  Tracking_Area_Code;
3382   guint8 Exist_PLMN_ID;
3383   PLMN_t   Plmn_ID;
3384   guint32  CSG_ID;
3385   gboolean Access_Mode;
3386   guint8   REPORTING_QUANTITY;
3387 } EUTRAN_CSG_Measurement_Report_t;
3388 
3389 typedef struct
3390 {
3391   gboolean  Exist_UTRAN_CSG_Meas_Rpt;
3392   UTRAN_CSG_Measurement_Report_t  UTRAN_CSG_Meas_Rpt;
3393   gboolean  Exist_EUTRAN_CSG_Meas_Rpt;
3394   EUTRAN_CSG_Measurement_Report_t  EUTRAN_CSG_Meas_Rpt;
3395 } PMR_AdditionsR9_t;
3396 
3397 typedef struct
3398 {
3399   guint8  EUTRAN_FREQUENCY_INDEX;
3400   guint16 CELL_IDENTITY;
3401   guint8  REPORTING_QUANTITY;
3402 } EUTRAN_Measurement_Report_Body_t;
3403 
3404 typedef struct
3405 {
3406   guint8 N_EUTRAN;
3407   EUTRAN_Measurement_Report_Body_t Report[4];
3408 } EUTRAN_Measurement_Report_t;
3409 
3410 typedef struct
3411 {
3412   gboolean   Exist_EUTRAN_Meas_Rpt;
3413   EUTRAN_Measurement_Report_t  EUTRAN_Meas_Rpt;
3414   gboolean   Exist_AdditionsR9;
3415   PMR_AdditionsR9_t  AdditionsR9;
3416 } PMR_AdditionsR8_t;
3417 
3418 typedef struct
3419 {
3420   gboolean     Exist_GRNTI;
3421   guint8        GRNTI;
3422   gboolean     Exist_AdditionsR8;
3423   PMR_AdditionsR8_t  AdditionsR8;
3424 } PMR_AdditionsR5_t;
3425 
3426 typedef struct
3427 {
3428   gboolean     Exist_Info3G;
3429   guint8       UnionType;
3430   union
3431   {
3432     BA_USED_t BA_USED;
3433     guint8     PSI3_CHANGE_MARK;
3434   } u;
3435   guint8       PMO_USED;
3436 
3437   /* N_3G        bit(3): max value 7
3438    * Report part  (csn): {<3G_CELL_LIST_INDEX:bit(7)><REPORTING_QUANTITY:bit(6)>}*(val(N_3G + 1))
3439    * Max 6 3G measurement structs in one PMR
3440    */
3441   gboolean     Exist_MeasurementReport3G;
3442   guint8       N_3G;
3443   Measurements_3G_t Measurements_3G[6];
3444 
3445   gboolean     Exist_AdditionsR5;
3446   PMR_AdditionsR5_t  AdditionsR5;
3447 } PMR_AdditionsR99_t;
3448 
3449 typedef struct
3450 {
3451   guint8 MESSAGE_TYPE;
3452   guint8 PayloadType;
3453   guint8 spare;
3454   guint8 R;
3455 
3456   guint32 TLLI;
3457   guint8 Exist_PSI5_CHANGE_MARK;
3458   guint8 PSI5_CHANGE_MARK;
3459 
3460   guint8 UnionType;
3461   union
3462   {
3463     NC_Measurement_Report_t NC_Measurement_Report;
3464     EXT_Measurement_Report_t EXT_Measurement_Report;
3465   } u;
3466 
3467   gboolean Exist_AdditionsR99;
3468   PMR_AdditionsR99_t AdditionsR99;
3469 } Packet_Measurement_Report_t;
3470 
3471 #define INV_BSIC_LIST_LEN (16)
3472 
3473 #define REPORT_QUANTITY_LIST_LEN (96) /* Specification specified up to 96 */
3474 
3475 typedef struct
3476 {
3477   guint8 NC_MODE;
3478   guint8 UnionType;
3479   union
3480   {
3481     BA_USED_t BA_USED;
3482     guint8 PSI3_CHANGE_MARK;
3483   } u;
3484 
3485   guint8 PMO_USED;
3486   guint8 BSIC_Seen;
3487   guint8 SCALE;
3488 
3489   guint8 Exist_Serving_Cell_Data;
3490   Serving_Cell_Data_t Serving_Cell_Data;
3491 
3492   guint8 Count_RepeatedInvalid_BSIC_Info;
3493   RepeatedInvalid_BSIC_Info_t RepeatedInvalid_BSIC_Info[INV_BSIC_LIST_LEN];
3494 
3495   guint8 Exist_ReportBitmap;
3496   guint8 Count_REPORTING_QUANTITY_Instances;
3497   REPORTING_QUANTITY_Instance_t REPORTING_QUANTITY_Instances[REPORT_QUANTITY_LIST_LEN];
3498 
3499 } ENH_NC_Measurement_Report_t;
3500 
3501 typedef struct
3502 {
3503   guint8 Exist_UTRAN_CSG_Target_Cell;
3504   UTRAN_CSG_Target_Cell_t UTRAN_CSG_Target_Cell;
3505   guint8 Exist_EUTRAN_CSG_Target_Cell;
3506   EUTRAN_CSG_Target_Cell_t EUTRAN_CSG_Target_Cell;
3507 } PEMR_AdditionsR9_t;
3508 
3509 typedef struct
3510 {
3511   gboolean  Exist_REPORTING_QUANTITY;
3512   guint8     REPORTING_QUANTITY;
3513 } Bitmap_Report_Quantity_t;
3514 
3515 typedef struct
3516 {
3517   guint8 BITMAP_LENGTH;
3518   Bitmap_Report_Quantity_t  Bitmap_Report_Quantity[128];
3519   gboolean  Exist_EUTRAN_Meas_Rpt;
3520   EUTRAN_Measurement_Report_t EUTRAN_Meas_Rpt;
3521   gboolean   Exist_AdditionsR9;
3522   PEMR_AdditionsR9_t AdditionsR9;
3523 } PEMR_AdditionsR8_t;
3524 
3525 typedef struct
3526 {
3527   gboolean  Exist_GRNTI_Ext;
3528   guint8     GRNTI_Ext;
3529   gboolean  Exist_AdditionsR8;
3530   PEMR_AdditionsR8_t  AdditionsR8;
3531 } PEMR_AdditionsR5_t;
3532 
3533 typedef struct
3534 {
3535   guint8 MESSAGE_TYPE;
3536   guint8 PayloadType;
3537   guint8 spare;
3538   guint8 R;
3539 
3540   guint32 TLLI;
3541 
3542   ENH_NC_Measurement_Report_t Measurements;
3543 
3544   gboolean  Exist_AdditionsR5;
3545   PEMR_AdditionsR5_t  AdditionsR5;
3546 } Packet_Enh_Measurement_Report_t;
3547 
3548 typedef struct
3549 {
3550   guint8 RXLEV_SERVING_CELL;
3551 
3552   guint8 NUMBER_OF_NC_MEASUREMENTS;
3553   NC_Measurements_t NC_Measurements[6];  /* NC_Measurements * (val(NUMBER_OF_NC_MEASUREMENTS))
3554                                            Max 7 NC Measurements in one PACKET MEASUREMENT REPORT,
3555                                            but only 6 cells are updated in PACKET IDLE. */
3556 } CCN_Measurement_Report_t;
3557 
3558 typedef struct
3559 {
3560   guint16 ARFCN;
3561   guint8 BSIC;
3562 } Target_Cell_GSM_Notif_t;
3563 
3564 typedef struct
3565 {
3566   guint16 FDD_ARFCN;
3567   guint8 Exist_Bandwith_FDD;
3568   guint8 BANDWITH_FDD;
3569   guint16 SCRAMBLING_CODE;
3570 } FDD_Target_Cell_Notif_t;
3571 
3572 typedef struct
3573 {
3574   guint16 TDD_ARFCN;
3575   guint8 Exist_Bandwith_TDD;
3576   guint8  BANDWITH_TDD;
3577   guint8  CELL_PARAMETER;
3578   guint8  Sync_Case_TSTD;
3579 } TDD_Target_Cell_Notif_t;
3580 
3581 typedef struct
3582 {
3583   guint8 Exist_FDD_Description;
3584   FDD_Target_Cell_Notif_t FDD_Target_Cell_Notif;
3585   guint8 Exist_TDD_Description;
3586   TDD_Target_Cell_Notif_t TDD_Target_Cell;
3587   guint8 REPORTING_QUANTITY;
3588 } Target_Cell_3G_Notif_t;
3589 
3590 typedef struct
3591 {
3592   guint16 EARFCN;
3593   guint8 Exist_Measurement_Bandwidth;
3594   guint8 Measurement_Bandwidth;
3595   guint16 Physical_Layer_Cell_Identity;
3596   guint8 Reporting_Quantity;
3597 } Target_EUTRAN_Cell_Notif_t;
3598 
3599 typedef struct
3600 {
3601   guint8  EUTRAN_FREQUENCY_INDEX;
3602   guint16 CELL_IDENTITY;
3603   guint8  REPORTING_QUANTITY;
3604 } Eutran_Ccn_Measurement_Report_Cell_t;
3605 
3606 typedef struct
3607 {
3608   gboolean  ThreeG_BA_USED;
3609   guint8    N_EUTRAN;
3610   Eutran_Ccn_Measurement_Report_Cell_t Eutran_Ccn_Measurement_Report_Cell[4];
3611 } Eutran_Ccn_Measurement_Report_t;
3612 
3613 typedef struct
3614 {
3615   guint8 Exist_Arfcn;
3616   guint16 Arfcn;
3617   guint8  bsic;
3618   guint8 Exist_3G_Target_Cell;
3619   Target_Cell_3G_Notif_t Target_Cell_3G_Notif;
3620   guint8 Exist_Eutran_Target_Cell;
3621   Target_EUTRAN_Cell_Notif_t Target_EUTRAN_Cell;
3622   guint8 Exist_Eutran_Ccn_Measurement_Report;
3623   Eutran_Ccn_Measurement_Report_t Eutran_Ccn_Measurement_Report;
3624 } Target_Cell_4G_Notif_t;
3625 
3626 typedef struct
3627 {
3628   guint8 UnionType;
3629   union
3630   {
3631     UTRAN_CSG_Measurement_Report_t UTRAN_CSG_Measurement_Report;
3632     EUTRAN_CSG_Measurement_Report_t EUTRAN_CSG_Measurement_Report;
3633   } u;
3634   guint8 Exist_Eutran_Ccn_Measurement_Report;
3635   Eutran_Ccn_Measurement_Report_t Eutran_Ccn_Measurement_Report;
3636 } Target_Cell_CSG_Notif_t;
3637 
3638 typedef struct
3639 {
3640   guint8 UnionType;
3641   union
3642   {
3643     Target_Cell_4G_Notif_t Target_Cell_4G_Notif;
3644     Target_Cell_CSG_Notif_t Target_Cell_CSG_Notif;
3645   } u;
3646 } Target_Other_RAT_2_Notif_t;
3647 
3648 typedef struct
3649 {
3650   guint8 UnionType;
3651   union
3652   {
3653     Target_Cell_3G_Notif_t Target_Cell_3G_Notif;
3654     Target_Other_RAT_2_Notif_t Target_Other_RAT_2_Notif;
3655   } u;
3656 } Target_Other_RAT_Notif_t;
3657 
3658 typedef struct
3659 {
3660   guint8 UnionType;
3661   union
3662   {
3663     Target_Cell_GSM_Notif_t Target_Cell_GSM_Notif;
3664     Target_Other_RAT_Notif_t Target_Other_RAT_Notif;
3665   } u;
3666 } Target_Cell_t;
3667 
3668 typedef struct
3669 {
3670   guint8 Exist_BA_USED_3G;
3671   guint8 BA_USED_3G;
3672 
3673   guint8 N_3G;
3674   Measurements_3G_t Measurements_3G[6];
3675 } PCCN_AdditionsR6_t;
3676 
3677 /* < Packet Cell Change Notification message contents > */
3678 typedef struct
3679 {
3680   guint8 MESSAGE_TYPE;
3681   guint8 PayloadType;
3682   guint8 spare;
3683   guint8 R;
3684 
3685   Global_TFI_t Global_TFI;
3686 
3687   Target_Cell_t Target_Cell;
3688 
3689   guint8 UnionType;
3690   union
3691   {
3692     guint8 BA_IND;
3693     guint8 PSI3_CHANGE_MARK;
3694   } u;
3695   guint8 PMO_USED;
3696   guint8 PCCN_SENDING;
3697   CCN_Measurement_Report_t CCN_Measurement_Report;
3698 
3699   gboolean Exist_AdditionsR6;
3700   PCCN_AdditionsR6_t AdditionsR6;
3701 } Packet_Cell_Change_Notification_t;
3702 
3703 /* < Packet Cell Change Order message contents > */
3704 
3705 
3706 typedef struct
3707 {
3708   guint8   FrequencyScrolling;
3709   guint8   BSIC;
3710 } BSICDesc_t;
3711 
3712 
3713 #define MAX_BSIC_DESCS (19) /* Due to message size (23 bytes) and header etc,
3714                              * there cannot be more than 19 DESCS.
3715                              */
3716 
3717 typedef struct
3718 {
3719   gboolean     Exist_IndexStartBA;
3720   guint8       IndexStartBA;
3721   guint8       BSIC;
3722   guint8       NumRemainingBSICs;
3723   BSICDesc_t  BSICDesc[MAX_BSIC_DESCS];
3724 } BSICList_t;
3725 
3726 typedef BSICList_t GPRSBSICList_t;
3727 
3728 #define MAX_RTD_VALUES (6)
3729 
3730 typedef struct
3731 {
3732   guint8  NumRTDValues;
3733   guint16 RTD[MAX_RTD_VALUES];
3734 } RTDValues_t;
3735 
3736 typedef struct
3737 {
3738   gboolean Exist_StartValue;
3739   guint8   StartValue;
3740 } BAIndexStartRTD_t;
3741 
3742 #define MAX_RTD_FREQS (32)
3743 
3744 typedef struct
3745 {
3746   BAIndexStartRTD_t BAIndexStart;
3747   guint8 NumFreqs;
3748   RTDValues_t RTD_s[MAX_RTD_FREQS];
3749 } RTDList_t;
3750 
3751 typedef struct
3752 {
3753   gboolean   Exist_ListRTD6;
3754   RTDList_t ListRTD6;
3755 
3756   gboolean   Exist_ListRTD12;
3757   RTDList_t ListRTD12;
3758 } RealTimeDiffs_t;
3759 
3760 
3761 typedef MeasurementParams_t GPRSMeasurementParams_PMO_PCCO_t;
3762 
3763 typedef struct {
3764   gboolean           existMultiratReporting;
3765   guint8             MultiratReporting;
3766 
3767   gboolean           existOffsetThreshold;
3768   OffsetThreshold_t OffsetThreshold;
3769 } MultiratParams3G_t;
3770 
3771 typedef struct
3772 {
3773   guint8              Qsearch_P;
3774   guint8              SearchPrio3G;
3775 
3776   gboolean            existRepParamsFDD;
3777   guint8              RepQuantFDD;
3778   guint8              MultiratReportingFDD;
3779 
3780   gboolean            existOffsetThreshold;
3781   OffsetThreshold_t  OffsetThreshold;
3782 
3783   MultiratParams3G_t ParamsTDD;
3784   MultiratParams3G_t ParamsCDMA2000;
3785 } ENH_GPRSMeasurementParams3G_PMO_t;
3786 
3787 
3788 typedef struct
3789 {
3790   guint8              Qsearch_P;
3791   guint8              SearchPrio3G;
3792 
3793   gboolean            existRepParamsFDD;
3794   guint8              RepQuantFDD;
3795   guint8              MultiratReportingFDD;
3796 
3797   gboolean            existOffsetThreshold;
3798   OffsetThreshold_t  OffsetThreshold;
3799 
3800   MultiratParams3G_t ParamsTDD;
3801 } ENH_GPRSMeasurementParams3G_PCCO_t;
3802 
3803 
3804 typedef struct
3805 {
3806   guint8 Qsearch_p;
3807   guint8 SearchPrio3G;
3808 
3809   guint8 existRepParamsFDD;
3810   guint8 RepQuantFDD;
3811   guint8 MultiratReportingFDD;
3812 
3813   guint8 existReportingParamsFDD;
3814   guint8 ReportingOffsetFDD;
3815   guint8 ReportingThresholdFDD;
3816 
3817   guint8 existMultiratReportingTDD;
3818   guint8 MultiratReportingTDD;
3819 
3820   guint8 existOffsetThresholdTDD;
3821   guint8 ReportingOffsetTDD;
3822   guint8 ReportingThresholdTDD;
3823 } GPRSMeasurementParams3G_t;
3824 
3825 typedef struct
3826 {
3827   guint8 REMOVED_3GCELL_INDEX;
3828   guint8 CELL_DIFF_LENGTH_3G;
3829   guint8 CELL_DIFF_3G;
3830 } N2_t;
3831 
3832 typedef struct
3833 {
3834   guint8 N2_Count;
3835   N2_t N2s[32];
3836 } N1_t;
3837 
3838 typedef struct
3839 {
3840   guint8 N1_Count;
3841   N1_t N1s[4];
3842 } Removed3GCellDescription_t;
3843 
3844 typedef struct
3845 {
3846   guint8 Complete_This;
3847 } CDMA2000_Description_t;
3848 
3849 typedef struct {
3850   guint8  ZERO;
3851   guint16 UARFCN;
3852   guint8  Indic0;
3853   guint8  NrOfCells;
3854   guint8  BitsInCellInfo;
3855   guint8  CellInfo[16]; /* bitmap compressed according to "Range 1024" algorithm (04.18/9.1.54) */
3856 } UTRAN_FDD_NeighbourCells_t;
3857 
3858 typedef struct {
3859   gboolean                        existBandwidth;
3860   guint8                          Bandwidth;
3861   guint8                          NrOfFrequencies;
3862   UTRAN_FDD_NeighbourCells_t     CellParams[8];
3863 } UTRAN_FDD_Description_t;
3864 
3865 typedef struct {
3866   guint8  ZERO;
3867   guint16 UARFCN;
3868   guint8  Indic0;
3869   guint8  NrOfCells;
3870   guint8  BitsInCellInfo;
3871   guint8  CellInfo[16]; /* bitmap compressed according to "Range 512" algorithm */
3872 } UTRAN_TDD_NeighbourCells_t;
3873 
3874 typedef struct {
3875   gboolean                        existBandwidth;
3876   guint8                          Bandwidth;
3877   guint8                          NrOfFrequencies;
3878   UTRAN_TDD_NeighbourCells_t    CellParams[8];
3879 } UTRAN_TDD_Description_t;
3880 
3881 typedef struct
3882 {
3883   guint8 Exist_Index_Start_3G;
3884   guint8 Index_Start_3G;
3885   guint8 Exist_Absolute_Index_Start_EMR;
3886   guint8 Absolute_Index_Start_EMR;
3887   guint8 Exist_UTRAN_FDD_Description;
3888   UTRAN_FDD_Description_t UTRAN_FDD_Description;
3889   guint8 Exist_UTRAN_TDD_Description;
3890   UTRAN_TDD_Description_t UTRAN_TDD_Description;
3891   guint8 Exist_CDMA2000_Description;
3892   CDMA2000_Description_t CDMA2000_Description;
3893   guint8 Exist_Removed3GCellDescription;
3894   Removed3GCellDescription_t Removed3GCellDescription;
3895 } NeighbourCellDescription3G_PMO_t;
3896 
3897 typedef struct
3898 {
3899   guint8 Exist_Index_Start_3G;
3900   guint8 Index_Start_3G;
3901   guint8 Exist_Absolute_Index_Start_EMR;
3902   guint8 Absolute_Index_Start_EMR;
3903   guint8 Exist_UTRAN_FDD_Description;
3904   UTRAN_FDD_Description_t UTRAN_FDD_Description;
3905   guint8 Exist_UTRAN_TDD_Description;
3906   UTRAN_TDD_Description_t UTRAN_TDD_Description;
3907   guint8 Exist_Removed3GCellDescription;
3908   Removed3GCellDescription_t Removed3GCellDescription;
3909 } NeighbourCellDescription3G_PCCO_t;
3910 
3911 typedef struct
3912 {
3913   guint8 UnionType;
3914   union
3915   {
3916     BA_IND_t BA_IND;
3917     guint8 PSI3_CHANGE_MARK;
3918   } u;
3919 
3920   guint8   PMO_IND;
3921 
3922   guint8   REPORT_TYPE;
3923   guint8   REPORTING_RATE;
3924   guint8   INVALID_BSIC_REPORTING;
3925 
3926   gboolean Exist_NeighbourCellDescription3G;
3927   NeighbourCellDescription3G_PMO_t NeighbourCellDescription3G;
3928 
3929   gboolean Exist_GPRSReportPriority;
3930   GPRSReportPriority_t GPRSReportPriority;
3931 
3932   gboolean Exist_GPRSMeasurementParams;
3933   GPRSMeasurementParams_PMO_PCCO_t GPRSMeasurementParams;
3934   gboolean Exist_GPRSMeasurementParams3G;
3935   ENH_GPRSMeasurementParams3G_PMO_t GPRSMeasurementParams3G;
3936 } ENH_Measurement_Parameters_PMO_t;
3937 
3938 typedef struct
3939 {
3940   guint8 UnionType;
3941   union
3942   {
3943     BA_IND_t BA_IND;
3944     guint8 PSI3_CHANGE_MARK;
3945   } u;
3946 
3947   guint8   PMO_IND;
3948 
3949   guint8   REPORT_TYPE;
3950   guint8   REPORTING_RATE;
3951   guint8   INVALID_BSIC_REPORTING;
3952 
3953   gboolean Exist_NeighbourCellDescription3G;
3954   NeighbourCellDescription3G_PCCO_t NeighbourCellDescription3G;
3955 
3956   gboolean Exist_GPRSReportPriority;
3957   GPRSReportPriority_t GPRSReportPriority;
3958 
3959   gboolean Exist_GPRSMeasurementParams;
3960   GPRSMeasurementParams_PMO_PCCO_t GPRSMeasurementParams;
3961   gboolean Exist_GPRSMeasurementParams3G;
3962   ENH_GPRSMeasurementParams3G_PCCO_t GPRSMeasurementParams3G;
3963 } ENH_Measurement_Parameters_PCCO_t;
3964 
3965 typedef struct
3966 {
3967   guint8 UnionType;
3968   union
3969   {
3970     Global_TFI_t Global_TFI;
3971     guint32 TLLI;
3972   } u;
3973 } PacketCellChangeOrderID_t;
3974 
3975 typedef struct
3976 {
3977   guint8 CELL_BAR_QUALIFY_3;
3978   guint8 Exist_SI13_Alt_PBCCH_Location;
3979   SI13_PBCCH_Location_t SI13_Alt_PBCCH_Location;
3980 } lu_ModeCellSelectionParameters_t;
3981 
3982 typedef struct
3983 {
3984   guint8 Exist_lu_ModeCellSelectionParams;
3985   lu_ModeCellSelectionParameters_t lu_ModeCellSelectionParameters;
3986 } lu_ModeCellSelectionParams_t;
3987 
3988 typedef struct
3989 {
3990   lu_ModeCellSelectionParams_t lu_ModeCellSelectionParameters;
3991   guint8 NR_OF_FREQUENCIES;
3992   lu_ModeCellSelectionParams_t lu_ModeCellSelectionParams[32];
3993 } lu_ModeNeighbourCellParams_t;
3994 
3995 typedef struct
3996 {
3997   guint8 CELL_BAR_QUALIFY_3;
3998   guint8 SAME_RA_AS_SERVING_CELL;
3999 
4000   guint8 Exist_RXLEV_and_TXPWR;
4001   guint8 GPRS_RXLEV_ACCESS_MIN;
4002   guint8 GPRS_MS_TXPWR_MAX_CCH;
4003 
4004   guint8 Exist_OFFSET_and_TIME;
4005   guint8 GPRS_TEMPORARY_OFFSET;
4006   guint8 GPRS_PENALTY_TIME;
4007 
4008   guint8 Exist_GPRS_RESELECT_OFFSET;
4009   guint8 GPRS_RESELECT_OFFSET;
4010 
4011   guint8 Exist_HCS;
4012   HCS_t HCS;
4013 
4014   guint8 Exist_SI13_Alt_PBCCH_Location;
4015   SI13_PBCCH_Location_t SI13_Alt_PBCCH_Location;
4016 } lu_ModeOnlyCellSelection_t;
4017 
4018 typedef struct
4019 {
4020   guint8 FREQ_DIFF_LENGTH;
4021   guint8 FREQUENCY_DIFF;
4022   guint8 BSIC;
4023 
4024   gboolean Exist_lu_ModeOnlyCellSelectionParams;
4025   lu_ModeOnlyCellSelection_t lu_ModeOnlyCellSelectionParams;
4026 } lu_ModeOnlyCellSelectionParamsWithFreqDiff_t;
4027 
4028 typedef struct
4029 {
4030   guint16 START_FREQUENCY;
4031   guint8 BSIC;
4032 
4033   guint8 Exist_lu_ModeCellSelection;
4034   lu_ModeOnlyCellSelection_t lu_ModeOnlyCellSelection;
4035 
4036   guint8 NR_OF_FREQUENCIES;
4037   guint8 FREQ_DIFF_LENGTH;
4038 
4039   lu_ModeOnlyCellSelectionParamsWithFreqDiff_t lu_ModeOnlyCellSelectionParamsWithFreqDiff[32];
4040 } Add_lu_ModeOnlyFrequencyList_t;
4041 
4042 typedef struct
4043 {
4044   guint8 Count_Add_lu_ModeOnlyFrequencyList;
4045   Add_lu_ModeOnlyFrequencyList_t Add_lu_ModeOnlyFrequencyList[32];
4046 } NC_lu_ModeOnlyCapableCellList_t;
4047 
4048 
4049 typedef struct
4050 {
4051   guint8                   NumberOfFrequencyIndexes;
4052   guint8                   UTRAN_FREQUENCY_INDEX_a[18];
4053 
4054   gboolean                 existUTRAN_PRIORITY;
4055   guint8                   UTRAN_PRIORITY;
4056 
4057   guint8                   THRESH_UTRAN_high;
4058 
4059   gboolean                 existTHRESH_UTRAN_low;
4060   guint8                   THRESH_UTRAN_low;
4061 
4062   gboolean                 existUTRAN_QRXLEVMIN;
4063   guint8                   UTRAN_QRXLEVMIN;
4064 } RepeatedUTRAN_PriorityParameters_t;
4065 
4066 typedef struct
4067 {
4068   gboolean                            existDEFAULT_UTRAN_Parameters;
4069   guint8                              DEFAULT_UTRAN_PRIORITY;
4070   guint8                              DEFAULT_THRESH_UTRAN;
4071   guint8                              DEFAULT_UTRAN_QRXLEVMIN;
4072 
4073   guint8                              NumberOfPriorityParameters;
4074   RepeatedUTRAN_PriorityParameters_t  RepeatedUTRAN_PriorityParameters_a[8];
4075 } PriorityParametersDescription3G_PMO_t;
4076 
4077 typedef struct
4078 {
4079   gboolean existEUTRAN_FDD_REPORTING_THRESHOLD_OFFSET;
4080   guint8   EUTRAN_FDD_REPORTING_THRESHOLD;
4081   gboolean existEUTRAN_FDD_REPORTING_THRESHOLD_2;
4082   guint8   EUTRAN_FDD_REPORTING_THRESHOLD_2;
4083   gboolean existEUTRAN_FDD_REPORTING_OFFSET;
4084   guint8   EUTRAN_FDD_REPORTING_OFFSET;
4085 
4086   gboolean existEUTRAN_TDD_REPORTING_THRESHOLD_OFFSET;
4087   guint8   EUTRAN_TDD_REPORTING_THRESHOLD;
4088   gboolean existEUTRAN_TDD_REPORTING_THRESHOLD_2;
4089   guint8   EUTRAN_TDD_REPORTING_THRESHOLD_2;
4090   gboolean existEUTRAN_TDD_REPORTING_OFFSET;
4091   guint8   EUTRAN_TDD_REPORTING_OFFSET;
4092 } EUTRAN_REPORTING_THRESHOLD_OFFSET_t;
4093 
4094 typedef struct
4095 {
4096   guint8                               Qsearch_P_EUTRAN;
4097   guint8                               EUTRAN_REP_QUANT;
4098   guint8                               EUTRAN_MULTIRAT_REPORTING;
4099   EUTRAN_REPORTING_THRESHOLD_OFFSET_t EUTRAN_REPORTING_THRESHOLD_OFFSET;
4100 } GPRS_EUTRAN_MeasurementParametersDescription_t;
4101 
4102 typedef struct
4103 {
4104   guint16  EARFCN;
4105   gboolean existMeasurementBandwidth;
4106   guint8   MeasurementBandwidth;
4107 } RepeatedEUTRAN_Cells_t;
4108 
4109 typedef struct
4110 {
4111   guint8                   nbrOfEUTRAN_Cells;
4112   RepeatedEUTRAN_Cells_t  EUTRAN_Cells_a[6];
4113 
4114   gboolean                 existEUTRAN_PRIORITY;
4115   guint8                   EUTRAN_PRIORITY;
4116 
4117   guint8                   THRESH_EUTRAN_high;
4118 
4119   gboolean                 existTHRESH_EUTRAN_low;
4120   guint8                   THRESH_EUTRAN_low;
4121 
4122   gboolean                 existEUTRAN_QRXLEVMIN;
4123   guint8                   EUTRAN_QRXLEVMIN;
4124 } RepeatedEUTRAN_NeighbourCells_t;
4125 
4126 typedef struct
4127 {
4128   guint16 PCID;
4129 } PCID_t;
4130 
4131 typedef struct
4132 {
4133   guint8 PCID_Pattern_length;
4134   guint8 PCID_Pattern;
4135   guint8 PCID_Pattern_sense;
4136 } PCID_Pattern_t;
4137 
4138 typedef struct
4139 {
4140   guint8          NumberOfPCIDs;
4141   guint16         PCID_a[11];
4142 
4143   gboolean        existPCID_BITMAP_GROUP;
4144   guint8          PCID_BITMAP_GROUP;
4145 
4146   guint8          NumberOfPCID_Patterns;
4147   PCID_Pattern_t PCID_Pattern_a[19];
4148 } PCID_Group_IE_t;
4149 
4150 typedef struct
4151 {
4152   guint8 EUTRAN_FREQUENCY_INDEX;
4153 } EUTRAN_FREQUENCY_INDEX_t;
4154 
4155 typedef struct
4156 {
4157   PCID_Group_IE_t          NotAllowedCells;
4158   guint8                    NumberOfFrequencyIndexes;
4159   EUTRAN_FREQUENCY_INDEX_t EUTRAN_FREQUENCY_INDEX_a[28];
4160 } RepeatedEUTRAN_NotAllowedCells_t;
4161 
4162 typedef struct
4163 {
4164   guint8                    NumberOfMappings;
4165   PCID_Group_IE_t          PCID_ToTA_Mapping_a[14];
4166 
4167   guint8                    NumberOfFrequencyIndexes;
4168   EUTRAN_FREQUENCY_INDEX_t EUTRAN_FREQUENCY_INDEX_a[28];
4169 } RepeatedEUTRAN_PCID_to_TA_mapping_t;
4170 
4171 typedef struct
4172 {
4173   guint8 EUTRAN_CCN_ACTIVE;
4174 
4175   gboolean                                       existGPRS_EUTRAN_MeasurementParametersDescription;
4176   GPRS_EUTRAN_MeasurementParametersDescription_t GPRS_EUTRAN_MeasurementParametersDescription;
4177 
4178   guint8                                         nbrOfRepeatedEUTRAN_NeighbourCellsStructs;
4179   RepeatedEUTRAN_NeighbourCells_t                RepeatedEUTRAN_NeighbourCells_a[4];
4180 
4181   guint8                                         NumberOfNotAllowedCells;
4182   RepeatedEUTRAN_NotAllowedCells_t               RepeatedEUTRAN_NotAllowedCells_a[14];
4183 
4184   guint8                                         NumberOfMappings;
4185   RepeatedEUTRAN_PCID_to_TA_mapping_t            RepeatedEUTRAN_PCID_to_TA_mapping_a[19];
4186 } EUTRAN_ParametersDescription_PMO_t;
4187 
4188 typedef struct
4189 {
4190   guint8 GERAN_PRIORITY;
4191   guint8 THRESH_Priority_Search;
4192   guint8 THRESH_GSM_low;
4193   guint8 H_PRIO;
4194   guint8 T_Reselection;
4195 } ServingCellPriorityParametersDescription_t;
4196 
4197 typedef struct
4198 {
4199   gboolean                                   existServingCellPriorityParametersDescription;
4200   ServingCellPriorityParametersDescription_t ServingCellPriorityParametersDescription;
4201 
4202   gboolean                                   existPriorityParametersDescription3G_PMO;
4203   PriorityParametersDescription3G_PMO_t      PriorityParametersDescription3G_PMO;
4204 
4205   gboolean                                   existEUTRAN_ParametersDescription_PMO;
4206   EUTRAN_ParametersDescription_PMO_t         EUTRAN_ParametersDescription_PMO;
4207 } PriorityAndEUTRAN_ParametersDescription_PMO_t;
4208 
4209 typedef struct
4210 {
4211   guint8  PSC_Pattern_length;
4212   guint8  PSC_Pattern;
4213   gboolean PSC_Pattern_sense;
4214 } PSC_Pattern_t;
4215 
4216 typedef struct
4217 {
4218   guint8  PSC_Count;
4219   guint16 PSC[32];
4220   guint8  PSC_Pattern_Count;
4221   PSC_Pattern_t PSC_Pattern[32];
4222 } PSC_Group_t;
4223 
4224 typedef struct
4225 {
4226   PSC_Group_t CSG_PSC_SPLIT;
4227   guint8      Count;
4228   guint8      UTRAN_FREQUENCY_INDEX[32];
4229 } ThreeG_CSG_Description_Body_t;
4230 
4231 typedef struct
4232 {
4233   guint8  Count;
4234   ThreeG_CSG_Description_Body_t  ThreeG_CSG_Description_Body[32];
4235 } ThreeG_CSG_Description_t;
4236 
4237 typedef struct
4238 {
4239   PSC_Group_t CSG_PCI_SPLIT;
4240   guint8  Count;
4241   guint8  EUTRAN_FREQUENCY_INDEX[32];
4242 } EUTRAN_CSG_Description_Body_t;
4243 
4244 typedef struct
4245 {
4246   guint8  Count;
4247   EUTRAN_CSG_Description_Body_t EUTRAN_CSG_Description_Body[32];
4248 } EUTRAN_CSG_Description_t;
4249 
4250 typedef struct
4251 {
4252   gboolean  existMeasurement_Control_EUTRAN;
4253   gboolean  Measurement_Control_EUTRAN;
4254   guint8    EUTRAN_FREQUENCY_INDEX_top;
4255   guint8    Count_EUTRAN_FREQUENCY_INDEX;
4256   guint8    EUTRAN_FREQUENCY_INDEX[32];
4257 
4258   gboolean  existMeasurement_Control_UTRAN;
4259   gboolean  Measurement_Control_UTRAN;
4260   guint8    UTRAN_FREQUENCY_INDEX_top;
4261   guint8    Count_UTRAN_FREQUENCY_INDEX;
4262   guint8    UTRAN_FREQUENCY_INDEX[32];
4263 } Meas_Ctrl_Param_Desp_t;
4264 
4265 typedef struct
4266 {
4267   guint8    THRESH_EUTRAN_high_Q;
4268   gboolean existTHRESH_EUTRAN_low_Q;
4269   guint8    THRESH_EUTRAN_low_Q;
4270   gboolean existEUTRAN_QQUALMIN;
4271   guint8    EUTRAN_QQUALMIN;
4272   gboolean existEUTRAN_RSRPmin;
4273   guint8    EUTRAN_RSRPmin;
4274 } Reselection_Based_On_RSRQ_t;
4275 
4276 typedef struct
4277 {
4278   guint8  Count_EUTRAN_FREQUENCY_INDEX;
4279   guint8  EUTRAN_FREQUENCY_INDEX[32];
4280   guint8 UnionType;
4281   union
4282   {
4283     guint8           EUTRAN_Qmin;
4284     Reselection_Based_On_RSRQ_t Reselection_Based_On_RSRQ;
4285   } u;
4286 } Rept_EUTRAN_Enh_Cell_Resel_Param_t;
4287 
4288 typedef struct
4289 {
4290   guint8                             Count;
4291   Rept_EUTRAN_Enh_Cell_Resel_Param_t  Repeated_EUTRAN_Enhanced_Cell_Reselection_Parameters[32];
4292 } Enh_Cell_Reselect_Param_Desp_t;
4293 
4294 typedef struct
4295 {
4296   gboolean  existUTRAN_CSG_FDD_REPORTING_THRESHOLD;
4297   guint8     UTRAN_CSG_FDD_REPORTING_THRESHOLD;
4298   guint8     UTRAN_CSG_FDD_REPORTING_THRESHOLD_2;
4299   gboolean  existUTRAN_CSG_TDD_REPORTING_THRESHOLD;
4300   guint8     UTRAN_CSG_TDD_REPORTING_THRESHOLD;
4301 } UTRAN_CSG_Cells_Reporting_Desp_t;
4302 
4303 typedef struct
4304 {
4305   gboolean  existEUTRAN_CSG_FDD_REPORTING_THRESHOLD;
4306   guint8     EUTRAN_CSG_FDD_REPORTING_THRESHOLD;
4307   guint8     EUTRAN_CSG_FDD_REPORTING_THRESHOLD_2;
4308   gboolean  existEUTRAN_CSG_TDD_REPORTING_THRESHOLD;
4309   guint8     EUTRAN_CSG_TDD_REPORTING_THRESHOLD;
4310   guint8     EUTRAN_CSG_TDD_REPORTING_THRESHOLD_2;
4311 } EUTRAN_CSG_Cells_Reporting_Desp_t;
4312 
4313 typedef struct
4314 {
4315   gboolean                          existUTRAN_CSG_Cells_Reporting_Description;
4316   UTRAN_CSG_Cells_Reporting_Desp_t   UTRAN_CSG_Cells_Reporting_Description;
4317   gboolean                          existEUTRAN_CSG_Cells_Reporting_Description;
4318   EUTRAN_CSG_Cells_Reporting_Desp_t  EUTRAN_CSG_Cells_Reporting_Description;
4319 } CSG_Cells_Reporting_Desp_t;
4320 
4321 typedef struct
4322 {
4323   gboolean                       existEnhanced_Cell_Reselection_Parameters_Description;
4324   Enh_Cell_Reselect_Param_Desp_t  Enhanced_Cell_Reselection_Parameters_Description;
4325 
4326   gboolean                       existCSG_Cells_Reporting_Description;
4327   CSG_Cells_Reporting_Desp_t      CSG_Cells_Reporting_Description;
4328 } PMO_AdditionsR9_t;
4329 
4330 typedef struct
4331 {
4332   guint8 dummy;
4333 } Delete_All_Stored_Individual_Priorities_t;
4334 
4335 typedef struct
4336 {
4337   guint8  Count;
4338   guint16 FDD_ARFCN[32];
4339 } Individual_UTRAN_Priority_FDD_t;
4340 
4341 typedef struct
4342 {
4343   guint8  Count;
4344   guint16 TDD_ARFCN[32];
4345 } Individual_UTRAN_Priority_TDD_t;
4346 
4347 typedef struct
4348 {
4349   guint8 UnionType;
4350   union
4351   {
4352     Individual_UTRAN_Priority_FDD_t Individual_UTRAN_Priority_FDD;
4353     Individual_UTRAN_Priority_TDD_t Individual_UTRAN_Priority_TDD;
4354   } u;
4355   guint8 UTRAN_PRIORITY;
4356 } Repeated_Individual_UTRAN_Priority_Parameters_t;
4357 
4358 typedef struct
4359 {
4360   guint8 Exist_DEFAULT_UTRAN_PRIORITY;
4361   guint8 DEFAULT_UTRAN_PRIORITY;
4362   guint8 Repeated_Individual_UTRAN_Priority_Parameters_Count;
4363   Repeated_Individual_UTRAN_Priority_Parameters_t Repeated_Individual_UTRAN_Priority_Parameters[32];
4364 } ThreeG_Individual_Priority_Parameters_Description_t;
4365 
4366 typedef struct
4367 {
4368   guint8 Count;
4369   guint16 EARFCN[32];
4370   guint8 EUTRAN_PRIORITY;
4371 } Repeated_Individual_EUTRAN_Priority_Parameters_t;
4372 
4373 typedef struct
4374 {
4375   guint8 Exist_DEFAULT_EUTRAN_PRIORITY;
4376   guint8 DEFAULT_EUTRAN_PRIORITY;
4377   guint8 Count;
4378   Repeated_Individual_EUTRAN_Priority_Parameters_t Repeated_Individual_EUTRAN_Priority_Parameters[32];
4379 } EUTRAN_Individual_Priority_Parameters_Description_t;
4380 
4381 typedef struct
4382 {
4383   guint8 GERAN_PRIORITY;
4384   guint8 Exist_3G_Individual_Priority_Parameters_Description;
4385   ThreeG_Individual_Priority_Parameters_Description_t ThreeG_Individual_Priority_Parameters_Description;
4386   guint8 Exist_EUTRAN_Individual_Priority_Parameters_Description;
4387   EUTRAN_Individual_Priority_Parameters_Description_t EUTRAN_Individual_Priority_Parameters_Description;
4388   guint8 Exist_T3230_timeout_value;
4389   guint8 T3230_timeout_value;
4390 } Provide_Individual_Priorities_t;
4391 
4392 typedef struct
4393 {
4394   guint8 UnionType;
4395   union
4396   {
4397     Delete_All_Stored_Individual_Priorities_t Delete_All_Stored_Individual_Priorities;
4398     Provide_Individual_Priorities_t Provide_Individual_Priorities;
4399   } u;
4400 } Individual_Priorities_t;
4401 
4402 typedef struct
4403 {
4404   gboolean          existBA_IND_3G_PMO_IND;
4405   guint8            BA_IND_3G;
4406   guint8            PMO_IND;
4407 
4408   gboolean          existPriorityAndEUTRAN_ParametersDescription_PMO;
4409   PriorityAndEUTRAN_ParametersDescription_PMO_t PriorityAndEUTRAN_ParametersDescription_PMO;
4410 
4411   gboolean          existIndividualPriorities_PMO;
4412   Individual_Priorities_t  IndividualPriorities_PMO;
4413 
4414   gboolean          existThreeG_CSG_Description;
4415   ThreeG_CSG_Description_t  ThreeG_CSG_Description_PMO;
4416 
4417   gboolean          existEUTRAN_CSG_Description;
4418   EUTRAN_CSG_Description_t  EUTRAN_CSG_Description_PMO;
4419 
4420   gboolean          existMeasurement_Control_Parameters_Description;
4421   Meas_Ctrl_Param_Desp_t Measurement_Control_Parameters_Description_PMO;
4422 
4423   gboolean          existAdditionsR9;
4424   PMO_AdditionsR9_t AdditionsR9;
4425 } PMO_AdditionsR8_t;
4426 
4427 typedef struct
4428 {
4429   gboolean          existREPORTING_OFFSET_THRESHOLD_700;
4430   guint8            REPORTING_OFFSET_700;
4431   guint8            REPORTING_THRESHOLD_700;
4432 
4433   gboolean          existREPORTING_OFFSET_THRESHOLD_810;
4434   guint8            REPORTING_OFFSET_810;
4435   guint8            REPORTING_THRESHOLD_810;
4436 
4437   guint8 existAdditionsR8;
4438   PMO_AdditionsR8_t additionsR8;
4439 } PMO_AdditionsR7_t;
4440 
4441 typedef struct
4442 {
4443   guint8 CCN_ACTIVE_3G;
4444   guint8 existAdditionsR7;
4445   PMO_AdditionsR7_t additionsR7;
4446 } PMO_AdditionsR6_t;
4447 
4448 typedef struct
4449 {
4450   guint8 CCN_ACTIVE_3G;
4451 } PCCO_AdditionsR6_t;
4452 
4453 typedef struct
4454 {
4455   guint8 existGRNTI_Extension;
4456   guint8 GRNTI;
4457   guint8 exist_lu_ModeNeighbourCellParams;
4458   guint8 count_lu_ModeNeighbourCellParams;
4459   lu_ModeNeighbourCellParams_t lu_ModeNeighbourCellParams[32];
4460   guint8 existNC_lu_ModeOnlyCapableCellList;
4461   NC_lu_ModeOnlyCapableCellList_t NC_lu_ModeOnlyCapableCellList;
4462   guint8 existGPRS_AdditionalMeasurementParams3G;
4463   GPRS_AdditionalMeasurementParams3G_t GPRS_AdditionalMeasurementParams3G;
4464   guint8 existAdditionsR6;
4465   PMO_AdditionsR6_t additionsR6;
4466 } PMO_AdditionsR5_t;
4467 
4468 typedef struct
4469 {
4470   guint8 existGRNTI_Extension;
4471   guint8 GRNTI;
4472   guint8 exist_lu_ModeNeighbourCellParams;
4473   guint8 count_lu_ModeNeighbourCellParams;
4474   lu_ModeNeighbourCellParams_t lu_ModeNeighbourCellParams[32];
4475   guint8 existNC_lu_ModeOnlyCapableCellList;
4476   NC_lu_ModeOnlyCapableCellList_t NC_lu_ModeOnlyCapableCellList;
4477   guint8 existGPRS_AdditionalMeasurementParams3G;
4478   GPRS_AdditionalMeasurementParams3G_t GPRS_AdditionalMeasurementParams3G;
4479   guint8 existAdditionsR6;
4480   PCCO_AdditionsR6_t additionsR6;
4481 } PCCO_AdditionsR5_t;
4482 
4483 typedef struct
4484 {
4485   guint8 CCN_ACTIVE;
4486   guint8 Exist_CCN_Support_Description_ID;
4487   CCN_Support_Description_t CCN_Support_Description;
4488   guint8 Exist_AdditionsR5;
4489   PMO_AdditionsR5_t AdditionsR5;
4490 } PMO_AdditionsR4_t;
4491 
4492 typedef struct
4493 {
4494   guint8 CCN_ACTIVE;
4495   guint8 Exist_Container_ID;
4496   guint8 CONTAINER_ID;
4497   guint8 Exist_CCN_Support_Description_ID;
4498   CCN_Support_Description_t CCN_Support_Description;
4499   guint8 Exist_AdditionsR5;
4500   PCCO_AdditionsR5_t AdditionsR5;
4501 } PCCO_AdditionsR4_t;
4502 
4503 typedef struct
4504 {
4505   ENH_Measurement_Parameters_PCCO_t ENH_Measurement_Parameters;
4506   guint8 Exist_AdditionsR4;
4507   PCCO_AdditionsR4_t AdditionsR4;
4508 } PCCO_AdditionsR99_t;
4509 
4510 typedef struct
4511 {
4512   guint8 Exist_ENH_Measurement_Parameters;
4513   ENH_Measurement_Parameters_PMO_t ENH_Measurement_Parameters;
4514   guint8 Exist_AdditionsR4;
4515   PMO_AdditionsR4_t AdditionsR4;
4516 } PMO_AdditionsR99_t;
4517 
4518 typedef struct
4519 {
4520   guint8 Exist_LSA_Parameters;
4521   LSA_Parameters_t LSA_Parameters;
4522 
4523   guint8 Exist_AdditionsR99;
4524   PMO_AdditionsR99_t AdditionsR99;
4525 } PMO_AdditionsR98_t;
4526 
4527 typedef struct
4528 {
4529   guint8 Exist_LSA_Parameters;
4530   LSA_Parameters_t LSA_Parameters;
4531 
4532   guint8 Exist_AdditionsR99;
4533   PCCO_AdditionsR99_t AdditionsR99;
4534 } PCCO_AdditionsR98_t;
4535 
4536 typedef struct
4537 {
4538   guint8 IMMEDIATE_REL;
4539   guint16 ARFCN;
4540   guint8 BSIC;
4541   NC_Measurement_Parameters_with_Frequency_List_t NC_Measurement_Parameters;
4542 
4543   guint8 Exist_AdditionsR98;
4544   PCCO_AdditionsR98_t AdditionsR98;
4545 } Target_Cell_GSM_t;
4546 
4547 typedef struct
4548 {
4549   guint8 Exist_EUTRAN_Target_Cell;
4550   EUTRAN_Target_Cell_t EUTRAN_Target_Cell;
4551   guint8 Exist_Individual_Priorities;
4552   Individual_Priorities_t Individual_Priorities;
4553 } Target_Cell_3G_AdditionsR8_t;
4554 
4555 typedef struct
4556 {
4557   guint8 Exist_G_RNTI_Extention;
4558   guint8 G_RNTI_Extention;
4559   guint8 Exist_AdditionsR8;
4560   Target_Cell_3G_AdditionsR8_t AdditionsR8;
4561 } Target_Cell_3G_AdditionsR5_t;
4562 
4563 typedef struct
4564 {
4565   /* 00 -- Message escape */
4566   guint8 IMMEDIATE_REL;
4567   guint8 Exist_FDD_Description;
4568   FDD_Target_Cell_t FDD_Target_Cell;
4569   guint8 Exist_TDD_Description;
4570   TDD_Target_Cell_t TDD_Target_Cell;
4571   guint8 Exist_AdditionsR5;
4572   Target_Cell_3G_AdditionsR5_t AdditionsR5;
4573 } Target_Cell_3G_t;
4574 
4575 #if 0
4576 #define TARGET_CELL_GSM 0
4577 #define TARGET_CELL_3G 1
4578 #endif
4579 
4580 typedef struct
4581 {
4582   guint8 MESSAGE_TYPE;
4583   guint8 PAGE_MODE;
4584 
4585   PacketCellChangeOrderID_t ID;
4586 
4587   guint8 UnionType;
4588   union
4589   {
4590     Target_Cell_GSM_t Target_Cell_GSM;
4591     Target_Cell_3G_t Target_Cell_3G;
4592   } u;
4593 
4594 } Packet_Cell_Change_Order_t;
4595 
4596 /* < Packet Cell Change Continue message contents > */
4597 typedef struct
4598 {
4599   guint8 MESSAGE_TYPE;
4600   guint8 PAGE_MODE;
4601 
4602   Global_TFI_t Global_TFI;
4603   guint8 Exist_ID;
4604   guint16 ARFCN;
4605   guint8 BSIC;
4606   guint8 CONTAINER_ID;
4607 } Packet_Cell_Change_Continue_t;
4608 
4609 
4610 /* < Packet Neighbour Cell Data message contents > */
4611 typedef struct
4612 {
4613   guint16 ARFCN;
4614   guint8 BSIC;
4615   guint8 CONTAINER[17];     /* PD (3 bits) + CD_LENGTH (5 bits) + 16 bytes of CONTAINER_DATA (max!) */
4616 } PNCD_Container_With_ID_t;
4617 
4618 typedef struct
4619 {
4620   guint8 CONTAINER[19];     /* PD (3 bits) + CD_LENGTH (5 bits) + 18 bytes of CONTAINER_DATA (max!) */
4621 } PNCD_Container_Without_ID_t;
4622 
4623 typedef struct
4624 {
4625   guint8 UnionType;
4626   union
4627   {
4628     PNCD_Container_Without_ID_t PNCD_Container_Without_ID;
4629     PNCD_Container_With_ID_t PNCD_Container_With_ID;
4630   } u;
4631 } PNCDContainer_t;
4632 
4633 typedef struct
4634 {
4635   guint8 MESSAGE_TYPE;
4636   guint8 PAGE_MODE;
4637   /* Fixed 0 */
4638   Global_TFI_t Global_TFI;
4639   guint8 CONTAINER_ID;
4640   guint8 spare;
4641   guint8 CONTAINER_INDEX;
4642 
4643   PNCDContainer_t Container;
4644 } Packet_Neighbour_Cell_Data_t;
4645 
4646 /* < Packet Serving Cell Data message contents > */
4647 typedef struct
4648 {
4649   guint8 MESSAGE_TYPE;
4650   guint8 PAGE_MODE;
4651   /* Fixed 0 */
4652   Global_TFI_t Global_TFI;
4653   guint8 spare;
4654   guint8 CONTAINER_INDEX;
4655   guint8 CONTAINER[19];     /* PD (3 bits) + CD_LENGTH (5 bits) + 18 bytes of CONTAINER_DATA (max!) */
4656 } Packet_Serving_Cell_Data_t;
4657 
4658 /* < Packet Measurement Order message contents > */
4659 typedef struct
4660 {
4661   guint16 START_FREQUENCY;
4662   guint8 NR_OF_FREQUENCIES;
4663   guint8 FREQ_DIFF_LENGTH;
4664 
4665   guint8 Count_FREQUENCY_DIFF;
4666   guint8 FREQUENCY_DIFF[31];/* bit (FREQ_DIFF_LENGTH) * NR_OF_FREQUENCIES --> MAX is bit(7) * 31 */
4667 } EXT_Frequency_List_t;
4668 
4669 typedef struct
4670 {
4671   guint8 MESSAGE_TYPE;
4672   guint8 PAGE_MODE;
4673 
4674   PacketDownlinkID_t ID; /* use the PDA ID as it is the same as as the PMO */
4675 
4676   guint8 PMO_INDEX;
4677   guint8 PMO_COUNT;
4678 
4679   guint8 Exist_NC_Measurement_Parameters;
4680   NC_Measurement_Parameters_with_Frequency_List_t NC_Measurement_Parameters;
4681 
4682   guint8 Exist_EXT_Measurement_Parameters;
4683 
4684   guint8 Exist_AdditionsR98;
4685   PMO_AdditionsR98_t AdditionsR98;
4686 } Packet_Measurement_Order_t;
4687 
4688 /* Enhanced measurement report */
4689 
4690 typedef struct
4691 {
4692   guint8   RXLEV_SERVING_CELL;
4693 } ServingCellData_t;
4694 
4695 typedef struct
4696 {
4697   guint8   BCCH_FREQ_NCELL;
4698   guint8   BSIC;
4699   guint8   RXLEV_NCELL;
4700 } Repeated_Invalid_BSIC_Info_t;
4701 
4702 typedef struct
4703 {
4704   gboolean Exist_REPORTING_QUANTITY;
4705   guint8   REPORTING_QUANTITY;
4706 } REPORTING_QUANTITY_t;
4707 
4708 typedef struct
4709 {
4710   guint8                NC_MODE;
4711   guint8 UnionType;
4712   union
4713   {
4714     BA_USED_t           BA_USED;
4715     guint8              PSI3_CHANGE_MARK;
4716   } u;
4717   guint8 PMO_USED;
4718   guint8 SCALE;
4719   guint8 Exist_ServingCellData;
4720   ServingCellData_t   ServingCellData;
4721   guint8   Count_Repeated_Invalid_BSIC_Info;
4722   Repeated_Invalid_BSIC_Info_t Repeated_Invalid_BSIC_Info[32];
4723 
4724   gboolean Exist_Repeated_REPORTING_QUANTITY;
4725   guint8   Count_Repeated_Reporting_Quantity;
4726   REPORTING_QUANTITY_t   Repeated_REPORTING_QUANTITY[96];
4727 } NC_MeasurementReport_t;
4728 
4729 /* Packet Handover  PHO ----------------- */
4730 
4731 typedef struct
4732 {
4733   guint8 UnionType;
4734   union
4735   {
4736     guint8 MS_TimeslotAllocation;
4737     Power_Control_Parameters_t Power_Control_Parameters;
4738   } u;
4739 } GlobalTimeslotDescription_t;
4740 
4741 typedef struct
4742 {
4743   guint8 TimeslotAllocation;
4744   guint8 PFI;
4745   guint8 RLC_Mode;
4746   guint8 TFI_Assignment;
4747   guint8 ControlACK;
4748   guint8 Exist_EGPRS_WindowSize;
4749   guint8 EGPRS_WindowSize;
4750 } PHO_DownlinkAssignment_t;
4751 
4752 typedef struct
4753 {
4754   gboolean Exist_USF;
4755   guint8 USF;
4756 } PHO_USF_1_7_t;
4757 
4758 typedef struct
4759 {
4760   guint8 USF_0;
4761   PHO_USF_1_7_t USF_1_7[7];
4762   guint8 NBR_OfAllocatedTimeslots;
4763 } USF_AllocationArray_t;
4764 
4765 typedef struct
4766 {
4767   guint8 PFI;
4768   guint8 RLC_Mode;
4769   guint8 TFI_Assignment;
4770   guint8 Exist_ChannelCodingCommand;
4771   guint8 ChannelCodingCommand;
4772   guint8 Exist_EGPRS_ChannelCodingCommand;
4773   guint8 EGPRS_ChannelCodingCommand;
4774   guint8 Exist_EGPRS_WindowSize;
4775   guint8 EGPRS_WindowSize;
4776   guint8 USF_Granularity;
4777   guint8 Exist_TBF_TimeslotAllocation;
4778   guint8 TBF_TimeslotAllocation;
4779   guint8 UnionType;
4780   union
4781   {
4782     guint8 USF_SingleAllocation;
4783     USF_AllocationArray_t USF_AllocationArray;
4784   } u;
4785 } PHO_UplinkAssignment_t;
4786 
4787 typedef struct
4788 {
4789   GlobalTimeslotDescription_t GlobalTimeslotDescription;
4790   guint8 Exist_PHO_UA;
4791   PHO_UplinkAssignment_t PHO_UA;
4792 } GlobalTimeslotDescription_UA_t;
4793 
4794 typedef struct
4795 {
4796   guint8 Exist_ChannelCodingCommand;
4797   guint8 ChannelCodingCommand;
4798   guint8 Exist_GlobalTimeslotDescription_UA;
4799   GlobalTimeslotDescription_UA_t GTD_UA;
4800   guint8 Exist_DownlinkAssignment;
4801   PHO_DownlinkAssignment_t DownlinkAssignment;
4802 } PHO_GPRS_t;
4803 
4804 
4805 typedef struct
4806 {
4807   guint8 Exist_EGPRS_WindowSize;
4808   guint8 EGPRS_WindowSize;
4809   guint8 LinkQualityMeasurementMode;
4810   guint8 Exist_BEP_Period2;
4811   guint8 BEP_Period2;
4812 } EGPRS_Description_t;
4813 
4814 typedef struct
4815 {
4816   guint8 Exist_EGPRS_Description;
4817   EGPRS_Description_t EGPRS_Description;
4818   guint8 Exist_DownlinkAssignment;
4819   PHO_DownlinkAssignment_t DownlinkAssignment;
4820 } DownlinkTBF_t;
4821 
4822 typedef struct
4823 {
4824   guint8 Exist_EGPRS_WindowSize;
4825   guint8 EGPRS_WindowSize;
4826   guint8 Exist_EGPRS_ChannelCodingCommand;
4827   guint8 EGPRS_ChannelCodingCommand;
4828   guint8 Exist_BEP_Period2;
4829   guint8 BEP_Period2;
4830   guint8 Exist_GlobalTimeslotDescription_UA;
4831   GlobalTimeslotDescription_UA_t GTD_UA;
4832   guint8 Exist_DownlinkTBF;
4833   DownlinkTBF_t DownlinkTBF;
4834 } PHO_EGPRS_t;
4835 
4836 typedef struct
4837 {
4838   Global_Packet_Timing_Advance_t    GlobalPacketTimingAdvance;
4839   guint8 Exist_PacketExtendedTimingAdvance;
4840   guint8 PacketExtendedTimingAdvance;
4841 } PHO_TimingAdvance_t;
4842 
4843 typedef struct
4844 {
4845   guint8 NAS_ContainerLength;
4846   guint8 Spare_1a;
4847   guint8 Spare_1b;
4848   guint8 Spare_1c;
4849   guint8 Old_XID;
4850   guint8 Spare_1e;
4851   guint8 Type_of_Ciphering_Algo;
4852   guint32 IOV_UI_value;
4853 } NAS_Container_For_PS_HO_t;
4854 
4855 typedef struct
4856 {
4857   guint8 RRC_ContainerLength;
4858 } PS_HandoverTo_UTRAN_Payload_t;
4859 
4860 typedef struct
4861 {
4862   guint8 RRC_ContainerLength;
4863 } PS_HandoverTo_E_UTRAN_Payload_t;
4864 
4865 typedef struct
4866 {
4867   guint8 Exist_HandoverReference;
4868   guint8 HandoverReference;
4869   guint8 ARFCN;
4870   guint8 SI;
4871   guint8 NCI;
4872   guint8 BSIC;
4873   guint8 Exist_CCN_Active;
4874   guint8 CCN_Active;
4875   guint8 Exist_CCN_Active_3G;
4876   guint8 CCN_Active_3G;
4877   guint8 Exist_CCN_Support_Description;
4878   CCN_Support_Description_t CCN_Support_Description;
4879   Frequency_Parameters_t    Frequency_Parameters;
4880   guint8 NetworkControlOrder;
4881   guint8 Exist_PHO_TimingAdvance;
4882   PHO_TimingAdvance_t PHO_TimingAdvance;
4883   guint8 Extended_Dynamic_Allocation;
4884   guint8 RLC_Reset;
4885   guint8 Exist_PO_PR;
4886   guint8 PO;
4887   guint8 PR_Mode;
4888   guint8 Exist_UplinkControlTimeslot;
4889   guint8 UplinkControlTimeslot;
4890   guint8 UnionType;
4891   union
4892   {
4893     PHO_GPRS_t  PHO_GPRS_Mode;
4894     PHO_EGPRS_t PHO_EGPRS_Mode;
4895   } u;
4896 } PHO_RadioResources_t;
4897 
4898 typedef struct
4899 {
4900   PHO_RadioResources_t PHO_RadioResources;
4901   guint8 Exist_NAS_Container;
4902   NAS_Container_For_PS_HO_t NAS_Container;
4903 } PS_HandoverTo_A_GB_ModePayload_t;
4904 
4905 typedef struct
4906 {
4907   guint8 MessageType;
4908   guint8 PageMode;
4909   Global_TFI_t Global_TFI;
4910   guint8 ContainerID;
4911   guint8 UnionType;
4912   union
4913   {
4914     PS_HandoverTo_A_GB_ModePayload_t PS_HandoverTo_A_GB_ModePayload;
4915     PS_HandoverTo_UTRAN_Payload_t    PS_HandoverTo_UTRAN_Payload;
4916     PS_HandoverTo_E_UTRAN_Payload_t  PS_HandoverTo_E_UTRAN_Payload;
4917   } u;
4918 } Packet_Handover_Command_t;
4919 
4920 /* End Packet Handover */
4921 
4922 /* Packet Physical Information ----------------- */
4923 
4924 typedef struct
4925 {
4926   guint8 MessageType;
4927   guint8 PageMode;
4928   Global_TFI_t Global_TFI;
4929   guint8 TimingAdvance;
4930 } Packet_PhysicalInformation_t;
4931 
4932 /* End Packet Physical Information */
4933 
4934 
4935 
4936 /*  ADDITIONAL MS RADIO ACCESS CAPABILITIES -----------------*/
4937 typedef struct
4938 {
4939   guint8 UnionType;
4940   union
4941   {
4942     Global_TFI_t Global_TFI;
4943     guint32 TLLI;
4944   } u;
4945 } AdditionalMsRadAccessCapID_t;
4946 
4947 
4948 typedef struct
4949 {
4950   guint8 MESSAGE_TYPE;
4951   guint8 PayloadType;
4952   guint8 spare;
4953   guint8 R;
4954 
4955   AdditionalMsRadAccessCapID_t ID;
4956   MS_Radio_Access_capability_t MS_Radio_Access_capability2;
4957 } Additional_MS_Rad_Access_Cap_t;
4958 
4959 /* End ADDITIONAL MS RADIO ACCESS CAPABILITIES */
4960 
4961 
4962 /* Packet Pause -----------------*/
4963 
4964 typedef struct
4965 {
4966   guint8 MESSAGE_TYPE;
4967 
4968   guint32 TLLI;
4969   guint8  RAI[48/8];
4970 } Packet_Pause_t;
4971 
4972 /* End Packet Pause */
4973 
4974 
4975 /* < Payload Type Data MAC Header content > */
4976 typedef struct
4977 {
4978   guint8 Payload_Type;
4979   guint8 Countdown_Value;
4980   guint8 SI;
4981   guint8 R;
4982 } UL_Data_Mac_Header_t;
4983 
4984 typedef struct
4985 {
4986   UL_Data_Mac_Header_t UL_Data_Mac_Header;
4987   guint8 Spare;
4988   guint8 PI;
4989   guint8 TFI;
4990   guint8 TI;
4991   guint8 BSN;
4992   guint8 E;
4993 } UL_Data_Block_GPRS_t;
4994 
4995 typedef struct
4996 {
4997    guint8 MESSAGE_TYPE;
4998    guint8 CTRL_ACK;
4999 }UL_Packet_Control_Ack_11_t;
5000 
5001 typedef struct
5002 {
5003    guint8 MESSAGE_TYPE;
5004    guint8 TN_RRBP;
5005    guint8 CTRL_ACK;
5006 }UL_Packet_Control_Ack_TN_RRBP_11_t;
5007 
5008 typedef struct
5009 {
5010    guint8 MESSAGE_TYPE;
5011    guint8 CTRL_ACK;
5012 }UL_Packet_Control_Ack_8_t;
5013 
5014 typedef struct
5015 {
5016    guint8 MESSAGE_TYPE;
5017    guint8 TN_RRBP;
5018    guint8 CTRL_ACK;
5019 }UL_Packet_Control_Ack_TN_RRBP_8_t;
5020 
5021 typedef struct
5022 {
5023   guint8 Payload_Type;
5024   guint8 RRBP;
5025   guint8 S_P;
5026   guint8 USF;
5027 } DL_Data_Mac_Header_t;
5028 
5029 typedef struct
5030 {
5031   DL_Data_Mac_Header_t DL_Data_Mac_Header;
5032   guint8 Power_Reduction;
5033   guint8 TFI;
5034   guint8 FBI;
5035   guint8 BSN;
5036   guint8 E;
5037 } DL_Data_Block_GPRS_t;
5038 
5039 typedef struct
5040 {
5041   guint8 TFI;
5042   guint8 RRBP;
5043   guint8 ES_P;
5044   guint8 USF;
5045   guint16 BSN1;
5046   guint16 BSN2_offset;
5047   guint8 Power_Reduction;
5048   guint8 SPB;
5049   guint8 CPS;
5050   guint8 PI;
5051   guint8 ECS_P;
5052   guint8 CC;
5053   guint8 SPARE1;
5054   guint8 SPARE2;
5055   guint8 SPARE3;
5056 } DL_Data_Block_EGPRS_Header_t;
5057 
5058 typedef DL_Data_Block_EGPRS_Header_t DL_Data_Block_EGPRS_Header_Type1_t;
5059 typedef DL_Data_Block_EGPRS_Header_t DL_Data_Block_EGPRS_Header_Type2_t;
5060 typedef DL_Data_Block_EGPRS_Header_t DL_Data_Block_EGPRS_Header_Type3_t;
5061 typedef DL_Data_Block_EGPRS_Header_t DL_Data_Block_EC_EGPRS_Header_Type1_t;
5062 typedef DL_Data_Block_EGPRS_Header_t DL_Data_Block_EC_EGPRS_Header_Type2_t;
5063 typedef DL_Data_Block_EGPRS_Header_t DL_Data_Block_EC_EGPRS_Header_Type3_t;
5064 
5065 typedef DL_Data_Block_EGPRS_Header_t DL_Data_Block_EGPRS_Header_Type1_EC_t;
5066 
5067 typedef struct
5068 {
5069   guint8 TFI;
5070   guint8 Countdown_Value;
5071   guint8 SI;
5072   guint8 R;
5073   guint16 BSN1;
5074   guint16 BSN2_offset;
5075   guint8 PI;
5076   guint8 RSB;
5077   guint8 SPB;
5078   guint8 CPS;
5079   guint8 FOI;
5080   guint8 RI;
5081   guint8 DL_CC_EST;
5082   guint8 RTLLI;
5083   guint8 SPARE1;
5084   guint8 SPARE2;
5085   guint8 dummy;
5086 } UL_Data_Block_EGPRS_Header_t;
5087 
5088 typedef UL_Data_Block_EGPRS_Header_t UL_Data_Block_EGPRS_Header_Type1_t;
5089 typedef UL_Data_Block_EGPRS_Header_t UL_Data_Block_EGPRS_Header_Type2_t;
5090 typedef UL_Data_Block_EGPRS_Header_t UL_Data_Block_EGPRS_Header_Type3_t;
5091 typedef UL_Data_Block_EGPRS_Header_t UL_Data_Block_EC_EGPRS_Header_Type1_t;
5092 typedef UL_Data_Block_EGPRS_Header_t UL_Data_Block_EC_EGPRS_Header_Type2_t;
5093 typedef UL_Data_Block_EGPRS_Header_t UL_Data_Block_EC_EGPRS_Header_Type3_t;
5094 
5095 typedef struct
5096 {
5097   guint8                        DOWNLINK_TFI;
5098   guint8                        Exist_Wait;
5099   guint8                        WAIT_INDICATION;
5100   guint8                        WAIT_INDICATION_SIZE;
5101 }
5102 EC_Reject_t;
5103 
5104 typedef struct
5105 {
5106   guint8                        MESSAGE_TYPE;
5107   guint8                        USED_DL_COVERAGE_CLASS;
5108   guint8                        Reject_Count;
5109   EC_Reject_t                   Reject[16];
5110 }
5111 EC_Packet_Access_Reject_t;
5112 
5113 typedef struct
5114 {
5115   guint8                        EC_MA_NUMBER;
5116   guint8                        TSC;
5117   guint8                        Primary_TSC_Set;
5118 }
5119 EC_Frequency_Parameters_t;
5120 
5121 typedef struct {
5122   guint8                        TIMING_ADVANCE_VALUE;
5123 } EC_Packet_Timing_Advance_t;
5124 
5125 typedef struct
5126 {
5127   guint8                        MESSAGE_TYPE;
5128   guint8                        USED_DL_COVERAGE_CLASS;
5129   Global_TFI_t                  Global_TFI;
5130   guint8                        CONTROL_ACK;
5131 
5132   gboolean                      Exist_Frequency_Parameters;
5133   EC_Frequency_Parameters_t     Frequency_Parameters;
5134 
5135   guint8                        DL_COVERAGE_CLASS;
5136   guint8                        STARTING_DL_TIMESLOT;
5137   guint8                        TIMESLOT_MULTIPLICATOR;
5138   guint8                        DOWNLINK_TFI_ASSIGNMENT;
5139   guint8                        UL_COVERAGE_CLASS;
5140   guint8                        STARTING_UL_TIMESLOT_OFFSET;
5141 
5142   gboolean                      Exist_EC_Packet_Timing_Advance;
5143   EC_Packet_Timing_Advance_t    EC_Packet_Timing_Advance;
5144 
5145   gboolean                      Exist_P0_and_PR_MODE;
5146   guint8                        P0;
5147   guint8                        PR_MODE;
5148 
5149   gboolean                      Exist_GAMMA;
5150   guint8                        GAMMA;
5151 
5152   guint8                        ALPHA_Enable;
5153 
5154 }
5155 EC_Packet_Downlink_Assignment_t;
5156 
5157 typedef struct
5158 {
5159   guint8                        MESSAGE_TYPE;
5160   guint8                        USED_DL_COVERAGE_CLASS;
5161   Global_TFI_t                  Global_TFI;
5162   guint8                        TYPE_OF_ACK;
5163 }
5164 EC_Packet_Polling_Req_t;
5165 
5166 typedef struct
5167 {
5168   guint8                        MESSAGE_TYPE;
5169   guint8                        USED_DL_COVERAGE_CLASS;
5170   Global_TFI_t                  Global_TFI;
5171 
5172   gboolean                      Exist_T_AVG_T;
5173   guint8                        T_AVG_T;
5174 
5175   gboolean                      Exist_EC_Packet_Timing_Advance;
5176   EC_Packet_Timing_Advance_t    EC_Packet_Timing_Advance;
5177 
5178   gboolean                      Exist_GAMMA;
5179   guint8                        GAMMA;
5180 }
5181 EC_Packet_Power_Control_Timing_Advance_t;
5182 
5183 typedef struct
5184 {
5185   guint8                        MESSAGE_TYPE;
5186   guint8                        USED_DL_COVERAGE_CLASS;
5187   Global_TFI_t                  Global_TFI;
5188   guint8                        TBF_RELEASE_CAUSE;
5189 
5190   guint8                        Exist_Wait;
5191   guint8                        WAIT_INDICATION;
5192   guint8                        WAIT_INDICATION_SIZE;
5193 }
5194 EC_Packet_Tbf_Release_t;
5195 
5196 typedef struct{
5197   gboolean                      Exist_DELAY_NEXT_UL_RLC_DATA_BLOCK;
5198   guint8                        DELAY_NEXT_UL_RLC_DATA_BLOCK;
5199 }
5200 FUA_Delay_t;
5201 
5202 typedef struct
5203 {
5204   gboolean                      Exist_BSN_OFFSET;
5205   guint8                        BSN_OFFSET;
5206   guint8                        START_FIRST_UL_RLC_DATA_BLOCK;
5207   guint8                        Count_FUA_Delay;
5208   FUA_Delay_t                   FUA_Delay[16]; /* Max RLC window size */
5209 }
5210 PUAN_Fixed_Uplink_Allocation_t;
5211 
5212 typedef struct{
5213   guint8                        STARTING_SEQUENCE_NUMBER;
5214   guint16                       RECEIVED_BLOCK_BITMAP;
5215 }
5216 EC_AckNack_Description_t;
5217 
5218 typedef struct{
5219   guint8                        STARTING_SEQUENCE_NUMBER;
5220   guint8                        RECEIVED_BLOCK_BITMAP;
5221 }
5222 EC_Primary_AckNack_Description_t;
5223 
5224 typedef struct{
5225   guint32                           CONTENTION_RESOLUTION_TLLI;
5226   EC_Primary_AckNack_Description_t  EC_AckNack_Description;
5227 }
5228 EC_Primary_AckNack_Description_TLLI_t;
5229 
5230 typedef struct{
5231   guint32                           CONTENTION_RESOLUTION_rTLLI;
5232   EC_Primary_AckNack_Description_t  EC_AckNack_Description;
5233 }
5234 EC_Primary_AckNack_Description_rTLLI_t;
5235 
5236 typedef struct{
5237   guint8                          EC_AckNack_Description_Type;
5238   union
5239   {
5240     EC_AckNack_Description_t      EC_AckNack_Description;
5241     EC_Primary_AckNack_Description_TLLI_t  EC_Primary_AckNack_Description_TLLI;
5242     EC_Primary_AckNack_Description_rTLLI_t EC_Primary_AckNack_Description_rTLLI;
5243   } u;
5244 
5245   PUAN_Fixed_Uplink_Allocation_t  PUAN_Fixed_Uplink_Allocation;
5246   guint8                        RESEGMENT;
5247 
5248   gboolean                      Exist_EGPRS_Channel_Coding_Command;
5249   guint8                        EGPRS_Channel_Coding_Command;
5250 
5251   gboolean                      Exist_CC_TS;
5252   guint8                        UL_COVERAGE_CLASS;
5253   guint8                        STARTING_UL_TIMESLOT;
5254   guint8                        DL_COVERAGE_CLASS;
5255   guint8                        STARTING_DL_TIMESLOT_OFFSET;
5256   guint8                        TIMESLOT_MULTIPLICATOR;
5257 } EC_Packet_Uplink_Ack_Nack_fai0_t;
5258 typedef struct{
5259   gboolean                      Exist_CONTENTION_RESOLUTION_TLLI;
5260   guint32                       CONTENTION_RESOLUTION_TLLI;
5261 
5262   gboolean                      Exist_MONITOR_EC_PACCH;
5263   guint8                        T3238;
5264   guint8                        Initial_Waiting_Time;
5265   guint8                        EC_PACCH_Monitoring_Pattern;
5266 
5267 } EC_Packet_Uplink_Ack_Nack_fai1_t;
5268 
5269 typedef struct
5270 {
5271   guint8                        MESSAGE_TYPE;
5272   guint8                        USED_DL_COVERAGE_CLASS;
5273   guint8                        UPLINK_TFI;
5274   guint8                        Final_Ack_Indicator;
5275   union
5276   {
5277     EC_Packet_Uplink_Ack_Nack_fai0_t fai0;
5278     EC_Packet_Uplink_Ack_Nack_fai1_t fai1;
5279   } u;
5280 
5281   gboolean                      Exist_EC_Packet_Timing_Advance;
5282   EC_Packet_Timing_Advance_t    EC_Packet_Timing_Advance;
5283 
5284   gboolean                      Exist_GAMMA;
5285   guint8                        GAMMA;
5286   guint8                        ALPHA_Enable;
5287 }
5288 EC_Packet_Uplink_Ack_Nack_t;
5289 
5290 typedef struct
5291 {
5292   guint8                        START_FIRST_UL_RLC_DATA_BLOCK;
5293   guint8                        Count_FUA_Delay;
5294   FUA_Delay_t                   FUA_Delay[16]; /* Max RLC window size */
5295 }
5296 Fixed_Uplink_Allocation_t;
5297 
5298 typedef struct
5299 {
5300   guint8                        MESSAGE_TYPE;
5301   guint8                        USED_DL_COVERAGE_CLASS;
5302   Global_TFI_t                  Global_TFI;
5303 
5304   gboolean                      Exist_UPLINK_TFI_ASSIGNMENT;
5305   guint8                        UPLINK_TFI_ASSIGNMENT;
5306 
5307   gboolean                      Exist_EGPRS_Channel_Coding_Command;
5308   guint8                        EGPRS_Channel_Coding_Command;
5309 
5310   guint8                        Overlaid_CDMA_Code;
5311 
5312   gboolean                      Exist_EC_Packet_Timing_Advance;
5313   EC_Packet_Timing_Advance_t    EC_Packet_Timing_Advance;
5314 
5315   gboolean                      Exist_Frequency_Parameters;
5316   EC_Frequency_Parameters_t     Frequency_Parameters;
5317 
5318   guint8                        UL_COVERAGE_CLASS;
5319   guint8                        STARTING_UL_TIMESLOT;
5320   guint8                        TIMESLOT_MULTIPLICATOR;
5321 
5322   Fixed_Uplink_Allocation_t     Fixed_Uplink_Allocation;
5323 
5324   gboolean                      Exist_P0_and_PR_MODE;
5325   guint8                        P0;
5326   guint8                        PR_MODE;
5327 
5328   gboolean                      Exist_GAMMA;
5329   guint8                        GAMMA;
5330   guint8                        ALPHA_Enable;
5331 
5332   guint8                        DL_COVERAGE_CLASS;
5333   guint8                        STARTING_DL_TIMESLOT_OFFSET;
5334 
5335 }
5336 EC_Packet_Uplink_Assignment_t;
5337 
5338 typedef struct
5339 {
5340   guint8                           MESSAGE_TYPE;
5341   guint8                           USED_DL_COVERAGE_CLASS;
5342   guint8                           UPLINK_TFI;
5343   guint32                          CONTENTION_RESOLUTION_TLLI;
5344   EC_Primary_AckNack_Description_t EC_AckNack_Description;
5345 
5346   Fixed_Uplink_Allocation_t        PUANCR_Fixed_Uplink_Allocation;
5347   guint8                           RESEGMENT;
5348 }
5349 EC_Packet_Uplink_Ack_Nack_And_Contention_Resolution_t;
5350 
5351 typedef struct
5352 {
5353   guint8                        MESSAGE_TYPE;
5354   guint8                        USED_DL_COVERAGE_CLASS;
5355 }
5356 EC_Packet_Downlink_Dummy_Control_Block_t;
5357 
5358 typedef struct
5359 {
5360   guint8                        MESSAGE_TYPE;
5361   guint32                       TLLI;
5362   guint8                        CTRL_ACK;
5363   guint8                        DL_CC_EST;
5364 }
5365 EC_Packet_Control_Acknowledgement_t;
5366 
5367 typedef struct
5368 {
5369   guint8                        PRIORITY;
5370   guint8                        NUMBER_OF_UL_DATA_BLOCKS;
5371 }
5372 EC_Channel_Request_Description_t;
5373 
5374 typedef struct
5375 {
5376   gboolean                      Exist_GMSK;
5377   guint8                        GMSK_MEAN_BEP;
5378   guint8                        GMSK_CV_BEP;
5379   gboolean                      Exist_8PSK;
5380   guint8                        PSK_MEAN_BEP;
5381   guint8                        PSK_CV_BEP;
5382   guint8                        C_VALUE;
5383 }
5384 EC_Channel_Quality_Report_t;
5385 
5386 typedef struct
5387 {
5388   guint8                        MESSAGE_TYPE;
5389   guint8                        DOWNLINK_TFI;
5390   guint8                        MS_OUT_OF_MEMORY;
5391   guint8                        Final_Ack_Indicator;
5392 
5393   EC_AckNack_Description_t      EC_AckNack_Description;
5394 
5395   gboolean                      Exist_EC_Channel_Quality_Report; /* DL CC EST is also conditional on this */
5396   EC_Channel_Quality_Report_t   EC_Channel_Quality_Report;
5397   guint8                        DL_CC_EST;
5398 
5399   gboolean                         Exist_EC_Channel_Request_Description;
5400   EC_Channel_Request_Description_t EC_Channel_Request_Description;
5401 }
5402 EC_Packet_Downlink_Ack_Nack_t;
5403 
5404 /*
5405 < NC Measurement Parameters struct > ::=
5406                                         < NETWORK_CONTROL_ORDER : bit (2) >
5407                                         { 0 | 1 < NC_ NON_DRX_PERIOD : bit (3) >
5408                                         < NC_REPORTING_PERIOD_I : bit (3) >
5409                                         < NC_REPORTING_PERIOD_T : bit (3) > } ;
5410 < Cell Selection struct > ::=
5411                              < EXC_ACC : bit >
5412                              < CELL_BAR_ACCESS_2 : bit (1) >
5413                              < SAME_RA_AS_SERVING_CELL : bit (1) >
5414                              { 0 | 1  < GPRS_RXLEV_ACCESS_MIN : bit (6) >
5415                              < GPRS_MS_TXPWR_MAX_CCH : bit (5) > }
5416 { 0 | 1 < GPRS_TEMPORARY_OFFSET : bit (3) >
5417    < GPRS_PENALTY_TIME : bit (5) > }
5418 Table 25 (concluded): PACKET CELL CHANGE ORDER message content
5419    { 0 | 1  < GPRS_RESELECT_OFFSET : bit (5) > }
5420 { 0 | 1  < HCS params : < HCS struct > > }
5421 { 0 | 1 < SI13_PBCCH_LOCATION : < SI13_PBCCH_LOCATION struct > > } ;
5422 
5423 < SI13_PBCCH_LOCATION struct > ::=
5424                                   { 0  < SI13_LOCATION : bit (1) >
5425                                   | 1  < PBCCH_LOCATION : bit (2) >
5426                                   < PSI1_REPEAT_PERIOD : bit (4) > } ;
5427 
5428 < HCS struct > ::=
5429                   < GPRS_PRIORITY_CLASS : bit (3) >
5430                   < GPRS_HCS_THR : bit (5) > ;
5431 */
5432 
5433 /* < Downlink RLC/MAC control message > */
5434 #define MT_PACKET_CELL_CHANGE_ORDER            0x01
5435 #define MT_PACKET_DOWNLINK_ASSIGNMENT          0x02
5436 #define MT_PACKET_MEASUREMENT_ORDER            0x03
5437 #define MT_PACKET_POLLING_REQ                  0x04
5438 #define MT_PACKET_POWER_CONTROL_TIMING_ADVANCE 0x05
5439 #define MT_PACKET_QUEUEING_NOTIFICATION        0x06
5440 #define MT_PACKET_TIMESLOT_RECONFIGURE         0x07
5441 #define MT_PACKET_TBF_RELEASE                  0x08
5442 #define MT_PACKET_UPLINK_ACK_NACK              0x09
5443 #define MT_PACKET_UPLINK_ASSIGNMENT            0x0A
5444 #define MT_PACKET_CELL_CHANGE_CONTINUE         0x0B
5445 #define MT_PACKET_NEIGHBOUR_CELL_DATA          0x0C
5446 #define MT_PACKET_SERVING_CELL_DATA            0x0D
5447 #define MT_PACKET_HANDOVER_COMMAND             0x15
5448 #define MT_PACKET_PHYSICAL_INFORMATION         0x16
5449 #define MT_PACKET_ACCESS_REJECT                0x21
5450 #define MT_PACKET_PAGING_REQUEST               0x22
5451 #define MT_PACKET_PDCH_RELEASE                 0x23
5452 #define MT_PACKET_PRACH_PARAMETERS             0x24
5453 #define MT_PACKET_DOWNLINK_DUMMY_CONTROL_BLOCK 0x25
5454 #define MT_PACKET_SYSTEM_INFO_6                0x30
5455 #define MT_PACKET_SYSTEM_INFO_1                0x31
5456 #define MT_PACKET_SYSTEM_INFO_2                0x32
5457 #define MT_PACKET_SYSTEM_INFO_3                0x33
5458 #define MT_PACKET_SYSTEM_INFO_3_BIS            0x34
5459 #define MT_PACKET_SYSTEM_INFO_4                0x35
5460 #define MT_PACKET_SYSTEM_INFO_5                0x36
5461 #define MT_PACKET_SYSTEM_INFO_13               0x37
5462 #define MT_PACKET_SYSTEM_INFO_7                0x38
5463 #define MT_PACKET_SYSTEM_INFO_8                0x39
5464 #define MT_PACKET_SYSTEM_INFO_14               0x3A
5465 #define MT_PACKET_SYSTEM_INFO_3_TER            0x3C
5466 #define MT_PACKET_SYSTEM_INFO_3_QUATER         0x3D
5467 #define MT_PACKET_SYSTEM_INFO_15               0x3E
5468 
5469 /* < Uplink RLC/MAC control message > */
5470 #define MT_PACKET_CELL_CHANGE_FAILURE          0x00
5471 #define MT_PACKET_CONTROL_ACK                  0x01
5472 #define MT_PACKET_DOWNLINK_ACK_NACK            0x02
5473 #define MT_PACKET_UPLINK_DUMMY_CONTROL_BLOCK   0x03
5474 #define MT_PACKET_MEASUREMENT_REPORT           0x04
5475 #define MT_PACKET_RESOURCE_REQUEST             0x05
5476 #define MT_PACKET_MOBILE_TBF_STATUS            0x06
5477 #define MT_PACKET_PSI_STATUS                   0x07
5478 #define MT_EGPRS_PACKET_DOWNLINK_ACK_NACK      0x08
5479 #define MT_PACKET_PAUSE                        0x09
5480 #define MT_PACKET_ENHANCED_MEASUREMENT_REPORT  0x0A
5481 #define MT_ADDITIONAL_MS_RAC                   0x0B
5482 #define MT_PACKET_CELL_CHANGE_NOTIFICATION     0x0C
5483 #define MT_PACKET_SI_STATUS                    0x0D
5484 #define MT_ENHANCED_MEASUREMENT_REPORT         0x04
5485 
5486 /* < Downlink EC-GSM-IoT RLC/MAC control messages > */
5487 #define MT_EC_PACKET_ACCESS_REJECT                               0x11
5488 #define MT_EC_PACKET_DOWNLINK_ASSIGNMENT                         0x01
5489 #define MT_EC_PACKET_POLLING_REQ                                 0x02
5490 #define MT_EC_PACKET_POWER_CONTROL_TIMING_ADVANCE                0x03
5491 #define MT_EC_PACKET_TBF_RELEASE                                 0x04
5492 #define MT_EC_PACKET_UPLINK_ACK_NACK                             0x05
5493 #define MT_EC_PACKET_UPLINK_ASSIGNMENT                           0x06
5494 #define MT_EC_PACKET_UPLINK_ACK_NACK_AND_CONTENTION_RESOLUTION   0x07
5495 #define MT_EC_PACKET_DOWNLINK_DUMMY_CONTROL_BLOCK                0x12
5496 
5497 /* < Uplink EC-GSM-IoT RLC/MAC control messages > */
5498 #define MT_EC_PACKET_CONTROL_ACKNOWLEDGEMENT      0x01
5499 #define MT_EC_PACKET_DOWNLINK_ACK_NACK            0x02
5500 
5501 typedef enum
5502 {
5503     RLCMAC_PRACH = 0x20,
5504     RLCMAC_CS1 = 0x21,
5505     RLCMAC_CS2 = 0x22,
5506     RLCMAC_CS3 = 0x23,
5507     RLCMAC_CS4 = 0x24,
5508     RLCMAC_HDR_TYPE_1 = 0x31,
5509     RLCMAC_HDR_TYPE_2 = 0x32,
5510     RLCMAC_HDR_TYPE_3 = 0x33,
5511     RLCMAC_HDR_TYPE_4 = 0x34,
5512     RLCMAC_HDR_TYPE_5 = 0x35,
5513     RLCMAC_HDR_TYPE_6 = 0x36,
5514     RLCMAC_HDR_TYPE_7 = 0x37,
5515     RLCMAC_HDR_TYPE_8 = 0x38,
5516     RLCMAC_HDR_TYPE_9 = 0x39,
5517     RLCMAC_HDR_TYPE_10 = 0x3a,
5518     RLCMAC_EC_CS1 = 0x40,
5519     RLCMAC_HDR_TYPE_1_EC   = 0x41,
5520     RLCMAC_HDR_TYPE_2_EC   = 0x42,
5521     RLCMAC_HDR_TYPE_3_EC   = 0x43
5522 }RLCMAC_block_format_t;
5523 
5524 /* < Downlink RLC/MAC control message > */
5525 typedef struct
5526 {
5527   union
5528   {
5529     guint8                                   MESSAGE_TYPE;
5530     DL_Data_Block_GPRS_t                     DL_Data_Block_GPRS;
5531     DL_Data_Block_EGPRS_Header_t             DL_Data_Block_EGPRS_Header;
5532     Packet_Access_Reject_t                   Packet_Access_Reject;
5533     Packet_Cell_Change_Order_t               Packet_Cell_Change_Order;
5534     Packet_Cell_Change_Continue_t            Packet_Cell_Change_Continue;
5535     Packet_Downlink_Assignment_t             Packet_Downlink_Assignment;
5536     Packet_Measurement_Order_t               Packet_Measurement_Order;
5537     Packet_Neighbour_Cell_Data_t             Packet_Neighbour_Cell_Data;
5538     Packet_Serving_Cell_Data_t               Packet_Serving_Cell_Data;
5539     Packet_Paging_Request_t                  Packet_Paging_Request;
5540     Packet_PDCH_Release_t                    Packet_PDCH_Release;
5541     Packet_Polling_Request_t                 Packet_Polling_Request;
5542     Packet_Power_Control_Timing_Advance_t    Packet_Power_Control_Timing_Advance;
5543     Packet_PRACH_Parameters_t                Packet_PRACH_Parameters;
5544     Packet_Queueing_Notification_t           Packet_Queueing_Notification;
5545     Packet_Timeslot_Reconfigure_t            Packet_Timeslot_Reconfigure;
5546     Packet_TBF_Release_t                     Packet_TBF_Release;
5547     Packet_Uplink_Ack_Nack_t                 Packet_Uplink_Ack_Nack;
5548     Packet_Uplink_Assignment_t               Packet_Uplink_Assignment;
5549     Packet_Handover_Command_t                Packet_Handover_Command;
5550     Packet_PhysicalInformation_t             Packet_PhysicalInformation;
5551     Packet_Downlink_Dummy_Control_Block_t    Packet_Downlink_Dummy_Control_Block;
5552     PSI1_t                                   PSI1;
5553     PSI2_t                                   PSI2;
5554     PSI3_t                                   PSI3;
5555     PSI5_t                                   PSI5;
5556     PSI13_t                                  PSI13;
5557     EC_Packet_Access_Reject_t                EC_Packet_Access_Reject;
5558     EC_Packet_Downlink_Assignment_t          EC_Packet_Downlink_Assignment;
5559     EC_Packet_Polling_Req_t                  EC_Packet_Polling_Req;
5560     EC_Packet_Power_Control_Timing_Advance_t EC_Packet_Power_Control_Timing_Advance;
5561     EC_Packet_Tbf_Release_t                  EC_Packet_Tbf_Release;
5562     EC_Packet_Uplink_Ack_Nack_t              EC_Packet_Uplink_Ack_Nack;
5563     EC_Packet_Uplink_Assignment_t            EC_Packet_Uplink_Assignment;
5564     EC_Packet_Uplink_Ack_Nack_And_Contention_Resolution_t EC_Packet_Uplink_Ack_Nack_And_Contention_Resolution;
5565     EC_Packet_Downlink_Dummy_Control_Block_t EC_Packet_Downlink_Dummy_Control_Block;
5566   } u;
5567 
5568   RLCMAC_block_format_t block_format;
5569   guint            flags;
5570 } RlcMacDownlink_t;
5571 
5572 typedef gint16 MSGGPRS_Status_t;
5573 /* < Uplink RLC/MAC control message > */
5574 typedef struct
5575 {
5576   union
5577   {
5578     guint8 MESSAGE_TYPE;
5579     Packet_Cell_Change_Failure_t          Packet_Cell_Change_Failure;
5580     Packet_Control_Acknowledgement_t      Packet_Control_Acknowledgement;
5581     Packet_Downlink_Ack_Nack_t            Packet_Downlink_Ack_Nack;
5582     Packet_Uplink_Dummy_Control_Block_t   Packet_Uplink_Dummy_Control_Block;
5583     Packet_Measurement_Report_t           Packet_Measurement_Report;
5584     Packet_Resource_Request_t             Packet_Resource_Request;
5585     Packet_Mobile_TBF_Status_t            Packet_Mobile_TBF_Status;
5586     Packet_PSI_Status_t                   Packet_PSI_Status;
5587     EGPRS_PD_AckNack_t                    Egprs_Packet_Downlink_Ack_Nack;
5588     Packet_Pause_t                        Packet_Pause;
5589     Packet_Enh_Measurement_Report_t       Packet_Enh_Measurement_Report;
5590     Additional_MS_Rad_Access_Cap_t        Additional_MS_Rad_Access_Cap;
5591     Packet_Cell_Change_Notification_t     Packet_Cell_Change_Notification;
5592     Packet_SI_Status_t                    Packet_SI_Status;
5593     UL_Data_Block_GPRS_t                  UL_Data_Block_GPRS;
5594     UL_Data_Block_EGPRS_Header_t          UL_Data_Block_EGPRS_Header;
5595     UL_Packet_Control_Ack_11_t            UL_Packet_Control_Ack_11;
5596     UL_Packet_Control_Ack_TN_RRBP_11_t    UL_Packet_Control_Ack_TN_RRBP_11;
5597     UL_Packet_Control_Ack_8_t             UL_Packet_Control_Ack_8;
5598     UL_Packet_Control_Ack_TN_RRBP_8_t     UL_Packet_Control_Ack_TN_RRBP_8;
5599     EC_Packet_Control_Acknowledgement_t   EC_Packet_Control_Acknowledgement;
5600     EC_Packet_Downlink_Ack_Nack_t         EC_Packet_Downlink_Ack_Nack;
5601   } u;
5602   RLCMAC_block_format_t block_format;
5603   guint            flags;
5604 } RlcMacUplink_t;
5605 
5606 typedef struct
5607 {
5608    guint16 bsn1;
5609    guint16 bsn2;
5610    guint8 pi;
5611 }egprs_ul_header_info_t;
5612 
5613 typedef struct
5614 {
5615    guint16 bsn1;
5616    guint16 bsn2;
5617 }egprs_dl_header_info_t;
5618 
5619 typedef struct
5620 {
5621    guint            magic;
5622    RLCMAC_block_format_t block_format;
5623    guint8           mcs;
5624    guint            frame_number;
5625 #define GSM_RLC_MAC_EGPRS_BLOCK1 0x01
5626 #define GSM_RLC_MAC_EGPRS_BLOCK2 0x02
5627 #define GSM_RLC_MAC_EGPRS_FANR_FLAG 0x08
5628    guint            flags;
5629    union
5630    {
5631       egprs_ul_header_info_t egprs_ul_header_info;
5632       egprs_dl_header_info_t egprs_dl_header_info;
5633    }u;
5634 } RlcMacPrivateData_t;
5635 
5636 
5637 #if 0
5638 void GPRSMSG_Profile(gint16 i);
5639 #endif
5640 
5641 /* SI1_RestOctet_t */
5642 
5643 typedef struct
5644 {
5645   gboolean            Exist_NCH_Position;
5646   guint8              NCH_Position;
5647 
5648   guint8              BandIndicator;
5649 } SI1_RestOctet_t;
5650 
5651 /* SI3_Rest_Octet_t */
5652 typedef struct
5653 {
5654   guint8 CBQ;
5655   guint8 CELL_RESELECT_OFFSET;
5656   guint8 TEMPORARY_OFFSET;
5657   guint8 PENALTY_TIME;
5658 } Selection_Parameters_t;
5659 
5660 typedef struct
5661 {
5662   guint8 Exist_Selection_Parameters;
5663   Selection_Parameters_t Selection_Parameters;
5664 
5665   guint8 Exist_Power_Offset;
5666   guint8 Power_Offset;
5667 
5668   guint8 System_Information_2ter_Indicator;
5669   guint8 Early_Classmark_Sending_Control;
5670 
5671   guint8 Exist_WHERE;
5672   guint8 WHERE;
5673 
5674   guint8 Exist_GPRS_Indicator;
5675   guint8 RA_COLOUR;
5676   guint8 SI13_POSITION;
5677   guint8 ECS_Restriction3G;
5678   guint8 ExistSI2quaterIndicator;
5679   guint8 SI2quaterIndicator;
5680 } SI3_Rest_Octet_t;
5681 
5682 typedef struct
5683 {
5684   guint8 Exist_Selection_Parameters;
5685   Selection_Parameters_t Selection_Parameters;
5686 
5687   guint8 Exist_Power_Offset;
5688   guint8 Power_Offset;
5689 
5690   guint8 Exist_GPRS_Indicator;
5691   guint8 RA_COLOUR;
5692   guint8 SI13_POSITION;
5693 } SI4_Rest_Octet_t;
5694 
5695 #if 0
5696 typedef SI4_Rest_Octet_t SI7_Rest_Octet_t;
5697 typedef SI4_Rest_Octet_t SI8_Rest_Octet_t;
5698 #endif
5699 
5700 /* SI6_RestOctet_t */
5701 
5702 typedef struct
5703 {
5704   guint8   PagingChannelRestructuring;
5705   guint8   NLN_SACCH;
5706 
5707   gboolean Exist_CallPriority;
5708   guint8   CallPriority;
5709 
5710   guint8   NLN_Status;
5711 } PCH_and_NCH_Info_t;
5712 
5713 typedef struct
5714 {
5715   gboolean            Exist_PCH_and_NCH_Info;
5716   PCH_and_NCH_Info_t PCH_and_NCH_Info;
5717 
5718   gboolean            Exist_VBS_VGCS_Options;
5719   guint8              VBS_VGCS_Options;
5720 
5721   /* The meaning of Exist_DTM_Support is as follows:
5722    * FALSE => DTM is not supported in the serving cell, RAC and MAX_LAPDm are absent in bitstream
5723    * TRUE  => DTM is supported in the serving cell, RAC and MAX_LAPDm are present in bitstream
5724    */
5725   gboolean            Exist_DTM_Support;
5726   guint8              RAC;
5727   guint8              MAX_LAPDm;
5728 
5729   guint8              BandIndicator; /* bit(1) L/H, L => ARFCN in 1800 band H => ARFCN in 1900 band */
5730 } SI6_RestOctet_t;
5731 
5732 /*************************************************
5733  * Enhanced Measurement Report. TS 04.18 9.1.55. *
5734  *************************************************/
5735 
5736 typedef struct
5737 {
5738   guint8        DTX_USED;
5739   guint8        RXLEV_VAL;
5740   guint8        RX_QUAL_FULL;
5741   guint8        MEAN_BEP;
5742   guint8        CV_BEP;
5743   guint8        NBR_RCVD_BLOCKS;
5744 } EMR_ServingCell_t;
5745 
5746 typedef struct
5747 {
5748   guint8 RR_Short_PD;
5749   guint8 MESSAGE_TYPE;
5750   guint8 ShortLayer2_Header;
5751 
5752   BA_USED_t BA_USED;
5753   guint8 BSIC_Seen;
5754 
5755   guint8 SCALE;
5756 
5757   guint8 Exist_ServingCellData;
5758   EMR_ServingCell_t ServingCellData;
5759 
5760   guint8 Count_RepeatedInvalid_BSIC_Info; /* Number of instances */
5761   RepeatedInvalid_BSIC_Info_t RepeatedInvalid_BSIC_Info[INV_BSIC_LIST_LEN];
5762 
5763   guint8 Exist_ReportBitmap;
5764   guint8 Count_REPORTING_QUANTITY_Instances; /* Number of instances */
5765   REPORTING_QUANTITY_Instance_t REPORTING_QUANTITY_Instances[REPORT_QUANTITY_LIST_LEN];
5766 
5767 } EnhancedMeasurementReport_t;
5768 
5769 extern const guint8 gsm_rlcmac_gprs_cs_to_block_length[];
5770 extern const guint8 gsm_rlcmac_egprs_header_type_to_dl_header_block_length[];
5771 extern const guint8 gsm_rlcmac_egprs_header_type_to_ul_header_block_length[];
5772 extern const guint8 gsm_rlcmac_egprs_mcs_to_data_block_length[];
5773 
5774 #endif /* __PACKET_GSM_RLCMAC_H__ */
5775 
5776 /*
5777  * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
5778  *
5779  * Local Variables:
5780  * c-basic-offset: 2
5781  * tab-width: 8
5782  * indent-tabs-mode: nil
5783  * End:
5784  *
5785  * vi: set shiftwidth=2 tabstop=8 expandtab:
5786  * :indentSize=2:tabSize=8:noTabs=true:
5787  */
5788