rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [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 | /******************************************************************************* |
| 37 | * Filename: |
| 38 | * --------- |
| 39 | * tcpip_struct.h |
| 40 | * |
| 41 | * Project: |
| 42 | * -------- |
| 43 | * UMOLY |
| 44 | * |
| 45 | * Description: |
| 46 | * ------------ |
| 47 | * Defines TCPIP service ILM structure |
| 48 | * |
| 49 | * Author: |
| 50 | * ------- |
| 51 | * ------- |
| 52 | * |
| 53 | * ========================================================================== |
| 54 | * |
| 55 | ****************************************************************************/ |
| 56 | #ifndef __TCPIP_STRUCT_H__ |
| 57 | #define __TCPIP_STRUCT_H__ |
| 58 | |
| 59 | #include "kal_public_defs.h" |
| 60 | #include "kal_public_api.h" |
| 61 | #include "kal_general_types.h" |
| 62 | #include "atcmd_struct.h" |
| 63 | /* for net/ip info */ |
| 64 | #include "netinfo_common_struct.h" |
| 65 | /* for ran type */ |
| 66 | #include "iwlan_public_defs.h" |
| 67 | |
| 68 | typedef new_ip_info_struct tcpip_ip_info_struct_t; |
| 69 | typedef net_info_struct tcpip_net_info_struct_t; |
| 70 | #define TCPIP_RAN_UNSPEC IWLAN_RAN_UNSPEC |
| 71 | #define TCPIP_RAN_MOBILE_3GPP IWLAN_RAN_MOBILE_3GPP |
| 72 | #define TCPIP_RAN_WIFI IWLAN_RAN_WIFI |
| 73 | #define TCPIP_RAN_TYPE_CNT IWLAN_RAN_TYPE_CNT |
| 74 | #define TCPIP_RAN_TYPE_NONE IWLAN_RAN_TYPE_NONE |
| 75 | #define TCPIP_RAN_DATA_1 DATA_1 |
| 76 | #define TCPIP_RAN_DATA_2 DATA_2 |
| 77 | #define TCPIP_RAN_DATA_3 DATA_3 |
| 78 | #define TCPIP_RAN_DATA_4 DATA_4 |
| 79 | #define TCPIP_RAN_TYPE_ERR IWLAN_RAN_TYPE_ERR |
| 80 | |
| 81 | /************************************************** |
| 82 | * TCPIP ilm struct |
| 83 | **************************************************/ |
| 84 | |
| 85 | /******************************************************************************* |
| 86 | * D2CM to STKBRG REQ * |
| 87 | *******************************************************************************/ |
| 88 | typedef struct |
| 89 | { |
| 90 | kal_uint8 PDPv6_addr[IPV6_ADDR_LEN]; |
| 91 | } d2cm_stkbrg_glbaddr_struct; |
| 92 | |
| 93 | #define TCPIP_D2CM_REQ_LOCAL_PARA_HDR \ |
| 94 | LOCAL_PARA_HDR \ |
| 95 | kal_uint32 interface_id; /* transaction id + channel id */ \ |
| 96 | kal_uint8 ran_type; /* d2pm_iwlan_ran_enum */ |
| 97 | |
| 98 | // MSG_ID_D2CM_STKBRG_ESTABLISHPDN_REQ |
| 99 | typedef struct |
| 100 | { |
| 101 | TCPIP_D2CM_REQ_LOCAL_PARA_HDR |
| 102 | |
| 103 | kal_uint32 netif_id; /* network_interface_id in net_info */ |
| 104 | tcpip_ip_info_struct_t ip_info; |
| 105 | kal_bool net_info_present; |
| 106 | tcpip_net_info_struct_t net_info; |
| 107 | } d2cm_stkbrg_establishpdn_req_struct; |
| 108 | |
| 109 | // MSG_ID_D2CM_STKBRG_DISCONNECTPDN_REQ |
| 110 | typedef struct |
| 111 | { |
| 112 | TCPIP_D2CM_REQ_LOCAL_PARA_HDR |
| 113 | } d2cm_stkbrg_disconnectpdn_req_struct; |
| 114 | |
| 115 | // MSG_ID_D2CM_STKBRG_IFCHANGE_REQ |
| 116 | typedef struct |
| 117 | { |
| 118 | TCPIP_D2CM_REQ_LOCAL_PARA_HDR |
| 119 | |
| 120 | tcpip_ip_info_struct_t ip_info; |
| 121 | kal_bool net_info_present; |
| 122 | tcpip_net_info_struct_t net_info; |
| 123 | } d2cm_stkbrg_ifchange_req_struct; |
| 124 | |
| 125 | // MSG_ID_D2CM_STKBRG_GLBADDR_REQ |
| 126 | typedef struct |
| 127 | { |
| 128 | TCPIP_D2CM_REQ_LOCAL_PARA_HDR |
| 129 | |
| 130 | d2cm_stkbrg_glbaddr_struct ip_info; |
| 131 | } d2cm_stkbrg_glbaddr_req_struct; |
| 132 | |
| 133 | |
| 134 | |
| 135 | #define TCPIP_D2_REQ_LOCAL_PARA_HDR \ |
| 136 | LOCAL_PARA_HDR \ |
| 137 | kal_uint32 interface_id; /* transaction id + channel id */ \ |
| 138 | iwlan_ran_e ran_type; /* iwlan_ran_e */ |
| 139 | |
| 140 | // MSG_ID_D2_STKBRG_ESTABLISHPDN_REQ |
| 141 | typedef struct |
| 142 | { |
| 143 | TCPIP_D2_REQ_LOCAL_PARA_HDR |
| 144 | |
| 145 | kal_uint32 netif_id; /* network_interface_id in net_info */ |
| 146 | new_ip_info_struct ip_info; |
| 147 | kal_bool net_info_present; |
| 148 | tcpip_net_info_struct_t net_info; |
| 149 | } d2_stkbrg_establishpdn_req_struct; |
| 150 | |
| 151 | // MSG_ID_D2_STKBRG_DISCONNECTPDN_REQ |
| 152 | typedef struct |
| 153 | { |
| 154 | TCPIP_D2_REQ_LOCAL_PARA_HDR |
| 155 | } d2_stkbrg_disconnectpdn_req_struct; |
| 156 | |
| 157 | // MSG_ID_D2_STKBRG_IFCHANGE_REQ |
| 158 | typedef struct |
| 159 | { |
| 160 | TCPIP_D2_REQ_LOCAL_PARA_HDR |
| 161 | |
| 162 | kal_uint32 event; |
| 163 | new_ip_info_struct ip_info; |
| 164 | kal_bool net_info_present; |
| 165 | tcpip_net_info_struct_t net_info; |
| 166 | } d2_stkbrg_ifchange_req_struct; |
| 167 | |
| 168 | // MSG_ID_IMS_STKBRG_MTU_SET_REQ |
| 169 | #define TCPIP_IMS_MTU_REQ_LOCAL_PARA_HDR \ |
| 170 | LOCAL_PARA_HDR \ |
| 171 | kal_uint32 interface_id; /*Interface if for which needs to be applied*/ \ |
| 172 | kal_uint32 mtu; /* MTU value */ |
| 173 | |
| 174 | typedef struct |
| 175 | { |
| 176 | TCPIP_IMS_MTU_REQ_LOCAL_PARA_HDR |
| 177 | }ims_stkbrg_mtu_set_req_struct; |
| 178 | |
| 179 | /******************************************************************************* |
| 180 | * STKBRG TO D2CM CNF * |
| 181 | *******************************************************************************/ |
| 182 | typedef enum |
| 183 | { |
| 184 | STKBRG_RES_SUCC = 0, |
| 185 | STKBRG_RES_NONE = 1, |
| 186 | STKBRG_RES_FAIL = 2, |
| 187 | STKBRG_RES_MAX = 0x7FFFFFFF, |
| 188 | } stkbrg_res_enum; |
| 189 | |
| 190 | #define TCPIP_D2CM_CNF_LOCAL_PARA_HDR \ |
| 191 | LOCAL_PARA_HDR \ |
| 192 | kal_uint32 interface_id; \ |
| 193 | stkbrg_res_enum res; |
| 194 | |
| 195 | typedef struct |
| 196 | { |
| 197 | TCPIP_D2CM_CNF_LOCAL_PARA_HDR |
| 198 | } d2cm_cnf_info_struct; |
| 199 | |
| 200 | // MSG_ID_D2CM_STKBRG_ESTABLISHPDN_CNF |
| 201 | typedef struct |
| 202 | { |
| 203 | TCPIP_D2CM_CNF_LOCAL_PARA_HDR |
| 204 | |
| 205 | tcpip_ip_info_struct_t ip_info_original; |
| 206 | tcpip_ip_info_struct_t ip_info_updated; |
| 207 | |
| 208 | kal_uint32 stkif_id; |
| 209 | } d2cm_stkbrg_establishpdn_cnf_struct; |
| 210 | |
| 211 | // MSG_ID_D2CM_STKBRG_DISCONNECTPDN_CNF |
| 212 | typedef struct |
| 213 | { |
| 214 | TCPIP_D2CM_CNF_LOCAL_PARA_HDR |
| 215 | |
| 216 | kal_uint32 stkif_id; |
| 217 | } d2cm_stkbrg_disconnectpdn_cnf_struct; |
| 218 | |
| 219 | // MSG_ID_D2CM_STKBRG_IFCHANGE_CNF |
| 220 | typedef struct |
| 221 | { |
| 222 | TCPIP_D2CM_CNF_LOCAL_PARA_HDR |
| 223 | |
| 224 | kal_uint32 stkif_id; |
| 225 | ipstk_ip_info_struct ip_info; |
| 226 | } d2cm_stkbrg_ifchange_cnf_struct; |
| 227 | |
| 228 | // MSG_ID_D2CM_STKBRG_GLBADDR_CNF |
| 229 | typedef struct |
| 230 | { |
| 231 | TCPIP_D2CM_CNF_LOCAL_PARA_HDR |
| 232 | |
| 233 | kal_uint32 stkif_id; |
| 234 | } d2cm_stkbrg_glbaddr_cnf_struct; |
| 235 | |
| 236 | |
| 237 | #define TCPIP_D2_CNF_LOCAL_PARA_HDR \ |
| 238 | LOCAL_PARA_HDR \ |
| 239 | kal_uint32 interface_id; \ |
| 240 | stkbrg_res_enum res; |
| 241 | |
| 242 | // MSG_ID_D2_STKBRG_ESTABLISHPDN_CNF |
| 243 | typedef struct |
| 244 | { |
| 245 | TCPIP_D2_CNF_LOCAL_PARA_HDR |
| 246 | |
| 247 | kal_uint32 stkif_id; |
| 248 | ipstk_ip_info_struct ipstk_ip_info; |
| 249 | } d2_stkbrg_establishpdn_cnf_struct; |
| 250 | |
| 251 | // MSG_ID_D2_STKBRG_DISCONNECTPDN_CNF |
| 252 | typedef struct |
| 253 | { |
| 254 | TCPIP_D2CM_CNF_LOCAL_PARA_HDR |
| 255 | |
| 256 | kal_uint32 stkif_id; |
| 257 | } d2_stkbrg_disconnectpdn_cnf_struct; |
| 258 | |
| 259 | // MSG_ID_D2_STKBRG_IFCHANGE_CNF |
| 260 | typedef struct |
| 261 | { |
| 262 | TCPIP_D2CM_CNF_LOCAL_PARA_HDR |
| 263 | |
| 264 | kal_uint32 stkif_id; |
| 265 | ipstk_ip_info_struct ipstk_ip_info; |
| 266 | } d2_stkbrg_ifchange_cnf_struct; |
| 267 | |
| 268 | // MSG_ID_IMS_STKBRG_MTU_SET_CNF |
| 269 | #define TCPIP_IMS_MTU_CNF_LOCAL_PARA_HDR \ |
| 270 | LOCAL_PARA_HDR \ |
| 271 | kal_uint32 interface_id; /*Interface if for which needs to be applied*/ \ |
| 272 | stkbrg_res_enum res; /* success or failure */ |
| 273 | |
| 274 | typedef struct |
| 275 | { |
| 276 | TCPIP_IMS_MTU_CNF_LOCAL_PARA_HDR |
| 277 | }ims_stkbrg_mtu_set_cnf_struct; |
| 278 | |
| 279 | /******************************************************************************* |
| 280 | * ATP TO STKBRG IND |
| 281 | *******************************************************************************/ |
| 282 | typedef struct { |
| 283 | LOCAL_PARA_HDR |
| 284 | |
| 285 | /* data */ |
| 286 | kal_uint32 pktsize; |
| 287 | } atp_stkbrg_pktsize_ind_struct; |
| 288 | |
| 289 | /******************************************************************************* |
| 290 | * STKBRG TO ATP |
| 291 | *******************************************************************************/ |
| 292 | |
| 293 | typedef enum { |
| 294 | TCPIP_ADDR_FAMILY_IP4 = 0, |
| 295 | TCPIP_ADDR_FAMILY_IP6, |
| 296 | } tcpip_addr_family_enum; |
| 297 | |
| 298 | typedef enum { |
| 299 | TCPIP_PROTOCOL_TCP = 6, |
| 300 | TCPIP_PROTOCOL_UDP = 17, |
| 301 | } tcpip_protocol_enum; |
| 302 | |
| 303 | typedef enum { |
| 304 | TCPIP_STATUS_SUCCESS = 0, |
| 305 | TCPIP_STATUS_FAILURE, |
| 306 | |
| 307 | /* Last entry */ |
| 308 | TCPIP_STATUS_MAX |
| 309 | } tcpip_status; |
| 310 | |
| 311 | #define TCPIP_CID_INVALID 0xFFFFFFFF |
| 312 | |
| 313 | typedef struct { |
| 314 | LOCAL_PARA_HDR |
| 315 | |
| 316 | kal_uint8 trans_id; |
| 317 | kal_uint32 cid; |
| 318 | kal_uint8 local_addr[IPV6_ADDR_LEN]; |
| 319 | kal_uint16 port; |
| 320 | tcpip_addr_family_enum addr_family; |
| 321 | tcpip_protocol_enum protocol; |
| 322 | } stkbrg_atp_port_alloc_req_struct; |
| 323 | |
| 324 | typedef struct { |
| 325 | LOCAL_PARA_HDR |
| 326 | |
| 327 | kal_uint8 trans_id; |
| 328 | tcpip_status status; |
| 329 | } stkbrg_atp_port_alloc_cnf_struct; |
| 330 | |
| 331 | typedef struct { |
| 332 | LOCAL_PARA_HDR |
| 333 | |
| 334 | kal_uint8 trans_id; |
| 335 | kal_uint32 cid; |
| 336 | kal_uint8 local_addr[IPV6_ADDR_LEN]; |
| 337 | tcpip_protocol_enum protocol; |
| 338 | tcpip_addr_family_enum addr_family; |
| 339 | kal_uint16 port; |
| 340 | } stkbrg_atp_port_free_req_struct; |
| 341 | |
| 342 | typedef struct { |
| 343 | LOCAL_PARA_HDR |
| 344 | |
| 345 | kal_uint8 trans_id; |
| 346 | tcpip_status status; |
| 347 | } stkbrg_atp_port_free_cnf_struct; |
| 348 | |
| 349 | /*******************************************************************************/ |
| 350 | |
| 351 | /******************************************************************************* |
| 352 | * STATISTIC DUMP IND |
| 353 | *******************************************************************************/ |
| 354 | typedef enum { |
| 355 | STAT_DUMP_NB, |
| 356 | STAT_DUMP_FIL, |
| 357 | STAT_DUMP_BW, |
| 358 | STAT_DUMP_DEV, |
| 359 | }stat_dump_enum; |
| 360 | typedef struct { |
| 361 | LOCAL_PARA_HDR |
| 362 | |
| 363 | stat_dump_enum req_id; |
| 364 | } stat_stkbrg_dump_ind_struct; |
| 365 | |
| 366 | typedef enum { |
| 367 | NO_RA_INITIAL, |
| 368 | NO_RA_REFRESH, |
| 369 | RA_UPDATE, |
| 370 | RA_EVENT_MAX |
| 371 | } ra_if_add_e; |
| 372 | |
| 373 | typedef struct { |
| 374 | LOCAL_PARA_HDR |
| 375 | |
| 376 | kal_uint8 event; |
| 377 | kal_uint8 ran_type; |
| 378 | kal_uint8 prefix_len; |
| 379 | kal_uint32 interface_id; |
| 380 | kal_uint32 netif_id; |
| 381 | kal_uint32 mtu; |
| 382 | kal_uint8 ip6_addr[16]; |
| 383 | } stkbrg_d2_ra_if_add_ind_struct; |
| 384 | |
| 385 | typedef struct _rsra_stkbrg_ip_update_ind_struct{ |
| 386 | LOCAL_PARA_HDR |
| 387 | kal_uint32 netif_id; |
| 388 | kal_uint8 ip_addr[16]; |
| 389 | kal_uint32 prefix_len; |
| 390 | kal_uint32 preferred_lifetime; |
| 391 | kal_uint32 valid_lifetime; |
| 392 | } rsra_stkbrg_ip_update_ind_struct; |
| 393 | |
| 394 | typedef struct _stkbrg_ra_process_ind_struct{ |
| 395 | LOCAL_PARA_HDR |
| 396 | kal_uint32 netif_id; |
| 397 | } stkbrg_ra_process_ind_struct; |
| 398 | |
yu.dong | e372c32 | 2023-08-30 20:25:04 -0700 | [diff] [blame] | 399 | typedef struct _stkbrg_dhcp_ready_ind_struct{ |
| 400 | LOCAL_PARA_HDR |
| 401 | kal_uint32 netif_id; |
| 402 | kal_uint32 stk_id; |
| 403 | void *ctx; |
| 404 | kal_uint32 addr; |
| 405 | kal_uint32 interface_id; |
| 406 | kal_int32 mtu; |
| 407 | } stkbrg_dhcp_ready_ind_struct; |
| 408 | |
| 409 | typedef struct _stkbrg_dhcp_stop_ind_struct{ |
| 410 | LOCAL_PARA_HDR |
| 411 | kal_uint32 netif_id; |
| 412 | kal_uint32 stk_id; |
| 413 | } stkbrg_dhcp_stop_ind_struct; |
| 414 | |
rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 415 | /*******************************************************************************/ |
| 416 | /* Type define */ |
| 417 | typedef d2cm_stkbrg_glbaddr_struct stkbrg_glbaddr_struct_t; |
| 418 | typedef d2cm_cnf_info_struct d2cm_cnf_info_struct_t; |
| 419 | |
| 420 | /*Gen93/95 interface*/ |
| 421 | typedef d2cm_stkbrg_glbaddr_req_struct d2cm_stkbrg_glbaddr_req_struct_t; |
| 422 | typedef d2cm_stkbrg_glbaddr_cnf_struct d2cm_stkbrg_glbaddr_cnf_struct_t; |
| 423 | |
| 424 | /*Gen97 interface*/ |
| 425 | typedef d2_stkbrg_establishpdn_req_struct d2_stkbrg_establishpdn_req_struct_t; |
| 426 | typedef d2_stkbrg_establishpdn_cnf_struct d2_stkbrg_establishpdn_cnf_struct_t; |
| 427 | typedef d2_stkbrg_disconnectpdn_req_struct d2_stkbrg_disconnectpdn_req_struct_t; |
| 428 | typedef d2_stkbrg_disconnectpdn_cnf_struct d2_stkbrg_disconnectpdn_cnf_struct_t; |
| 429 | typedef d2_stkbrg_ifchange_req_struct d2_stkbrg_ifchange_req_struct_t; |
| 430 | typedef d2_stkbrg_ifchange_cnf_struct d2_stkbrg_ifchange_cnf_struct_t; |
| 431 | typedef ims_stkbrg_mtu_set_req_struct ims_stkbrg_mtu_set_req_struct_t; |
| 432 | typedef ims_stkbrg_mtu_set_cnf_struct ims_stkbrg_mtu_set_cnf_struct_t; |
| 433 | |
| 434 | typedef atp_stkbrg_pktsize_ind_struct atp_stkbrg_pktsize_ind_struct_t; |
| 435 | |
| 436 | typedef stat_stkbrg_dump_ind_struct stat_stkbrg_dump_ind_struct_t; |
| 437 | |
| 438 | #endif // __TCPIP_STRUCT_H__ |