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.

1542 lines
38 KiB

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