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 | /******************************************************************************* |
| 37 | * Filename: |
| 38 | * --------- |
| 39 | * kpalv_struct.h |
| 40 | * |
| 41 | * Project: |
| 42 | * -------- |
| 43 | * |
| 44 | * |
| 45 | * Description: |
| 46 | * ------------ |
| 47 | * Keep alive global structure definition |
| 48 | * |
| 49 | * Author: |
| 50 | * ------- |
| 51 | * ------- |
| 52 | * |
| 53 | * ========================================================================== |
| 54 | * $Log$ |
| 55 | * |
| 56 | * |
| 57 | * |
| 58 | ****************************************************************************/ |
| 59 | |
| 60 | #ifndef __INC_KPALV_STRUCT_H |
| 61 | #define __INC_KPALV_STRUCT_H |
| 62 | |
| 63 | #include "kal_general_types.h" |
| 64 | #include "kal_public_defs.h" |
| 65 | |
| 66 | /** MAX KEEPALIVE CONN TRACK BY MD */ |
| 67 | #define KPALV_MAX_KEEP_ALIVE_CONN 2 |
| 68 | |
| 69 | #define KPALV_IPV4_ADDR_LEN 4 |
| 70 | #define KPALV_IPV6_ADDR_LEN 16 |
| 71 | /* |
| 72 | * KPALV iptype enum |
| 73 | */ |
| 74 | typedef enum _kpalv_req_ip_type_e { |
| 75 | KPALV_REQ_IPTYPE_IPV4TCP, |
| 76 | KPALV_REQ_IPTYPE_IPV4UDP, |
| 77 | KPALV_REQ_IPTYPE_IPV6TCP, |
| 78 | KPALV_REQ_IPTYPE_IPV6UDP, |
| 79 | } kpalv_req_ip_type_e; |
| 80 | |
| 81 | /* |
| 82 | * KPALV at cmd req enum |
| 83 | */ |
| 84 | typedef enum _kpalv_at_req_type_e { |
| 85 | KPALV_REQ_DISABLE, |
| 86 | KPALV_REQ_ENABLE, |
| 87 | KPALV_REQ_QUERY, |
| 88 | KPALV_REQ_INVALID, |
| 89 | } kpalv_at_req_type_e; |
| 90 | |
| 91 | /* |
| 92 | * KPALV conn state enum |
| 93 | */ |
| 94 | typedef enum _kpalv_md_kpalive_state_e { |
| 95 | KPALV_MD_KEEPALIVE_STATE_ACTIVE, |
| 96 | KPALV_MD_KEEPALIVE_STATE_INACTIVE, |
| 97 | KPALV_MD_KEEPALIVE_STATE_PENDING |
| 98 | } kpalv_md_kpalive_state_e; |
| 99 | |
| 100 | /* |
| 101 | * Local parameter structure for MSG_ID_ATP_KPALV_KEEPALIVE_REQ. |
| 102 | */ |
| 103 | typedef struct _atp_kpalv_keepalive_enable_req_struct_t { |
| 104 | LOCAL_PARA_HDR |
| 105 | kpalv_at_req_type_e req_type; |
| 106 | kpalv_req_ip_type_e ip_type; |
| 107 | kal_uint32 netif_id; |
| 108 | kal_uint8 src_ipv4_addr[KPALV_IPV4_ADDR_LEN]; |
| 109 | kal_uint8 dst_ipv4_addr[KPALV_IPV4_ADDR_LEN]; |
| 110 | kal_uint8 src_ipv6_addr[KPALV_IPV6_ADDR_LEN]; |
| 111 | kal_uint8 dst_ipv6_addr[KPALV_IPV6_ADDR_LEN]; |
| 112 | kal_uint16 src_port; |
| 113 | kal_uint16 dst_port; |
| 114 | kal_uint16 idle_time; /**< in sec */ |
| 115 | kal_uint16 probe_interval; /**< in sec */ |
| 116 | kal_uint8 retry_cnt; /**< retry count */ |
| 117 | kal_uint8 conn_id; /**< for disable req */ |
| 118 | kal_bool parsing_result; |
| 119 | } atp_kpalv_keepalive_req_struct_t; |
| 120 | |
| 121 | /* |
| 122 | * Local parameter structure for MSG_ID_ATP_KPALV_KEEPALIVE_CNF. |
| 123 | */ |
| 124 | typedef struct _atp_kpalv_keepalive_cnf_struct_t { |
| 125 | LOCAL_PARA_HDR |
| 126 | kal_bool result; |
| 127 | kal_bool is_ap_disable_rsp; /**< ap requested to disable keep-alive */ |
| 128 | kal_uint8 conn_id; |
| 129 | kal_uint8 status; |
| 130 | } atp_kpalv_keepalive_cnf_struct_t; |
| 131 | |
| 132 | /* |
| 133 | * Local parameter structure for MSG_ID_ATP_KPALV_CONNECTION_STATUS_IND. |
| 134 | */ |
| 135 | typedef struct _atp_kpalv_connection_status_ind_struct_t { |
| 136 | LOCAL_PARA_HDR |
| 137 | kal_uint8 conn_id; |
| 138 | kal_uint8 status; |
| 139 | } atp_kpalv_connection_status_ind_struct_t; |
| 140 | |
| 141 | |
| 142 | typedef atp_kpalv_keepalive_req_struct_t atp_kpalv_keepalive_req_struct; |
| 143 | typedef atp_kpalv_connection_status_ind_struct_t atp_kpalv_connection_status_ind_struct; |
| 144 | typedef atp_kpalv_keepalive_cnf_struct_t atp_kpalv_keepalive_cnf_struct; |
| 145 | #endif /* __INC_KPALV_STRUCT_H */ |
| 146 | |