blob: 7ca05cd3d114f42b7155723ff780720446003ae1 [file] [log] [blame]
rjw6c1fd8f2022-11-30 14:33:01 +08001/*****************************************************************************
2* Copyright Statement:
3* --------------------
4* This software is protected by Copyright and the information contained
5* herein is confidential. The software may not be copied and the information
6* contained herein may not be used or disclosed except with the written
7* permission of MediaTek Inc. (C) 2012
8*
9* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
10* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
11* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
12* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
13* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
14* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
15* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
16* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
17* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
18* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
19* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
20* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
21*
22* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
23* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
24* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
25* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
26* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
27*
28* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
29* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
30* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
31* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
32* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
33*
34*****************************************************************************/
35
36/*******************************************************************************
37 * Filename:
38 * ---------
39 * mm_emm_struct.h
40 *
41 * Project:
42 * --------
43 * MOLY
44 *
45 * Description:
46 * ------------
47 * message and common structure definition between MM and EMM module
48 *
49 * Author:
50 * -------
51 * -------
52 *
53 * ==========================================================================
54 * $Log$
55 *
56 * 01 28 2022 ashutosh.gadre
57 * [MOLY00729137] [MT6873][Margaux][Q0][R3][JAPAN][DOCOMO][SS][LiveNW][B-3-1] It takes a time to show an error message of OOS when invalid USSD code is input under no 3G subscription condition.
58 *
59 * 11 04 2020 chengyu.chen
60 * [MOLY00562485] ¤âÉ󴡤J?¦³¡§´L·qªº¥Î?¡A?ªï±z¨Ï¥Î¤¤??³q¡¨?®ØªºSIM¥d¡AµnÊI¦¨¥\¦Z¤£?¥X?ªï´£¥Ü?
61 * [NR15.R3.MP][MPD][In V-List] SIM Context Pop-out
62 *
63 * 12 05 2019 sonu.akhand
64 * [MOLY00460960] [GEN97]T3346 handling between GMM and VGMM
65 *
66 * MM T3346
67 *
68 * 08 14 2019 chengyu.chen
69 * [MOLY00423643] [Gen97][EMM] Code sync from UMOLYE/UMOLYA to VMOLY
70 * [Code Sync] 7977435 + 7977420 + emm uniontag problem
71 *
72 * 04 25 2019 chengyu.chen
73 * [MOLY00401516][Gen97][MPD] Support Approving for CSFB call (MOLY00371004, MOLY00374905, MOLY00392753)
74 *
75 * 08 17 2018 chinte.chen
76 * [MOLY00306148] [NAS] pangu giant CR
77 * patch back 6138126.
78 *
79 * 08 16 2017 kelly.lo
80 * [MOLY00271307] [LR12 sync][copy MOLY00262660][VzW CDMA-less][Pre-IT] 2.3.26.2 EMM 10 Error string: ## BASE ## Ping resulted in failure, still continue the scenario.. !!
81 *
82 * new emm_sr_type_enum and add sr type item in update_reg/dereg_ind
83 *
84 * 01 17 2017 kelly.lo
85 * [MOLY00224986] [MT6293][R13 DoS] rename MARCO and ENUM
86 *
87 * rename MAX_UE_IMPLEMENTATION_SPECIFIC_VALUE to DOS_ENHANCEMENT_MAX_RETRY_VALUE and integ_protect_status to integ_protect_status_enum
88 *
89 * 09 26 2016 sh.yeh
90 * [MOLY00205082] EMM_REG merge from UMOLYA-PS-DEV to UMOLYA
91 * sync MOLY187316 CL2614331, MOLY00141896 CL2648845.
92 *
93 * 01 12 2016 ivan.chung
94 * [MOLY00155565] [MT6755][VzW] Replace __SS_TIME_READY__ to __SUPPORT_CLIB_TIME__
95 *
96 * 08 25 2015 kinki.lin
97 * . (non-secure domain) merge MOLY00119733
98 *
99 * 11 10 2014 robert.wu
100 * [MOLY00083874] [UMOLY][R10][R11] EMM MTC sync code from 6291_DEV to UMOLY trunk
101 *
102 * 07 07 2014 lt.chang
103 * [MOLY00071459] Add Mobility Management for IMS Voice Termination
104 * . emm interface & mm to emm struct
105 *
106 * 04 21 2014 raymond.chen
107 * [MOLY00062966] [SGLTE] Modify the usage of mm_emm_peer_lr_result_ind message to avoid possible R+E PLMN list unsync between MD1 and MD2
108 * Fix the build error due to typo
109 *
110 * 04 21 2014 raymond.chen
111 * [MOLY00062966] [SGLTE] Modify the usage of mm_emm_peer_lr_result_ind message to avoid possible R+E PLMN list unsync between MD1 and MD2
112 * Separate the eplmn update usage of mm_emm_peer_lr_result_ind_struct (From EMM to 2G) from procedure update.
113 *
114 * 10 18 2013 raymond.chen
115 * [MOLY00041595] [MT6290E1][MMDS_DC] MMDC feature patch back to MOLY trunk
116 * Correct type of peer_lr_result and ref_count/msg_len for mm_emm_peer_lr_result_req/ind_struct.
117 *
118 * 09 04 2013 loter.chang
119 * [MOLY00035044] [EMM] RATCHG, SEC, CMNPROC Enhancement and Trace Modification
120 * - Add tin value into initial NAS context transfer
121 *
122 * 07 24 2013 shaowu.huang
123 * [MOLY00031020] [MMDS_DC] Merge MMDC interface to MOLY
124 * NAS REJECT CAUSE interface, MM<->EMM,MM<->NWSEL,MM<->MM.
125 *
126 * 05 22 2013 loter.chang
127 * [MOLY00021705] [EMM][Design Change] Revision and Enhancement
128 * add UE mode to EMM/MM interface
129 *
130 * 03 25 2013 loter.chang
131 * [MOLY00011934] LTE MM IT CBr merge to MOLY
132 * add TMSI to mm_emm_init_nas_ctxt_rsp_struct
133 *
134 ****************************************************************************/
135
136
137#ifndef MM_EMM_STRUCT_INC
138#define MM_EMM_STRUCT_INC
139
140#include "l3_inc_local.h"
141#include "l3_inc_enums.h"
142#include "irat_common_struct.h"
143
144/***** message structure definition *****/
145// MSG_ID_MM_EMM_INIT_NAS_CTXT_IND
146typedef struct
147{
148 LOCAL_PARA_HDR
149 kal_bool is_mapped_ptmsi_present;
150 kal_uint8 mapped_ptmsi[PTMSI_LEN];
151 kal_bool is_mapped_ptmsi_sig_present;
152 kal_uint8 mapped_ptmsi_sig[PTMSI_SIG_LEN];
153 kal_bool is_mapped_rai_present;
154 rai_struct mapped_rai;
155 tin_enum tin;
156}mm_emm_init_nas_ctxt_ind_struct;
157
158// MSG_ID_MM_EMM_INIT_NAS_CTXT_RSP
159typedef struct
160{
161 LOCAL_PARA_HDR
162 mm_emm_tmsi_status_enum is_tmsi_valid;
163 kal_uint8 tmsi[TMSI_LEN];
164 kal_bool is_ptmsi_valid;
165 kal_uint8 ptmsi[PTMSI_LEN];
166 kal_bool is_ptmsi_sig_valid;
167 kal_uint8 ptmsi_sig[PTMSI_SIG_LEN];
168 kal_bool is_rai_valid;
169 rai_struct rai;
170 kal_bool is_mm_update_status_valid;
171 gsm_update_status_enum mm_update_status;
172 kal_bool is_lai_valid;
173 lai_struct lai;
174}mm_emm_init_nas_ctxt_rsp_struct;
175
176// MSG_ID_MM_EMM_EMM_NAS_CTXT_TRANSFER_REQ
177typedef struct
178{
179 LOCAL_PARA_HDR
180 emm2mm_irat_info_struct emm_info;
181}mm_emm_emm_nas_ctxt_transfer_req_struct;
182
183// MSG_ID_MM_EMM_MM_NAS_CTXT_TRANSFER_REQ
184typedef struct
185{
186 LOCAL_PARA_HDR
187 mm2emm_irat_info_struct mm_info;
188}mm_emm_mm_nas_ctxt_transfer_req_struct;
189
190
191// MSG_ID_MM_EMM_ISR_UPDATE_REQ
192typedef struct
193{
194 LOCAL_PARA_HDR
195 mm_emm_isr_event_enum event_trigger;
196 kal_bool tin_present;
197 tin_enum tin;
198}mm_emm_isr_update_req_struct;
199
200// MSG_ID_MM_EMM_ISR_UPDATE_IND
201typedef struct
202{
203 LOCAL_PARA_HDR
204 mm_emm_isr_event_enum event_trigger;
205 kal_bool tin_present;
206 tin_enum tin;
207}mm_emm_isr_update_ind_struct;
208
209// MSG_ID_MM_EMM_GMM_UPDATE_REGISTRATION_REQ
210typedef struct
211{
212 LOCAL_PARA_HDR
213 gmm_msg_type_enum gmm_msg_type;
214 kal_bool is_gmm_attach_type_present;
215 gmm_attach_type_enum gmm_attach_type;
216 kal_bool is_gmm_update_type_present;
217 gmm_update_type_enum gmm_update_type;
218 kal_bool is_gmm_attach_result_present;
219 gmm_attach_result_enum gmm_attach_result;
220 kal_bool is_gmm_update_result_present;
221 gmm_update_result_enum gmm_update_result;
222 kal_bool is_gmm_cause_present;
223 gmm_cause_enum gmm_cause;
224 kal_bool is_gmm_attempt_cnt_present;
225 kal_uint8 gmm_attempt_cnt;
226 kal_bool is_rai_changed;
227 kal_bool is_gu1_updated;
228 kal_bool is_lai_changed;
229 kal_bool is_u1_updated;
230 kal_bool is_ims_voice_over_ps_ind_present;
231 ug_ims_ind_enum ims_voice_over_ps_ind;
232 integ_protect_status_enum is_integ_protected;
233 kal_uint8 invalid_cs_sim_counter;
234 kal_uint8 invalid_ps_sim_counter;
235}mm_emm_gmm_update_registration_req_struct;
236
237// MSG_ID_MM_EMM_GMM_UPDATE_DEREGISTRATION_REQ
238typedef struct
239{
240 LOCAL_PARA_HDR
241 kal_bool is_gmm_msg_type_present;
242 gmm_msg_type_enum gmm_msg_type;
243 kal_bool is_gmm_proc_direction_present;
244 gmm_proc_direction_enum gmm_proc_direction;
245 kal_bool is_gmm_attach_type_present;
246 gmm_attach_type_enum gmm_attach_type;
247 kal_bool is_gmm_update_type_present;
248 gmm_update_type_enum gmm_update_type;
249 kal_bool is_gmm_detach_type_present;
250 gmm_detach_type_enum gmm_detach_type;
251 kal_bool is_gmm_attach_result_present;
252 gmm_attach_result_enum gmm_attach_result;
253 kal_bool is_gmm_cause_present;
254 gmm_cause_enum gmm_cause;
255 kal_bool is_gmm_mt_cause_present;
256 mm_emm_mt_cause_enum gmm_mt_cause;
257 kal_bool is_gmm_attempt_cnt_present;
258 kal_uint8 gmm_attempt_cnt;
259 kal_bool is_rai_changed;
260 kal_bool is_gu1_updated;
261 kal_bool is_lai_changed;
262 kal_bool is_u1_updated;
263 kal_bool is_ps_detach_pending;
264 integ_protect_status_enum is_integ_protected;
265 kal_uint8 invalid_cs_sim_counter;
266 kal_uint8 invalid_ps_sim_counter;
267}mm_emm_gmm_update_deregistration_req_struct;
268
269
270// MSG_ID_MM_EMM_MM_UPDATE_REGISTRATION_REQ
271typedef struct
272{
273 LOCAL_PARA_HDR
274 mm_msg_type_enum mm_msg_type;
275 integ_protect_status_enum is_integ_protected;
276 kal_uint8 invalid_cs_sim_counter;
277 kal_uint8 invalid_ps_sim_counter;
278
279}mm_emm_mm_update_registration_req_struct;
280
281// MSG_ID_MM_EMM_MM_UPDATE_DEREGISTRATION_REQ
282typedef struct
283{
284 LOCAL_PARA_HDR
285 mm_msg_type_enum mm_msg_type;
286 kal_bool is_mm_rej_cause_present;
287 mm_rej_cause_enum mm_rej_cause;
288 kal_bool is_mm_attempt_cnt_present;
289 kal_uint8 mm_attempt_cnt;
290 kal_bool is_lai_changed;
291 kal_bool is_u1_updated;
292 integ_protect_status_enum is_integ_protected;
293 kal_uint8 invalid_cs_sim_counter;
294 kal_uint8 invalid_ps_sim_counter;
295}mm_emm_mm_update_deregistration_req_struct;
296
297// MSG_ID_MM_EMM_EMM_UPDATE_REGISTRATION_IND
298typedef struct
299{
300 LOCAL_PARA_HDR
301 emm_msg_type_enum emm_msg_type;
302 kal_bool is_emm_attach_type_present;
303 emm_attach_type_enum emm_attach_type;
304 kal_bool is_emm_update_type_present;
305 emm_update_type_enum emm_update_type;
306 kal_bool is_emm_attach_result_present;
307 emm_attach_result_enum emm_attach_result;
308 kal_bool is_emm_update_result_present;
309 emm_update_result_enum emm_update_result;
310 kal_bool is_emm_cause_present;
311 emm_cause_enum emm_cause;
312 kal_bool is_emm_attempt_cnt_present;
313 kal_uint8 emm_attempt_cnt;
314 kal_bool is_emm_sr_type_present;
315 emm_sr_type_enum emm_sr_type;
316 kal_bool is_tai_changed;
317 kal_bool is_eu1_updated;
318 kal_bool is_lai_valid;
319 lai_struct lai;
320 kal_bool is_ms_id_valid;
321 kal_uint8 ms_id_len;
322 kal_uint8 ms_id[MS_ID_LEN];
323 ue_mode_enum ue_mode;
324 kal_bool is_ims_voice_over_ps_ind_present;
325 ims_ind_enum ims_voice_over_ps_ind;
326 integ_protect_status_enum is_integ_protected;
327 kal_uint8 invalid_cs_sim_counter;
328 kal_uint8 invalid_ps_sim_counter;
329 kal_bool is_fake_lai_valid;
330 lai_struct fake_lai;
331}mm_emm_emm_update_registration_ind_struct;
332
333// MSG_ID_MM_EMM_EMM_UPDATE_DEREGISTRATION_IND
334typedef struct
335{
336 LOCAL_PARA_HDR
337 kal_bool is_emm_msg_type_present;
338 emm_msg_type_enum emm_msg_type;
339 kal_bool is_emm_proc_dir_present;
340 gmm_proc_direction_enum emm_proc_dir;
341 kal_bool is_emm_attach_type_present;
342 emm_attach_type_enum emm_attach_type;
343 kal_bool is_emm_update_type_present;
344 emm_update_type_enum emm_update_type;
345 kal_bool is_emm_detach_type_present;
346 emm_detach_type_enum emm_detach_type;
347 kal_bool is_emm_attach_result_present;
348 emm_attach_result_enum emm_attach_result;
349 kal_bool is_emm_cause_present;
350 emm_cause_enum emm_cause;
351 kal_bool is_emm_mt_cause_present;
352 mm_emm_mt_cause_enum emm_mt_cause;
353 kal_bool is_emm_attempt_cnt_present;
354 kal_uint8 emm_attempt_cnt;
355 kal_bool is_emm_sr_type_present;
356 emm_sr_type_enum emm_sr_type;
357 kal_bool is_tai_changed;
358 kal_bool is_eu1_updated;
359 ue_mode_enum ue_mode;
360 kal_bool is_ps_detach_pending;
361 integ_protect_status_enum is_integ_protected;
362 kal_uint8 invalid_cs_sim_counter;
363 kal_uint8 invalid_ps_sim_counter;
364}mm_emm_emm_update_deregistration_ind_struct;
365
366// MSG_ID_MM_EMM_CSFB_REQ
367typedef struct
368{
369 LOCAL_PARA_HDR
370 kal_uint8 req_id;
371 mm_emm_csfb_req_type_enum csfb_req_type;
372}mm_emm_csfb_req_struct;
373
374// MSG_ID_MM_EMM_CSFB_CNF
375typedef struct
376{
377 LOCAL_PARA_HDR
378 kal_uint8 req_id;
379}mm_emm_csfb_stop_req_struct;
380
381// MSG_ID_MM_EMM_CSFB_STOP_REQ
382typedef struct
383{
384 LOCAL_PARA_HDR
385 kal_uint8 req_id;
386 mm_emm_csfb_result_enum result;
387 emm_csfb_failure_info_enum csfb_failure_info;
388}mm_emm_csfb_cnf_struct;
389
390// MSG_ID_MM_EMM_CSFB_PAGE_IND
391typedef struct {
392 LOCAL_PARA_HDR
393 mm_emm_csfb_paging_id_enum csfb_paging_id; //Paging identity used in CS SERVICE NOTIFICATION
394 kal_bool is_cli_present; //Whether CLI (Calling Line Identification) IE exists or not
395 kal_uint8 cli_len; //Length of CLI
396 kal_uint8 cli[12]; //CLI value Refer to TS 24.008 subclause 10.5.4.9 Calling party BCD number for decoding.
397 kal_bool is_ss_code_present; //Whether SS code IE exists or not
398 kal_uint8 ss_code; //SS code value Refer to TS 29.002 subclause 17.7.5 for decoding.
399 kal_bool is_lcs_ind_present; //Whether LCS indicator IE exists or not
400 kal_uint8 lcs_indicatior; //LCS indicator value; 0x01: MT-LR, Other values: Normal, unspecified in this version of the protocol
401 kal_bool is_lcs_client_id_present; //Whether LCS client identity IE exists or not
402 kal_uint8 lcs_client_id_len; //Length of LCS client identity
403 kal_uint8 lcs_client_id[255]; //LCS client identity value, Refer to TS 29.002 subclause 17.7.13 for decoding.
404}mm_emm_csfb_page_ind_struct;
405
406// MSG_ID_MM_EMM_CSFB_RESULT_IND
407typedef struct {
408 LOCAL_PARA_HDR
409 mm_emm_csfb_result_enum is_csfb_failure; //notify upper layer if csfb is failure
410}mm_emm_csfb_result_ind_struct;
411
412// MSG_ID_MM_EMM_CSFB_PAGE_RSP
413typedef struct {
414 LOCAL_PARA_HDR
415 kal_bool is_accept_paging; //Whether upper layer decides to answer the mobile terminating CS service
416}mm_emm_csfb_page_rsp_struct;
417
418// MSG_ID_MM_EMM_CSFB_PAGE_CONFIG_REQ
419typedef struct {
420 LOCAL_PARA_HDR
421 csfb_page_config_enum csfb_page_config;
422 kal_uint8 add_info; // if csfb_page_config is 3 or 4, add_info will be the new timer value
423}mm_emm_csfb_page_config_req_struct;
424#if 0
425/* under construction !*/
426/* under construction !*/
427/* under construction !*/
428/* under construction !*/
429/* under construction !*/
430/* under construction !*/
431/* under construction !*/
432#ifdef __SUPPORT_CLIB_TIME__
433/* under construction !*/
434#else
435/* under construction !*/
436#endif
437/* under construction !*/
438/* under construction !*/
439/* under construction !*/
440/* under construction !*/
441/* under construction !*/
442/* under construction !*/
443/* under construction !*/
444/* under construction !*/
445/* under construction !*/
446#ifdef __SUPPORT_CLIB_TIME__
447/* under construction !*/
448#else
449/* under construction !*/
450#endif
451/* under construction !*/
452#endif
453#if defined (__SGLTE__)
454/*EMM->MM*/
455typedef struct {
456 LOCAL_PARA_HDR
457 lr_result_enum peer_lr_result;
458 nas_proc_enum peer_lr_procedure;
459 emm_cause_enum emm_peer_reject_cause;
460 plmn_id_struct emm_peer_plmn_id;
461 kal_bool is_update_eq_plmn_only; /* If set TRUE, only R+E PLMN info are valid. */
462 kal_uint8 eq_plmn_byte_count;
463 kal_uint8 eq_plmn_id[MAX_NUM_EQ_PLMN*3];
464}mm_emm_peer_lr_result_ind_struct;
465
466/*MM->EMM*/
467typedef struct {
468 LOCAL_PARA_HDR
469 lr_result_enum peer_lr_result;
470 nas_proc_enum peer_lr_procedure;
471 mm_cause_enum mm_peer_reject_cause;
472 plmn_id_struct mm_peer_plmn_id;
473 kal_bool is_update_eq_plmn_needed;
474 kal_uint8 eq_plmn_byte_count;
475 kal_uint8 eq_plmn_id[MAX_NUM_EQ_PLMN*3];
476}mm_emm_peer_lr_result_req_struct;
477
478#endif
479
480// MSG_ID_EMM_MM_NAS_CTXT_TRANSFER_REQ
481typedef struct {
482 LOCAL_PARA_HDR
483 irat_type_enum irat_type;
484 rat_type_enum source_rat;
485 rat_type_enum target_rat;
486 domain_id_enum connection_domain;
487 emm2mm_irat_info_struct emm_info;
488}emm_mm_nas_ctxt_transfer_req_struct;
489
490// MSG_ID_MM_EMM_NAS_CTXT_TRANSFER_REQ
491typedef struct {
492 LOCAL_PARA_HDR
493 irat_type_enum irat_type;
494 rat_type_enum source_rat;
495 rat_type_enum target_rat;
496 mm2emm_irat_info_struct mm_info;
497}mm_emm_nas_ctxt_transfer_req_struct;
498
499#endif /* ----- #ifndef MM_EMM_STRUCT_INC ----- */