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.

1388 lines
24 KiB

  1. /*++
  2. Copyright (c) 1990-1995 Microsoft Corporation
  3. Module Name:
  4. Wanproto.h
  5. Abstract:
  6. This file contains the prototypes for functions that NdisWan uses.
  7. Author:
  8. Tony Bell (TonyBe) June 06, 1995
  9. Environment:
  10. Kernel Mode
  11. Revision History:
  12. TonyBe 06/06/95 Created
  13. --*/
  14. #ifndef _NDISWAN_PROTO
  15. #define _NDISWAN_PROTO
  16. //
  17. // Functions from cl.c
  18. //
  19. NDIS_STATUS
  20. ClCreateVc(
  21. IN NDIS_HANDLE ProtocolAfContext,
  22. IN NDIS_HANDLE NdisVcHandle,
  23. OUT PNDIS_HANDLE ProtocolVcContext
  24. );
  25. NDIS_STATUS
  26. ClDeleteVc(
  27. IN NDIS_HANDLE ProtocolVcContext
  28. );
  29. VOID
  30. ClOpenAfComplete(
  31. IN NDIS_STATUS Status,
  32. IN NDIS_HANDLE ProtocolAfContext,
  33. IN NDIS_HANDLE NdisAfHandle
  34. );
  35. VOID
  36. ClCloseAfComplete(
  37. IN NDIS_STATUS Status,
  38. IN NDIS_HANDLE ProtocolAfContext
  39. );
  40. VOID
  41. ClRegisterSapComplete(
  42. IN NDIS_STATUS Status,
  43. IN NDIS_HANDLE ProtocolSapContext,
  44. IN PCO_SAP Sap,
  45. IN NDIS_HANDLE NdisSapHandle
  46. );
  47. VOID
  48. ClDeregisterSapComplete(
  49. IN NDIS_STATUS Status,
  50. IN NDIS_HANDLE ProtocolSapContext
  51. );
  52. VOID
  53. ClMakeCallComplete(
  54. IN NDIS_STATUS Status,
  55. IN NDIS_HANDLE ProtocolVcContext,
  56. IN NDIS_HANDLE NdisPartyHandle OPTIONAL,
  57. IN PCO_CALL_PARAMETERS CallParameters
  58. );
  59. VOID
  60. ClModifyQoSComplete(
  61. IN NDIS_STATUS Status,
  62. IN NDIS_HANDLE ProtocolVcContext,
  63. IN PCO_CALL_PARAMETERS CallParameters
  64. );
  65. VOID
  66. ClCloseCallComplete(
  67. IN NDIS_STATUS Status,
  68. IN NDIS_HANDLE ProtocolVcContext,
  69. IN NDIS_HANDLE ProtocolPartyContext OPTIONAL
  70. );
  71. NDIS_STATUS
  72. ClIncomingCall(
  73. IN NDIS_HANDLE ProtocolSapContext,
  74. IN NDIS_HANDLE ProtocolVcContext,
  75. IN OUT PCO_CALL_PARAMETERS CallParameters
  76. );
  77. VOID
  78. ClIncomingCallQoSChange(
  79. IN NDIS_HANDLE ProtocolVcContext,
  80. IN PCO_CALL_PARAMETERS CallParameters
  81. );
  82. VOID
  83. ClIncomingCloseCall(
  84. IN NDIS_STATUS CloseStatus,
  85. IN NDIS_HANDLE ProtocolVcContext,
  86. IN PVOID CloseData OPTIONAL,
  87. IN UINT Size OPTIONAL
  88. );
  89. VOID
  90. ClCallConnected(
  91. IN NDIS_HANDLE ProtocolVcContext
  92. );
  93. //
  94. // Functions from cm.c
  95. //
  96. NDIS_STATUS
  97. CmCreateVc(
  98. IN NDIS_HANDLE ProtocolAfContext,
  99. IN NDIS_HANDLE NdisVcHandle,
  100. OUT PNDIS_HANDLE ProtocolVcContext
  101. );
  102. NDIS_STATUS
  103. CmDeleteVc(
  104. IN NDIS_HANDLE ProtocolVcContext
  105. );
  106. NDIS_STATUS
  107. CmOpenAf(
  108. IN NDIS_HANDLE CallMgrBindingContext,
  109. IN PCO_ADDRESS_FAMILY AddressFamily,
  110. IN NDIS_HANDLE NdisAfHandle,
  111. OUT PNDIS_HANDLE CallMgrAfContext
  112. );
  113. NDIS_STATUS
  114. CmCloseAf(
  115. IN NDIS_HANDLE CallMgrAfContext
  116. );
  117. NDIS_STATUS
  118. CmRegisterSap(
  119. IN NDIS_HANDLE CallMgrAfContext,
  120. IN PCO_SAP Sap,
  121. IN NDIS_HANDLE NdisSapHandle,
  122. OUT PNDIS_HANDLE CallMgrSapContext
  123. );
  124. NDIS_STATUS
  125. CmDeregisterSap(
  126. IN NDIS_HANDLE CallMgrSapContext
  127. );
  128. NDIS_STATUS
  129. CmMakeCall(
  130. IN NDIS_HANDLE CallMgrVcContext,
  131. IN OUT PCO_CALL_PARAMETERS CallParameters,
  132. IN NDIS_HANDLE NdisPartyHandle OPTIONAL,
  133. OUT PNDIS_HANDLE CallMgrPartyContext OPTIONAL
  134. );
  135. NDIS_STATUS
  136. CmCloseCall(
  137. IN NDIS_HANDLE CallMgrVcContext,
  138. IN NDIS_HANDLE CallMgrPartyContext OPTIONAL,
  139. IN PVOID CloseData OPTIONAL,
  140. IN UINT Size OPTIONAL
  141. );
  142. NDIS_STATUS
  143. CmModifyCallQoS(
  144. IN NDIS_HANDLE CallMgrVcContext,
  145. IN PCO_CALL_PARAMETERS CallParameters
  146. );
  147. VOID
  148. CmIncomingCallComplete(
  149. IN NDIS_STATUS Status,
  150. IN NDIS_HANDLE CallMgrVcContext,
  151. IN PCO_CALL_PARAMETERS CallParameters
  152. );
  153. VOID
  154. CmActivateVcComplete(
  155. IN NDIS_STATUS Status,
  156. IN NDIS_HANDLE CallMgrVcContext,
  157. IN PCO_CALL_PARAMETERS CallParameters
  158. );
  159. VOID
  160. CmDeactivateVcComplete(
  161. IN NDIS_STATUS Status,
  162. IN NDIS_HANDLE CallMgrVcContext
  163. );
  164. NDIS_STATUS
  165. CmRequest(
  166. IN NDIS_HANDLE ProtocolAfContext,
  167. IN NDIS_HANDLE ProtocolVcContext OPTIONAL,
  168. IN NDIS_HANDLE ProtocolPartyContext OPTIONAL,
  169. IN OUT PNDIS_REQUEST NdisRequest
  170. );
  171. //
  172. // Functions from ccp.c
  173. //
  174. VOID
  175. WanInitECP(
  176. VOID
  177. );
  178. VOID
  179. WanDeleteECP(
  180. VOID
  181. );
  182. NTSTATUS
  183. WanAllocateECP(
  184. PBUNDLECB BundleCB,
  185. PCOMPRESS_INFO CompInfo,
  186. PCRYPTO_INFO CryptoInfo,
  187. BOOLEAN IsSend
  188. );
  189. VOID
  190. WanDeallocateECP(
  191. PBUNDLECB BundleCB,
  192. PCOMPRESS_INFO CompInfo,
  193. PCRYPTO_INFO CryptoInfo
  194. );
  195. NTSTATUS
  196. WanAllocateCCP(
  197. PBUNDLECB BundleCB,
  198. PCOMPRESS_INFO CompInfo,
  199. BOOLEAN IsSend
  200. );
  201. VOID
  202. WanDeallocateCCP(
  203. PBUNDLECB BundleCB,
  204. PCOMPRESS_INFO CompInfo,
  205. BOOLEAN IsSend
  206. );
  207. //
  208. // Functions from indicate.c
  209. //
  210. VOID
  211. NdisWanLineUpIndication(
  212. IN POPENCB OpenCB,
  213. IN PUCHAR Buffer,
  214. IN ULONG BufferSize
  215. );
  216. VOID
  217. NdisWanLineDownIndication(
  218. IN POPENCB OpenCB,
  219. IN PUCHAR Buffer,
  220. IN ULONG BufferSize
  221. );
  222. VOID
  223. NdisWanFragmentIndication(
  224. IN POPENCB OpenCB,
  225. IN PUCHAR Buffer,
  226. IN ULONG BufferSize
  227. );
  228. VOID
  229. NdisCoWanFragmentIndication(
  230. IN PLINKCB LinkCB,
  231. IN PBUNDLECB BundleCB,
  232. IN PUCHAR Buffer,
  233. IN ULONG BufferSize
  234. );
  235. VOID
  236. NdisCoWanLinkParamChange(
  237. IN PLINKCB LinkCB,
  238. IN PBUNDLECB BundleCB,
  239. IN PUCHAR Buffer,
  240. IN ULONG BufferSize
  241. );
  242. VOID
  243. UpdateBundleInfo(
  244. IN PBUNDLECB BundleCB
  245. );
  246. VOID
  247. AddLinkToBundle(
  248. IN PBUNDLECB BundleCB,
  249. IN PLINKCB LinkCB
  250. );
  251. VOID
  252. RemoveLinkFromBundle(
  253. IN PBUNDLECB BundleCB,
  254. IN PLINKCB LinkCB,
  255. IN BOOLEAN Locked
  256. );
  257. VOID
  258. FreeBundleResources(
  259. PBUNDLECB BundleCB
  260. );
  261. //
  262. // Functions from init.c
  263. //
  264. //
  265. // Functions from io.c
  266. //
  267. VOID
  268. SetBundleFlags(
  269. PBUNDLECB BundleCB
  270. );
  271. #ifdef NT
  272. NTSTATUS
  273. NdisWanIoctl(
  274. IN PDEVICE_OBJECT pDeviceObject,
  275. IN PIRP pIrp
  276. );
  277. NTSTATUS
  278. NdisWanCreate(
  279. IN PDEVICE_OBJECT pDeviceObject,
  280. IN PIRP pIrp
  281. );
  282. NTSTATUS
  283. NdisWanCleanup(
  284. IN PDEVICE_OBJECT pDeviceObject,
  285. IN PIRP pIrp
  286. );
  287. NTSTATUS
  288. NdisWanPnPPower(
  289. IN PDEVICE_OBJECT pDeviceObject,
  290. IN PIRP pIrp
  291. );
  292. VOID
  293. NdisWanCancelRoutine(
  294. IN PDEVICE_OBJECT pDeviceObject,
  295. IN PIRP pIrp
  296. );
  297. NTSTATUS
  298. NdisWanIrpStub(
  299. IN PDEVICE_OBJECT pDeviceObject,
  300. IN PIRP pIrp
  301. );
  302. VOID
  303. FlushProtocolPacketQueue(
  304. PPROTOCOLCB ProtocolCB
  305. );
  306. VOID
  307. IoRecvIrpWorker(
  308. PKDPC Dpc,
  309. PVOID Context,
  310. PVOID Arg1,
  311. PVOID Arg2
  312. );
  313. #endif // NT
  314. VOID
  315. RemoveProtocolCBFromBundle(
  316. PPROTOCOLCB ProtocolCB
  317. );
  318. //
  319. // Functions from loopback.c
  320. //
  321. VOID
  322. NdisWanIndicateLoopbackPacket(
  323. PMINIPORTCB MiniportCB,
  324. PNDIS_PACKET NdisPacket
  325. );
  326. //
  327. // Functions from memory.c
  328. //
  329. PMINIPORTCB
  330. NdisWanAllocateMiniportCB(
  331. IN PNDIS_STRING AdapterName
  332. );
  333. VOID
  334. NdisWanFreeMiniportCB(
  335. IN PMINIPORTCB pMiniportCB
  336. );
  337. POPENCB
  338. NdisWanAllocateOpenCB(
  339. IN PNDIS_STRING BindName
  340. );
  341. VOID
  342. NdisWanFreeOpenCB(
  343. IN POPENCB pOpenCB
  344. );
  345. PPROTOCOLCB
  346. NdisWanAllocateProtocolCB(
  347. IN PNDISWAN_ROUTE Route
  348. );
  349. VOID
  350. NdisWanFreeProtocolCB(
  351. IN PPROTOCOLCB ProtocolCB
  352. );
  353. PLINKCB
  354. NdisWanAllocateLinkCB(
  355. IN POPENCB OpenCB,
  356. IN ULONG SendWindow
  357. );
  358. VOID
  359. NdisWanFreeLinkCB(
  360. IN PLINKCB LinkCB
  361. );
  362. PBUNDLECB
  363. NdisWanAllocateBundleCB(
  364. VOID
  365. );
  366. VOID
  367. NdisWanFreeBundleCB(
  368. IN PBUNDLECB BundleCB
  369. );
  370. PNDIS_PACKET
  371. NdisWanAllocateNdisPacket(
  372. ULONG MagicNumber
  373. );
  374. VOID
  375. NdisWanFreeNdisPacket(
  376. PNDIS_PACKET NdisPacket
  377. );
  378. PVOID
  379. AllocateDataDesc(
  380. POOL_TYPE PoolType,
  381. SIZE_T NumberOfBytes,
  382. ULONG Tag
  383. );
  384. VOID
  385. FreeDataDesc(
  386. PVOID Buffer
  387. );
  388. PRECV_DESC
  389. NdisWanAllocateRecvDesc(
  390. ULONG SizeNeeded
  391. );
  392. VOID
  393. NdisWanFreeRecvDesc(
  394. PRECV_DESC RecvDesc
  395. );
  396. PSEND_DESC
  397. NdisWanAllocateSendDesc(
  398. PLINKCB LinkCB,
  399. ULONG SizeNeeded
  400. );
  401. VOID
  402. NdisWanFreeSendDesc(
  403. PSEND_DESC SendDesc
  404. );
  405. NDIS_STATUS
  406. NdisWanAllocateSendResources(
  407. POPENCB OpenCB
  408. );
  409. VOID
  410. NdisWanFreeSendResources(
  411. POPENCB OpenCB
  412. );
  413. NDIS_STATUS
  414. NdisWanCreateProtocolInfoTable(
  415. VOID
  416. );
  417. VOID
  418. NdisWanDestroyProtocolInfoTable(
  419. VOID
  420. );
  421. NDIS_STATUS
  422. NdisWanCreateConnectionTable(
  423. ULONG TableSize
  424. );
  425. VOID
  426. CompleteThresholdEvent(
  427. PBUNDLECB BundleCB,
  428. ULONG DataType,
  429. ULONG ThresholdType
  430. );
  431. PCL_AFSAPCB
  432. NdisWanAllocateClAfSapCB(
  433. POPENCB OpenCB,
  434. PCO_ADDRESS_FAMILY AddressFamily
  435. );
  436. VOID
  437. NdisWanFreeClAfSapCB(
  438. PCL_AFSAPCB AfSapCB
  439. );
  440. PCM_AFSAPCB
  441. NdisWanAllocateCmAfSapCB(
  442. PMINIPORTCB MiniportCB
  443. );
  444. VOID
  445. NdisWanFreeCmAfSapCB(
  446. PCM_AFSAPCB AfSapCB
  447. );
  448. PCM_VCCB
  449. NdisWanAllocateCmVcCB(
  450. PCM_AFSAPCB AfSapCB,
  451. NDIS_HANDLE NdisVcHandle
  452. );
  453. VOID
  454. NdisWanFreeCmVcCB(
  455. PCM_VCCB CmVcCB
  456. );
  457. NDIS_STATUS
  458. AllocateIoNdisPacket(
  459. ULONG SizeNeeded,
  460. PNDIS_PACKET *NdisPacket,
  461. PNDIS_BUFFER *NdisBuffer,
  462. PUCHAR *DataBuffer
  463. );
  464. VOID
  465. FreeIoNdisPacket(
  466. PNDIS_PACKET NdisPacket
  467. );
  468. //
  469. // Functions from ndiswan.c
  470. //
  471. NDIS_STATUS
  472. DoMiniportInit(
  473. VOID
  474. );
  475. NDIS_STATUS
  476. DoProtocolInit(
  477. IN PUNICODE_STRING RegistryPath
  478. );
  479. NDIS_STATUS
  480. DoWanMiniportInit(
  481. VOID
  482. );
  483. VOID
  484. NdisWanReadRegistry(
  485. IN PUNICODE_STRING RegistryPath
  486. );
  487. VOID
  488. NdisWanBindMiniports(
  489. IN PUNICODE_STRING RegistryPath
  490. );
  491. VOID
  492. NdisWanGlobalCleanup(
  493. VOID
  494. );
  495. VOID
  496. SetProtocolInfo(
  497. IN PPROTOCOL_INFO ProtocolInfo
  498. );
  499. BOOLEAN
  500. GetProtocolInfo(
  501. IN OUT PPROTOCOL_INFO ProtocolInfo
  502. );
  503. NDIS_HANDLE
  504. InsertLinkInConnectionTable(
  505. IN PLINKCB LinkCB
  506. );
  507. VOID
  508. RemoveLinkFromConnectionTable(
  509. IN PLINKCB LinkCB
  510. );
  511. NDIS_HANDLE
  512. InsertBundleInConnectionTable(
  513. IN PBUNDLECB BundleCB
  514. );
  515. VOID
  516. RemoveBundleFromConnectionTable(
  517. IN PBUNDLECB BundleCB
  518. );
  519. NTSTATUS
  520. OpenTransformDriver(
  521. IN PWSTR ValueName,
  522. IN ULONG ValueType,
  523. IN PVOID ValueData,
  524. IN ULONG ValueLength,
  525. IN PVOID Context,
  526. IN PVOID EntryContext
  527. );
  528. NTSTATUS
  529. BindQueryRoutine(
  530. IN PWSTR ValueName,
  531. IN ULONG ValueType,
  532. IN PVOID ValueData,
  533. IN ULONG ValueLength,
  534. IN PVOID Context,
  535. IN PVOID EntryContext
  536. );
  537. BOOLEAN
  538. IsHandleValid(
  539. USHORT usHandleType,
  540. NDIS_HANDLE hHandle
  541. );
  542. #if DBG
  543. PUCHAR
  544. NdisWanGetNdisStatus(
  545. IN NDIS_STATUS GeneralStatus
  546. );
  547. #endif
  548. //
  549. // Functions from miniport.c
  550. //
  551. BOOLEAN
  552. MPCheckForHang(
  553. IN NDIS_HANDLE MiniportAdapterContext
  554. );
  555. #if 0
  556. NDIS_STATUS
  557. MPQueryInformation(
  558. IN NDIS_HANDLE MiniportAdapterContext,
  559. IN NDIS_OID Oid,
  560. IN PVOID InformationBuffer,
  561. IN ULONG InformationBufferLength,
  562. OUT PULONG BytesWritten,
  563. OUT PULONG BytesNeeded
  564. );
  565. NDIS_STATUS
  566. MPSetInformation(
  567. IN NDIS_HANDLE MiniportAdapterContext,
  568. IN NDIS_OID Oid,
  569. IN PVOID InformationBuffer,
  570. IN ULONG InformationBufferLength,
  571. OUT PULONG BytesWritten,
  572. OUT PULONG BytesNeeded
  573. );
  574. #endif
  575. VOID
  576. MPHalt(
  577. IN NDIS_HANDLE MiniportAdapterContext
  578. );
  579. NDIS_STATUS
  580. MPInitialize(
  581. OUT PNDIS_STATUS OpenErrorStatus,
  582. OUT PUINT SelectedMediumIndex,
  583. IN PNDIS_MEDIUM MediumArray,
  584. IN UINT MediumArraySize,
  585. IN NDIS_HANDLE MiniportAdapterHandle,
  586. IN NDIS_HANDLE WrapperConfigurationContext
  587. );
  588. NDIS_STATUS
  589. MPReconfigure(
  590. OUT PNDIS_STATUS OpenErrorStatus,
  591. IN NDIS_HANDLE MiniportAdapterContext,
  592. IN NDIS_HANDLE WrapperConfigurationContext
  593. );
  594. NDIS_STATUS
  595. MPReset(
  596. OUT PBOOLEAN AddressingReset,
  597. IN NDIS_HANDLE MiniportAdapterContext
  598. );
  599. VOID
  600. MPReturnPacket(
  601. IN NDIS_HANDLE MiniportAdapterContext,
  602. IN PNDIS_PACKET Packet
  603. );
  604. VOID
  605. MPSendPackets(
  606. IN NDIS_HANDLE MiniportAdapterContext,
  607. IN PPNDIS_PACKET PacketArray,
  608. IN UINT NumberOfPackets
  609. );
  610. NDIS_STATUS
  611. MPTransferData(
  612. OUT PNDIS_PACKET NdisPacket,
  613. OUT PUINT BytesTransferred,
  614. IN NDIS_HANDLE MiniportAdapterContext,
  615. IN NDIS_HANDLE MiniportReceiveContext,
  616. IN UINT ByteOffset,
  617. IN UINT BytesToTransfer
  618. );
  619. NDIS_STATUS
  620. MPCoCreateVc(
  621. IN NDIS_HANDLE MiniportAdapterContext,
  622. IN NDIS_HANDLE NdisVcHandle,
  623. OUT PNDIS_HANDLE MiniportVcContext
  624. );
  625. NDIS_STATUS
  626. MPCoDeleteVc(
  627. IN NDIS_HANDLE MiniportVcContext
  628. );
  629. NDIS_STATUS
  630. MPCoActivateVc(
  631. IN NDIS_HANDLE MiniportVcContext,
  632. IN OUT PCO_CALL_PARAMETERS CallParameters
  633. );
  634. NDIS_STATUS
  635. MPCoDeactivateVc(
  636. IN NDIS_HANDLE MiniportVcContext
  637. );
  638. VOID
  639. MPCoSendPackets(
  640. IN NDIS_HANDLE MiniportVcContext,
  641. IN PPNDIS_PACKET PacketArray,
  642. IN UINT NumberOfPackets
  643. );
  644. NDIS_STATUS
  645. MPCoRequest(
  646. IN NDIS_HANDLE MiniportAdapterContext,
  647. IN NDIS_HANDLE MiniportVcContext OPTIONAL,
  648. IN OUT PNDIS_REQUEST NdisRequest
  649. );
  650. //
  651. // Functions from protocol.c
  652. //
  653. NDIS_STATUS
  654. ProtoOpenWanAdapter(
  655. POPENCB pOpenCB
  656. );
  657. NDIS_STATUS
  658. ProtoCloseWanAdapter(
  659. IN POPENCB pOpenCB
  660. );
  661. VOID
  662. ProtoOpenAdapterComplete(
  663. IN NDIS_HANDLE ProtocolBindingContext,
  664. IN NDIS_STATUS Status,
  665. IN NDIS_STATUS OpenErrorStatus
  666. );
  667. VOID
  668. ProtoCloseAdapterComplete(
  669. IN NDIS_HANDLE ProtocolBindingContext,
  670. IN NDIS_STATUS Status
  671. );
  672. VOID
  673. ProtoResetComplete(
  674. IN NDIS_HANDLE ProtocolBindingContext,
  675. IN NDIS_STATUS Status
  676. );
  677. VOID
  678. ProtoReceiveComplete(
  679. IN NDIS_HANDLE ProtocolBindingContext
  680. );
  681. VOID
  682. ProtoIndicateStatus(
  683. IN NDIS_HANDLE ProtocolBindingContext,
  684. IN NDIS_STATUS GeneralStatus,
  685. IN PVOID StatusBuffer,
  686. IN UINT StatusBufferSize
  687. );
  688. VOID
  689. ProtoIndicateStatusComplete(
  690. IN NDIS_HANDLE ProtocolBindingContext
  691. );
  692. VOID
  693. ProtoWanSendComplete(
  694. IN NDIS_HANDLE ProtocolBindingContext,
  695. IN PNDIS_WAN_PACKET Packet,
  696. IN NDIS_STATUS Status
  697. );
  698. NDIS_STATUS
  699. ProtoWanReceiveIndication(
  700. IN NDIS_HANDLE NdisLinkHandle,
  701. IN PUCHAR Packet,
  702. IN ULONG PacketSize
  703. );
  704. VOID
  705. ProtoRequestComplete(
  706. IN NDIS_HANDLE ProtocolBindingContext,
  707. IN PNDIS_REQUEST NdisRequest,
  708. IN NDIS_STATUS Status
  709. );
  710. VOID
  711. ProtoBindAdapter(
  712. OUT PNDIS_STATUS Status,
  713. IN NDIS_HANDLE BindContext,
  714. IN PNDIS_STRING DeviceName,
  715. IN PVOID SystemSpecific1,
  716. IN PVOID SystemSpecific2
  717. );
  718. VOID
  719. ProtoUnbindAdapter(
  720. OUT PNDIS_STATUS Status,
  721. IN NDIS_HANDLE ProtocolBindingContext,
  722. IN NDIS_HANDLE UnbindContext
  723. );
  724. VOID
  725. ProtoUnload(
  726. VOID
  727. );
  728. NDIS_STATUS
  729. ProtoPnPEvent(
  730. IN NDIS_HANDLE ProtocolBindingContext,
  731. IN PNET_PNP_EVENT NetPnPEvent
  732. );
  733. VOID
  734. ProtoCoSendComplete(
  735. IN NDIS_STATUS Status,
  736. IN NDIS_HANDLE ProtocolVcContext,
  737. IN PNDIS_PACKET Packet
  738. );
  739. VOID
  740. ProtoCoIndicateStatus(
  741. IN NDIS_HANDLE ProtocolBindingContext,
  742. IN NDIS_HANDLE ProtocolVcContext OPTIONAL,
  743. IN NDIS_STATUS GeneralStatus,
  744. IN PVOID StatusBuffer,
  745. IN UINT StatusBufferSize
  746. );
  747. UINT
  748. ProtoCoReceivePacket(
  749. IN NDIS_HANDLE ProtocolBindingContext,
  750. IN NDIS_HANDLE ProtocolVcContext,
  751. IN PNDIS_PACKET Packet
  752. );
  753. NDIS_STATUS
  754. ProtoCoRequest(
  755. IN NDIS_HANDLE ProtocolAfContext,
  756. IN NDIS_HANDLE ProtocolVcContext OPTIONAL,
  757. IN NDIS_HANDLE ProtocolPartyContext OPTIONAL,
  758. IN OUT PNDIS_REQUEST NdisRequest
  759. );
  760. VOID
  761. ProtoCoRequestComplete(
  762. IN NDIS_STATUS Status,
  763. IN NDIS_HANDLE ProtocolAfContext,
  764. IN NDIS_HANDLE ProtocolVcContext OPTIONAL,
  765. IN NDIS_HANDLE ProtocolPartyContext OPTIONAL,
  766. IN PNDIS_REQUEST NdisRequest
  767. );
  768. VOID
  769. ProtoCoAfRegisterNotify(
  770. IN NDIS_HANDLE ProtocolBindingContext,
  771. IN PCO_ADDRESS_FAMILY AddressFamily
  772. );
  773. NDIS_STATUS
  774. DoNewLineUpToProtocol(
  775. IN PPROTOCOLCB ProtocolCB
  776. );
  777. NDIS_STATUS
  778. DoLineUpToProtocol(
  779. IN PPROTOCOLCB ProtocolCB
  780. );
  781. NDIS_STATUS
  782. DoLineDownToProtocol(
  783. PPROTOCOLCB ProtocolCB
  784. );
  785. VOID
  786. NdisWanProcessStatusIndications(
  787. PMINIPORTCB MiniportCB
  788. );
  789. //
  790. // Functions from receive.c
  791. //
  792. NDIS_STATUS
  793. DetectBroadbandFraming(
  794. PLINKCB LinkCB,
  795. PRECV_DESC RecvDesc
  796. );
  797. NDIS_STATUS
  798. DetectFraming(
  799. PLINKCB LinkCB,
  800. PRECV_DESC RecvDesc
  801. );
  802. NDIS_STATUS
  803. ReceivePPP(
  804. PLINKCB LinkCB,
  805. PRECV_DESC RecvDesc
  806. );
  807. NDIS_STATUS
  808. ReceiveSLIP(
  809. PLINKCB LinkCB,
  810. PRECV_DESC RecvDesc
  811. );
  812. NDIS_STATUS
  813. ReceiveRAS(
  814. PLINKCB LinkCB,
  815. PRECV_DESC RecvDesc
  816. );
  817. NDIS_STATUS
  818. ReceiveARAP(
  819. PLINKCB LinkCB,
  820. PRECV_DESC RecvDesc
  821. );
  822. NDIS_STATUS
  823. ReceiveForward(
  824. PLINKCB LinkCB,
  825. PRECV_DESC RecvDesc
  826. );
  827. NDIS_STATUS
  828. ReceiveLLC(
  829. PLINKCB LinkCB,
  830. PRECV_DESC RecvDesc
  831. );
  832. VOID
  833. FlushAssemblyLists(
  834. IN PBUNDLECB BundleCB
  835. );
  836. BOOLEAN
  837. IpIsDataFrame(
  838. PUCHAR HeaderBuffer,
  839. ULONG HeaderBufferLength,
  840. ULONG TotalLength
  841. );
  842. BOOLEAN
  843. IpxIsDataFrame(
  844. PUCHAR HeaderBuffer,
  845. ULONG HeaderBufferLength,
  846. ULONG TotalLength
  847. );
  848. BOOLEAN
  849. NbfIsDataFrame(
  850. PUCHAR HeaderBuffer,
  851. ULONG HeaderBufferLength,
  852. ULONG TotalLength
  853. );
  854. VOID
  855. IndicatePromiscuousRecv(
  856. PBUNDLECB BundleCB,
  857. PRECV_DESC RecvDesc,
  858. RECV_TYPE RecvType
  859. );
  860. //
  861. // Functions from request.c
  862. //
  863. NDIS_STATUS
  864. NdisWanSubmitNdisRequest(
  865. IN POPENCB pOpenCB,
  866. IN PWAN_REQUEST WanRequest
  867. );
  868. NDIS_STATUS
  869. NdisWanOidProc(
  870. IN PMINIPORTCB pMiniportCB,
  871. IN OUT PNDIS_REQUEST NdisRequest
  872. );
  873. NDIS_STATUS
  874. NdisWanCoOidProc(
  875. IN PMINIPORTCB pMiniportCB,
  876. IN PCM_VCCB CmVcCB OPTIONAL,
  877. IN OUT PNDIS_REQUEST NdisRequest
  878. );
  879. //
  880. // Functions from send.c
  881. //
  882. VOID
  883. NdisWanQueueSend(
  884. IN PMINIPORTCB MiniportCB,
  885. IN PNDIS_PACKET NdisPacket
  886. );
  887. VOID
  888. SendPacketOnBundle(
  889. PBUNDLECB BundleCB
  890. );
  891. BOOLEAN
  892. SendFromPPP(
  893. PBUNDLECB BundleCB,
  894. PPROTOCOLCB ProtocolCB,
  895. PBOOLEAN PacketSent
  896. );
  897. BOOLEAN
  898. SendFromProtocol(
  899. PBUNDLECB BundleCB,
  900. PPROTOCOLCB ProtocolCB,
  901. PINT RetClass,
  902. PULONG SendMask,
  903. PBOOLEAN PacketSent
  904. );
  905. BOOLEAN
  906. SendFromFragQueue(
  907. PBUNDLECB BundleCB,
  908. BOOLEAN SendOne,
  909. PBOOLEAN PacketSent
  910. );
  911. UINT
  912. FramePacket(
  913. PBUNDLECB BundleCB,
  914. PPROTOCOLCB ProtocolCB,
  915. PNDIS_PACKET NdisPacket,
  916. PLIST_ENTRY LinkCBList,
  917. ULONG SendingLinks,
  918. INT Class
  919. );
  920. UINT
  921. SendOnLegacyLink(
  922. PSEND_DESC SendDesc
  923. );
  924. UINT
  925. SendOnLink(
  926. PSEND_DESC SendDesc
  927. );
  928. NDIS_STATUS
  929. BuildIoPacket(
  930. IN PLINKCB LinkCB,
  931. IN PBUNDLECB BundleCB,
  932. IN PNDISWAN_IO_PACKET pWanIoPacket,
  933. IN BOOLEAN SendImmediate
  934. );
  935. VOID
  936. CompleteNdisPacket(
  937. PMINIPORTCB MiniportCB,
  938. PPROTOCOLCB ProtocolCB,
  939. PNDIS_PACKET NdisPacket
  940. );
  941. VOID
  942. IndicatePromiscuousSendPacket(
  943. PLINKCB LinkCB,
  944. PNDIS_PACKET NdisPacket
  945. );
  946. VOID
  947. IndicatePromiscuousSendDesc(
  948. PLINKCB LinkCB,
  949. PSEND_DESC SendDesc,
  950. SEND_TYPE SendType
  951. );
  952. VOID
  953. DestroyIoPacket(
  954. PNDIS_PACKET NdisPacket
  955. );
  956. //
  957. // Functions from tapi.c
  958. //
  959. NDIS_STATUS
  960. NdisWanTapiRequestProc(
  961. POPENCB OpenCB,
  962. PNDIS_REQUEST NdisRequest
  963. );
  964. VOID
  965. NdisWanTapiRequestComplete(
  966. POPENCB OpenCB,
  967. PWAN_REQUEST WanRequest
  968. );
  969. VOID
  970. NdisWanTapiIndication(
  971. POPENCB OpenCB,
  972. PUCHAR StatusBuffer,
  973. ULONG StatusBufferSize
  974. );
  975. //
  976. // Function from util.c
  977. //
  978. VOID
  979. NdisWanStringToNdisString(
  980. IN PNDIS_STRING pDestString,
  981. IN PWSTR pSrcBuffer
  982. );
  983. VOID
  984. NdisWanInitUnicodeString(
  985. OUT PUNICODE_STRING DestinationString,
  986. IN PCWSTR SourceString OPTIONAL
  987. );
  988. VOID
  989. NdisWanCopyUnicodeString(
  990. OUT PUNICODE_STRING DestinationString,
  991. IN PUNICODE_STRING SourceString OPTIONAL
  992. );
  993. VOID
  994. NdisWanAllocateAdapterName(
  995. PNDIS_STRING Dest,
  996. PNDIS_STRING Src
  997. );
  998. VOID
  999. NdisWanFreeNdisString(
  1000. IN PNDIS_STRING NdisString
  1001. );
  1002. BOOLEAN
  1003. NdisWanCompareNdisString(
  1004. PNDIS_STRING NdisString1,
  1005. PNDIS_STRING NdisString2
  1006. );
  1007. VOID
  1008. NdisWanNdisStringToInteger(
  1009. IN PNDIS_STRING Source,
  1010. IN PULONG Value
  1011. );
  1012. VOID
  1013. NdisWanCopyNdisString(
  1014. OUT PNDIS_STRING Dest,
  1015. IN PNDIS_STRING Src
  1016. );
  1017. VOID
  1018. NdisWanCopyFromPacketToBuffer(
  1019. IN PNDIS_PACKET NdisPacket,
  1020. IN ULONG Offset,
  1021. IN ULONG BytesToCopy,
  1022. OUT PUCHAR Buffer,
  1023. OUT PULONG BytesCopied
  1024. );
  1025. VOID
  1026. NdisWanCopyFromBufferToPacket(
  1027. PUCHAR Buffer,
  1028. ULONG BytesToCopy,
  1029. PNDIS_PACKET NdisPacket,
  1030. ULONG PacketOffset,
  1031. PULONG BytesCopied
  1032. );
  1033. BOOLEAN
  1034. IsLinkValid(
  1035. NDIS_HANDLE LinkHandle,
  1036. BOOLEAN CheckState,
  1037. PLINKCB *LinkCB
  1038. );
  1039. BOOLEAN
  1040. IsBundleValid(
  1041. NDIS_HANDLE BundleHandle,
  1042. BOOLEAN CheckState,
  1043. PBUNDLECB *BundleCB
  1044. );
  1045. BOOLEAN
  1046. AreLinkAndBundleValid(
  1047. NDIS_HANDLE LinkHandle,
  1048. BOOLEAN CheckState,
  1049. PLINKCB *LinkCB,
  1050. PBUNDLECB *BundleCB
  1051. );
  1052. VOID
  1053. DoDerefBundleCBWork(
  1054. PBUNDLECB BundleCB
  1055. );
  1056. VOID
  1057. DoDerefLinkCBWork(
  1058. PLINKCB LinkCB
  1059. );
  1060. VOID
  1061. DoDerefClAfSapCBWork(
  1062. PCL_AFSAPCB AfSapCB
  1063. );
  1064. VOID
  1065. DoDerefCmVcCBWork(
  1066. PCM_VCCB VcCB
  1067. );
  1068. VOID
  1069. DerefVc(
  1070. PLINKCB LinkCB
  1071. );
  1072. VOID
  1073. DeferredWorker(
  1074. PKDPC Dpc,
  1075. PVOID Context,
  1076. PVOID Arg1,
  1077. PVOID Arg2
  1078. );
  1079. VOID
  1080. BonDWorker(
  1081. PKDPC Dpc,
  1082. PVOID Context,
  1083. PVOID Arg1,
  1084. PVOID Arg2
  1085. );
  1086. VOID
  1087. CheckBonDInfo(
  1088. PKDPC Dpc,
  1089. PBUNDLECB BundleCB,
  1090. PVOID SysArg1,
  1091. PVOID SysArg2
  1092. );
  1093. VOID
  1094. AgeSampleTable(
  1095. PSAMPLE_TABLE SampleTable
  1096. );
  1097. VOID
  1098. UpdateSampleTable(
  1099. PSAMPLE_TABLE SampleTable,
  1100. ULONG BytesSent
  1101. );
  1102. VOID
  1103. UpdateBandwidthOnDemand(
  1104. PBOND_INFO BonDInfo,
  1105. ULONG Bytes
  1106. );
  1107. VOID
  1108. CheckUpperThreshold(
  1109. PBUNDLECB BundleCB
  1110. );
  1111. VOID
  1112. CheckLowerThreshold(
  1113. PBUNDLECB BundleCB
  1114. );
  1115. NTSTATUS
  1116. TransformRegister(
  1117. PVOID ClientOpenContext,
  1118. ULONG CharsSize,
  1119. PTRANSFORM_CHARACTERISTICS Chars,
  1120. ULONG CapsSize,
  1121. PTRANSFORM_INFO Caps
  1122. );
  1123. VOID
  1124. TransformTxComplete(
  1125. NTSTATUS Status,
  1126. PVOID TxCtx,
  1127. PMDL InData,
  1128. PMDL OutData,
  1129. ULONG OutDataOffset,
  1130. ULONG OutDataLength
  1131. );
  1132. VOID
  1133. TransformRxComplete(
  1134. NTSTATUS Status,
  1135. PVOID RxCtx,
  1136. PMDL InData,
  1137. PMDL OutData,
  1138. ULONG OutDataOffset,
  1139. ULONG OutDataLength
  1140. );
  1141. NTSTATUS
  1142. TransformSendCtrlPacket(
  1143. PVOID TxCtx,
  1144. ULONG DataLength,
  1145. PUCHAR Data
  1146. );
  1147. //
  1148. // Functions from vjslip.c
  1149. //
  1150. VOID
  1151. WanInitVJ(
  1152. VOID
  1153. );
  1154. VOID
  1155. WanDeleteVJ(
  1156. VOID
  1157. );
  1158. #endif