xref: /reactos/sdk/include/psdk/qos.h (revision 9393fc32)
1 #pragma once
2 
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6 
7 typedef ULONG SERVICETYPE;
8 
9 #define SERVICETYPE_NOTRAFFIC               0x00000000
10 #define SERVICETYPE_BESTEFFORT              0x00000001
11 #define SERVICETYPE_CONTROLLEDLOAD          0x00000002
12 #define SERVICETYPE_GUARANTEED              0x00000003
13 #define SERVICETYPE_NETWORK_UNAVAILABLE     0x00000004
14 #define SERVICETYPE_GENERAL_INFORMATION     0x00000005
15 #define SERVICETYPE_NOCHANGE                0x00000006
16 #define SERVICETYPE_NONCONFORMING           0x00000009
17 #define SERVICETYPE_NETWORK_CONTROL         0x0000000A
18 #define SERVICETYPE_QUALITATIVE             0x0000000D
19 
20 #define SERVICE_BESTEFFORT                  0x80010000
21 #define SERVICE_CONTROLLEDLOAD              0x80020000
22 #define SERVICE_GUARANTEED                  0x80040000
23 #define SERVICE_QUALITATIVE                 0x80200000
24 
25 #define SERVICE_NO_TRAFFIC_CONTROL          0x81000000
26 
27 #define SERVICE_NO_QOS_SIGNALING            0x40000000
28 
29 #define QOS_NOT_SPECIFIED                   0xFFFFFFFF
30 
31 #define POSITIVE_INFINITY_RATE              0xFFFFFFFE
32 
33 #define QOS_GENERAL_ID_BASE                 2000
34 
35 #define QOS_OBJECT_END_OF_LIST              (0x00000001 + QOS_GENERAL_ID_BASE)
36 #define   QOS_OBJECT_SD_MODE                (0x00000002 + QOS_GENERAL_ID_BASE)
37 #define   QOS_OBJECT_SHAPING_RATE           (0x00000003 + QOS_GENERAL_ID_BASE)
38 #define   QOS_OBJECT_DESTADDR               (0x00000004 + QOS_GENERAL_ID_BASE)
39 
40 #define TC_NONCONF_BORROW                   0
41 #define TC_NONCONF_SHAPE                    1
42 #define TC_NONCONF_DISCARD                  2
43 #define TC_NONCONF_BORROW_PLUS              3
44 
45 typedef struct _flowspec {
46   ULONG TokenRate;
47   ULONG TokenBucketSize;
48   ULONG PeakBandwidth;
49   ULONG Latency;
50   ULONG DelayVariation;
51   SERVICETYPE ServiceType;
52   ULONG MaxSduSize;
53   ULONG MinimumPolicedSize;
54 } FLOWSPEC, *PFLOWSPEC, *LPFLOWSPEC;
55 
56 typedef struct _QOS_OBJECT_HDR {
57   ULONG ObjectType;
58   ULONG ObjectLength;
59 } QOS_OBJECT_HDR, *LPQOS_OBJECT_HDR;
60 
61 typedef struct _QOS_SD_MODE {
62   QOS_OBJECT_HDR ObjectHdr;
63   ULONG ShapeDiscardMode;
64 } QOS_SD_MODE, *LPQOS_SD_MODE;
65 
66 typedef struct _QOS_SHAPING_RATE {
67   QOS_OBJECT_HDR ObjectHdr;
68   ULONG ShapingRate;
69 } QOS_SHAPING_RATE, *LPQOS_SHAPING_RATE;
70 
71 #ifdef __cplusplus
72 }
73 #endif
74