yu.dong | c33b307 | 2024-08-21 23:14:49 -0700 | [diff] [blame^] | 1 | /***************************************************************************** |
| 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 | #ifndef __D2CM_STRUCT_H__ |
| 37 | #define __D2CM_STRUCT_H__ |
| 38 | |
| 39 | #include "kal_general_types.h" |
| 40 | #include "kal_public_defs.h" |
| 41 | #include "ps_public_enum.h" |
| 42 | #include "pdn_public_defs.h" |
| 43 | #include "custom_d2_config.h" |
| 44 | #include "d2pm_ddm_struct.h" // NEED_TO_BE_NOTICED, to review it |
| 45 | #include "d2pm_d2rm_struct.h" // NEED_TO_BE_NOTICED, to review it |
| 46 | #include "ursp_public_defs.h" |
| 47 | #include "d2rm_public_defs.h" |
| 48 | #include "n3epc_public_defs.h" |
| 49 | #include "iwlan_public_defs.h" |
| 50 | |
| 51 | // Type definition |
| 52 | typedef struct d2cm_hdr d2cm_hdr_t; |
| 53 | typedef struct d2cm_hdr* d2cm_hdr_ptr_t; |
| 54 | typedef d2pm_ddm_ims_prv_data_t d2cm_act_data_call_ims_info_struct; |
| 55 | |
| 56 | // Macros |
| 57 | #define D2CM_REQ_LOCAL_PARA_HDR \ |
| 58 | LOCAL_PARA_HDR \ |
| 59 | kal_uint32 src_id; |
| 60 | |
| 61 | #define D2CM_CNF_LOCAL_PARA_HDR \ |
| 62 | LOCAL_PARA_HDR \ |
| 63 | kal_uint32 src_id; |
| 64 | |
| 65 | #define D2CM_IND_LOCAL_PARA_HDR \ |
| 66 | LOCAL_PARA_HDR \ |
| 67 | kal_uint32 src_id; |
| 68 | |
| 69 | #define D2CM_RSP_LOCAL_PARA_HDR \ |
| 70 | LOCAL_PARA_HDR \ |
| 71 | kal_uint32 src_id; |
| 72 | |
| 73 | // Functions |
| 74 | // N/A |
| 75 | |
| 76 | // Implementation |
| 77 | struct d2cm_hdr |
| 78 | { |
| 79 | LOCAL_PARA_HDR |
| 80 | kal_uint32 src_id; |
| 81 | }; |
| 82 | |
| 83 | /******************************************************************************* |
| 84 | * Internal * |
| 85 | *******************************************************************************/ |
| 86 | |
| 87 | typedef struct { |
| 88 | // Header path: //VMOLY/BRANCHES_NR15/NR15.R3.MP/mcu/interface/protocol/general/ps_public_enum.h |
| 89 | ps_cause_enum deact_cause, mod_cause; |
| 90 | }ddm_deact_res_info_struct; |
| 91 | |
| 92 | typedef struct { |
| 93 | iwlan_ran_e ran; |
| 94 | |
| 95 | union { |
| 96 | ddm_deact_res_info_struct ddm_res_info; |
| 97 | // n3x_deact_res_info_struct data4_res_info; |
| 98 | }res; |
| 99 | }ran_deact_res_info; |
| 100 | |
| 101 | typedef union { |
| 102 | ran_deact_res_info ran_deact_res[RPL_PRIO_CNT + 1]; |
| 103 | }deact_res_info_struct; |
| 104 | |
| 105 | |
| 106 | /******************************************************************************* |
| 107 | * User to D2CM REQ * |
| 108 | *******************************************************************************/ |
| 109 | |
| 110 | // MSG_ID_D2CM_GET_PDN_PROFILE_REQ |
| 111 | typedef struct |
| 112 | { |
| 113 | D2CM_REQ_LOCAL_PARA_HDR |
| 114 | |
| 115 | /* common part */ |
| 116 | // => unique key of APN |
| 117 | kal_bool apn_present; |
| 118 | kal_char apn[APN_STRING_LEN]; |
| 119 | kal_int32 apn_idx; |
| 120 | // => unique key of CID |
| 121 | kal_bool cid_present; |
| 122 | kal_int32 cid; |
| 123 | // => non-key values |
| 124 | kal_uint32 flag; |
| 125 | |
| 126 | /* operater part */ |
| 127 | kal_uint32 mcc_mnc; |
| 128 | union |
| 129 | { |
| 130 | struct |
| 131 | { |
| 132 | kal_uint32 apncl; |
| 133 | }vzw; |
| 134 | }op; |
| 135 | |
| 136 | /* private part */ |
| 137 | union |
| 138 | { |
| 139 | kal_uint8 unused; |
| 140 | }prv; |
| 141 | }d2cm_get_pdn_profile_req_struct; |
| 142 | |
| 143 | |
| 144 | // MSG_ID_D2CM_ACT_DATA_CALL_REQ |
| 145 | typedef struct |
| 146 | { |
| 147 | kal_bool cid_present; |
| 148 | kal_int32 cid; |
| 149 | kal_bool cgdcont_req_present; |
| 150 | at_cgdcont_req_struct cgdcont_req; |
| 151 | kal_uint32 tm_flag; |
| 152 | kal_bool if_id_present; |
| 153 | kal_int32 if_id; |
| 154 | kal_bool egpco_req_present; |
| 155 | at_egpco_req_struct egpco_req; |
| 156 | }d2at_d2cm_act_data_call_req_prv_struct; |
| 157 | |
| 158 | typedef struct |
| 159 | { |
| 160 | kal_int32 cid; |
| 161 | kal_int32 p_cid; |
| 162 | kal_int32 fb_cid; |
| 163 | }d2am_d2cm_act_data_call_req_prv_struct; |
| 164 | |
| 165 | typedef struct |
| 166 | { |
| 167 | kal_bool pcscf_restore; |
| 168 | }imsm_d2cm_act_data_call_req_prv_struct; |
| 169 | |
| 170 | typedef struct |
| 171 | { |
| 172 | kal_bool is_defined; |
| 173 | kal_char pdp_type[PDP_TYPE_STRING_LEN]; |
| 174 | kal_char roam_prot[ROAMING_IP_TYPE_STRING_LEN]; |
| 175 | kal_char username[APN_STRING_LEN]; |
| 176 | kal_char passwd[APN_STRING_LEN]; |
| 177 | kal_int8 auth_type; |
| 178 | ran_filter_struct ran_filter; // MUST give a value regardless of is_defined, by MTK14037 |
| 179 | kal_bool qos_param_present; |
| 180 | kal_int32 qos_reliability; |
| 181 | kal_int32 qos_precedence_class; |
| 182 | kal_int32 qos_delay_class; |
| 183 | kal_int32 qos_peak_throughput_class; |
| 184 | kal_int32 qos_mean_throughput_class; |
| 185 | }bip_d2cm_act_data_call_req_prv_struct; |
| 186 | |
| 187 | typedef struct |
| 188 | { |
| 189 | kal_int32 if_id; |
| 190 | kal_uint32 bearer_bitmask; |
| 191 | kal_bool egpco_req_present; |
| 192 | at_egpco_req_struct egpco_req; |
| 193 | }l5updn_d2cm_act_data_call_req_prv_struct; |
| 194 | |
| 195 | typedef struct |
| 196 | { |
| 197 | D2CM_REQ_LOCAL_PARA_HDR |
| 198 | |
| 199 | /* common part */ |
| 200 | kal_char apn[APN_STRING_LEN]; |
| 201 | kal_int32 apn_idx; |
| 202 | kal_char apn_type[APN_TYPE_STRING_LEN]; |
| 203 | kal_uint32 suff_cond; |
| 204 | kal_uint32 flag; |
| 205 | d2cm_ipv4v6_fb_pref_enum ipv4v6_fb_pref; |
| 206 | ran_filter_struct ran_filter; |
| 207 | |
| 208 | /* ursp part */ |
| 209 | struct |
| 210 | { |
| 211 | kal_bool is_match_all; |
| 212 | kal_uint8 dnn_len; |
| 213 | kal_char dnn[URSP_TDC_LEN_DNN]; // APN in TS 23.003 |
| 214 | kal_uint8 os_id[URSP_TDC_LEN_OS_ID]; // UUID in RFC 4122 |
| 215 | kal_uint8 app_id_len; |
| 216 | kal_uint8 app_id[URSP_TDC_LEN_OS_APP_ID]; |
| 217 | kal_uint8 ipv4_addr[URSP_TDC_LEN_IPV4_REMOTE_ADDR]; |
| 218 | kal_uint8 ipv4_mask[URSP_TDC_LEN_IPV4_REMOTE_MASK]; |
| 219 | kal_uint8 ipv6_addr[URSP_TDC_LEN_IPV6_REMOTE_ADDR]; |
| 220 | kal_uint8 ipv6_prefix_len; |
| 221 | kal_uint8 prot_id_next_hdr; |
| 222 | kal_uint16 single_remote_port; |
| 223 | kal_uint16 min_remote_port; |
| 224 | kal_uint16 max_remote_port; |
| 225 | kal_uint8 dst_fqdn_len; |
| 226 | kal_uint8 dst_fqdn[URSP_TDC_LEN_DST_FQDN]; |
| 227 | }traffic_desc; |
| 228 | |
| 229 | struct |
| 230 | { |
| 231 | kal_uint8 ssc_mode; |
| 232 | kal_uint8 s_nssai_len; |
| 233 | kal_uint8 s_nssai[URSP_RSDC_LEN_S_NSSAI]; |
| 234 | kal_uint8 dnn_len; |
| 235 | kal_uint8 dnn[URSP_TDC_LEN_DNN]; // APN in TS 23.003 |
| 236 | kal_uint8 pdu_session_type; |
| 237 | kal_uint8 pref_access_type; |
| 238 | }ue_local_conf; |
| 239 | kal_uint32 ursp_eval_flag; |
| 240 | |
| 241 | /* custom part */ |
| 242 | /* Since AP fully controls APN settings in Gen93, this part can create a new APN setting, but cannot overwrite an existing one. */ |
| 243 | kal_bool has_custom; |
| 244 | kal_char pdp_type[PDP_TYPE_STRING_LEN]; |
| 245 | kal_char roam_prot[ROAMING_IP_TYPE_STRING_LEN]; |
| 246 | kal_char username[APN_STRING_LEN]; |
| 247 | kal_char passwd[APN_STRING_LEN]; |
| 248 | kal_int8 auth_type; |
| 249 | |
| 250 | /* private part */ |
| 251 | union |
| 252 | { |
| 253 | d2at_d2cm_act_data_call_req_prv_struct d2at; |
| 254 | d2am_d2cm_act_data_call_req_prv_struct d2am; |
| 255 | imsm_d2cm_act_data_call_req_prv_struct imsm; |
| 256 | bip_d2cm_act_data_call_req_prv_struct bip; |
| 257 | l5updn_d2cm_act_data_call_req_prv_struct l5updn; |
| 258 | }prv; |
| 259 | }d2cm_act_data_call_req_struct; |
| 260 | |
| 261 | // MSG_ID_D2CM_DEACT_DATA_CALL_REQ |
| 262 | typedef struct |
| 263 | { |
| 264 | kal_uint32 tm_flag; |
| 265 | }d2at_d2cm_deact_data_call_req_prv_struct; |
| 266 | |
| 267 | typedef d2am_ddm_deact_data_call_req_prv_struct d2am_d2cm_deact_data_call_req_prv_struct; |
| 268 | |
| 269 | typedef struct |
| 270 | { |
| 271 | D2CM_REQ_LOCAL_PARA_HDR |
| 272 | |
| 273 | /* common part */ |
| 274 | kal_int32 cid; |
| 275 | atcmd_deact_cause_enum reason; |
| 276 | |
| 277 | /* private part */ |
| 278 | union |
| 279 | { |
| 280 | d2at_d2cm_deact_data_call_req_prv_struct d2at; |
| 281 | d2am_d2cm_deact_data_call_req_prv_struct d2am; |
| 282 | }prv; |
| 283 | }d2cm_deact_data_call_req_struct; |
| 284 | |
| 285 | |
| 286 | // MSG_ID_D2CM_ABORT_DATA_CALL_REQ |
| 287 | typedef struct |
| 288 | { |
| 289 | kal_uint8 unused; |
| 290 | }imsm_d2cm_abort_data_call_req_prv_struct; |
| 291 | |
| 292 | typedef struct |
| 293 | { |
| 294 | D2CM_REQ_LOCAL_PARA_HDR |
| 295 | |
| 296 | /* common part */ |
| 297 | kal_char apn[APN_STRING_LEN]; |
| 298 | kal_int32 apn_idx; |
| 299 | kal_bool cid_present; |
| 300 | kal_int32 cid; |
| 301 | atcmd_deact_cause_enum reason; |
| 302 | |
| 303 | /* private part */ |
| 304 | union |
| 305 | { |
| 306 | imsm_d2cm_abort_data_call_req_prv_struct imsm; |
| 307 | }prv; |
| 308 | }d2cm_abort_data_call_req_struct; |
| 309 | |
| 310 | |
| 311 | #if 0 |
| 312 | /* under construction !*/ |
| 313 | /* under construction !*/ |
| 314 | /* under construction !*/ |
| 315 | /* under construction !*/ |
| 316 | /* under construction !*/ |
| 317 | /* under construction !*/ |
| 318 | /* under construction !*/ |
| 319 | /* under construction !*/ |
| 320 | /* under construction !*/ |
| 321 | /* under construction !*/ |
| 322 | /* under construction !*/ |
| 323 | /* under construction !*/ |
| 324 | /* under construction !*/ |
| 325 | /* under construction !*/ |
| 326 | /* under construction !*/ |
| 327 | /* under construction !*/ |
| 328 | /* under construction !*/ |
| 329 | /* under construction !*/ |
| 330 | /* under construction !*/ |
| 331 | /* under construction !*/ |
| 332 | /* under construction !*/ |
| 333 | /* under construction !*/ |
| 334 | /* under construction !*/ |
| 335 | /* under construction !*/ |
| 336 | /* under construction !*/ |
| 337 | /* under construction !*/ |
| 338 | /* under construction !*/ |
| 339 | /* under construction !*/ |
| 340 | /* under construction !*/ |
| 341 | /* under construction !*/ |
| 342 | /* under construction !*/ |
| 343 | /* under construction !*/ |
| 344 | /* under construction !*/ |
| 345 | /* under construction !*/ |
| 346 | /* under construction !*/ |
| 347 | /* under construction !*/ |
| 348 | /* under construction !*/ |
| 349 | #endif |
| 350 | |
| 351 | |
| 352 | // MSG_ID_D2CM_RESET_RETRY_TMR_REQ |
| 353 | typedef struct |
| 354 | { |
| 355 | D2CM_REQ_LOCAL_PARA_HDR |
| 356 | |
| 357 | /* common part */ |
| 358 | kal_char apn[APN_STRING_LEN]; |
| 359 | kal_int32 apn_idx; |
| 360 | kal_uint32 reason; |
| 361 | |
| 362 | /* private part */ |
| 363 | union |
| 364 | { |
| 365 | kal_uint8 unused; |
| 366 | }prv; |
| 367 | }d2cm_reset_retry_tmr_req_struct; |
| 368 | |
| 369 | |
| 370 | /******************************************************************************* |
| 371 | * D2CM to User CNF * |
| 372 | *******************************************************************************/ |
| 373 | |
| 374 | // MSG_ID_D2CM_GET_PDN_PROFILE_CNF |
| 375 | typedef struct |
| 376 | { |
| 377 | D2CM_REQ_LOCAL_PARA_HDR |
| 378 | |
| 379 | /* common part */ |
| 380 | kal_int32 res; |
| 381 | |
| 382 | /* private part */ |
| 383 | union |
| 384 | { |
| 385 | kal_uint8 unused; |
| 386 | }prv; |
| 387 | }d2cm_get_pdn_profile_cnf_struct; |
| 388 | |
| 389 | |
| 390 | // MSG_ID_D2CM_ACT_DATA_CALL_CNF |
| 391 | typedef struct |
| 392 | { |
| 393 | d2cm_act_data_call_ims_info_struct ims_info; // IMS information for p_cid |
| 394 | d2cm_act_data_call_ims_info_struct fb_ims_info; // IMS information for fb_cid |
| 395 | }imsm_d2cm_act_data_call_cnf_prv_struct; |
| 396 | |
| 397 | typedef struct |
| 398 | { |
| 399 | D2CM_CNF_LOCAL_PARA_HDR |
| 400 | |
| 401 | /* common part */ |
| 402 | kal_int32 cid, p_cid, fb_cid; // cid == fb_cid for fallback default bearer; cid == p_cid for default bearer; cid != p_cid for dedicated bearer |
| 403 | kal_uint8 p_ded_cid[D2CM_CID_BITMAP_SIZE], fb_ded_cid[D2CM_CID_BITMAP_SIZE]; // a bitmap |
| 404 | d2cm_act_data_call_ip_info_struct ip_info; // IP address for p_cid |
| 405 | d2cm_act_data_call_net_info_struct net_info; // Internet information for p_cid |
| 406 | d2cm_act_data_call_if_info_struct if_info; // interface information for p_cid |
| 407 | d2cm_act_data_call_ran_info_struct ran_info; // RAN info of non-3GPP for p_cid |
| 408 | d2cm_act_data_call_ip_info_struct fb_ip_info; // IP address for fb_cid |
| 409 | d2cm_act_data_call_net_info_struct fb_net_info; // Internet information for fb_cid |
| 410 | d2cm_act_data_call_if_info_struct fb_if_info; // interface information for fb_cid |
| 411 | d2cm_act_data_call_ran_info_struct fb_ran_info; // RAN info of non-3GPP for fb_cid |
| 412 | d2cm_act_data_call_retry_info_struct retry_info; // retry timer for APN |
| 413 | kal_int32 res; |
| 414 | |
| 415 | /* private part */ |
| 416 | union |
| 417 | { |
| 418 | imsm_d2cm_act_data_call_cnf_prv_struct imsm; |
| 419 | }prv; |
| 420 | }d2cm_act_data_call_cnf_struct; |
| 421 | /* IMSM_INTERMEDIATE_CNF share the same structure*/ |
| 422 | typedef d2cm_act_data_call_cnf_struct d2cm_netif_send_imsm_intermediate_cnf_struct; |
| 423 | |
| 424 | // MSG_ID_D2CM_DEACT_DATA_CALL_CNF |
| 425 | typedef struct |
| 426 | { |
| 427 | D2CM_CNF_LOCAL_PARA_HDR |
| 428 | |
| 429 | /* common part */ |
| 430 | kal_int32 cid; |
| 431 | kal_int32 res; |
| 432 | |
| 433 | /* private part */ |
| 434 | union |
| 435 | { |
| 436 | kal_uint8 unused; |
| 437 | }prv; |
| 438 | }d2cm_deact_data_call_cnf_struct; |
| 439 | |
| 440 | |
| 441 | // MSG_ID_D2CM_ABORT_DATA_CALL_CNF |
| 442 | typedef struct |
| 443 | { |
| 444 | D2CM_CNF_LOCAL_PARA_HDR |
| 445 | |
| 446 | /* common part */ |
| 447 | kal_char apn[APN_STRING_LEN]; |
| 448 | kal_int32 apn_idx; |
| 449 | kal_bool cid_present; |
| 450 | kal_int32 cid; |
| 451 | kal_int32 res; |
| 452 | |
| 453 | /* private part */ |
| 454 | union |
| 455 | { |
| 456 | kal_uint8 unused; |
| 457 | }prv; |
| 458 | }d2cm_abort_data_call_cnf_struct; |
| 459 | |
| 460 | |
| 461 | #if 0 |
| 462 | /* under construction !*/ |
| 463 | /* under construction !*/ |
| 464 | /* under construction !*/ |
| 465 | /* under construction !*/ |
| 466 | /* under construction !*/ |
| 467 | /* under construction !*/ |
| 468 | /* under construction !*/ |
| 469 | /* under construction !*/ |
| 470 | /* under construction !*/ |
| 471 | /* under construction !*/ |
| 472 | /* under construction !*/ |
| 473 | /* under construction !*/ |
| 474 | /* under construction !*/ |
| 475 | /* under construction !*/ |
| 476 | /* under construction !*/ |
| 477 | /* under construction !*/ |
| 478 | /* under construction !*/ |
| 479 | /* under construction !*/ |
| 480 | /* under construction !*/ |
| 481 | /* under construction !*/ |
| 482 | /* under construction !*/ |
| 483 | /* under construction !*/ |
| 484 | /* under construction !*/ |
| 485 | /* under construction !*/ |
| 486 | /* under construction !*/ |
| 487 | /* under construction !*/ |
| 488 | /* under construction !*/ |
| 489 | /* under construction !*/ |
| 490 | /* under construction !*/ |
| 491 | /* under construction !*/ |
| 492 | /* under construction !*/ |
| 493 | /* under construction !*/ |
| 494 | /* under construction !*/ |
| 495 | /* under construction !*/ |
| 496 | /* under construction !*/ |
| 497 | /* under construction !*/ |
| 498 | /* under construction !*/ |
| 499 | /* under construction !*/ |
| 500 | /* under construction !*/ |
| 501 | #endif |
| 502 | |
| 503 | |
| 504 | // MSG_ID_D2CM_RESET_RETRY_TMR_CNF |
| 505 | typedef struct |
| 506 | { |
| 507 | D2CM_CNF_LOCAL_PARA_HDR |
| 508 | |
| 509 | /* common part */ |
| 510 | kal_char apn[APN_STRING_LEN]; |
| 511 | kal_int32 apn_idx; |
| 512 | kal_int32 res; |
| 513 | |
| 514 | /* private part */ |
| 515 | union |
| 516 | { |
| 517 | kal_uint8 unused; |
| 518 | }prv; |
| 519 | }d2cm_reset_retry_tmr_cnf_struct; |
| 520 | |
| 521 | |
| 522 | /******************************************************************************* |
| 523 | * D2CM to User IND * |
| 524 | *******************************************************************************/ |
| 525 | |
| 526 | // MSG_ID_D2CM_GET_PDN_PROFILE_IND |
| 527 | // ---- TO_BE_REMOVED ---- |
| 528 | typedef struct |
| 529 | { |
| 530 | ran_info_struct ran_info; |
| 531 | }bip_d2cm_get_pdn_profile_ind_prv_struct; |
| 532 | // ++++ TO_BE_REMOVED ++++ |
| 533 | |
| 534 | typedef struct |
| 535 | { |
| 536 | D2CM_IND_LOCAL_PARA_HDR |
| 537 | |
| 538 | /* static part */ |
| 539 | kal_char apn[APN_STRING_LEN]; |
| 540 | kal_int32 apn_idx; |
| 541 | kal_char apn_type[APN_TYPE_LIST_STRING_LEN]; |
| 542 | kal_char pdp_type[PDP_TYPE_STRING_LEN]; |
| 543 | kal_char roam_prot[ROAMING_IP_TYPE_STRING_LEN]; |
| 544 | kal_char username[APN_STRING_LEN]; |
| 545 | kal_char passwd[APN_STRING_LEN]; |
| 546 | kal_int8 auth_type; |
| 547 | kal_uint32 bearer_bitmask; |
| 548 | |
| 549 | /* dynamic part */ |
| 550 | d2cm_pdn_state_enum state; |
| 551 | kal_uint32 flag; |
| 552 | kal_int32 p_cid, fb_cid; |
| 553 | kal_uint8 p_ded_cid[D2CM_CID_BITMAP_SIZE], fb_ded_cid[D2CM_CID_BITMAP_SIZE]; // a bitmap |
| 554 | kal_char real_apn[APN_STRING_LEN]; |
| 555 | kal_int32 engaged_apn_idx; |
| 556 | kal_char engaged_apn_type[APN_TYPE_STRING_LEN]; |
| 557 | kal_char engaged_pdp_type[PDP_TYPE_STRING_LEN]; |
| 558 | kal_uint32 num_of_p_cid_usr; |
| 559 | module_type p_cid_usr_list[D2CM_MAX_NUM_OF_USR]; |
| 560 | kal_uint32 num_of_fb_cid_usr; |
| 561 | module_type fb_cid_usr_list[D2CM_MAX_NUM_OF_USR]; |
| 562 | |
| 563 | /* operater part */ |
| 564 | struct |
| 565 | { |
| 566 | struct |
| 567 | { |
| 568 | kal_uint32 wapn; |
| 569 | kal_uint32 apncl; |
| 570 | kal_uint32 apned; |
| 571 | kal_uint32 max_conn; |
| 572 | kal_uint32 max_conn_t; |
| 573 | kal_uint32 wait_time; |
| 574 | }vzw; |
| 575 | |
| 576 | struct |
| 577 | { |
| 578 | kal_uint32 inact_time; |
| 579 | }sprint; |
| 580 | }op; |
| 581 | |
| 582 | /* private part */ |
| 583 | struct |
| 584 | { |
| 585 | bip_d2cm_get_pdn_profile_ind_prv_struct bip; // ==== TO_BE_REMOVED ==== |
| 586 | }prv; |
| 587 | }d2cm_get_pdn_profile_ind_struct; |
| 588 | |
| 589 | |
| 590 | // MSG_ID_D2CM_PDN_PROFILE_CHG_IND |
| 591 | typedef d2cm_get_pdn_profile_ind_struct d2cm_pdn_profile_chg_ind_struct; |
| 592 | |
| 593 | |
| 594 | // MSG_ID_D2CM_ACT_DATA_CALL_IND |
| 595 | typedef struct |
| 596 | { |
| 597 | cgev_event_enum cgev_event; |
| 598 | union |
| 599 | { |
| 600 | struct |
| 601 | { |
| 602 | kal_bool WLAN_Offload_present; |
| 603 | atcmd_WLAN_Offload_enum WLAN_Offload; |
| 604 | }nw_pdn_act; |
| 605 | |
| 606 | struct |
| 607 | { |
| 608 | kal_bool reason_present; |
| 609 | atcmd_reason_enum reason; |
| 610 | kal_bool WLAN_Offload_present; |
| 611 | atcmd_WLAN_Offload_enum WLAN_Offload; |
| 612 | }me_pdn_act; |
| 613 | |
| 614 | struct |
| 615 | { |
| 616 | kal_bool event_type_present; |
| 617 | atcmd_event_type_enum event_type; |
| 618 | kal_bool WLAN_Offload_present; |
| 619 | atcmd_WLAN_Offload_enum WLAN_Offload; |
| 620 | }nw_act; |
| 621 | |
| 622 | struct |
| 623 | { |
| 624 | kal_bool event_type_present; |
| 625 | atcmd_event_type_enum event_type; |
| 626 | kal_bool WLAN_Offload_present; |
| 627 | atcmd_WLAN_Offload_enum WLAN_Offload; |
| 628 | }me_act; |
| 629 | }cgev_info; |
| 630 | }d2at_d2cm_act_data_call_ind_prv_struct; |
| 631 | |
| 632 | typedef struct |
| 633 | { |
| 634 | d2cm_act_data_call_ims_info_struct ims_info; // IMS information for p_cid |
| 635 | }imsm_d2cm_act_data_call_ind_prv_struct; |
| 636 | |
| 637 | typedef struct |
| 638 | { |
| 639 | D2CM_IND_LOCAL_PARA_HDR |
| 640 | |
| 641 | /* common part */ |
| 642 | kal_int32 cid, p_cid, fb_cid; // cid == fb_cid for fallback default bearer; cid == p_cid for default bearer; cid != p_cid for dedicated bearer |
| 643 | kal_uint8 p_ded_cid[D2CM_CID_BITMAP_SIZE], fb_ded_cid[D2CM_CID_BITMAP_SIZE]; // a bitmap |
| 644 | d2cm_act_data_call_ip_info_struct ip_info; // for IP address |
| 645 | d2cm_act_data_call_net_info_struct net_info; // for Internet information |
| 646 | d2cm_act_data_call_if_info_struct if_info; // for interface information |
| 647 | d2cm_act_data_call_ran_info_struct ran_info; // RAN info of non-3GPP |
| 648 | kal_int32 res; |
| 649 | |
| 650 | /* private part */ |
| 651 | union |
| 652 | { |
| 653 | d2at_d2cm_act_data_call_ind_prv_struct d2at; |
| 654 | imsm_d2cm_act_data_call_ind_prv_struct imsm; |
| 655 | }prv; |
| 656 | }d2cm_act_data_call_ind_struct; |
| 657 | |
| 658 | |
| 659 | // MSG_ID_D2CM_DEACT_DATA_CALL_IND |
| 660 | typedef struct |
| 661 | { |
| 662 | cgev_event_enum cgev_event; |
| 663 | union |
| 664 | { |
| 665 | struct |
| 666 | { |
| 667 | kal_bool WLAN_Offload_present; |
| 668 | atcmd_WLAN_Offload_enum WLAN_Offload; |
| 669 | }nw_pdn_deact; |
| 670 | |
| 671 | struct |
| 672 | { |
| 673 | int unused; |
| 674 | }me_pdn_deact; |
| 675 | |
| 676 | struct |
| 677 | { |
| 678 | kal_bool event_type_present; |
| 679 | atcmd_event_type_enum event_type; |
| 680 | kal_bool WLAN_Offload_present; |
| 681 | atcmd_WLAN_Offload_enum WLAN_Offload; |
| 682 | }nw_deact; |
| 683 | |
| 684 | struct |
| 685 | { |
| 686 | kal_bool event_type_present; |
| 687 | atcmd_event_type_enum event_type; |
| 688 | }me_deact; |
| 689 | |
| 690 | struct |
| 691 | { |
| 692 | kal_bool PDP_type_present; |
| 693 | kal_uint8 PDP_type[PDP_TYPE_STRING_LEN]; |
| 694 | kal_bool PDP_addr_present; |
| 695 | at_addr_struct PDP_addr; |
| 696 | }nw_react; |
| 697 | }cgev_info; |
| 698 | }d2at_d2cm_deact_data_call_ind_prv_struct; |
| 699 | |
| 700 | typedef struct |
| 701 | { |
| 702 | D2CM_IND_LOCAL_PARA_HDR |
| 703 | |
| 704 | /* common part */ |
| 705 | kal_int32 cid; |
| 706 | kal_int32 res; |
| 707 | |
| 708 | deact_res_info_struct res_info; |
| 709 | |
| 710 | /* private part */ |
| 711 | union |
| 712 | { |
| 713 | d2at_d2cm_deact_data_call_ind_prv_struct d2at; |
| 714 | }prv; |
| 715 | }d2cm_deact_data_call_ind_struct; |
| 716 | |
| 717 | |
| 718 | // MSG_ID_D2CM_ABORT_DATA_CALL_IND |
| 719 | typedef d2at_d2cm_deact_data_call_ind_prv_struct d2at_d2cm_abort_data_call_ind_prv_struct; |
| 720 | |
| 721 | typedef struct |
| 722 | { |
| 723 | D2CM_IND_LOCAL_PARA_HDR |
| 724 | |
| 725 | /* common part */ |
| 726 | kal_char apn[APN_STRING_LEN]; |
| 727 | kal_int32 apn_idx; |
| 728 | kal_bool cid_present; |
| 729 | kal_int32 cid; |
| 730 | kal_int32 res; |
| 731 | |
| 732 | /* private part */ |
| 733 | union |
| 734 | { |
| 735 | d2at_d2cm_abort_data_call_ind_prv_struct d2at; |
| 736 | }prv; |
| 737 | }d2cm_abort_data_call_ind_struct; |
| 738 | |
| 739 | |
| 740 | // MSG_ID_D2CM_MOD_DATA_CALL_IND |
| 741 | typedef struct |
| 742 | { |
| 743 | cgev_event_enum cgev_event; |
| 744 | union |
| 745 | { |
| 746 | struct |
| 747 | { |
| 748 | kal_bool change_reason_present; |
| 749 | kal_uint32 change_reason; |
| 750 | kal_bool event_type_present; |
| 751 | atcmd_event_type_enum event_type; |
| 752 | kal_bool WLAN_Offload_present; |
| 753 | atcmd_WLAN_Offload_enum WLAN_Offload; |
| 754 | }nw_mod; |
| 755 | |
| 756 | struct |
| 757 | { |
| 758 | kal_bool change_reason_present; |
| 759 | kal_uint32 change_reason; |
| 760 | kal_bool event_type_present; |
| 761 | atcmd_event_type_enum event_type; |
| 762 | kal_bool WLAN_Offload_present; |
| 763 | atcmd_WLAN_Offload_enum WLAN_Offload; |
| 764 | }me_mod; |
| 765 | }cgev_info; |
| 766 | }d2at_d2cm_mod_data_call_ind_prv_struct; |
| 767 | |
| 768 | typedef struct |
| 769 | { |
| 770 | d2cm_act_data_call_ims_info_struct ims_info; // IMS information for cid |
| 771 | }imsm_d2cm_mod_data_call_ind_prv_struct; |
| 772 | |
| 773 | typedef struct |
| 774 | { |
| 775 | D2CM_IND_LOCAL_PARA_HDR |
| 776 | |
| 777 | /* common part */ |
| 778 | kal_int32 cid, p_cid; |
| 779 | d2cm_act_data_call_ip_info_struct ip_info; // for IP address |
| 780 | d2cm_act_data_call_net_info_struct net_info; // for Internet information |
| 781 | d2cm_act_data_call_if_info_struct if_info; // for interface information |
| 782 | d2cm_act_data_call_ran_info_struct ran_info; // RAN info of non-3GPP |
| 783 | kal_int32 res; |
| 784 | |
| 785 | /* private part */ |
| 786 | union |
| 787 | { |
| 788 | d2at_d2cm_mod_data_call_ind_prv_struct d2at; |
| 789 | imsm_d2cm_mod_data_call_ind_prv_struct imsm; |
| 790 | }prv; |
| 791 | }d2cm_mod_data_call_ind_struct; |
| 792 | |
| 793 | |
| 794 | // MSG_ID_D2CM_BYPASS_IND |
| 795 | typedef struct |
| 796 | { |
| 797 | D2CM_IND_LOCAL_PARA_HDR |
| 798 | |
| 799 | /* common part */ |
| 800 | // => unique key of APN |
| 801 | kal_bool apn_present; |
| 802 | kal_char apn[APN_STRING_LEN]; |
| 803 | kal_int32 apn_idx; |
| 804 | // => unique key of CID |
| 805 | kal_bool cid_present; |
| 806 | kal_int32 cid; |
| 807 | d2cm_bypass_event_enum event; |
| 808 | local_para_struct *local_para_ptr; /* local_para pointer */ |
| 809 | peer_buff_struct *peer_buff_ptr; /* peer_buff pointer */ |
| 810 | |
| 811 | /* private part */ |
| 812 | // N/A |
| 813 | }d2cm_bypass_ind_struct; |
| 814 | |
| 815 | |
| 816 | // MSG_ID_D2CM_HO_IND |
| 817 | typedef d2pm_d2rm_pdn_ho_notify_ind_struct d2cm_ho_ind_struct; |
| 818 | typedef d2pm_d2rm_pdn_ho_notify_ind_struct d2cm_ho_data_call_ind_struct; |
| 819 | |
| 820 | // MSG_ID_D2CM_DATA_CALL_INFO_IND |
| 821 | typedef struct |
| 822 | { |
| 823 | D2CM_IND_LOCAL_PARA_HDR |
| 824 | |
| 825 | /* common part */ |
| 826 | kal_int32 ps_id; |
| 827 | kal_char prefix[APN_STRING_LEN]; |
| 828 | kal_char info[APN_STRING_LEN >> 1]; |
| 829 | |
| 830 | /* private part */ |
| 831 | union |
| 832 | { |
| 833 | kal_uint8 unused; |
| 834 | }prv; |
| 835 | }d2cm_data_call_info_ind_struct; |
| 836 | |
| 837 | // MSG_ID_D2CM_RESET_RETRY_TMR_IND |
| 838 | typedef struct |
| 839 | { |
| 840 | D2CM_IND_LOCAL_PARA_HDR |
| 841 | |
| 842 | /* common part */ |
| 843 | kal_bool apn_present; |
| 844 | kal_char apn[APN_STRING_LEN]; |
| 845 | kal_int32 apn_idx; |
| 846 | d2cm_reset_retry_tmr_retry_info_struct retry_info; |
| 847 | |
| 848 | /* private part */ |
| 849 | union |
| 850 | { |
| 851 | kal_uint8 unused; |
| 852 | }prv; |
| 853 | }d2cm_reset_retry_tmr_ind_struct; |
| 854 | |
| 855 | // MSG_ID_D2CM_VOLTE_CFG_CHANGE_IND |
| 856 | typedef struct |
| 857 | { |
| 858 | D2CM_IND_LOCAL_PARA_HDR |
| 859 | |
| 860 | /* common part */ |
| 861 | kal_bool apn_present; |
| 862 | kal_char apn[APN_STRING_LEN]; |
| 863 | kal_int32 apn_idx; |
| 864 | d2cm_reset_retry_tmr_retry_info_struct retry_info; |
| 865 | |
| 866 | }d2cm_volte_cfg_change_ind_struct; |
| 867 | |
| 868 | // MSG_ID_D2CM_EVENT_IND |
| 869 | typedef struct |
| 870 | { |
| 871 | D2CM_IND_LOCAL_PARA_HDR |
| 872 | |
| 873 | /* common part */ |
| 874 | d2cm_event_enum event; |
| 875 | struct |
| 876 | { |
| 877 | // unique key of APN |
| 878 | kal_bool apn_present; |
| 879 | kal_char apn[APN_STRING_LEN]; |
| 880 | kal_int32 apn_idx; |
| 881 | // unique key of CID |
| 882 | kal_bool cid_present; |
| 883 | kal_int32 cid; |
| 884 | }info; |
| 885 | }d2cm_event_ind_struct; |
| 886 | |
| 887 | |
| 888 | /******************************************************************************* |
| 889 | * User to D2CM RSP * |
| 890 | *******************************************************************************/ |
| 891 | |
| 892 | // MSG_ID_D2CM_ACT_DATA_CALL_RSP |
| 893 | typedef struct |
| 894 | { |
| 895 | D2CM_RSP_LOCAL_PARA_HDR |
| 896 | |
| 897 | /* common part */ |
| 898 | kal_int32 cid; |
| 899 | kal_int32 res; |
| 900 | |
| 901 | /* private part */ |
| 902 | union |
| 903 | { |
| 904 | kal_uint8 unused; |
| 905 | }prv; |
| 906 | }d2cm_act_data_call_rsp_struct; |
| 907 | |
| 908 | |
| 909 | // MSG_ID_D2CM_DEACT_DATA_CALL_RSP |
| 910 | typedef struct |
| 911 | { |
| 912 | D2CM_RSP_LOCAL_PARA_HDR |
| 913 | |
| 914 | /* common part */ |
| 915 | kal_int32 cid; |
| 916 | kal_int32 res; |
| 917 | |
| 918 | /* private part */ |
| 919 | union |
| 920 | { |
| 921 | kal_uint8 unused; |
| 922 | }prv; |
| 923 | }d2cm_deact_data_call_rsp_struct; |
| 924 | |
| 925 | |
| 926 | // MSG_ID_D2CM_BYPASS_RSP |
| 927 | typedef struct |
| 928 | { |
| 929 | D2CM_RSP_LOCAL_PARA_HDR |
| 930 | |
| 931 | /* common part */ |
| 932 | // => unique key of APN |
| 933 | kal_bool apn_present; |
| 934 | kal_char apn[APN_STRING_LEN]; |
| 935 | kal_int32 apn_idx; |
| 936 | // => unique key of CID |
| 937 | kal_bool cid_present; |
| 938 | kal_int32 cid; |
| 939 | d2cm_bypass_event_enum event; |
| 940 | local_para_struct *local_para_ptr; /* local_para pointer */ |
| 941 | peer_buff_struct *peer_buff_ptr; /* peer_buff pointer */ |
| 942 | |
| 943 | /* private part */ |
| 944 | // N/A |
| 945 | }d2cm_bypass_rsp_struct; |
| 946 | |
| 947 | |
| 948 | /******************************************************************************* |
| 949 | * D2CM NetIF by Verit Chen: Debug Dump * |
| 950 | *******************************************************************************/ |
| 951 | |
| 952 | typedef enum { |
| 953 | D2CM_NETIF_RA_ERROR = -1, |
| 954 | D2CM_NETIF_RA_DEFAULT = 0, |
| 955 | D2CM_NETIF_RA_SUCCESS = 1, |
| 956 | D2CM_NETIF_RA_INITIAL_FAIL = 2, |
| 957 | D2CM_NETIF_RA_REFRESH_FAIL = 3, |
| 958 | D2CM_NETIF_RA_OOXX = 0x7FFFFFFF |
| 959 | } d2cm_netif_ra_state_enum; |
| 960 | |
| 961 | typedef enum { |
| 962 | D2CM_NETIF_IF_STATE_DOWN = 0, |
| 963 | D2CM_NETIF_IF_STATE_UP = 1, |
| 964 | |
| 965 | D2CM_NETIF_IF_STATE_DOWNING = 10, |
| 966 | D2CM_NETIF_IF_STATE_UPING = 11, |
| 967 | D2CM_NETIF_IF_STATE_OOXX = 0x7FFFFFFF |
| 968 | } d2cm_netif_interface_state_enum; |
| 969 | |
| 970 | typedef struct { |
| 971 | kal_uint32 is_set; |
| 972 | kal_uint8 addr[4]; |
| 973 | } d2cm_netif_interface_ipv4_info_t; |
| 974 | |
| 975 | typedef struct { |
| 976 | kal_uint32 is_set; |
| 977 | kal_uint8 addr[16]; |
| 978 | kal_int32 prefix; |
| 979 | } d2cm_netif_interface_ipv6_info_t; |
| 980 | |
| 981 | typedef struct { |
| 982 | d2cm_netif_interface_state_enum state; |
| 983 | kal_uint16 is_use; |
| 984 | kal_uint8 is_set_v4_addr; |
| 985 | kal_uint8 is_set_v6_addr; |
| 986 | } d2cm_netif_interface_status; |
| 987 | |
| 988 | typedef struct { |
| 989 | d2cm_netif_interface_status md_if_status; |
| 990 | d2cm_netif_interface_status ap_if_status; |
| 991 | |
| 992 | kal_int32 ap_addr_type; |
| 993 | d2cm_netif_ra_state_enum ra_state; |
| 994 | |
| 995 | kal_bool mtu_present; |
| 996 | kal_uint32 mtu; |
| 997 | |
| 998 | d2cm_netif_interface_ipv4_info_t md_pco_v4; |
| 999 | d2cm_netif_interface_ipv6_info_t md_pco_v6; |
| 1000 | d2cm_netif_interface_ipv6_info_t global_v6; |
| 1001 | } d2cm_netif_interface_info_t; |
| 1002 | |
| 1003 | typedef struct { |
| 1004 | kal_uint8 is_used; |
| 1005 | kal_uint8 ps_id; |
| 1006 | kal_uint16 transaction_id; |
| 1007 | kal_uint32 interface_id; |
| 1008 | d2cm_netif_interface_info_t info; |
| 1009 | } d2cm_netif_interface_dump_item_t; |
| 1010 | |
| 1011 | #define D2CM_NETIF_MAX_INTERFACE_ID (20) |
| 1012 | #define D2CM_NETIF_MAX_DUMP_INTERFACE_ID (D2CM_NETIF_MAX_INTERFACE_ID) //(8) |
| 1013 | |
| 1014 | // MSG_ID_D2CM_NETIF_CONTEXT_DUMP_IND |
| 1015 | typedef struct |
| 1016 | { |
| 1017 | LOCAL_PARA_HDR |
| 1018 | |
| 1019 | kal_int32 interface_id; |
| 1020 | kal_int32 num; |
| 1021 | kal_char str[32]; |
| 1022 | d2cm_netif_interface_dump_item_t item[D2CM_NETIF_MAX_DUMP_INTERFACE_ID]; |
| 1023 | }d2cm_netif_context_dump_ind_struct; |
| 1024 | |
| 1025 | typedef struct { |
| 1026 | D2CM_IND_LOCAL_PARA_HDR |
| 1027 | |
| 1028 | module_type mod_id; //send to which mod |
| 1029 | |
| 1030 | kal_int32 cid; |
| 1031 | kal_char apn[APN_STRING_LEN]; |
| 1032 | kal_int32 apn_idx; |
| 1033 | ddm_apn_type_enum apn_type; |
| 1034 | |
| 1035 | ip_info_struct ip_info; |
| 1036 | net_info_struct net_info; |
| 1037 | if_info_struct if_info; |
| 1038 | kal_int32 res; |
| 1039 | } l5updn_dup_act_data_call_ind_struct; |
| 1040 | |
| 1041 | typedef struct { |
| 1042 | D2CM_IND_LOCAL_PARA_HDR |
| 1043 | |
| 1044 | module_type mod_id; //send to which mod |
| 1045 | |
| 1046 | kal_int32 cid; |
| 1047 | kal_int32 res; |
| 1048 | } l5updn_dup_deact_data_call_ind_struct; |
| 1049 | #endif |