| /***************************************************************************** |
| * 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) 2014 |
| * |
| * 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: |
| * --------- |
| * pfm_struct.h |
| * |
| * Project: |
| * -------- |
| * MOLY |
| * |
| * Description: |
| * ------------ |
| * Packet Filter Manager ILM structure and interface definition. |
| * |
| * Author: |
| * ------- |
| * ------- |
| * |
| *============================================================================== |
| * HISTORY |
| * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| *------------------------------------------------------------------------------ |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| *------------------------------------------------------------------------------ |
| * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| *============================================================================== |
| *******************************************************************************/ |
| #ifndef __INC_PFM_STRUCT_H |
| #define __INC_PFM_STRUCT_H |
| |
| #include "hif_ior.h" |
| |
| /* |
| * Callback function to process the IP datagram filtered. |
| * |
| * @param packet [IN] Packet buffer. |
| * @param packet_len [IN] Packet len. |
| * @param pfm_filter_id [IN] PFM Filter id of matched packet. |
| * @param priv_data [IN] optional data. |
| */ |
| typedef void (*pfm_garbage_str_wake_type_pkt_f)(const kal_uint8 *packet, |
| kal_int32 packet_len, |
| kal_int32 pfm_filter_id, |
| void* priv_data); |
| |
| /* |
| * Local parameter structure for MSG_ID_PFM_REGISTER_FILTER_REQ & MSG_ID_PFM_DEREGISTER_FILTER_REQ |
| */ |
| typedef struct _pfm_ip_packet_filter_filter_t { |
| kal_int32 filter_id; |
| kal_uint32 pdn_id; /* L5 invoke UPCM API to transfer from CID to PDN_ID */ |
| /* pdn_id=0 then no need to set filter config, to support all pdn_id(cid=-1) filter*/ |
| kal_uint8 ip_type; |
| kal_uint8 protocol; |
| kal_uint8 reserve[2]; |
| kal_uint16 src_port; |
| kal_uint16 dst_port; |
| kal_uint8 ip_src[16]; /* IP Src: 4bytes / 16 bytes (IPV4/IPV6) */ |
| kal_uint8 ip_dest[16]; /* IP Dest: 4bytes / 16 bytes (IPV4/IPV6) */ |
| kal_uint32 magic_code; |
| } pfm_ip_packet_filter_filter_t; |
| |
| typedef struct _pfm_filter_set_t { |
| LOCAL_PARA_HDR |
| |
| kal_uint32 filter_set_id; |
| kal_int32 filter_cnt; |
| kal_uint32 uplink; |
| } pfm_filter_set_t; |
| |
| #define PFM_STR_FILTER_MAX_SIZE 192 |
| #define PFM_STR_FILTER_MAX_NUM 16 |
| |
| typedef struct _pfm_str_filter_t { |
| kal_int32 filter_id; |
| kal_uint32 netif_id; |
| kal_uint16 filter_len; |
| kal_uint16 mask_len; |
| kal_uint8 filter[PFM_STR_FILTER_MAX_SIZE]; |
| kal_uint8 mask[PFM_STR_FILTER_MAX_SIZE]; |
| kal_uint32 magic_code; |
| } pfm_str_filter_t; |
| |
| typedef struct _pfm_pcie_state_change_ind_t { |
| LOCAL_PARA_HDR |
| kal_uint32 is_suspend; |
| } pfm_pcie_state_change_ind_struct; |
| |
| /*------------------------------------------------------------------------------ |
| * DHL logging structure |
| *----------------------------------------------------------------------------*/ |
| typedef pfm_filter_set_t pfm_register_filter_req_struct; |
| typedef pfm_filter_set_t pfm_deregister_filter_req_struct; |
| |
| typedef pfm_filter_set_t pfm_register_ip_packet_filter_req_struct; |
| typedef pfm_filter_set_t pfm_deregister_ip_packet_filter_req_struct; |
| |
| #endif /* __INC_PFM_STRUCT_H */ |