• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/include/Common/
1/*
2* PHSModule.h
3*
4*Copyright (C) 2010 Beceem Communications, Inc.
5*
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.
9*
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.
14*
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.
18*
19*/
20
21
22#ifndef BCM_MINIPORT_PHSMODULE_H
23#define BCM_MINIPORT_PHSMODULE_H
24
25int 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);
32
33int PHSRecieve(PMINI_ADAPTER Adapter,
34					USHORT usVcid,
35					struct sk_buff *packet,
36					UINT *punPacketLen,
37					UCHAR *pucEthernetHdr,
38					UINT
39					);
40
41
42void DumpDataPacketHeader(PUCHAR pPkt);
43
44void DumpFullPacket(UCHAR *pBuf,UINT nPktLen);
45
46void DumpPhsRules(PPHS_DEVICE_EXTENSION pDeviceExtension);
47
48
49int phs_init(PPHS_DEVICE_EXTENSION pPhsdeviceExtension,PMINI_ADAPTER Adapter);
50
51void free_phs_serviceflow_rules(S_SERVICEFLOW_TABLE *psServiceFlowRulesTable);
52
53int phs_compress(S_PHS_RULE   *phs_members,unsigned char *in_buf,
54						unsigned char *out_buf,unsigned int *header_size,UINT *new_header_size );
55
56
57int 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 );
59
60int phs_decompress(unsigned char *in_buf,unsigned char *out_buf,\
61						  S_PHS_RULE   *phs_rules,UINT *header_size);
62
63
64int PhsCleanup(PPHS_DEVICE_EXTENSION pPHSDeviceExt);
65
66//Utility Functions
67ULONG PhsUpdateClassifierRule(void* pvContext,B_UINT16 uiVcid,B_UINT16 uiClsId,S_PHS_RULE *psPhsRule,B_UINT8  u8AssociatedPHSI );
68
69ULONG PhsDeletePHSRule(void* pvContext,B_UINT16 uiVcid,B_UINT8 u8PHSI);
70
71ULONG PhsDeleteClassifierRule(void* pvContext, B_UINT16 uiVcid ,B_UINT16  uiClsId);
72
73ULONG PhsDeleteSFRules(void* pvContext,B_UINT16 uiVcid) ;
74
75
76ULONG PhsCompress(void* pvContext,
77				  B_UINT16 uiVcid,
78				  B_UINT16 uiClsId,
79				  void *pvInputBuffer,
80				  void *pvOutputBuffer,
81				  UINT *pOldHeaderSize,
82				  UINT *pNewHeaderSize );
83
84ULONG PhsDeCompress(void* pvContext,
85				  B_UINT16 uiVcid,
86				  void *pvInputBuffer,
87				  void *pvOutputBuffer,
88				  UINT *pInHeaderSize,
89				  UINT *pOutHeaderSize);
90
91
92BOOLEAN ValidatePHSRule(S_PHS_RULE *psPhsRule);
93
94BOOLEAN ValidatePHSRuleComplete(S_PHS_RULE *psPhsRule);
95
96UINT UpdateServiceFlowParams(S_SERVICEFLOW_TABLE *psServiceFlowTable, B_UINT16 uiVcid, B_UINT16 uiNewVcid);
97
98UINT GetServiceFlowEntry(S_SERVICEFLOW_TABLE *psServiceFlowTable,B_UINT16 uiVcid,S_SERVICEFLOW_ENTRY **ppstServiceFlowEntry);
99
100UINT GetClassifierEntry(S_CLASSIFIER_TABLE *pstClassifierTable,B_UINT32 uiClsid,E_CLASSIFIER_ENTRY_CONTEXT eClsContext, S_CLASSIFIER_ENTRY **ppstClassifierEntry);
101
102UINT GetPhsRuleEntry(S_CLASSIFIER_TABLE *pstClassifierTable,B_UINT32 uiPHSI,E_CLASSIFIER_ENTRY_CONTEXT eClsContext,S_PHS_RULE **ppstPhsRule);
103
104
105UINT CreateSFToClassifierRuleMapping(B_UINT16 uiVcid,B_UINT16  uiClsId,S_SERVICEFLOW_TABLE *psServiceFlowTable,S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI);
106
107UINT CreateClassiferToPHSRuleMapping(B_UINT16 uiVcid,B_UINT16  uiClsId,S_SERVICEFLOW_ENTRY *pstServiceFlowEntry,S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI);
108
109UINT CreateClassifierPHSRule(B_UINT16  uiClsId,S_CLASSIFIER_TABLE *psaClassifiertable ,S_PHS_RULE *psPhsRule,E_CLASSIFIER_ENTRY_CONTEXT eClsContext,B_UINT8 u8AssociatedPHSI);
110
111UINT UpdateClassifierPHSRule(B_UINT16  uiClsId,S_CLASSIFIER_ENTRY *pstClassifierEntry,S_CLASSIFIER_TABLE *psaClassifiertable ,S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI);
112
113BOOLEAN DerefPhsRule(B_UINT16  uiClsId,S_CLASSIFIER_TABLE *psaClassifiertable,S_PHS_RULE *pstPhsRule);
114
115void DumpPhsRules(PPHS_DEVICE_EXTENSION pDeviceExtension);
116
117
118#endif
119