jscript: Create separate script dispatches for each named item.
[wine.git] / include / qos2.h
blobfa2ce80bc2b4e5419cdc6700eea17f9edb917136
1 /*
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__
22 #include <ws2tcpip.h>
23 #include <mstcpip.h>
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
29 typedef ULONG QOS_FLOWID, *PQOS_FLOWID;
31 typedef enum _QOS_SHAPING {
32 QOSShapeOnly,
33 QOSShapeAndMark,
34 QOSUseNonConformantMarkings
35 } QOS_SHAPING, *PQOS_SHAPING;
37 typedef enum _QOS_FLOWRATE_REASON {
38 QOSFlowRateNotApplicable,
39 QOSFlowRateContentChange,
40 QOSFlowRateCongestion,
41 QOSFlowRateHigherContentEncoding,
42 QOSFlowRateUserCaused
43 } QOS_FLOWRATE_REASON, PQOS_FLOWRATE_REASON;
45 typedef enum _QOS_NOTIFY_FLOW {
46 QOSNotifyCongested,
47 QOSNotifyUncongested,
48 QOSNotifyAvailable
49 } QOS_NOTIFY_FLOW, *PQOS_NOTIFY_FLOW;
51 typedef enum _QOS_QUERY_FLOW {
52 QOSQueryFlowFundamentals,
53 QOSQueryPacketPriority,
54 QOSQueryOutgoingRate
55 } QOS_QUERY_FLOW;
57 typedef enum _QOS_SET_FLOW {
58 QOSSetTrafficType,
59 QOSSetOutgoingRate,
60 QOSSetOutgoingDSCPValue
61 } QOS_SET_FLOW, *PQOS_SET_FLOW;
63 typedef enum _QOS_TRAFFIC_TYPE {
64 QOSTrafficTypeBestEffort,
65 QOSTrafficTypeBackground,
66 QOSTrafficTypeExcellentEffort,
67 QOSTrafficTypeAudioVideo,
68 QOSTrafficTypeVoice,
69 QOSTrafficTypeControl
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;
77 BOOL RTTSet;
78 UINT32 RTT;
79 } QOS_FLOW_FUNDAMENTALS, *PQOS_FLOW_FUNDAMENTALS;
81 typedef struct _QOS_FLOWRATE_OUTGOING {
82 UINT64 Bandwidth;
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 {
95 USHORT MajorVersion;
96 USHORT MinorVersion;
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);
120 #ifdef __cplusplus
122 #endif
124 #endif /* __WINE_QOS2_H__ */