comparison src/g23m-gprs/gmm/gmm.h @ 1:d393cd9bb723

src/g23m-*: initial import from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 15 Jul 2018 04:40:46 +0000
parents
children
comparison
equal deleted inserted replaced
0:b6a5e36de839 1:d393cd9bb723
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GPRS (8441)
4 | Modul : gmm.h
5 +-----------------------------------------------------------------------------
6 | Copyright 2002 Texas Instruments Berlin, AG
7 | All rights reserved.
8 |
9 | This file is confidential and a trade secret of Texas
10 | Instruments Berlin, AG
11 | The receipt of or possession of this file does not convey
12 | any rights to reproduce or disclose its contents or to
13 | manufacture, use, or sell anything it may describe, in
14 | whole, or in part, without the specific written consent of
15 | Texas Instruments Berlin, AG.
16 +-----------------------------------------------------------------------------
17 | Purpose : Definitions for the Protocol Stack Entity
18 | GPRS Mobility Management (GPRS)
19 +-----------------------------------------------------------------------------
20 */
21
22
23 #ifndef GMM_H
24 #define GMM_H
25
26 #define ENTITY_GMM
27
28 #include "message.h"
29 /*==== DIAGNOSTICS ==========================================================*/
30 /*
31 * GMM_TCS4 is defined to use MMPM SAP document from TI DK
32 */
33 #ifndef GMM_TCS4
34 #define GMM_TCS4
35 #endif
36
37
38 #ifdef TRACE_FUNC
39 #ifdef IDENTATION
40 #define GMM_TRACE_FUNCTION(a) \
41 char trace_string[]=a;\
42 vsi_o_ttrace(VSI_CALLER TC_FUNC,"%*s%s() {",gmm_data->deep,"",trace_string);\
43 gmm_data->deep+=4;
44 #define GMM_RETURN vsi_o_ttrace(VSI_CALLER TC_FUNC,"%*s} /* %s */",gmm_data->deep-=4,"",trace_string);return;
45 #define GMM_RETURN_(a) \
46 vsi_o_ttrace(VSI_CALLER TC_FUNC,"%*s} /* %s() */",gmm_data->deep-=4,"",\
47 trace_string);\
48 return a;
49 #else
50 #define GMM_TRACE_FUNCTION(a) vsi_o_ttrace(VSI_CALLER TC_FUNC,a)
51 #define GMM_RETURN return
52 #define GMM_RETURN_(a) return (a)
53
54 #endif
55
56 #else
57 #define GMM_TRACE_FUNCTION(a)
58 #define GMM_RETURN return
59 #define GMM_RETURN_(a) return (a)
60 #endif
61
62 #ifdef TRACE_ERR
63 #define GMM_TRACE_0_ERROR(s) vsi_o_error_ttrace(s)
64 #define GMM_TRACE_1_ERROR(s,p1) vsi_o_error_ttrace(s,p1)
65 #else
66 #define GMM_TRACE_1_ERROR(s,p1)
67 #endif
68
69 #ifdef TRACE_EVE
70 #define TRACE_0_DATA(s) vsi_o_ttrace(VSI_CALLER TC_USER1, "Data: " s)
71 #define TRACE_1_DATA(s,p1) vsi_o_ttrace(VSI_CALLER TC_USER1, "Data: " s,p1)
72 #define TRACE_2_DATA(s,p1,p2) vsi_o_ttrace(VSI_CALLER TC_USER1, "Data: " s,p1,p2)
73 #define TRACE_3_DATA(s,p1,p2,p3) vsi_o_ttrace(VSI_CALLER TC_USER1, "Data: " s,p1,p2,p3)
74 #define TRACE_4_DATA(s,p1,p2,p3,p4) vsi_o_ttrace(VSI_CALLER TC_USER1, "Data: " s,p1,p2,p3,p4)
75 #define TRACE_5_DATA(s,p1,p2,p3,p4,p5) vsi_o_ttrace(VSI_CALLER TC_USER1, "Data: " s,p1,p2,p3,p4,p5)
76 #define TRACE_6_DATA(s,p1,p2,p3,p4,p5,p6) vsi_o_ttrace(VSI_CALLER TC_USER1, "Data: " s,p1,p2,p3,p4,p5,p6)
77 #define TRACE_7_DATA(s,p1,p2,p3,p4,p5,p6,p7) vsi_o_ttrace(VSI_CALLER TC_USER1, "Data: " s,p1,p2,p3,p4,p5,p6,p7)
78 #define TRACE_8_DATA(s,p1,p2,p3,p4,p5,p6,p7,p8) vsi_o_ttrace(VSI_CALLER TC_USER1, "Data: " s,p1,p2,p3,p4,p5,p6,p7,p8)
79 #define TRACE_9_DATA(s,p1,p2,p3,p4,p5,p6,p7,p8,p9) vsi_o_ttrace(VSI_CALLER TC_USER1, "Data: " s,p1,p2,p3,p4,p5,p6,p7,p8,p9)
80 #else
81 #define TRACE_0_DATA(s)
82 #define TRACE_1_DATA(s,p1)
83 #define TRACE_2_DATA(s,p1,p2)
84 #define TRACE_3_DATA(s,p1,p2,p3)
85 #define TRACE_4_DATA(s,p1,p2,p3,p4)
86 #define TRACE_5_DATA(s,p1,p2,p3,p4,p5)
87 #define TRACE_6_DATA(s,p1,p2,p3,p4,p5,p6)
88 #define TRACE_7_DATA(s,p1,p2,p3,p4,p5,p6,p7)
89 #define TRACE_8_DATA(s,p1,p2,p3,p4,p5,p6,p7,p8)
90 #define TRACE_9_DATA(s,p1,p2,p3,p4,p5,p6,p7,p8,p9)
91 #endif
92
93
94 #ifdef TRACE_EVE
95 #define TRACE_0_INFO(s) vsi_o_ttrace(VSI_CALLER TC_EVENT, "Info: " s)
96 #define TRACE_1_INFO(s,p1) vsi_o_ttrace(VSI_CALLER TC_EVENT, "Info: " s,p1)
97 #define TRACE_2_INFO(s,p1,p2) vsi_o_ttrace(VSI_CALLER TC_EVENT, "Info: " s,p1,p2)
98 #define TRACE_3_INFO(s,p1,p2,p3) vsi_o_ttrace(VSI_CALLER TC_EVENT, "Info: " s,p1,p2,p3)
99 #define TRACE_4_INFO(s,p1,p2,p3,p4) vsi_o_ttrace(VSI_CALLER TC_EVENT, "Info: " s,p1,p2,p3,p4)
100 #else
101 #define TRACE_0_INFO(s)
102 #define TRACE_1_INFO(s,p1)
103 #define TRACE_2_INFO(s,p1,p2)
104 #define TRACE_3_INFO(s,p1,p2,p3)
105 #define TRACE_4_INFO(s,p1,p2,p3,p4)
106 #endif
107
108 #ifdef TRACE_PRIM
109 #define TRACE_0_PARA(s) vsi_o_ttrace(VSI_CALLER TC_PRIM, "Para: " s)
110 #define TRACE_1_PARA(s,p1) vsi_o_ttrace(VSI_CALLER TC_PRIM, "Para: " s,p1)
111 #define TRACE_2_PARA(s,p1,p2) vsi_o_ttrace(VSI_CALLER TC_PRIM, "Para: " s,p1,p2)
112 #define TRACE_3_PARA(s,p1,p2,p3) vsi_o_ttrace(VSI_CALLER TC_PRIM, "Para: " s,p1,p2,p3)
113 #define TRACE_4_PARA(s,p1,p2,p3,p4) vsi_o_ttrace(VSI_CALLER TC_PRIM, "Para: " s,p1,p2,p3,p4)
114 #define TRACE_7_PARA(s,p1,p2,p3,p4,p5,p6,p7) vsi_o_ttrace(VSI_CALLER TC_PRIM, "Para: " s,p1,p2,p3,p4,p5,p6,p7)
115 #define TRACE_8_PARA(s,p1,p2,p3,p4,p5,p6,p7,p8) vsi_o_ttrace(VSI_CALLER TC_PRIM, "Para: " s,p1,p2,p3,p4,p5,p6,p7,p8)
116 #define TRACE_9_PARA(s,p1,p2,p3,p4,p5,p6,p7,p8,p9) vsi_o_ttrace(VSI_CALLER TC_PRIM, "Para: " s,p1,p2,p3,p4,p5,p6,p7,p8,p9)
117 #define TRACE_10_PARA(s,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10) vsi_o_ttrace(VSI_CALLER TC_PRIM, "Para: " s,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10)
118 #define TRACE_11_PARA(s,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11) vsi_o_ttrace(VSI_CALLER TC_PRIM, "Para: " s,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11)
119 #define TRACE_12_PARA(s,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12) vsi_o_ttrace(VSI_CALLER TC_PRIM, "Para: " s,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12)
120
121 #define TRACE_0_OUT_PARA(s) vsi_o_ttrace(VSI_CALLER TC_PRIM, "OPar: " s)
122 #define TRACE_1_OUT_PARA(s,p1) vsi_o_ttrace(VSI_CALLER TC_PRIM, "OPar: " s,p1)
123 #define TRACE_2_OUT_PARA(s,p1,p2) vsi_o_ttrace(VSI_CALLER TC_PRIM, "OPar: " s,p1,p2)
124 #define TRACE_3_OUT_PARA(s,p1,p2,p3) vsi_o_ttrace(VSI_CALLER TC_PRIM, "OPar: " s,p1,p2,p3)
125 #define TRACE_4_OUT_PARA(s,p1,p2,p3,p4) vsi_o_ttrace(VSI_CALLER TC_PRIM, "OPar: " s,p1,p2,p3,p4)
126 #define TRACE_8_OUT_PARA(s,p1,p2,p3,p4,p5,p6,p7,p8) vsi_o_ttrace(VSI_CALLER TC_PRIM, "OPar: " s,p1,p2,p3,p4,p5,p6,p7,p8)
127 #define TRACE_9_OUT_PARA(s,p1,p2,p3,p4,p5,p6,p7,p8,p9) vsi_o_ttrace(VSI_CALLER TC_PRIM, "OPar: " s,p1,p2,p3,p4,p5,p6,p7,p8,p9)
128 #define TRACE_PRIM_FROM(s) vsi_o_ttrace(VSI_CALLER TC_PRIM, "Pdir: " s)
129 #define TRACE_PRIM_TO(s) vsi_o_ttrace(VSI_CALLER TC_PRIM, "Pdir: " s)
130 #else
131 #define TRACE_0_PARA(s)
132 #define TRACE_1_PARA(s,p1)
133 #define TRACE_2_PARA(s,p1,p2)
134 #define TRACE_3_PARA(s,p1,p2,p3)
135 #define TRACE_4_PARA(s,p1,p2,p3,p4)
136 #define TRACE_7_PARA(s,p1,p2,p3,p4,p5,p6,p7)
137 #define TRACE_8_PARA(s,p1,p2,p3,p4,p5,p6,p7,p8)
138 #define TRACE_9_PARA(s,p1,p2,p3,p4,p5,p6,p7,p8,p9)
139 #define TRACE_10_PARA(s,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10)
140 #define TRACE_11_PARA(s,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11)
141 #define TRACE_12_PARA(s,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12)
142
143 #define TRACE_0_OUT_PARA(s)
144 #define TRACE_1_OUT_PARA(s,p1)
145 #define TRACE_2_OUT_PARA(s,p1,p2)
146 #define TRACE_3_OUT_PARA(s,p1,p2,p3)
147 #define TRACE_4_OUT_PARA(s,p1,p2,p3,p4)
148 #define TRACE_8_OUT_PARA(s,p1,p2,p3,p4,p5,p6,p7,p8)
149 #define TRACE_9_OUT_PARA(s,p1,p2,p3,p4,p5,p6,p7,p8,p9)
150 #define TRACE_PRIM_FROM(s)
151 #define TRACE_PRIM_TO(s)
152 #endif
153
154
155 #ifndef TRACE_INFO /* only used in local environment */
156 # define TRACE_INFO(x)
157 #endif
158
159 #ifndef TRACE_COMMENT /* only used in local environment */
160 # define TRACE_COMMENT(x)
161 #endif
162
163 /*
164 * This is just a TEMPORARY define until the issues with OPTION_MULTITHREAD
165 * are settled. This define SHOULD be contained in GSM.H.
166 */
167 #undef _ENTITY_PREFIXED
168 #define _ENTITY_PREFIXED(N) gmm_##N
169 /*
170 * defines the user of the vsi interface
171 */
172 #define VSI_CALLER GMM_handle,
173 #define VSI_CALLER_SINGLE GMM_handle
174
175 /* TCS 2.1 */
176 /* TCS 2.1 */
177 /* TCS 2.1 */
178 /*
179 ****************************************************************************
180 * The following declarations shall be identical with the corresponding
181 * declarations located in RR.
182 ****************************************************************************
183 */
184 #ifdef GPRS
185 EXTERN UBYTE rr_csf_get_radio_access_capability( T_ra_cap *ra_cap );
186 #endif
187
188 /*
189 ****************************************************************************
190 * The above declarations shall be identical with the corresponding
191 * declarations located in RR.
192 ****************************************************************************
193 */
194
195 /*
196 * This is just a TEMPORARY define until the issues with OPTION_MULTITHREAD
197 * are settled. This define SHOULD be contained in GSM.H.
198 */
199
200 #define SEND_ATTACH_COMPLETE 1
201 #define SEND_NOT_ATTACH_COMPLETE 0
202 /*
203 * max attach attempts
204 */
205 #define MAX_AAC 5
206 /*
207 * max attempts for timeout of T3310
208 */
209 #define MAX_CT3310 5
210 /*
211 * If the skip bit in the message is not 0 the message is invalid
212 */
213 #define SKIP_VALID 0
214
215 /*
216 * Bitoffset for encoding/decoding
217 * LLC header size
218 * and LLC tail size
219 */
220 #define ENCODE_OFFSET (37*8)
221 #define ENCODE_LLC_FCS_SIZE (3*8)
222
223 /*
224 * These MASKS are defined in GSM 03.03 and needed for translation
225 * from PTMSI to TLLI
226 */
227 /*
228 * 11 ...
229 */
230 #define LOCAL_TLLI_SET_MASK 0xC0000000
231 #define LOCAL_TLLI_RES_MASK 0xFFFFFFFF
232 /*
233 * 10 ...
234 */
235 #define FOREIGN_TLLI_SET_MASK 0x80000000
236 #define FOREIGN_TLLI_RES_MASK 0xBFFFFFFF
237 /*
238 * 01111 ...
239 */
240 #define RANDOM_TLLI_SET_MASK 0x78000000
241 #define RANDOM_TLLI_RES_MASK 0x7FFFFFFF
242
243 #define INVALID_PTMSI_SIGNATURE 0xffffff
244
245 #define INVALID_PDP_CONTEXT_STATUS 0xffff
246
247 #ifdef FRAME_OFFSET_ZERO
248
249 #define GET_PD(s,p) p=s.buf[3] & 0x0F
250 #define GET_TI(s,t) t=(s.buf[3] & 0xF0)>>4
251
252 #else
253
254 #define GET_PD(s,p) ccd_decodeByte(s.buf, (USHORT)(s.o_buf+4), 4, &p)
255 #define GET_TI(s,t) ccd_decodeByte(s.buf, s.o_buf, 4, &t)
256
257 #endif
258
259 /*
260 * Protocol Discrimator
261 */
262 #define PD_CC 3
263 #define PD_MM 5
264 #define PD_RR 6
265 #define PD_GMM 8
266 #define PD_SMS 9
267 #define PD_SM 10
268 #define PD_SS 11
269 #define PD_TST 15
270
271 /*
272 * one second is defined as 1000 ms
273 */
274 #define SEC 1000
275
276 /*
277 * The definition of detach types are different between uplink and downlink
278 * direction. thatswhy i have to translate it.
279 */
280 #define GMM_DT_RE_ATTACH 20
281 /*
282 *
283 */
284 #define GMM_MM_DEREG 0
285 #define GMM_MM_REG_NORMAL_SERVICE 1
286 #define GMM_MM_REG_NO_CELL_AVAILABLE 3
287 #define GMM_MM_REG_UPDATE_NEEDED 4
288 #define GMM_MM_REG_INITATED_VIA_GPRS 5
289 /*
290 * GRR state machine
291 */
292 #define GMM_GRR_STATE_OFF 0
293 #define GMM_GRR_STATE_ON 1
294 #define GMM_GRR_STATE_SUSPENDING 2
295 #define GMM_GRR_STATE_SUSPENDED 3
296 #define GMM_GRR_STATE_CR 4
297 /*
298 * LLC state machine
299 */
300 #define GMM_LLC_STATE_SUSPENED_RAU 0
301 #define GMM_LLC_STATE_SUSPENED 1
302 #define GMM_LLC_STATE_ASSIGNED 2
303 #define GMM_LLC_STATE_UNASSIGNED 3
304 /*
305 * suspension cause
306 */
307 #define GMM_SUSP_NONE 0x00
308 #define GMM_SUSP_UNKNOWN 0x00
309 #define GMM_SUSP_IMSI_DETACH 0x01
310 #define GMM_SUSP_LAU 0x02
311 #define GMM_SUSP_CALL 0x04
312 #define GMM_SUSP_EM_CALL 0x08
313 #define GMM_SUSP_LOCAL_DETACH 0x10
314
315 /*
316 * bis_size_message_table - This table is need in Service TX to calculate
317 * the BIT size from _decodedMsg
318 */
319 #ifdef GMM_PEI_C
320 const int bit_size_message_table [/*MAX_MESSAGE_ID_GMM*/] =
321 {
322 0, /* not defined =0x0*/
323 BSIZE_ATTACH_REQUEST , /* max bitlength of coded ATTACH_REQUEST =0x1 */
324 BSIZE_ATTACH_ACCEPT , /* max bitlength of coded ATTACH_ACCEPT =0x2 */
325 BSIZE_ATTACH_COMPLETE ,/* max bitlength of coded ATTACH_COMPLETE =0x3 */
326 BSIZE_ATTACH_REJECT ,/* max bitlength of coded ATTACH_REJECT =0x4 */
327 BSIZE_U_DETACH_REQUEST ,/* max bitlength of coded U_DETACH_REQUEST =0x5*/
328 BSIZE_D_DETACH_ACCEPT , /* max bitlength of coded D_DETACH_ACCEPT=0x6 */
329 0, /* not defined */
330 BSIZE_ROUTING_AREA_UPDATE_REQUEST , /* max bitlength of coded ROUTING_AREA_UPDATE_REQUEST =0x8 */
331 BSIZE_ROUTING_AREA_UPDATE_ACCEPT , /* max bitlength of coded ROUTING_AREA_UPDATE_ACCEPT =0x9 */
332 BSIZE_ROUTING_AREA_UPDATE_COMPLETE , /* max bitlength of coded ROUTING_AREA_UPDATE_COMPLETE =0xa */
333 BSIZE_ROUTING_AREA_UPDATE_REJECT , /* max bitlength of coded ROUTING_AREA_UPDATE_REJECT =0xb */
334 0, /* not defined =0xc */
335 0, /* not defined =0xd */
336 0, /* not defined =0xe */
337 0, /* not defined =0xf */
338 BSIZE_P_TMSI_REALLOCATION_COMMAND , /* max bitlength of coded P_TMSI_REALLOCATION_COMMAND =0x10 */
339 BSIZE_P_TMSI_REALLOCATION_COMPLETE , /* max bitlength of coded P_TMSI_REALLOCATION_COMPLETE =0x11 */
340 BSIZE_AUTHENTICATION_AND_CIPHERING_REQUEST , /* max bitlength of coded AUTHENTICATION_AND_CIPHERING_REQUEST =0x12 */
341 BSIZE_AUTHENTICATION_AND_CIPHERING_RESPONSE , /* max bitlength of coded AUTHENTICATION_AND_CIPHERING_RESPONSE =0x13 */
342 BSIZE_AUTHENTICATION_AND_CIPHERING_REJECT , /* max bitlength of coded AUTHENTICATION_AND_CIPHERING_REJECT =0x14 */
343 BSIZE_IDENTITY_REQUEST , /* max bitlength of coded IDENTITY_REQUEST =0x15 */
344 BSIZE_IDENTITY_RESPONSE , /* max bitlength of coded IDENTITY_RESPONSE=0x16 */
345 0, /* not defined =0x17 */
346 0, /* not defined =0x18 */
347 0, /* not defined =0x19 */
348 0, /* not defined =0x1a */
349 0, /* not defined =0x1b */
350 0, /* not defined =0x1c */
351 0, /* not defined =0x1d */
352 0, /* not defined =0x1e */
353 0, /* not defined =0x1f */
354 BSIZE_GMM_STATUS , /* max bitlength of coded D_GMM_STATUS =0x20 */
355 BSIZE_GMM_INFORMATION /* max bitlength of coded GMM_INFORMATION =0x21 */
356 };
357
358 #else
359 EXTERN const int bit_size_message_table [];
360 #endif
361
362
363
364 /*
365 * Service definitions. Used to access service data with GET/SET_STATE.
366 *
367 * Services with multiple incarnation have to be defined as xxx->
368 * Services with only one incarnation have to be defined as xxx.
369 *
370 * NOTE: For S1, LLC does access multiple incarnations with GET/SET_ISTATE.
371 */
372 #define KERN kern.
373 #define CU kern.states.cu.
374 #define GU kern.states.gu.
375 #define MM kern.states.mm.
376 #define TX tx.
377 #define RX rx.
378 #define RDY rdy.
379 #define SYNC sync.
380
381 /*
382 * Service name definitions for trace purposes. The service abbrevation
383 * (e.g. LLME) has to be the same as above for the service definitions.
384 */
385 #ifndef NTRACE
386
387 #define SERVICE_NAME_KERN "KERN"
388 #define SERVICE_NAME_CU "CU"
389 #define SERVICE_NAME_GU "GU"
390 #define SERVICE_NAME_LLC "LLC"
391 #define SERVICE_NAME_GRR "GRR"
392 #define SERVICE_NAME_TX "TX"
393 #define SERVICE_NAME_RX "RX"
394 #define SERVICE_NAME_RDY "RDY"
395 #define SERVICE_NAME_SYNC "SYNC"
396 #define SERVICE_NAME_MM "MM"
397
398 #endif /* !NTRACE */
399
400
401 /*
402 * Timer definitions.
403 */
404
405 #define kern_T3302 0 /* Timeout for Attach or RAU failer*/
406 #define kern_T3310 1 /* Timeout for ATTACH */
407 #define kern_T3311 2 /* Timeout for Attach or RAU Reject*/
408 #define kern_T3321 3 /* Timeout for DETACH */
409
410 #define rdy_T3312 5 /* Standby or RAU timer */
411
412 #define kern_TPOWER_OFF 8 /* POWER OFF timer */
413 #define sync_TSYNC 9 /* timer for synchronization supervision,
414 between GRR CELL_IND and MM ACTIVATE_IND */
415 #define kern_TLOCAL_DETACH 10 /* disable GRR timer */
416
417 #define TIMER_MAX 11
418
419 /*
420 * AniteB2 V1.17 TC 44.2.1.2.8 Relese 99 ms
421 */
422 #define T3302_VALUE (12*60000) /* ms */
423 #define T3312_VALUE (54*60000) /* ms */
424
425 /* Anite B2 TC 44.2.2.1.4/ 44.2.1.1.7 */
426 #define T3310_VALUE 15000 /* ms */
427
428 #define T3311_VALUE 15000 /* ms */
429 #define T3321_VALUE 15000 /* ms */
430 #define T3314_VALUE 44000 /* ms */
431
432 #define T3316_VALUE 44000 /* ms */
433 #define TPOWER_OFF_VALUE 5000 /* ms */
434 #define TSYNC 2000 /* ms */
435 #define TLOCAL_DETACH_VALUE 5000 /* ms */
436
437
438 #ifdef REL99
439
440 /*For sgsnr handling*/
441 #define R_98NW 0
442 #define R_99NW 1
443
444 /*
445 * Cell notification not supported
446 */
447 #define NO_CELL_NOTIFY 0 /* TCS 4.0 */
448
449 /*
450 * First cell notification in this RA. Don't use LLC NULL frame
451 */
452 #define FIRST_CELL_NOTIFY 1 /* TCS 4.0 */
453
454 /*
455 * Second or higher cell notification in this RA. Can use LLC NULL frame
456 */
457 #define NOT_FIRST_CELL_NOTIFY 2 /* TCS 4.0 */
458 #endif
459
460
461 /*
462 * State definitions for each service.
463 */
464
465 #define KERN_GMM_NULL_NO_IMSI 0
466 #define KERN_GMM_NULL_IMSI 1
467 #define KERN_GMM_DEREG_INITIATED 2
468 #define KERN_GMM_DEREG_ATTEMPTING_TO_ATTACH 3
469 #define KERN_GMM_DEREG_NO_CELL_AVAILABLE 4
470 #define KERN_GMM_DEREG_LIMITED_SERVICE 5
471 #define KERN_GMM_DEREG_NO_IMSI 6
472 #define KERN_GMM_DEREG_PLMN_SEARCH 7
473 #define KERN_GMM_DEREG_SUSPENDED 8
474
475 #define KERN_GMM_REG_INITIATED 9
476
477 #define KERN_GMM_REG_NO_CELL_AVAILABLE 10
478 #define KERN_GMM_REG_LIMITED_SERVICE 11
479 #define KERN_GMM_REG_ATTEMPTING_TO_UPDATE_MM 12
480 #define KERN_GMM_REG_ATTEMPTING_TO_UPDATE 13
481 #define KERN_GMM_REG_RESUMING 14
482 #define KERN_GMM_REG_SUSPENDED 15
483 #define KERN_GMM_REG_NORMAL_SERVICE 16
484
485 #define KERN_GMM_RAU_INITIATED 17
486
487 #define KERN_GMM_RAU_WAIT_FOR_NPDU_LIST 18
488
489 #define KERN_GMM_REG_IMSI_DETACH_INITIATED 19
490
491 #define KERN_GMM_DEREG_SUSPENDING 20
492 #define KERN_GMM_DEREG_RESUMING 21
493
494 #define KERN_GMM_REG_SUSPENDING 22
495 #define KERN_GMM_NULL_NO_IMSI_LIMITED_SERVICE_REQ 23
496 #define KERN_GMM_NULL_IMSI_LIMITED_SERVICE_REQ 24
497 #define KERN_GMM_REG_TEST_MODE 25
498 #define KERN_GMM_NULL_PLMN_SEARCH 26
499 #define KERN_GMM_REG_TEST_MODE_NO_IMSI 27
500
501 #define TX_READY 0
502 #define TX_NOT_READY 1
503
504 #define RX_READY 0
505 #define RX_NOT_READ 1
506
507 #define RDY_READY 0
508 #define RDY_STANDBY 1
509 #define RDY_DEACTIVATED 2
510 #define RDY_STANDBY_TWICE 3
511
512 enum
513 {
514 SYNC_IDLE = 0,
515 SYNC_WAIT_FOR_GSM = 1,
516 SYNC_WAIT_FOR_GPRS = 2
517 };
518
519 /*==== TYPES ======================================================*/
520
521 /*
522 * GMM global typedefs
523 */
524
525
526 /*
527 * things to do after receiving of gmmrr_suspend_cnf, whenn local detach has
528 * been called before.
529 */
530 typedef enum
531 {
532 GMM_LOCAL_DETACH_PROC_NOT_CHANGED =0,
533 GMM_LOCAL_DETACH_PROC_NOTHING =1,
534 GMM_LOCAL_DETACH_PROC_ENTER_NULL_IMSI_LIMITED_SERVICE_REQ=2,
535 GMM_LOCAL_DETACH_PROC_ENTER_NULL_IMSI =3,
536 GMM_LOCAL_DETACH_PROC_ENTER_NULL_NO_IMSI =4,
537 GMM_LOCAL_DETACH_PROC_RESUME =5,
538 GMM_LOCAL_DETACH_PROC_ENTER_DEREG =6,
539 GMM_LOCAL_DETACH_PROC_UNASSIGN =7,
540 GMM_LOCAL_DETACH_PROC_ENTER_REG_NORMAL =8,
541 GMM_LOCAL_DETACH_PROC_SUSP_LAU =9,
542 GMM_LOCAL_DETACH_PROC_RE_ATTACH =10,
543 GMM_LOCAL_DETACH_PROC_RAU =11,
544 GMM_LOCAL_DETACH_PROC_DISABLE =12,
545 GMM_LOCAL_DETACH_PROC_COMB_DISABLE =13,
546 GMM_LOCAL_DETACH_PROC_SIM_REMOVED =14,
547 GMM_LOCAL_DETACH_PROC_AUTH_FAILED =15,
548 GMM_LOCAL_DETACH_PROC_POWER_OFF =16,
549 GMM_LOCAL_DETACH_PROC_SOFT_OFF =17
550 } T_LOCAL_DETACH_PROC;
551 /*
552 * TLLI type
553 */
554 typedef enum
555 {
556 LOCAL_TLLI,
557 FOREIGN_TLLI,
558 RANDOM_TLLI,
559 CURRENT_TLLI,
560 OLD_TLLI,
561 INVALID_TLLI
562 } T_TLLI_TYPE;
563
564
565 /*
566 * Test environment (simulator) vs. Implementation environment.
567 */
568 typedef enum
569 {
570 TEST_ENV,
571 IMPL_ENV
572 } T_ENVIRONMENT;
573
574
575 typedef UBYTE T_BIT_INT;
576 typedef T_BIT_INT T_BIT;
577
578
579 typedef enum
580 {
581 SERVICE_KERN,
582 SERVICE_TX,
583 SERVICE_RX,
584 SERVICE_RDY,
585 SERVICE_SYNC,
586 NO_SERVICE
587 } T_SERVICE;
588
589 typedef enum
590 {
591 PRIM_DATA,
592 PRIM_UNITDATA,
593 NO_PRIM
594 } T_PRIM_TYPE;
595
596 typedef enum
597 {
598 GMM_NO_RAU,
599 GMM_RAU,
600 GMM_PERIODIC_RAU
601 } T_RAU_TYPE;
602
603 typedef enum
604 {
605 GU_UPDATE_NEEDED,
606 GU_UPDATE_NOT_NEEDED
607 } T_GU_UPDATE_STATE;
608
609 /*
610 * T_ATTACH_CAP is sruct, which defines the way to attach
611 */
612 /*
613 * GMMREG_AT_NOT_KNOWN is in addition to the values given in
614 * gmmreg to indicate that no gmmreg_attach_req is received yet
615 * this case is only after power on
616 */
617 #define GMMREG_AT_NOT_KNOWN 0
618 /*
619 * GSIM is no longer available, so the Update defines are done here
620 * These values defined in 11.11
621 */
622 #define GU1_UPDATED 0
623 #define GU2_NOT_UPDATED 1
624 #define GU3_PLMN_NOT_ALLOWED 2
625 #define GU3_ROAMING_NOT_ALLOWED 3 /* RA not allowed */
626 /*
627 * These values defined in 11.11 (original in RR.SAP in old GSM code
628 */
629 #define CKSN_RES 0x7 /* reserved */
630 #define CKSN_NOT_PRES 0xff /* not present */
631
632 /*
633 * MAX_LIST_OF_FORBIDDEN_PLMNS_FOR_GPRS_SERVICE defines the max value of PLMNs
634 */
635 #define MAX_LIST_OF_FORBIDDEN_PLMNS_FOR_GPRS_SERVICE 1
636
637 /*
638 * cu_state stores the status of cell update. if llgmm_trigger_req has been
639 * sent with cause cell_update cu_state is set to remember the state when
640 * sending gmmrr_cell_res to GRR
641 */
642 #define CU_NOT_REQUESTED 0
643 #define CU_REQUESTED 1
644 #define CU_CELL_RES_SENT 2
645 #define CU_REQUESTED_CELL_RES_SENT 3 /* if periodic rau accept has been received
646 * CU has to be sent although no cell had changed
647 */
648
649 typedef struct /* T_GMM_STATE */
650 {
651 UBYTE state;
652 /*
653 * Required for state traces.
654 */
655 #ifndef NTRACE
656 char *name;
657 char *state_name;
658 #endif
659 } T_GMM_STATE;
660
661 typedef struct /* T_GMM_STATES */
662 {
663 /*
664 * MM State
665 */
666 T_GMM_STATE mm; /* mm state */
667 /*
668 * Cell Update State
669 *
670 * This variable remembers whether the MS is searching for a PLMN
671 * TRUE in the timespan MMGMM_NET_REQ to MMGMM_NREG_IND/MMGMM_PLMN_IND.
672 * This variable may be used to delay e.g. periodic updated until
673 * the network search has ended.
674 */
675 T_GMM_STATE cu; /* cell update state */
676 /*
677 * Update states
678 */
679 T_GMM_STATE gu; /* GMM update state */
680
681 } T_GMM_STATES;
682
683 /*
684 * !!! ATTENTION !!!
685 * This struct will be written in one block to the FFS.
686 * So the position of the variables can not be changed!
687 */
688 typedef struct
689 { /* default values */
690 U8 cipher_on;
691 } T_GMM_FFS;
692
693 typedef struct
694 {
695 UBYTE cipher_on;
696 UBYTE nmo;
697
698 #ifdef REL99
699 UBYTE sgsnr_flag; /* TCS 4.0 */
700 UBYTE cell_notification; /* TCS 4.0 */
701 #endif
702
703 BOOL preuse_off;
704 } T_CONFIG;
705
706
707
708 typedef struct
709 {
710 /*
711 * GMM has to switch on GRR after mmgmm_activate_ind only the first time
712 */
713 UBYTE grr_state;
714 /*
715 * attach_type as defined in GMMREG_ATTACH_REQ
716 * as attach_type!type_of_attach with additional value
717 * GMMREG_AT_NOT_KNOWN = 4
718 * MMI given attach type like mobile class.
719 */
720 UBYTE attach_type ;
721
722 /*
723 * attach_type set in attach procedure only
724 */
725
726 UBYTE attach_proc_type;
727 /*
728 * update_proc__type set in rau procedure only
729 */
730
731 UBYTE update_proc_type;
732
733 /*
734 * This parameter is needed for for SIM to know if GMM attached
735 * one time succsessful after PO to update the ME
736 * see GSM 03.60 ch. 13.4
737 */
738
739 UBYTE attach_acc_after_po;
740 /*
741 * result type includes the result attach typeof the
742 * last RAU or ATTACH procedure
743 */
744 UBYTE result_type;
745 /* T_plmn_mt_caps plmn_mt_caps; */
746 UBYTE sms_radio_priority_level;
747 UBYTE old_net_mode;
748
749 UBYTE mobile_class;
750 UBYTE netIII_attach;
751 /*
752 * dependend on the attach direction the appropriate parameter is set
753 */
754 BOOL gmmreg;
755 #ifndef GMM_TCS4
756 BOOL gmmsm;
757 #endif
758 /*
759 * to sent gmmrr_attache_finished only once i store the state
760 */
761 BOOL gmmrr_attach_finished_sent;
762 /*
763 * to sent llgmm_resume only once i store the state
764 */
765 UBYTE llc_state;
766
767 /* BOOL normal_service; */
768
769 T_RAU_TYPE rau_initiated;
770 BOOL attempting_to_update_mm;
771
772 /*
773 * service mode is given by MMI
774 */
775 UBYTE service_mode;
776 /*
777 * attach complete is used to remember whether attach_complete has to
778 * be sent again or never HACK: some networks accept only attach complete
779 * with old TLLI
780 */
781 BOOL attach_complete;
782 /*
783 * GSM 04.08: If for the last attempt to update the registration of the location area a MM
784 * specific procedure was performed, the value of the update type IE in the
785 * ROUTING AREA UPDATE REQUEST message shall indicate "combined RA/LA updating
786 * with IMSI attach".
787 */
788 BOOL mm_lau_attempted;
789 /*
790 * GMM has to remember that state was attempting to UPDATE also if LAU
791 * has been performed afer aac>5
792 * see R&S test case 44.2.3.2.7
793 */
794 BOOL enter_attempting_to_update_after_lau;
795 /*
796 * network_selection_mode is given by GMMREG_PLMN_MODE_REQ and switches
797 * between manual and automatic network selection mode (cops=1,2,"... or
798 * cops=?
799 */
800 UBYTE network_selection_mode;
801
802 /*
803 * In case the user performed a manual network selection, we remember the
804 * user requested PLMN in this variable.
805 */
806 T_plmn plmn_requested;
807
808 BOOL grr_via_llc_suspended;
809
810 T_plmn list_of_forbidden_plmns_for_gprs_service[MAX_LIST_OF_FORBIDDEN_PLMNS_FOR_GPRS_SERVICE];
811
812 T_routing_area_identification rai_accepted;
813
814 /*
815 *in case of switching ms_classes GRR has to be informed after detach/attach proceudres
816 */
817 BOOL mobile_class_changed;
818
819 /*
820 * if RAU or attach procedure is interupted by GMMRR_CR_IND GMM stores the timer value
821 * to be able to restart the timer if rau has not changed.
822 */
823 T_TIME t3310_value;
824
825 #ifdef REL99
826 /*
827 * PDP context status used in R99 RAU request message is stored here. Ref 10.5.7.1 of 24.008
828 */
829 USHORT pdp_context_status; /* TCS 4.0 */
830 #endif
831
832
833 } T_ATTACH_CAP;
834
835 typedef struct
836 {
837 /* detach_type as defined in GMMREG_DETACH_REQ
838 * as attach_type!type_of_attach with additional value
839 */
840 UBYTE detach_type ;
841 /*
842 * dependend on the attach direction the appropriate parameter is set
843 */
844 BOOL gmmreg;
845 BOOL network;
846 BOOL normal_service;
847 /*
848 * GMM has to remember the errr cause if
849 * ( !(48 <= cause && cause <= 63) )
850 * 'Retry upon entry into a new cell' occures.
851 * GPRS attach shall be
852 * performed when a new cell is entered.
853 */
854 USHORT error_cause;
855 /*
856 * whenn GMM locally detaches the MS it enters substate suspending
857 * to remember what to do next the folloing parameter has been introduced
858 */
859 T_LOCAL_DETACH_PROC local_detach_open_proc;
860 } T_DETACH_CAP;
861
862 typedef struct
863 {
864 /*
865 * The purpose of the A&C reference number information element is to indicate
866 * to the network in the AUTHENTICATION AND CIPHERING RESPONSE message which
867 * AUTHENTICATION AND CIPHERING REQUEST message the MS is replying to.
868 * Reference : [1] section 10.5.5.19
869 */
870 UBYTE a_c_reference_number;
871
872 /* SIM interface got modified to support identifiers of requests sent to
873 * SIM. This can be used to handle the above mentioned "multiple (two)
874 * authentication req messages" problem. The following variable replaces
875 * the outstanding_count as a slightly different approach is used. This
876 * variable contains the req_id in the last sent SIM_AUTHENTICATION_REQ.
877 * On receiving SIM_AUTHENTICATION_CNF, response is sent to network only
878 * if req_id matches the value in this variable.*/
879 UBYTE last_auth_req_id;
880
881 UBYTE kc[MAX_KC];
882 UBYTE cksn;
883 UBYTE ciphering_algorithm;
884 UBYTE imeisv_requested;
885 } T_AUTH_CAP;
886
887 /*
888 * procedure collision between detach and others
889 */
890 typedef struct
891 {
892 BOOL rau;
893 } T_WHILST_DETACH;
894
895 /*
896 * cell id to have always the current state
897 */
898 typedef struct
899 {
900 T_plmn plmn;
901 UBYTE rac;
902 USHORT lac;
903 USHORT cid;
904 } T_CELL_ID;
905
906 typedef struct
907 {
908 BOOL gmmrr_cell_ind_received;
909 T_cell_env env;
910 U8 gmm_status;
911 U8 mm_status;
912 U8 net_mode;
913 #ifdef GMM_TCS4
914 U8 rt; /* TCS 4.0 */
915 #endif
916
917
918 U32 t3212_val;
919
920 #ifdef REL99
921 /*
922 * For R97-R99 compatibility
923 */
924 U8 sgsnr_flag; /* TCS 4.0 */
925 #endif
926
927 } T_SIG_CELL_INFO;
928
929 typedef struct
930 {
931 T_plmn plmn; /*< 0: 8> plmn identification */
932 U16 lac; /*< 8: 2> location area code */
933 U16 cid; /*< 10: 2> cell id */
934 U32 t3212_val; /*< 12: 4> value of T3212 */
935 U8 status; /*< 16: 1> Activation status */
936 U8 gprs_indicator; /*< 17: 1> GPRS indicator */
937 } T_MM_CELL_INFO;
938
939 /*
940 * Includes the several TLLIS
941 */
942
943 typedef struct
944 {
945 ULONG old;
946 ULONG current;
947 T_TLLI_TYPE current_type;
948 } T_TLLI;
949
950 /*
951 * Includes the several PTMSIs
952 * current PTMSI is the PTMSI given by the network itself or read from SIM
953 * new_grr PTMSI is the GRR-assigned PTMSI. Sometimes this GRR-PTMSI has to be set to
954 * invalid although the PTMSI from the mobile is still available, i.e. in a re-attach situation.
955 * oldold is the second old one, if in concurrent TBF more PTMSIs are exxhanged than
956 * TLLIs are received.
957 */
958 typedef struct
959 {
960 ULONG old;
961 ULONG new_grr;
962 ULONG current;
963 } T_PTMSI;
964
965
966 typedef struct
967 {
968 BOOL available;
969 ULONG value;
970 } T_PTMSI_SIGNATURE;
971
972 typedef struct /* T_KERN_DATA */
973 {
974 UBYTE state;
975 /*
976 * Required for state traces.
977 */
978 #ifndef NTRACE
979 char *name;
980 char *state_name;
981 #endif
982 /*
983 * GMM KERN STATES
984 */
985 T_GMM_STATES states;
986 /*
987 * attach attempt counter
988 */
989 UBYTE aac;
990 /*
991 * MM update status
992 */
993 UBYTE ustate;
994
995 /*
996 * defines the attach capabitlities
997 */
998 T_ATTACH_CAP attach_cap;
999
1000 T_DETACH_CAP detach_cap;
1001
1002 /*
1003 * defines the authentication capabitlities
1004 */
1005 T_AUTH_CAP auth_cap;
1006 /*
1007 * collects all procedures which interupted teh detach procedure
1008 */
1009 T_WHILST_DETACH whilst_detach;
1010 /*
1011 * Cell information
1012 */
1013 T_SIG_CELL_INFO sig_cell_info;
1014 /*
1015 * Cell ID to inform the User
1016 */
1017 T_CELL_ID cell_id;
1018 /*
1019 * GPRS inicator
1020 */
1021 USHORT gprs_indicator;
1022
1023 /*
1024 * Old Cell information to know when ra ic crossed
1025 */
1026 T_SIG_CELL_INFO old_sig_cell_info;
1027 T_cell_env mm_cell_env;
1028
1029 /*
1030 * counter for timers
1031 */
1032 UBYTE ct3310;
1033 UBYTE ct3321;
1034 /*
1035 * timer values
1036 */
1037 ULONG t3310_val;
1038 ULONG t3311_val;
1039 ULONG t3321_val;
1040 ULONG t3302_val;
1041
1042 BOOL timeout_t3312;
1043 UBYTE sim_op_mode;
1044
1045 BOOL gmmrr_resume_sent;
1046 UBYTE suspension_type;
1047 BOOL local_detached;
1048 } T_KERN_DATA;
1049
1050
1051 typedef struct /* T_TX_DATA */
1052 {
1053 UBYTE state;
1054 /*
1055 * Required for state traces.
1056 */
1057 #ifndef NTRACE
1058 char *name;
1059 char *state_name;
1060 #endif
1061 } T_TX_DATA;
1062
1063
1064 typedef struct /* T_RX_DATA */
1065 {
1066 UBYTE state;
1067 /*
1068 * Required for state traces.
1069 */
1070 #ifndef NTRACE
1071 char *name;
1072 char *state_name;
1073 #endif
1074 } T_RX_DATA;
1075
1076 typedef struct /* T_RDY_DATA */
1077 {
1078 UBYTE state;
1079 /*
1080 * Required for state traces.
1081 */
1082 #ifndef NTRACE
1083 char *name;
1084 char *state_name;
1085 #endif
1086
1087 /*
1088 * timer values
1089 */
1090 ULONG t3312_val;
1091 ULONG t3314_val;
1092 BOOL t3312_deactivated;
1093 BOOL attempting_to_update;
1094 ULONG timer_value[TIMER_MAX];
1095
1096 } T_RDY_DATA;
1097
1098 typedef struct /* T_SYNC_DATA */
1099 {
1100 UBYTE state;
1101 /*
1102 * Required for state traces.
1103 */
1104 #ifndef NTRACE
1105 char *name;
1106 char *state_name;
1107 #endif
1108
1109 /*
1110 * timer values
1111 */
1112 T_cell_info grr_cell_info;
1113 T_SIG_CELL_INFO sig_cell_info;
1114 T_MM_CELL_INFO mm_cell_info;
1115
1116 } T_SYNC_DATA;
1117
1118 typedef struct /* T_GMM_DATA */
1119 {
1120 /*
1121 * GMM layer parameters
1122 */
1123 UBYTE version;
1124
1125 #ifdef TRACE_FUNC
1126 #ifdef IDENTATION
1127 UBYTE deep;
1128 #endif
1129 #endif
1130 BOOL anite;
1131 /*
1132 * counter for random value generator
1133 */
1134 UBYTE rand_counter;
1135 /*
1136 * indicates whether ciphering is on in GMM or not
1137 */
1138 BOOL cipher;
1139
1140 /*
1141 * TLLI
1142 */
1143 T_TLLI tlli;
1144
1145 USHORT acc_contr_class;
1146 BOOL sim_gprs_invalid;
1147
1148 UBYTE gu;
1149
1150 T_PTMSI ptmsi;
1151
1152 ULONG tmsi;
1153 T_PTMSI_SIGNATURE ptmsi_signature;
1154 T_imsi imsi;
1155
1156 T_drx_parameter drx_parameter;
1157 /*
1158 * defines cusomer specific options
1159 * either given be at%cgmm or CONFIG string
1160 */
1161 T_CONFIG config;
1162
1163 #ifdef REL99
1164 /*
1165 * For storing cell notification information
1166 */
1167 UBYTE cell_notification; /* TCS 4.0 */
1168 #endif
1169
1170
1171 /*
1172 * Service data structures.
1173 *
1174 * Services with multiple incarnations require an array of structures
1175 * named xxx_base[] with xxx = service abbrevation, and additionally a
1176 * pointer named *xxx, which will be accessed instead of xxx_base.
1177 *
1178 * Services with only one incarnation just have to declare one structure
1179 * named xxx (no need for xxx_base[] and *xxx).
1180 *
1181 * The differentiation between the two access possibilites is made with
1182 * the defines of the service names above (LLC_SERVICE_XXX).
1183 */
1184 T_KERN_DATA kern;
1185 T_TX_DATA tx;
1186 T_RX_DATA rx;
1187 T_RDY_DATA rdy;
1188 T_SYNC_DATA sync;
1189 } T_GMM_DATA;
1190
1191 /*==== EXPORT =====================================================*/
1192
1193 /*
1194 * Entity data base
1195 */
1196 #ifdef GMM_PEI_C
1197 T_GMM_DATA gmm_data_base, *gmm_data;
1198 #else
1199 EXTERN T_GMM_DATA gmm_data_base, *gmm_data;
1200 #endif
1201
1202 #define ENTITY_DATA gmm_data
1203
1204 #define pei_create gmm_pei_create
1205 /*
1206 * Communication handles (see also GMM_PEI.C)
1207 */
1208 #define hCommSMS gmm_hCommSMS
1209 #define hCommSM gmm_hCommSM
1210 #define hCommGRLC gmm_hCommGRLC /* TCS 2.1 */
1211 #define hCommGRR gmm_hCommGRR
1212 #define hCommLLC gmm_hCommLLC
1213 #define hCommSIM gmm_hCommSIM
1214 #define hCommMM gmm_hCommMM
1215 #define hCommMMI gmm_hCommMMI
1216 #define hCommGMM gmm_hCommGMM
1217 #ifdef GMM_TCS4
1218 #define hCommUPM gmm_hCommUPM
1219 #endif
1220
1221 #ifdef GMM_PEI_C
1222 T_HANDLE hCommSMS = VSI_ERROR;
1223 T_HANDLE hCommSM = VSI_ERROR;
1224 T_HANDLE hCommGRLC = VSI_ERROR; /* TCS 2.1 */
1225 T_HANDLE hCommGRR = VSI_ERROR;
1226 T_HANDLE hCommLLC = VSI_ERROR;
1227 T_HANDLE hCommSIM = VSI_ERROR;
1228 T_HANDLE hCommMM = VSI_ERROR;
1229 T_HANDLE hCommMMI = VSI_ERROR;
1230 T_HANDLE hCommGMM = VSI_ERROR;
1231
1232 T_HANDLE GMM_handle;
1233 #ifdef GMM_TCS4
1234 T_HANDLE hCommUPM = VSI_ERROR;
1235 #endif
1236 #else
1237 EXTERN T_HANDLE hCommSMS;
1238 EXTERN T_HANDLE hCommSM;
1239 EXTERN T_HANDLE hCommGRLC; /* TCS 2.1 */
1240 EXTERN T_HANDLE hCommGRR;
1241 EXTERN T_HANDLE hCommLLC;
1242 EXTERN T_HANDLE hCommSIM;
1243 EXTERN T_HANDLE hCommMM;
1244 EXTERN T_HANDLE hCommMMI;
1245 EXTERN T_HANDLE hCommGMM;
1246
1247 #ifdef GMM_TCS4
1248 EXTERN T_HANDLE hCommUPM;
1249 #endif
1250 EXTERN T_HANDLE GMM_handle;
1251 #endif /* GMM_PEI_C */
1252
1253
1254 /*
1255 * If all entities are linked into one module this definitions
1256 * prefixes the global data with the enity name
1257 */
1258
1259 #ifdef OPTION_MULTITHREAD
1260 #define _decodedMsg _ENTITY_PREFIXED(_decodedMsg)
1261 #endif
1262
1263 #ifdef GMM_PEI_C
1264 GLOBAL UBYTE _decodedMsg [MAX_MSTRUCT_LEN_GMM];
1265 #else
1266 EXTERN UBYTE _decodedMsg [MAX_MSTRUCT_LEN_GMM];
1267 #endif /* GMM_PEI_C */
1268
1269 #endif /* GMM_H */