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.

233 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. util.h
  5. Abstract:
  6. Contains macros, prototypes and structures for util.c
  7. Author:
  8. Richard L Firth (rfirth) 25-Oct-1993
  9. Revision History:
  10. 25-Oct-1993 rfirth
  11. Created
  12. --*/
  13. //
  14. // external data
  15. //
  16. extern CRITICAL_SECTION SerializationCritSec;
  17. //
  18. // one-line function macros
  19. //
  20. #define RequestMutex() EnterCriticalSection(&SerializationCritSec)
  21. #define ReleaseMutex() LeaveCriticalSection(&SerializationCritSec)
  22. //
  23. // function prototypes
  24. //
  25. int
  26. GetInternetAddress(
  27. IN OUT LPSOCKADDR_IPX InternetAddress
  28. );
  29. int
  30. GetMaxPacketSize(
  31. OUT LPWORD MaxPacketSize
  32. );
  33. LPXECB
  34. RetrieveEcb(
  35. IN BYTE Type
  36. );
  37. LPXECB
  38. RetrieveXEcb(
  39. IN BYTE Type,
  40. IN LPECB pEcb,
  41. IN ECB_ADDRESS EcbAddress
  42. );
  43. VOID
  44. ScheduleEvent(
  45. IN LPXECB pXecb,
  46. IN WORD Ticks
  47. );
  48. VOID
  49. ScanTimerList(
  50. VOID
  51. );
  52. BYTE
  53. CancelTimerEvent(
  54. IN LPXECB pXecb
  55. );
  56. VOID
  57. CancelTimedEvents(
  58. IN WORD SocketNumber,
  59. IN WORD Owner,
  60. IN DWORD TaskId
  61. );
  62. BYTE
  63. CancelAsyncEvent(
  64. IN LPXECB pXecb
  65. );
  66. BYTE
  67. CancelSocketEvent(
  68. IN LPXECB pXecb
  69. );
  70. BYTE
  71. CancelConnectionEvent(
  72. IN LPXECB pXecb
  73. );
  74. VOID
  75. QueueEcb(
  76. IN LPXECB pXecb,
  77. IN LPXECB_QUEUE Queue,
  78. IN QUEUE_ID QueueId
  79. );
  80. LPXECB
  81. DequeueEcb(
  82. IN LPXECB pXecb,
  83. IN LPXECB_QUEUE Queue
  84. );
  85. VOID
  86. CancelSocketQueue(
  87. IN LPXECB_QUEUE pXecbQueue
  88. );
  89. VOID
  90. CancelConnectionQueue(
  91. IN LPXECB_QUEUE pXecbQueue
  92. );
  93. VOID
  94. AbortQueue(
  95. IN LPXECB_QUEUE pXecbQueue,
  96. IN BYTE CompletionCode
  97. );
  98. VOID
  99. AbortConnectionEvent(
  100. IN LPXECB pXecb,
  101. IN BYTE CompletionCode
  102. );
  103. VOID
  104. StartIpxSend(
  105. IN LPXECB pEcb,
  106. IN LPSOCKET_INFO pSocketInfo
  107. );
  108. BOOL
  109. GetIoBuffer(
  110. IN OUT LPXECB pXecb,
  111. IN BOOL Send,
  112. IN WORD HeaderLength
  113. );
  114. VOID
  115. GatherData(
  116. IN LPXECB pXecb,
  117. IN WORD HeaderLength
  118. );
  119. VOID
  120. ScatterData(
  121. IN LPXECB pXecb
  122. );
  123. VOID
  124. IpxReceiveFirst(
  125. IN LPXECB pXecb,
  126. IN LPSOCKET_INFO pSocketInfo
  127. );
  128. VOID
  129. IpxReceiveNext(
  130. IN LPSOCKET_INFO pSocketInfo
  131. );
  132. VOID
  133. IpxSendNext(
  134. IN LPSOCKET_INFO pSocketInfo
  135. );
  136. VOID
  137. CompleteOrQueueIo(
  138. IN LPXECB pXecb,
  139. IN BYTE CompletionCode
  140. );
  141. VOID
  142. CompleteIo(
  143. IN LPXECB pXecb,
  144. IN BYTE CompletionCode
  145. );
  146. VOID
  147. CompleteOrQueueEcb(
  148. IN LPXECB pXecb,
  149. IN BYTE CompletionCode
  150. );
  151. VOID
  152. CompleteEcb(
  153. IN LPXECB pEcb,
  154. IN BYTE CompletionCode
  155. );
  156. VOID
  157. EsrCallback(
  158. VOID
  159. );
  160. VOID
  161. VWinEsrCallback(
  162. WORD *pSegment,
  163. WORD *pOffset,
  164. BYTE *pFlags
  165. );
  166. VOID
  167. FifoAddHead(
  168. IN LPFIFO pFifo,
  169. IN LPFIFO pElement
  170. );
  171. VOID
  172. FifoAdd(
  173. IN LPFIFO pFifo,
  174. IN LPFIFO pElement
  175. );
  176. LPFIFO
  177. FifoRemove(
  178. IN LPFIFO pFifo,
  179. IN LPFIFO pElement
  180. );
  181. LPFIFO
  182. FifoNext(
  183. IN LPFIFO pFifo
  184. );