Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1537 lines
38 KiB

  1. /*++
  2. Copyright (c) 1998-2002 Microsoft Corporation
  3. Module Name:
  4. HttpP.h
  5. Abstract:
  6. Private APIs and structs for HTTP.SYS
  7. Author:
  8. --*/
  9. #ifndef __HTTPP_H__
  10. #define __HTTPP_H__
  11. #include <http.h>
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif // __cplusplus
  15. //
  16. // Used by HttpInitialize & HttpTerminate
  17. //
  18. // HTTP_INITIALIZE_CLIENT - Initializes the HTTP API layer and driver for
  19. // client applications.
  20. //
  21. #define HTTP_INITIALIZE_CLIENT 0x00000004
  22. // HTTP_SEND_REPONSE_RAW_HEADER - Specifies that a caller of
  23. // HttpSendResponseEntityBody() is intentionally omitting a call to
  24. // HttpSendHttpResponse() in order to bypass normal header processing. The
  25. // actual HTTP headers will be generated by the application and sent
  26. // as the initial part of the entity body. This flag should be passed
  27. // on the first call to HttpSendResponseEntityBody(), and not after.
  28. //
  29. #define HTTP_SEND_RESPONSE_FLAG_RAW_HEADER 0x00000004
  30. //
  31. // Flags for HttpSendHttpRequest() & HttpSendRequestEntityBody()
  32. //
  33. #define HTTP_SEND_REQUEST_FLAG_MORE_DATA 0x00000001
  34. #define HTTP_SEND_REQUEST_FLAG_VALID 0x00000001
  35. //
  36. // HTTP_REQUEST_FLAG_DONT_PIPELINE - Requests that do not take entity bodies
  37. // (e.g., GETs, HEAD, etc) are pipelined when sent to a HTTP 1.1 server. This
  38. // flag allows the user to disable this feature.
  39. //
  40. #define HTTP_REQUEST_FLAG_DONT_PIPELINE 0x00000002
  41. //
  42. // Values for HTTP_RESPONSE::Flags. Zero or more of these may be ORed together.
  43. //
  44. // HTTP_RESPONSE_FLAG_AUTH_BASIC - The response contains a Basic
  45. // authentication challenge.
  46. //
  47. // HTTP_RESPONSE_FLAG_AUTH_DIGEST - The response contains a Digest
  48. // authentication challenge.
  49. //
  50. // HTTP_RESPONSE_FLAG_AUTH_NTLM - The response contains an NTLM
  51. // authentication challenge.
  52. //
  53. // HTTP_RESPONSE_FLAG_AUTH_NEGOTIATE - The response contains a Negotiate
  54. // authentication challenge.
  55. //
  56. // HTTP_RESPONSE_FLAG_AUTH_KERBEROS - The response contains a Kerberos
  57. // authentication challenge.
  58. //
  59. // HTTP_RESPONSE_FLAG_MORE_DATA - There is more HTTP_RESPONSE to be read.
  60. //
  61. // HTTP_RESPONSE_FLAG_HEADER - The response contains at least 1 header
  62. // (known or unknown.)
  63. //
  64. // HTTP_RESPONSE_FLAG_ENTITY - The response contains at least one
  65. // entity chunk.
  66. //
  67. // HTTP_RESPONSE_FLAG_DRIVER - The response should be treated as if
  68. // it had been generated by the driver
  69. //
  70. #define HTTP_RESPONSE_FLAG_AUTH_BASIC 0x00000001
  71. #define HTTP_RESPONSE_FLAG_AUTH_DIGEST 0x00000002
  72. #define HTTP_RESPONSE_FLAG_AUTH_NTLM 0x00000004
  73. #define HTTP_RESPONSE_FLAG_AUTH_NEGOTIATE 0x00000008
  74. #define HTTP_RESPONSE_FLAG_AUTH_KERBEROS 0x00000010
  75. #define HTTP_RESPONSE_FLAG_MORE_DATA 0x00000020
  76. #define HTTP_RESPONSE_FLAG_HEADER 0x00000040
  77. #define HTTP_RESPONSE_FLAG_ENTITY 0x00000080
  78. #define HTTP_RESPONSE_FLAG_DRIVER 0x00000100
  79. //
  80. // Generic option flags. These apply to application pools.
  81. // These are passed to HttpCreateHttpHandle.
  82. //
  83. // HTTP_OPTION_CONTROLLER - Opens the object that doesn't read data.
  84. //
  85. #define HTTP_OPTION_CONTROLLER 0x00000001
  86. #define HTTP_OPTION_VALID 0x00000001
  87. typedef HTTP_OPAQUE_ID HTTP_CONFIG_GROUP_ID, *PHTTP_CONFIG_GROUP_ID;
  88. //
  89. // Filters and SSL.
  90. //
  91. //
  92. // Server Information/Parameters (HTTP client-side only)
  93. //
  94. typedef struct _HTTP_CLIENT_SSL_CONTEXT
  95. {
  96. ULONG SslProtocolVersion;
  97. PVOID pClientCertContext;
  98. ULONG ServerCertValidation;
  99. ULONG ServerNameLength;
  100. WCHAR ServerName[ANYSIZE_ARRAY];
  101. } HTTP_CLIENT_SSL_CONTEXT, *PHTTP_CLIENT_SSL_CONTEXT;
  102. //
  103. // Data associated with raw transport connections.
  104. //
  105. typedef struct _HTTP_RAW_CONNECTION_INFO
  106. {
  107. //
  108. // Connection ID.
  109. //
  110. HTTP_RAW_CONNECTION_ID ConnectionId;
  111. //
  112. // Transport address info.
  113. //
  114. HTTP_TRANSPORT_ADDRESS Address;
  115. //
  116. // Only used by the client-side.
  117. //
  118. USHORT ClientSSLContextLength;
  119. PHTTP_CLIENT_SSL_CONTEXT pClientSSLContext;
  120. //
  121. // Initial data.
  122. //
  123. ULONG InitialDataSize; // size of initial data
  124. PVOID pInitialData; // pointer to initial data
  125. } HTTP_RAW_CONNECTION_INFO, *PHTTP_RAW_CONNECTION_INFO;
  126. //
  127. // Flags for HttpReceiveClientCertificate().
  128. //
  129. // HTTP_RECEIVE_CLIENT_CERT_FLAG_MAP - Maps the client certificate to a token.
  130. //
  131. #define HTTP_RECEIVE_CLIENT_CERT_FLAG_MAP 0x00000001
  132. #define HTTP_RECEIVE_CLIENT_CERT_FLAG_VALID 0x00000001
  133. //
  134. // Names of the filters.
  135. //
  136. #define HTTP_SSL_SERVER_FILTER_CHANNEL_NAME L"SSLFilterChannel"
  137. #define HTTP_SSL_SERVER_FILTER_CHANNEL_NAME_LENGTH \
  138. (sizeof(HTTP_SSL_SERVER_FILTER_CHANNEL_NAME)-sizeof(WCHAR))
  139. #define HTTP_SSL_CLIENT_FILTER_CHANNEL_NAME L"SSLClientFilterChannel"
  140. #define HTTP_SSL_CLIENT_FILTER_CHANNEL_NAME_LENGTH \
  141. (sizeof(HTTP_SSL_CLIENT_FILTER_CHANNEL_NAME)-sizeof(WCHAR))
  142. //
  143. // Network QoS stuff.
  144. //
  145. typedef ULONG HTTP_BANDWIDTH_LIMIT, *PHTTP_BANDWIDTH_LIMIT;
  146. typedef ULONG HTTP_CONNECTION_LIMIT, *PHTTP_CONNECTION_LIMIT;
  147. //
  148. // Bandwidth throttling limit can not be set lower than the following
  149. // limit. The value is in bytes/sec.
  150. //
  151. #define HTTP_MIN_ALLOWED_BANDWIDTH_THROTTLING_RATE (1024)
  152. //
  153. // Distinguished value for bandwidth and connection limits indicating
  154. // "no limit".
  155. //
  156. #define HTTP_LIMIT_INFINITE ((ULONG)-1L)
  157. //
  158. // Enabled states. Used for configuration groups and the control channel.
  159. //
  160. typedef enum _HTTP_ENABLED_STATE
  161. {
  162. HttpEnabledStateActive,
  163. HttpEnabledStateInactive,
  164. HttpEnabledStateMaximum
  165. } HTTP_ENABLED_STATE, *PHTTP_ENABLED_STATE;
  166. //
  167. // AppPool Enabled states.
  168. //
  169. typedef enum _HTTP_APP_POOL_ENABLED_STATE
  170. {
  171. HttpAppPoolEnabled,
  172. HttpAppPoolDisabled_RapidFailProtection,
  173. HttpAppPoolDisabled_AppPoolQueueFull,
  174. HttpAppPoolDisabled_ByAdministrator,
  175. HttpAppPoolDisabled_JobObjectFired,
  176. HttpAppPoolEnabledMaximum
  177. } HTTP_APP_POOL_ENABLED_STATE, *PHTTP_APP_POOL_ENABLED_STATE;
  178. //
  179. // Load Balancer states.
  180. //
  181. typedef enum _HTTP_LOAD_BALANCER_CAPABILITIES
  182. {
  183. HttpLoadBalancerBasicCapability = 1,
  184. HttpLoadBalancerSophisticatedCapability = 2, // default
  185. HttpLoadBalancerMaximum
  186. } HTTP_LOAD_BALANCER_CAPABILITIES, *PHTTP_LOAD_BALANCER_CAPABILITIES;
  187. //
  188. // UTF8 Logging
  189. //
  190. typedef BOOLEAN HTTP_CONTROL_CHANNEL_UTF8_LOGGING, *PHTTP_CONTROL_CHANNEL_UTF8_LOGGING;
  191. //
  192. // Control channel query/set information classes used for the
  193. // HttpQueryControlChannelInformation() and HttpSetControlChannelInformation()
  194. // APIs.
  195. //
  196. typedef enum _HTTP_CONTROL_CHANNEL_INFORMATION_CLASS
  197. {
  198. //
  199. // Query/set the master state.
  200. //
  201. // pControlChannelInformation points to a HTTP_ENABLED_STATE enum.
  202. //
  203. HttpControlChannelStateInformation,
  204. //
  205. // Query/set the default network bandwidth limit.
  206. //
  207. // pControlChannelInformation points to a HTTP_BANDWIDTH_LIMIT value.
  208. //
  209. HttpControlChannelBandwidthInformation,
  210. //
  211. // Query the default network connections limit.
  212. //
  213. // pControlChannelInformation points to a HTTP_CONNECTION_LIMIT value.
  214. //
  215. HttpControlChannelConnectionInformation,
  216. //
  217. // Set the handle used to communicate with the Filter/SSL process.
  218. //
  219. // Note this cannot be queried.
  220. //
  221. HttpControlChannelFilterInformation,
  222. //
  223. // Set the global Connection Timeout information
  224. //
  225. // pControlChannelInformation points to a
  226. // HTTP_CONTROL_CHANNEL_TIMEOUT_LIMIT structure.
  227. //
  228. HttpControlChannelTimeoutInformation,
  229. //
  230. // Set the UTF8 Logging property for all sites
  231. //
  232. // pControlChannelInformation points to a HTTP_CONTROL_CHANNEL_UTF8_LOGGING structure.
  233. //
  234. HttpControlChannelUTF8Logging,
  235. //
  236. // Set the Binary Logging property for all cgroups belongs to this
  237. // control channel. This will effectively disables the conventional
  238. // logging. The pControlChannelInformation should point the binary
  239. // logging settings: HTTP_CONTROL_CHANNEL_BINARY_LOGGING. Please
  240. // note that when this is set, utf8 logging no longer applies since
  241. // http.sys doesn't do any string formatting.
  242. //
  243. HttpControlChannelBinaryLogging,
  244. //
  245. // Set the limit for number processes, below which we will still
  246. // complete Demand Start Irps. If the number of total active processes
  247. // across all AppPools associated with this control channel exceeds
  248. // this threshold, new requests that are queued to AppPools with a
  249. // pending Demand Start Irp will (1) not complete the Irp and
  250. // (2) will fail the request, returning 503 (Unavailable).
  251. //
  252. // pControlChannelInformation points to a
  253. // HTTP_CONTROL_CHANNEL_DEMAND_START_THRESHOLD structure.
  254. //
  255. HttpControlChannelDemandStartThreshold,
  256. HttpControlChannelMaximumInformation
  257. } HTTP_CONTROL_CHANNEL_INFORMATION_CLASS, *PHTTP_CONTROL_CHANNEL_INFORMATION_CLASS;
  258. //
  259. // Default control channel property values.
  260. //
  261. #define HTTP_CONTROL_CHANNEL_STATE_DEFAULT HttpEnabledStateInactive
  262. #define HTTP_CONTROL_CHANNEL_MAX_BANDWIDTH_DEFAULT HTTP_LIMIT_INFINITE
  263. //
  264. // Application pool query/set information classes used for the
  265. // HttpQueryAppPoolInformation() and HttpSetAppPoolInformation()
  266. // APIs.
  267. //
  268. typedef enum _HTTP_APP_POOL_INFORMATION_CLASS
  269. {
  270. //
  271. // Query/set the maximum number of queued new requests on
  272. // the application pool.
  273. //
  274. // pAppPoolInformation points to a LONG containing the maximum
  275. // number of queued requests.
  276. //
  277. HttpAppPoolQueueLengthInformation,
  278. //
  279. // Query/set the enabled state of the application pool.
  280. //
  281. // pAppPoolInformation points to a HTTP_APP_POOL_ENABLED_STATE enum.
  282. //
  283. HttpAppPoolStateInformation,
  284. //
  285. // Query/set the load balancer capabilities of the application pool.
  286. //
  287. // pAppPoolInformation points to a HTTP_LOAD_BALANCER_CAPABILITIES enum.
  288. //
  289. HttpAppPoolLoadBalancerInformation,
  290. //
  291. // Set the control channel associated with this application pool.
  292. //
  293. // pAppPoolInformation points to a HTTP_APP_POOL_CONTROL_CHANNEL structure
  294. //
  295. HttpAppPoolControlChannelInformation,
  296. HttpAppPoolMaximumInformation
  297. } HTTP_APP_POOL_INFORMATION_CLASS, *PHTTP_APP_POOL_INFORMATION_CLASS;
  298. //
  299. // Configuration group query/set information classes used for the
  300. // HttpQueryConfigGroupInformation() and HttpSetConfigGroupInformation() APIs.
  301. // Config Group inherit from control channel when cgroup is created.
  302. //
  303. typedef enum _HTTP_CONFIG_GROUP_INFORMATION_CLASS
  304. {
  305. //
  306. // Query/set the current state of the configuration group.
  307. //
  308. // pConfigGroupInformation points to a HTTP_CONFIG_GROUP_STATE structure
  309. // that receives the current state.
  310. //
  311. HttpConfigGroupStateInformation,
  312. //
  313. // Query/set the maximum network bandwidth allowed for the configuration
  314. // group.
  315. //
  316. // pConfigGroupInformation points to a HTTP_CONFIG_GROUP_MAX_BANDWIDTH
  317. // structure specifying the maximum bytes per second allowed for the
  318. // container.
  319. //
  320. HttpConfigGroupBandwidthInformation,
  321. //
  322. // Query/set the maximum network connections allowed for the
  323. // configuration group.
  324. //
  325. // pConfigGroupInformation points to a HTTP_CONFIG_GROUP_MAX_CONNECTIONS
  326. // structure containing the maximum number of network connections
  327. // allowed for the container.
  328. //
  329. HttpConfigGroupConnectionInformation,
  330. //
  331. // Set the application pool associated with the configuration group.
  332. //
  333. // pConfigGroupInformation points to a HTTP_CONFIG_GROUP_APP_POOL
  334. // structure containing the HANDLE of the application pool to
  335. // associate.
  336. //
  337. HttpConfigGroupAppPoolInformation,
  338. //
  339. // Set the logging related config settings.
  340. // This allows WAS to supply logging config as a config group setting.
  341. //
  342. // pConfigGroupInformation points to a HTTP_CONFIG_GROUP_LOGGING structure.
  343. //
  344. // Note: this cannot be queried.
  345. //
  346. HttpConfigGroupLogInformation,
  347. //
  348. // Set this information only on the root config object for the site.
  349. //
  350. // pConfigGroupInformation points to a HTTP_CONFIG_GROUP_SITE structure.
  351. //
  352. HttpConfigGroupSiteInformation,
  353. //
  354. // Set this information only on the root config object for the site.
  355. //
  356. // pConfigGroupInformation points to a DWORD that contains
  357. // the ConnectionTimeout value (in seconds)
  358. //
  359. HttpConfigGroupConnectionTimeoutInformation,
  360. HttpConfigGroupMaximumInformation
  361. } HTTP_CONFIG_GROUP_INFORMATION_CLASS, *PHTTP_CONFIG_GROUP_INFORMATION_CLASS;
  362. //
  363. // Generic configuration group property flags. Each structure defining a
  364. // property value must contain an element of this type.
  365. //
  366. typedef struct _HTTP_PROPERTY_FLAGS
  367. {
  368. ULONG_PTR Present:1; // ULONG_PTR for alignment
  369. } HTTP_PROPERTY_FLAGS, *PHTTP_PROPERTY_FLAGS;
  370. //
  371. // Individual property values.
  372. //
  373. // HttpControlChannelTimeoutInformation
  374. typedef struct _HTTP_CONTROL_CHANNEL_TIMEOUT_LIMIT
  375. {
  376. HTTP_PROPERTY_FLAGS Flags;
  377. ULONG ConnectionTimeout; // Seconds
  378. ULONG HeaderWaitTimeout; // Seconds
  379. ULONG MinFileKbSec; // Bytes/Second
  380. } HTTP_CONTROL_CHANNEL_TIMEOUT_LIMIT, *PHTTP_CONTROL_CHANNEL_TIMEOUT_LIMIT;
  381. // HttpControlChannelDemandStartThreshold
  382. typedef struct _HTTP_CONTROL_CHANNEL_DEMAND_START_THRESHOLD
  383. {
  384. HTTP_PROPERTY_FLAGS Flags;
  385. ULONG DemandStartThreshold; // App Pool Processes
  386. } HTTP_CONTROL_CHANNEL_DEMAND_START_THRESHOLD,
  387. *PHTTP_CONTROL_CHANNEL_DEMAND_START_THRESHOLD;
  388. // HttpAppPoolControlChannelInformation
  389. typedef struct _HTTP_APP_POOL_CONTROL_CHANNEL
  390. {
  391. HTTP_PROPERTY_FLAGS Flags;
  392. HANDLE ControlChannel;
  393. } HTTP_APP_POOL_CONTROL_CHANNEL, *PHTTP_APP_POOL_CONTROL_CHANNEL;
  394. typedef struct _HTTP_CONFIG_GROUP_STATE
  395. {
  396. HTTP_PROPERTY_FLAGS Flags;
  397. HTTP_ENABLED_STATE State;
  398. } HTTP_CONFIG_GROUP_STATE, *PHTTP_CONFIG_GROUP_STATE;
  399. typedef struct _HTTP_CONFIG_GROUP_MAX_BANDWIDTH
  400. {
  401. HTTP_PROPERTY_FLAGS Flags;
  402. HTTP_BANDWIDTH_LIMIT MaxBandwidth;
  403. } HTTP_CONFIG_GROUP_MAX_BANDWIDTH, *PHTTP_CONFIG_GROUP_MAX_BANDWIDTH;
  404. typedef struct _HTTP_CONFIG_GROUP_MAX_CONNECTIONS
  405. {
  406. HTTP_PROPERTY_FLAGS Flags;
  407. HTTP_CONNECTION_LIMIT MaxConnections;
  408. } HTTP_CONFIG_GROUP_MAX_CONNECTIONS, *PHTTP_CONFIG_GROUP_MAX_CONNECTIONS;
  409. typedef struct _HTTP_CONTROL_CHANNEL_FILTER
  410. {
  411. HTTP_PROPERTY_FLAGS Flags;
  412. HANDLE FilterHandle;
  413. BOOLEAN FilterOnlySsl;
  414. } HTTP_CONTROL_CHANNEL_FILTER, *PHTTP_CONTROL_CHANNEL_FILTER;
  415. typedef struct _HTTP_CONFIG_GROUP_APP_POOL
  416. {
  417. HTTP_PROPERTY_FLAGS Flags;
  418. HANDLE AppPoolHandle;
  419. } HTTP_CONFIG_GROUP_APP_POOL, *PHTTP_CONFIG_GROUP_APP_POOL;
  420. typedef struct _HTTP_CONFIG_GROUP_SECURITY
  421. {
  422. HTTP_PROPERTY_FLAGS Flags;
  423. PSECURITY_DESCRIPTOR pSecurityDescriptor;
  424. } HTTP_CONFIG_GROUP_SECURITY, *PHTTP_CONFIG_GROUP_SECURITY;
  425. //
  426. // Log file truncation size can not be set lower than the following
  427. // limit. The value is in bytes.
  428. //
  429. #define HTTP_MIN_ALLOWED_TRUNCATE_SIZE_FOR_LOG_FILE (1 * 1024 * 1024)
  430. typedef enum _HTTP_LOGGING_TYPE
  431. {
  432. HttpLoggingTypeW3C,
  433. HttpLoggingTypeIIS,
  434. HttpLoggingTypeNCSA,
  435. HttpLoggingTypeRaw,
  436. HttpLoggingTypeMaximum
  437. } HTTP_LOGGING_TYPE, *PHTTP_LOGGING_TYPE;
  438. typedef enum _HTTP_LOGGING_PERIOD
  439. {
  440. HttpLoggingPeriodMaxSize = 0,
  441. HttpLoggingPeriodDaily = 1,
  442. HttpLoggingPeriodWeekly = 2,
  443. HttpLoggingPeriodMonthly = 3,
  444. HttpLoggingPeriodHourly = 4,
  445. HttpLoggingPeriodMaximum
  446. } HTTP_LOGGING_PERIOD, *PHTTP_LOGGING_PERIOD;
  447. typedef enum _HTTP_SELECTIVE_LOGGING_TYPE
  448. {
  449. HttpLogAllRequests,
  450. HttpLogSuccessfulRequests,
  451. HttpLogErrorRequests,
  452. HttpSelectiveLoggingMaximum
  453. } HTTP_SELECTIVE_LOGGING_TYPE, *PHTTP_SELECTIVE_LOGGING_TYPE;
  454. typedef struct _HTTP_CONFIG_GROUP_LOGGING
  455. {
  456. //
  457. // To indicate if this property exists or not in the config group
  458. //
  459. HTTP_PROPERTY_FLAGS Flags;
  460. //
  461. // This is field's counterpart in the metabase is LogType
  462. //
  463. BOOLEAN LoggingEnabled;
  464. //
  465. // Indicates the Logging Format
  466. //
  467. HTTP_LOGGING_TYPE LogFormat;
  468. //
  469. // Indicates the exact directory where the log file
  470. // will be written to for a site.
  471. //
  472. UNICODE_STRING LogFileDir;
  473. //
  474. // Log Period in terms of HTTP_LOGGING_PERIOD
  475. // 0 = MAX SIZE, 1 = DAILY, 2 = WEEKLY,
  476. // 3 = MONTHLY, 4 = HOURLY
  477. //
  478. ULONG LogPeriod;
  479. //
  480. // Indicates the max size,in bytes,after which the
  481. // log file should be rotated. A value of -1
  482. // (HTTP_LIMIT_INFINITE) indicates unlimited size.
  483. //
  484. ULONG LogFileTruncateSize;
  485. //
  486. // A bitmask indicating which fields to log when
  487. // LogFormat is set to W3C Extended
  488. //
  489. ULONG LogExtFileFlags;
  490. //
  491. // If this has been set then we recycle log files
  492. // based on the local time for this site. Default
  493. // should be FALSE.
  494. //
  495. BOOLEAN LocaltimeRollover;
  496. //
  497. // Selective logging type. If HttpLogAllRequests
  498. // is picked all types of requests are logged.
  499. //
  500. HTTP_SELECTIVE_LOGGING_TYPE SelectiveLogging;
  501. } HTTP_CONFIG_GROUP_LOGGING, *PHTTP_CONFIG_GROUP_LOGGING;
  502. //
  503. // When LogFormat is Raw (Binary) and logging settings are
  504. // configured through control channel for all sites, following
  505. // binary logging settings structure should be used.
  506. //
  507. typedef struct _HTTP_CONTROL_CHANNEL_BINARY_LOGGING
  508. {
  509. //
  510. // To indicate if this property exist or not
  511. // in the config group
  512. //
  513. HTTP_PROPERTY_FLAGS Flags;
  514. //
  515. // This is field's counterpart in the metabase is
  516. // LogType
  517. //
  518. BOOLEAN LoggingEnabled;
  519. //
  520. // If this has been set then we recycle log files
  521. // based on the local time for this site. Default
  522. // should be FALSE.
  523. //
  524. BOOLEAN LocaltimeRollover;
  525. //
  526. // Indicates the exact directory where the log file
  527. // will be written to for a site.
  528. //
  529. UNICODE_STRING LogFileDir;
  530. //
  531. // Log Period in terms of HTTP_LOGGING_PERIOD
  532. // 0 = MAX SIZE, 1 = DAILY, 2 = WEEKLY,
  533. // 3 = MONTHLY, 4 = HOURLY
  534. //
  535. ULONG LogPeriod;
  536. //
  537. // Indicates the max size,in bytes,after which the
  538. // log file should be rotated. A value of -1
  539. // (HTTP_LIMIT_INFINITE) indicates unlimited size.
  540. //
  541. ULONG LogFileTruncateSize;
  542. } HTTP_CONTROL_CHANNEL_BINARY_LOGGING,
  543. * PHTTP_CONTROL_CHANNEL_BINARY_LOGGING;
  544. //
  545. // HTTP_CONFIG_GROUP_SITE
  546. //
  547. typedef struct _HTTP_CONFIG_GROUP_SITE
  548. {
  549. ULONG SiteId;
  550. } HTTP_CONFIG_GROUP_SITE, *PHTTP_CONFIG_GROUP_SITE;
  551. //
  552. // This structure holds all the necessary logging info.
  553. // Server App may pass this with last SendResponse or
  554. // SendEntityBody APIs.Unicode field lengths are in bytes.
  555. //
  556. typedef struct _HTTP_LOG_FIELDS_DATA
  557. {
  558. USHORT UserNameLength;
  559. USHORT UriStemLength;
  560. USHORT ClientIpLength;
  561. USHORT ServerNameLength;
  562. USHORT ServiceNameLength;
  563. USHORT ServerIpLength;
  564. USHORT MethodLength;
  565. USHORT UriQueryLength;
  566. USHORT HostLength;
  567. USHORT UserAgentLength;
  568. USHORT CookieLength;
  569. USHORT ReferrerLength;
  570. PCWSTR UserName;
  571. PCWSTR UriStem;
  572. PCSTR ClientIp;
  573. PCSTR ServerName;
  574. PCSTR ServiceName;
  575. PCSTR ServerIp;
  576. PCSTR Method;
  577. PCSTR UriQuery;
  578. PCSTR Host;
  579. PCSTR UserAgent;
  580. PCSTR Cookie;
  581. PCSTR Referrer;
  582. USHORT ServerPort;
  583. USHORT ProtocolStatus;
  584. ULONG Win32Status;
  585. HTTP_VERB MethodNum;
  586. USHORT SubStatus;
  587. } HTTP_LOG_FIELDS_DATA, *PHTTP_LOG_FIELDS_DATA;
  588. //
  589. // For transfers between filters and upper levels.
  590. //
  591. typedef enum _HTTP_FILTER_BUFFER_TYPE
  592. {
  593. HttpFilterBufferHttpStream, // both directions
  594. HttpFilterBufferSslInitInfo, // filter -> app
  595. HttpFilterBufferSslServerCert, // filter -> app (HTTP client only)
  596. HttpFilterBufferSslClientCert, // filter -> app
  597. HttpFilterBufferSslClientCertAndMap, // filter -> app
  598. HttpFilterBufferSslRenegotiate, // app -> filter
  599. HttpFilterBufferSslRenegotiateAndMap, // app -> filter
  600. HttpFilterBufferCloseConnection, // app -> filter
  601. HttpFilterBufferNotifyDisconnect, // filter -> app
  602. HttpFilterBufferMaximum
  603. } HTTP_FILTER_BUFFER_TYPE, *PHTTP_FILTER_BUFFER_TYPE;
  604. //
  605. // The buffer transferred between filters and upper levels.
  606. //
  607. typedef struct _HTTP_FILTER_BUFFER
  608. {
  609. HTTP_FILTER_BUFFER_TYPE BufferType;
  610. ULONG BufferSize;
  611. PUCHAR pBuffer;
  612. ULONGLONG Reserved;
  613. } HTTP_FILTER_BUFFER, *PHTTP_FILTER_BUFFER;
  614. //
  615. // Appends write buffer info to the filter buffer struct. This is used for
  616. // posting both a read and a write in a single IOCTL call.
  617. //
  618. typedef struct _HTTP_FILTER_BUFFER_PLUS
  619. {
  620. HTTP_FILTER_BUFFER_TYPE BufferType;
  621. ULONG BufferSize;
  622. PUCHAR pBuffer;
  623. ULONGLONG Reserved;
  624. ULONG WriteBufferSize;
  625. PUCHAR pWriteBuffer;
  626. } HTTP_FILTER_BUFFER_PLUS, *PHTTP_FILTER_BUFFER_PLUS;
  627. //
  628. // Counter Group.
  629. //
  630. //
  631. // Counter property description.
  632. //
  633. typedef struct _HTTP_PROP_DESC
  634. {
  635. ULONG Size;
  636. ULONG Offset;
  637. BOOLEAN WPZeros;
  638. } HTTP_PROP_DESC, *PHTTP_PROP_DESC;
  639. //
  640. // This enum defines the available counter groups.
  641. //
  642. typedef enum _HTTP_COUNTER_GROUP
  643. {
  644. HttpCounterGroupSite,
  645. HttpCounterGroupGlobal,
  646. HttpCounterGroupMaximum
  647. } HTTP_COUNTER_GROUP, *PHTTP_COUNTER_GROUP;
  648. //
  649. // This enum defines the type of global couters.
  650. //
  651. typedef enum _HTTP_GLOBAL_COUNTER_ID
  652. {
  653. HttpGlobalCounterCurrentUrisCached,
  654. HttpGlobalCounterTotalUrisCached,
  655. HttpGlobalCounterUriCacheHits,
  656. HttpGlobalCounterUriCacheMisses,
  657. HttpGlobalCounterUriCacheFlushes,
  658. HttpGlobalCounterTotalFlushedUris,
  659. HttpGlobalCounterMaximum
  660. } HTTP_GLOBAL_COUNTER_ID, *PHTTP_GLOBAL_COUNTER_ID;
  661. //
  662. // Global couters.
  663. //
  664. typedef struct _HTTP_GLOBAL_COUNTERS
  665. {
  666. ULONG CurrentUrisCached;
  667. ULONG TotalUrisCached;
  668. ULONG UriCacheHits;
  669. ULONG UriCacheMisses;
  670. ULONG UriCacheFlushes;
  671. ULONG TotalFlushedUris;
  672. } HTTP_GLOBAL_COUNTERS, *PHTTP_GLOBAL_COUNTERS;
  673. //
  674. // This enum defines the type of site counters.
  675. // NB: HTTP_SITE_COUNTER_ID and HTTP_SITE_COUNTERS
  676. // must be in the same order
  677. //
  678. typedef enum _HTTP_SITE_COUNTER_ID
  679. {
  680. HttpSiteCounterBytesSent,
  681. HttpSiteCounterBytesReceived,
  682. HttpSiteCounterBytesTransfered,
  683. HttpSiteCounterCurrentConns,
  684. HttpSiteCounterMaxConnections,
  685. HttpSiteCounterConnAttempts,
  686. HttpSiteCounterGetReqs,
  687. HttpSiteCounterHeadReqs,
  688. HttpSiteCounterAllReqs,
  689. HttpSiteCounterMeasuredIoBandwidthUsage,
  690. HttpSiteCounterCurrentBlockedBandwidthBytes,
  691. HttpSiteCounterTotalBlockedBandwidthBytes,
  692. HttpSiteCounterMaximum
  693. } HTTP_SITE_COUNTER_ID, *PHTTP_SITE_COUNTER_ID;
  694. //
  695. // Site counters.
  696. //
  697. typedef struct _HTTP_SITE_COUNTERS
  698. {
  699. ULONG SiteId;
  700. ULONGLONG BytesSent;
  701. ULONGLONG BytesReceived;
  702. ULONGLONG BytesTransfered;
  703. ULONG CurrentConns;
  704. ULONG MaxConnections;
  705. ULONG ConnAttempts;
  706. ULONG GetReqs;
  707. ULONG HeadReqs;
  708. ULONG AllReqs;
  709. ULONG MeasuredIoBandwidthUsage;
  710. ULONG CurrentBlockedBandwidthBytes;
  711. ULONG TotalBlockedBandwidthBytes;
  712. } HTTP_SITE_COUNTERS, *PHTTP_SITE_COUNTERS;
  713. // ***************************************************************************
  714. //
  715. // Data structures for Client APIs (Begin)
  716. //
  717. // ***************************************************************************
  718. //
  719. // These are used for setting per-request config options.
  720. //
  721. typedef enum _HTTP_REQUEST_CONFIG_ID
  722. {
  723. HttpRequestConfigAuthentication,
  724. HttpRequestConfigProxyAuthentication,
  725. HttpRequestConfigConnectionIndex,
  726. HttpRequestConfigMaxConfigId
  727. } HTTP_REQUEST_CONFIG_ID, *PHTTP_REQUEST_CONFIG_ID;
  728. typedef struct _HTTP_REQUEST_CONFIG
  729. {
  730. HTTP_REQUEST_CONFIG_ID ObjectType;
  731. PVOID pValue;
  732. ULONG ValueLength;
  733. } HTTP_REQUEST_CONFIG, *PHTTP_REQUEST_CONFIG;
  734. typedef enum _HTTP_AUTH_TYPE
  735. {
  736. HttpAuthTypeAutoSelect = 0,
  737. HttpAuthTypeBasic,
  738. HttpAuthTypeDigest,
  739. HttpAuthTypeNTLM,
  740. HttpAuthTypeNegotiate,
  741. HttpAuthTypeKerberos,
  742. HttpAuthTypesCount
  743. } HTTP_AUTH_TYPE, *PHTTP_AUTH_TYPE;
  744. #define HTTP_AUTH_FLAGS_DEFAULT_CREDENTIALS 0x00000001
  745. #define HTTP_AUTH_FLAGS_VALID 0x00000001
  746. //
  747. // The config object for HttpRequestConfigAuthentication,
  748. // HttpRequestConfigProxyAuthentication types.
  749. //
  750. typedef struct _HTTP_AUTH_CREDENTIALS
  751. {
  752. HTTP_AUTH_TYPE AuthType;
  753. ULONG AuthFlags;
  754. USHORT UserNameLength; // In bytes, not including NUL
  755. USHORT PasswordLength; // In bytes, not including NUL
  756. USHORT DomainLength; // In bytes, not including NUL
  757. PCWSTR pUserName;
  758. PCWSTR pPassword;
  759. PCWSTR pDomain;
  760. USHORT HeaderValueLength;
  761. PCSTR pHeaderValue; // The value of WWW-Authenticate header
  762. // or Proxy-Authenticate header as returned
  763. // by the server.
  764. } HTTP_AUTH_CREDENTIALS, *PHTTP_AUTH_CREDENTIALS;
  765. //
  766. // This is for setting configuration on a ServerContext -
  767. // Via HttpSetServerContextInformation & HttpQueryServerContextInformation.
  768. //
  769. typedef enum _HTTP_SERVER_CONFIG_ID
  770. {
  771. HttpServerConfigConnectionCount, // set & query
  772. HttpServerConfigProxyPreAuthState, // set & query
  773. HttpServerConfigProxyPreAuthFlushCache, // only set
  774. HttpServerConfigPreAuthState, // set & query
  775. HttpServerConfigPreAuthFlushURICache, // only set
  776. HttpServerConfigIgnoreContinueState, // set & query
  777. HttpServerConfigConnectionTimeout, // set & query
  778. HttpServerConfigServerCert, // only query
  779. HttpServerConfigServerCertValidation, // set & query
  780. HttpServerConfigServerCertAccept, // only set
  781. HttpServerConfigSslProtocolVersion, // set & query
  782. HttpServerConfigClientCert, // set & query
  783. HttpServerConfigClientCertIssuerList, // only query
  784. HttpServerConfigMaxInformation
  785. } HTTP_SERVER_CONFIG_ID, *PHTTP_SERVER_CONFIG_ID;
  786. //
  787. // Validate server certificate types
  788. //
  789. typedef enum _HTTP_SSL_SERVER_CERT_VALIDATION
  790. {
  791. HttpSslServerCertValidationIgnore,
  792. HttpSslServerCertValidationManual,
  793. HttpSslServerCertValidationManualOnce,
  794. HttpSslServerCertValidationAutomatic,
  795. HttpSslServerCertValidationMax
  796. } HTTP_SSL_SERVER_CERT_VALIDATION, *PHTTP_SSL_SERVER_CERT_VALIDATION;
  797. //
  798. // Server certificate information
  799. //
  800. typedef struct _HTTP_SSL_CERT_ISSUER_INFO
  801. {
  802. ULONG IssuerCount;
  803. ULONG IssuerListLength;
  804. PVOID pIssuerList;
  805. } HTTP_SSL_CERT_ISSUER_INFO, *PHTTP_SSL_CERT_ISSUER_INFO;
  806. typedef struct _HTTP_SSL_SERIALIZED_CERT
  807. {
  808. ULONG Flags;
  809. #define HTTP_SSL_CERT_HASH_LENGTH 32
  810. ULONG CertHashLength:8;
  811. UCHAR CertHash[HTTP_SSL_CERT_HASH_LENGTH];
  812. PUCHAR pSerializedCert;
  813. ULONG SerializedCertLength;
  814. PUCHAR pSerializedCertStore;
  815. ULONG SerializedCertStoreLength;
  816. } HTTP_SSL_SERIALIZED_CERT, *PHTTP_SSL_SERIALIZED_CERT;
  817. typedef struct _HTTP_SSL_SERVER_CERT_INFO
  818. {
  819. ULONG Status;
  820. HTTP_SSL_CERT_ISSUER_INFO IssuerInfo;
  821. HTTP_SSL_SERIALIZED_CERT Cert;
  822. } HTTP_SSL_SERVER_CERT_INFO, *PHTTP_SSL_SERVER_CERT_INFO;
  823. // ***************************************************************************
  824. //
  825. // Data structures for Client APIs (End)
  826. //
  827. // ***************************************************************************
  828. //
  829. // Define our API linkage.
  830. //
  831. #if !defined(HTTPAPI_LINKAGE)
  832. #define HTTPAPI_LINKAGE DECLSPEC_IMPORT
  833. #endif // !HTTPAPI_LINKAGE
  834. //
  835. // Control channel APIs.
  836. //
  837. HTTPAPI_LINKAGE
  838. ULONG
  839. WINAPI
  840. HttpOpenControlChannel(
  841. OUT PHANDLE pControlChannelHandle,
  842. IN ULONG Options
  843. );
  844. HTTPAPI_LINKAGE
  845. ULONG
  846. WINAPI
  847. HttpQueryControlChannelInformation(
  848. IN HANDLE ControlChannelHandle,
  849. IN HTTP_CONTROL_CHANNEL_INFORMATION_CLASS InformationClass,
  850. OUT PVOID pControlChannelInformation,
  851. IN ULONG Length,
  852. OUT PULONG pReturnLength OPTIONAL
  853. );
  854. HTTPAPI_LINKAGE
  855. ULONG
  856. WINAPI
  857. HttpSetControlChannelInformation(
  858. IN HANDLE ControlChannelHandle,
  859. IN HTTP_CONTROL_CHANNEL_INFORMATION_CLASS InformationClass,
  860. IN PVOID pControlChannelInformation,
  861. IN ULONG Length
  862. );
  863. //
  864. // Configuration Group APIs.
  865. //
  866. HTTPAPI_LINKAGE
  867. ULONG
  868. WINAPI
  869. HttpCreateConfigGroup(
  870. IN HANDLE ControlChannelHandle,
  871. OUT PHTTP_CONFIG_GROUP_ID pConfigGroupId
  872. );
  873. HTTPAPI_LINKAGE
  874. ULONG
  875. WINAPI
  876. HttpDeleteConfigGroup(
  877. IN HANDLE ControlChannelHandle,
  878. IN HTTP_CONFIG_GROUP_ID ConfigGroupId
  879. );
  880. HTTPAPI_LINKAGE
  881. ULONG
  882. WINAPI
  883. HttpAddUrlToConfigGroup(
  884. IN HANDLE ControlChannelHandle,
  885. IN HTTP_CONFIG_GROUP_ID ConfigGroupId,
  886. IN PCWSTR pFullyQualifiedUrl,
  887. IN HTTP_URL_CONTEXT UrlContext
  888. );
  889. HTTPAPI_LINKAGE
  890. ULONG
  891. WINAPI
  892. HttpRemoveUrlFromConfigGroup(
  893. IN HANDLE ControlChannelHandle,
  894. IN HTTP_CONFIG_GROUP_ID ConfigGroupId,
  895. IN PCWSTR pFullyQualifiedUrl
  896. );
  897. HTTPAPI_LINKAGE
  898. ULONG
  899. WINAPI
  900. HttpRemoveAllUrlsFromConfigGroup(
  901. IN HANDLE ControlChannelHandle,
  902. IN HTTP_CONFIG_GROUP_ID ConfigGroupId
  903. );
  904. HTTPAPI_LINKAGE
  905. ULONG
  906. WINAPI
  907. HttpQueryConfigGroupInformation(
  908. IN HANDLE ControlChannelHandle,
  909. IN HTTP_CONFIG_GROUP_ID ConfigGroupId,
  910. IN HTTP_CONFIG_GROUP_INFORMATION_CLASS InformationClass,
  911. OUT PVOID pConfigGroupInformation,
  912. IN ULONG Length,
  913. OUT PULONG pReturnLength OPTIONAL
  914. );
  915. HTTPAPI_LINKAGE
  916. ULONG
  917. WINAPI
  918. HttpSetConfigGroupInformation(
  919. IN HANDLE ControlChannelHandle,
  920. IN HTTP_CONFIG_GROUP_ID ConfigGroupId,
  921. IN HTTP_CONFIG_GROUP_INFORMATION_CLASS InformationClass,
  922. IN PVOID pConfigGroupInformation,
  923. IN ULONG Length
  924. );
  925. //
  926. // Application Pool manipulation APIs.
  927. //
  928. HTTPAPI_LINKAGE
  929. ULONG
  930. WINAPI
  931. HttpCreateAppPool(
  932. OUT PHANDLE pAppPoolHandle,
  933. IN PCWSTR pAppPoolName,
  934. IN LPSECURITY_ATTRIBUTES pSecurityAttributes OPTIONAL,
  935. IN ULONG Options
  936. );
  937. HTTPAPI_LINKAGE
  938. ULONG
  939. WINAPI
  940. HttpOpenAppPool(
  941. OUT PHANDLE pAppPoolHandle,
  942. IN PCWSTR pAppPoolName,
  943. IN ULONG Options
  944. );
  945. HTTPAPI_LINKAGE
  946. ULONG
  947. WINAPI
  948. HttpShutdownAppPool(
  949. IN HANDLE AppPoolHandle
  950. );
  951. HTTPAPI_LINKAGE
  952. ULONG
  953. WINAPI
  954. HttpQueryAppPoolInformation(
  955. IN HANDLE AppPoolHandle,
  956. IN HTTP_APP_POOL_INFORMATION_CLASS InformationClass,
  957. OUT PVOID pAppPoolInformation,
  958. IN ULONG Length,
  959. OUT PULONG pReturnLength OPTIONAL
  960. );
  961. HTTPAPI_LINKAGE
  962. ULONG
  963. WINAPI
  964. HttpSetAppPoolInformation(
  965. IN HANDLE AppPoolHandle,
  966. IN HTTP_APP_POOL_INFORMATION_CLASS InformationClass,
  967. IN PVOID pAppPoolInformation,
  968. IN ULONG Length
  969. );
  970. //
  971. // Demand start notifications.
  972. //
  973. HTTPAPI_LINKAGE
  974. ULONG
  975. WINAPI
  976. HttpWaitForDemandStart(
  977. IN HANDLE AppPoolHandle,
  978. IN OUT PVOID pBuffer OPTIONAL,
  979. IN ULONG BufferLength OPTIONAL,
  980. IN PULONG pBytesReceived OPTIONAL,
  981. IN LPOVERLAPPED pOverlapped OPTIONAL
  982. );
  983. //
  984. // API calls for SSL/Filter helper process.
  985. //
  986. HTTPAPI_LINKAGE
  987. ULONG
  988. WINAPI
  989. HttpCreateFilter(
  990. OUT PHANDLE pFilterHandle,
  991. IN PCWSTR pFilterName,
  992. IN LPSECURITY_ATTRIBUTES pSecurityAttributes OPTIONAL,
  993. IN ULONG Options
  994. );
  995. HTTPAPI_LINKAGE
  996. ULONG
  997. WINAPI
  998. HttpOpenFilter(
  999. OUT PHANDLE pFilterHandle,
  1000. IN PCWSTR pFilterName,
  1001. IN ULONG Options
  1002. );
  1003. HTTPAPI_LINKAGE
  1004. ULONG
  1005. WINAPI
  1006. HttpShutdownFilter(
  1007. IN HANDLE FilterHandle
  1008. );
  1009. HTTPAPI_LINKAGE
  1010. ULONG
  1011. WINAPI
  1012. HttpFilterAccept(
  1013. IN HANDLE FilterHandle,
  1014. OUT PHTTP_RAW_CONNECTION_INFO pRawConnectionInfo,
  1015. IN ULONG RawConnectionInfoSize,
  1016. OUT PULONG pBytesReceived OPTIONAL,
  1017. IN LPOVERLAPPED pOverlapped OPTIONAL
  1018. );
  1019. HTTPAPI_LINKAGE
  1020. ULONG
  1021. WINAPI
  1022. HttpFilterClose(
  1023. IN HANDLE FilterHandle,
  1024. IN HTTP_RAW_CONNECTION_ID ConnectionId,
  1025. IN LPOVERLAPPED pOverlapped OPTIONAL
  1026. );
  1027. HTTPAPI_LINKAGE
  1028. ULONG
  1029. WINAPI
  1030. HttpFilterRawWriteAndAppRead(
  1031. IN HANDLE FilterHandle,
  1032. IN OUT PHTTP_FILTER_BUFFER_PLUS pHttpBufferPlus,
  1033. IN LPOVERLAPPED pOverlapped OPTIONAL
  1034. );
  1035. HTTPAPI_LINKAGE
  1036. ULONG
  1037. WINAPI
  1038. HttpFilterAppWriteAndRawRead(
  1039. IN HANDLE FilterHandle,
  1040. IN OUT PHTTP_FILTER_BUFFER_PLUS pHttpBufferPlus,
  1041. IN LPOVERLAPPED pOverlapped OPTIONAL
  1042. );
  1043. HTTPAPI_LINKAGE
  1044. ULONG
  1045. WINAPI
  1046. HttpFilterRawRead(
  1047. IN HANDLE FilterHandle,
  1048. IN HTTP_RAW_CONNECTION_ID ConnectionId,
  1049. OUT PVOID pBuffer,
  1050. IN ULONG BufferSize,
  1051. OUT PULONG pBytesReceived OPTIONAL,
  1052. IN LPOVERLAPPED pOverlapped OPTIONAL
  1053. );
  1054. HTTPAPI_LINKAGE
  1055. ULONG
  1056. WINAPI
  1057. HttpFilterRawWrite(
  1058. IN HANDLE FilterHandle,
  1059. IN HTTP_RAW_CONNECTION_ID ConnectionId,
  1060. IN PVOID pBuffer,
  1061. IN ULONG BufferSize,
  1062. OUT PULONG pBytesReceived OPTIONAL,
  1063. IN LPOVERLAPPED pOverlapped OPTIONAL
  1064. );
  1065. HTTPAPI_LINKAGE
  1066. ULONG
  1067. WINAPI
  1068. HttpFilterAppRead(
  1069. IN HANDLE FilterHandle,
  1070. IN HTTP_RAW_CONNECTION_ID ConnectionId,
  1071. IN OUT PHTTP_FILTER_BUFFER pBuffer,
  1072. IN ULONG BufferSize,
  1073. OUT PULONG pBytesReceived OPTIONAL,
  1074. IN LPOVERLAPPED pOverlapped OPTIONAL
  1075. );
  1076. HTTPAPI_LINKAGE
  1077. ULONG
  1078. WINAPI
  1079. HttpFilterAppWrite(
  1080. IN HANDLE FilterHandle,
  1081. IN HTTP_RAW_CONNECTION_ID ConnectionId,
  1082. IN OUT PHTTP_FILTER_BUFFER pBuffer,
  1083. IN ULONG BufferSize,
  1084. OUT PULONG pBytesReceived OPTIONAL,
  1085. IN LPOVERLAPPED pOverlapped OPTIONAL
  1086. );
  1087. //
  1088. // Counter Group APIs.
  1089. //
  1090. HTTPAPI_LINKAGE
  1091. ULONG
  1092. WINAPI
  1093. HttpGetCounters(
  1094. IN HANDLE ControlChannelHandle,
  1095. IN HTTP_COUNTER_GROUP CounterGroup,
  1096. IN OUT PULONG pCounterBlockSize,
  1097. IN OUT PVOID pCounterBlocks,
  1098. OUT PULONG pNumInstances OPTIONAL
  1099. );
  1100. //
  1101. // HTTP client APIs
  1102. //
  1103. HTTPAPI_LINKAGE
  1104. ULONG
  1105. WINAPI
  1106. HttpInitializeServerContext(
  1107. IN USHORT ServerNameLength,
  1108. IN PWSTR pServerName,
  1109. IN USHORT ProxyLength OPTIONAL,
  1110. IN PWSTR pProxy OPTIONAL,
  1111. IN ULONG ServerFlags OPTIONAL,
  1112. IN PVOID pReserved,
  1113. OUT PHANDLE pServerHandle
  1114. );
  1115. HTTPAPI_LINKAGE
  1116. ULONG
  1117. WINAPI
  1118. HttpSendHttpRequest(
  1119. IN HANDLE ServerHandle,
  1120. IN PHTTP_REQUEST pHttpRequest,
  1121. IN ULONG HttpRequestFlags,
  1122. IN USHORT RequestConfigCount OPTIONAL,
  1123. IN PHTTP_REQUEST_CONFIG pRequestConfig OPTIONAL,
  1124. IN LPOVERLAPPED pOverlapped OPTIONAL,
  1125. IN ULONG ResponseBufferLength OPTIONAL,
  1126. OUT PHTTP_RESPONSE pResponseBuffer OPTIONAL,
  1127. IN ULONG Reserved, // must be 0
  1128. OUT PVOID pReserved, // must be NULL
  1129. OUT PULONG pBytesReceived OPTIONAL,
  1130. OUT PHTTP_REQUEST_ID pRequestID
  1131. );
  1132. HTTPAPI_LINKAGE
  1133. ULONG
  1134. WINAPI
  1135. HttpSendRequestEntityBody(
  1136. IN HANDLE ServerHandle,
  1137. IN HTTP_REQUEST_ID RequestID,
  1138. IN ULONG Flags,
  1139. IN USHORT EntityBodyCount,
  1140. IN PHTTP_DATA_CHUNK pHttpEntityBody,
  1141. IN LPOVERLAPPED pOverlapped OPTIONAL
  1142. );
  1143. HTTPAPI_LINKAGE
  1144. ULONG
  1145. WINAPI
  1146. HttpReceiveHttpResponse(
  1147. IN HANDLE ServerHandle,
  1148. IN HTTP_REQUEST_ID RequestID,
  1149. IN ULONG Flags,
  1150. IN ULONG ResponseBufferLength,
  1151. OUT PHTTP_RESPONSE pResponseBuffer,
  1152. IN ULONG Reserved, // must be 0
  1153. OUT PVOID pReserved, // must be NULL
  1154. OUT PULONG pBytesReceived OPTIONAL,
  1155. IN LPOVERLAPPED pOverlapped OPTIONAL
  1156. );
  1157. HTTPAPI_LINKAGE
  1158. ULONG
  1159. WINAPI
  1160. HttpSetServerContextInformation(
  1161. IN HANDLE ServerHandle,
  1162. IN HTTP_SERVER_CONFIG_ID ConfigId,
  1163. IN PVOID pInputBuffer,
  1164. IN ULONG InputBufferLength,
  1165. IN LPOVERLAPPED pOverlapped OPTIONAL
  1166. );
  1167. HTTPAPI_LINKAGE
  1168. ULONG
  1169. WINAPI
  1170. HttpQueryServerContextInformation(
  1171. IN HANDLE ServerHandle,
  1172. IN HTTP_SERVER_CONFIG_ID ConfigId,
  1173. IN PVOID pReserved1,
  1174. IN ULONG Reserved2,
  1175. OUT PVOID pOutputBuffer,
  1176. IN ULONG OutputBufferLength,
  1177. OUT PULONG pReturnLength,
  1178. IN LPOVERLAPPED pOverlapped OPTIONAL
  1179. );
  1180. HTTPAPI_LINKAGE
  1181. ULONG
  1182. WINAPI
  1183. HttpCancelHttpRequest(
  1184. IN HANDLE ServerHandle,
  1185. IN HTTP_REQUEST_ID RequestID,
  1186. IN ULONG Flags,
  1187. IN LPOVERLAPPED pOverlapped OPTIONAL
  1188. );
  1189. #ifdef __cplusplus
  1190. } // extern "C"
  1191. #endif // __cplusplus
  1192. #endif // __HTTPP_H__