yu.dong | c33b307 | 2024-08-21 23:14:49 -0700 | [diff] [blame^] | 1 | #ifndef _SIMMNGR_STRUCT_H |
| 2 | #define _SIMMNGR_STRUCT_H |
| 3 | |
| 4 | #include "kal_general_types.h" |
| 5 | #include "kal_public_defs.h" |
| 6 | #include "atcmd_struct.h" |
| 7 | #include "ims_common_def.h" |
| 8 | |
| 9 | #include "simmngr_def_enums.h" |
| 10 | |
| 11 | typedef struct simmngr_sim_type_check_req_struct { |
| 12 | SIMMNGR_LOCAL_PARA_HDR |
| 13 | } simmngr_sim_type_check_req_struct; |
| 14 | |
| 15 | typedef struct simmngr_sim_insert_check_req_struct { |
| 16 | SIMMNGR_LOCAL_PARA_HDR |
| 17 | } simmngr_sim_insert_check_req_struct; |
| 18 | |
| 19 | typedef struct simmngr_sim_state_check_req_struct { |
| 20 | SIMMNGR_LOCAL_PARA_HDR |
| 21 | } simmngr_sim_state_check_req_struct; |
| 22 | |
| 23 | typedef struct simmngr_query_sim_info_req_struct { |
| 24 | SIMMNGR_LOCAL_PARA_HDR |
| 25 | kal_uint16 request;//simmngr_sim_info_query_enum |
| 26 | kal_uint8 sim_type;// 0 : usim, 1 : isim |
| 27 | kal_uint8 ch_id;// isim only |
| 28 | } simmngr_query_sim_info_req_struct; |
| 29 | |
| 30 | typedef struct simmngr_write_sim_ef_req_struct { |
| 31 | SIMMNGR_LOCAL_PARA_HDR |
| 32 | kal_uint16 request; |
| 33 | kal_uint8 sim_type;// 0 : usim, 1 : isim |
| 34 | kal_uint8 ch_id;// isim only |
| 35 | //Data in peer buff struct |
| 36 | } simmngr_write_sim_ef_req_struct; |
| 37 | |
| 38 | typedef struct simmngr_sim_aka_req_struct { |
| 39 | SIMMNGR_LOCAL_PARA_HDR |
| 40 | kal_uint8 sim_type;// 0 : usim, 1 : isim |
| 41 | kal_uint8 ch_id;// isim only |
| 42 | kal_uint8 rand_len; |
| 43 | kal_uint8 autn_len; |
| 44 | kal_uint8 rand[32]; |
| 45 | kal_uint8 autn[32]; |
| 46 | } simmngr_sim_aka_req_struct; |
| 47 | |
| 48 | typedef struct simmngr_sim_aka_cnf_struct { |
| 49 | SIMMNGR_LOCAL_PARA_HDR |
| 50 | kal_uint8 result; |
| 51 | kal_uint8 sim_type; |
| 52 | kal_uint16 response_len; |
| 53 | kal_uint8 response[256]; |
| 54 | } simmngr_sim_aka_cnf_struct; |
| 55 | |
| 56 | typedef struct simmngr_sim_gba_auth_req_struct { |
| 57 | SIMMNGR_LOCAL_PARA_HDR |
| 58 | kal_uint8 sim_type;// 0 : usim, 1 : isim |
| 59 | kal_uint8 ch_id;// isim only |
| 60 | kal_uint8 param1_len; |
| 61 | kal_uint8 param2_len; |
| 62 | kal_uint8 param1[64]; |
| 63 | kal_uint8 param2[64]; |
| 64 | kal_uint8 gba_type; |
| 65 | } simmngr_sim_gba_auth_req_struct; |
| 66 | |
| 67 | typedef struct simmngr_sim_gba_auth_cnf_struct { |
| 68 | SIMMNGR_LOCAL_PARA_HDR |
| 69 | kal_uint8 result; |
| 70 | kal_uint8 sw1;//Only available when result is Success |
| 71 | kal_uint8 sw2;//Only available when result is Success |
| 72 | kal_uint8 sim_type; |
| 73 | kal_uint16 response_len; |
| 74 | kal_uint8 response[256]; |
| 75 | } simmngr_sim_gba_auth_cnf_struct; |
| 76 | |
| 77 | typedef struct simmngr_sim_insert_check_cnf_struct { |
| 78 | SIMMNGR_LOCAL_PARA_HDR |
| 79 | kal_uint8 insert_state;// simmngr_sim_insert_state_enum |
| 80 | } simmngr_sim_insert_check_cnf_struct; |
| 81 | |
| 82 | typedef struct simmngr_query_sim_info_cnf_struct { |
| 83 | SIMMNGR_LOCAL_PARA_HDR |
| 84 | kal_uint16 request;//simmngr_sim_info_query_enum |
| 85 | kal_uint8 result; |
| 86 | } simmngr_query_sim_info_cnf_struct; |
| 87 | |
| 88 | typedef struct simmngr_write_sim_ef_cnf_struct { |
| 89 | SIMMNGR_LOCAL_PARA_HDR |
| 90 | kal_uint16 request; |
| 91 | kal_uint8 result; |
| 92 | } simmngr_write_sim_ef_cnf_struct; |
| 93 | |
| 94 | typedef struct simmngr_sim_type_check_cnf_struct { |
| 95 | SIMMNGR_LOCAL_PARA_HDR |
| 96 | kal_uint8 result; |
| 97 | kal_uint8 sim_type;// 0 : usim, 1 : isim |
| 98 | kal_uint8 ch_id;// isim only |
| 99 | } simmngr_sim_type_check_cnf_struct; |
| 100 | |
| 101 | typedef struct simmngr_imsi_result_t { |
| 102 | kal_uint8 imsi[16]; |
| 103 | kal_uint8 imsi_len; |
| 104 | kal_uint8 mnc_len; |
| 105 | } simmngr_imsi_result_t; |
| 106 | |
| 107 | typedef struct simmngr_imei_result_t { |
| 108 | kal_uint8 imei[16]; |
| 109 | kal_uint8 imei_len; |
| 110 | } simmngr_imei_result_t; |
| 111 | |
| 112 | typedef struct simmngr_mnc_len_result_t { |
| 113 | kal_uint8 mnc_len; |
| 114 | } simmngr_mnc_len_result_t; |
| 115 | |
| 116 | typedef struct simmngr_psismsc_result_t { |
| 117 | kal_uint8 psismsc[256]; |
| 118 | kal_uint16 psismsc_len; |
| 119 | } simmngr_psismsc_result_t; |
| 120 | |
| 121 | typedef struct simmngr_impu_result_t { |
| 122 | kal_uint8 impu_num; |
| 123 | kal_uint8 impu_len[20]; |
| 124 | kal_uint8 impu[20][256]; |
| 125 | } simmngr_impu_result_t; |
| 126 | |
| 127 | typedef struct simmngr_smsp_result_t { |
| 128 | kal_uint8 smsp[64]; |
| 129 | kal_uint8 smsp_len; |
| 130 | } simmngr_smsp_result_t; |
| 131 | |
| 132 | typedef struct simmngr_impi_result_t { |
| 133 | kal_uint8 impi[256]; |
| 134 | kal_uint16 impi_len; |
| 135 | } simmngr_impi_result_t; |
| 136 | |
| 137 | typedef struct simmngr_domain_result_t { |
| 138 | kal_uint8 domain[256]; |
| 139 | kal_uint16 domain_len; |
| 140 | } simmngr_domain_result_t; |
| 141 | |
| 142 | typedef struct simmngr_service_table_result_t { |
| 143 | kal_uint8 service_table[256]; |
| 144 | kal_uint16 service_table_len; |
| 145 | } simmngr_service_table_result_t; |
| 146 | |
| 147 | typedef struct simmngr_msisdn_result_t { |
| 148 | kal_uint8 msisdn_str_len; |
| 149 | kal_uint8 msisdn_str[24];// only 20bytes(string), 4bytes reserved |
| 150 | } simmngr_msisdn_result_t; |
| 151 | |
| 152 | typedef struct simmngr_pcscf_result_t { |
| 153 | kal_uint8 pcscf_len[20];// V4 + V6 |
| 154 | kal_uint8 pcscf[20][128];// V4 + V6 |
| 155 | kal_uint8 pcscf_num; |
| 156 | } simmngr_pcscf_result_t; |
| 157 | |
| 158 | typedef struct simmngr_trans_ef256_result_t { |
| 159 | kal_uint8 ef256_data[256]; |
| 160 | kal_uint16 ef256_result_len; |
| 161 | } simmngr_trans_ef256_result_t; //Many EF data are maximum 256 len, so use the same structure |
| 162 | |
| 163 | typedef struct simmngr_gid1_result_t { |
| 164 | kal_uint8 gid1_len; |
| 165 | kal_uint8 gid1[30];//currently we use 30 as max length |
| 166 | } simmngr_gid1_result_t; |
| 167 | |
| 168 | typedef struct simmngr_gid2_result_t { |
| 169 | kal_uint8 gid2_len; |
| 170 | kal_uint8 gid2[30];//currently we use 30 as max length |
| 171 | } simmngr_gid2_result_t; |
| 172 | |
| 173 | typedef struct simmngr_sim_state_check_cnf_struct { |
| 174 | SIMMNGR_LOCAL_PARA_HDR |
| 175 | kal_uint16 state;//simmngr_sim_state_check_cnf_enum |
| 176 | kal_uint8 result; |
| 177 | } simmngr_sim_state_check_cnf_struct; |
| 178 | |
| 179 | typedef struct simmngr_sim_data_ind_struct { |
| 180 | LOCAL_PARA_HDR |
| 181 | kal_uint32 data; |
| 182 | } simmngr_sim_state_ind_struct,simmngr_sim_data_ind_struct; |
| 183 | |
| 184 | typedef struct simmngr_sim_app_ready_ind_struct { |
| 185 | LOCAL_PARA_HDR |
| 186 | kal_uint32 ch_id; |
| 187 | kal_uint8 trans_id; /* Used by DSBP_RECONFIG's users. Use 1~255 in order for each SIM task. */ |
| 188 | } simmngr_usim_detected_ind_struct,simmngr_isim_ch_ind_struct; |
| 189 | |
| 190 | /* ATP */ |
| 191 | //From SIMMNGR to ATP |
| 192 | typedef struct { |
| 193 | SIMMNGR_LOCAL_PARA_HDR |
| 194 | kal_uint8 value; |
| 195 | } atp_simmngr_cmee_set_req_struct; |
| 196 | |
| 197 | typedef struct { |
| 198 | SIMMNGR_LOCAL_PARA_HDR |
| 199 | } atp_simmngr_cpin_query_req_struct; |
| 200 | |
| 201 | typedef struct { |
| 202 | SIMMNGR_LOCAL_PARA_HDR |
| 203 | } atp_simmngr_esims_query_req_struct; |
| 204 | |
| 205 | typedef struct { |
| 206 | SIMMNGR_LOCAL_PARA_HDR |
| 207 | } atp_simmngr_imei_query_req_struct; |
| 208 | |
| 209 | typedef struct { |
| 210 | SIMMNGR_LOCAL_PARA_HDR |
| 211 | //0:ISIM 1:USIM 2:CSIM 3:SIM 4:RUIM |
| 212 | kal_uint8 application_id; |
| 213 | } atp_simmngr_esimapp_query_req_struct; |
| 214 | |
| 215 | #if 0 |
| 216 | /* under construction !*/ |
| 217 | /* under construction !*/ |
| 218 | /* under construction !*/ |
| 219 | /* under construction !*/ |
| 220 | /* under construction !*/ |
| 221 | /* under construction !*/ |
| 222 | /* under construction !*/ |
| 223 | /* under construction !*/ |
| 224 | /* under construction !*/ |
| 225 | #endif |
| 226 | |
| 227 | //Response to SIMMNGR |
| 228 | typedef struct { |
| 229 | SIMMNGR_LOCAL_PARA_HDR |
| 230 | ims_result_code_enum result; |
| 231 | ims_err_id_enum err_id; |
| 232 | } atp_simmngr_cmee_set_cnf_struct,atp_simmngr_common_at_cnf_struct; |
| 233 | |
| 234 | typedef struct { |
| 235 | SIMMNGR_LOCAL_PARA_HDR |
| 236 | ims_result_code_enum result; |
| 237 | ims_err_id_enum err_id; |
| 238 | kal_uint8 code[40]; //Raw data for CPIN, i.e. +CPIN:<code> |
| 239 | } atp_simmngr_cpin_query_cnf_struct; |
| 240 | |
| 241 | typedef struct { |
| 242 | SIMMNGR_LOCAL_PARA_HDR |
| 243 | kal_uint8 success; //Query Result |
| 244 | kal_uint8 inserted_status; |
| 245 | } atp_simmngr_esims_query_cnf_struct; |
| 246 | |
| 247 | typedef struct { |
| 248 | SIMMNGR_LOCAL_PARA_HDR |
| 249 | kal_uint8 success; //Query Result |
| 250 | kal_uint8 imei_len; |
| 251 | kal_uint8 imei[20]; |
| 252 | } atp_simmngr_imei_query_cnf_struct; |
| 253 | |
| 254 | typedef struct { |
| 255 | SIMMNGR_LOCAL_PARA_HDR |
| 256 | ims_result_code_enum result; |
| 257 | ims_err_id_enum err_id; |
| 258 | kal_uint8 application_id; //For ISIM |
| 259 | kal_uint8 ch_id; //For ISIM |
| 260 | } atp_simmngr_esimapp_query_cnf_struct; |
| 261 | |
| 262 | #endif |