HostMIBSInterface.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. #ifndef _HOST_MIBSINTERFACE_H
  2. #define _HOST_MIBSINTERFACE_H
  3. /*
  4. * Copyright (c) 2007 Beceem Communications Pvt. Ltd
  5. * File Name: HostMIBSInterface.h
  6. * Abstract: This file contains DS used by the Host to update the Host
  7. * statistics used for the MIBS.
  8. */
  9. #define MIBS_MAX_CLASSIFIERS 100
  10. #define MIBS_MAX_PHSRULES 100
  11. #define MIBS_MAX_SERVICEFLOWS 17
  12. #define MIBS_MAX_IP_RANGE_LENGTH 4
  13. #define MIBS_MAX_PORT_RANGE 4
  14. #define MIBS_MAX_PROTOCOL_LENGTH 32
  15. #define MIBS_MAX_PHS_LENGTHS 255
  16. #define MIBS_IPV6_ADDRESS_SIZEINBYTES 0x10
  17. #define MIBS_IP_LENGTH_OF_ADDRESS 4
  18. #define MIBS_MAX_HIST_ENTRIES 12
  19. #define MIBS_PKTSIZEHIST_RANGE 128
  20. typedef union _U_MIBS_IP_ADDRESS
  21. {
  22. struct
  23. {
  24. //Source Ip Address Range
  25. ULONG ulIpv4Addr[MIBS_MAX_IP_RANGE_LENGTH];
  26. //Source Ip Mask Address Range
  27. ULONG ulIpv4Mask[MIBS_MAX_IP_RANGE_LENGTH];
  28. };
  29. struct
  30. {
  31. //Source Ip Address Range
  32. ULONG ulIpv6Addr[MIBS_MAX_IP_RANGE_LENGTH * 4];
  33. //Source Ip Mask Address Range
  34. ULONG ulIpv6Mask[MIBS_MAX_IP_RANGE_LENGTH * 4];
  35. };
  36. struct
  37. {
  38. UCHAR ucIpv4Address[MIBS_MAX_IP_RANGE_LENGTH *
  39. MIBS_IP_LENGTH_OF_ADDRESS];
  40. UCHAR ucIpv4Mask[MIBS_MAX_IP_RANGE_LENGTH *
  41. MIBS_IP_LENGTH_OF_ADDRESS];
  42. };
  43. struct
  44. {
  45. UCHAR ucIpv6Address[MIBS_MAX_IP_RANGE_LENGTH * MIBS_IPV6_ADDRESS_SIZEINBYTES];
  46. UCHAR ucIpv6Mask[MIBS_MAX_IP_RANGE_LENGTH * MIBS_IPV6_ADDRESS_SIZEINBYTES];
  47. };
  48. }U_MIBS_IP_ADDRESS;
  49. typedef struct _S_MIBS_HOST_INFO
  50. {
  51. ULONG64 GoodTransmits;
  52. ULONG64 GoodReceives;
  53. // this to keep track of the Tx and Rx MailBox Registers.
  54. ULONG NumDesUsed;
  55. ULONG CurrNumFreeDesc;
  56. ULONG PrevNumFreeDesc;
  57. // to keep track the no of byte received
  58. ULONG PrevNumRcevBytes;
  59. ULONG CurrNumRcevBytes;
  60. /* QOS Related */
  61. ULONG BEBucketSize;
  62. ULONG rtPSBucketSize;
  63. ULONG LastTxQueueIndex;
  64. BOOLEAN TxOutofDescriptors;
  65. BOOLEAN TimerActive;
  66. UINT32 u32TotalDSD;
  67. UINT32 aTxPktSizeHist[MIBS_MAX_HIST_ENTRIES];
  68. UINT32 aRxPktSizeHist[MIBS_MAX_HIST_ENTRIES];
  69. }S_MIBS_HOST_INFO;
  70. typedef struct _S_MIBS_CLASSIFIER_RULE
  71. {
  72. ULONG ulSFID;
  73. UCHAR ucReserved[2];
  74. B_UINT16 uiClassifierRuleIndex;
  75. BOOLEAN bUsed;
  76. USHORT usVCID_Value;
  77. // This field detemines the Classifier Priority
  78. B_UINT8 u8ClassifierRulePriority;
  79. U_MIBS_IP_ADDRESS stSrcIpAddress;
  80. /*IP Source Address Length*/
  81. UCHAR ucIPSourceAddressLength;
  82. U_MIBS_IP_ADDRESS stDestIpAddress;
  83. /* IP Destination Address Length */
  84. UCHAR ucIPDestinationAddressLength;
  85. UCHAR ucIPTypeOfServiceLength;//Type of service Length
  86. UCHAR ucTosLow;//Tos Low
  87. UCHAR ucTosHigh;//Tos High
  88. UCHAR ucTosMask;//Tos Mask
  89. UCHAR ucProtocolLength;//protocol Length
  90. UCHAR ucProtocol[MIBS_MAX_PROTOCOL_LENGTH];//protocol Length
  91. USHORT usSrcPortRangeLo[MIBS_MAX_PORT_RANGE];
  92. USHORT usSrcPortRangeHi[MIBS_MAX_PORT_RANGE];
  93. UCHAR ucSrcPortRangeLength;
  94. USHORT usDestPortRangeLo[MIBS_MAX_PORT_RANGE];
  95. USHORT usDestPortRangeHi[MIBS_MAX_PORT_RANGE];
  96. UCHAR ucDestPortRangeLength;
  97. BOOLEAN bProtocolValid;
  98. BOOLEAN bTOSValid;
  99. BOOLEAN bDestIpValid;
  100. BOOLEAN bSrcIpValid;
  101. UCHAR ucDirection;
  102. BOOLEAN bIpv6Protocol;
  103. UINT32 u32PHSRuleID;
  104. }S_MIBS_CLASSIFIER_RULE;
  105. typedef struct _S_MIBS_PHS_RULE
  106. {
  107. ULONG ulSFID;
  108. /// brief 8bit PHSI Of The Service Flow
  109. B_UINT8 u8PHSI;
  110. /// brief PHSF Of The Service Flow
  111. B_UINT8 u8PHSFLength;
  112. B_UINT8 u8PHSF[MIBS_MAX_PHS_LENGTHS];
  113. /// brief PHSM Of The Service Flow
  114. B_UINT8 u8PHSMLength;
  115. B_UINT8 u8PHSM[MIBS_MAX_PHS_LENGTHS];
  116. /// brief 8bit PHSS Of The Service Flow
  117. B_UINT8 u8PHSS;
  118. /// brief 8bit PHSV Of The Service Flow
  119. B_UINT8 u8PHSV;
  120. // Reserved bytes are 5, so that it is similar to S_PHS_RULE structure.
  121. B_UINT8 reserved[5];
  122. LONG PHSModifiedBytes;
  123. ULONG PHSModifiedNumPackets;
  124. ULONG PHSErrorNumPackets;
  125. }S_MIBS_PHS_RULE;
  126. typedef struct _S_MIBS_EXTSERVICEFLOW_PARAMETERS
  127. {
  128. UINT32 wmanIfSfid;
  129. UINT32 wmanIfCmnCpsSfState;
  130. UINT32 wmanIfCmnCpsMaxSustainedRate;
  131. UINT32 wmanIfCmnCpsMaxTrafficBurst;
  132. UINT32 wmanIfCmnCpsMinReservedRate;
  133. UINT32 wmanIfCmnCpsToleratedJitter;
  134. UINT32 wmanIfCmnCpsMaxLatency;
  135. UINT32 wmanIfCmnCpsFixedVsVariableSduInd;
  136. UINT32 wmanIfCmnCpsSduSize;
  137. UINT32 wmanIfCmnCpsSfSchedulingType;
  138. UINT32 wmanIfCmnCpsArqEnable;
  139. UINT32 wmanIfCmnCpsArqWindowSize;
  140. UINT32 wmanIfCmnCpsArqBlockLifetime;
  141. UINT32 wmanIfCmnCpsArqSyncLossTimeout;
  142. UINT32 wmanIfCmnCpsArqDeliverInOrder;
  143. UINT32 wmanIfCmnCpsArqRxPurgeTimeout;
  144. UINT32 wmanIfCmnCpsArqBlockSize;
  145. UINT32 wmanIfCmnCpsMinRsvdTolerableRate;
  146. UINT32 wmanIfCmnCpsReqTxPolicy;
  147. UINT32 wmanIfCmnSfCsSpecification;
  148. UINT32 wmanIfCmnCpsTargetSaid;
  149. }S_MIBS_EXTSERVICEFLOW_PARAMETERS;
  150. typedef struct _S_MIBS_SERVICEFLOW_TABLE
  151. {
  152. //classification extension Rule
  153. ULONG ulSFID;
  154. USHORT usVCID_Value;
  155. UINT uiThreshold;
  156. // This field determines the priority of the SF Queues
  157. B_UINT8 u8TrafficPriority;
  158. BOOLEAN bValid;
  159. BOOLEAN bActive;
  160. BOOLEAN bActivateRequestSent;
  161. //BE or rtPS
  162. B_UINT8 u8QueueType;
  163. //maximum size of the bucket for the queue
  164. UINT uiMaxBucketSize;
  165. UINT uiCurrentQueueDepthOnTarget;
  166. UINT uiCurrentBytesOnHost;
  167. UINT uiCurrentPacketsOnHost;
  168. UINT uiDroppedCountBytes;
  169. UINT uiDroppedCountPackets;
  170. UINT uiSentBytes;
  171. UINT uiSentPackets;
  172. UINT uiCurrentDrainRate;
  173. UINT uiThisPeriodSentBytes;
  174. LARGE_INTEGER liDrainCalculated;
  175. UINT uiCurrentTokenCount;
  176. LARGE_INTEGER liLastUpdateTokenAt;
  177. UINT uiMaxAllowedRate;
  178. UINT NumOfPacketsSent;
  179. UCHAR ucDirection;
  180. USHORT usCID;
  181. S_MIBS_EXTSERVICEFLOW_PARAMETERS stMibsExtServiceFlowTable;
  182. UINT uiCurrentRxRate;
  183. UINT uiThisPeriodRxBytes;
  184. UINT uiTotalRxBytes;
  185. UINT uiTotalTxBytes;
  186. }S_MIBS_SERVICEFLOW_TABLE;
  187. typedef struct _S_MIBS_DROPPED_APP_CNTRL_MESSAGES
  188. {
  189. ULONG cm_responses;
  190. ULONG cm_control_newdsx_multiclassifier_resp;
  191. ULONG link_control_resp;
  192. ULONG status_rsp;
  193. ULONG stats_pointer_resp;
  194. ULONG idle_mode_status;
  195. ULONG auth_ss_host_msg;
  196. ULONG low_priority_message;
  197. }S_MIBS_DROPPED_APP_CNTRL_MESSAGES;
  198. typedef struct _S_MIBS_HOST_STATS_MIBS
  199. {
  200. S_MIBS_HOST_INFO stHostInfo;
  201. S_MIBS_CLASSIFIER_RULE astClassifierTable[MIBS_MAX_CLASSIFIERS];
  202. S_MIBS_SERVICEFLOW_TABLE astSFtable[MIBS_MAX_SERVICEFLOWS];
  203. S_MIBS_PHS_RULE astPhsRulesTable[MIBS_MAX_PHSRULES];
  204. S_MIBS_DROPPED_APP_CNTRL_MESSAGES stDroppedAppCntrlMsgs;
  205. }S_MIBS_HOST_STATS_MIBS;
  206. #endif