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 __HTTP_H__
|
---|
7 | #define __HTTP_H__
|
---|
8 |
|
---|
9 | #include <winsock2.h>
|
---|
10 | #include <ws2tcpip.h>
|
---|
11 |
|
---|
12 | #define SECURITY_WIN32
|
---|
13 | #include <sspi.h>
|
---|
14 |
|
---|
15 | #ifdef __cplusplus
|
---|
16 | extern "C" {
|
---|
17 | #endif
|
---|
18 |
|
---|
19 | #define HTTP_INITIALIZE_SERVER 0x00000001
|
---|
20 | #define HTTP_INITIALIZE_CONFIG 0x00000002
|
---|
21 |
|
---|
22 | #define HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY 0x00000001
|
---|
23 | #define HTTP_RECEIVE_REQUEST_ENTITY_BODY_FLAG_FILL_BUFFER 0x00000001
|
---|
24 |
|
---|
25 | #define HTTP_SEND_RESPONSE_FLAG_DISCONNECT 0x00000001
|
---|
26 | #define HTTP_SEND_RESPONSE_FLAG_MORE_DATA 0x00000002
|
---|
27 | #define HTTP_SEND_RESPONSE_FLAG_BUFFER_DATA 0x00000004
|
---|
28 |
|
---|
29 | #define HTTP_FLUSH_RESPONSE_FLAG_RECURSIVE 0x00000001
|
---|
30 |
|
---|
31 | typedef ULONGLONG HTTP_OPAQUE_ID,*PHTTP_OPAQUE_ID;
|
---|
32 |
|
---|
33 | typedef HTTP_OPAQUE_ID HTTP_REQUEST_ID,*PHTTP_REQUEST_ID;
|
---|
34 | typedef HTTP_OPAQUE_ID HTTP_CONNECTION_ID,*PHTTP_CONNECTION_ID;
|
---|
35 | typedef HTTP_OPAQUE_ID HTTP_RAW_CONNECTION_ID,*PHTTP_RAW_CONNECTION_ID;
|
---|
36 | typedef HTTP_OPAQUE_ID HTTP_URL_GROUP_ID, *PHTTP_URL_GROUP_ID;
|
---|
37 | typedef HTTP_OPAQUE_ID HTTP_SERVER_SESSION_ID, *PHTTP_SERVER_SESSION_ID;
|
---|
38 |
|
---|
39 | #define HTTP_NULL_ID (0ull)
|
---|
40 | #define HTTP_IS_NULL_ID(pid) (HTTP_NULL_ID==*(pid))
|
---|
41 | #define HTTP_SET_NULL_ID(pid) (*(pid) = HTTP_NULL_ID)
|
---|
42 |
|
---|
43 | #define HTTP_BYTE_RANGE_TO_EOF ((ULONGLONG)-1)
|
---|
44 |
|
---|
45 | typedef struct _HTTP_BYTE_RANGE {
|
---|
46 | ULARGE_INTEGER StartingOffset;
|
---|
47 | ULARGE_INTEGER Length;
|
---|
48 | } HTTP_BYTE_RANGE,*PHTTP_BYTE_RANGE;
|
---|
49 |
|
---|
50 | typedef struct _HTTP_VERSION {
|
---|
51 | USHORT MajorVersion;
|
---|
52 | USHORT MinorVersion;
|
---|
53 | } HTTP_VERSION,*PHTTP_VERSION;
|
---|
54 |
|
---|
55 | #define HTTP_VERSION_UNKNOWN { 0,0 }
|
---|
56 | #define HTTP_VERSION_0_9 { 0,9 }
|
---|
57 | #define HTTP_VERSION_1_0 { 1,0 }
|
---|
58 | #define HTTP_VERSION_1_1 { 1,1 }
|
---|
59 |
|
---|
60 | #define HTTP_SET_VERSION(version,major,minor) do { (version).MajorVersion = (major); (version).MinorVersion = (minor); } while (0,0)
|
---|
61 | #define HTTP_EQUAL_VERSION(version,major,minor) ((version).MajorVersion==(major) && (version).MinorVersion==(minor))
|
---|
62 | #define HTTP_GREATER_VERSION(version,major,minor) ((version).MajorVersion > (major) || ((version).MajorVersion==(major) && (version).MinorVersion > (minor)))
|
---|
63 | #define HTTP_LESS_VERSION(version,major,minor) ((version).MajorVersion < (major) || ((version).MajorVersion==(major) && (version).MinorVersion < (minor)))
|
---|
64 | #define HTTP_NOT_EQUAL_VERSION(version,major,minor) (!HTTP_EQUAL_VERSION(version,major,minor))
|
---|
65 | #define HTTP_GREATER_EQUAL_VERSION(version,major,minor) (!HTTP_LESS_VERSION(version,major,minor))
|
---|
66 | #define HTTP_LESS_EQUAL_VERSION(version,major,minor) (!HTTP_GREATER_VERSION(version,major,minor))
|
---|
67 |
|
---|
68 | typedef enum _HTTP_VERB {
|
---|
69 | HttpVerbUnparsed = 0,
|
---|
70 | HttpVerbUnknown,HttpVerbInvalid,HttpVerbOPTIONS,HttpVerbGET,HttpVerbHEAD,HttpVerbPOST,HttpVerbPUT,HttpVerbDELETE,
|
---|
71 | HttpVerbTRACE,HttpVerbCONNECT,HttpVerbTRACK,HttpVerbMOVE,HttpVerbCOPY,HttpVerbPROPFIND,HttpVerbPROPPATCH,HttpVerbMKCOL,HttpVerbLOCK,
|
---|
72 | HttpVerbUNLOCK,HttpVerbSEARCH,HttpVerbMaximum
|
---|
73 | } HTTP_VERB,*PHTTP_VERB;
|
---|
74 |
|
---|
75 | typedef enum _HTTP_HEADER_ID {
|
---|
76 | HttpHeaderCacheControl = 0,HttpHeaderConnection = 1,HttpHeaderDate = 2,HttpHeaderKeepAlive = 3,HttpHeaderPragma = 4,HttpHeaderTrailer = 5,
|
---|
77 | HttpHeaderTransferEncoding = 6,HttpHeaderUpgrade = 7,HttpHeaderVia = 8,HttpHeaderWarning = 9,HttpHeaderAllow = 10,HttpHeaderContentLength = 11,
|
---|
78 | HttpHeaderContentType = 12,HttpHeaderContentEncoding = 13,HttpHeaderContentLanguage = 14,HttpHeaderContentLocation = 15,HttpHeaderContentMd5 = 16,
|
---|
79 | HttpHeaderContentRange = 17,HttpHeaderExpires = 18,HttpHeaderLastModified = 19,HttpHeaderAccept = 20,HttpHeaderAcceptCharset = 21,
|
---|
80 | HttpHeaderAcceptEncoding = 22,HttpHeaderAcceptLanguage = 23,HttpHeaderAuthorization = 24,HttpHeaderCookie = 25,HttpHeaderExpect = 26,
|
---|
81 | HttpHeaderFrom = 27,HttpHeaderHost = 28,HttpHeaderIfMatch = 29,HttpHeaderIfModifiedSince = 30,HttpHeaderIfNoneMatch = 31,HttpHeaderIfRange = 32,
|
---|
82 | HttpHeaderIfUnmodifiedSince = 33,HttpHeaderMaxForwards = 34,HttpHeaderProxyAuthorization = 35,HttpHeaderReferer = 36,HttpHeaderRange = 37,
|
---|
83 | HttpHeaderTe = 38,HttpHeaderTranslate = 39,HttpHeaderUserAgent = 40,HttpHeaderRequestMaximum = 41,HttpHeaderAcceptRanges = 20,HttpHeaderAge = 21,
|
---|
84 | HttpHeaderEtag = 22,HttpHeaderLocation = 23,HttpHeaderProxyAuthenticate = 24,HttpHeaderRetryAfter = 25,HttpHeaderServer = 26,
|
---|
85 | HttpHeaderSetCookie = 27,HttpHeaderVary = 28,HttpHeaderWwwAuthenticate = 29,HttpHeaderResponseMaximum = 30,HttpHeaderMaximum = 41
|
---|
86 | } HTTP_HEADER_ID,*PHTTP_HEADER_ID;
|
---|
87 |
|
---|
88 | typedef struct _HTTP_KNOWN_HEADER {
|
---|
89 | USHORT RawValueLength;
|
---|
90 | PCSTR pRawValue;
|
---|
91 | } HTTP_KNOWN_HEADER,*PHTTP_KNOWN_HEADER;
|
---|
92 |
|
---|
93 | typedef struct _HTTP_UNKNOWN_HEADER {
|
---|
94 | USHORT NameLength;
|
---|
95 | USHORT RawValueLength;
|
---|
96 | PCSTR pName;
|
---|
97 | PCSTR pRawValue;
|
---|
98 | } HTTP_UNKNOWN_HEADER,*PHTTP_UNKNOWN_HEADER;
|
---|
99 |
|
---|
100 | typedef enum _HTTP_DATA_CHUNK_TYPE {
|
---|
101 | HttpDataChunkFromMemory = 0,
|
---|
102 | HttpDataChunkFromFileHandle,
|
---|
103 | HttpDataChunkFromFragmentCache,
|
---|
104 | HttpDataChunkFromFragmentCacheEx,
|
---|
105 | HttpDataChunkMaximum
|
---|
106 | } HTTP_DATA_CHUNK_TYPE,*PHTTP_DATA_CHUNK_TYPE;
|
---|
107 |
|
---|
108 | typedef struct _HTTP_DATA_CHUNK {
|
---|
109 | HTTP_DATA_CHUNK_TYPE DataChunkType;
|
---|
110 | __C89_NAMELESS union {
|
---|
111 | struct {
|
---|
112 | PVOID pBuffer;
|
---|
113 | ULONG BufferLength;
|
---|
114 | } FromMemory;
|
---|
115 | struct {
|
---|
116 | HTTP_BYTE_RANGE ByteRange;
|
---|
117 | HANDLE FileHandle;
|
---|
118 | } FromFileHandle;
|
---|
119 | struct {
|
---|
120 | USHORT FragmentNameLength;
|
---|
121 | PCWSTR pFragmentName;
|
---|
122 | } FromFragmentCache;
|
---|
123 | };
|
---|
124 | } HTTP_DATA_CHUNK,*PHTTP_DATA_CHUNK;
|
---|
125 |
|
---|
126 | typedef struct _HTTP_REQUEST_HEADERS {
|
---|
127 | USHORT UnknownHeaderCount;
|
---|
128 | PHTTP_UNKNOWN_HEADER pUnknownHeaders;
|
---|
129 | USHORT TrailerCount;
|
---|
130 | PHTTP_UNKNOWN_HEADER pTrailers;
|
---|
131 | HTTP_KNOWN_HEADER KnownHeaders[HttpHeaderRequestMaximum];
|
---|
132 | } HTTP_REQUEST_HEADERS,*PHTTP_REQUEST_HEADERS;
|
---|
133 |
|
---|
134 | typedef struct _HTTP_RESPONSE_HEADERS {
|
---|
135 | USHORT UnknownHeaderCount;
|
---|
136 | PHTTP_UNKNOWN_HEADER pUnknownHeaders;
|
---|
137 | USHORT TrailerCount;
|
---|
138 | PHTTP_UNKNOWN_HEADER pTrailers;
|
---|
139 | HTTP_KNOWN_HEADER KnownHeaders[HttpHeaderResponseMaximum];
|
---|
140 | } HTTP_RESPONSE_HEADERS,*PHTTP_RESPONSE_HEADERS;
|
---|
141 |
|
---|
142 | typedef struct _HTTP_TRANSPORT_ADDRESS {
|
---|
143 | PSOCKADDR pRemoteAddress;
|
---|
144 | PSOCKADDR pLocalAddress;
|
---|
145 | } HTTP_TRANSPORT_ADDRESS,*PHTTP_TRANSPORT_ADDRESS;
|
---|
146 |
|
---|
147 | typedef struct _HTTP_COOKED_URL {
|
---|
148 | USHORT FullUrlLength;
|
---|
149 | USHORT HostLength;
|
---|
150 | USHORT AbsPathLength;
|
---|
151 | USHORT QueryStringLength;
|
---|
152 | PCWSTR pFullUrl;
|
---|
153 | PCWSTR pHost;
|
---|
154 | PCWSTR pAbsPath;
|
---|
155 | PCWSTR pQueryString;
|
---|
156 | } HTTP_COOKED_URL,*PHTTP_COOKED_URL;
|
---|
157 |
|
---|
158 | typedef ULONGLONG HTTP_URL_CONTEXT;
|
---|
159 |
|
---|
160 | typedef struct _HTTP_SSL_CLIENT_CERT_INFO {
|
---|
161 | ULONG CertFlags;
|
---|
162 | ULONG CertEncodedSize;
|
---|
163 | PUCHAR pCertEncoded;
|
---|
164 | HANDLE Token;
|
---|
165 | BOOLEAN CertDeniedByMapper;
|
---|
166 | } HTTP_SSL_CLIENT_CERT_INFO,*PHTTP_SSL_CLIENT_CERT_INFO;
|
---|
167 |
|
---|
168 | typedef struct _HTTP_SSL_INFO {
|
---|
169 | USHORT ServerCertKeySize;
|
---|
170 | USHORT ConnectionKeySize;
|
---|
171 | ULONG ServerCertIssuerSize;
|
---|
172 | ULONG ServerCertSubjectSize;
|
---|
173 | PCSTR pServerCertIssuer;
|
---|
174 | PCSTR pServerCertSubject;
|
---|
175 | PHTTP_SSL_CLIENT_CERT_INFO pClientCertInfo;
|
---|
176 | ULONG SslClientCertNegotiated;
|
---|
177 | } HTTP_SSL_INFO,*PHTTP_SSL_INFO;
|
---|
178 |
|
---|
179 | typedef struct _HTTP_REQUEST_V1 {
|
---|
180 | ULONG Flags;
|
---|
181 | HTTP_CONNECTION_ID ConnectionId;
|
---|
182 | HTTP_REQUEST_ID RequestId;
|
---|
183 | HTTP_URL_CONTEXT UrlContext;
|
---|
184 | HTTP_VERSION Version;
|
---|
185 | HTTP_VERB Verb;
|
---|
186 | USHORT UnknownVerbLength;
|
---|
187 | USHORT RawUrlLength;
|
---|
188 | PCSTR pUnknownVerb;
|
---|
189 | PCSTR pRawUrl;
|
---|
190 | HTTP_COOKED_URL CookedUrl;
|
---|
191 | HTTP_TRANSPORT_ADDRESS Address;
|
---|
192 | HTTP_REQUEST_HEADERS Headers;
|
---|
193 | ULONGLONG BytesReceived;
|
---|
194 | USHORT EntityChunkCount;
|
---|
195 | PHTTP_DATA_CHUNK pEntityChunks;
|
---|
196 | HTTP_RAW_CONNECTION_ID RawConnectionId;
|
---|
197 | PHTTP_SSL_INFO pSslInfo;
|
---|
198 | } HTTP_REQUEST_V1, *PHTTP_REQUEST_V1;
|
---|
199 |
|
---|
200 | typedef enum _HTTP_REQUEST_INFO_TYPE {
|
---|
201 | HttpRequestInfoTypeAuth = 0
|
---|
202 | } HTTP_REQUEST_INFO_TYPE, *PHTTP_REQUEST_INFO_TYPE;
|
---|
203 |
|
---|
204 | typedef struct _HTTP_REQUEST_INFO {
|
---|
205 | HTTP_REQUEST_INFO_TYPE InfoType;
|
---|
206 | ULONG InfoLength;
|
---|
207 | PVOID pInfo;
|
---|
208 | } HTTP_REQUEST_INFO, *PHTTP_REQUEST_INFO;
|
---|
209 |
|
---|
210 | #ifdef __cplusplus
|
---|
211 | typedef struct _HTTP_REQUEST_V2 : HTTP_REQUEST_V1 {
|
---|
212 | USHORT RequestInfoCount;
|
---|
213 | PHTTP_REQUEST_INFO pRequestInfo;
|
---|
214 | } HTTP_REQUEST_V2, *PHTTP_REQUEST_V2;
|
---|
215 | #else
|
---|
216 | typedef struct _HTTP_REQUEST_V2 {
|
---|
217 | /* struct HTTP_REQUEST_V1; */
|
---|
218 | __C89_NAMELESS struct {
|
---|
219 | ULONG Flags;
|
---|
220 | HTTP_CONNECTION_ID ConnectionId;
|
---|
221 | HTTP_REQUEST_ID RequestId;
|
---|
222 | HTTP_URL_CONTEXT UrlContext;
|
---|
223 | HTTP_VERSION Version;
|
---|
224 | HTTP_VERB Verb;
|
---|
225 | USHORT UnknownVerbLength;
|
---|
226 | USHORT RawUrlLength;
|
---|
227 | PCSTR pUnknownVerb;
|
---|
228 | PCSTR pRawUrl;
|
---|
229 | HTTP_COOKED_URL CookedUrl;
|
---|
230 | HTTP_TRANSPORT_ADDRESS Address;
|
---|
231 | HTTP_REQUEST_HEADERS Headers;
|
---|
232 | ULONGLONG BytesReceived;
|
---|
233 | USHORT EntityChunkCount;
|
---|
234 | PHTTP_DATA_CHUNK pEntityChunks;
|
---|
235 | HTTP_RAW_CONNECTION_ID RawConnectionId;
|
---|
236 | PHTTP_SSL_INFO pSslInfo;
|
---|
237 | };
|
---|
238 | USHORT RequestInfoCount;
|
---|
239 | PHTTP_REQUEST_INFO pRequestInfo;
|
---|
240 | } HTTP_REQUEST_V2, *PHTTP_REQUEST_V2;
|
---|
241 | #endif
|
---|
242 |
|
---|
243 | #if (_WIN32_WINNT >= 0x0600)
|
---|
244 | typedef HTTP_REQUEST_V2 HTTP_REQUEST, *PHTTP_REQUEST;
|
---|
245 | #else
|
---|
246 | typedef HTTP_REQUEST_V1 HTTP_REQUEST, *PHTTP_REQUEST;
|
---|
247 | #endif
|
---|
248 |
|
---|
249 | #define HTTP_REQUEST_FLAG_MORE_ENTITY_BODY_EXISTS 0x00000001
|
---|
250 |
|
---|
251 | typedef struct _HTTP_RESPONSE_V1 {
|
---|
252 | ULONG Flags;
|
---|
253 | HTTP_VERSION Version;
|
---|
254 | USHORT StatusCode;
|
---|
255 | USHORT ReasonLength;
|
---|
256 | PCSTR pReason;
|
---|
257 | HTTP_RESPONSE_HEADERS Headers;
|
---|
258 | USHORT EntityChunkCount;
|
---|
259 | PHTTP_DATA_CHUNK pEntityChunks;
|
---|
260 | } HTTP_RESPONSE_V1,*PHTTP_RESPONSE_V1;
|
---|
261 |
|
---|
262 | typedef enum _HTTP_RESPONSE_INFO_TYPE {
|
---|
263 | HttpResponseInfoTypeMultipleKnownHeaders = 0,
|
---|
264 | HttpResponseInfoTypeAuthenticationProperty,
|
---|
265 | HttpResponseInfoTypeQosProperty,
|
---|
266 | HttpResponseInfoTypeChannelBind
|
---|
267 | } HTTP_RESPONSE_INFO_TYPE, *PHTTP_RESPONSE_INFO_TYPE;
|
---|
268 |
|
---|
269 | typedef struct _HTTP_RESPONSE_INFO {
|
---|
270 | HTTP_RESPONSE_INFO_TYPE Type;
|
---|
271 | ULONG Length;
|
---|
272 | PVOID pInfo;
|
---|
273 | } HTTP_RESPONSE_INFO, *PHTTP_RESPONSE_INFO;
|
---|
274 |
|
---|
275 | #ifdef __cplusplus
|
---|
276 | typedef struct _HTTP_RESPONSE_V2 : HTTP_RESPONSE_V1 {
|
---|
277 | USHORT ResponseInfoCount;
|
---|
278 | PHTTP_RESPONSE_INFO pResponseInfo;
|
---|
279 | } HTTP_RESPONSE_V2, *PHTTP_RESPONSE_V2;
|
---|
280 | #else
|
---|
281 | typedef struct _HTTP_RESPONSE_V2 {
|
---|
282 | /* struct HTTP_RESPONSE_V1; */
|
---|
283 | __C89_NAMELESS struct {
|
---|
284 | ULONG Flags;
|
---|
285 | HTTP_VERSION Version;
|
---|
286 | USHORT StatusCode;
|
---|
287 | USHORT ReasonLength;
|
---|
288 | PCSTR pReason;
|
---|
289 | HTTP_RESPONSE_HEADERS Headers;
|
---|
290 | USHORT EntityChunkCount;
|
---|
291 | PHTTP_DATA_CHUNK pEntityChunks;
|
---|
292 | };
|
---|
293 | USHORT ResponseInfoCount;
|
---|
294 | PHTTP_RESPONSE_INFO pResponseInfo;
|
---|
295 | } HTTP_RESPONSE_V2, *PHTTP_RESPONSE_V2;
|
---|
296 | #endif
|
---|
297 |
|
---|
298 | #if (_WIN32_WINNT >= 0x0600)
|
---|
299 | typedef HTTP_RESPONSE_V2 HTTP_RESPONSE, *PHTTP_RESPONSE;
|
---|
300 | #else
|
---|
301 | typedef HTTP_RESPONSE_V1 HTTP_RESPONSE, *PHTTP_RESPONSE;
|
---|
302 | #endif /* _WIN32_WINNT >= 0x0600 */
|
---|
303 |
|
---|
304 | typedef enum _HTTP_CACHE_POLICY_TYPE {
|
---|
305 | HttpCachePolicyNocache = 0,
|
---|
306 | HttpCachePolicyUserInvalidates,
|
---|
307 | HttpCachePolicyTimeToLive,
|
---|
308 | HttpCachePolicyMaximum
|
---|
309 | } HTTP_CACHE_POLICY_TYPE,*PHTTP_CACHE_POLICY_TYPE;
|
---|
310 |
|
---|
311 | typedef struct _HTTP_CACHE_POLICY {
|
---|
312 | HTTP_CACHE_POLICY_TYPE Policy;
|
---|
313 | ULONG SecondsToLive;
|
---|
314 | } HTTP_CACHE_POLICY, *PHTTP_CACHE_POLICY;
|
---|
315 |
|
---|
316 | typedef enum _HTTP_SERVICE_CONFIG_ID {
|
---|
317 | HttpServiceConfigIPListenList = 0,
|
---|
318 | HttpServiceConfigSSLCertInfo,
|
---|
319 | HttpServiceConfigUrlAclInfo,
|
---|
320 | HttpServiceConfigMax
|
---|
321 | } HTTP_SERVICE_CONFIG_ID, *PHTTP_SERVICE_CONFIG_ID;
|
---|
322 |
|
---|
323 | typedef enum _HTTP_SERVICE_CONFIG_QUERY_TYPE {
|
---|
324 | HttpServiceConfigQueryExact = 0,
|
---|
325 | HttpServiceConfigQueryNext,
|
---|
326 | HttpServiceConfigQueryMax
|
---|
327 | } HTTP_SERVICE_CONFIG_QUERY_TYPE,*PHTTP_SERVICE_CONFIG_QUERY_TYPE;
|
---|
328 |
|
---|
329 | typedef struct _HTTP_SERVICE_CONFIG_SSL_KEY {
|
---|
330 | PSOCKADDR pIpPort;
|
---|
331 | } HTTP_SERVICE_CONFIG_SSL_KEY,*PHTTP_SERVICE_CONFIG_SSL_KEY;
|
---|
332 |
|
---|
333 | typedef struct _HTTP_SERVICE_CONFIG_SSL_PARAM {
|
---|
334 | ULONG SslHashLength;
|
---|
335 | PVOID pSslHash;
|
---|
336 | GUID AppId;
|
---|
337 | PWSTR pSslCertStoreName;
|
---|
338 | DWORD DefaultCertCheckMode;
|
---|
339 | DWORD DefaultRevocationFreshnessTime;
|
---|
340 | DWORD DefaultRevocationUrlRetrievalTimeout;
|
---|
341 | PWSTR pDefaultSslCtlIdentifier;
|
---|
342 | PWSTR pDefaultSslCtlStoreName;
|
---|
343 | DWORD DefaultFlags;
|
---|
344 | } HTTP_SERVICE_CONFIG_SSL_PARAM,*PHTTP_SERVICE_CONFIG_SSL_PARAM;
|
---|
345 |
|
---|
346 | #define HTTP_SERVICE_CONFIG_SSL_FLAG_USE_DS_MAPPER 0x00000001
|
---|
347 | #define HTTP_SERVICE_CONFIG_SSL_FLAG_NEGOTIATE_CLIENT_CERT 0x00000002
|
---|
348 | #define HTTP_SERVICE_CONFIG_SSL_FLAG_NO_RAW_FILTER 0x00000004
|
---|
349 |
|
---|
350 | typedef struct _HTTP_SERVICE_CONFIG_SSL_SET {
|
---|
351 | HTTP_SERVICE_CONFIG_SSL_KEY KeyDesc;
|
---|
352 | HTTP_SERVICE_CONFIG_SSL_PARAM ParamDesc;
|
---|
353 | } HTTP_SERVICE_CONFIG_SSL_SET,*PHTTP_SERVICE_CONFIG_SSL_SET;
|
---|
354 |
|
---|
355 | typedef struct _HTTP_SERVICE_CONFIG_SSL_QUERY {
|
---|
356 | HTTP_SERVICE_CONFIG_QUERY_TYPE QueryDesc;
|
---|
357 | HTTP_SERVICE_CONFIG_SSL_KEY KeyDesc;
|
---|
358 | DWORD dwToken;
|
---|
359 | } HTTP_SERVICE_CONFIG_SSL_QUERY,*PHTTP_SERVICE_CONFIG_SSL_QUERY;
|
---|
360 |
|
---|
361 | typedef struct _HTTP_SERVICE_CONFIG_IP_LISTEN_PARAM {
|
---|
362 | USHORT AddrLength;
|
---|
363 | PSOCKADDR pAddress;
|
---|
364 | } HTTP_SERVICE_CONFIG_IP_LISTEN_PARAM,*PHTTP_SERVICE_CONFIG_IP_LISTEN_PARAM;
|
---|
365 |
|
---|
366 | typedef struct _HTTP_SERVICE_CONFIG_IP_LISTEN_QUERY {
|
---|
367 | ULONG AddrCount;
|
---|
368 | SOCKADDR_STORAGE AddrList[ANYSIZE_ARRAY];
|
---|
369 | } HTTP_SERVICE_CONFIG_IP_LISTEN_QUERY,*PHTTP_SERVICE_CONFIG_IP_LISTEN_QUERY;
|
---|
370 |
|
---|
371 | typedef struct _HTTP_SERVICE_CONFIG_URLACL_KEY {
|
---|
372 | PWSTR pUrlPrefix;
|
---|
373 | } HTTP_SERVICE_CONFIG_URLACL_KEY,*PHTTP_SERVICE_CONFIG_URLACL_KEY;
|
---|
374 |
|
---|
375 | typedef struct _HTTP_SERVICE_CONFIG_URLACL_PARAM {
|
---|
376 | PWSTR pStringSecurityDescriptor;
|
---|
377 | } HTTP_SERVICE_CONFIG_URLACL_PARAM,*PHTTP_SERVICE_CONFIG_URLACL_PARAM;
|
---|
378 |
|
---|
379 | typedef struct _HTTP_SERVICE_CONFIG_URLACL_SET {
|
---|
380 | HTTP_SERVICE_CONFIG_URLACL_KEY KeyDesc;
|
---|
381 | HTTP_SERVICE_CONFIG_URLACL_PARAM ParamDesc;
|
---|
382 | } HTTP_SERVICE_CONFIG_URLACL_SET,*PHTTP_SERVICE_CONFIG_URLACL_SET;
|
---|
383 |
|
---|
384 | typedef struct _HTTP_SERVICE_CONFIG_URLACL_QUERY {
|
---|
385 | HTTP_SERVICE_CONFIG_QUERY_TYPE QueryDesc;
|
---|
386 | HTTP_SERVICE_CONFIG_URLACL_KEY KeyDesc;
|
---|
387 | DWORD dwToken;
|
---|
388 | } HTTP_SERVICE_CONFIG_URLACL_QUERY,*PHTTP_SERVICE_CONFIG_URLACL_QUERY;
|
---|
389 |
|
---|
390 | #if !defined(HTTPAPI_LINKAGE)
|
---|
391 | #ifdef HTTPAPI_LINKAGE_EXPORT
|
---|
392 | #define DECLSPEC_EXPORT __declspec(dllexport)
|
---|
393 | #define HTTPAPI_LINKAGE DECLSPEC_EXPORT
|
---|
394 | #else
|
---|
395 | #define HTTPAPI_LINKAGE DECLSPEC_IMPORT
|
---|
396 | #endif
|
---|
397 | #endif
|
---|
398 |
|
---|
399 | typedef struct _HTTPAPI_VERSION {
|
---|
400 | USHORT HttpApiMajorVersion;
|
---|
401 | USHORT HttpApiMinorVersion;
|
---|
402 | } HTTPAPI_VERSION,*PHTTPAPI_VERSION;
|
---|
403 |
|
---|
404 | #define HTTPAPI_VERSION_1 {1,0}
|
---|
405 |
|
---|
406 | HTTPAPI_LINKAGE ULONG WINAPI HttpInitialize(HTTPAPI_VERSION Version,ULONG Flags,PVOID pReserved);
|
---|
407 | HTTPAPI_LINKAGE ULONG WINAPI HttpTerminate(ULONG Flags,PVOID pReserved);
|
---|
408 | HTTPAPI_LINKAGE ULONG WINAPI HttpCreateHttpHandle(PHANDLE pReqQueueHandle,ULONG Options);
|
---|
409 | HTTPAPI_LINKAGE ULONG WINAPI HttpReceiveClientCertificate(HANDLE ReqQueueHandle,HTTP_CONNECTION_ID ConnectionId,ULONG Flags,PHTTP_SSL_CLIENT_CERT_INFO pSslClientCertInfo,ULONG SslClientCertInfoSize,PULONG pBytesReceived,LPOVERLAPPED pOverlapped);
|
---|
410 | HTTPAPI_LINKAGE ULONG WINAPI HttpAddUrl(HANDLE ReqQueueHandle,PCWSTR pUrlPrefix,PVOID pReserved);
|
---|
411 | HTTPAPI_LINKAGE ULONG WINAPI HttpRemoveUrl(HANDLE ReqQueueHandle,PCWSTR pUrlPrefix);
|
---|
412 | HTTPAPI_LINKAGE ULONG WINAPI HttpReceiveHttpRequest(HANDLE ReqQueueHandle,HTTP_REQUEST_ID RequestId,ULONG Flags,PHTTP_REQUEST pRequestBuffer,ULONG RequestBufferLength,PULONG pBytesReceived,LPOVERLAPPED pOverlapped);
|
---|
413 | HTTPAPI_LINKAGE ULONG WINAPI HttpReceiveRequestEntityBody(HANDLE ReqQueueHandle,HTTP_REQUEST_ID RequestId,ULONG Flags,PVOID pBuffer,ULONG BufferLength,PULONG pBytesReceived,LPOVERLAPPED pOverlapped);
|
---|
414 | HTTPAPI_LINKAGE ULONG WINAPI HttpSendHttpResponse(HANDLE ReqQueueHandle,HTTP_REQUEST_ID RequestId,ULONG Flags,PHTTP_RESPONSE pHttpResponse,PVOID pReserved1,PULONG pBytesSent,PVOID pReserved2,ULONG Reserved3,LPOVERLAPPED pOverlapped,PVOID pReserved4);
|
---|
415 | HTTPAPI_LINKAGE ULONG WINAPI HttpSendResponseEntityBody(HANDLE ReqQueueHandle,HTTP_REQUEST_ID RequestId,ULONG Flags,USHORT EntityChunkCount,PHTTP_DATA_CHUNK pEntityChunks,PULONG pBytesSent,PVOID pReserved1,ULONG Reserved2,LPOVERLAPPED pOverlapped,PVOID pReserved3);
|
---|
416 | HTTPAPI_LINKAGE ULONG WINAPI HttpWaitForDisconnect(HANDLE ReqQueueHandle,HTTP_CONNECTION_ID ConnectionId,LPOVERLAPPED pOverlapped);
|
---|
417 | HTTPAPI_LINKAGE ULONG WINAPI HttpFlushResponseCache(HANDLE ReqQueueHandle,PCWSTR pUrlPrefix,ULONG Flags,LPOVERLAPPED pOverlapped);
|
---|
418 | HTTPAPI_LINKAGE ULONG WINAPI HttpAddFragmentToCache(HANDLE ReqQueueHandle,PCWSTR pUrlPrefix,PHTTP_DATA_CHUNK pDataChunk,PHTTP_CACHE_POLICY pCachePolicy,LPOVERLAPPED pOverlapped);
|
---|
419 | HTTPAPI_LINKAGE ULONG WINAPI HttpReadFragmentFromCache(HANDLE ReqQueueHandle,PCWSTR pUrlPrefix,PHTTP_BYTE_RANGE pByteRange,PVOID pBuffer,ULONG BufferLength,PULONG pBytesRead,LPOVERLAPPED pOverlapped);
|
---|
420 | HTTPAPI_LINKAGE ULONG WINAPI HttpSetServiceConfiguration(HANDLE ServiceHandle,HTTP_SERVICE_CONFIG_ID ConfigId,PVOID pConfigInformation,ULONG ConfigInformationLength,LPOVERLAPPED pOverlapped);
|
---|
421 | HTTPAPI_LINKAGE ULONG WINAPI HttpDeleteServiceConfiguration(HANDLE ServiceHandle,HTTP_SERVICE_CONFIG_ID ConfigId,PVOID pConfigInformation,ULONG ConfigInformationLength,LPOVERLAPPED pOverlapped);
|
---|
422 | HTTPAPI_LINKAGE ULONG WINAPI HttpQueryServiceConfiguration(HANDLE ServiceHandle,HTTP_SERVICE_CONFIG_ID ConfigId,PVOID pInputConfigInformation,ULONG InputConfigInformationLength,PVOID pOutputConfigInformation,ULONG OutputConfigInformationLength,PULONG pReturnLength,LPOVERLAPPED pOverlapped);
|
---|
423 |
|
---|
424 | #if (_WIN32_WINNT >= 0x0600)
|
---|
425 | #define HTTP_VERSION_2_0 { 2, 0 }
|
---|
426 | #define HTTPAPI_VERSION_2 { 2, 0 }
|
---|
427 |
|
---|
428 | typedef enum _HTTP_503_RESPONSE_VERBOSITY {
|
---|
429 | Http503ResponseVerbosityBasic = 0,
|
---|
430 | Http503ResponseVerbosityLimited,
|
---|
431 | Http503ResponseVerbosityFull
|
---|
432 | } HTTP_503_RESPONSE_VERBOSITY, *PHTTP_503_RESPONSE_VERBOSITY;
|
---|
433 |
|
---|
434 | typedef enum _HTTP_ENABLED_STATE {
|
---|
435 | HttpEnabledStateActive = 0,
|
---|
436 | HttpEnabledStateInactive
|
---|
437 | } HTTP_ENABLED_STATE, *PHTTP_ENABLED_STATE;
|
---|
438 |
|
---|
439 | typedef enum _HTTP_LOGGING_ROLLOVER_TYPE {
|
---|
440 | HttpLoggingRolloverSize = 0,
|
---|
441 | HttpLoggingRolloverDaily,
|
---|
442 | HttpLoggingRolloverWeekly,
|
---|
443 | HttpLoggingRolloverMonthly,
|
---|
444 | HttpLoggingRolloverHourly
|
---|
445 | } HTTP_LOGGING_ROLLOVER_TYPE, *PHTTP_LOGGING_ROLLOVER_TYPE;
|
---|
446 |
|
---|
447 | typedef enum _HTTP_LOGGING_TYPE {
|
---|
448 | HttpLoggingTypeW3C = 0,
|
---|
449 | HttpLoggingTypeIIS,
|
---|
450 | HttpLoggingTypeNCSA,
|
---|
451 | HttpLoggingTypeRaw
|
---|
452 | } HTTP_LOGGING_TYPE, *PHTTP_LOGGING_TYPE;
|
---|
453 |
|
---|
454 | typedef enum _HTTP_QOS_SETTING_TYPE {
|
---|
455 | HttpQosSettingTypeBandwidth = 0,
|
---|
456 | HttpQosSettingTypeConnectionLimit,
|
---|
457 | HttpQosSettingTypeFlowRate
|
---|
458 | } HTTP_QOS_SETTING_TYPE, *PHTTP_QOS_SETTING_TYPE;
|
---|
459 |
|
---|
460 | typedef enum _HTTP_SERVER_PROPERTY {
|
---|
461 | HttpServerAuthenticationProperty = 0,
|
---|
462 | HttpServerLoggingProperty,
|
---|
463 | HttpServerQosProperty,
|
---|
464 | HttpServerTimeoutsProperty,
|
---|
465 | HttpServerQueueLengthProperty,
|
---|
466 | HttpServerStateProperty,
|
---|
467 | HttpServer503VerbosityProperty,
|
---|
468 | HttpServerBindingProperty,
|
---|
469 | HttpServerExtendedAuthenticationProperty,
|
---|
470 | HttpServerListenEndpointProperty,
|
---|
471 | HttpServerChannelBindProperty
|
---|
472 | } HTTP_SERVER_PROPERTY, *PHTTP_SERVER_PROPERTY;
|
---|
473 |
|
---|
474 | typedef enum _HTTP_AUTHENTICATION_HARDENING_LEVELS {
|
---|
475 | HttpAuthenticationHardeningLegacy = 0,
|
---|
476 | HttpAuthenticationHardeningMedium = 1,
|
---|
477 | HttpAuthenticationHardeningStrict = 2
|
---|
478 | } HTTP_AUTHENTICATION_HARDENING_LEVELS;
|
---|
479 |
|
---|
480 | typedef enum _HTTP_SERVICE_BINDING_TYPE {
|
---|
481 | HttpServiceBindingTypeNone = 0,
|
---|
482 | HttpServiceBindingTypeW = 1,
|
---|
483 | HttpServiceBindingTypeA = 2
|
---|
484 | } HTTP_SERVICE_BINDING_TYPE;
|
---|
485 |
|
---|
486 | typedef enum _HTTP_LOG_DATA_TYPE {
|
---|
487 | HttpLogDataTypeFields = 0
|
---|
488 | } HTTP_LOG_DATA_TYPE, *PHTTP_LOG_DATA_TYPE;
|
---|
489 |
|
---|
490 | typedef struct _HTTP_LOG_DATA {
|
---|
491 | HTTP_LOG_DATA_TYPE Type;
|
---|
492 | } HTTP_LOG_DATA, *PHTTP_LOG_DATA;
|
---|
493 |
|
---|
494 | typedef enum _HTTP_REQUEST_AUTH_TYPE {
|
---|
495 | HttpRequestAuthTypeNone = 0,
|
---|
496 | HttpRequestAuthTypeBasic,
|
---|
497 | HttpRequestAuthTypeDigest,
|
---|
498 | HttpRequestAuthTypeNTLM,
|
---|
499 | HttpRequestAuthTypeNegotiate,
|
---|
500 | HttpRequestAuthTypeKerberos
|
---|
501 | } HTTP_REQUEST_AUTH_TYPE, *PHTTP_REQUEST_AUTH_TYPE;
|
---|
502 |
|
---|
503 | typedef enum _HTTP_AUTH_STATUS {
|
---|
504 | HttpAuthStatusSuccess = 0,
|
---|
505 | HttpAuthStatusNotAuthenticated,
|
---|
506 | HttpAuthStatusFailure
|
---|
507 | } HTTP_AUTH_STATUS, *PHTTP_AUTH_STATUS;
|
---|
508 |
|
---|
509 | typedef enum _HTTP_SERVICE_CONFIG_TIMEOUT_KEY {
|
---|
510 | IdleConnectionTimeout = 0,
|
---|
511 | HeaderWaitTimeout
|
---|
512 | } HTTP_SERVICE_CONFIG_TIMEOUT_KEY, *PHTTP_SERVICE_CONFIG_TIMEOUT_KEY;
|
---|
513 |
|
---|
514 | typedef USHORT HTTP_SERVICE_CONFIG_TIMEOUT_PARAM, *PHTTP_SERVICE_CONFIG_TIMEOUT_PARAM;
|
---|
515 |
|
---|
516 | typedef struct _HTTP_PROPERTY_FLAGS {
|
---|
517 | ULONG Present:1;
|
---|
518 | } HTTP_PROPERTY_FLAGS, *PHTTP_PROPERTY_FLAGS;
|
---|
519 |
|
---|
520 | typedef struct _HTTP_CONNECTION_LIMIT_INFO {
|
---|
521 | HTTP_PROPERTY_FLAGS Flags;
|
---|
522 | ULONG MaxConnections;
|
---|
523 | } HTTP_CONNECTION_LIMIT_INFO, *PHTTP_CONNECTION_LIMIT_INFO;
|
---|
524 |
|
---|
525 | typedef struct _HTTP_STATE_INFO {
|
---|
526 | HTTP_PROPERTY_FLAGS Flags;
|
---|
527 | HTTP_ENABLED_STATE State;
|
---|
528 | } HTTP_STATE_INFO, *PHTTP_STATE_INFO;
|
---|
529 |
|
---|
530 | typedef struct _HTTP_QOS_SETTING_INFO {
|
---|
531 | HTTP_QOS_SETTING_TYPE QosType;
|
---|
532 | PVOID QosSetting;
|
---|
533 | } HTTP_QOS_SETTING_INFO, *PHTTP_QOS_SETTING_INFO;
|
---|
534 |
|
---|
535 | typedef struct _HTTP_SERVER_AUTHENTICATION_DIGEST_PARAMS {
|
---|
536 | USHORT DomainNameLength;
|
---|
537 | PWSTR DomainName;
|
---|
538 | USHORT RealmLength;
|
---|
539 | PWSTR Realm;
|
---|
540 | } HTTP_SERVER_AUTHENTICATION_DIGEST_PARAMS, *PHTTP_SERVER_AUTHENTICATION_DIGEST_PARAMS;
|
---|
541 |
|
---|
542 | typedef struct _HTTP_SERVER_AUTHENTICATION_BASIC_PARAMS {
|
---|
543 | USHORT RealmLength;
|
---|
544 | PWSTR Realm;
|
---|
545 | } HTTP_SERVER_AUTHENTICATION_BASIC_PARAMS, *PHTTP_SERVER_AUTHENTICATION_BASIC_PARAMS;
|
---|
546 |
|
---|
547 | typedef struct _HTTP_SERVER_AUTHENTICATION_INFO {
|
---|
548 | HTTP_PROPERTY_FLAGS Flags;
|
---|
549 | ULONG AuthSchemes;
|
---|
550 | BOOLEAN ReceiveMutualAuth;
|
---|
551 | BOOLEAN ReceiveContextHandle;
|
---|
552 | BOOLEAN DisableNTLMCredentialCaching;
|
---|
553 | UCHAR ExFlags;
|
---|
554 | HTTP_SERVER_AUTHENTICATION_DIGEST_PARAMS DigestParams;
|
---|
555 | HTTP_SERVER_AUTHENTICATION_BASIC_PARAMS BasicParams;
|
---|
556 | } HTTP_SERVER_AUTHENTICATION_INFO, *PHTTP_SERVER_AUTHENTICATION_INFO;
|
---|
557 |
|
---|
558 | typedef struct _HTTP_LOGGING_INFO {
|
---|
559 | HTTP_PROPERTY_FLAGS Flags;
|
---|
560 | ULONG LoggingFlags;
|
---|
561 | PCWSTR SoftwareName;
|
---|
562 | USHORT SoftwareNameLength;
|
---|
563 | USHORT DirectoryNameLength;
|
---|
564 | PCWSTR DirectoryName;
|
---|
565 | HTTP_LOGGING_TYPE Format;
|
---|
566 | ULONG Fields;
|
---|
567 | PVOID pExtFields;
|
---|
568 | USHORT NumOfExtFields;
|
---|
569 | USHORT MaxRecordSize;
|
---|
570 | HTTP_LOGGING_ROLLOVER_TYPE RolloverType;
|
---|
571 | ULONG RolloverSize;
|
---|
572 | PSECURITY_DESCRIPTOR pSecurityDescriptor;
|
---|
573 | } HTTP_LOGGING_INFO, *PHTTP_LOGGING_INFO;
|
---|
574 |
|
---|
575 | typedef struct _HTTP_TIMEOUT_LIMIT_INFO {
|
---|
576 | HTTP_PROPERTY_FLAGS Flags;
|
---|
577 | USHORT EntityBody;
|
---|
578 | USHORT DrainEntityBody;
|
---|
579 | USHORT RequestQueue;
|
---|
580 | USHORT IdleConnection;
|
---|
581 | USHORT HeaderWait;
|
---|
582 | ULONG MinSendRate;
|
---|
583 | } HTTP_TIMEOUT_LIMIT_INFO, *PHTTP_TIMEOUT_LIMIT_INFO;
|
---|
584 |
|
---|
585 | typedef struct _HTTP_SERVICE_BINDING_BASE {
|
---|
586 | HTTP_SERVICE_BINDING_TYPE Type;
|
---|
587 | } HTTP_SERVICE_BINDING_BASE, *PHTTP_SERVICE_BINDING_BASE;
|
---|
588 |
|
---|
589 | typedef struct _HTTP_CHANNEL_BIND_INFO {
|
---|
590 | HTTP_AUTHENTICATION_HARDENING_LEVELS Hardening;
|
---|
591 | ULONG Flags;
|
---|
592 | PHTTP_SERVICE_BINDING_BASE *ServiceNames;
|
---|
593 | ULONG NumberOfServiceNames;
|
---|
594 | } HTTP_CHANNEL_BIND_INFO, *PHTTP_CHANNEL_BIND_INFO;
|
---|
595 |
|
---|
596 | typedef struct _HTTP_REQUEST_CHANNEL_BIND_STATUS {
|
---|
597 | PHTTP_SERVICE_BINDING_BASE ServiceName;
|
---|
598 | PUCHAR ChannelToken;
|
---|
599 | ULONG ChannelTokenSize;
|
---|
600 | ULONG Flags;
|
---|
601 | } HTTP_REQUEST_CHANNEL_BIND_STATUS, *PHTTP_REQUEST_CHANNEL_BIND_STATUS;
|
---|
602 |
|
---|
603 | typedef struct _HTTP_SERVICE_BINDING_A {
|
---|
604 | HTTP_SERVICE_BINDING_BASE Base;
|
---|
605 | PCHAR Buffer;
|
---|
606 | ULONG BufferSize;
|
---|
607 | } HTTP_SERVICE_BINDING_A, *PHTTP_SERVICE_BINDING_A;
|
---|
608 |
|
---|
609 | typedef struct _HTTP_SERVICE_BINDING_W {
|
---|
610 | HTTP_SERVICE_BINDING_BASE Base;
|
---|
611 | PWCHAR Buffer;
|
---|
612 | ULONG BufferSize;
|
---|
613 | } HTTP_SERVICE_BINDING_W, *PHTTP_SERVICE_BINDING_W;
|
---|
614 |
|
---|
615 | /* TODO: Is there the abstract unicode type HTTP_SERVICE_BINDING present, too? */
|
---|
616 |
|
---|
617 | typedef struct _HTTP_LOG_FIELDS_DATA {
|
---|
618 | HTTP_LOG_DATA Base;
|
---|
619 | USHORT UserNameLength;
|
---|
620 | USHORT UriStemLength;
|
---|
621 | USHORT ClientIpLength;
|
---|
622 | USHORT ServerNameLength;
|
---|
623 | USHORT ServerIpLength;
|
---|
624 | USHORT MethodLength;
|
---|
625 | USHORT UriQueryLength;
|
---|
626 | USHORT HostLength;
|
---|
627 | USHORT UserAgentLength;
|
---|
628 | USHORT CookieLength;
|
---|
629 | USHORT ReferrerLength;
|
---|
630 | PWCHAR UserName;
|
---|
631 | PWCHAR UriStem;
|
---|
632 | PCHAR ClientIp;
|
---|
633 | PCHAR ServerName;
|
---|
634 | PCHAR ServiceName;
|
---|
635 | PCHAR ServerIp;
|
---|
636 | PCHAR Method;
|
---|
637 | PCHAR UriQuery;
|
---|
638 | PCHAR Host;
|
---|
639 | PCHAR UserAgent;
|
---|
640 | PCHAR Cookie;
|
---|
641 | PCHAR Referrer;
|
---|
642 | USHORT ServerPort;
|
---|
643 | USHORT ProtocolStatus;
|
---|
644 | ULONG Win32Status;
|
---|
645 | HTTP_VERB MethodNum;
|
---|
646 | USHORT SubStatus;
|
---|
647 | } HTTP_LOG_FIELDS_DATA, *PHTTP_LOG_FIELDS_DATA;
|
---|
648 |
|
---|
649 | typedef struct _HTTP_REQUEST_AUTH_INFO {
|
---|
650 | HTTP_AUTH_STATUS AuthStatus;
|
---|
651 | SECURITY_STATUS SecStatus;
|
---|
652 | ULONG Flags;
|
---|
653 | HTTP_REQUEST_AUTH_TYPE AuthType;
|
---|
654 | HANDLE AccessToken;
|
---|
655 | ULONG ContextAttributes;
|
---|
656 | ULONG PackedContextLength;
|
---|
657 | ULONG PackedContextType;
|
---|
658 | PVOID PackedContext;
|
---|
659 | ULONG MutualAuthDataLength;
|
---|
660 | PCHAR pMutualAuthData;
|
---|
661 | } HTTP_REQUEST_AUTH_INFO, *PHTTP_REQUEST_AUTH_INFO;
|
---|
662 |
|
---|
663 | typedef struct _HTTP_MULTIPLE_KNOWN_HEADERS {
|
---|
664 | HTTP_HEADER_ID HeaderId;
|
---|
665 | ULONG Flags;
|
---|
666 | USHORT KnownHeaderCount;
|
---|
667 | PHTTP_KNOWN_HEADER KnownHeaders;
|
---|
668 | } HTTP_MULTIPLE_KNOWN_HEADERS, *PHTTP_MULTIPLE_KNOWN_HEADERS;
|
---|
669 |
|
---|
670 | typedef struct _HTTP_SERVICE_CONFIG_TIMEOUT_SET {
|
---|
671 | HTTP_SERVICE_CONFIG_TIMEOUT_KEY KeyDesc;
|
---|
672 | HTTP_SERVICE_CONFIG_TIMEOUT_PARAM ParamDesc;
|
---|
673 | } HTTP_SERVICE_CONFIG_TIMEOUT_SET, *PHTTP_SERVICE_CONFIG_TIMEOUT_SET;
|
---|
674 |
|
---|
675 | typedef struct _HTTP_BANDWIDTH_LIMIT_INFO {
|
---|
676 | HTTP_PROPERTY_FLAGS Flags;
|
---|
677 | ULONG MaxBandwidth;
|
---|
678 | } HTTP_BANDWIDTH_LIMIT_INFO, *PHTTP_BANDWIDTH_LIMIT_INFO;
|
---|
679 |
|
---|
680 | typedef struct _HTTP_BINDING_INFO {
|
---|
681 | HTTP_PROPERTY_FLAGS Flags;
|
---|
682 | HANDLE RequestQueueHandle;
|
---|
683 | } HTTP_BINDING_INFO, *PHTTP_BINDING_INFO;
|
---|
684 |
|
---|
685 | typedef struct _HTTP_LISTEN_ENDPOINT_INFO {
|
---|
686 | HTTP_PROPERTY_FLAGS Flags;
|
---|
687 | BOOLEAN EnableSharing;
|
---|
688 | } HTTP_LISTEN_ENDPOINT_INFO, *PHTTP_LISTEN_ENDPOINT_INFO;
|
---|
689 |
|
---|
690 | HTTPAPI_LINKAGE ULONG WINAPI HttpSetRequestQueueProperty(HANDLE Handle,HTTP_SERVER_PROPERTY Property,PVOID pPropertyInformation,ULONG PropertyInformationLength,ULONG Reserved,PVOID pReserved);
|
---|
691 | HTTPAPI_LINKAGE ULONG WINAPI HttpQueryRequestQueueProperty(HANDLE Handle,HTTP_SERVER_PROPERTY Property,PVOID pPropertyInformation,ULONG PropertyInformationLength,ULONG Reserved,PULONG pReturnLength,PVOID pReserved);
|
---|
692 | HTTPAPI_LINKAGE ULONG WINAPI HttpCreateRequestQueue(HTTPAPI_VERSION Version,PCWSTR pName,PSECURITY_ATTRIBUTES pSecurityAttributes,ULONG Flags,PHANDLE pReqQueueHandle);
|
---|
693 | HTTPAPI_LINKAGE ULONG WINAPI HttpAddUrlToUrlGroup(HTTP_URL_GROUP_ID UrlGroupId,PCWSTR pFullyQualifiedUrl,HTTP_URL_CONTEXT UrlContext,ULONG Reserved);
|
---|
694 | HTTPAPI_LINKAGE ULONG WINAPI HttpCancelHttpRequest(HANDLE ReqQueueHandle,HTTP_REQUEST_ID RequestId,LPOVERLAPPED pOverlapped);
|
---|
695 | HTTPAPI_LINKAGE ULONG WINAPI HttpCloseRequestQueue(HANDLE ReqQueueHandle);
|
---|
696 | HTTPAPI_LINKAGE ULONG WINAPI HttpCloseServerSession(HTTP_SERVER_SESSION_ID ServerSessionId);
|
---|
697 | HTTPAPI_LINKAGE ULONG WINAPI HttpCloseUrlGroup(HTTP_URL_GROUP_ID UrlGroupId);
|
---|
698 | HTTPAPI_LINKAGE ULONG WINAPI HttpCreateServerSession(HTTPAPI_VERSION Version,PHTTP_SERVER_SESSION_ID pServerSessionId,ULONG Reserved);
|
---|
699 | HTTPAPI_LINKAGE ULONG WINAPI HttpCreateUrlGroup(HTTP_SERVER_SESSION_ID ServerSessionId,PHTTP_URL_GROUP_ID pUrlGroupId,ULONG Reserved);
|
---|
700 | HTTPAPI_LINKAGE ULONG WINAPI HttpQueryServerSessionProperty(HTTP_SERVER_SESSION_ID ServerSessionId,HTTP_SERVER_PROPERTY Property,PVOID pPropertyInformation,ULONG PropertyInformationLength,PULONG pReturnLength);
|
---|
701 | HTTPAPI_LINKAGE ULONG WINAPI HttpQueryUrlGroupProperty(HTTP_URL_GROUP_ID UrlGroupId,HTTP_SERVER_PROPERTY Property,PVOID pPropertyInformation,ULONG PropertyInformationLength,PULONG pReturnLength);
|
---|
702 | HTTPAPI_LINKAGE ULONG WINAPI HttpRemoveUrlFromUrlGroup(HTTP_URL_GROUP_ID UrlGroupId,PCWSTR pFullyQualifiedUrl,ULONG Flags);
|
---|
703 | HTTPAPI_LINKAGE ULONG WINAPI HttpSetServerSessionProperty(HTTP_SERVER_SESSION_ID ServerSessionId,HTTP_SERVER_PROPERTY Property,PVOID pPropertyInformation,ULONG PropertyInformationLength);
|
---|
704 | HTTPAPI_LINKAGE ULONG WINAPI HttpSetUrlGroupProperty(HTTP_URL_GROUP_ID UrlGroupId,HTTP_SERVER_PROPERTY Property,PVOID pPropertyInformation,ULONG PropertyInformationLength);
|
---|
705 | HTTPAPI_LINKAGE ULONG WINAPI HttpShutdownRequestQueue(HANDLE ReqQueueHandle);
|
---|
706 | HTTPAPI_LINKAGE ULONG WINAPI HttpWaitForDemandStart(HANDLE ReqQueueHandle,LPOVERLAPPED pOverlapped);
|
---|
707 |
|
---|
708 | #if (_WIN32_WINNT >= 0x0601)
|
---|
709 | typedef ULONG HTTP_SERVICE_CONFIG_CACHE_PARAM;
|
---|
710 |
|
---|
711 | typedef enum _HTTP_SERVICE_CONFIG_CACHE_KEY {
|
---|
712 | MaxCacheResponseSize = 0,
|
---|
713 | CacheRangeChunkSize
|
---|
714 | } HTTP_SERVICE_CONFIG_CACHE_KEY;
|
---|
715 |
|
---|
716 | typedef struct _HTTP_FLOWRATE_INFO {
|
---|
717 | HTTP_PROPERTY_FLAGS Flags;
|
---|
718 | ULONG MaxBandwidth;
|
---|
719 | ULONG MaxPeakBandwidth;
|
---|
720 | ULONG BurstSize;
|
---|
721 | } HTTP_FLOWRATE_INFO, *PHTTP_FLOWRATE_INFO;
|
---|
722 |
|
---|
723 | typedef struct _HTTP_SERVICE_CONFIG_CACHE_SET {
|
---|
724 | HTTP_SERVICE_CONFIG_CACHE_KEY KeyDesc;
|
---|
725 | HTTP_SERVICE_CONFIG_CACHE_PARAM ParamDesc;
|
---|
726 | } HTTP_SERVICE_CONFIG_CACHE_SET, *PHTTP_SERVICE_CONFIG_CACHE_SET;
|
---|
727 |
|
---|
728 | #endif /*(_WIN32_WINNT >= 0x0601)*/
|
---|
729 |
|
---|
730 | #endif /*(_WIN32_WINNT >= 0x0600)*/
|
---|
731 |
|
---|
732 | #ifdef __cplusplus
|
---|
733 | }
|
---|
734 | #endif
|
---|
735 |
|
---|
736 | #endif /* __HTTP_H__ */
|
---|