1 /*++
2
3 Copyright (c) 2004  Microsoft Corporation
4
5 Module Name:
6
7       qos2.h
8
9 Abstract:
10
11       This module contains QOS structures and function headers
12
13 --*/
14
15 #pragma once
16
17 #include <ws2tcpip.h>
18 #include <mstcpip.h>
19
20 //
21 // Support calls from C++
22 //
23 #if defined(__cplusplus)
24       #define ExternC extern "C"
25 #else
26       #define ExternC
27 #endif
28
29 //
30 // Each admitted flow has a unique Flow ID. This ID is valid only
31 // in the process which called QOSAddSocketToFlow() for that flow
32 // with the handle returned from QOSCreateHandle
33 //
34 typedef ULONG QOS_FLOWID, *PQOS_FLOWID;
35
36 //
37 // Definitions of various traffic types. Application identifies
38 // each flow as being of a certain type. This enables the QOS
39 // subsystem to apply user-specified per-type policies to flows
40 //
41 // QOSTrafficTypeBestEffort:
42 //          
43 //          This service type requests the same network priority to the traffic 
44 //          as regular traffic not associated to the qWave api. For home scenarios, 
45 //          this is DLNA class DLNAQOS_1.
46 //
47 // QOSTrafficTypeBackground:
48 //
49 //          This service type requests a network priority to the traffic lower than 
50 //          traffic of type QOSTrafficTypeBestEffort. For example, this service 
51 //          could be used for traffic of applications doing data backups. For home 
52 //          scenarios, this is DLNA class DLNAQOS_0.
53 //
54 // QOSTrafficTypeExcellentEffort:
55 //
56 //          This service type requests a network priority to the traffic higher than 
57 //          QOSTrafficTypeBestEffort. This service type should be used for data 
58 //          traffic that, although not A/V, is more important than normal end-user 
59 //          scenarios. For example, email traffic. This service type is not part of 
60 //          the DLNA specification.
61 //
62 // QOSTrafficTypeAudioVideo:
63 //
64 //          This service type should be used for A/V streaming scenarios such as 
65 //          MPEG2 streaming. For home scenarios, this is DLNA class DLNAQOS_2.
66 //
67 // QOSTrafficTypeVoice:
68 //
69 //          This service type should be used for realtime voice streams such as 
70 //          VoIP. This service type is not part of the DLNA specification.
71 //
72 // QOSTrafficTypeControl:
73 //
74 //          This service type should only be used for the most critical data. For 
75 //          example, you might use it for data carrying user inputs to an A/V 
76 //          experience, e.g. play, pause, FF, RW, etc. The A/V traffic however 
Lines 77 ... 1210 are skipped.
1211       __inout_opt                            PULONG                Size,
1212       __inout_bcount_opt(*Size)     PVOID                  Buffer,
1213       __reserved                              DWORD                  Flags,
1214       __out_opt                               LPOVERLAPPED      Overlapped
1215 );
1216
1217 //
1218 // Description:
1219 //
1220 //  API to cancel a pending operation like QOSSetFlow.
1221 // 
1222 //  Closing a QOSHandle will automatically abort all pending
1223 //  operations issued on that QOSHandle. If the handle is closed while
1224 //  a QOSCancel call is still in progress, the call will complete 
1225 //  with ERROR_OPERATION_ABORTED. 
1226 //
1227 // Arguments:
1228 //
1229 //          .QOSHandle          - Handle to the QOS subsystem obtained through 
1230 //                                        QOSCreateHandle.
1231 //
1232 //          .Overlapped        - Pointer to an OVERLAPPED structure. This is the 
1233 //                                        OVERLAPPED structure used in the original operation.
1234 //
1235 // Note: 
1236 //
1237 //  The QOSCancel call must be made in the same process from
1238 //  which the original to-be-cancelled call was made.
1239 // 
1240 // Return Values:
1241 //
1242 //  If the function can successfully initiate cancellation of the specified 
1243 //  operation, the return value is nonzero. The cancelled operation completes 
1244 //  via its completion mechanism and indicates ERROR_OPERATION_ABORTED as the 
1245 //  completion code.
1246 //
1247 //  If the function fails, the return value is zero. To get extended error 
1248 //  information, call GetLastError.
1249 //
1250 ExternC
1251 BOOL
1252 WINAPI
1253 QOSCancel(
1254       __in      HANDLE                QOSHandle,                
1255       __in      LPOVERLAPPED      Overlapped
1256 );
1257
1258
1259