Qossp.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:28k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4.     qos.h - QoS definitions for NDIS components.
  5. Abstract:
  6.     This module defines the type of objects that can go into the 
  7.     ProviderSpecific buffer in the QOS structure.
  8. Revision History:
  9. --*/
  10. #ifndef __QOSSP_H_
  11. #define __QOSSP_H_
  12. /*
  13.  * Definition of object Types
  14.  *
  15.  *
  16.  * define the values for ObjectType above - RSVP Objects ids start at an 
  17.  * offset from zero to allow for ATM objects that might be defined in the 
  18.  * lower number range.
  19.  */
  20. #define   RSVP_OBJECT_ID_BASE         1000
  21. #define   RSVP_OBJECT_STATUS_INFO     (0x00000000 + RSVP_OBJECT_ID_BASE)
  22.           /* RSVP_STATUS_INFO structure passed */
  23. #define   RSVP_OBJECT_RESERVE_INFO    (0x00000001 + RSVP_OBJECT_ID_BASE)
  24.           /* RSVP_RESERVE_INFO structure passed */
  25. #define   RSVP_OBJECT_ADSPEC          (0x00000002 + RSVP_OBJECT_ID_BASE)
  26.           /* RSVP_ADSPEC structure passed */
  27. #define   RSVP_OBJECT_POLICY_INFO     (0x00000003 + RSVP_OBJECT_ID_BASE)
  28.           /* RSVP POLICY ELEMENT(S) retrieved */
  29. #define   RSVP_OBJECT_FILTERSPEC_LIST (0x00000004 + RSVP_OBJECT_ID_BASE)
  30.           /* RSVP SENDER LIST returned */
  31. /* 
  32.  * IPV4 addressing for RSVP FILTERSPECS
  33.  */
  34. typedef union _IN_ADDR_IPV4 {
  35.     ULONG  Addr;
  36.     UCHAR  AddrBytes[4];
  37. } IN_ADDR_IPV4, *LPIN_ADDR_IPV4;
  38. /*
  39.  * IPV6 addressing for RSVP FILTERSPECS
  40.  */
  41. typedef struct _IN_ADDR_IPV6 {
  42.     UCHAR  Addr[16];               //IPV6 address
  43. } IN_ADDR_IPV6, *LPIN_ADDR_IPV6;
  44. typedef const IN_ADDR_IPV6  *LPCIN_ADDR_IPV6;
  45. /*
  46.  * IPV4 addressing for RSVP FILTERSPECS
  47.  */
  48. typedef struct _RSVP_FILTERSPEC_V4 {
  49.     IN_ADDR_IPV4    Address;
  50.     USHORT          Unused;
  51.     USHORT          Port;
  52. } RSVP_FILTERSPEC_V4, *LPRSVP_FILTERSPEC_V4;
  53. typedef struct _RSVP_FILTERSPEC_V6 {
  54.     IN_ADDR_IPV6    Address;
  55.     USHORT          UnUsed;
  56.     USHORT          Port;
  57. } RSVP_FILTERSPEC_V6, *LPRSVP_FILTERSPEC_V6;
  58. typedef struct _RSVP_FILTERSPEC_V6_FLOW {
  59.     IN_ADDR_IPV6    Address;
  60.     UCHAR           UnUsed;
  61.     UCHAR           FlowLabel[3];
  62. } RSVP_FILTERSPEC_V6_FLOW, *LPRSVP_FILTERSPEC_V6_FLOW;
  63. typedef struct _RSVP_FILTERSPEC_V4_GPI {
  64.     IN_ADDR_IPV4    Address;
  65.     ULONG           GeneralPortId;
  66. } RSVP_FILTERSPEC_V4_GPI, *LPRSVP_FILTERSPEC_V4_GPI;
  67. typedef struct _RSVP_FILTERSPEC_V6_GPI {
  68.     IN_ADDR_IPV6    Address;
  69.     ULONG           GeneralPortId;
  70. } RSVP_FILTERSPEC_V6_GPI, *LPRSVP_FILTERSPEC_V6_GPI;
  71. /*
  72.  * FILTERSPEC TYPES used in making reservations.
  73.  */
  74. typedef enum {
  75.         FILTERSPECV4 = 1,
  76.         FILTERSPECV6,
  77.         FILTERSPECV6_FLOW,
  78.         FILTERSPECV4_GPI,
  79.         FILTERSPECV6_GPI,
  80.         FILTERSPEC_END
  81. } FilterType;
  82. typedef struct _RSVP_FILTERSPEC {
  83.     FilterType   Type;
  84.     union {
  85.         RSVP_FILTERSPEC_V4      FilterSpecV4;
  86.         RSVP_FILTERSPEC_V6      FilterSpecV6;
  87.         RSVP_FILTERSPEC_V6_FLOW FilterSpecV6Flow;
  88.         RSVP_FILTERSPEC_V4_GPI  FilterSpecV4Gpi;
  89.         RSVP_FILTERSPEC_V6_GPI  FilterSpecV6Gpi;
  90.     };
  91. } RSVP_FILTERSPEC, *LPRSVP_FILTERSPEC;
  92. /*
  93.  * FLOWDESCRIPTOR Structure used for specifying one or more
  94.  * Filters per Flowspec.
  95.  */
  96. typedef struct _FLOWDESCRIPTOR {
  97.     FLOWSPEC            FlowSpec;
  98.     ULONG               NumFilters;
  99.     LPRSVP_FILTERSPEC   FilterList;
  100. } FLOWDESCRIPTOR, *LPFLOWDESCRIPTOR;
  101. /*
  102.  * RSVP_POLICY contains undefined policy data.  RSVP transports this
  103.  * data on behalf of the Policy Control component.
  104.  */
  105. typedef struct _RSVP_POLICY {
  106.     USHORT  Len;         /* total length of this element object */
  107.     USHORT  Type;
  108.     UCHAR   Info[4];
  109. } RSVP_POLICY, *LPRSVP_POLICY;
  110. typedef const RSVP_POLICY *LPCRSVP_POLICY;
  111. #define RSVP_POLICY_HDR_LEN    ( sizeof(USHORT) + sizeof(USHORT) )
  112. /*
  113.  * RSVP_POLICY_INFO contains undefined policy element(s) retrieved from RSVP.  
  114.  */
  115. typedef struct _RSVP_POLICY_INFO  {
  116.     QOS_OBJECT_HDR     ObjectHdr;
  117.     ULONG              NumPolicyElement;         /* count of the 
  118.                                                   * number of policy elements */
  119.     RSVP_POLICY        PolicyElement[1];         /* a list of the policy 
  120.                                                   * elements retrieved */
  121. } RSVP_POLICY_INFO, *LPRSVP_POLICY_INFO;
  122. /*
  123.  * RSVP_RESERVE_INFO Structure used for storing RSVP specific
  124.  * information for fine tuning interaction via the Winsock2
  125.  * Generic QoS API via the provider specific buffer. This structure
  126.  * includes the QOS_OBJECT_HDR structure directly
  127.  */
  128. typedef struct _RSVP_RESERVE_INFO {
  129.     QOS_OBJECT_HDR      ObjectHdr;            /* type and length of this object */
  130.     ULONG               Style;                /* RSVP Style (FF,WF,SE) */
  131.     ULONG               ConfirmRequest;       /* Non Zero for Confirm Request (receive only) */
  132.     LPRSVP_POLICY_INFO  PolicyElementList;    /* Points to the set of policy elements */
  133.     ULONG               NumFlowDesc;          /* Number of FlowDesc */
  134.     LPFLOWDESCRIPTOR    FlowDescList;         /* Points to the FlowDesc list */
  135. } RSVP_RESERVE_INFO, *LPRSVP_RESERVE_INFO;
  136. typedef const RSVP_RESERVE_INFO *LPCRSVP_RESERVE_INFO;
  137. /*
  138.  * definitions for the ulStyle in the previous structure
  139.  */
  140. #define RSVP_DEFAULT_STYLE            0x00000000
  141. #define RSVP_WILDCARD_STYLE           0x00000001
  142. #define RSVP_FIXED_FILTER_STYLE       0x00000002
  143. #define RSVP_SHARED_EXPLICIT_STYLE    0x00000003
  144. /*
  145.  * RSVP_STATUS_INFO Structure used for storing RSVP specific
  146.  * error of status indications.  This also serves as a header
  147.  * for additional objects in the provider specific buffer when
  148.  * interacting via Winsock2 Generic QoS API. This structure includes
  149.  * the QOS_OBJECT_COUNT and QOS_OBJECT_HDR structures directly It is
  150.  * expected to be the first structure in the provider specific structure
  151.  * since it includes the QOS_OBJECT_COUNT
  152.  */
  153. typedef struct _RSVP_STATUS_INFO {
  154.     QOS_OBJECT_HDR      ObjectHdr;      /* Object Hdr */
  155.     ULONG               StatusCode;     /* Error or Status Information see 
  156.                                          * Winsock2.h */
  157.     ULONG               ExtendedStatus1;/* Provider specific status extension */
  158.     ULONG               ExtendedStatus2;/* Provider specific status extension */
  159. } RSVP_STATUS_INFO, *LPRSVP_STATUS_INFO;
  160. typedef const RSVP_STATUS_INFO *LPCRSVP_STATUS_INFO;
  161. /*
  162.  * QOS_DestAddr structure -- used for WSAIoctl(SIO_SET_QOS) when we
  163.  * do not want to issue a connect for a sending socket.  The destination
  164.  * address is required so we can generate the session information for
  165.  * RSVP signalling.
  166. */
  167. typedef struct _QOS_DESTADDR {
  168.     QOS_OBJECT_HDR ObjectHdr;                     /* Object header */
  169.     const struct sockaddr *  SocketAddress;       /* Destination socket address */
  170.     ULONG                    SocketAddressLength; /* Length of the address structure */
  171. } QOS_DESTADDR, *LPQOS_DESTADDR;
  172. typedef const QOS_DESTADDR * LPCQOS_DESTADDR;
  173. /*
  174.  * this structure defines the "General Characterization Parameters" contained in
  175.  * the RSVP Adspec object
  176.  */
  177. typedef struct _AD_GENERAL_PARAMS{
  178.     ULONG       IntServAwareHopCount;   /* number of hops that conform to
  179.                                          * Integrated Services requirements */
  180.     ULONG       PathBandwidthEstimate;  /* minimum bandwidth available from 
  181.                                          * sender to receiver */
  182.     ULONG       MinimumLatency;         /* sum of minimum latency of the packet
  183.                                          * forwarding process in routers 
  184.                                          * (in usec)*/
  185.     ULONG       PathMTU;                /* max transmission unit end to end that
  186.                                          * will not incur fragmentation */
  187.     ULONG       Flags;                  /* used to hold break bits.*/
  188. } AD_GENERAL_PARAMS, *LPAD_GENERAL_PARAMS;
  189. /*
  190.  * Minimum Latency may be set to this "undefined" value
  191.  */
  192. #define INDETERMINATE_LATENCY   0xFFFFFFFF;
  193. /*
  194.  * This Flag is used to indicate the existence of a network element not 
  195.  * supporting  QoS control services somewhere in the data path. If this bit 
  196.  * is set in the specific service override then it indicates that that
  197.  * service was not supported at at least one hop.
  198.  */
  199. #define AD_FLAG_BREAK_BIT    0x00000001
  200. /*
  201.  * this structure describes the Guaranteed service parameters
  202.  */
  203. typedef struct _AD_GUARANTEED {
  204.     ULONG       CTotal;
  205.     ULONG       DTotal;
  206.     ULONG       CSum;
  207.     ULONG       DSum;
  208. } AD_GUARANTEED, *LPAD_GUARANTEED;
  209. /*
  210.  * this structure describes the format of the parameter buffer that can be
  211.  * included in the Service_Type structure below.  This structure allows an
  212.  * application to include any valid Int Serv service parameter in the Buffer 
  213.  * value, after providing the Int Serv parameter id in the ParameterId field.
  214.  */
  215. typedef struct _PARAM_BUFFER {
  216.     ULONG   ParameterId;    /* Int Server parameter ID */
  217.     ULONG   Length;         /* total length of this structure 
  218.                              * ( 8 bytes + length of Buffer ) */
  219.     UCHAR   Buffer[1];      /* Paramter itself */
  220. } PARAM_BUFFER, *LPPARAM_BUFFER;
  221. /*
  222.  * this structure contains the service types supported
  223.  */
  224. typedef struct _CONTROL_SERVICE {
  225.     /*
  226.      * the length of this entire structure including the following buffer.  
  227.      * This length value can be added to the ptr to the structure to get the ptr
  228.      * to the next SERVICE_TYPE structure in the list, until the
  229.      * NumberOfServices count has been exhausted.
  230.      */
  231.     ULONG               Length;
  232.     SERVICETYPE         Service;
  233.     AD_GENERAL_PARAMS   Overrides;
  234.     /*
  235.      * service specific information ( controlled load has no service specific 
  236.      * info here )
  237.      */
  238.     union {
  239.         AD_GUARANTEED   Guaranteed;
  240.         PARAM_BUFFER    ParamBuffer[1];     /* allows for other services down 
  241.                                              * the road */
  242.     };
  243. } CONTROL_SERVICE, *LPCONTROL_SERVICE;
  244. /*
  245.  * This structure defines the information which is carried in the Rsvp 
  246.  * Adspec.  This Rsvp object typically indicates which service types are 
  247.  * available ( Controlled Load and/or Guaranteed Service ), if a non-Rsvp
  248.  * hop has been encountered by the Path message, and the minumum MTU along 
  249.  * the path. The services array indicates which services are supported
  250.  */
  251. typedef struct _RSVP_ADSPEC  {
  252.     QOS_OBJECT_HDR     ObjectHdr;
  253.     AD_GENERAL_PARAMS  GeneralParams;      /* contains the general 
  254.                                             * characterization paramters */
  255.     ULONG              NumberOfServices;   /* count of the number of services */
  256.     CONTROL_SERVICE    Services[1];        /* a list of the services 
  257.                                             * supported/requested */
  258. } RSVP_ADSPEC, *LPRSVP_ADSPEC;
  259. //
  260. // Opcode for the SIO_CHK_QOS ioctl
  261. // (specific for the Microsoft QOS Service Provider
  262. //
  263. // Bascially:
  264. //
  265. // SIO_CHK_QOS = _WSAIORW(IOC_VENDOR,1)
  266. //             = mIOC_IN | mIOC_OUT | mIOC_VENDOR | mCOMPANY | ioctl_code
  267. //    where
  268. //         mIOC_IN     = 0x80000000
  269. //         mIOC_OUT    = 0x40000000
  270. //         mIOC_VENDOR = 0x04000000
  271. //         mCOMPANY    = 0x18000000
  272. //         ioctl_code  = 0x00000001
  273. //         
  274. // See WSAIoctl man page for details.
  275. //
  276. #define    mIOC_IN       0x80000000
  277. #define    mIOC_OUT      0x40000000
  278. #define    mIOC_VENDOR   0x04000000
  279. #define    mCOMPANY      0x18000000
  280. #define    ioctl_code    0x00000001
  281. #define SIO_CHK_QOS   mIOC_IN | mIOC_OUT | mIOC_VENDOR | mCOMPANY | ioctl_code
  282. //
  283. // The following may be specified in the input buffer 
  284. // of the SIO_CHK_IOCTL ioctl call 
  285. //
  286. #define QOSSPBASE           50000
  287. #define ALLOWED_TO_SEND_DATA  (QOSSPBASE+1)     // query the SBM/BEST_EFFORT limit 
  288.                                                 //   -- result is based on a comparison between
  289.                                                 //      the user-specified token rate and the
  290.                                                 //      SBM/BEST_EFFORT bandwidth parameters in
  291.                                                 //      the system
  292.                                                 //   -- result is a YES(1) or NO(0) answer
  293.                                                 //      in the output buffer 
  294. #define ABLE_TO_RECV_RSVP     (QOSSPBASE+2)     // query the SBM/BEST_EFFORT limit 
  295.                                                 //   -- result is based on a comparison between
  296.                                                 //      the user-specified token rate and the
  297.                                                 //      SBM/BEST_EFFORT bandwidth parameters in
  298.                                                 //      the system
  299.                                                 //   -- result is a YES(1) or NO(0) answer
  300.                                                 //      in the output buffer 
  301. #define LINE_RATE             (QOSSPBASE+3)     // query the interface capacity 
  302.                                                 //   -- result returned in the output buffer
  303.                                                 //      in kilo-bits per second
  304. #define LOCAL_TRAFFIC_CONTROL (QOSSPBASE+4)     // check if Kernel Traffic Control is available or not
  305.                                                 //   -- 0 if not available
  306.                                                 //   -- 1 if avaiable
  307.                                                 //   -- INFO_NOT_AVAILABLE if there is no way to check
  308. #define LOCAL_QOSABILITY      (QOSSPBASE+5)     // The followings are for 
  309.                                                 // the Discovery of Local QOSability
  310.                                                 //   -- 0 if no local QOS support
  311.                                                 //   -- 1 if local QOS support available
  312.                                                 //   -- INFO_NOT_AVAILABLE if there is no way to check
  313. #define END_TO_END_QOSABILITY (QOSSPBASE+6)     // The followings are for 
  314.                                                 // the Discovery of End-to-End QOSability
  315.                                                 //   -- 0 if no end-to-end QOS support
  316.                                                 //   -- 1 if end-to-end QOS support available
  317.                                                 //   -- INFO_NOT_AVAILABLE if there is no way to check
  318. #define INFO_NOT_AVAILABLE  0xFFFFFFFF          // used when LINE_RATE is not known
  319. #define ANY_DEST_ADDR       0xFFFFFFFF          // for QOS_OBJECT_DEST_ADDR
  320. // The followings are for Guaranteed_Service+Latency -> ISSLOW_Traffic_Class Mapping
  321. #define MODERATELY_DELAY_SENSITIVE   0xFFFFFFFD  
  322. #define HIGHLY_DELAY_SENSITIVE       0xFFFFFFFE
  323. //
  324. // QOSSP Error Code/Value
  325. //
  326. #define QOSSP_ERR_BASE                                 (QOSSPBASE+6000)
  327. // No error
  328. #define GQOS_NO_ERRORCODE                              (0)
  329. #define GQOS_NO_ERRORVALUE                             (0)
  330. // Unknown error
  331. #define GQOS_ERRORCODE_UNKNOWN                         (0xFFFFFFFF)
  332. #define GQOS_ERRORVALUE_UNKNOWN                        (0xFFFFFFFF)
  333. // Admission (Resource) Error
  334. #define GQOS_NET_ADMISSION                             (QOSSP_ERR_BASE+100)
  335. #define GQOS_OTHER                                     (QOSSP_ERR_BASE+100+1)
  336. #define GQOS_DELAYBND                                  (QOSSP_ERR_BASE+100+2)
  337. #define GQOS_BANDWIDTH                                 (QOSSP_ERR_BASE+100+3)
  338. #define GQOS_MTU                                       (QOSSP_ERR_BASE+100+4)
  339. #define GQOS_FLOW_RATE                                 (QOSSP_ERR_BASE+100+5)
  340. #define GQOS_PEAK_RATE                                 (QOSSP_ERR_BASE+100+6)
  341. #define GQOS_AGG_PEAK_RATE                             (QOSSP_ERR_BASE+100+7)
  342. // Policy Error
  343. #define GQOS_NET_POLICY                                (QOSSP_ERR_BASE+200)
  344. #define GQOS_POLICY_ERROR_UNKNOWN                      (QOSSP_ERR_BASE+200+0)
  345. #define GQOS_POLICY_GLOBAL_DEF_FLOW_COUNT              (QOSSP_ERR_BASE+200+1)
  346. #define GQOS_POLICY_GLOBAL_GRP_FLOW_COUNT              (QOSSP_ERR_BASE+200+2)
  347. #define GQOS_POLICY_GLOBAL_USER_FLOW_COUNT             (QOSSP_ERR_BASE+200+3)
  348. #define GQOS_POLICY_GLOBAL_UNK_USER_FLOW_COUNT         (QOSSP_ERR_BASE+200+4)
  349. #define GQOS_POLICY_SUBNET_DEF_FLOW_COUNT              (QOSSP_ERR_BASE+200+5)
  350. #define GQOS_POLICY_SUBNET_GRP_FLOW_COUNT              (QOSSP_ERR_BASE+200+6)
  351. #define GQOS_POLICY_SUBNET_USER_FLOW_COUNT             (QOSSP_ERR_BASE+200+7)
  352. #define GQOS_POLICY_SUBNET_UNK_USER_FLOW_COUNT         (QOSSP_ERR_BASE+200+8)
  353. #define GQOS_POLICY_GLOBAL_DEF_FLOW_DURATION           (QOSSP_ERR_BASE+200+9)
  354. #define GQOS_POLICY_GLOBAL_GRP_FLOW_DURATION           (QOSSP_ERR_BASE+200+10)
  355. #define GQOS_POLICY_GLOBAL_USER_FLOW_DURATION          (QOSSP_ERR_BASE+200+11)
  356. #define GQOS_POLICY_GLOBAL_UNK_USER_FLOW_DURATION      (QOSSP_ERR_BASE+200+12)
  357. #define GQOS_POLICY_SUBNET_DEF_FLOW_DURATION           (QOSSP_ERR_BASE+200+13)
  358. #define GQOS_POLICY_SUBNET_GRP_FLOW_DURATION           (QOSSP_ERR_BASE+200+14) 
  359. #define GQOS_POLICY_SUBNET_USER_FLOW_DURATION          (QOSSP_ERR_BASE+200+15)
  360. #define GQOS_POLICY_SUBNET_UNK_USER_FLOW_DURATION      (QOSSP_ERR_BASE+200+16)
  361. #define GQOS_POLICY_GLOBAL_DEF_FLOW_RATE               (QOSSP_ERR_BASE+200+17)
  362. #define GQOS_POLICY_GLOBAL_GRP_FLOW_RATE               (QOSSP_ERR_BASE+200+18)
  363. #define GQOS_POLICY_GLOBAL_USER_FLOW_RATE              (QOSSP_ERR_BASE+200+19)
  364. #define GQOS_POLICY_GLOBAL_UNK_USER_FLOW_RATE          (QOSSP_ERR_BASE+200+20)
  365. #define GQOS_POLICY_SUBNET_DEF_FLOW_RATE               (QOSSP_ERR_BASE+200+21)
  366. #define GQOS_POLICY_SUBNET_GRP_FLOW_RATE               (QOSSP_ERR_BASE+200+22)
  367. #define GQOS_POLICY_SUBNET_USER_FLOW_RATE              (QOSSP_ERR_BASE+200+23)
  368. #define GQOS_POLICY_SUBNET_UNK_USER_FLOW_RATE          (QOSSP_ERR_BASE+200+24)
  369. #define GQOS_POLICY_GLOBAL_DEF_PEAK_RATE               (QOSSP_ERR_BASE+200+25)
  370. #define GQOS_POLICY_GLOBAL_GRP_PEAK_RATE               (QOSSP_ERR_BASE+200+26)
  371. #define GQOS_POLICY_GLOBAL_USER_PEAK_RATE              (QOSSP_ERR_BASE+200+27)
  372. #define GQOS_POLICY_GLOBAL_UNK_USER_PEAK_RATE          (QOSSP_ERR_BASE+200+28)
  373. #define GQOS_POLICY_SUBNET_DEF_PEAK_RATE               (QOSSP_ERR_BASE+200+29)
  374. #define GQOS_POLICY_SUBNET_GRP_PEAK_RATE               (QOSSP_ERR_BASE+200+30)
  375. #define GQOS_POLICY_SUBNET_USER_PEAK_RATE              (QOSSP_ERR_BASE+200+31)
  376. #define GQOS_POLICY_SUBNET_UNK_USER_PEAK_RATE          (QOSSP_ERR_BASE+200+32)
  377. #define GQOS_POLICY_GLOBAL_DEF_SUM_FLOW_RATE           (QOSSP_ERR_BASE+200+33)
  378. #define GQOS_POLICY_GLOBAL_GRP_SUM_FLOW_RATE           (QOSSP_ERR_BASE+200+34)
  379. #define GQOS_POLICY_GLOBAL_USER_SUM_FLOW_RATE          (QOSSP_ERR_BASE+200+35)
  380. #define GQOS_POLICY_GLOBAL_UNK_USER_SUM_FLOW_RATE      (QOSSP_ERR_BASE+200+36)
  381. #define GQOS_POLICY_SUBNET_DEF_SUM_FLOW_RATE           (QOSSP_ERR_BASE+200+37)
  382. #define GQOS_POLICY_SUBNET_GRP_SUM_FLOW_RATE           (QOSSP_ERR_BASE+200+38)
  383. #define GQOS_POLICY_SUBNET_USER_SUM_FLOW_RATE          (QOSSP_ERR_BASE+200+39)
  384. #define GQOS_POLICY_SUBNET_UNK_USER_SUM_FLOW_RATE      (QOSSP_ERR_BASE+200+40)
  385. #define GQOS_POLICY_GLOBAL_DEF_SUM_PEAK_RATE           (QOSSP_ERR_BASE+200+41)
  386. #define GQOS_POLICY_GLOBAL_GRP_SUM_PEAK_RATE           (QOSSP_ERR_BASE+200+42)
  387. #define GQOS_POLICY_GLOBAL_USER_SUM_PEAK_RATE          (QOSSP_ERR_BASE+200+43)
  388. #define GQOS_POLICY_GLOBAL_UNK_USER_SUM_PEAK_RATE      (QOSSP_ERR_BASE+200+44)
  389. #define GQOS_POLICY_SUBNET_DEF_SUM_PEAK_RATE           (QOSSP_ERR_BASE+200+45)
  390. #define GQOS_POLICY_SUBNET_GRP_SUM_PEAK_RATE           (QOSSP_ERR_BASE+200+46)
  391. #define GQOS_POLICY_SUBNET_USER_SUM_PEAK_RATE          (QOSSP_ERR_BASE+200+47)
  392. #define GQOS_POLICY_SUBNET_UNK_USER_SUM_PEAK_RATE      (QOSSP_ERR_BASE+200+48)
  393. #define GQOS_POLICY_UNKNOWN_USER                       (QOSSP_ERR_BASE+200+49)
  394. #define GQOS_POLICY_NO_PRIVILEGES                      (QOSSP_ERR_BASE+200+50)
  395. #define GQOS_POLICY_EXPIRED_USER_TOKEN                 (QOSSP_ERR_BASE+200+51)
  396. #define GQOS_POLICY_NO_RESOURCES                       (QOSSP_ERR_BASE+200+52)
  397. #define GQOS_POLICY_PRE_EMPTED                         (QOSSP_ERR_BASE+200+53)
  398. #define GQOS_POLICY_USER_CHANGED                       (QOSSP_ERR_BASE+200+54)
  399. #define GQOS_POLICY_NO_ACCEPTS                         (QOSSP_ERR_BASE+200+55)
  400. #define GQOS_POLICY_NO_MEMORY                          (QOSSP_ERR_BASE+200+56)
  401. #define GQOS_POLICY_CRAZY_FLOWSPEC                     (QOSSP_ERR_BASE+200+57)
  402. #define GQOS_POLICY_NO_MORE_INFO                       (QOSSP_ERR_BASE+200+58)
  403. #define GQOS_POLICY_UNSUPPORTED_CREDENTIAL_TYPE        (QOSSP_ERR_BASE+200+59)
  404. #define GQOS_POLICY_INSUFFICIENT_PRIVILEGES            (QOSSP_ERR_BASE+200+60)
  405. #define GQOS_POLICY_EXPIRED_CREDENTIAL                 (QOSSP_ERR_BASE+200+61)
  406. #define GQOS_POLICY_IDENTITY_CHANGED                   (QOSSP_ERR_BASE+200+62)
  407. #define GQOS_POLICY_NO_QOS_PROVIDED                    (QOSSP_ERR_BASE+200+63)
  408. #define GQOS_POLICY_DO_NOT_SEND                        (QOSSP_ERR_BASE+200+64)
  409. #define GQOS_POLICY_ERROR_USERID                       (QOSSP_ERR_BASE+200+99)
  410. // RSVP Error
  411. #define GQOS_RSVP                                      (QOSSP_ERR_BASE+300)
  412. #define GQOS_NO_PATH                                   (QOSSP_ERR_BASE+300+1)
  413. #define GQOS_NO_SENDER                                 (QOSSP_ERR_BASE+300+2)
  414. #define GQOS_BAD_STYLE                                 (QOSSP_ERR_BASE+300+3)
  415. #define GQOS_UNKNOWN_STYLE                             (QOSSP_ERR_BASE+300+4)
  416. #define GQOS_BAD_DSTPORT                               (QOSSP_ERR_BASE+300+5) 
  417. #define GQOS_BAD_SNDPORT                               (QOSSP_ERR_BASE+300+6)
  418. #define GQOS_AMBIG_FILTER                              (QOSSP_ERR_BASE+300+7)
  419. #define GQOS_PREEMPTED                                 (QOSSP_ERR_BASE+300+8)
  420. #define GQOS_UNKN_OBJ_CLASS                            (QOSSP_ERR_BASE+300+9)
  421. #define GQOS_UNKNOWN_CTYPE                             (QOSSP_ERR_BASE+300+10)
  422. #define GQOS_INVALID                                   (QOSSP_ERR_BASE+300+11)
  423. // API Error
  424. #define GQOS_API                                       (QOSSP_ERR_BASE+400)
  425. #define GQOS_API_BADSEND                               (QOSSP_ERR_BASE+400+1) /* Sender addr not my interface */
  426. #define GQOS_API_BADRECV                               (QOSSP_ERR_BASE+400+2) /* Recv addr not my interface */
  427. #define GQOS_API_BADSPORT                              (QOSSP_ERR_BASE+400+3) /* Sport !=0 but Dport == 0 */
  428. // TC System Error
  429. #define GQOS_KERNEL_TC_SYS                             (QOSSP_ERR_BASE+500)
  430. #define GQOS_TC_GENERIC                                (QOSSP_ERR_BASE+500+1)
  431. #define GQOS_TC_INVALID                                (QOSSP_ERR_BASE+500+2)
  432. #define GQOS_NO_MEMORY                                 (QOSSP_ERR_BASE+500+3)
  433. #define GQOS_BAD_ADDRESSTYPE                           (QOSSP_ERR_BASE+500+4) 
  434. #define GQOS_BAD_DUPLICATE                             (QOSSP_ERR_BASE+500+5)
  435. #define GQOS_CONFLICT                                  (QOSSP_ERR_BASE+500+6)
  436. #define GQOS_NOTREADY                                  (QOSSP_ERR_BASE+500+7)
  437. #define GQOS_WOULDBLOCK                                (QOSSP_ERR_BASE+500+8)
  438. #define GQOS_INCOMPATIBLE                              (QOSSP_ERR_BASE+500+9)
  439. #define GQOS_BAD_SDMODE                                (QOSSP_ERR_BASE+500+10)
  440. #define GQOS_BAD_QOSPRIORITY                           (QOSSP_ERR_BASE+500+11)
  441. #define GQOS_BAD_TRAFFICCLASS                          (QOSSP_ERR_BASE+500+12)
  442. #define GQOS_NO_SYS_RESOURCES                          (QOSSP_ERR_BASE+500+13)
  443. // RSVP System Error
  444. #define GQOS_RSVP_SYS                                  (QOSSP_ERR_BASE+600)
  445. #define GQOS_OTHER_SYS                                 (QOSSP_ERR_BASE+600+1)
  446. #define GQOS_MEMORY_SYS                                (QOSSP_ERR_BASE+600+2)
  447. #define GQOS_API_SYS                                   (QOSSP_ERR_BASE+600+3)
  448. #define GQOS_SETQOS_NO_LOCAL_APPS                      (QOSSP_ERR_BASE+600+4)
  449. // TC Error
  450. #define GQOS_KERNEL_TC                                 (QOSSP_ERR_BASE+700)
  451. #define GQOS_CONFLICT_SERV                             (QOSSP_ERR_BASE+700+1)
  452. #define GQOS_NO_SERV                                   (QOSSP_ERR_BASE+700+2)
  453. #define GQOS_BAD_FLOWSPEC                              (QOSSP_ERR_BASE+700+3)
  454. #define GQOS_BAD_TSPEC                                 (QOSSP_ERR_BASE+700+4)
  455. #define GQOS_BAD_ADSPEC                                (QOSSP_ERR_BASE+700+5)
  456. // GQOS API ERRORS
  457. // WSAIoctl Error
  458. #define GQOS_IOCTL_SYSTEMFAILURE                       (QOSSP_ERR_BASE+800+1)
  459. #define GQOS_IOCTL_NOBYTESRETURNED                     (QOSSP_ERR_BASE+800+2)
  460. #define GQOS_IOCTL_INVALIDSOCKET                       (QOSSP_ERR_BASE+800+3)
  461. #define GQOS_IOCTL_INV_FUNCPTR                         (QOSSP_ERR_BASE+800+4)
  462. #define GQOS_IOCTL_INV_OVERLAPPED                      (QOSSP_ERR_BASE+800+5)
  463. // SIO_SET_QOS error
  464. #define GQOS_SETQOS_BADINBUFFER                        (QOSSP_ERR_BASE+810+1)
  465. #define GQOS_SETQOS_BADFLOWSPEC                        (QOSSP_ERR_BASE+810+2)
  466. #define GQOS_SETQOS_COLLISION                          (QOSSP_ERR_BASE+810+3)
  467. #define GQOS_SETQOS_BADPROVSPECBUF                     (QOSSP_ERR_BASE+810+4)
  468. #define GQOS_SETQOS_ILLEGALOP                          (QOSSP_ERR_BASE+810+5)
  469. #define GQOS_SETQOS_INVALIDADDRESS                     (QOSSP_ERR_BASE+810+6)
  470. #define GQOS_SETQOS_OUTOFMEMORY                        (QOSSP_ERR_BASE+810+7)
  471. #define GQOS_SETQOS_EXCEPTION                          (QOSSP_ERR_BASE+810+8)
  472. #define GQOS_SETQOS_BADADDRLEN                         (QOSSP_ERR_BASE+810+9)
  473. #define GQOS_SETQOS_NOSOCKNAME                         (QOSSP_ERR_BASE+810+10)
  474. #define GQOS_SETQOS_IPTOSFAIL                          (QOSSP_ERR_BASE+810+11)
  475. #define GQOS_SETQOS_OPENSESSIONFAIL                    (QOSSP_ERR_BASE+810+12)
  476. #define GQOS_SETQOS_SENDFAIL                           (QOSSP_ERR_BASE+810+13)
  477. #define GQOS_SETQOS_RECVFAIL                           (QOSSP_ERR_BASE+810+14)
  478. #define GQOS_SETQOS_BADPOLICYOBJECT                    (QOSSP_ERR_BASE+810+15)
  479. #define GQOS_SETQOS_UNKNOWNFILTEROBJ                   (QOSSP_ERR_BASE+810+16)
  480. #define GQOS_SETQOS_BADFILTERTYPE                      (QOSSP_ERR_BASE+810+17)
  481. #define GQOS_SETQOS_BADFILTERCOUNT                     (QOSSP_ERR_BASE+810+18)
  482. #define GQOS_SETQOS_BADOBJLENGTH                       (QOSSP_ERR_BASE+810+19)
  483. #define GQOS_SETQOS_BADFLOWCOUNT                       (QOSSP_ERR_BASE+810+20)
  484. #define GQOS_SETQOS_UNKNOWNPSOBJ                       (QOSSP_ERR_BASE+810+21)
  485. #define GQOS_SETQOS_BADPOLICYOBJ                       (QOSSP_ERR_BASE+810+22)
  486. #define GQOS_SETQOS_BADFLOWDESC                        (QOSSP_ERR_BASE+810+23)
  487. #define GQOS_SETQOS_BADPROVSPECOBJ                     (QOSSP_ERR_BASE+810+24)
  488. #define GQOS_SETQOS_NOLOOPBACK                         (QOSSP_ERR_BASE+810+25)
  489. #define GQOS_SETQOS_MODENOTSUPPORTED                   (QOSSP_ERR_BASE+810+26)
  490. #define GQOS_SETQOS_MISSINGFLOWDESC                    (QOSSP_ERR_BASE+810+27)
  491. // SIO_GET_QOS error
  492. #define GQOS_GETQOS_BADOUTBUFFER                       (QOSSP_ERR_BASE+840+1)
  493. #define GQOS_GETQOS_SYSTEMFAILURE                      (QOSSP_ERR_BASE+840+2)
  494. #define GQOS_GETQOS_EXCEPTION                          (QOSSP_ERR_BASE+840+3)
  495. #define GQOS_GETQOS_INTERNALFAILURE                    (QOSSP_ERR_BASE+840+4)
  496. // SIO_CHK_QOS error
  497. #define GQOS_CHKQOS_BADINBUFFER                        (QOSSP_ERR_BASE+850+1)
  498. #define GQOS_CHKQOS_BADOUTBUFFER                       (QOSSP_ERR_BASE+850+2)
  499. #define GQOS_CHKQOS_SYSTEMFAILURE                      (QOSSP_ERR_BASE+850+3)
  500. #define GQOS_CHKQOS_INTERNALFAILURE                    (QOSSP_ERR_BASE+850+4)
  501. #define GQOS_CHKQOS_BADPARAMETER                       (QOSSP_ERR_BASE+850+5)
  502. #define GQOS_CHKQOS_EXCEPTION                          (QOSSP_ERR_BASE+850+6)
  503. #endif  /* __QOSSP_H_ */