3 #ifndef _HOST_MIBSINTERFACE_H
4 #define _HOST_MIBSINTERFACE_H
7 * Copyright (c) 2007 Beceem Communications Pvt. Ltd
8 * File Name: HostMIBSInterface.h
9 * Abstract: This file contains DS used by the Host to update the Host
10 * statistics used for the MIBS.
13 #define MIBS_MAX_CLASSIFIERS 100
14 #define MIBS_MAX_PHSRULES 100
15 #define MIBS_MAX_SERVICEFLOWS 17
16 #define MIBS_MAX_IP_RANGE_LENGTH 4
17 #define MIBS_MAX_PORT_RANGE 4
18 #define MIBS_MAX_PROTOCOL_LENGTH 32
19 #define MIBS_MAX_PHS_LENGTHS 255
20 #define MIBS_IPV6_ADDRESS_SIZEINBYTES 0x10
21 #define MIBS_IP_LENGTH_OF_ADDRESS 4
22 #define MIBS_MAX_HIST_ENTRIES 12
23 #define MIBS_PKTSIZEHIST_RANGE 128
25 typedef union _U_MIBS_IP_ADDRESS
29 //Source Ip Address Range
30 ULONG ulIpv4Addr
[MIBS_MAX_IP_RANGE_LENGTH
];
31 //Source Ip Mask Address Range
32 ULONG ulIpv4Mask
[MIBS_MAX_IP_RANGE_LENGTH
];
36 //Source Ip Address Range
37 ULONG ulIpv6Addr
[MIBS_MAX_IP_RANGE_LENGTH
* 4];
38 //Source Ip Mask Address Range
39 ULONG ulIpv6Mask
[MIBS_MAX_IP_RANGE_LENGTH
* 4];
44 UCHAR ucIpv4Address
[MIBS_MAX_IP_RANGE_LENGTH
*
45 MIBS_IP_LENGTH_OF_ADDRESS
];
46 UCHAR ucIpv4Mask
[MIBS_MAX_IP_RANGE_LENGTH
*
47 MIBS_IP_LENGTH_OF_ADDRESS
];
51 UCHAR ucIpv6Address
[MIBS_MAX_IP_RANGE_LENGTH
* MIBS_IPV6_ADDRESS_SIZEINBYTES
];
52 UCHAR ucIpv6Mask
[MIBS_MAX_IP_RANGE_LENGTH
* MIBS_IPV6_ADDRESS_SIZEINBYTES
];
57 typedef struct _S_MIBS_HOST_INFO
59 ULONG64 GoodTransmits
;
61 // this to keep track of the Tx and Rx MailBox Registers.
63 ULONG CurrNumFreeDesc
;
64 ULONG PrevNumFreeDesc
;
65 // to keep track the no of byte received
66 ULONG PrevNumRcevBytes
;
67 ULONG CurrNumRcevBytes
;
72 ULONG LastTxQueueIndex
;
73 BOOLEAN TxOutofDescriptors
;
76 UINT32 aTxPktSizeHist
[MIBS_MAX_HIST_ENTRIES
];
77 UINT32 aRxPktSizeHist
[MIBS_MAX_HIST_ENTRIES
];
80 typedef struct _S_MIBS_CLASSIFIER_RULE
84 B_UINT16 uiClassifierRuleIndex
;
87 // This field detemines the Classifier Priority
88 B_UINT8 u8ClassifierRulePriority
;
89 U_MIBS_IP_ADDRESS stSrcIpAddress
;
90 /*IP Source Address Length*/
91 UCHAR ucIPSourceAddressLength
;
93 U_MIBS_IP_ADDRESS stDestIpAddress
;
94 /* IP Destination Address Length */
95 UCHAR ucIPDestinationAddressLength
;
96 UCHAR ucIPTypeOfServiceLength
;//Type of service Length
97 UCHAR ucTosLow
;//Tos Low
98 UCHAR ucTosHigh
;//Tos High
99 UCHAR ucTosMask
;//Tos Mask
100 UCHAR ucProtocolLength
;//protocol Length
101 UCHAR ucProtocol
[MIBS_MAX_PROTOCOL_LENGTH
];//protocol Length
102 USHORT usSrcPortRangeLo
[MIBS_MAX_PORT_RANGE
];
103 USHORT usSrcPortRangeHi
[MIBS_MAX_PORT_RANGE
];
104 UCHAR ucSrcPortRangeLength
;
105 USHORT usDestPortRangeLo
[MIBS_MAX_PORT_RANGE
];
106 USHORT usDestPortRangeHi
[MIBS_MAX_PORT_RANGE
];
107 UCHAR ucDestPortRangeLength
;
108 BOOLEAN bProtocolValid
;
110 BOOLEAN bDestIpValid
;
113 BOOLEAN bIpv6Protocol
;
115 }S_MIBS_CLASSIFIER_RULE
;
118 typedef struct _S_MIBS_PHS_RULE
121 /// brief 8bit PHSI Of The Service Flow
123 /// brief PHSF Of The Service Flow
124 B_UINT8 u8PHSFLength
;
125 B_UINT8 u8PHSF
[MIBS_MAX_PHS_LENGTHS
];
126 /// brief PHSM Of The Service Flow
127 B_UINT8 u8PHSMLength
;
128 B_UINT8 u8PHSM
[MIBS_MAX_PHS_LENGTHS
];
129 /// brief 8bit PHSS Of The Service Flow
131 /// brief 8bit PHSV Of The Service Flow
133 // Reserved bytes are 5, so that it is similar to S_PHS_RULE structure.
136 LONG PHSModifiedBytes
;
137 ULONG PHSModifiedNumPackets
;
138 ULONG PHSErrorNumPackets
;
141 typedef struct _S_MIBS_EXTSERVICEFLOW_PARAMETERS
144 UINT32 wmanIfCmnCpsSfState
;
145 UINT32 wmanIfCmnCpsMaxSustainedRate
;
146 UINT32 wmanIfCmnCpsMaxTrafficBurst
;
147 UINT32 wmanIfCmnCpsMinReservedRate
;
148 UINT32 wmanIfCmnCpsToleratedJitter
;
149 UINT32 wmanIfCmnCpsMaxLatency
;
150 UINT32 wmanIfCmnCpsFixedVsVariableSduInd
;
151 UINT32 wmanIfCmnCpsSduSize
;
152 UINT32 wmanIfCmnCpsSfSchedulingType
;
153 UINT32 wmanIfCmnCpsArqEnable
;
154 UINT32 wmanIfCmnCpsArqWindowSize
;
155 UINT32 wmanIfCmnCpsArqBlockLifetime
;
156 UINT32 wmanIfCmnCpsArqSyncLossTimeout
;
157 UINT32 wmanIfCmnCpsArqDeliverInOrder
;
158 UINT32 wmanIfCmnCpsArqRxPurgeTimeout
;
159 UINT32 wmanIfCmnCpsArqBlockSize
;
160 UINT32 wmanIfCmnCpsMinRsvdTolerableRate
;
161 UINT32 wmanIfCmnCpsReqTxPolicy
;
162 UINT32 wmanIfCmnSfCsSpecification
;
163 UINT32 wmanIfCmnCpsTargetSaid
;
165 }S_MIBS_EXTSERVICEFLOW_PARAMETERS
;
168 typedef struct _S_MIBS_SERVICEFLOW_TABLE
170 //classification extension Rule
174 // This field determines the priority of the SF Queues
175 B_UINT8 u8TrafficPriority
;
179 BOOLEAN bActivateRequestSent
;
182 //maximum size of the bucket for the queue
183 UINT uiMaxBucketSize
;
184 UINT uiCurrentQueueDepthOnTarget
;
185 UINT uiCurrentBytesOnHost
;
186 UINT uiCurrentPacketsOnHost
;
187 UINT uiDroppedCountBytes
;
188 UINT uiDroppedCountPackets
;
191 UINT uiCurrentDrainRate
;
192 UINT uiThisPeriodSentBytes
;
193 LARGE_INTEGER liDrainCalculated
;
194 UINT uiCurrentTokenCount
;
195 LARGE_INTEGER liLastUpdateTokenAt
;
196 UINT uiMaxAllowedRate
;
197 UINT NumOfPacketsSent
;
200 S_MIBS_EXTSERVICEFLOW_PARAMETERS stMibsExtServiceFlowTable
;
201 UINT uiCurrentRxRate
;
202 UINT uiThisPeriodRxBytes
;
205 }S_MIBS_SERVICEFLOW_TABLE
;
207 typedef struct _S_MIBS_DROPPED_APP_CNTRL_MESSAGES
210 ULONG cm_control_newdsx_multiclassifier_resp
;
211 ULONG link_control_resp
;
213 ULONG stats_pointer_resp
;
214 ULONG idle_mode_status
;
215 ULONG auth_ss_host_msg
;
216 ULONG low_priority_message
;
218 }S_MIBS_DROPPED_APP_CNTRL_MESSAGES
;
220 typedef struct _S_MIBS_HOST_STATS_MIBS
222 S_MIBS_HOST_INFO stHostInfo
;
223 S_MIBS_CLASSIFIER_RULE astClassifierTable
[MIBS_MAX_CLASSIFIERS
];
224 S_MIBS_SERVICEFLOW_TABLE astSFtable
[MIBS_MAX_SERVICEFLOWS
];
225 S_MIBS_PHS_RULE astPhsRulesTable
[MIBS_MAX_PHSRULES
];
226 S_MIBS_DROPPED_APP_CNTRL_MESSAGES stDroppedAppCntrlMsgs
;
227 }S_MIBS_HOST_STATS_MIBS
;