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.

326 lines
5.0 KiB

  1. /*++
  2. Copyright(c) 1998,99 Microsoft Corporation
  3. Module Name:
  4. prot.h
  5. Abstract:
  6. Windows Load Balancing Service (WLBS)
  7. Driver - lower-level (protocol) layer of intermediate miniport
  8. Author:
  9. kyrilf
  10. --*/
  11. #ifndef _Prot_h_
  12. #define _Prot_h_
  13. #include <ndis.h>
  14. #include "main.h"
  15. #include "util.h"
  16. /* PROCEDURES */
  17. /* required NDIS protocol handlers */
  18. extern VOID Prot_bind (
  19. PNDIS_STATUS statusp,
  20. NDIS_HANDLE bind_handle,
  21. PNDIS_STRING device_name,
  22. PVOID reg_path,
  23. PVOID reserved);
  24. /*
  25. Bind to underlying adapter
  26. returns VOID:
  27. function:
  28. */
  29. extern VOID Prot_unbind (
  30. PNDIS_STATUS statusp,
  31. NDIS_HANDLE bind_handle,
  32. NDIS_HANDLE unbind_handle);
  33. /*
  34. Unbind from underlying adapter
  35. returns VOID:
  36. function:
  37. */
  38. extern VOID Prot_close_complete (
  39. NDIS_HANDLE bind_handle,
  40. NDIS_STATUS statusp);
  41. /*
  42. Completion handler for NdisCloseAdapter call
  43. returns VOID:
  44. function:
  45. */
  46. extern VOID Prot_open_complete (
  47. NDIS_HANDLE bind_handle,
  48. NDIS_STATUS statusp,
  49. NDIS_STATUS errorp);
  50. /*
  51. Completion handler for NdisOpenAdapter call
  52. returns VOID:
  53. function:
  54. */
  55. extern NDIS_STATUS Prot_recv_indicate (
  56. NDIS_HANDLE bind_handle,
  57. NDIS_HANDLE recv_handle,
  58. PVOID head_buf,
  59. UINT head_len,
  60. PVOID look_buf,
  61. UINT look_len,
  62. UINT packet_len);
  63. /*
  64. Process lookahead of a new packet
  65. returns NDIS_STATUS:
  66. function:
  67. */
  68. extern VOID Prot_recv_complete (
  69. NDIS_HANDLE bind_handle);
  70. /*
  71. Handle post-receive operations when timing is relaxed
  72. returns VOID:
  73. function:
  74. */
  75. extern INT Prot_packet_recv (
  76. NDIS_HANDLE bind_handle,
  77. PNDIS_PACKET packet);
  78. /*
  79. Receive entire new packet
  80. returns INT:
  81. <number of clients using the packet>
  82. function:
  83. */
  84. extern VOID Prot_request_complete (
  85. NDIS_HANDLE bind_handle,
  86. PNDIS_REQUEST request,
  87. NDIS_STATUS status);
  88. /*
  89. Completion handler for NdisRequest call
  90. returns VOID:
  91. function:
  92. */
  93. extern VOID Prot_reset_complete (
  94. NDIS_HANDLE bind_handle,
  95. NDIS_STATUS status);
  96. /*
  97. Completion handler for NdisReset call
  98. returns VOID:
  99. function:
  100. */
  101. extern VOID Prot_send_complete (
  102. NDIS_HANDLE bind_handle,
  103. PNDIS_PACKET packet,
  104. NDIS_STATUS status);
  105. /*
  106. Completion handler for NdiSendPackets or NdisSend calls
  107. returns VOID:
  108. function:
  109. */
  110. extern NDIS_STATUS Prot_PNP_handle (
  111. NDIS_HANDLE ctxtp,
  112. PNET_PNP_EVENT pnp_event);
  113. /*
  114. PNP handler
  115. returns NDIS_STATUS:
  116. function:
  117. */
  118. extern VOID Prot_status (
  119. NDIS_HANDLE bind_handle,
  120. NDIS_STATUS get_status,
  121. PVOID stat_buf,
  122. UINT stat_len);
  123. /*
  124. Status indication from adapter handler
  125. returns VOID:
  126. function:
  127. */
  128. extern VOID Prot_status_complete (
  129. NDIS_HANDLE bind_handle);
  130. /*
  131. Status indication from adapter completion handler
  132. returns VOID:
  133. function:
  134. */
  135. extern VOID Prot_transfer_complete (
  136. NDIS_HANDLE bind_handle,
  137. PNDIS_PACKET packet,
  138. NDIS_STATUS status,
  139. UINT xferred);
  140. /*
  141. Completion handler for NdiTransferDate calls
  142. returns VOID:
  143. function:
  144. */
  145. /* helpers for nic layer */
  146. extern NDIS_STATUS Prot_close (
  147. PMAIN_ADAPTER adapterp);
  148. /*
  149. Close underlying connection and free context
  150. returns NDIS_STATUS:
  151. function:
  152. */
  153. extern NDIS_STATUS Prot_request (
  154. PMAIN_CTXT ctxtp,
  155. PMAIN_ACTION actp,
  156. ULONG slave);
  157. /*
  158. NdisRequest wrapper
  159. returns NDIS_STATUS:
  160. function:
  161. */
  162. extern NDIS_STATUS Prot_reset (
  163. PMAIN_CTXT ctxtp);
  164. /*
  165. NdisRequest wrapper
  166. returns NDIS_STATUS:
  167. function:
  168. */
  169. extern VOID Prot_packets_send (
  170. PMAIN_CTXT ctxtp,
  171. PPNDIS_PACKET packets,
  172. UINT num);
  173. /*
  174. NdisSendPackets wrapper
  175. returns NDIS_STATUS:
  176. function:
  177. */
  178. extern VOID Prot_return (
  179. PMAIN_CTXT ctxtp,
  180. PNDIS_PACKET packet);
  181. /*
  182. NdisReturnPackets wrapper
  183. returns NDIS_STATUS:
  184. function:
  185. */
  186. /* Added from old code for NT 5.1 - ramkrish */
  187. extern NDIS_STATUS Prot_transfer (
  188. PMAIN_CTXT ctxtp,
  189. NDIS_HANDLE recv_handle,
  190. PNDIS_PACKET packet,
  191. UINT offset,
  192. UINT len,
  193. PUINT xferred);
  194. /*
  195. NdisTransferData wrapper
  196. returns NDIS_STATUS:
  197. function:
  198. */
  199. /* This helper function added for using NDIS51 flag */
  200. extern VOID Prot_cancel_send_packets (
  201. PMAIN_CTXT ctxtp,
  202. PVOID cancel_id);
  203. /*
  204. NdisCancelSendPackets wrapper
  205. returns:
  206. function:
  207. */
  208. #if 0 /* old code */
  209. extern NDIS_STATUS Prot_send (
  210. PMAIN_CTXT ctxtp,
  211. PNDIS_PACKET packet,
  212. UINT flags);
  213. /*
  214. NdisSend wrapper
  215. returns NDIS_STATUS:
  216. function:
  217. */
  218. #endif
  219. #endif /* _Prot_h_ */