2 * Copyright 2018 Gijs Vermeulen
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_QOS2_H__
20 #define __WINE_QOS2_H__
29 typedef ULONG QOS_FLOWID
, *PQOS_FLOWID
;
31 typedef enum _QOS_SHAPING
{
34 QOSUseNonConformantMarkings
35 } QOS_SHAPING
, *PQOS_SHAPING
;
37 typedef enum _QOS_FLOWRATE_REASON
{
38 QOSFlowRateNotApplicable
,
39 QOSFlowRateContentChange
,
40 QOSFlowRateCongestion
,
41 QOSFlowRateHigherContentEncoding
,
43 } QOS_FLOWRATE_REASON
, PQOS_FLOWRATE_REASON
;
45 typedef enum _QOS_NOTIFY_FLOW
{
49 } QOS_NOTIFY_FLOW
, *PQOS_NOTIFY_FLOW
;
51 typedef enum _QOS_QUERY_FLOW
{
52 QOSQueryFlowFundamentals
,
53 QOSQueryPacketPriority
,
57 typedef enum _QOS_SET_FLOW
{
60 QOSSetOutgoingDSCPValue
61 } QOS_SET_FLOW
, *PQOS_SET_FLOW
;
63 typedef enum _QOS_TRAFFIC_TYPE
{
64 QOSTrafficTypeBestEffort
,
65 QOSTrafficTypeBackground
,
66 QOSTrafficTypeExcellentEffort
,
67 QOSTrafficTypeAudioVideo
,
70 } QOS_TRAFFIC_TYPE
, *PQOS_TRAFFIC_TYPE
;
72 typedef struct _QOS_FLOW_FUNDAMENTALS
{
73 BOOL BottleneckBandwidthSet
;
74 UINT64 BottleneckBandwidth
;
75 BOOL AvailableBandwidthSet
;
76 UINT64 AvailableBandwidth
;
79 } QOS_FLOW_FUNDAMENTALS
, *PQOS_FLOW_FUNDAMENTALS
;
81 typedef struct _QOS_FLOWRATE_OUTGOING
{
83 QOS_SHAPING ShapingBehavior
;
84 QOS_FLOWRATE_REASON Reason
;
85 } QOS_FLOWRATE_OUTGOING
, *PQOS_FLOWRATE_OUTGOING
;
87 typedef struct _QOS_PACKET_PRIORITY
{
88 ULONG ConformantDSCPValue
;
89 ULONG NonConformantDSCPValue
;
90 ULONG ConformantL2Value
;
91 ULONG NonConformantL2Value
;
92 } QOS_PACKET_PRIORITY
, *PQOS_PACKET_PRIORITY
;
94 typedef struct _QOS_VERSION
{
97 } QOS_VERSION
, *PQOS_VERSION
;
99 #define QOS_OUTGOING_DEFAULT_MINIMUM_BANDWIDTH 0xFFFFFFFF
101 #define QOS_QUERYFLOW_FRESH 0x00000001
102 #define QOS_NON_ADAPTIVE_FLOW 0x00000002
104 BOOL WINAPI
QOSAddSocketToFlow(HANDLE handle
, SOCKET socket
, PSOCKADDR addr
,
105 QOS_TRAFFIC_TYPE traffictype
, DWORD flags
, PQOS_FLOWID flowid
);
106 BOOL WINAPI
QOSCancel(HANDLE handle
, LPOVERLAPPED overlap
);
107 BOOL WINAPI
QOSCloseHandle(HANDLE handle
);
108 BOOL WINAPI
QOSCreateHandle(PQOS_VERSION version
, PHANDLE handle
);
109 BOOL WINAPI
QOSEnumerateFlows(HANDLE handle
, PULONG size
, PVOID buffer
);
110 BOOL WINAPI
QOSNotifyFlow(HANDLE handle
, QOS_FLOWID flowid
, QOS_NOTIFY_FLOW op
, PULONG size
,
111 PVOID buffer
, DWORD flags
, LPOVERLAPPED overlap
);
112 BOOL WINAPI
QOSQueryFlow(HANDLE handle
, QOS_FLOWID flowid
, QOS_QUERY_FLOW op
, PULONG size
,
113 PVOID buffer
, DWORD flags
, LPOVERLAPPED overlap
);
114 BOOL WINAPI
QOSRemoveSocketFromFlow(HANDLE handle
, SOCKET socket
, QOS_FLOWID flowid
, DWORD flags
);
115 BOOL WINAPI
QOSSetFlow(HANDLE handle
, QOS_FLOWID flowid
, QOS_SET_FLOW op
, ULONG size
,
116 PVOID buffer
, DWORD flags
, LPOVERLAPPED overlap
);
117 BOOL WINAPI
QOSStartTrackingClient(HANDLE handle
, PSOCKADDR addr
, DWORD flags
);
118 BOOL WINAPI
QOSStopTrackingClient(HANDLE handle
, PSOCKADDR addr
, DWORD flags
);
124 #endif /* __WINE_QOS2_H__ */