yu.dong | c592bc7 | 2024-04-24 22:45:13 -0700 | [diff] [blame] | 1 | /***************************************************************************** |
| 2 | * |
| 3 | * Copyright (c) 2019, MediaTek Inc. All rights reserved. |
| 4 | * This software/firmware and related documentation ("MediaTek Software") are |
| 5 | * protected under relevant copyright laws. The information contained herein is |
| 6 | * confidential and proprietary to MediaTek Inc. and/or its licensors. Except as |
| 7 | * otherwise provided in the applicable licensing terms with MediaTek Inc. |
| 8 | * and/or its licensors, any reproduction, modification, use or disclosure of |
| 9 | * MediaTek Software, and information contained herein, in whole or in part, |
| 10 | * shall be strictly prohibited. |
| 11 | * |
| 12 | *****************************************************************************/ |
| 13 | |
rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 14 | #ifndef __D2APN_STRUCT_H__ |
| 15 | #define __D2APN_STRUCT_H__ |
| 16 | |
| 17 | #include "kal_general_types.h" |
| 18 | #include "kal_public_defs.h" |
| 19 | #include "atcmd_enum.h" |
| 20 | #include "atcmd_struct.h" |
yu.dong | c592bc7 | 2024-04-24 22:45:13 -0700 | [diff] [blame] | 21 | #include "d2_public_defs.h" |
rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 22 | #include "ddm_enum.h" |
| 23 | #include "d2apn_public_defs.h" |
| 24 | |
| 25 | // Type definition |
| 26 | typedef struct d2apn_hdr d2apn_hdr_t; |
| 27 | typedef struct d2apn_hdr* d2apn_hdr_ptr_t; |
| 28 | |
| 29 | // Macros |
| 30 | #define D2APN_REQ_LOCAL_PARA_HDR \ |
| 31 | LOCAL_PARA_HDR \ |
| 32 | kal_uint16 seq_num; |
| 33 | |
| 34 | #define D2APN_CNF_LOCAL_PARA_HDR \ |
| 35 | LOCAL_PARA_HDR \ |
| 36 | kal_uint16 seq_num; |
| 37 | |
| 38 | #define D2APN_IND_LOCAL_PARA_HDR \ |
| 39 | LOCAL_PARA_HDR \ |
| 40 | kal_uint16 seq_num; |
| 41 | |
| 42 | #define D2APN_RSP_LOCAL_PARA_HDR \ |
| 43 | LOCAL_PARA_HDR \ |
| 44 | kal_uint16 seq_num; |
| 45 | |
| 46 | // Interface |
| 47 | // N/A |
| 48 | |
| 49 | // Implementation |
| 50 | struct d2apn_hdr |
| 51 | { |
| 52 | LOCAL_PARA_HDR |
| 53 | kal_uint16 seq_num; |
| 54 | }; |
| 55 | |
| 56 | /******************************************************************************* |
| 57 | * User to D2APN REQ * |
| 58 | *******************************************************************************/ |
| 59 | |
| 60 | // MSG_ID_D2APN_SET_APNS_INFO_REQ |
| 61 | typedef struct |
| 62 | { |
| 63 | D2APN_REQ_LOCAL_PARA_HDR |
| 64 | |
| 65 | /* common part */ |
| 66 | d2apn_set_apns_info_req_type_enum type; |
| 67 | plmn_id_struct plmn_id; |
| 68 | kal_uint8 imsi[D2_IMSI_STR_LEN]; |
| 69 | kal_bool mia; // KAL_TRUE indicates no APN settings for the owner; otherwise, a default case that the owner may give APN settings |
| 70 | }d2apn_set_apns_info_req_struct; |
| 71 | |
| 72 | // MSG_ID_D2APN_SET_APNS_REQ |
| 73 | typedef struct |
| 74 | { |
| 75 | D2APN_REQ_LOCAL_PARA_HDR |
| 76 | |
| 77 | /* common part */ |
| 78 | d2apn_set_apns_req_type_enum type; |
| 79 | kal_char apn[APN_STRING_LEN]; |
| 80 | kal_uint32 apn_idx; |
| 81 | kal_uint32 apn_type; |
| 82 | pdp_addr_type_enum pdx_type; |
| 83 | kal_char usrname[USERID_STRING_LEN]; |
| 84 | kal_char passwd[PASSWORD_STRING_LEN]; |
| 85 | kal_int8 auth_type; |
| 86 | kal_uint32 bearer_bitmask; |
| 87 | |
| 88 | /* conditional part */ |
| 89 | struct |
| 90 | { |
| 91 | struct |
| 92 | { |
| 93 | pdp_addr_type_enum pdx_type; // by default NULL_PDP_ADDR_TYPE |
| 94 | }roam; |
| 95 | |
| 96 | struct |
| 97 | { |
| 98 | kal_char dnn[APN_STRING_LEN]; // by default a NULL string |
| 99 | pdp_addr_type_enum pdx_type; // by default NULL_PDP_ADDR_TYPE |
| 100 | atcmd_SSC_mode_enum ssc_mode; // by default ATCMD_SSC_MODE_MAX |
| 101 | at_s_nssai_struct s_nssai; // by default is_sst_present, is_sd_present, is_mapped_configured_sst_present, is_mapped_configured_sd_present) = (KAL_FALSE, KAL_FALSE, KAL_FALSE, KAL_FALSE) |
| 102 | atcmd_Access_type_enum access_type; // by default ATCMD_ACCESS_TYPE_MAX |
| 103 | }vg; |
| 104 | |
| 105 | struct |
| 106 | { |
| 107 | pdp_addr_type_enum pdx_type; // by default NULL_PDP_ADDR_TYPE |
| 108 | }vg_roam; |
| 109 | |
| 110 | /* operator part */ |
| 111 | struct |
| 112 | { |
| 113 | kal_uint32 wapn; // by default 0 to disable VzW |
| 114 | kal_uint32 apncl; |
| 115 | kal_uint32 apned; |
| 116 | kal_uint32 max_conn; |
| 117 | kal_uint32 max_conn_t; |
| 118 | kal_uint32 wait_time; |
| 119 | }vzw; |
| 120 | |
| 121 | struct |
| 122 | { |
| 123 | kal_uint32 inact_time; // by default 0 |
| 124 | }sprint; |
| 125 | }cond; |
| 126 | }d2apn_set_apns_req_struct; |
| 127 | |
| 128 | // MSG_ID_D2APN_RESET_APNS_INFO_REQ |
| 129 | typedef struct |
| 130 | { |
| 131 | D2APN_REQ_LOCAL_PARA_HDR |
| 132 | |
| 133 | /* common part */ |
| 134 | d2apn_reset_apns_info_req_type_enum type; |
| 135 | }d2apn_reset_apns_info_req_struct; |
| 136 | |
| 137 | // MSG_ID_D2APN_RESET_APNS_REQ |
| 138 | typedef struct |
| 139 | { |
| 140 | D2APN_REQ_LOCAL_PARA_HDR |
| 141 | |
| 142 | /* common part */ |
| 143 | d2apn_reset_apns_req_type_enum type; |
| 144 | kal_char apn[APN_STRING_LEN]; |
| 145 | kal_uint32 apn_idx; |
| 146 | }d2apn_reset_apns_req_struct; |
| 147 | |
| 148 | // MSG_ID_D2APN_COPY_APNS_TBL_REQ |
| 149 | typedef struct |
| 150 | { |
| 151 | D2APN_REQ_LOCAL_PARA_HDR |
| 152 | |
| 153 | /* common part */ |
| 154 | // N/A |
| 155 | }d2apn_copy_apns_tbl_req_struct; |
| 156 | |
| 157 | // MSG_ID_D2APN_GET_APNS_INFO_REQ |
| 158 | typedef struct |
| 159 | { |
| 160 | D2APN_REQ_LOCAL_PARA_HDR |
| 161 | |
| 162 | /* common part */ |
| 163 | d2apn_get_apns_info_req_type_enum type; |
| 164 | module_type owner; |
| 165 | }d2apn_get_apns_info_req_struct; |
| 166 | |
| 167 | // MSG_ID_D2APN_GET_APNS_REQ |
| 168 | typedef struct |
| 169 | { |
| 170 | D2APN_REQ_LOCAL_PARA_HDR |
| 171 | |
| 172 | /* common part */ |
| 173 | d2apn_get_apns_req_type_enum type; |
| 174 | union |
| 175 | { |
| 176 | // querying one by APN and APN index |
| 177 | struct |
| 178 | { |
| 179 | kal_char apn[APN_STRING_LEN]; |
| 180 | kal_uint32 apn_idx; |
| 181 | }apn_idx; |
| 182 | |
yu.dong | c592bc7 | 2024-04-24 22:45:13 -0700 | [diff] [blame] | 183 | // querying a group of APN setting by owner |
rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 184 | struct |
| 185 | { |
| 186 | module_type owner; |
| 187 | }owner; |
| 188 | |
| 189 | // querying a group by APN |
| 190 | struct |
| 191 | { |
| 192 | kal_char apn[APN_STRING_LEN]; |
| 193 | }apn; |
| 194 | }param; |
| 195 | }d2apn_get_apns_req_struct; |
| 196 | |
| 197 | |
| 198 | /******************************************************************************* |
| 199 | * D2APN to User CNF * |
| 200 | *******************************************************************************/ |
| 201 | |
| 202 | // MSG_ID_D2APN_SET_APNS_INFO_CNF |
| 203 | typedef struct |
| 204 | { |
| 205 | D2APN_CNF_LOCAL_PARA_HDR |
| 206 | |
| 207 | /* common part */ |
| 208 | d2apn_res_enum res; |
| 209 | }d2apn_set_apns_info_cnf_struct; |
| 210 | |
| 211 | // MSG_ID_D2APN_SET_APNS_CNF |
| 212 | typedef d2apn_set_apns_info_cnf_struct d2apn_set_apns_cnf_struct; |
| 213 | |
| 214 | // MSG_ID_D2APN_RESET_APNS_INFO_CNF |
| 215 | typedef d2apn_set_apns_info_cnf_struct d2apn_reset_apns_info_cnf_struct; |
| 216 | |
| 217 | // MSG_ID_D2APN_RESET_APNS_CNF |
| 218 | typedef d2apn_set_apns_info_cnf_struct d2apn_reset_apns_cnf_struct; |
| 219 | |
| 220 | // MSG_ID_D2APN_COPY_APNS_TBL_CNF |
| 221 | typedef d2apn_set_apns_info_cnf_struct d2apn_copy_apns_tbl_cnf_struct; |
| 222 | |
| 223 | // MSG_ID_D2APN_GET_APNS_INFO_CNF |
| 224 | typedef d2apn_set_apns_info_cnf_struct d2apn_get_apns_info_cnf_struct; |
| 225 | |
| 226 | // MSG_ID_D2APN_GET_APNS_CNF |
| 227 | typedef d2apn_set_apns_cnf_struct d2apn_get_apns_cnf_struct; |
| 228 | |
| 229 | /******************************************************************************* |
| 230 | * D2APN to User IND * |
| 231 | *******************************************************************************/ |
| 232 | |
| 233 | // MSG_ID_D2APN_GET_APNS_INFO_IND |
| 234 | typedef struct |
| 235 | { |
| 236 | D2APN_IND_LOCAL_PARA_HDR |
| 237 | |
| 238 | /* common part */ |
| 239 | module_type owner; |
| 240 | plmn_id_struct plmn_id; |
| 241 | kal_uint8 imsi[D2_IMSI_STR_LEN]; |
| 242 | kal_bool mia; // KAL_TRUE indicates no APN settings for the owner; otherwise, a default case that the owner may give APN settings |
| 243 | }d2apn_get_apns_info_ind_struct; |
| 244 | |
| 245 | // MSG_ID_D2APN_GET_APNS_IND |
| 246 | typedef struct |
| 247 | { |
| 248 | D2APN_IND_LOCAL_PARA_HDR |
| 249 | |
| 250 | /* common part */ |
| 251 | kal_char apn[APN_STRING_LEN]; |
| 252 | kal_uint32 apn_idx; |
| 253 | kal_uint32 apn_type; |
| 254 | pdp_addr_type_enum pdx_type; |
| 255 | kal_char usrname[USERID_STRING_LEN]; |
| 256 | kal_char passwd[PASSWORD_STRING_LEN]; |
| 257 | kal_int8 auth_type; |
| 258 | kal_uint32 bearer_bitmask; |
| 259 | |
| 260 | /* conditional part */ |
| 261 | struct |
| 262 | { |
| 263 | struct |
| 264 | { |
| 265 | pdp_addr_type_enum pdx_type; |
| 266 | }roam; |
| 267 | |
| 268 | struct |
| 269 | { |
| 270 | kal_char dnn[APN_STRING_LEN]; |
| 271 | pdp_addr_type_enum pdx_type; |
| 272 | atcmd_SSC_mode_enum ssc_mode; |
| 273 | at_s_nssai_struct s_nssai; |
| 274 | atcmd_Access_type_enum access_type; |
| 275 | }vg; |
| 276 | |
| 277 | struct |
| 278 | { |
| 279 | pdp_addr_type_enum pdx_type; |
| 280 | }vg_roam; |
| 281 | |
| 282 | /* operator part */ |
| 283 | struct |
| 284 | { |
| 285 | kal_uint32 wapn; |
| 286 | kal_uint32 apncl; |
| 287 | kal_uint32 apned; |
| 288 | kal_uint32 max_conn; |
| 289 | kal_uint32 max_conn_t; |
| 290 | kal_uint32 wait_time; |
| 291 | }vzw; |
| 292 | |
| 293 | struct |
| 294 | { |
| 295 | kal_uint32 inact_time; |
| 296 | }sprint; |
| 297 | }cond; |
| 298 | }d2apn_get_apns_ind_struct; |
| 299 | |
| 300 | // MSG_ID_D2APN_APNS_CHG_IND |
| 301 | typedef struct |
| 302 | { |
| 303 | D2APN_IND_LOCAL_PARA_HDR |
| 304 | |
| 305 | /* common part */ |
| 306 | d2apn_apns_chg_ind_type_enum type; |
| 307 | union |
| 308 | { |
| 309 | // APN-setting information based on a owner changed |
| 310 | struct |
| 311 | { |
| 312 | module_type owner; |
| 313 | }info; |
| 314 | |
| 315 | // a single APN setting changed |
| 316 | struct |
| 317 | { |
| 318 | kal_char apn[APN_STRING_LEN]; |
| 319 | kal_uint32 apn_idx; |
| 320 | }apn_idx; |
| 321 | |
| 322 | // a group of APN settings based on a owner changed |
| 323 | struct |
| 324 | { |
| 325 | module_type owner; |
| 326 | }owner; |
| 327 | }param; // NEED_TO_BE_NOTICED. should be 'info' |
| 328 | }d2apn_apns_chg_ind_struct; |
| 329 | |
| 330 | |
| 331 | /******************************************************************************* |
yu.dong | c592bc7 | 2024-04-24 22:45:13 -0700 | [diff] [blame] | 332 | * User to D2APN RSP * |
rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 333 | *******************************************************************************/ |
| 334 | |
| 335 | // N/A |
| 336 | |
| 337 | #endif |