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.

205 lines
4.2 KiB

  1. /*++
  2. Copyright (c) 1998-2002 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. //
  14. // A structure for associating app pool processes with
  15. // connections for UlWaitForDisconnect
  16. //
  17. #define IS_VALID_DISCONNECT_OBJECT(pObject) \
  18. HAS_VALID_SIGNATURE(pObject, UL_DISCONNECT_OBJECT_POOL_TAG)
  19. typedef struct _UL_DISCONNECT_OBJECT
  20. {
  21. ULONG Signature; // UL_DISCONNECT_OBJECT_POOL_TAG
  22. //
  23. // Lists for processes and connections
  24. //
  25. UL_NOTIFY_ENTRY ProcessEntry;
  26. UL_NOTIFY_ENTRY ConnectionEntry;
  27. //
  28. // The WaitForDisconnect IRP
  29. //
  30. PIRP pIrp;
  31. } UL_DISCONNECT_OBJECT, *PUL_DISCONNECT_OBJECT;
  32. //
  33. // The information will be logged when an app pool process
  34. // get detached while holding on to outstanding connection(s)
  35. // This happens when a worker process crashes. And the error
  36. // log file provides a way to track down the faulty request.
  37. //
  38. #define ERROR_LOG_INFO_FOR_APP_POOL_DETACH "Connection_Abandoned_By_AppPool"
  39. #define ERROR_LOG_INFO_FOR_APP_POOL_DETACH_SIZE \
  40. (sizeof(ERROR_LOG_INFO_FOR_APP_POOL_DETACH)-sizeof(CHAR))
  41. //
  42. // Internal helper functions used in the module
  43. //
  44. VOID
  45. UlpCancelDemandStart(
  46. IN PDEVICE_OBJECT pDeviceObject,
  47. IN PIRP pIrp
  48. );
  49. VOID
  50. UlpCancelHttpReceive(
  51. IN PDEVICE_OBJECT pDeviceObject,
  52. IN PIRP pIrp
  53. );
  54. PIRP
  55. UlpPopNewIrp(
  56. IN PUL_APP_POOL_OBJECT pAppPool,
  57. IN PUL_INTERNAL_REQUEST pRequest,
  58. OUT PUL_APP_POOL_PROCESS * ppProcess
  59. );
  60. PIRP
  61. UlpPopIrpFromProcess(
  62. IN PUL_APP_POOL_PROCESS pProcess,
  63. IN PUL_INTERNAL_REQUEST pRequest
  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. NTSTATUS
  76. UlpQueuePendingRequest(
  77. IN PUL_APP_POOL_PROCESS pProcess,
  78. IN PUL_INTERNAL_REQUEST pRequest
  79. );
  80. VOID
  81. UlpUnbindQueuedRequests(
  82. IN PUL_APP_POOL_PROCESS pProcess
  83. );
  84. VOID
  85. UlpRedeliverRequestWorker(
  86. IN PUL_WORK_ITEM pWorkItem
  87. );
  88. NTSTATUS
  89. UlpSetAppPoolQueueLength(
  90. IN PUL_APP_POOL_PROCESS pProcess,
  91. IN ULONG QueueLength
  92. );
  93. ULONG
  94. UlpCopyEntityBodyToBuffer(
  95. IN PUL_INTERNAL_REQUEST pRequest,
  96. IN PUCHAR pEntityBody,
  97. IN ULONG EntityBodyLength,
  98. OUT PULONG pFlags
  99. );
  100. NTSTATUS
  101. UlpQueueRequest(
  102. IN PUL_APP_POOL_OBJECT pAppPool,
  103. IN PLIST_ENTRY pQueueList,
  104. IN PUL_INTERNAL_REQUEST pRequest
  105. );
  106. VOID
  107. UlpRemoveRequest(
  108. IN PUL_APP_POOL_OBJECT pAppPool,
  109. IN PUL_INTERNAL_REQUEST pRequest
  110. );
  111. PUL_INTERNAL_REQUEST
  112. UlpDequeueRequest(
  113. IN PUL_APP_POOL_OBJECT pAppPool,
  114. IN PLIST_ENTRY pQueueList
  115. );
  116. UL_HTTP_ERROR
  117. UlpConvertAppPoolEnabledStateToErrorCode(
  118. IN HTTP_APP_POOL_ENABLED_STATE Enabled
  119. );
  120. NTSTATUS
  121. UlpSetAppPoolState(
  122. IN PUL_APP_POOL_PROCESS pProcess,
  123. IN HTTP_APP_POOL_ENABLED_STATE Enabled
  124. );
  125. NTSTATUS
  126. UlpSetAppPoolLoadBalancerCapability(
  127. IN PUL_APP_POOL_PROCESS pProcess,
  128. IN HTTP_LOAD_BALANCER_CAPABILITIES LoadBalancerCapability
  129. );
  130. VOID
  131. UlpCancelWaitForDisconnect(
  132. IN PDEVICE_OBJECT pDeviceObject,
  133. IN PIRP pIrp
  134. );
  135. VOID
  136. UlpCancelWaitForDisconnectWorker(
  137. IN PUL_WORK_ITEM pWorkItem
  138. );
  139. BOOLEAN
  140. UlpNotifyCompleteWaitForDisconnect(
  141. IN PUL_NOTIFY_ENTRY pEntry,
  142. IN PVOID pHost,
  143. IN PVOID pv
  144. );
  145. PUL_DISCONNECT_OBJECT
  146. UlpCreateDisconnectObject(
  147. IN PIRP pIrp
  148. );
  149. VOID
  150. UlpFreeDisconnectObject(
  151. IN PUL_DISCONNECT_OBJECT pObject
  152. );
  153. VOID
  154. UlpSetAppPoolControlChannelHelper(
  155. IN PUL_APP_POOL_PROCESS pProcess,
  156. IN PUL_CONTROL_CHANNEL pControlChannel
  157. );
  158. #endif // _APOOLP_H_