Source code of Windows XP (NT5)
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.

873 lines
21 KiB

  1. /*++
  2. Copyright (c) 1997-1999 Microsoft Corporation
  3. Module Name:
  4. httpfilt.h
  5. Abstract:
  6. This module contains the Microsoft HTTP filter extension info
  7. Revision History:
  8. --*/
  9. #ifndef _HTTPFILT_H_
  10. #define _HTTPFILT_H_
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. //
  15. // Define ULONG_PTR if necessary
  16. //
  17. #if !defined(__midl) && defined(_X86_) && _MSC_VER >= 1300
  18. #define _W64 __w64
  19. #else
  20. #define _W64
  21. #endif
  22. //
  23. // The INT_PTR is guaranteed to be the same size as a pointer. Its
  24. // size with change with pointer size (32/64). It should be used
  25. // anywhere that a pointer is cast to an integer type. UINT_PTR is
  26. // the unsigned variation.
  27. //
  28. // __int3264 is intrinsic to 64b MIDL but not to old MIDL or to C compiler.
  29. //
  30. #if ( 501 < __midl )
  31. typedef unsigned __int3264 ULONG_PTR, *PULONG_PTR;
  32. #else // midl64
  33. // old midl and C++ compiler
  34. #if defined(_WIN64)
  35. typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
  36. #else
  37. typedef _W64 unsigned long ULONG_PTR, *PULONG_PTR;
  38. #endif
  39. #endif // midl64
  40. ;begin_internal
  41. /*++
  42. Copyright (c) 1997-1999 Microsoft Corporation
  43. Module Name :
  44. iisfiltp.h
  45. Abstract:
  46. This module contains private HTTP filter extension info
  47. Environment:
  48. Win32 User Mode
  49. --*/
  50. #ifndef _IISFILTP_H_
  51. #define _IISFILTP_H_
  52. #include <iisfilt.h>
  53. ;end_internal
  54. //
  55. // Current version of the filter spec is 4.0
  56. //
  57. #define HTTP_FILTER_REVISION MAKELONG( 0, 4)
  58. #define SF_MAX_USERNAME (256+1)
  59. #define SF_MAX_PASSWORD (256+1)
  60. #define SF_MAX_AUTH_TYPE (32+1)
  61. #define SF_MAX_FILTER_DESC_LEN (256+1)
  62. ;begin_internal
  63. typedef
  64. VOID (WINAPI * PFN_SF_NOTIFY) (
  65. DWORD dwNotifyType,
  66. LPVOID pInstance
  67. );
  68. ;end_internal
  69. //
  70. // These values can be used with the pfnSFCallback function supplied in
  71. // the filter context structure
  72. //
  73. enum SF_REQ_TYPE
  74. {
  75. //
  76. // Sends a complete HTTP server response header including
  77. // the status, server version, message time and MIME version.
  78. //
  79. // Server extensions should append other information at the end,
  80. // such as Content-type, Content-length etc followed by an extra
  81. // '\r\n'.
  82. //
  83. // pData - Zero terminated string pointing to optional
  84. // status string (i.e., "401 Access Denied") or NULL for
  85. // the default response of "200 OK".
  86. //
  87. // ul1 - Zero terminated string pointing to optional data to be
  88. // appended and set with the header. If NULL, the header will
  89. // be terminated with an empty line.
  90. //
  91. SF_REQ_SEND_RESPONSE_HEADER,
  92. //
  93. // If the server denies the HTTP request, add the specified headers
  94. // to the server error response.
  95. //
  96. // This allows an authentication filter to advertise its services
  97. // w/o filtering every request. Generally the headers will be
  98. // WWW-Authenticate headers with custom authentication schemes but
  99. // no restriction is placed on what headers may be specified.
  100. //
  101. // pData - Zero terminated string pointing to one or more header lines
  102. // with terminating '\r\n'.
  103. //
  104. SF_REQ_ADD_HEADERS_ON_DENIAL,
  105. //
  106. // Only used by raw data filters that return SF_STATUS_READ_NEXT
  107. //
  108. // ul1 - size in bytes for the next read
  109. //
  110. SF_REQ_SET_NEXT_READ_SIZE,
  111. //
  112. // Used to indicate this request is a proxy request
  113. //
  114. // ul1 - The proxy flags to set
  115. // 0x00000001 - This is a HTTP proxy request
  116. //
  117. //
  118. SF_REQ_SET_PROXY_INFO,
  119. //
  120. // Returns the connection ID contained in the ConnID field of an
  121. // ISAPI Application's Extension Control Block. This value can be used
  122. // as a key to cooridinate shared data between Filters and Applications.
  123. //
  124. // pData - Pointer to DWORD that receives the connection ID.
  125. //
  126. SF_REQ_GET_CONNID,
  127. //
  128. // Used to set a SSPI security context + impersonation token
  129. // derived from a client certificate.
  130. //
  131. // pData - certificate info ( PHTTP_FILTER_CERTIFICATE_INFO )
  132. // ul1 - CtxtHandle*
  133. // ul2 - impersonation handle
  134. //
  135. SF_REQ_SET_CERTIFICATE_INFO,
  136. //
  137. // Used to get an IIS property
  138. // as defined in SF_PROPERTY_IIS
  139. //
  140. // ul1 - Property ID
  141. //
  142. SF_REQ_GET_PROPERTY,
  143. //
  144. // Used to normalize an URL
  145. //
  146. // pData - URL to normalize
  147. //
  148. SF_REQ_NORMALIZE_URL,
  149. //
  150. // Disable Notifications
  151. //
  152. // ul1 - notifications to disable
  153. //
  154. SF_REQ_DISABLE_NOTIFICATIONS,
  155. } ;
  156. ;begin_internal
  157. //
  158. // 1st enum must a value greater than the last value in SF_REQ_TYPE
  159. //
  160. enum SF_REQ_TYPEP
  161. {
  162. //
  163. // Indicates end of renegotiation
  164. //
  165. // pData - LPBOOL : TRUE if renegotiation succeeded
  166. //
  167. SF_REQ_DONE_RENEGOTIATE = 100,
  168. //
  169. // Set notify call-back
  170. //
  171. // ul1 - notification type ( SF_NOTIFY_TYPE )
  172. // pData - ptr to notify function ( PFN_SF_NOTIFY )
  173. //
  174. SF_REQ_SET_NOTIFY,
  175. //
  176. // Compression filter check
  177. // Retrieves all server variables necessary for compression filter
  178. // to check about need to compress given request
  179. //
  180. //
  181. // pData - pointer to location to store accept encoding header
  182. // ul1 - pointer to location to store method header
  183. // ul2 - size of buffers. should be equal for both
  184. //
  185. //
  186. SF_REQ_COMPRESSION_FILTER_CHECK,
  187. };
  188. ;end_internal
  189. enum SF_PROPERTY_IIS
  190. {
  191. SF_PROPERTY_SSL_CTXT,
  192. SF_PROPERTY_INSTANCE_NUM_ID
  193. } ;
  194. ;begin_internal
  195. //
  196. // 1st enum must a value greater than the last value in SF_PROPERTY_IIS
  197. //
  198. enum SF_PROPERTY_IISP
  199. {
  200. SF_PROPERTY_CLIENT_CERT_ENABLED=100,// return BOOL in pData as LPBOOL
  201. SF_PROPERTY_MD5_ENABLED, // return BOOL in pData as LPBOOL
  202. SF_PROPERTY_DIR_MAP_CERT, // return BOOL in pData as LPBOOL
  203. SF_PROPERTY_GET_CERT11_MAPPER, // These 4 functions returns ptr
  204. SF_PROPERTY_GET_RULE_MAPPER, // to RefBlob containing mapper
  205. SF_PROPERTY_GET_MD5_MAPPER,
  206. SF_PROPERTY_GET_ITA_MAPPER,
  207. SF_PROPERTY_GET_INSTANCE_ID,
  208. SF_PROPERTY_MD_IF,
  209. SF_PROPERTY_MD_PATH,
  210. SF_PROPERTY_DIGEST_SSP_ENABLED, // return BOOL in pData as LPBOOL
  211. } ;
  212. enum SF_NOTIFY_TYPE
  213. {
  214. SF_NOTIFY_MAPPER_MD5_CHANGED,
  215. SF_NOTIFY_MAPPER_ITA_CHANGED,
  216. SF_NOTIFY_MAPPER_CERT11_CHANGED,
  217. SF_NOTIFY_MAPPER_CERTW_CHANGED,
  218. SF_NOTIFY_MAPPER_SSLKEYS_CHANGED,
  219. SF_NOTIFY_MAPPER_CERT11_TOUCHED,
  220. } ;
  221. ;end_internal
  222. //
  223. // These values are returned by the filter entry point when a new request is
  224. // received indicating their interest in this particular request
  225. //
  226. enum SF_STATUS_TYPE
  227. {
  228. //
  229. // The filter has handled the HTTP request. The server should disconnect
  230. // the session.
  231. //
  232. SF_STATUS_REQ_FINISHED = 0x8000000,
  233. //
  234. // Same as SF_STATUS_FINISHED except the server should keep the TCP
  235. // session open if the option was negotiated
  236. //
  237. SF_STATUS_REQ_FINISHED_KEEP_CONN,
  238. //
  239. // The next filter in the notification chain should be called
  240. //
  241. SF_STATUS_REQ_NEXT_NOTIFICATION,
  242. //
  243. // This filter handled the notification. No other handles should be
  244. // called for this particular notification type
  245. //
  246. SF_STATUS_REQ_HANDLED_NOTIFICATION,
  247. //
  248. // An error occurred. The server should use GetLastError() and indicate
  249. // the error to the client
  250. //
  251. SF_STATUS_REQ_ERROR,
  252. //
  253. // The filter is an opaque stream filter and we're negotiating the
  254. // session parameters. Only valid for raw read notification.
  255. //
  256. SF_STATUS_REQ_READ_NEXT
  257. };
  258. //
  259. // pvNotification points to this structure for all request notification types
  260. //
  261. typedef struct _HTTP_FILTER_CONTEXT
  262. {
  263. DWORD cbSize;
  264. //
  265. // This is the structure revision level.
  266. //
  267. DWORD Revision;
  268. //
  269. // Private context information for the server.
  270. //
  271. PVOID ServerContext;
  272. DWORD ulReserved;
  273. //
  274. // TRUE if this request is coming over a secure port
  275. //
  276. BOOL fIsSecurePort;
  277. //
  278. // A context that can be used by the filter
  279. //
  280. PVOID pFilterContext;
  281. //
  282. // Server callbacks
  283. //
  284. BOOL (WINAPI * GetServerVariable) (
  285. struct _HTTP_FILTER_CONTEXT * pfc,
  286. LPSTR lpszVariableName,
  287. LPVOID lpvBuffer,
  288. LPDWORD lpdwSize
  289. );
  290. BOOL (WINAPI * AddResponseHeaders) (
  291. struct _HTTP_FILTER_CONTEXT * pfc,
  292. LPSTR lpszHeaders,
  293. DWORD dwReserved
  294. );
  295. BOOL (WINAPI * WriteClient) (
  296. struct _HTTP_FILTER_CONTEXT * pfc,
  297. LPVOID Buffer,
  298. LPDWORD lpdwBytes,
  299. DWORD dwReserved
  300. );
  301. VOID * (WINAPI * AllocMem) (
  302. struct _HTTP_FILTER_CONTEXT * pfc,
  303. DWORD cbSize,
  304. DWORD dwReserved
  305. );
  306. BOOL (WINAPI * ServerSupportFunction) (
  307. struct _HTTP_FILTER_CONTEXT * pfc,
  308. enum SF_REQ_TYPE sfReq,
  309. PVOID pData,
  310. ULONG_PTR ul1,
  311. ULONG_PTR ul2
  312. );
  313. } HTTP_FILTER_CONTEXT, *PHTTP_FILTER_CONTEXT;
  314. //
  315. // This structure is the notification info for the read and send raw data
  316. // notification types
  317. //
  318. typedef struct _HTTP_FILTER_RAW_DATA
  319. {
  320. //
  321. // This is a pointer to the data for the filter to process.
  322. //
  323. PVOID pvInData;
  324. DWORD cbInData; // Number of valid data bytes
  325. DWORD cbInBuffer; // Total size of buffer
  326. DWORD dwReserved;
  327. } HTTP_FILTER_RAW_DATA, *PHTTP_FILTER_RAW_DATA;
  328. //
  329. // This structure is the notification info for when the server is about to
  330. // process the client headers
  331. //
  332. typedef struct _HTTP_FILTER_PREPROC_HEADERS
  333. {
  334. //
  335. // For SF_NOTIFY_PREPROC_HEADERS, retrieves the specified header value.
  336. // Header names should include the trailing ':'. The special values
  337. // 'method', 'url' and 'version' can be used to retrieve the individual
  338. // portions of the request line
  339. //
  340. BOOL (WINAPI * GetHeader) (
  341. struct _HTTP_FILTER_CONTEXT * pfc,
  342. LPSTR lpszName,
  343. LPVOID lpvBuffer,
  344. LPDWORD lpdwSize
  345. );
  346. //
  347. // Replaces this header value to the specified value. To delete a header,
  348. // specified a value of '\0'.
  349. //
  350. BOOL (WINAPI * SetHeader) (
  351. struct _HTTP_FILTER_CONTEXT * pfc,
  352. LPSTR lpszName,
  353. LPSTR lpszValue
  354. );
  355. //
  356. // Adds the specified header and value
  357. //
  358. BOOL (WINAPI * AddHeader) (
  359. struct _HTTP_FILTER_CONTEXT * pfc,
  360. LPSTR lpszName,
  361. LPSTR lpszValue
  362. );
  363. DWORD HttpStatus; // New in 4.0, status for SEND_RESPONSE
  364. DWORD dwReserved; // New in 4.0
  365. } HTTP_FILTER_PREPROC_HEADERS, *PHTTP_FILTER_PREPROC_HEADERS;
  366. typedef HTTP_FILTER_PREPROC_HEADERS HTTP_FILTER_SEND_RESPONSE;
  367. typedef HTTP_FILTER_PREPROC_HEADERS *PHTTP_FILTER_SEND_RESPONSE;
  368. //
  369. // Authentication information for this request.
  370. //
  371. typedef struct _HTTP_FILTER_AUTHENT
  372. {
  373. //
  374. // Pointer to username and password, empty strings for the anonymous user
  375. //
  376. // Client's can overwrite these buffers which are guaranteed to be at
  377. // least SF_MAX_USERNAME and SF_MAX_PASSWORD bytes large.
  378. //
  379. CHAR * pszUser;
  380. DWORD cbUserBuff;
  381. CHAR * pszPassword;
  382. DWORD cbPasswordBuff;
  383. } HTTP_FILTER_AUTHENT, *PHTTP_FILTER_AUTHENT;
  384. ;begin_internal
  385. //
  386. // Authentication information for this request.
  387. //
  388. typedef struct _HTTP_FILTER_AUTHENTEX
  389. {
  390. //
  391. // Pointer to username and password, empty strings for the anonymous user
  392. //
  393. // Client can overwrite hAccessToken
  394. //
  395. CHAR * pszUser;
  396. DWORD cbUserBuff;
  397. CHAR * pszLogonUser;
  398. DWORD cbLogonUserBuff;
  399. CHAR * pszPassword;
  400. CHAR * pszRealm;
  401. CHAR * pszAuthDomain;
  402. CHAR * pszAuthType;
  403. DWORD cbAuthTypeBuff;
  404. HANDLE hAccessTokenPrimary;
  405. HANDLE hAccessTokenImpersonation;
  406. } HTTP_FILTER_AUTHENTEX, *PHTTP_FILTER_AUTHENTEX;
  407. ;end_internal
  408. //
  409. // Indicates the server is going to use the specific physical mapping for
  410. // the specified URL. Filters can modify the physical path in place.
  411. //
  412. typedef struct _HTTP_FILTER_URL_MAP
  413. {
  414. const CHAR * pszURL;
  415. CHAR * pszPhysicalPath;
  416. DWORD cbPathBuff;
  417. } HTTP_FILTER_URL_MAP, *PHTTP_FILTER_URL_MAP;
  418. ;begin_internal
  419. //
  420. // Indicates the server is going to delete the specified impersonation token
  421. // Only called if the token was created by the filter
  422. //
  423. typedef struct _HTTP_FILTER_REQUEST_CLOSE_SECURITY_CONTEXT
  424. {
  425. PVOID pCtxt;
  426. } HTTP_FILTER_REQUEST_CLOSE_SECURITY_CONTEXT,
  427. *PHTTP_FILTER_REQUEST_CLOSE_SECURITY_CONTEXT;
  428. ;end_internal
  429. //
  430. // Bitfield indicating the requested resource has been denied by the server due
  431. // to a logon failure, an ACL on a resource, an ISAPI Filter or an
  432. // ISAPI Application/CGI Application.
  433. //
  434. // SF_DENIED_BY_CONFIG can appear with SF_DENIED_LOGON if the server
  435. // configuration did not allow the user to logon.
  436. //
  437. #define SF_DENIED_LOGON 0x00000001
  438. #define SF_DENIED_RESOURCE 0x00000002
  439. #define SF_DENIED_FILTER 0x00000004
  440. #define SF_DENIED_APPLICATION 0x00000008
  441. #define SF_DENIED_BY_CONFIG 0x00010000
  442. typedef struct _HTTP_FILTER_ACCESS_DENIED
  443. {
  444. const CHAR * pszURL; // Requesting URL
  445. const CHAR * pszPhysicalPath; // Physical path of resource
  446. DWORD dwReason; // Bitfield of SF_DENIED flags
  447. } HTTP_FILTER_ACCESS_DENIED, *PHTTP_FILTER_ACCESS_DENIED;
  448. ;begin_internal
  449. //
  450. // The server request a SSL certificate renegotiation.
  451. // If filter accepts, it must set fAccepted to TRUE
  452. //
  453. typedef struct _HTTP_FILTER_REQUEST_CERT
  454. {
  455. BOOL fAccepted; // [out] request accepted
  456. BOOL fMapCert; // [in] TRUE if cert to be mapped to
  457. // NT account
  458. DWORD dwReserved;
  459. } HTTP_FILTER_REQUEST_CERT, *PHTTP_FILTER_REQUEST_CERT;
  460. ;end_internal
  461. //
  462. // The log information about to be written to the server log file. The
  463. // string pointers can be replaced but the memory must remain valid until
  464. // the next notification
  465. //
  466. typedef struct _HTTP_FILTER_LOG
  467. {
  468. const CHAR * pszClientHostName;
  469. const CHAR * pszClientUserName;
  470. const CHAR * pszServerName;
  471. const CHAR * pszOperation;
  472. const CHAR * pszTarget;
  473. const CHAR * pszParameters;
  474. DWORD dwHttpStatus;
  475. DWORD dwWin32Status;
  476. DWORD dwBytesSent; // IIS 4.0 and later
  477. DWORD dwBytesRecvd; // IIS 4.0 and later
  478. DWORD msTimeForProcessing; // IIS 4.0 and later
  479. } HTTP_FILTER_LOG, *PHTTP_FILTER_LOG;
  480. //
  481. // Called once the client request has been authenticated.
  482. //
  483. typedef struct _HTTP_FILTER_AUTH_COMPLETE_INFO
  484. {
  485. //
  486. // For SF_NOTIFY_AUTH_COMPLETE, retrieves the specified header value.
  487. // Header names should include the trailing ':'. The special values
  488. // 'method', 'url' and 'version' can be used to retrieve the individual
  489. // portions of the request line
  490. //
  491. BOOL (WINAPI * GetHeader) (
  492. struct _HTTP_FILTER_CONTEXT * pfc,
  493. LPSTR lpszName,
  494. LPVOID lpvBuffer,
  495. LPDWORD lpdwSize
  496. );
  497. //
  498. // Replaces this header value to the specified value. To delete a header,
  499. // specified a value of '\0'.
  500. //
  501. BOOL (WINAPI * SetHeader) (
  502. struct _HTTP_FILTER_CONTEXT * pfc,
  503. LPSTR lpszName,
  504. LPSTR lpszValue
  505. );
  506. //
  507. // Adds the specified header and value
  508. //
  509. BOOL (WINAPI * AddHeader) (
  510. struct _HTTP_FILTER_CONTEXT * pfc,
  511. LPSTR lpszName,
  512. LPSTR lpszValue
  513. );
  514. //
  515. // Get the authenticated user impersonation token
  516. //
  517. BOOL (WINAPI * GetUserToken) (
  518. struct _HTTP_FILTER_CONTEXT * pfc,
  519. HANDLE * phToken
  520. );
  521. //
  522. // Status code to use when sending response
  523. //
  524. DWORD HttpStatus;
  525. //
  526. // Determines whether to reset auth if URL changed
  527. //
  528. BOOL fResetAuth;
  529. //
  530. // Reserved
  531. //
  532. DWORD dwReserved;
  533. } HTTP_FILTER_AUTH_COMPLETE_INFO, *PHTTP_FILTER_AUTH_COMPLETE_INFO;
  534. //
  535. // General purpose notification triggered by ISAPI extension
  536. //
  537. typedef struct _HTTP_FILTER_EXTENSION_TRIGGER_INFO
  538. {
  539. //
  540. // Type of triggered notification (client application specific)
  541. //
  542. DWORD dwTriggerType;
  543. //
  544. // Context of triggered notification
  545. //
  546. VOID * pvTriggerContext;
  547. } HTTP_FILTER_EXTENSION_TRIGGER_INFO, *PHTTP_FILTER_EXTENSION_TRIGGER_INFO;
  548. //
  549. // Notification Flags
  550. //
  551. // SF_NOTIFY_SECURE_PORT
  552. // SF_NOTIFY_NONSECURE_PORT
  553. //
  554. // Indicates whether the application wants to be notified for transactions
  555. // that are happenning on the server port(s) that support data encryption
  556. // (such as PCT and SSL), on only the non-secure port(s) or both.
  557. //
  558. // SF_NOTIFY_READ_RAW_DATA
  559. //
  560. // Applications are notified after the server reads a block of memory
  561. // from the client but before the server does any processing on the
  562. // block. The data block may contain HTTP headers and entity data.
  563. //
  564. //
  565. //
  566. #define SF_NOTIFY_SECURE_PORT 0x00000001
  567. #define SF_NOTIFY_NONSECURE_PORT 0x00000002
  568. #define SF_NOTIFY_READ_RAW_DATA 0x00008000
  569. #define SF_NOTIFY_PREPROC_HEADERS 0x00004000
  570. #define SF_NOTIFY_AUTHENTICATION 0x00002000
  571. #define SF_NOTIFY_URL_MAP 0x00001000
  572. #define SF_NOTIFY_ACCESS_DENIED 0x00000800
  573. #define SF_NOTIFY_SEND_RESPONSE 0x00000040
  574. #define SF_NOTIFY_SEND_RAW_DATA 0x00000400
  575. #define SF_NOTIFY_LOG 0x00000200
  576. #define SF_NOTIFY_END_OF_REQUEST 0x00000080
  577. #define SF_NOTIFY_END_OF_NET_SESSION 0x00000100
  578. #define SF_NOTIFY_AUTH_COMPLETE 0x04000000
  579. #define SF_NOTIFY_EXTENSION_TRIGGER 0x02000000
  580. ;begin_internal
  581. #define SF_NOTIFY_AUTHENTICATIONEX 0x20000000
  582. #define SF_NOTIFY_REQUEST_SECURITY_CONTEXT_CLOSE \
  583. 0x10000000
  584. #define SF_NOTIFY_RENEGOTIATE_CERT 0x08000000
  585. ;end_internal
  586. //
  587. // Filter ordering flags
  588. //
  589. // Filters will tend to be notified by their specified
  590. // ordering. For ties, notification order is determined by load order.
  591. //
  592. // SF_NOTIFY_ORDER_HIGH - Authentication or data transformation filters
  593. // SF_NOTIFY_ORDER_MEDIUM
  594. // SF_NOTIFY_ORDER_LOW - Logging filters that want the results of any other
  595. // filters might specify this order.
  596. //
  597. #define SF_NOTIFY_ORDER_HIGH 0x00080000
  598. #define SF_NOTIFY_ORDER_MEDIUM 0x00040000
  599. #define SF_NOTIFY_ORDER_LOW 0x00020000
  600. #define SF_NOTIFY_ORDER_DEFAULT SF_NOTIFY_ORDER_LOW
  601. #define SF_NOTIFY_ORDER_MASK (SF_NOTIFY_ORDER_HIGH | \
  602. SF_NOTIFY_ORDER_MEDIUM | \
  603. SF_NOTIFY_ORDER_LOW)
  604. //
  605. // Filter version information, passed to GetFilterVersion
  606. //
  607. typedef struct _HTTP_FILTER_VERSION
  608. {
  609. //
  610. // Version of the spec the server is using
  611. //
  612. DWORD dwServerFilterVersion;
  613. //
  614. // Fields specified by the client
  615. //
  616. DWORD dwFilterVersion;
  617. CHAR lpszFilterDesc[SF_MAX_FILTER_DESC_LEN];
  618. DWORD dwFlags;
  619. } HTTP_FILTER_VERSION, *PHTTP_FILTER_VERSION;
  620. ;begin_internal
  621. typedef struct _HTTP_FILTER_CERTIFICATE_INFO
  622. {
  623. PBYTE pbCert;
  624. DWORD cbCert;
  625. } HTTP_FILTER_CERTIFICATE_INFO, *PHTTP_FILTER_CERTIFICATE_INFO;
  626. ;end_internal
  627. //
  628. // A filter DLL's entry point looks like this. The return code should be
  629. // an SF_STATUS_TYPE
  630. //
  631. // NotificationType - Type of notification
  632. // pvNotification - Pointer to notification specific data
  633. //
  634. DWORD
  635. WINAPI
  636. HttpFilterProc(
  637. HTTP_FILTER_CONTEXT * pfc,
  638. DWORD NotificationType,
  639. VOID * pvNotification
  640. );
  641. BOOL
  642. WINAPI
  643. GetFilterVersion(
  644. HTTP_FILTER_VERSION * pVer
  645. );
  646. BOOL
  647. WINAPI
  648. TerminateFilter(
  649. DWORD dwFlags
  650. );
  651. ;begin_internal
  652. //
  653. // Private function exported from w3svc.dll that allows a filter to turn off or
  654. // on a notification permanently
  655. //
  656. BOOL
  657. AdjustFilterFlags(
  658. PVOID pfnSFProc,
  659. DWORD dwNewFlags
  660. );
  661. #endif // _IISFILTP_H_
  662. ;end_internal
  663. #ifdef __cplusplus
  664. }
  665. #endif
  666. #endif //_HTTPFILT_H_
  667.