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.

460 lines
9.0 KiB

  1. /*++
  2. Copyright (c) 1990-1998 Microsoft Corporation, All Rights Reserved.
  3. Module Name:
  4. proto.h
  5. Abstract:
  6. Ndis Atm Sample protocol.
  7. Author:
  8. Anil Francis Thomas (10/98)
  9. Environment:
  10. Kernel
  11. Revision History:
  12. --*/
  13. #ifndef __PROTO_H
  14. #define __PROTO_H
  15. //
  16. // prototypes from atmsmdrv.c
  17. //
  18. NTSTATUS
  19. DriverEntry(
  20. IN PDRIVER_OBJECT pDriverObject,
  21. IN PUNICODE_STRING RegistryPath
  22. );
  23. VOID
  24. AtmSmShutDown(
  25. );
  26. NDIS_STATUS
  27. AtmSmInitializeNdis(
  28. );
  29. NDIS_STATUS
  30. AtmSmDeinitializeNdis(
  31. );
  32. //
  33. // Prototypes in adapter.c
  34. //
  35. VOID
  36. AtmSmBindAdapter(
  37. OUT PNDIS_STATUS pStatus,
  38. IN NDIS_HANDLE BindContext,
  39. IN PNDIS_STRING pDeviceName,
  40. IN PVOID SystemSpecific1,
  41. IN PVOID SystemSpecific2
  42. );
  43. VOID
  44. AtmSmOpenAdapterComplete(
  45. IN NDIS_HANDLE ProtocolBindingContext,
  46. IN NDIS_STATUS Status,
  47. IN NDIS_STATUS OpenStatus
  48. );
  49. VOID
  50. AtmSmUnbindAdapter(
  51. OUT PNDIS_STATUS pStatus,
  52. IN NDIS_HANDLE ProtocolBindingContext,
  53. IN NDIS_HANDLE UnbindContext
  54. );
  55. NDIS_STATUS
  56. AtmSmShutdownAdapter(
  57. PATMSM_ADAPTER pAdapt
  58. );
  59. VOID
  60. AtmSmCloseAdapterComplete(
  61. IN NDIS_HANDLE ProtocolBindingContext,
  62. IN NDIS_STATUS Status
  63. );
  64. BOOLEAN
  65. AtmSmReferenceAdapter(
  66. PATMSM_ADAPTER pAdapt
  67. );
  68. LONG
  69. AtmSmDereferenceAdapter(
  70. PATMSM_ADAPTER pAdapt
  71. );
  72. NDIS_STATUS
  73. AtmSmQueryAdapterATMAddresses(
  74. PATMSM_ADAPTER pAdapt
  75. );
  76. VOID
  77. AtmSmQueryAdapter(
  78. IN PATMSM_ADAPTER pAdapt
  79. );
  80. NDIS_STATUS
  81. AtmSmPnPEvent(
  82. IN NDIS_HANDLE ProtocolBindingContext,
  83. IN PNET_PNP_EVENT pNetPnPEvent
  84. );
  85. VOID
  86. AtmSmStatus(
  87. IN NDIS_HANDLE ProtocolBindingContext,
  88. IN NDIS_STATUS GeneralStatus,
  89. IN PVOID StatusBuffer,
  90. IN UINT StatusBufferSize
  91. );
  92. VOID
  93. AtmSmReceiveComplete(
  94. IN NDIS_HANDLE ProtocolBindingContext
  95. );
  96. VOID
  97. AtmSmStatusComplete(
  98. IN NDIS_HANDLE ProtocolBindingContext
  99. );
  100. VOID
  101. AtmSmCoStatus(
  102. IN NDIS_HANDLE ProtocolBindingContext,
  103. IN NDIS_HANDLE ProtocolVcContext OPTIONAL,
  104. IN NDIS_STATUS GeneralStatus,
  105. IN PVOID StatusBuffer,
  106. IN UINT StatusBufferSize
  107. );
  108. //
  109. // Prototypes in callmgr.c
  110. //
  111. VOID
  112. AtmSmCoAfRegisterNotify(
  113. IN NDIS_HANDLE ProtocolBindingContext,
  114. IN PCO_ADDRESS_FAMILY pAddressFamily
  115. );
  116. VOID
  117. AtmSmOpenAfComplete(
  118. IN NDIS_STATUS Status,
  119. IN NDIS_HANDLE ProtocolAfContext,
  120. IN NDIS_HANDLE NdisAfHandle
  121. );
  122. NDIS_STATUS
  123. AtmSmRegisterSap(
  124. IN PATMSM_ADAPTER pAdapt
  125. );
  126. VOID
  127. AtmSmRegisterSapComplete(
  128. IN NDIS_STATUS Status,
  129. IN NDIS_HANDLE ProtocolSapContext,
  130. IN PCO_SAP Sap,
  131. IN NDIS_HANDLE NdisSapHandle
  132. );
  133. VOID
  134. AtmSmDeregisterSapComplete(
  135. IN NDIS_STATUS Status,
  136. IN NDIS_HANDLE ProtocolSapContext
  137. );
  138. VOID
  139. AtmSmCloseAfComplete(
  140. IN NDIS_STATUS Status,
  141. IN NDIS_HANDLE ProtocolAfContext
  142. );
  143. NDIS_STATUS
  144. AtmSmCreateVc(
  145. IN NDIS_HANDLE ProtocolAfContext,
  146. IN NDIS_HANDLE NdisVcHandle,
  147. OUT PNDIS_HANDLE ProtocolVcContext
  148. );
  149. NDIS_STATUS
  150. AtmSmDeleteVc(
  151. IN NDIS_HANDLE ProtocolVcContext
  152. );
  153. NDIS_STATUS
  154. AtmSmIncomingCall(
  155. IN NDIS_HANDLE ProtocolSapContext,
  156. IN NDIS_HANDLE ProtocolVcContext,
  157. IN OUT PCO_CALL_PARAMETERS CallParameters
  158. );
  159. VOID
  160. AtmSmCallConnected(
  161. IN NDIS_HANDLE ProtocolVcContext
  162. );
  163. VOID
  164. AtmSmMakeCallComplete(
  165. IN NDIS_STATUS Status,
  166. IN NDIS_HANDLE ProtocolVcContext,
  167. IN NDIS_HANDLE NdisPartyHandle OPTIONAL,
  168. IN PCO_CALL_PARAMETERS CallParameters
  169. );
  170. VOID
  171. AtmSmIncomingCloseCall(
  172. IN NDIS_STATUS CloseStatus,
  173. IN NDIS_HANDLE ProtocolVcContext,
  174. IN PVOID CloseData OPTIONAL,
  175. IN UINT Size OPTIONAL
  176. );
  177. VOID
  178. AtmSmCloseCallComplete(
  179. IN NDIS_STATUS Status,
  180. IN NDIS_HANDLE ProtocolVcContext,
  181. IN NDIS_HANDLE ProtocolPartyContext OPTIONAL
  182. );
  183. VOID
  184. AtmSmAddPartyComplete(
  185. IN NDIS_STATUS Status,
  186. IN NDIS_HANDLE ProtocolPartyContext,
  187. IN NDIS_HANDLE NdisPartyHandle,
  188. IN PCO_CALL_PARAMETERS CallParameters
  189. );
  190. VOID
  191. AtmSmDropPartyComplete(
  192. IN NDIS_STATUS Status,
  193. IN NDIS_HANDLE ProtocolPartyContext
  194. );
  195. VOID
  196. AtmSmIncomingDropParty(
  197. IN NDIS_STATUS DropStatus,
  198. IN NDIS_HANDLE ProtocolPartyContext,
  199. IN PVOID CloseData OPTIONAL,
  200. IN UINT Size OPTIONAL
  201. );
  202. VOID
  203. AtmSmIncomingCallQoSChange(
  204. IN NDIS_HANDLE ProtocolVcContext,
  205. IN PCO_CALL_PARAMETERS CallParameters
  206. );
  207. //
  208. // Prototypes in misc.c
  209. //
  210. NDIS_STATUS
  211. AtmSmAllocVc(
  212. IN PATMSM_ADAPTER pAdapt,
  213. OUT PATMSM_VC *ppVc,
  214. IN ULONG VcType,
  215. IN NDIS_HANDLE NdisVcHandle
  216. );
  217. BOOLEAN
  218. AtmSmReferenceVc(
  219. IN PATMSM_VC pVc
  220. );
  221. ULONG
  222. AtmSmDereferenceVc(
  223. IN PATMSM_VC pVc
  224. );
  225. VOID
  226. AtmSmDisconnectVc(
  227. IN PATMSM_VC pVc
  228. );
  229. BOOLEAN
  230. DeleteMemberInfoFromVc(
  231. IN PATMSM_VC pVc,
  232. IN PATMSM_PMP_MEMBER pMemberToRemove
  233. );
  234. VOID
  235. AtmSmDropMemberFromVc(
  236. IN PATMSM_VC pVc,
  237. IN PATMSM_PMP_MEMBER pMemberToDrop
  238. );
  239. PCO_CALL_PARAMETERS
  240. AtmSmPrepareCallParameters(
  241. IN PATMSM_ADAPTER pAdapt,
  242. IN PHW_ADDR pHwAddr,
  243. IN BOOLEAN IsMakeCall,
  244. IN BOOLEAN IsMultipointVC
  245. );
  246. NTSTATUS
  247. VerifyRecvOpenContext(
  248. PATMSM_ADAPTER pAdapt
  249. );
  250. NTSTATUS
  251. VerifyConnectContext(
  252. PATMSM_VC pVc
  253. );
  254. UINT
  255. CopyPacketToIrp(
  256. PIRP pIrp,
  257. PNDIS_PACKET pPkt
  258. );
  259. VOID
  260. AtmSmRecvReturnTimerFunction (
  261. IN PVOID SystemSpecific1,
  262. IN PVOID FunctionContext,
  263. IN PVOID SystemSpecific2,
  264. IN PVOID SystemSpecific3
  265. );
  266. VOID
  267. AtmSmConnectToPMPDestinations(
  268. IN PATMSM_VC pVc
  269. );
  270. VOID
  271. AtmSmConnectPPVC(
  272. IN PATMSM_VC pVc
  273. );
  274. //
  275. // Prototypes in request.c
  276. //
  277. NDIS_STATUS
  278. AtmSmCoRequest(
  279. IN NDIS_HANDLE ProtocolAfContext,
  280. IN NDIS_HANDLE ProtocolVcContext OPTIONAL,
  281. IN NDIS_HANDLE ProtocolPartyContext OPTIONAL,
  282. IN OUT PNDIS_REQUEST NdisRequest
  283. );
  284. VOID
  285. AtmSmCoRequestComplete(
  286. IN NDIS_STATUS Status,
  287. IN NDIS_HANDLE ProtocolAfContext,
  288. IN NDIS_HANDLE ProtocolVcContext OPTIONAL,
  289. IN NDIS_HANDLE ProtocolPartyContext OPTIONAL,
  290. IN PNDIS_REQUEST pNdisRequest
  291. );
  292. VOID
  293. AtmSmSendAdapterNdisRequest(
  294. IN PATMSM_ADAPTER pAdapt,
  295. IN NDIS_OID Oid,
  296. IN PVOID pBuffer,
  297. IN ULONG BufferLength
  298. );
  299. VOID
  300. AtmSmRequestComplete(
  301. IN NDIS_HANDLE ProtocolBindingContext,
  302. IN PNDIS_REQUEST pRequest,
  303. IN NDIS_STATUS Status
  304. );
  305. //
  306. // Prototypes in sendrecv.c
  307. //
  308. VOID
  309. AtmSmSendPacketOnVc(
  310. IN PATMSM_VC pVc,
  311. IN PNDIS_PACKET pPacket
  312. );
  313. VOID
  314. AtmSmSendQueuedPacketsOnVc(
  315. IN PATMSM_VC pVc
  316. );
  317. VOID
  318. AtmSmCoSendComplete(
  319. IN NDIS_STATUS Status,
  320. IN NDIS_HANDLE ProtocolVcContext,
  321. IN PNDIS_PACKET Packet
  322. );
  323. UINT
  324. AtmSmCoReceivePacket(
  325. IN NDIS_HANDLE ProtocolBindingContext,
  326. IN NDIS_HANDLE ProtocolVcContext,
  327. IN PNDIS_PACKET Packet
  328. );
  329. //
  330. // Prototypes in ioctl.c
  331. //
  332. NTSTATUS
  333. AtmSmDispatch(
  334. IN PDEVICE_OBJECT pDeviceObject,
  335. IN PIRP pIrp
  336. );
  337. NTSTATUS
  338. AtmSmIoctlEnumerateAdapters(
  339. PIRP pIrp,
  340. PIO_STACK_LOCATION pIrpSp
  341. );
  342. NTSTATUS
  343. AtmSmIoctlOpenForRecv(
  344. PIRP pIrp,
  345. PIO_STACK_LOCATION pIrpSp
  346. );
  347. NTSTATUS
  348. AtmSmIoctlRecvData(
  349. PIRP pIrp,
  350. PIO_STACK_LOCATION pIrpSp
  351. );
  352. NTSTATUS
  353. AtmSmIoctlCloseRecvHandle(
  354. PIRP pIrp,
  355. PIO_STACK_LOCATION pIrpSp
  356. );
  357. NTSTATUS
  358. AtmSmIoctlConnectToDsts(
  359. PIRP pIrp,
  360. PIO_STACK_LOCATION pIrpSp
  361. );
  362. NTSTATUS
  363. AtmSmIoctlSendToDsts(
  364. PIRP pIrp,
  365. PIO_STACK_LOCATION pIrpSp
  366. );
  367. NTSTATUS
  368. AtmSmIoctlCloseSendHandle(
  369. PIRP pIrp,
  370. PIO_STACK_LOCATION pIrpSp
  371. );
  372. #endif