qos2.h (6.1.7600.16385-Windows_7.0) | | qos2.h (6.3.9600.17415-Windows_8.1) |
| | |
skipping to change at line 16 | | skipping to change at line 16 |
| | |
qos2.h | | qos2.h |
| | |
Abstract: | | Abstract: |
| | |
This module contains QOS structures and function headers | | This module contains QOS structures and function headers |
| | |
--*/ | | --*/ |
| | |
#pragma once | | #pragma once |
|
| | #include <winapifamily.h> |
| | |
| | #pragma region Desktop Family |
| | #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) |
| | |
#include <ws2tcpip.h> | | #include <ws2tcpip.h> |
#include <mstcpip.h> | | #include <mstcpip.h> |
| | |
// | | // |
// Support calls from C++ | | // Support calls from C++ |
// | | // |
#if defined(__cplusplus) | | #if defined(__cplusplus) |
#define ExternC extern "C" | | #define ExternC extern "C" |
#else | | #else |
| | |
skipping to change at line 282 | | skipping to change at line 286 |
USHORT MajorVersion; | | USHORT MajorVersion; |
USHORT MinorVersion; | | USHORT MinorVersion; |
} QOS_VERSION, *PQOS_VERSION; | | } QOS_VERSION, *PQOS_VERSION; |
| | |
#define QOS_QUERYFLOW_FRESH 0x00000001 | | #define QOS_QUERYFLOW_FRESH 0x00000001 |
#define QOS_NON_ADAPTIVE_FLOW 0x00000002 | | #define QOS_NON_ADAPTIVE_FLOW 0x00000002 |
| | |
__inline | | __inline |
INT | | INT |
QOS_HEADER_OVERHEAD( | | QOS_HEADER_OVERHEAD( |
|
__in INT af, | | _In_ INT af, |
__in INT protocol | | _In_ INT protocol |
){ | | ){ |
UINT32 overhead; | | UINT32 overhead; |
| | |
if (af == AF_INET) | | if (af == AF_INET) |
overhead = 20; // IPv4 header overhead in bytes | | overhead = 20; // IPv4 header overhead in bytes |
else | | else |
overhead = 40; // IPv6 header overhead in bytes | | overhead = 40; // IPv6 header overhead in bytes |
| | |
if (protocol == IPPROTO_TCP) | | if (protocol == IPPROTO_TCP) |
overhead += 20; // TCP header overhead in bytes | | overhead += 20; // TCP header overhead in bytes |
| | |
skipping to change at line 344 | | skipping to change at line 348 |
// | | // |
// Return Values: | | // Return Values: |
// | | // |
// This call will return the data rate, in bits/s, augmented by the overhead | | // This call will return the data rate, in bits/s, augmented by the overhead |
// on each packet given the address family and the protocol you've created your | | // on each packet given the address family and the protocol you've created your |
// socket with. | | // socket with. |
// | | // |
__inline | | __inline |
UINT64 | | UINT64 |
QOS_ADD_OVERHEAD( | | QOS_ADD_OVERHEAD( |
|
__in INT af, | | _In_ INT af, |
__in INT protocol, | | _In_ INT protocol, |
__in UINT32 targetDataPacketSize, | | _In_ UINT32 targetDataPacketSize, |
__in UINT64 dataRate | | _In_ UINT64 dataRate |
){ | | ){ |
UINT32 overhead; | | UINT32 overhead; |
double d; | | double d; |
UINT64 r; | | UINT64 r; |
| | |
// | | // |
// Calculate the header overhead | | // Calculate the header overhead |
overhead = QOS_HEADER_OVERHEAD(af, protocol); | | overhead = QOS_HEADER_OVERHEAD(af, protocol); |
| | |
// | | // |
| | |
skipping to change at line 423 | | skipping to change at line 427 |
// | | // |
// Return Values: | | // Return Values: |
// | | // |
// This call will return the data rate, in bits/s, reduced by the overhead | | // This call will return the data rate, in bits/s, reduced by the overhead |
// on each packet given the address family and the protocol you've created your | | // on each packet given the address family and the protocol you've created your |
// socket with. | | // socket with. |
// | | // |
__inline | | __inline |
UINT64 | | UINT64 |
QOS_SUBTRACT_OVERHEAD( | | QOS_SUBTRACT_OVERHEAD( |
|
__in INT af, | | _In_ INT af, |
__in INT protocol, | | _In_ INT protocol, |
__in UINT32 targetDataPacketSize, | | _In_ UINT32 targetDataPacketSize, |
__in UINT64 dataRate | | _In_ UINT64 dataRate |
){ | | ){ |
UINT32 overhead; | | UINT32 overhead; |
double d; | | double d; |
UINT64 r; | | UINT64 r; |
| | |
// | | // |
// Calculate the header overhead | | // Calculate the header overhead |
overhead = QOS_HEADER_OVERHEAD(af, protocol); | | overhead = QOS_HEADER_OVERHEAD(af, protocol); |
| | |
// | | // |
| | |
skipping to change at line 504 | | skipping to change at line 508 |
// ERROR_RESOURCE_DISABLED | | // ERROR_RESOURCE_DISABLED |
// One of the resources required by the service is unavailable. This | | // One of the resources required by the service is unavailable. This |
// error may be returned if the user has not enabled the firewall | | // error may be returned if the user has not enabled the firewall |
// exception for the qWave service. Please see the developer guidelines | | // exception for the qWave service. Please see the developer guidelines |
// and MSFT firewall documentation for more details. | | // and MSFT firewall documentation for more details. |
// | | // |
ExternC | | ExternC |
BOOL | | BOOL |
WINAPI | | WINAPI |
QOSCreateHandle( | | QOSCreateHandle( |
|
__in PQOS_VERSION Version, | | _In_ PQOS_VERSION Version, |
__out PHANDLE QOSHandle | | _Out_ PHANDLE QOSHandle |
); | | ); |
| | |
// | | // |
// Description: | | // Description: |
// | | // |
// API to close a handle returned by QOSCreateHandle | | // API to close a handle returned by QOSCreateHandle |
// | | // |
// When closing a handle, all flows added on this handle are immediately | | // When closing a handle, all flows added on this handle are immediately |
// removed from the system. Any traffic going out a socket used to create these | | // removed from the system. Any traffic going out a socket used to create these |
// flows will no longer be marked. Moreover, any pending operations for these | | // flows will no longer be marked. Moreover, any pending operations for these |
| | |
skipping to change at line 539 | | skipping to change at line 543 |
// | | // |
// If the function succeeds, the return value is nonzero. | | // If the function succeeds, the return value is nonzero. |
// | | // |
// If the function fails, the return value is zero. To get extended error | | // If the function fails, the return value is zero. To get extended error |
// information, call GetLastError. | | // information, call GetLastError. |
// | | // |
ExternC | | ExternC |
BOOL | | BOOL |
WINAPI | | WINAPI |
QOSCloseHandle( | | QOSCloseHandle( |
|
__in HANDLE QOSHandle | | _In_ HANDLE QOSHandle |
); | | ); |
| | |
// | | // |
// Description: | | // Description: |
// | | // |
// API to inform the QOS subsystem of the existence of a new client. | | // API to inform the QOS subsystem of the existence of a new client. |
// The QOS subsystem will start gathering statistics about this client device. | | // The QOS subsystem will start gathering statistics about this client device. |
// This call is NOT required to add a flow, but it is recommended for adaptive | | // This call is NOT required to add a flow, but it is recommended for adaptive |
// flows. | | // flows. |
// | | // |
| | |
skipping to change at line 596 | | skipping to change at line 600 |
// | | // |
// ERROR_NOT_SUPPORTED | | // ERROR_NOT_SUPPORTED |
// The qWave subsystem cannot track information about the destination | | // The qWave subsystem cannot track information about the destination |
// you've specified. It could be that the other host does does not | | // you've specified. It could be that the other host does does not |
// have the required components or that it is not on the same link. | | // have the required components or that it is not on the same link. |
// | | // |
ExternC | | ExternC |
BOOL | | BOOL |
WINAPI | | WINAPI |
QOSStartTrackingClient( | | QOSStartTrackingClient( |
|
__in HANDLE QOSHandle, | | _In_ HANDLE QOSHandle, |
__in PSOCKADDR DestAddr, | | _In_ PSOCKADDR DestAddr, |
__reserved DWORD Flags | | _Reserved_ DWORD Flags |
); | | ); |
| | |
// | | // |
// Description: | | // Description: |
// | | // |
// API to remove a client. The QOS subsystem will stop gathering statistics | | // API to remove a client. The QOS subsystem will stop gathering statistics |
// about this client device. This call will only be accepted if | | // about this client device. This call will only be accepted if |
// QOSStartTrackingClient was previously called on the host. If a flow is | | // QOSStartTrackingClient was previously called on the host. If a flow is |
// currently in progress, this will not affect the flow. | | // currently in progress, this will not affect the flow. |
// | | // |
| | |
skipping to change at line 630 | | skipping to change at line 634 |
// | | // |
// If the function succeeds, the return value is nonzero. | | // If the function succeeds, the return value is nonzero. |
// | | // |
// If the function fails, the return value is zero. To get extended error | | // If the function fails, the return value is zero. To get extended error |
// information, call GetLastError. | | // information, call GetLastError. |
// | | // |
ExternC | | ExternC |
BOOL | | BOOL |
WINAPI | | WINAPI |
QOSStopTrackingClient( | | QOSStopTrackingClient( |
|
__in HANDLE QOSHandle, | | _In_ HANDLE QOSHandle, |
__in PSOCKADDR DestAddr, | | _In_ PSOCKADDR DestAddr, |
__reserved DWORD Flags | | _Reserved_ DWORD Flags |
); | | ); |
| | |
// | | // |
// Description: | | // Description: |
// | | // |
// API to enumerate all the existing flows. This call requires administrative | | // API to enumerate all the existing flows. This call requires administrative |
// rights. Through it the caller can obtain the list of current flow IDs on the | | // rights. Through it the caller can obtain the list of current flow IDs on the |
// system. Using QOSQueryFlow, one can then query the flows. | | // system. Using QOSQueryFlow, one can then query the flows. |
// | | // |
// Arguments: | | // Arguments: |
| | |
skipping to change at line 675 | | skipping to change at line 679 |
// This list is not exhaustive. | | // This list is not exhaustive. |
// | | // |
// ERROR_ACCESS_DENIED | | // ERROR_ACCESS_DENIED |
// The caller does not have the administrator rights required | | // The caller does not have the administrator rights required |
// to perform this call. | | // to perform this call. |
// | | // |
ExternC | | ExternC |
BOOL | | BOOL |
WINAPI | | WINAPI |
QOSEnumerateFlows( | | QOSEnumerateFlows( |
|
__in HANDLE QOSHandle, | | _In_ HANDLE QOSHandle, |
__inout PULONG Size, | | _Inout_ PULONG Size, |
__out_bcount(*Size) PVOID Buffer | | _Out_writes_bytes_(*Size) PVOID Buffer |
); | | ); |
| | |
// | | // |
// Description: | | // Description: |
// | | // |
// API to add a new flow. Note that the flow's traffic is not affected through | | // API to add a new flow. Note that the flow's traffic is not affected through |
// this call. There are two categories of applications that will use this api: | | // this call. There are two categories of applications that will use this api: |
// adaptive and non-adaptive. An adaptive application will make use of | | // adaptive and non-adaptive. An adaptive application will make use of |
// notifications and information in QOS_FLOW_FUNDAMENTALS to adapt to changing | | // notifications and information in QOS_FLOW_FUNDAMENTALS to adapt to changing |
// network characteristics (such as congestion). qWAVE utilizes Link Layer | | // network characteristics (such as congestion). qWAVE utilizes Link Layer |
| | |
skipping to change at line 818 | | skipping to change at line 822 |
// | | // |
// ERROR_NOT_SUPPORTED | | // ERROR_NOT_SUPPORTED |
// The qWave subsystem cannot track information about the destination | | // The qWave subsystem cannot track information about the destination |
// you've specified. It could be that the other host does does not | | // you've specified. It could be that the other host does does not |
// have the required components or that it is not on the same link. | | // have the required components or that it is not on the same link. |
// | | // |
ExternC | | ExternC |
BOOL | | BOOL |
WINAPI | | WINAPI |
QOSAddSocketToFlow( | | QOSAddSocketToFlow( |
|
__in HANDLE QOSHandle, | | _In_ HANDLE QOSHandle, |
__in SOCKET Socket, | | _In_ SOCKET Socket, |
__in_opt PSOCKADDR DestAddr, | | _In_opt_ PSOCKADDR DestAddr, |
__in QOS_TRAFFIC_TYPE TrafficType, | | _In_ QOS_TRAFFIC_TYPE TrafficType, |
__in_opt DWORD Flags, | | _In_opt_ DWORD Flags, |
__inout PQOS_FLOWID FlowId | | _Inout_ PQOS_FLOWID FlowId |
); | | ); |
| | |
// | | // |
// Description: | | // Description: |
// | | // |
// API used by app to notify QOS subsystem that a previously admitted flow has | | // API used by app to notify QOS subsystem that a previously admitted flow has |
// been terminated by the app. QOS subsystem uses this call to update its | | // been terminated by the app. QOS subsystem uses this call to update its |
// internal information | | // internal information |
// | | // |
// Arguments: | | // Arguments: |
| | |
skipping to change at line 881 | | skipping to change at line 885 |
// information, call GetLastError. Here are some of the errors possible. | | // information, call GetLastError. Here are some of the errors possible. |
// This list is not exhaustive. | | // This list is not exhaustive. |
// | | // |
// ERROR_NOT_FOUND | | // ERROR_NOT_FOUND |
// Invalid FlowId specified | | // Invalid FlowId specified |
// | | // |
ExternC | | ExternC |
BOOL | | BOOL |
WINAPI | | WINAPI |
QOSRemoveSocketFromFlow( | | QOSRemoveSocketFromFlow( |
|
__in HANDLE QOSHandle, | | _In_ HANDLE QOSHandle, |
__in_opt SOCKET Socket, | | _In_opt_ SOCKET Socket, |
__in QOS_FLOWID FlowId, | | _In_ QOS_FLOWID FlowId, |
__reserved DWORD Flags | | _Reserved_ DWORD Flags |
); | | ); |
| | |
// | | // |
// Description: | | // Description: |
// | | // |
// This API is used by the app to inform the QOS subsystem of change in a flow. | | // This API is used by the app to inform the QOS subsystem of change in a flow. |
// | | // |
// Arguments: | | // Arguments: |
// | | // |
// .QOSHandle - Handle to the QOS subsystem obtained through | | // .QOSHandle - Handle to the QOS subsystem obtained through |
| | |
skipping to change at line 985 | | skipping to change at line 989 |
// before ascertaining the state of the network. | | // before ascertaining the state of the network. |
// | | // |
// ERROR_ACCESS_DENIED | | // ERROR_ACCESS_DENIED |
// The caller does not have the administrator rights required | | // The caller does not have the administrator rights required |
// to perform this call. | | // to perform this call. |
// | | // |
ExternC | | ExternC |
BOOL | | BOOL |
WINAPI | | WINAPI |
QOSSetFlow( | | QOSSetFlow( |
|
__in HANDLE QOSHandle, | | _In_ HANDLE QOSHandle, |
__in QOS_FLOWID FlowId, | | _In_ QOS_FLOWID FlowId, |
__in QOS_SET_FLOW Operation, | | _In_ QOS_SET_FLOW Operation, |
__in ULONG Size, | | _In_ ULONG Size, |
__in_bcount(Size) PVOID Buffer, | | _In_reads_bytes_(Size) PVOID Buffer, |
__reserved DWORD Flags, | | _Reserved_ DWORD Flags, |
__out_opt LPOVERLAPPED Overlapped | | _Out_opt_ LPOVERLAPPED Overlapped |
); | | ); |
| | |
// | | // |
// Description: | | // Description: |
// | | // |
// API to query information about a flow. | | // API to query information about a flow. |
// | | // |
// Arguments: | | // Arguments: |
// | | // |
// .QOSHandle - Handle to the QOS subsystem obtained through | | // .QOSHandle - Handle to the QOS subsystem obtained through |
| | |
skipping to change at line 1107 | | skipping to change at line 1111 |
// ERROR_RETRY | | // ERROR_RETRY |
// There is currently insufficient data about networking conditions | | // There is currently insufficient data about networking conditions |
// to answer your query. This is typically a transient state where | | // to answer your query. This is typically a transient state where |
// qWave has erred on the side of caution as it waits for more data | | // qWave has erred on the side of caution as it waits for more data |
// before ascertaining the state of the network. | | // before ascertaining the state of the network. |
// | | // |
ExternC | | ExternC |
BOOL | | BOOL |
WINAPI | | WINAPI |
QOSQueryFlow( | | QOSQueryFlow( |
|
__in HANDLE QOSHandle, | | _In_ HANDLE QOSHandle, |
__in QOS_FLOWID FlowId, | | _In_ QOS_FLOWID FlowId, |
__in QOS_QUERY_FLOW Operation, | | _In_ QOS_QUERY_FLOW Operation, |
__inout PULONG Size, | | _Inout_ PULONG Size, |
__out_bcount(*Size) PVOID Buffer, | | _Out_writes_bytes_(*Size) PVOID Buffer, |
__in_opt DWORD Flags, | | _In_opt_ DWORD Flags, |
__out_opt LPOVERLAPPED Overlapped | | _Out_opt_ LPOVERLAPPED Overlapped |
); | | ); |
| | |
// | | // |
// Description: | | // Description: |
// | | // |
// API to receive notification of change of network characteristics. | | // API to receive notification of change of network characteristics. |
// | | // |
// Arguments: | | // Arguments: |
// | | // |
// .QOSHandle - Handle to the QOS subsystem obtained through | | // .QOSHandle - Handle to the QOS subsystem obtained through |
| | |
skipping to change at line 1228 | | skipping to change at line 1232 |
// | | // |
// ERROR_NOT_SUPPORTED | | // ERROR_NOT_SUPPORTED |
// The operation you're trying to do requires information about the | | // The operation you're trying to do requires information about the |
// network which the qWave subsystem does not have. Obtaining this | | // network which the qWave subsystem does not have. Obtaining this |
// information on your network is currently not supported. | | // information on your network is currently not supported. |
// | | // |
ExternC | | ExternC |
BOOL | | BOOL |
WINAPI | | WINAPI |
QOSNotifyFlow( | | QOSNotifyFlow( |
|
__in HANDLE QOSHandle, | | _In_ HANDLE QOSHandle, |
__in QOS_FLOWID FlowId, | | _In_ QOS_FLOWID FlowId, |
__in QOS_NOTIFY_FLOW Operation, | | _In_ QOS_NOTIFY_FLOW Operation, |
__inout_opt PULONG Size, | | _Inout_opt_ PULONG Size, |
__inout_bcount_opt(*Size) PVOID Buffer, | | _Inout_updates_bytes_opt_(*Size) PVOID Buffer, |
__reserved DWORD Flags, | | _Reserved_ DWORD Flags, |
__out_opt LPOVERLAPPED Overlapped | | _Out_opt_ LPOVERLAPPED Overlapped |
); | | ); |
| | |
// | | // |
// Description: | | // Description: |
// | | // |
// API to cancel a pending operation like QOSSetFlow. | | // API to cancel a pending operation like QOSSetFlow. |
// | | // |
// Closing a QOSHandle will automatically abort all pending | | // Closing a QOSHandle will automatically abort all pending |
// operations issued on that QOSHandle. If the handle is closed while | | // operations issued on that QOSHandle. If the handle is closed while |
// a QOSCancel call is still in progress, the call will complete | | // a QOSCancel call is still in progress, the call will complete |
| | |
skipping to change at line 1274 | | skipping to change at line 1278 |
// via its completion mechanism and indicates ERROR_OPERATION_ABORTED as the | | // via its completion mechanism and indicates ERROR_OPERATION_ABORTED as the |
// completion code. | | // completion code. |
// | | // |
// If the function fails, the return value is zero. To get extended error | | // If the function fails, the return value is zero. To get extended error |
// information, call GetLastError. | | // information, call GetLastError. |
// | | // |
ExternC | | ExternC |
BOOL | | BOOL |
WINAPI | | WINAPI |
QOSCancel( | | QOSCancel( |
|
__in HANDLE QOSHandle, | | _In_ HANDLE QOSHandle, |
__in LPOVERLAPPED Overlapped | | _In_ LPOVERLAPPED Overlapped |
); | | ); |
|
| | |
| | #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ |
| | #pragma endregion |
| | |
End of changes. 16 change blocks. |
55 lines changed or deleted | | 59 lines changed or added |
|