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.

896 lines
22 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 6.0
  56. //
  57. #define HTTP_FILTER_REVISION MAKELONG( 0, 6 )
  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. //
  419. // Indicates the server is going to use the specific physical mapping for
  420. // the specified URL. Filters can modify the physical path in place.
  421. //
  422. // Additional members beyond those from HTTP_FILTER_URL_MAP are
  423. // informational.
  424. //
  425. typedef struct _HTTP_FILTER_URL_MAP_EX
  426. {
  427. const CHAR * pszURL;
  428. CHAR * pszPhysicalPath;
  429. DWORD cbPathBuff;
  430. //
  431. // The AccessPerm metabase property that applies to this URL
  432. //
  433. DWORD dwFlags;
  434. //
  435. // Number of matching characters in physical path corresponding
  436. // to the metabase node that applies.
  437. //
  438. DWORD cchMatchingPath;
  439. //
  440. // Number of matching characters in the URL corresponding
  441. // to the metabase node that applies.
  442. //
  443. DWORD cchMatchingURL;
  444. //
  445. // The physical path of the dll or exe that to which this
  446. // URL is script mapped. This member will be NULL if no
  447. // script map applies.
  448. //
  449. const CHAR * pszScriptMapEntry;
  450. } HTTP_FILTER_URL_MAP_EX, *PHTTP_FILTER_URL_MAP_EX;
  451. ;begin_internal
  452. //
  453. // Indicates the server is going to delete the specified impersonation token
  454. // Only called if the token was created by the filter
  455. //
  456. typedef struct _HTTP_FILTER_REQUEST_CLOSE_SECURITY_CONTEXT
  457. {
  458. PVOID pCtxt;
  459. } HTTP_FILTER_REQUEST_CLOSE_SECURITY_CONTEXT,
  460. *PHTTP_FILTER_REQUEST_CLOSE_SECURITY_CONTEXT;
  461. ;end_internal
  462. //
  463. // Bitfield indicating the requested resource has been denied by the server due
  464. // to a logon failure, an ACL on a resource, an ISAPI Filter or an
  465. // ISAPI Application/CGI Application.
  466. //
  467. // SF_DENIED_BY_CONFIG can appear with SF_DENIED_LOGON if the server
  468. // configuration did not allow the user to logon.
  469. //
  470. #define SF_DENIED_LOGON 0x00000001
  471. #define SF_DENIED_RESOURCE 0x00000002
  472. #define SF_DENIED_FILTER 0x00000004
  473. #define SF_DENIED_APPLICATION 0x00000008
  474. #define SF_DENIED_BY_CONFIG 0x00010000
  475. typedef struct _HTTP_FILTER_ACCESS_DENIED
  476. {
  477. const CHAR * pszURL; // Requesting URL
  478. const CHAR * pszPhysicalPath; // Physical path of resource
  479. DWORD dwReason; // Bitfield of SF_DENIED flags
  480. } HTTP_FILTER_ACCESS_DENIED, *PHTTP_FILTER_ACCESS_DENIED;
  481. ;begin_internal
  482. //
  483. // The server request a SSL certificate renegotiation.
  484. // If filter accepts, it must set fAccepted to TRUE
  485. //
  486. typedef struct _HTTP_FILTER_REQUEST_CERT
  487. {
  488. BOOL fAccepted; // [out] request accepted
  489. BOOL fMapCert; // [in] TRUE if cert to be mapped to
  490. // NT account
  491. DWORD dwReserved;
  492. } HTTP_FILTER_REQUEST_CERT, *PHTTP_FILTER_REQUEST_CERT;
  493. ;end_internal
  494. //
  495. // The log information about to be written to the server log file. The
  496. // string pointers can be replaced but the memory must remain valid until
  497. // the next notification
  498. //
  499. typedef struct _HTTP_FILTER_LOG
  500. {
  501. const CHAR * pszClientHostName;
  502. const CHAR * pszClientUserName;
  503. const CHAR * pszServerName;
  504. const CHAR * pszOperation;
  505. const CHAR * pszTarget;
  506. const CHAR * pszParameters;
  507. DWORD dwHttpStatus;
  508. DWORD dwWin32Status;
  509. DWORD dwBytesSent; // IIS 4.0 and later
  510. DWORD dwBytesRecvd; // IIS 4.0 and later
  511. DWORD msTimeForProcessing; // IIS 4.0 and later
  512. } HTTP_FILTER_LOG, *PHTTP_FILTER_LOG;
  513. //
  514. // Called once the client request has been authenticated.
  515. //
  516. typedef struct _HTTP_FILTER_AUTH_COMPLETE_INFO
  517. {
  518. //
  519. // For SF_NOTIFY_AUTH_COMPLETE, retrieves the specified header value.
  520. // Header names should include the trailing ':'. The special values
  521. // 'method', 'url' and 'version' can be used to retrieve the individual
  522. // portions of the request line
  523. //
  524. BOOL (WINAPI * GetHeader) (
  525. struct _HTTP_FILTER_CONTEXT * pfc,
  526. LPSTR lpszName,
  527. LPVOID lpvBuffer,
  528. LPDWORD lpdwSize
  529. );
  530. //
  531. // Replaces this header value to the specified value. To delete a header,
  532. // specified a value of '\0'.
  533. //
  534. BOOL (WINAPI * SetHeader) (
  535. struct _HTTP_FILTER_CONTEXT * pfc,
  536. LPSTR lpszName,
  537. LPSTR lpszValue
  538. );
  539. //
  540. // Adds the specified header and value
  541. //
  542. BOOL (WINAPI * AddHeader) (
  543. struct _HTTP_FILTER_CONTEXT * pfc,
  544. LPSTR lpszName,
  545. LPSTR lpszValue
  546. );
  547. //
  548. // Get the authenticated user impersonation token
  549. //
  550. BOOL (WINAPI * GetUserToken) (
  551. struct _HTTP_FILTER_CONTEXT * pfc,
  552. HANDLE * phToken
  553. );
  554. //
  555. // Status code to use when sending response
  556. //
  557. DWORD HttpStatus;
  558. //
  559. // Determines whether to reset auth if URL changed
  560. //
  561. BOOL fResetAuth;
  562. //
  563. // Reserved
  564. //
  565. DWORD dwReserved;
  566. } HTTP_FILTER_AUTH_COMPLETE_INFO, *PHTTP_FILTER_AUTH_COMPLETE_INFO;
  567. //
  568. // Notification Flags
  569. //
  570. // SF_NOTIFY_SECURE_PORT
  571. // SF_NOTIFY_NONSECURE_PORT
  572. //
  573. // Indicates whether the application wants to be notified for transactions
  574. // that are happenning on the server port(s) that support data encryption
  575. // (such as PCT and SSL), on only the non-secure port(s) or both.
  576. //
  577. // SF_NOTIFY_READ_RAW_DATA
  578. //
  579. // Applications are notified after the server reads a block of memory
  580. // from the client but before the server does any processing on the
  581. // block. The data block may contain HTTP headers and entity data.
  582. //
  583. //
  584. //
  585. #define SF_NOTIFY_SECURE_PORT 0x00000001
  586. #define SF_NOTIFY_NONSECURE_PORT 0x00000002
  587. #define SF_NOTIFY_READ_RAW_DATA 0x00008000
  588. #define SF_NOTIFY_PREPROC_HEADERS 0x00004000
  589. #define SF_NOTIFY_AUTHENTICATION 0x00002000
  590. #define SF_NOTIFY_URL_MAP 0x00001000
  591. #define SF_NOTIFY_ACCESS_DENIED 0x00000800
  592. #define SF_NOTIFY_SEND_RESPONSE 0x00000040
  593. #define SF_NOTIFY_SEND_RAW_DATA 0x00000400
  594. #define SF_NOTIFY_LOG 0x00000200
  595. #define SF_NOTIFY_END_OF_REQUEST 0x00000080
  596. #define SF_NOTIFY_END_OF_NET_SESSION 0x00000100
  597. #define SF_NOTIFY_AUTH_COMPLETE 0x04000000
  598. ;begin_internal
  599. // Don't reuse
  600. // #define SF_NOTIFY_EXTENSION_TRIGGER 0x02000000
  601. ;end_internal
  602. ;begin_internal
  603. #define SF_NOTIFY_AUTHENTICATIONEX 0x20000000
  604. #define SF_NOTIFY_REQUEST_SECURITY_CONTEXT_CLOSE \
  605. 0x10000000
  606. #define SF_NOTIFY_RENEGOTIATE_CERT 0x08000000
  607. ;end_internal
  608. //
  609. // Filter ordering flags
  610. //
  611. // Filters will tend to be notified by their specified
  612. // ordering. For ties, notification order is determined by load order.
  613. //
  614. // SF_NOTIFY_ORDER_HIGH - Authentication or data transformation filters
  615. // SF_NOTIFY_ORDER_MEDIUM
  616. // SF_NOTIFY_ORDER_LOW - Logging filters that want the results of any other
  617. // filters might specify this order.
  618. //
  619. #define SF_NOTIFY_ORDER_HIGH 0x00080000
  620. #define SF_NOTIFY_ORDER_MEDIUM 0x00040000
  621. #define SF_NOTIFY_ORDER_LOW 0x00020000
  622. #define SF_NOTIFY_ORDER_DEFAULT SF_NOTIFY_ORDER_LOW
  623. #define SF_NOTIFY_ORDER_MASK (SF_NOTIFY_ORDER_HIGH | \
  624. SF_NOTIFY_ORDER_MEDIUM | \
  625. SF_NOTIFY_ORDER_LOW)
  626. //
  627. // Filter version information, passed to GetFilterVersion
  628. //
  629. typedef struct _HTTP_FILTER_VERSION
  630. {
  631. //
  632. // Version of the spec the server is using
  633. //
  634. DWORD dwServerFilterVersion;
  635. //
  636. // Fields specified by the client
  637. //
  638. DWORD dwFilterVersion;
  639. CHAR lpszFilterDesc[SF_MAX_FILTER_DESC_LEN];
  640. DWORD dwFlags;
  641. } HTTP_FILTER_VERSION, *PHTTP_FILTER_VERSION;
  642. ;begin_internal
  643. typedef struct _HTTP_FILTER_CERTIFICATE_INFO
  644. {
  645. PBYTE pbCert;
  646. DWORD cbCert;
  647. } HTTP_FILTER_CERTIFICATE_INFO, *PHTTP_FILTER_CERTIFICATE_INFO;
  648. ;end_internal
  649. //
  650. // A filter DLL's entry point looks like this. The return code should be
  651. // an SF_STATUS_TYPE
  652. //
  653. // NotificationType - Type of notification
  654. // pvNotification - Pointer to notification specific data
  655. //
  656. DWORD
  657. WINAPI
  658. HttpFilterProc(
  659. HTTP_FILTER_CONTEXT * pfc,
  660. DWORD NotificationType,
  661. VOID * pvNotification
  662. );
  663. BOOL
  664. WINAPI
  665. GetFilterVersion(
  666. HTTP_FILTER_VERSION * pVer
  667. );
  668. BOOL
  669. WINAPI
  670. TerminateFilter(
  671. DWORD dwFlags
  672. );
  673. ;begin_internal
  674. //
  675. // Private function exported from w3svc.dll that allows a filter to turn off or
  676. // on a notification permanently
  677. //
  678. BOOL
  679. AdjustFilterFlags(
  680. PVOID pfnSFProc,
  681. DWORD dwNewFlags
  682. );
  683. #endif // _IISFILTP_H_
  684. ;end_internal
  685. #ifdef __cplusplus
  686. }
  687. #endif
  688. #endif //_HTTPFILT_H_