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) 2005 |
| 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 | * ipc_enums.h |
| 40 | * |
| 41 | * Project: |
| 42 | * -------- |
| 43 | * TATAKA |
| 44 | * |
| 45 | * Description: |
| 46 | * ------------ |
| 47 | * IP Core public enumeration definition. |
| 48 | * |
| 49 | * Author: |
| 50 | * ------- |
| 51 | * ------- |
| 52 | * |
| 53 | *============================================================================== |
| 54 | * HISTORY |
| 55 | * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| 56 | *------------------------------------------------------------------------------ |
| 57 | * removed! |
| 58 | * |
| 59 | * removed! |
| 60 | * removed! |
| 61 | * removed! |
| 62 | * removed! |
| 63 | * |
| 64 | * removed! |
| 65 | * removed! |
| 66 | * removed! |
| 67 | * removed! |
| 68 | * |
| 69 | * removed! |
| 70 | * removed! |
| 71 | * removed! |
| 72 | * removed! |
| 73 | * removed! |
| 74 | * removed! |
| 75 | * removed! |
| 76 | * removed! |
| 77 | * |
| 78 | * removed! |
| 79 | * removed! |
| 80 | * removed! |
| 81 | * removed! |
| 82 | * |
| 83 | * removed! |
| 84 | * removed! |
| 85 | * removed! |
| 86 | * removed! |
| 87 | * removed! |
| 88 | * removed! |
| 89 | * removed! |
| 90 | * |
| 91 | * removed! |
| 92 | * removed! |
| 93 | * removed! |
| 94 | * |
| 95 | * removed! |
| 96 | * removed! |
| 97 | * |
| 98 | * removed! |
| 99 | * |
| 100 | * removed! |
| 101 | * removed! |
| 102 | * removed! |
| 103 | * |
| 104 | * removed! |
| 105 | * removed! |
| 106 | * |
| 107 | * removed! |
| 108 | * |
| 109 | * removed! |
| 110 | * removed! |
| 111 | * removed! |
| 112 | * |
| 113 | * removed! |
| 114 | * removed! |
| 115 | * removed! |
| 116 | * |
| 117 | * removed! |
| 118 | * removed! |
| 119 | * removed! |
| 120 | * |
| 121 | * removed! |
| 122 | * removed! |
| 123 | * |
| 124 | * removed! |
| 125 | * removed! |
| 126 | * |
| 127 | * removed! |
| 128 | * removed! |
| 129 | * removed! |
| 130 | * removed! |
| 131 | * |
| 132 | * removed! |
| 133 | * removed! |
| 134 | * removed! |
| 135 | * |
| 136 | * removed! |
| 137 | * removed! |
| 138 | * removed! |
| 139 | * removed! |
| 140 | * removed! |
| 141 | * |
| 142 | * removed! |
| 143 | * removed! |
| 144 | * removed! |
| 145 | * |
| 146 | * removed! |
| 147 | * removed! |
| 148 | * removed! |
| 149 | * removed! |
| 150 | * |
| 151 | * removed! |
| 152 | * removed! |
| 153 | * removed! |
| 154 | * removed! |
| 155 | * removed! |
| 156 | * |
| 157 | * removed! |
| 158 | * removed! |
| 159 | * removed! |
| 160 | * |
| 161 | * removed! |
| 162 | * removed! |
| 163 | * removed! |
| 164 | * removed! |
| 165 | * |
| 166 | * removed! |
| 167 | * removed! |
| 168 | * removed! |
| 169 | * removed! |
| 170 | * |
| 171 | * removed! |
| 172 | * removed! |
| 173 | * removed! |
| 174 | * removed! |
| 175 | * removed! |
| 176 | * |
| 177 | * removed! |
| 178 | * removed! |
| 179 | * removed! |
| 180 | * |
| 181 | * removed! |
| 182 | * removed! |
| 183 | * removed! |
| 184 | * removed! |
| 185 | * removed! |
| 186 | * |
| 187 | * removed! |
| 188 | * removed! |
| 189 | * removed! |
| 190 | * |
| 191 | * removed! |
| 192 | * removed! |
| 193 | * removed! |
| 194 | * removed! |
| 195 | * |
| 196 | * removed! |
| 197 | * removed! |
| 198 | *------------------------------------------------------------------------------ |
| 199 | * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| 200 | *============================================================================== |
| 201 | *******************************************************************************/ |
| 202 | #ifndef __INC_IPC_ENUMS_H |
| 203 | #define __INC_IPC_ENUMS_H |
| 204 | |
| 205 | /*------------------------------------------------------------------------------ |
| 206 | * Data structure definition. |
| 207 | *----------------------------------------------------------------------------*/ |
| 208 | #define IPC_IP_TYPE_MIXED 0 |
| 209 | #define IPC_IP_TYPE_IPV4 1 |
| 210 | #define IPC_IP_TYPE_IPV6 2 |
| 211 | #define IPC_IP_TYPE_INVALID 3 |
| 212 | |
| 213 | /** extra flags */ |
| 214 | #define IPC_DRP_ALLW_PKT (0x0001 << 0) |
| 215 | |
| 216 | /** Network interface configuration */ |
| 217 | #define IPC_F_DHCP4C 0x00000001 /** DHCPv4 Client */ |
| 218 | #define IPC_F_DYNAMIC_Q_MAPPING 0x00000008 /** CCMNI Dynamic Queue Mapping */ |
| 219 | #define IPC_F_TETHERING_ROUTE 0x00000002 /** Direct Tethering routing required */ |
| 220 | #define IPC_F_LAN 0x00000004 /** LAN netif, which binds to other netif */ |
| 221 | #define IPC_F_LATENCY_CONCERN 0x00010000 /** Latency Concern Module */ |
| 222 | #define IPC_F_TEST_LOOPBACK_A 0x10000000 /** Test Loopback mode A */ |
| 223 | #define IPC_F_TEST_LOOPBACK_B 0x20000000 /** Test Loopback mode B */ |
| 224 | #define IPC_F_KEEP_PDN_MAPPING 0x00000010 /** Keep previous PDN mapping state */ |
| 225 | |
| 226 | #define IPC_INVALID_HANDLE NULL |
| 227 | |
| 228 | /** Filter feature option */ |
| 229 | #define IPC_FILTER_FEATURE_WC (0x01 << 0) /** Wild card filter: report matched to all packets */ |
| 230 | #define IPC_FILTER_FEATURE_BWM (0x01 << 1) /** Bypass when matched filter: bypass the matched packets */ |
| 231 | #define IPC_FILTER_FEATURE_IPV6_DPFM (0x01 << 3) /** Special feature for IPV6 MDT(no GPD callback) [Gen95 only]*/ |
| 232 | #define IPC_FILTER_FEATURE_FRAG (0x01 << 2) /** Support to filter fragment packet */ |
| 233 | #define IPC_FILTER_FEATURE_CLONE (0x01 << 6) /** Matched filter action : clone it */ |
| 234 | #define IPC_FILTER_FEATURE_PFM_DL (0x01 << 7) /** Filter registered through PFM */ |
| 235 | #define IPC_FILTER_FEATURE_CUST_FILTER (0x01 << 4) /** Add customized filter flow */ |
| 236 | #define IPC_FILTER_FEATURE_CUST_FILTER_W_INFO (0x01 << 5) /** Add customized filter flow and callback with IPC_INFO instead of user arguments */ |
| 237 | #define IPC_FILTER_FEATURE_IG_PN (0x01 << 8) /** Ignore PDN & NETIF */ |
| 238 | |
| 239 | /** Filter rule */ |
| 240 | #define IPC_FILTER_BY_PROTOCOL (0x0001 << 0) |
| 241 | #define IPC_FILTER_BY_SRC_PORT (0x0001 << 1) |
| 242 | #define IPC_FILTER_BY_DST_PORT (0x0001 << 2) |
| 243 | #define IPC_FILTER_BY_SRC_IPV4 (0x0001 << 3) |
| 244 | #define IPC_FILTER_BY_DST_IPV4 (0x0001 << 4) |
| 245 | #define IPC_FILTER_BY_SRC_IPV6 (0x0001 << 5) |
| 246 | #define IPC_FILTER_BY_DST_IPV6 (0x0001 << 6) |
| 247 | #define IPC_FILTER_BY_ICMPV4_TYPE (0x0001 << 7) |
| 248 | #define IPC_FILTER_BY_ICMPV6_TYPE (0x0001 << 8) |
| 249 | #define IPC_FILTER_BY_EBI (0x0001 << 9) |
| 250 | #define IPC_FILTER_BY_PDN_ID (0x0001 << 10) |
| 251 | #define IPC_FILTER_BY_NETIF_ID (0x0001 << 11) |
| 252 | #define IPC_FILTER_BY_TCP_FLAGS (0x0001 << 12) |
| 253 | #define IPC_FILTER_BY_SPI (0x0001 << 13) |
| 254 | |
| 255 | /** Network interface ID. */ |
| 256 | typedef enum _ipc_netif_id_e { |
| 257 | IPC_NETIF_ID_CCMNI_BEGIN = 0x00000000, |
| 258 | IPC_NETIF_ID_CCMNI_END = 0x000000ff, |
| 259 | IPC_NETIF_ID_ETH_BEGIN = 0x00000100, |
| 260 | IPC_NETIF_ID_ETH_END = 0x000001ff, |
| 261 | IPC_NETIF_ID_MBIM_BEGIN = 0x00000200, |
| 262 | IPC_NETIF_ID_MBIM_END = 0x000002ff, |
| 263 | IPC_NETIF_ID_PPP_BEGIN = 0x00000300, |
| 264 | IPC_NETIF_ID_PPP_END = 0x000003ff, |
| 265 | IPC_NETIF_ID_LHIF_BEGIN = 0x00000400, |
| 266 | IPC_NETIF_ID_LHIF_END = 0x000004ff, |
| 267 | IPC_NETIF_ID_MCIF_BEGIN = 0x00000500, |
| 268 | IPC_NETIF_ID_MCIF_END = 0x000005ff, |
| 269 | IPC_NETIF_ID_VNIF_BEGIN = 0x00000600, |
| 270 | IPC_NETIF_ID_VNIF_END = 0x000006ff, |
| 271 | } ipc_netif_id_e; |
| 272 | |
| 273 | /** IPCore defines netif type for CCMNI Queue Mapping */ |
| 274 | typedef enum _ipc_netif_type_e { |
| 275 | IPC_NETIF_TYPE_NORMAL, |
| 276 | IPC_NETIF_TYPE_LATENCY_CONCERN, |
| 277 | } ipc_netif_type_e; |
| 278 | |
| 279 | /** UL Data Throttling feature option */ |
| 280 | #define IPC_THROTTLE_FEATURE_BLOCK_LANTENCY_CONCERN 0x01 |
| 281 | |
| 282 | /** Gen93 DL DID HIF Type Enum definition */ |
| 283 | typedef enum _ipc_si_hif_type_e { |
| 284 | IPC_SI_HIF_TYPE_LHIF = 0, |
| 285 | IPC_SI_HIF_TYPE_USB = 1, |
| 286 | IPC_SI_HIF_TYPE_MCIF = 2, |
| 287 | IPC_SI_HIF_TYPE_VNIF = 3, |
| 288 | IPC_SI_HIF_TYPE_IGR = 0x7, |
| 289 | IPC_SI_HIF_TYPE_MAX, |
| 290 | } ipc_si_hif_type_e; |
| 291 | |
| 292 | /** Get Packet Info Error Code */ |
| 293 | typedef enum _ipc_packet_info_parser_error_code { |
| 294 | V4_IPV4_HDR_FAILED = 0, |
| 295 | V4_UDP_HDR_FAILED, |
| 296 | V4_TCP_HDR_FAILED, |
| 297 | V4_ICMP_HDR_FAILED, |
| 298 | V4_AH_HDR_FAILED, |
| 299 | V4_ESP_HDR_FAILED, |
| 300 | V6_IPV6_HDR_FAILED, |
| 301 | V6_UDP_HDR_FAILED, |
| 302 | V6_TCP_HDR_FAILED, |
| 303 | V6_ICMP_HDR_FAILED, |
| 304 | V6_EXT_HDR_FAILED, |
| 305 | V6_ESP_HDR_FAILED, |
| 306 | FIND_V6_EXT_HDR_FAILED, |
| 307 | FIND_V6_EXT_HDR_SHIFT_FAILED, |
| 308 | IPC_PACKET_INFO_PARSER_ERROR_CODE_MAX = 0x7fffffff, |
| 309 | } ipc_packet_info_parser_error_code; |
| 310 | |
| 311 | /** IPCore filter_info source descriptor type */ |
| 312 | typedef enum _ipc_fi_desc_type_e { |
| 313 | IPC_FI_DESC_TYPE_DID, |
| 314 | IPC_FI_DESC_TYPE_NONE, |
| 315 | IPC_FI_DESC_TYPE_MAX = 0xffffffff, |
| 316 | } ipc_fi_desc_type_e; |
| 317 | |
| 318 | /** IPCORE UL throttle state enum */ |
| 319 | typedef enum _ipc_ul_throttle_state_e { |
| 320 | IPC_UL_THROTTLE_STATE_NONE, |
| 321 | IPC_UL_THROTTLE_STATE_ACTIVE, |
| 322 | IPC_UL_THROTTLE_STATE_SUSPEND, |
| 323 | } ipc_ul_throttle_state_e; |
| 324 | |
| 325 | /** IPCore notification type definition */ |
| 326 | typedef enum _ipc_ntfy_type_e { |
| 327 | IPC_NTFY_TYPE_INVALID, |
| 328 | IPC_NTFY_TYPE_MIN, |
| 329 | IPC_NTFY_TYPE_ATTACH, |
| 330 | IPC_NTFY_TYPE_DETACH, |
| 331 | IPC_NTFY_TYPE_IP_DOWN, |
| 332 | IPC_NTFY_TYPE_IP_UP, |
| 333 | IPC_NTFY_TYPE_LINK_DOWN, |
| 334 | IPC_NTFY_TYPE_LINK_UP, |
| 335 | IPC_NTFY_TYPE_MAX, |
| 336 | } ipc_ntfy_type_e; |
| 337 | |
| 338 | /** IPCore io request type */ |
| 339 | typedef enum _ipc_io_req_data_path_e { |
| 340 | IPC_NORMAL_DATA_PATH = 0, |
| 341 | IPC_INTERNAL_DATA_PATH, |
| 342 | } ipc_io_req_data_path_e; |
| 343 | |
| 344 | /** |
| 345 | * Backward compatible to kal_bool isGPD in ipc_pkt_t. |
| 346 | * Note that NO_DESC MUST be 0 and GPD MUST be 1. |
| 347 | */ |
| 348 | typedef enum _ipc_pkt_des_type_e { |
| 349 | IPC_PKT_DES_TYPE_NO_DESC = 0, |
| 350 | IPC_PKT_DES_TYPE_GPD = 1, |
| 351 | IPC_PKT_DES_TYPE_SPD, |
| 352 | IPC_PKT_DES_TYPE_META, |
| 353 | IPC_PKT_DES_TYPE_DID, |
| 354 | IPC_PKT_DES_TYPE_MAX, |
| 355 | } ipc_pkt_des_type_e; |
| 356 | |
| 357 | /** IPCore link req type definition */ |
| 358 | typedef enum _ipc_link_req_type_e { |
| 359 | IPC_LINK_REQ_TYPE_NORMAL, |
| 360 | IPC_LINK_REQ_TYPE_DPFM, |
| 361 | } ipc_link_req_type_e; |
| 362 | |
| 363 | /** IPCore data path definition */ |
| 364 | typedef enum _ipc_data_path_direction_e { |
| 365 | DL_DIRECT = 0, |
| 366 | UL_DIRECT |
| 367 | } ipc_data_path_direction_e; |
| 368 | |
| 369 | /** IPCore filter notification type */ |
| 370 | typedef enum _ipc_filter_ntfy_type_e { |
| 371 | IPC_FILTER_NTFY_CBK_FUNC, |
| 372 | IPC_FILTER_NTFY_ILM, |
| 373 | IPC_FILTER_NTFY_CBK_FUNC_WITH_FILTER_INFO, |
| 374 | IPC_FILTER_NTFY_ILM_WITH_FILTER_INFO |
| 375 | } ipc_filter_ntfy_type_e; |
| 376 | |
| 377 | typedef enum _ipc_data_enq_position_e { |
| 378 | IPC_DATA_DID_HEAD = 0, |
| 379 | IPC_DATA_DID_TAIL |
| 380 | } ipc_data_enq_position_e; |
| 381 | |
| 382 | #endif /* __INC_IPC_ENUMS_H */ |