| /***************************************************************************** |
| * Copyright Statement: |
| * -------------------- |
| * This software is protected by Copyright and the information contained |
| * herein is confidential. The software may not be copied and the information |
| * contained herein may not be used or disclosed except with the written |
| * permission of MediaTek Inc. (C) 2012 |
| * |
| * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES |
| * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") |
| * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON |
| * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, |
| * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF |
| * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. |
| * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE |
| * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR |
| * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH |
| * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO |
| * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S |
| * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. |
| * |
| * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE |
| * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, |
| * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, |
| * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO |
| * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. |
| * |
| * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE |
| * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF |
| * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND |
| * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER |
| * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). |
| * |
| *****************************************************************************/ |
| |
| /******************************************************************************* |
| * Filename: |
| * --------- |
| * nccmni.h |
| * |
| * Project: |
| * -------- |
| * VMOLY |
| * |
| * Description: |
| * ------------ |
| * NCCMNI interface header file |
| * |
| * Author: |
| * ------- |
| * ------- |
| * |
| * ========================================================================== |
| * $Log$ |
| * |
| * 03 23 2020 actory.ou |
| * [MOLY00502858] [Gen97][Gen98] merge ccci channel id/runtime data id |
| * [19NOV][OA][NCCCIDEV] sync TTY/NCCMNI port table |
| * |
| * 02 24 2020 actory.ou |
| * [MOLY00474576] [Gen97] NCCMNI development |
| * [19NOV.DEV][OA] add sending API for proxy to send packet to sAP |
| * |
| * |
| ****************************************************************************/ |
| #ifndef _NCCMNI_IF_H |
| #define _NCCMNI_IF_H |
| |
| #include "tcpip_struct.h" |
| #include "iwlan_public_defs.h" |
| |
| typedef enum{ |
| NCCMNI_NET_IF_MIN = 0, |
| NCCMNI_NET_IF_0 = NCCMNI_NET_IF_MIN, |
| NCCMNI_NET_IF_1, |
| NCCMNI_NET_IF_2, |
| NCCMNI_NET_IF_3, |
| NCCMNI_NET_IF_4, |
| NCCMNI_NET_IF_5, |
| NCCMNI_NET_IF_6, |
| NCCMNI_NET_IF_7, |
| NCCMNI_NET_IF_8, |
| NCCMNI_NET_IF_9, |
| NCCMNI_NET_IF_10, |
| NCCMNI_NET_IF_11, |
| NCCMNI_NET_IF_12, |
| NCCMNI_NET_IF_13, |
| NCCMNI_NET_IF_14, |
| NCCMNI_NET_IF_15, |
| NCCMNI_NET_IF_16, |
| NCCMNI_NET_IF_17, |
| NCCMNI_NET_IF_18, |
| NCCMNI_NET_IF_19, |
| NCCMNI_NET_IF_20, |
| NCCMNI_NET_IF_MAX, |
| NCCMNI_NET_IF_MAXBIT = 0xFF, |
| } NCCMNI_NET_IF_E; |
| |
| typedef enum{ |
| NCCMNI_PACKET_TYPE_BUFFER = 0, //support buffer mode only |
| NCCMNI_PACKET_TYPE_MAX, |
| } NCCMNI_PACKET_TYPE_E; |
| |
| typedef struct{ |
| NCCMNI_PACKET_TYPE_E pkt_type; |
| |
| //if pkt type==NCCMNI_PACKET_TYPE_BUFFER |
| kal_uint8 *p_data; |
| kal_uint32 data_len; |
| } NCCMNI_SEND_PACKET_T; |
| |
| kal_bool nccmni_send_dl_pkt(NCCMNI_SEND_PACKET_T *p_pkt, NCCMNI_NET_IF_E netif_id); |
| |
| //L5 -> NCCMNI |
| |
| #pragma pack(push) |
| #pragma pack(4) |
| // MSG_ID_L5_NCCMNI_REGFILTER_REQ |
| typedef struct{ |
| NCCMNI_NET_IF_E nccmni_net_if; //kal_uint8 |
| kal_uint16 nccmni_seq; |
| kal_uint8 reserve1; |
| kal_uint32 valid_field; //mandatory, a bitmap, refer to IPC_FILTER_BY_XXX |
| kal_uint8 ip_type; //IPC_IP_TYPE_IPV4 or IPC_IP_TYPE_IPV6 |
| kal_uint8 ctrl_protocol; //IPC_HDR_PROT_XXX |
| kal_uint16 src_port; |
| kal_uint16 dst_port; |
| kal_uint16 tcp_flags; //IPC_HDR_TCP_FLAG_XXX |
| kal_uint32 spi; // |
| union{ |
| kal_uint8 addr8[4]; |
| kal_uint32 addr32; |
| } src_ipv4; // Source IPv4 address to filter. |
| union{ |
| kal_uint8 addr8[4]; |
| kal_uint32 addr32; |
| } dst_ipv4; // Destination IPv4 address to filter. |
| |
| union{ |
| kal_uint8 addr8[16]; |
| kal_uint32 addr32[4]; |
| } src_ipv6; // Source IPv6 address to filter. |
| union{ |
| kal_uint8 addr8[16]; |
| kal_uint32 addr32[4]; |
| } dst_ipv6; // Destination IPv6 address to filter. |
| |
| kal_uint8 icmpv4_type; // Type field of ICMPv4 header to filter. |
| kal_uint8 icmpv6_type; // Type field of ICMPv6 header to filter. |
| kal_uint16 reserve2; |
| } l5_nccmni_regfilter_req_struct; |
| #pragma pack(pop) |
| |
| |
| #pragma pack(push) |
| #pragma pack(4) |
| // MSG_ID_L5_NCCMNI_REGFILTER_CNF |
| typedef struct{ |
| NCCMNI_NET_IF_E nccmni_net_if; //kal_uint8 |
| kal_uint16 nccmni_seq; |
| kal_uint8 reserve; |
| kal_int32 filter_id; //>=0: filter id, <0: set failed |
| } l5_nccmni_regfilter_cnf_struct; |
| #pragma pack(pop) |
| |
| |
| #pragma pack(push) |
| #pragma pack(4) |
| // MSG_ID_L5_NCCMNI_DEREGFILTER_REQ |
| typedef struct{ |
| NCCMNI_NET_IF_E nccmni_net_if; //kal_uint8 |
| kal_uint16 nccmni_seq; |
| kal_uint8 reserve; |
| kal_int32 is_deregister_all_filter; //0: deregister the filter id only, 1: deregister all filter |
| kal_int32 filter_id; //filter id to deregister |
| } l5_nccmni_deregfilter_req_struct; |
| #pragma pack(pop) |
| |
| |
| #pragma pack(push) |
| #pragma pack(4) |
| // MSG_ID_L5_NCCMNI_DEREGFILTER_CNF |
| typedef struct{ |
| NCCMNI_NET_IF_E nccmni_net_if; //kal_uint8 |
| kal_uint16 nccmni_seq; |
| kal_uint8 reserve; |
| kal_int32 is_success; //1: success |
| } l5_nccmni_deregfilter_cnf_struct; |
| #pragma pack(pop) |
| |
| |
| // D2 --> NCCMNI |
| |
| #define D2_NCCMNI_REQ_LOCAL_PARA_HDR \ |
| LOCAL_PARA_HDR \ |
| kal_uint32 interface_id; /* transaction id + channel id */ \ |
| iwlan_ran_e ran_type; /* iwlan_ran_e */ |
| |
| // MSG_ID_D2_NCCMNI_ESTABLISHPDN_REQ |
| typedef struct |
| { |
| D2_NCCMNI_REQ_LOCAL_PARA_HDR |
| |
| kal_uint32 netif_id; /* network_interface_id in net_info */ |
| new_ip_info_struct ip_info; |
| kal_bool net_info_present; |
| tcpip_net_info_struct_t net_info; |
| } d2_nccmni_establishpdn_req_struct; |
| |
| // MSG_ID_D2_NCCMNI_DISCONNECTPDN_REQ |
| typedef struct |
| { |
| D2_NCCMNI_REQ_LOCAL_PARA_HDR |
| } d2_nccmni_disconnectpdn_req_struct; |
| |
| // MSG_ID_D2_NCCMNI_IFCHANGE_REQ |
| typedef struct |
| { |
| D2_NCCMNI_REQ_LOCAL_PARA_HDR |
| |
| kal_uint32 event; |
| new_ip_info_struct ip_info; |
| kal_bool net_info_present; |
| tcpip_net_info_struct_t net_info; |
| } d2_nccmni_ifchange_req_struct; |
| |
| |
| // NCCMNI --> D2 |
| typedef enum |
| { |
| NCCMNI_RES_SUCC = 0, |
| NCCMNI_RES_NONE = 1, |
| NCCMNI_RES_FAIL = 2, |
| NCCMNI_RES_MAX = 0x7FFFFFFF, |
| } nccmni_res_enum; |
| |
| |
| #define D2_NCCMNI_CNF_LOCAL_PARA_HDR \ |
| LOCAL_PARA_HDR \ |
| kal_uint32 interface_id; \ |
| nccmni_res_enum res; |
| |
| typedef struct |
| { |
| D2_NCCMNI_CNF_LOCAL_PARA_HDR |
| } d2_nccmni_cnf_struct; |
| |
| |
| // MSG_ID_D2_NCCMNI_ESTABLISHPDN_CNF |
| typedef struct |
| { |
| D2_NCCMNI_CNF_LOCAL_PARA_HDR |
| |
| // kal_uint32 stkif_id; |
| // ipstk_ip_info_struct ipstk_ip_info; |
| } d2_nccmni_establishpdn_cnf_struct; |
| |
| // MSG_ID_D2_NCCMNI_DISCONNECTPDN_CNF |
| typedef struct |
| { |
| D2_NCCMNI_CNF_LOCAL_PARA_HDR |
| |
| // kal_uint32 stkif_id; |
| } d2_nccmni_disconnectpdn_cnf_struct; |
| |
| // MSG_ID_D2_NCCMNI_IFCHANGE_CNF |
| typedef struct |
| { |
| D2_NCCMNI_CNF_LOCAL_PARA_HDR |
| |
| // kal_uint32 stkif_id; |
| // ipstk_ip_info_struct ipstk_ip_info; |
| } d2_nccmni_ifchange_cnf_struct; |
| |
| #endif //#ifndef _NCCMNI_IF_H |