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