GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / include / Common / PHSModule.h
blob3963d2754f48fe715fb36a98e04ce97a692bdd6f
1 /*
2 * PHSModule.h
4 *Copyright (C) 2010 Beceem Communications, Inc.
6 *This program is free software: you can redistribute it and/or modify
7 *it under the terms of the GNU General Public License version 2 as
8 *published by the Free Software Foundation.
10 *This program is distributed in the hope that it will be useful,but
11 *WITHOUT ANY WARRANTY; without even the implied warranty of
12 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 *See the GNU General Public License for more details.
15 *You should have received a copy of the GNU General Public License
16 *along with this program. If not, write to the Free Software Foundation, Inc.,
17 *51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #ifndef BCM_MINIPORT_PHSMODULE_H
23 #define BCM_MINIPORT_PHSMODULE_H
25 int PHSTransmit(PMINI_ADAPTER Adapter,
26 struct sk_buff **pPacket,
27 USHORT Vcid,
28 B_UINT16 uiClassifierRuleID,
29 BOOLEAN bHeaderSuppressionEnabled,
30 PUINT PacketLen,
31 UCHAR bEthCSSupport);
33 int PHSRecieve(PMINI_ADAPTER Adapter,
34 USHORT usVcid,
35 struct sk_buff *packet,
36 UINT *punPacketLen,
37 UCHAR *pucEthernetHdr,
38 UINT
42 void DumpDataPacketHeader(PUCHAR pPkt);
44 void DumpFullPacket(UCHAR *pBuf,UINT nPktLen);
46 void DumpPhsRules(PPHS_DEVICE_EXTENSION pDeviceExtension);
49 int phs_init(PPHS_DEVICE_EXTENSION pPhsdeviceExtension,PMINI_ADAPTER Adapter);
51 void free_phs_serviceflow_rules(S_SERVICEFLOW_TABLE *psServiceFlowRulesTable);
53 int phs_compress(S_PHS_RULE *phs_members,unsigned char *in_buf,
54 unsigned char *out_buf,unsigned int *header_size,UINT *new_header_size );
57 int verify_suppress_phsf(unsigned char *in_buffer,unsigned char *out_buffer,
58 unsigned char *phsf,unsigned char *phsm,unsigned int phss,unsigned int phsv,UINT *new_header_size );
60 int phs_decompress(unsigned char *in_buf,unsigned char *out_buf,\
61 S_PHS_RULE *phs_rules,UINT *header_size);
64 int PhsCleanup(PPHS_DEVICE_EXTENSION pPHSDeviceExt);
66 //Utility Functions
67 ULONG PhsUpdateClassifierRule(void* pvContext,B_UINT16 uiVcid,B_UINT16 uiClsId,S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI );
69 ULONG PhsDeletePHSRule(void* pvContext,B_UINT16 uiVcid,B_UINT8 u8PHSI);
71 ULONG PhsDeleteClassifierRule(void* pvContext, B_UINT16 uiVcid ,B_UINT16 uiClsId);
73 ULONG PhsDeleteSFRules(void* pvContext,B_UINT16 uiVcid) ;
76 ULONG PhsCompress(void* pvContext,
77 B_UINT16 uiVcid,
78 B_UINT16 uiClsId,
79 void *pvInputBuffer,
80 void *pvOutputBuffer,
81 UINT *pOldHeaderSize,
82 UINT *pNewHeaderSize );
84 ULONG PhsDeCompress(void* pvContext,
85 B_UINT16 uiVcid,
86 void *pvInputBuffer,
87 void *pvOutputBuffer,
88 UINT *pInHeaderSize,
89 UINT *pOutHeaderSize);
92 BOOLEAN ValidatePHSRule(S_PHS_RULE *psPhsRule);
94 BOOLEAN ValidatePHSRuleComplete(S_PHS_RULE *psPhsRule);
96 UINT UpdateServiceFlowParams(S_SERVICEFLOW_TABLE *psServiceFlowTable, B_UINT16 uiVcid, B_UINT16 uiNewVcid);
98 UINT GetServiceFlowEntry(S_SERVICEFLOW_TABLE *psServiceFlowTable,B_UINT16 uiVcid,S_SERVICEFLOW_ENTRY **ppstServiceFlowEntry);
100 UINT GetClassifierEntry(S_CLASSIFIER_TABLE *pstClassifierTable,B_UINT32 uiClsid,E_CLASSIFIER_ENTRY_CONTEXT eClsContext, S_CLASSIFIER_ENTRY **ppstClassifierEntry);
102 UINT GetPhsRuleEntry(S_CLASSIFIER_TABLE *pstClassifierTable,B_UINT32 uiPHSI,E_CLASSIFIER_ENTRY_CONTEXT eClsContext,S_PHS_RULE **ppstPhsRule);
105 UINT CreateSFToClassifierRuleMapping(B_UINT16 uiVcid,B_UINT16 uiClsId,S_SERVICEFLOW_TABLE *psServiceFlowTable,S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI);
107 UINT CreateClassiferToPHSRuleMapping(B_UINT16 uiVcid,B_UINT16 uiClsId,S_SERVICEFLOW_ENTRY *pstServiceFlowEntry,S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI);
109 UINT CreateClassifierPHSRule(B_UINT16 uiClsId,S_CLASSIFIER_TABLE *psaClassifiertable ,S_PHS_RULE *psPhsRule,E_CLASSIFIER_ENTRY_CONTEXT eClsContext,B_UINT8 u8AssociatedPHSI);
111 UINT UpdateClassifierPHSRule(B_UINT16 uiClsId,S_CLASSIFIER_ENTRY *pstClassifierEntry,S_CLASSIFIER_TABLE *psaClassifiertable ,S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI);
113 BOOLEAN DerefPhsRule(B_UINT16 uiClsId,S_CLASSIFIER_TABLE *psaClassifiertable,S_PHS_RULE *pstPhsRule);
115 void DumpPhsRules(PPHS_DEVICE_EXTENSION pDeviceExtension);
118 #endif