source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/qos2.h@ 1194

Last change on this file since 1194 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 3.7 KB
Line 
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef _INC_QOS2
7#define _INC_QOS2
8#if (_WIN32_WINNT >= 0x0600)
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13typedef enum _QOS_SHAPING {
14 QOSShapeOnly = 0,
15 QOSShapeAndMark = 1,
16 QOSUseNonConformantMarkings = 2
17} QOS_SHAPING, *PQOS_SHAPING;
18
19typedef enum _QOS_FLOWRATE_REASON {
20 QOSFlowRateNotApplicable = 0,
21 QOSFlowRateContentChange = 1,
22 QOSFlowRateCongestion = 2,
23 QOSFlowRateHigherContentEncoding = 3,
24 QOSFlowRateUserCaused = 4
25} QOS_FLOWRATE_REASON, PQOS_FLOWRATE_REASON;
26
27typedef enum _QOS_NOTIFY_FLOW {
28 QOSNotifyCongested = 0,
29 QOSNotifyUncongested = 1,
30 QOSNotifyAvailable = 2
31} QOS_NOTIFY_FLOW, *PQOS_NOTIFY_FLOW;
32
33typedef enum _QOS_QUERY_FLOW {
34 QOSQueryFlowFundamentals = 0,
35 QOSQueryPacketPriority = 1,
36 QOSQueryOutgoingRate = 2
37} QOS_QUERY_FLOW;
38
39typedef enum _QOS_SET_FLOW {
40 QOSSetTrafficType = 0,
41 QOSSetOutgoingRate = 1,
42 QOSSetOutgoingDSCPValue = 2
43} QOS_SET_FLOW, *PQOS_SET_FLOW;
44
45typedef enum _QOS_TRAFFIC_TYPE {
46 QOSTrafficTypeBestEffort,
47 QOSTrafficTypeBackground,
48 QOSTrafficTypeExcellentEffort,
49 QOSTrafficTypeAudioVideo,
50 QOSTrafficTypeVoice,
51 QOSTrafficTypeControl
52} QOS_TRAFFIC_TYPE, *PQOS_TRAFFIC_TYPE;
53
54typedef struct _QOS_FLOW_FUNDAMENTALS {
55 BOOL BottleneckBandwidthSet;
56 UINT64 BottleneckBandwidth;
57 BOOL AvailableBandwidthSet;
58 UINT64 AvailableBandwidth;
59 BOOL RTTSet;
60 UINT32 RTT;
61} QOS_FLOW_FUNDAMENTALS, *PQOS_FLOW_FUNDAMENTALS;
62
63typedef struct _QOS_FLOWRATE_OUTGOING {
64 UINT64 Bandwidth;
65 QOS_SHAPING ShapingBehavior;
66 QOS_FLOWRATE_REASON Reason;
67} QOS_FLOWRATE_OUTGOING, *PQOS_FLOWRATE_OUTGOING;
68
69typedef struct _QOS_PACKET_PRIORITY {
70 ULONG ConformantDSCPValue;
71 ULONG NonConformantDSCPValue;
72 ULONG ConformantL2Value;
73 ULONG NonConformantL2Value;
74} QOS_PACKET_PRIORITY, *PQOS_PACKET_PRIORITY;
75
76typedef struct _QOS_VERSION {
77 USHORT MajorVersion;
78 USHORT MinorVersion;
79} QOS_VERSION, *PQOS_VERSION;
80
81WINBOOL WINAPI QOSAddSocketToFlow(
82 HANDLE QOSHandle,
83 SOCKET Socket,
84 PSOCKADDR DestAddr,
85 QOS_TRAFFIC_TYPE TrafficType,
86 DWORD Flags,
87 PQOS_FLOWID FlowId
88);
89
90WINBOOL WINAPI QOSCancel(
91 HANDLE QOSHandle,
92 LPOVERLAPPED Overlapped
93);
94
95WINBOOL WINAPI QOSCloseHandle(
96 HANDLE QOSHandle
97);
98
99WINBOOL WINAPI QOSCreateHandle(
100 PQOS_VERSION Version,
101 PHANDLE QOSHandle
102);
103
104WINBOOL WINAPI QOSEnumerateFlows(
105 HANDLE QOSHandle,
106 PULONG Size,
107 PVOID Buffer
108);
109
110WINBOOL WINAPI QOSNotifyFlow(
111 HANDLE QOSHandle,
112 QOS_FLOWID FlowId,
113 QOS_NOTIFY_FLOW Operation,
114 PULONG Size,
115 PVOID Buffer,
116 DWORD Flags,
117 LPOVERLAPPED Overlapped
118);
119
120WINBOOL WINAPI QOSQueryFlow(
121 HANDLE QOSHandle,
122 QOS_FLOWID FlowId,
123 QOS_QUERY_FLOW Operation,
124 PULONG Size,
125 PVOID Buffer,
126 DWORD Flags,
127 LPOVERLAPPED Overlapped
128);
129
130WINBOOL WINAPI QOSRemoveSocketFromFlow(
131 HANDLE QOSHandle,
132 SOCKET Socket,
133 QOS_FLOWID FlowId,
134 DWORD Flags
135);
136
137#define QOSSetTrafficType 0
138#define QOSSetOutgoingRate 1
139#define QOSSetOutgoingDSCPValue 2
140
141typedef UINT32 QOS_FLOWID;
142
143WINBOOL WINAPI QOSSetFlow(
144 HANDLE QOSHandle,
145 QOS_FLOWID FlowId,
146 QOS_SET_FLOW Operation,
147 ULONG Size,
148 PVOID Buffer,
149 DWORD Flags,
150 LPOVERLAPPED Overlapped
151);
152
153WINBOOL WINAPI QOSStartTrackingClient(
154 HANDLE QOSHandle,
155 PSOCKADDR DestAddr,
156 DWORD Flags
157);
158
159WINBOOL WINAPI QOSStopTrackingClient(
160 HANDLE QOSHandle,
161 PSOCKADDR DestAddr,
162 DWORD Flags
163);
164
165#ifdef __cplusplus
166}
167#endif
168#endif /*(_WIN32_WINNT >= 0x0600)*/
169#endif /*_INC_QOS2*/
Note: See TracBrowser for help on using the repository browser.