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.

308 lines
5.2 KiB

  1. //
  2. // Copyright (c) 1998-1999, Microsoft Corporation, all rights reserved
  3. //
  4. // send.h
  5. //
  6. // IEEE1394 mini-port/call-manager driver
  7. //
  8. // Send.h - Mini-port Send routines
  9. //
  10. // 06/20/1999 ADube Created,
  11. //
  12. NDIS_STATUS
  13. AsyncStreamSendPacketsHandler (
  14. IN PVCCB pChannelVc,
  15. IN PNDIS_PACKET pPacket
  16. );
  17. NDIS_STATUS
  18. AsyncWriteSendPacketsHandler(
  19. IN VCCB *pVC,
  20. IN NDIS_PACKET *Packet
  21. );
  22. NDIS_STATUS
  23. nicCopyNdisBufferChainToBuffer(
  24. IN PNDIS_BUFFER pInMdl,
  25. IN OUT PVOID pLocalBuffer,
  26. IN UINT Length
  27. );
  28. VOID
  29. nicFreeIrb(
  30. IN PIRB pIrb
  31. );
  32. VOID
  33. nicFreeIrp(
  34. IN PIRP pIrp
  35. );
  36. VOID
  37. nicFreeLocalBuffer(
  38. IN UINT Length,
  39. IN PVOID pLocalBuffer
  40. );
  41. NDIS_STATUS
  42. nicGetIrb(
  43. OUT PIRB *ppIrb
  44. );
  45. NDIS_STATUS
  46. nicGetIrp(
  47. IN PDEVICE_OBJECT pPdo,
  48. OUT PIRP *ppIrp
  49. );
  50. VOID
  51. nicFreeMdl(
  52. IN PMDL pMdl
  53. );
  54. NDIS_STATUS
  55. nicGetLocalBuffer(
  56. IN ULONG Length,
  57. OUT PVOID *ppLocalBuffer
  58. );
  59. PVOID
  60. nicGetLookasideBuffer(
  61. IN PNIC_NPAGED_LOOKASIDE_LIST pLookasideList
  62. );
  63. NDIS_STATUS
  64. nicGetMdl(
  65. IN UINT Length,
  66. IN PVOID LocalBuffer,
  67. OUT PMDL *ppMyMdl
  68. );
  69. NDIS_STATUS
  70. nicGetMdlToTransmit(
  71. IN PNDIS_PACKET pPacket,
  72. OUT PMDL *ppMyMdl
  73. );
  74. NDIS_STATUS
  75. DummySendPacketsHandler(
  76. IN PVCCB pVc,
  77. IN PNDIS_PACKET pPacket
  78. );
  79. VOID
  80. nicSendFailureInvalidGeneration(
  81. PVCCB pVc
  82. );
  83. //-----------------------------------------------------------------------------
  84. // Local prototypes (alphabetically)
  85. //-----------------------------------------------------------------------------
  86. NTSTATUS
  87. AsyncStreamDummySendComplete(
  88. IN PDEVICE_OBJECT DeviceObject,
  89. IN PIRP pMyIrp,
  90. IN PVOID Context
  91. );
  92. NTSTATUS
  93. AsyncWriteStreamSendComplete(
  94. IN PDEVICE_OBJECT DeviceObject,
  95. IN PIRP pMyIrp,
  96. IN PVOID Context
  97. );
  98. NTSTATUS
  99. AsyncStreamSendComplete(
  100. IN PDEVICE_OBJECT DeviceObject,
  101. IN PIRP pMyIrp,
  102. IN PVOID Context
  103. );
  104. NDIS_STATUS
  105. nicFreeAsyncWritePacketDataStructures(
  106. IN PVCCB pVc,
  107. IN PIRP pIrp OPTIONAL,
  108. IN PVOID pLocalBuffer OPTIONAL,
  109. IN PNIC_NPAGED_LOOKASIDE_LIST pLookasideList OPTIONAL
  110. );
  111. NDIS_STATUS
  112. nicEthernetVcSend(
  113. IN PVCCB pVc,
  114. IN PNDIS_PACKET pPacket
  115. );
  116. VOID
  117. nicInitAsyncStreamIrb(
  118. IN PCHANNEL_VCCB pChannelVc,
  119. IN PMDL pMdl,
  120. IN OUT PIRB pIrb
  121. );
  122. VOID
  123. nicInitAsyncWriteIrb(
  124. IN PSENDFIFO_VCCB pVc,
  125. IN PMDL pMyMdl,
  126. IN OUT PIRB pMyIrb
  127. );
  128. NDIS_STATUS
  129. nicInsertGaspHeader (
  130. IN PADAPTERCB pAdapter,
  131. IN PNDIS_PACKET pNdisPacket
  132. );
  133. NDIS_STATUS
  134. nicGetGaspHeader (
  135. IN OUT PNDIS_BUFFER *ppNdisBuffer
  136. );
  137. VOID
  138. nicFreeGaspHeader (
  139. IN PNDIS_BUFFER pGaspNdisBuffer
  140. );
  141. VOID
  142. nicFreeToNPagedLookasideList (
  143. IN PNIC_NPAGED_LOOKASIDE_LIST pLookasideList,
  144. IN PVOID pBuffer
  145. );
  146. VOID
  147. nicMakeGaspHeader (
  148. IN PADAPTERCB pAdapter,
  149. IN PGASP_HEADER pGaspHeader
  150. );
  151. NDIS_STATUS
  152. nicCopyOneFragment (
  153. PFRAGMENTATION_STRUCTURE pFragment
  154. );
  155. VOID
  156. nicCopyUnfragmentedHeader (
  157. IN PNIC1394_UNFRAGMENTED_HEADER pDestUnfragmentedHeader,
  158. IN PVOID pSrcUnfragmentedHeader
  159. );
  160. NDIS_STATUS
  161. nicFirstFragmentInitialization (
  162. IN PNDIS_BUFFER pStartNdisBuffer,
  163. IN ULONG DatagramLabelLong,
  164. OUT PFRAGMENTATION_STRUCTURE pFragment
  165. );
  166. VOID
  167. nicInitializeLookasideListHeader (
  168. IN OUT PLOOKASIDE_BUFFER_HEADER pHeader,
  169. IN PNDIS_PACKET pNdisPacket,
  170. IN PVCCB pVc,
  171. IN PNDIS_BUFFER pCurrNdisBuffer,
  172. IN BUS_OPERATION AsyncOp,
  173. IN PADAPTERCB pAdapter
  174. );
  175. NDIS_STATUS
  176. nicCopyNdisPacketToUnfragmentedBuffer(
  177. IN PNIC_NPAGED_LOOKASIDE_LIST pLookasideList,
  178. IN PNDIS_BUFFER pStartNdisBuffer,
  179. IN ULONG PacketLength,
  180. IN BUS_OPERATION AsyncOp,
  181. IN PGASP_HEADER pGaspHeader,
  182. OUT PVOID* ppStartFragmentAddress,
  183. OUT PVOID *ppLookasideListBuffer
  184. );
  185. VOID
  186. nicAddFragmentHeader (
  187. IN PVOID pStartFragmentData,
  188. IN PFRAGMENTATION_STRUCTURE pFragmentStructure,
  189. IN ULONG BufferSize
  190. );
  191. NDIS_STATUS
  192. nicFreeAsyncStreamPacketDataStructures(
  193. IN PVCCB pVc,
  194. IN PIRP pIrp OPTIONAL,
  195. IN PVOID pLocalBuffer OPTIONAL,
  196. IN PNIC_NPAGED_LOOKASIDE_LIST pLookasideList OPTIONAL
  197. );
  198. VOID
  199. nicGetGenerationWorkItem(
  200. NDIS_WORK_ITEM* pGetGenerationWorkItem,
  201. IN PVOID Context
  202. );
  203. VOID
  204. nicMpCoSendComplete (
  205. NDIS_STATUS NdisStatus,
  206. PVCCB pVc,
  207. PNDIS_PACKET pPacket
  208. );
  209. VOID
  210. nicSendTimer (
  211. IN PVOID SystemSpecific1,
  212. IN PVOID FunctionContext,
  213. IN PVOID SystemSpecific2,
  214. IN PVOID SystemSpecific3
  215. );
  216. UINT
  217. nicNumFragmentsNeeded (
  218. UINT PacketLength ,
  219. UINT MaxPayload,
  220. UINT FragmentOverhead
  221. );