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.

220 lines
3.6 KiB

  1. /*++
  2. Copyright (c) 1998-2001 Microsoft Corporation
  3. Module Name:
  4. apoolp.h
  5. Abstract:
  6. The private definitions of app pool module.
  7. Author:
  8. Paul McDaniel (paulmcd) 28-Jan-1999
  9. Revision History:
  10. --*/
  11. #ifndef _APOOLP_H_
  12. #define _APOOLP_H_
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. //
  17. // A structure for associating app pool processes with
  18. // connections for UlWaitForDisconnect
  19. //
  20. #define IS_VALID_DISCONNECT_OBJECT(pObject) \
  21. (((pObject) != NULL) && ((pObject)->Signature == UL_DISCONNECT_OBJECT_POOL_TAG))
  22. typedef struct _UL_DISCONNECT_OBJECT
  23. {
  24. ULONG Signature; // UL_DISCONNECT_OBJECT_POOL_TAG
  25. //
  26. // Lists for processes and connections
  27. //
  28. UL_NOTIFY_ENTRY ProcessEntry;
  29. UL_NOTIFY_ENTRY ConnectionEntry;
  30. //
  31. // The WaitForDisconnect IRP
  32. //
  33. PIRP pIrp;
  34. } UL_DISCONNECT_OBJECT, *PUL_DISCONNECT_OBJECT;
  35. //
  36. // Internal helper functions used in the module
  37. //
  38. VOID
  39. UlpCancelDemandStart(
  40. IN PDEVICE_OBJECT pDeviceObject,
  41. IN PIRP pIrp
  42. );
  43. VOID
  44. UlpCancelDemandStartWorker(
  45. IN PUL_WORK_ITEM pWorkItem
  46. );
  47. VOID
  48. UlpCancelHttpReceive(
  49. IN PDEVICE_OBJECT pDeviceObject,
  50. IN PIRP pIrp
  51. );
  52. VOID
  53. UlpCancelHttpReceiveWorker(
  54. IN PUL_WORK_ITEM pWorkItem
  55. );
  56. PIRP
  57. UlpPopNewIrp(
  58. IN PUL_APP_POOL_OBJECT pAppPool,
  59. OUT PUL_APP_POOL_PROCESS * ppProcess
  60. );
  61. PIRP
  62. UlpPopIrpFromProcess(
  63. IN PUL_APP_POOL_PROCESS pProcess
  64. );
  65. BOOLEAN
  66. UlpIsProcessInAppPool(
  67. IN PUL_APP_POOL_PROCESS pProcess,
  68. IN PUL_APP_POOL_OBJECT pAppPool
  69. );
  70. NTSTATUS
  71. UlpQueueUnboundRequest(
  72. IN PUL_APP_POOL_OBJECT pAppPool,
  73. IN PUL_INTERNAL_REQUEST pRequest
  74. );
  75. // IRQL == PASSIVE_LEVEL
  76. //
  77. VOID
  78. UlpQueuePendingRequest(
  79. IN PUL_APP_POOL_PROCESS pProcess,
  80. IN PUL_INTERNAL_REQUEST pRequest
  81. );
  82. VOID
  83. UlpUnbindQueuedRequests(
  84. IN PUL_APP_POOL_PROCESS pProcess
  85. );
  86. VOID
  87. UlpRedeliverRequestWorker(
  88. IN PUL_WORK_ITEM pWorkItem
  89. );
  90. BOOLEAN
  91. UlpIsRequestQueueEmpty(
  92. IN PUL_APP_POOL_PROCESS pProcess
  93. );
  94. NTSTATUS
  95. UlpSetAppPoolQueueLength(
  96. IN PUL_APP_POOL_PROCESS pProcess,
  97. IN LONG QueueLength
  98. );
  99. LONG
  100. UlpGetAppPoolQueueLength(
  101. IN PUL_APP_POOL_PROCESS pProcess
  102. );
  103. VOID
  104. UlpCopyRequestToIrp(
  105. IN PUL_INTERNAL_REQUEST pRequest,
  106. IN PIRP pIrp
  107. );
  108. //
  109. // functions to manipulate a UL_REQUEST_QUEUE
  110. //
  111. NTSTATUS
  112. UlpInitRequestQueue(
  113. PUL_REQUEST_QUEUE pQueue,
  114. LONG MaxRequests
  115. );
  116. NTSTATUS
  117. UlpSetMaxQueueLength(
  118. PUL_REQUEST_QUEUE pQueue,
  119. LONG MaxRequests
  120. );
  121. LONG
  122. UlpQueryQueueLength(
  123. PUL_REQUEST_QUEUE pQueue
  124. );
  125. NTSTATUS
  126. UlpQueueRequest(
  127. PUL_REQUEST_QUEUE pQueue,
  128. PUL_INTERNAL_REQUEST pRequest
  129. );
  130. VOID
  131. UlpRemoveRequest(
  132. PUL_REQUEST_QUEUE pQueue,
  133. PUL_INTERNAL_REQUEST pRequest
  134. );
  135. PUL_INTERNAL_REQUEST
  136. UlpDequeueRequest(
  137. PUL_REQUEST_QUEUE pQueue
  138. );
  139. NTSTATUS
  140. UlpSetAppPoolState(
  141. IN PUL_APP_POOL_PROCESS pProcess,
  142. IN HTTP_ENABLED_STATE Enabled
  143. );
  144. VOID
  145. UlpCancelWaitForDisconnect(
  146. IN PDEVICE_OBJECT pDeviceObject,
  147. IN PIRP pIrp
  148. );
  149. VOID
  150. UlpCancelWaitForDisconnectWorker(
  151. IN PUL_WORK_ITEM pWorkItem
  152. );
  153. BOOLEAN
  154. UlpNotifyCompleteWaitForDisconnect(
  155. IN PUL_NOTIFY_ENTRY pEntry,
  156. IN PVOID pHost,
  157. IN PVOID pv
  158. );
  159. PUL_DISCONNECT_OBJECT
  160. UlpCreateDisconnectObject(
  161. IN PIRP pIrp
  162. );
  163. VOID
  164. UlpFreeDisconnectObject(
  165. IN PUL_DISCONNECT_OBJECT pObject
  166. );
  167. #ifdef __cplusplus
  168. }; // extern "C"
  169. #endif
  170. #endif // _APOOLP_H_