blob: 4c352ed3f6925322221c840d08387cc0dd529c65 [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 * atp_d2at_struct.h
40 *
41 * Project:
42 * --------
43 *
44 *
45 * Description:
46 * ------------
47 *
48 *
49 * Author:
50 * -------
51 *
52 *
53 *
54 * ==========================================================================
55 *
56 * .
57 *
58 ****************************************************************************/
59
60#ifndef _ATP_D2AT_STRUCT_H
61#define _ATP_D2AT_STRUCT_H
62
63#include "kal_general_types.h"
64#include "kal_public_defs.h"
65#include "atcmd_struct.h"
66
67#include "d2pm_d2rm_struct.h"
68#include "ursp_public_defs.h"
69#include "ursp_struct.h"
70
71#define APN_PARAMETER_STRING_LEN (1024)
72#define EIF_CMD_STRING_LEN (16)
73#define EPDN_CMD_STRING_LEN (16)
74
75/*******************************************************************************/
76/* Caution!! */
77/* LOCAL_PARA_HDR and src_id MUST be the 1st and 2nd parameters, respectively. */
78/*******************************************************************************/
79#define ATP_D2AT_REQ_LOCAL_PARA_HDR \
80 LOCAL_PARA_HDR \
81 kal_uint32 src_id; \
82 kal_uint32 cmd_mode;
83
84#define ATP_D2AT_CNF_LOCAL_PARA_HDR \
85 LOCAL_PARA_HDR \
86 kal_uint32 src_id; \
87 kal_bool is_success; \
88 kal_uint16 err_cause;
89
90#define ATP_D2AT_IND_LOCAL_PARA_HDR \
91 LOCAL_PARA_HDR \
92 kal_uint32 src_id; \
93
94#define ATP_D2AT_L4_CMD_IND_LOCAL_PARA_HDR \
95 LOCAL_PARA_HDR \
96 kal_uint32 src_id;
97
98#define ATP_D2AT_L4_RSP_IND_LOCAL_PARA_HDR \
99 LOCAL_PARA_HDR \
100 kal_uint32 src_id; \
101 kal_bool is_success; \
102 kal_uint16 err_cause;
103
104typedef struct atp_d2at_hdr atp_d2at_hdr_t;
105typedef struct atp_d2at_hdr* atp_d2at_hdr_ptr_t;
106struct atp_d2at_hdr
107{
108 LOCAL_PARA_HDR
109 kal_uint32 src_id;
110};
111
112
113/*******************************************************************************
114* Internal *
115*******************************************************************************/
116#if 0
117/* under construction !*/
118/* under construction !*/
119/* under construction !*/
120/* under construction !*/
121/* under construction !*/
122/* under construction !*/
123/* under construction !*/
124/* under construction !*/
125/* under construction !*/
126/* under construction !*/
127/* under construction !*/
128/* under construction !*/
129/* under construction !*/
130/* under construction !*/
131/* under construction !*/
132/* under construction !*/
133/* under construction !*/
134/* under construction !*/
135/* under construction !*/
136/* under construction !*/
137/* under construction !*/
138/* under construction !*/
139/* under construction !*/
140/* under construction !*/
141/* under construction !*/
142/* under construction !*/
143/* under construction !*/
144/* under construction !*/
145/* under construction !*/
146/* under construction !*/
147/* under construction !*/
148/* under construction !*/
149/* under construction !*/
150/* under construction !*/
151/* under construction !*/
152/* under construction !*/
153/* under construction !*/
154/* under construction !*/
155/* under construction !*/
156/* under construction !*/
157/* under construction !*/
158/* under construction !*/
159/* under construction !*/
160/* under construction !*/
161/* under construction !*/
162/* under construction !*/
163/* under construction !*/
164/* under construction !*/
165/* under construction !*/
166/* under construction !*/
167/* under construction !*/
168#endif
169/*******************************************************************************
170* ATP to DAST request and DAST to ATP confrim *
171*******************************************************************************/
172//General REQ struct
173typedef struct {
174 ATP_D2AT_REQ_LOCAL_PARA_HDR
175} atp_d2at_req_struct;
176
177//General CNF struct
178typedef struct {
179 ATP_D2AT_CNF_LOCAL_PARA_HDR
180} atp_d2at_cnf_struct;
181
182//AT+CFUN REQ
183typedef struct {
184 ATP_D2AT_REQ_LOCAL_PARA_HDR
185 kal_bool state;
186} atp_d2at_cfun_req_struct;
187//AT+CFUN CNF
188typedef struct {
189 ATP_D2AT_CNF_LOCAL_PARA_HDR
190} atp_d2at_cfun_cnf_struct;
191
192//AT+EFUN REQ
193typedef struct {
194 ATP_D2AT_REQ_LOCAL_PARA_HDR
195 kal_bool state;
196} atp_d2at_efun_req_struct;
197//AT+EFUN CNF
198typedef struct {
199 ATP_D2AT_CNF_LOCAL_PARA_HDR
200} atp_d2at_efun_cnf_struct;
201
202//AT+EDALLOW REQ
203typedef struct {
204 ATP_D2AT_REQ_LOCAL_PARA_HDR
205 kal_uint8 edallow_value;
206 kal_uint8 para;
207} atp_d2at_edallow_req_struct;
208
209//AT+EDALLOW CNF
210typedef struct {
211 ATP_D2AT_CNF_LOCAL_PARA_HDR
212} atp_d2at_edallow_cnf_struct;
213
214//AT+EDATASIM REQ
215typedef struct {
216 ATP_D2AT_REQ_LOCAL_PARA_HDR
217 kal_uint8 sim_slot;
218} atp_d2at_edatasim_req_struct;
219
220//AT+EDATASIM CNF
221typedef struct {
222 ATP_D2AT_CNF_LOCAL_PARA_HDR
223} atp_d2at_edatasim_cnf_struct;
224
225//AT+EIAMDPREFER REQ
226typedef struct {
227 ATP_D2AT_REQ_LOCAL_PARA_HDR
228 kal_bool ia_md_prefer;
229} atp_d2at_eiamdprefer_req_struct;
230
231//AT+EIAMDPREFER CNF
232typedef struct {
233 ATP_D2AT_CNF_LOCAL_PARA_HDR
234} atp_d2at_eiamdprefer_cnf_struct;
235
236//AT+ACTTEST CNF
237typedef struct {
238 ATP_D2AT_CNF_LOCAL_PARA_HDR
239} atp_d2at_acttest_cnf_struct;
240//READ response = [+CGDCONT: <cid>,<PDP_type>,<APN>,<PDP_addr>,<d_comp>,<h_comp>[,<IPv4AddrAlloc>[,<request_type>[,<P-CSCF_discovery>[,<IM_CN_Signalling_Flag_Ind>[,<NSLPI>[,<securePCO>[,<IPv4_MTU_discovery>[,<Local_Addr_Ind>]]]]]]]]]
241typedef struct
242{
243 ATP_D2AT_REQ_LOCAL_PARA_HDR
244
245 at_token_parse_result_enum cid_parse_result;
246 kal_uint32 cid; // integer type
247 at_token_parse_result_enum PDP_type_parse_result;
248 kal_uint8 PDP_type[PDP_TYPE_STRING_LEN]; // string type
249 at_token_parse_result_enum APN_parse_result;
250 kal_uint8 APN[APN_STRING_LEN]; // string type
251 at_token_parse_result_enum PDP_addr_parse_result;
252 kal_uint8 PDP_addr[APN_STRING_LEN]; // string type
253 at_token_parse_result_enum d_comp_parse_result;
254 atcmd_d_comp_enum d_comp; // integer type
255 at_token_parse_result_enum h_comp_parse_result;
256 atcmd_h_comp_enum h_comp; // integer type
257 at_token_parse_result_enum IPv4AddrAlloc_parse_result;
258 atcmd_IPv4AddrAlloc_enum IPv4AddrAlloc; // integer type
259 at_token_parse_result_enum request_type_parse_result;
260 atcmd_request_type_enum request_type; // integer type
261 at_token_parse_result_enum P_CSCF_discovery_parse_result;
262 atcmd_P_CSCF_discovery_enum P_CSCF_discovery; // integer type
263 at_token_parse_result_enum IM_CN_Signalling_Flag_Ind_parse_result;
264 atcmd_IM_CN_Signalling_Flag_Ind_enum IM_CN_Signalling_Flag_Ind; // integer type
265 /*
266 at_token_parse_result_enum NSLPI_parse_result;
267 atcmd_NSLPI_enum NSLPI; // integer type
268 at_token_parse_result_enum securePCO_parse_result;
269 atcmd_securePCO_enum securePCO; // integer type
270 at_token_parse_result_enum IPv4_MTU_discovery_parse_result;
271 atcmd_IPv4_MTU_discovery_enum IPv4_MTU_discovery; // integer type
272 at_token_parse_result_enum Local_Addr_Ind_parse_result;
273 atcmd_Local_Addr_Ind_enum Local_Addr_Ind; // integer type
274 */
275} atp_d2at_cgdcont_req_struct1;
276
277
278typedef struct
279{
280 ATP_D2AT_REQ_LOCAL_PARA_HDR
281
282 kal_bool apn_present;
283 kal_char apn[APN_STRING_LEN]; // string type
284 kal_bool apn_idx_present;
285 kal_int32 apn_idx;
286 kal_bool request_type_present;
287 atcmd_request_type_enum request_type; // integer type
288 kal_bool rat_type_present;
289 kal_uint32 rat_type;
290 kal_bool d_comp_present;
291 kal_uint32 d_comp;
292 kal_bool h_comp_present;
293 kal_uint32 h_comp;
294 kal_bool P_CSCF_discovery_present;
295 kal_uint32 P_CSCF_discovery;
296 kal_bool IM_CN_Signalling_Flag_Ind_present;
297 kal_uint32 IM_CN_Signalling_Flag_Ind;
298} atp_d2at_lgdcont_req_struct;
299
300
301typedef struct
302{
303 ATP_D2AT_REQ_LOCAL_PARA_HDR
304
305 kal_bool apn_present;
306 kal_char apn[APN_STRING_LEN]; // string type
307 kal_bool apn_idx_present;
308 kal_int32 apn_idx;
309 kal_bool s_nssai_present;
310 at_s_nssai_struct s_nssai;
311} atp_d2at_enssai_req_struct;
312
313
314typedef struct
315{
316 ATP_D2AT_REQ_LOCAL_PARA_HDR
317
318 kal_int32 reset_d2_apn;
319 kal_int32 reset_gprs_apn;
320
321} atp_d2at_rstiaapn_req_struct;
322
323
324typedef struct
325{
326 ATP_D2AT_IND_LOCAL_PARA_HDR
327
328 kal_bool cid_present;
329 kal_uint32 cid; // integer type
330 kal_bool PDP_type_present;
331 kal_uint8 PDP_type[PDP_TYPE_STRING_LEN]; // string type
332 kal_bool APN_present;
333 kal_uint8 APN[APN_STRING_LEN]; // string type
334 kal_bool PDP_addr_present;
335 kal_uint8 PDP_addr[APN_STRING_LEN]; // string type
336 kal_bool d_comp_present;
337 atcmd_d_comp_enum d_comp; // integer type
338 kal_bool h_comp_present;
339 atcmd_h_comp_enum h_comp; // integer type
340 kal_bool IPv4AddrAlloc_present;
341 atcmd_IPv4AddrAlloc_enum IPv4AddrAlloc; // integer type
342 kal_bool request_type_present;
343 atcmd_request_type_enum request_type; // integer type
344 kal_bool P_CSCF_discovery_present;
345 atcmd_P_CSCF_discovery_enum P_CSCF_discovery; // integer type
346 kal_bool IM_CN_Signalling_Flag_Ind_present;
347 atcmd_IM_CN_Signalling_Flag_Ind_enum IM_CN_Signalling_Flag_Ind; // integer type
348 /*
349 kal_bool NSLPI_present;
350 atcmd_NSLPI_enum NSLPI; // integer type
351 kal_bool securePCO_present;
352 atcmd_securePCO_enum securePCO; // integer type
353 kal_bool IPv4_MTU_discovery_present;
354 atcmd_IPv4_MTU_discovery_enum IPv4_MTU_discovery; // integer type
355 kal_bool Local_Addr_Ind_present;
356 atcmd_Local_Addr_Ind_enum Local_Addr_Ind; // integer type
357 */
358
359} atp_d2at_cgdcont_ind_struct1;
360
361
362
363//AT+CGDCONT CNF
364
365typedef struct {
366 ATP_D2AT_CNF_LOCAL_PARA_HDR
367}atp_d2at_cgdcont_cnf_struct;
368
369typedef struct {
370 ATP_D2AT_CNF_LOCAL_PARA_HDR
371}atp_d2at_cgauth_cnf_struct;
372
373/*******************/
374/* D2CM/D2PM Start */
375/*******************/
376
377// AT+EAPNLOCK
378typedef struct
379{
380 ATP_D2AT_REQ_LOCAL_PARA_HDR
381
382 kal_uint32 sim_id;
383 atcmd_state_enum state;
384 kal_uint8 iccid[USERID_STRING_LEN]; // string type
385}atp_d2at_eapnlock_req_struct;
386
387typedef struct
388{
389 ATP_D2AT_CNF_LOCAL_PARA_HDR
390
391 atcmd_state_enum state;
392}atp_d2at_eapnlock_cnf_struct;
393
394
395// AT+EAPNSET
396typedef struct
397{
398 at_token_parse_result_enum userid_parse_result;
399 kal_uint8 userid[USERID_STRING_LEN]; // string type
400 at_token_parse_result_enum password_parse_result;
401 kal_uint8 password[PASSWORD_STRING_LEN]; // string type
402} at_eapnset_up_struct;
403
404
405// AT+EAPNSET
406/*
407typedef struct
408{
409 at_token_parse_result_enum S_NSSAI_parse_result;
410 at_s_nssai_struct S_NSSAI; // string type
411 at_token_parse_result_enum SSC_mode_parse_result;
412 atcmd_SSC_mode_enum SSC_mode; // integer type
413 at_token_parse_result_enum Access_type_parse_result;
414 atcmd_Access_type_enum Access_type; // integer type
415} at_eapnset_UE_local_config_struct;
416*/
417
418
419typedef struct
420{
421 ATP_D2AT_REQ_LOCAL_PARA_HDR
422
423 kal_uint32 sim_id;
424 kal_bool apn_present;
425 kal_uint8 apn[APN_STRING_LEN]; // string type
426 kal_bool cmd_present;
427 kal_uint32 cmd; // integer type
428
429 union
430 {
431 kal_uint8 apn_parameter[APN_PARAMETER_STRING_LEN];
432 at_eapnset_up_struct user_passwd;
433 at_eapnset_UE_local_config_struct UE_local_config;
434 } param;
435}atp_d2at_eapnset_req_struct;
436
437typedef struct
438{
439 ATP_D2AT_IND_LOCAL_PARA_HDR
440
441 kal_uint32 cmd_mode;
442
443 union
444 {
445 kal_uint8 apn_parameter[APN_PARAMETER_STRING_LEN];
446 struct
447 {
448 kal_uint8 apn[APN_STRING_LEN];
449 kal_uint8 username[USERID_STRING_LEN];
450 kal_uint8 passwd[PASSWORD_STRING_LEN];
451 kal_uint32 type;
452 kal_uint8 pdp_type[PDP_TYPE_STRING_LEN];
453 kal_uint8 roam_prot[ROAMING_IP_TYPE_STRING_LEN];
454 kal_uint32 auth_type;
455 kal_bool carrier_enabled;
456 kal_uint32 max_conn;
457 kal_uint32 max_conn_time;
458 kal_uint32 wait_time;
459 kal_uint32 bearer_bitmask;
460 kal_uint32 inact_time;
461 }apn_info;
462 }param;
463}atp_d2at_eapnset_ind_struct;
464
465typedef struct
466{
467 ATP_D2AT_CNF_LOCAL_PARA_HDR
468}atp_d2at_eapnset_cnf_struct;
469
470
471// AT+EAPNACT
472typedef struct
473{
474 ATP_D2AT_REQ_LOCAL_PARA_HDR
475
476 kal_uint8 state;
477 kal_uint32 flag;
478
479 union
480 {
481 struct
482 {
483 kal_char apn[APN_STRING_LEN];
484 kal_int32 apn_idx;
485 kal_char type[APN_TYPE_STRING_LEN];
486 kal_bool cid_present;
487 kal_int32 cid;
488 kal_bool cgdcont_req_present;
489 at_cgdcont_req_struct cgdcont_req;
490 kal_bool rat_type_present;
491 atcmd_rat_enum rat_type;
492 atcmd_fallback_enable_enum ipv4v6_fb_enable; // integer type
493 atcmd_ipv4_first_enum ipv4v6_fb_ipv4_first; // integer type
494 kal_bool if_id_present;
495 kal_int32 if_id;
496 ursp_traffic_desc_struct traffic_desc;
497 ursp_ue_local_conf_struct ue_local_conf;
498 kal_bool match_all_disallow;
499 }act;
500
501 struct
502 {
503 kal_int32 cid;
504 atcmd_deact_cause_enum reason;
505 }deact;
506 }param;
507}atp_d2at_eapnact_req_struct;
508
509typedef struct
510{
511 ATP_D2AT_IND_LOCAL_PARA_HDR
512
513 kal_uint8 state;
514 kal_int32 cid, fb_cid, reason;
515}atp_d2at_eapnact_ind_struct;
516
517typedef struct
518{
519 ATP_D2AT_CNF_LOCAL_PARA_HDR
520
521 // N/A
522}atp_d2at_eapnact_cnf_struct;
523
524
525// AT+EAPNRESV
526typedef struct
527{
528 ATP_D2AT_REQ_LOCAL_PARA_HDR
529
530 atcmd_state_enum state;
531 union
532 {
533 struct
534 {
535 kal_bool cid_present;
536 kal_int32 cid;
537 }act;
538
539 struct
540 {
541 kal_int32 cid;
542 }deact;
543 }param;
544}atp_d2at_eapnresv_req_struct;
545
546typedef struct
547{
548 ATP_D2AT_CNF_LOCAL_PARA_HDR
549
550 atcmd_state_enum state;
551 union
552 {
553 struct
554 {
555 kal_int32 cid;
556 }act;
557
558 struct
559 {
560 kal_int32 cid;
561 }deact;
562 }param;
563}atp_d2at_eapnresv_cnf_struct;
564
565
566// AT+EPDN
567typedef struct
568{
569 ATP_D2AT_REQ_LOCAL_PARA_HDR
570
571 kal_uint32 aid;
572 kal_uint32 state_mask;
573 kal_uint8 cmd[EPDN_CMD_STRING_LEN];
574}atp_d2at_epdn_req_struct;
575
576typedef struct
577{
578 ATP_D2AT_IND_LOCAL_PARA_HDR
579
580 kal_int32 aid;
581 kal_uint8 cmd[EPDN_CMD_STRING_LEN];
582 kal_uint32 event;
583 kal_int32 if_id;
584 kal_uint32 ran_type;
585 kal_uint32 mtu;
586 kal_uint32 pdp_type;
587 kal_uint32 deact_reason;
588 kal_bool ipv4_addr_present;
589 kal_uint8 ipv4_addr[MAXIMUM_POSSIBLE_ADDR_LEN];
590 kal_int32 ipv4_netmask;
591 kal_bool ipv6_addr_present;
592 kal_uint8 ipv6_addr[MAXIMUM_POSSIBLE_ADDR_LEN];
593 kal_int32 ipv6_prefix_len;
594} atp_d2at_epdn_ind_struct;
595
596typedef struct
597{
598 ATP_D2AT_CNF_LOCAL_PARA_HDR
599}atp_d2at_epdn_cnf_struct;
600
601
602// +EPDN
603typedef atp_d2at_epdn_ind_struct atp_d2at_ap_urc_epdn_ind_struct;
604
605
606// AT+EGFB
607typedef struct
608{
609 ATP_D2AT_REQ_LOCAL_PARA_HDR
610 at_token_parse_result_enum fallback_enable_parse_result;
611 atcmd_fallback_enable_enum fallback_enable; // integer type
612 at_token_parse_result_enum ipv4_first_parse_result;
613 atcmd_ipv4_first_enum ipv4_first; // integer type
614}atp_d2at_egfb_req_struct;
615
616typedef struct
617{
618 ATP_D2AT_CNF_LOCAL_PARA_HDR
619}atp_d2at_egfb_cnf_struct;
620
621
622// AT+EDRETRY
623typedef struct
624{
625 ATP_D2AT_REQ_LOCAL_PARA_HDR
626
627 kal_char apn[APN_STRING_LEN];
628 kal_bool mode_present;
629 kal_uint32 mode;
630 kal_bool reason_present;
631 kal_uint32 reason;
632}atp_d2at_edretry_req_struct;
633
634typedef struct {
635 ATP_D2AT_CNF_LOCAL_PARA_HDR
636
637 kal_bool retrytime_present;
638 kal_uint32 retrytime;
639}atp_d2at_edretry_cnf_struct;
640
641
642// +EDRETRY
643typedef struct
644{
645 ATP_D2AT_IND_LOCAL_PARA_HDR
646
647 kal_bool apn_present;
648 kal_char apn[APN_STRING_LEN];
649}atp_d2at_ap_urc_edretry_ind_struct;
650
651// AT+EDRETRYRDP
652typedef struct
653{
654 ATP_D2AT_REQ_LOCAL_PARA_HDR
655
656 kal_char apn[APN_STRING_LEN];
657}atp_d2at_edretryrdp_req_struct;
658
659typedef struct
660{
661 ATP_D2AT_IND_LOCAL_PARA_HDR
662
663 kal_char apn[APN_STRING_LEN];
664 iwlan_ran_e ran;
665
666 union
667 {
668 struct
669 {
670 atcmd_rat_enum rat;
671 kal_bool retrytime_present;
672 kal_uint32 retrytime;
673 }cell;
674
675 struct
676 {
677 kal_bool retrytime_present;
678 kal_uint32 retrytime;
679 }wlan;
680 }timer;
681
682}atp_d2at_edretryrdp_ind_struct;
683
684typedef struct {
685 ATP_D2AT_CNF_LOCAL_PARA_HDR
686}atp_d2at_edretryrdp_cnf_struct;
687
688// +CGPIAF
689typedef struct {
690 ATP_D2AT_REQ_LOCAL_PARA_HDR
691
692 kal_bool IPv6_AddressFormat_present;
693 kal_uint8 IPv6_AddressFormat;
694 kal_bool IPv6_SubnetNotation_present;
695 kal_uint8 IPv6_SubnetNotation;
696 kal_bool IPv6_LeadingZeros_present;
697 kal_uint8 IPv6_LeadingZeros;
698 kal_bool IPv6_CompressZeros_present;
699 kal_uint8 IPv6_CompressZeros;
700} atp_d2at_cgpiaf_req_struct;
701
702// AT+CGACT
703typedef struct
704{
705 ATP_D2AT_REQ_LOCAL_PARA_HDR
706
707 at_token_parse_result_enum state_parse_result;
708 atcmd_state_enum state;
709 at_token_parse_result_enum cid_parse_result;
710 kal_uint32 cid;
711}atp_d2at_cgact_req_struct;
712
713typedef struct
714{
715 ATP_D2AT_IND_LOCAL_PARA_HDR
716
717 at_token_parse_result_enum state_parse_result;
718 atcmd_state_enum state;
719 at_token_parse_result_enum cid_parse_result;
720 kal_uint32 cid;
721}atp_d2at_cgact_ind_struct;
722
723typedef struct
724{
725 ATP_D2AT_CNF_LOCAL_PARA_HDR
726
727 kal_uint32 ind_num;
728 at_cgact_ind_struct ind[MAX_PS_CID_NUM]; // NEED_TO_BE_NOTICED, to use a macro and indications?
729}atp_d2at_cgact_cnf_struct;
730
731
732// AT+CGCONTRDP
733typedef struct
734{
735 ATP_D2AT_REQ_LOCAL_PARA_HDR
736
737 at_token_parse_result_enum cid_parse_result;
738 kal_uint32 cid;
739}atp_d2at_cgcontrdp_req_struct;
740
741typedef struct
742{
743 ATP_D2AT_IND_LOCAL_PARA_HDR
744
745 at_cgcontrdp_ind_struct ind;
746}atp_d2at_cgcontrdp_ind_struct;
747
748typedef struct
749{
750 ATP_D2AT_CNF_LOCAL_PARA_HDR
751
752 // N/A
753}atp_d2at_cgcontrdp_cnf_struct;
754
755
756// AT+ESIMMAP, NEED_TO_BE_NOTICED, monitoring only
757typedef struct
758{
759 ATP_D2AT_REQ_LOCAL_PARA_HDR
760
761 kal_uint8 sim_id;
762 kal_uint8 curr_sim_slot[MAX_SIM_NUM];
763}atp_d2at_esimmap_req_struct;
764
765
766// AT+EPSMAP, NEED_TO_BE_NOTICED, monitoring only
767typedef struct
768{
769 ATP_D2AT_REQ_LOCAL_PARA_HDR
770
771 kal_uint8 num_of_sim;
772 kal_uint8 sim_slot[MAX_SIM_NUM];
773 kal_uint8 curr_sim_slot[MAX_SIM_NUM];
774}atp_d2at_epsmap_req_struct;
775
776
777// +EAPNINFO IND
778typedef struct
779{
780 ATP_D2AT_IND_LOCAL_PARA_HDR
781
782 msg_type event;
783 kal_char prefix[APN_STRING_LEN];
784
785 union
786 {
787 // AT+EAPNSET
788 struct
789 {
790 kal_char apn[APN_STRING_LEN];
791 kal_uint32 pdn_state;
792 kal_int32 p_cid;
793 kal_int32 fb_cid;
794 kal_uint32 pdp_type;
795 kal_uint32 roam_prot;
796 kal_uint32 flag; // is_alias, is_usable
797 }eapnset;
798
799 // AT+EAPNACT
800 struct
801 {
802 kal_uint8 state;
803
804 union
805 {
806 struct
807 {
808 kal_char apn[APN_STRING_LEN];
809 kal_int32 pdn_state;
810 kal_char apn_type[APN_TYPE_STRING_LEN];
811 kal_int32 p_cid;
812 kal_int32 fb_cid;
813 kal_uint32 pdp_type;
814 kal_int32 if_id;
815 kal_uint32 suff_cond;
816 kal_uint32 ap_if_status;
817 kal_uint32 md_if_status;
818 kal_uint32 usr_list;
819 kal_uint32 flag; // is_ack, is_dangling, is_abort, is_forced
820 kal_bool cgdcont_req_present;
821 }act;
822
823 struct
824 {
825 kal_int32 cid;
826 kal_int32 bearer_state;
827 kal_char apn[APN_STRING_LEN];
828 kal_int32 p_cid;
829 kal_int32 fb_cid;
830 kal_uint32 pdp_type;
831 kal_int32 if_id;
832 kal_uint32 ap_if_status;
833 kal_uint32 md_if_status;
834 kal_uint32 usr_list;
835 kal_uint32 flag;
836 }deact;
837 }param;
838 }eapnact;
839
840 // AT+EPDN
841 struct
842 {
843 kal_int32 cid;
844 kal_int32 bearer_state;
845 kal_uint32 pdp_type;
846 kal_int32 if_id;
847 kal_uint32 cond;
848 kal_uint32 ap_if_status;
849 kal_uint32 md_if_status;
850 kal_uint32 usr_list;
851 }epdn;
852 }info;
853} atp_d2at_ap_urc_eapninfo_ind_struct;
854/*****************/
855/* D2CM/D2PM End */
856/*****************/
857
858/*****************/
859/* D2CM/D2PM Start */
860/*****************/
861
862/*****************/
863/* D2CM/D2PM End */
864/*****************/
865
866typedef enum {
867 ATP_D2AT_EIF_ADDR_TYPE_V4 = 1,
868 ATP_D2AT_EIF_ADDR_TYPE_V6 = 2,
869} atp_d2at_eif_addr_type_enum;
870
871typedef struct {
872 kal_uint32 type;
873 kal_uint32 num;
874 kal_uint8 v4[4];
875 kal_uint8 v6[16];
876 kal_int32 v6_prefix;
877 kal_uint8 v4_2[4];
878 kal_uint8 v6_2[16];
879 kal_int32 v6_2_prefix;
880 kal_int32 mtu;
881} at_eif_ip_struct;
882
883typedef struct {
884 kal_char buf[512];
885} at_eif_str_struct;
886
887typedef struct {
888 ATP_D2AT_REQ_LOCAL_PARA_HDR
889
890 kal_uint32 interface_id;
891 kal_char cmd_str[EIF_CMD_STRING_LEN];
892 union {
893 at_eif_ip_struct ip;
894 at_eif_str_struct str;
895 } param;
896} atp_d2at_eif_req_struct;
897//AT+EIF CNF
898
899typedef struct {
900 ATP_D2AT_CNF_LOCAL_PARA_HDR
901} atp_d2at_eif_cnf_struct;
902
903typedef struct {
904 ATP_D2AT_CNF_LOCAL_PARA_HDR
905 kal_uint32 interface_id;
906 kal_uint32 ran;
907 new_ip_info_struct ip_info;
908} atp_d2at_eif_ind_struct;
909
910//AT+EAID REQ
911typedef struct {
912 ATP_D2AT_REQ_LOCAL_PARA_HDR
913
914 atcmd_state_enum state;
915 kal_uint8 apn[APN_STRING_LEN];
916 kal_uint8 type[APN_TYPE_LIST_STRING_LEN];
917} atp_d2at_eaid_req_struct;
918//AT+EAID CNF
919typedef struct {
920 ATP_D2AT_CNF_LOCAL_PARA_HDR
921} atp_d2at_eaid_cnf_struct;
922
923//AT+EIAAPN REQ
924typedef struct {
925 ATP_D2AT_REQ_LOCAL_PARA_HDR
926 kal_uint8 sim_id;
927 kal_uint8 apn[APN_STRING_LEN];
928 kal_uint8 iccid[24]; // it's 20, just prevent over-boundary
929 kal_int32 apn_idx; // apn index in apn setting table
930 kal_uint8 pdp_type[PDP_TYPE_STRING_LEN]; // string type
931 kal_uint8 roaming_pdp_type[PDP_TYPE_STRING_LEN]; // string type
932 atcmd_auth_prot_enum auth_prot;
933 kal_uint8 userid[USERID_STRING_LEN];
934 kal_uint8 password[PASSWORD_STRING_LEN];
935} atp_d2at_eiaapn_req_struct;
936//AT+EIAAPN CNF
937typedef struct {
938 ATP_D2AT_CNF_LOCAL_PARA_HDR
939} atp_d2at_eiaapn_cnf_struct;
940
941// AT+EGDATA
942typedef struct
943{
944 ATP_D2AT_REQ_LOCAL_PARA_HDR
945 kal_uint32 if_type;
946}atp_d2at_egdata_req_struct;
947
948// AT+EPSI REQ
949typedef struct
950{
951 ATP_D2AT_REQ_LOCAL_PARA_HDR
952 kal_uint8 state;
953 kal_uint8 sim_id;
954 union {
955 struct {
956 kal_char apn[APN_STRING_LEN]; // string type
957 kal_bool apn_idx_present;
958 kal_int32 apn_idx;
959 kal_uint8 psi;
960 } epsi;
961
962 } param;
963} atp_d2at_epsi_req_struct;
964
965// AT+EPSI CNF
966typedef struct {
967 ATP_D2AT_CNF_LOCAL_PARA_HDR
968 kal_uint8 state;
969 kal_uint8 psi;
970} atp_d2at_epsi_cnf_struct;
971
972/*******************************************************************************
973* DAST to ATP IND (send URC to AP) *
974*******************************************************************************/
975//+CGEV IND: use at_cgev_ind_struct directly
976typedef struct {
977 ATP_D2AT_IND_LOCAL_PARA_HDR
978
979 cgev_event_enum event;
980
981 union {
982 cgev_nw_pdn_act_struct nw_pdn_act;
983 cgev_me_pdn_act_struct me_pdn_act;
984 cgev_nw_act_struct nw_act;
985 cgev_me_act_struct me_act;
986 cgev_nw_pdn_deact_struct nw_pdn_deact;
987 cgev_me_pdn_deact_struct me_pdn_deact;
988 cgev_nw_deact_struct nw_deact;
989 cgev_me_deact_struct me_deact;
990 cgev_nw_modify_struct nw_modify;
991 cgev_me_modify_struct me_modify;
992 cgev_reject_struct reject;
993 cgev_nw_react_struct nw_react;
994 } info;
995} atp_d2at_ap_urc_cgev_ind_struct;
996
997typedef struct {
998 ATP_D2AT_IND_LOCAL_PARA_HDR
999 at_escontind_ind_struct cmd;
1000} atp_d2at_ap_urc_escontind_ind_struct;
1001//+EIF IND
1002typedef struct {
1003 LOCAL_PARA_HDR
1004
1005 kal_uint32 interface_id;
1006 kal_char cmd[EIF_CMD_STRING_LEN];
1007 kal_uint32 cause;
1008 new_ip_info_struct ip_info;
1009 at_eif_str_struct str;
1010} atp_d2at_ap_urc_eif_ind_struct;
1011
1012typedef d2pm_d2rm_pdn_ho_notify_ind_struct atp_d2at_ap_urc_eif_ho_ind_struct;
1013
1014/*******************************************************************************
1015* DAST to ATP IND and ATP to DAST RSP (send AT to PS) *
1016*******************************************************************************/
1017//General IND
1018typedef struct {
1019 ATP_D2AT_L4_CMD_IND_LOCAL_PARA_HDR
1020} atp_d2at_l4_cmd_ind_struct;
1021//General RSP
1022typedef struct {
1023 ATP_D2AT_L4_RSP_IND_LOCAL_PARA_HDR
1024} atp_d2at_l4_cmd_rsp_struct;
1025
1026//AT+CGATT IND
1027typedef struct {
1028 ATP_D2AT_L4_CMD_IND_LOCAL_PARA_HDR
1029
1030 atcmd_state_enum state;
1031} atp_d2at_l4_cmd_cgatt_ind_struct;
1032//AT+CGATT RSP
1033typedef struct {
1034 ATP_D2AT_L4_RSP_IND_LOCAL_PARA_HDR
1035} atp_d2at_l4_cmd_cgatt_rsp_struct;
1036
1037//AT+EGTYPE IND
1038typedef struct {
1039 ATP_D2AT_L4_CMD_IND_LOCAL_PARA_HDR
1040
1041 kal_char type[8];
1042} atp_d2at_l4_cmd_egtype_ind_struct;
1043//AT+EGTYPE RSP
1044typedef struct {
1045 ATP_D2AT_L4_RSP_IND_LOCAL_PARA_HDR
1046} atp_d2at_l4_cmd_egtype_rsp_struct;
1047
1048//AT+ICCID IND
1049typedef struct {
1050 ATP_D2AT_L4_CMD_IND_LOCAL_PARA_HDR
1051} atp_d2at_l4_cmd_iccid_ind_struct;
1052
1053//+ICCID RSP
1054typedef struct {
1055 ATP_D2AT_L4_RSP_IND_LOCAL_PARA_HDR
1056 kal_uint8 iccid[20];
1057} atp_d2at_l4_cmd_iccid_rsp_struct;
1058
1059//AT+EGREA IND
1060typedef struct {
1061 ATP_D2AT_L4_CMD_IND_LOCAL_PARA_HDR
1062 kal_char type[8];
1063} atp_d2at_l4_cmd_egrea_ind_struct;
1064//AT+EGREA RSP
1065typedef struct {
1066 ATP_D2AT_L4_RSP_IND_LOCAL_PARA_HDR
1067} atp_d2at_l4_cmd_egrea_rsp_struct;
1068
1069typedef struct {
1070 LOCAL_PARA_HDR
1071 kal_uint8 apn[APN_STRING_LEN];
1072 kal_uint32 pdp_type;
1073 kal_uint32 apn_index;
1074} atp_d2at_ap_urc_eiareg_ind_struct;
1075
1076/*******************************************************************************
1077* ATP TO DAST IND (intercpt URC to ATP) *
1078*******************************************************************************/
1079//+ESIMS
1080typedef struct {
1081 LOCAL_PARA_HDR
1082} atp_d2at_l4_urc_esims_ind_struct;
1083
1084//+EUSIM
1085typedef struct {
1086 LOCAL_PARA_HDR
1087} atp_d2at_l4_urc_eusim_ind_struct;
1088
1089//+EGREG
1090typedef struct {
1091 LOCAL_PARA_HDR
1092 kal_uint8 ps_state;
1093 kal_uint16 rat_tech;
1094} atp_d2at_l4_urc_egreg_ind_struct;
1095/*******************************************************************************
1096* D2 TO D2 retry IND
1097*******************************************************************************/
1098typedef struct {
1099 LOCAL_PARA_HDR
1100 kal_uint8 ps_id;
1101 kal_uint8 pending_action; // attach or detach
1102} atp_d2am_d2_cmd_retry_ind_struct;
1103
1104typedef struct
1105{
1106 kal_uint8 IPv6_AddressFormat_present;
1107 kal_uint8 IPv6_AddressFormat;
1108 kal_uint8 IPv6_SubnetNotation_present;
1109 kal_uint8 IPv6_SubnetNotation;
1110 kal_uint8 IPv6_LeadingZeros_present;
1111 kal_uint8 IPv6_LeadingZeros;
1112 kal_uint8 IPv6_CompressZeros_present;
1113 kal_uint8 IPv6_CompressZeros;
1114} atp_cgpiaf_config_context_struct;
1115
1116typedef struct
1117{
1118 atcmd_cgerep_mode_enum mode;
1119 atcmd_bfr_enum bfr;
1120} atp_cgerep_config_context_struct;
1121
1122typedef struct
1123{
1124 kal_uint8 eiareg;
1125 kal_uint8 edretry;
1126 atp_cgerep_config_context_struct cgerep;
1127 atp_cgpiaf_config_context_struct cgpiaf;
1128} atp_d2at_report_mode_struct;
1129
1130typedef struct
1131{
1132 atp_d2at_report_mode_struct report_mode;
1133} atp_d2at_context_struct;
1134
1135extern atp_d2at_context_struct atp_d2at_context_g[MAX_SIM_NUM];
1136
1137//AT+EIMSTESTMODE REQ
1138typedef struct {
1139 ATP_D2AT_REQ_LOCAL_PARA_HDR
1140 kal_uint8 ims_test_mode;
1141} atp_d2at_eimstestmode_req_struct;
1142
1143//AT+EIMSTESTMODE CNF
1144typedef struct {
1145 ATP_D2AT_CNF_LOCAL_PARA_HDR
1146} atp_d2at_eimstestmode_cnf_struct;
1147
1148//AT+EGDCACT REQ
1149typedef struct {
1150 ATP_D2AT_REQ_LOCAL_PARA_HDR
1151 kal_bool enable;
1152 kal_uint32 mode;
1153} atp_d2at_egdcact_req_struct;
1154
1155//AT+EGDCACT CNF
1156typedef struct {
1157 ATP_D2AT_CNF_LOCAL_PARA_HDR
1158} atp_d2at_egdcact_cnf_struct;
1159
1160typedef struct {
1161 ATP_D2AT_REQ_LOCAL_PARA_HDR
1162} atp_d2at_eiaattach_req_struct;
1163
1164typedef struct {
1165 LOCAL_PARA_HDR
1166 kal_uint8 apn[APN_STRING_LEN];
1167 kal_uint32 pdp_type;
1168 kal_bool is_success;
1169} atp_d2at_eiaattach_cnf_struct;
1170
1171
1172#endif /* _ATP_D2AT_STRUCT_H */