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 / PHSDefines.h
blobba11574ccaaa9c448758fe075f9eab83fa4fd5d3
1 /*
2 * PHSDefines.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_PHS_DEFINES_H
23 #define BCM_PHS_DEFINES_H
25 #define PHS_INVALID_TABLE_INDEX 0xffffffff
27 /************************* MACROS **********************************************/
28 #define PHS_MEM_TAG '_SHP'
32 //PHS Defines
33 #define STATUS_PHS_COMPRESSED 0xa1
34 #define STATUS_PHS_NOCOMPRESSION 0xa2
35 #define APPLY_PHS 1
36 #define MAX_NO_BIT 7
37 #define ZERO_PHSI 0
38 #define VERIFY 0
39 #define SIZE_MULTIPLE_32 4
40 #define UNCOMPRESSED_PACKET 0
41 #define DYNAMIC 0
42 #define SUPPRESS 0x80
43 #define NO_CLASSIFIER_MATCH 0
44 #define SEND_PACKET_UNCOMPRESSED 0
45 #define PHSI_IS_ZERO 0
46 #define PHSI_LEN 1
47 #define ERROR_LEN 0
48 #define PHS_BUFFER_SIZE 1532
51 //#define MAX_PHS_LENGTHS 100
52 #define MAX_PHSRULE_PER_SF 20
53 #define MAX_SERVICEFLOWS 17
55 //PHS Error Defines
56 #define PHS_SUCCESS 0
57 #define ERR_PHS_INVALID_DEVICE_EXETENSION 0x800
58 #define ERR_PHS_INVALID_PHS_RULE 0x801
59 #define ERR_PHS_RULE_ALREADY_EXISTS 0x802
60 #define ERR_SF_MATCH_FAIL 0x803
61 #define ERR_INVALID_CLASSIFIERTABLE_FOR_SF 0x804
62 #define ERR_SFTABLE_FULL 0x805
63 #define ERR_CLSASSIFIER_TABLE_FULL 0x806
64 #define ERR_PHSRULE_MEMALLOC_FAIL 0x807
65 #define ERR_CLSID_MATCH_FAIL 0x808
66 #define ERR_PHSRULE_MATCH_FAIL 0x809
68 typedef struct _S_PHS_RULE
70 /// brief 8bit PHSI Of The Service Flow
71 B_UINT8 u8PHSI;
72 /// brief PHSF Of The Service Flow
73 B_UINT8 u8PHSFLength;
74 B_UINT8 u8PHSF[MAX_PHS_LENGTHS];
75 /// brief PHSM Of The Service Flow
76 B_UINT8 u8PHSMLength;
77 B_UINT8 u8PHSM[MAX_PHS_LENGTHS];
78 /// brief 8bit PHSS Of The Service Flow
79 B_UINT8 u8PHSS;
80 /// brief 8bit PHSV Of The Service Flow
81 B_UINT8 u8PHSV;
82 //Reference Count for this PHS Rule
83 B_UINT8 u8RefCnt;
84 //Flag to Store Unclassified PHS rules only in DL
85 B_UINT8 bUnclassifiedPHSRule;
87 B_UINT8 u8Reserved[3];
89 LONG PHSModifiedBytes;
90 ULONG PHSModifiedNumPackets;
91 ULONG PHSErrorNumPackets;
92 }S_PHS_RULE;
95 typedef enum _E_CLASSIFIER_ENTRY_CONTEXT
97 eActiveClassifierRuleContext,
98 eOldClassifierRuleContext
99 }E_CLASSIFIER_ENTRY_CONTEXT;
101 typedef struct _S_CLASSIFIER_ENTRY
103 B_UINT8 bUsed;
104 B_UINT16 uiClassifierRuleId;
105 B_UINT8 u8PHSI;
106 S_PHS_RULE *pstPhsRule;
107 B_UINT8 bUnclassifiedPHSRule;
109 }S_CLASSIFIER_ENTRY;
112 typedef struct _S_CLASSIFIER_TABLE
114 B_UINT16 uiTotalClassifiers;
115 S_CLASSIFIER_ENTRY stActivePhsRulesList[MAX_PHSRULE_PER_SF];
116 S_CLASSIFIER_ENTRY stOldPhsRulesList[MAX_PHSRULE_PER_SF];
117 B_UINT16 uiOldestPhsRuleIndex;
119 }S_CLASSIFIER_TABLE;
122 typedef struct _S_SERVICEFLOW_ENTRY
124 B_UINT8 bUsed;
125 B_UINT16 uiVcid;
126 S_CLASSIFIER_TABLE *pstClassifierTable;
127 }S_SERVICEFLOW_ENTRY;
129 typedef struct _S_SERVICEFLOW_TABLE
131 B_UINT16 uiTotalServiceFlows;
132 S_SERVICEFLOW_ENTRY stSFList[MAX_SERVICEFLOWS];
134 }S_SERVICEFLOW_TABLE;
137 typedef struct _PHS_DEVICE_EXTENSION
139 /* PHS Specific data*/
140 S_SERVICEFLOW_TABLE *pstServiceFlowPhsRulesTable;
141 void *CompressedTxBuffer;
142 void *UnCompressedRxBuffer;
143 }PHS_DEVICE_EXTENSION,*PPHS_DEVICE_EXTENSION;
146 #endif