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.

1720 lines
44 KiB

  1. /*++
  2. Copyright (c) 1990-1995 Microsoft Corporation
  3. Module Name:
  4. cprotos.h
  5. Abstract:
  6. NDIS wrapper function prototypes for common functions
  7. Author:
  8. Environment:
  9. Kernel mode, FSD
  10. Revision History:
  11. Jun-95 Jameel Hyder Split up from a monolithic file
  12. --*/
  13. NTSTATUS
  14. ndisMIrpCompletion(
  15. IN PDEVICE_OBJECT DeviceObject,
  16. IN PIRP Irp,
  17. IN PVOID Context
  18. );
  19. #undef NdisMSetAttributes
  20. VOID
  21. NdisMSetAttributes(
  22. IN NDIS_HANDLE MiniportAdapterHandle,
  23. IN NDIS_HANDLE MiniportAdapterContext,
  24. IN BOOLEAN BusMaster,
  25. IN NDIS_INTERFACE_TYPE AdapterType
  26. );
  27. NDIS_STATUS
  28. ndisPnPNotifyAllTransports(
  29. IN PNDIS_MINIPORT_BLOCK Miniport,
  30. IN NET_PNP_EVENT_CODE PnpEvent,
  31. IN PVOID Buffer,
  32. IN ULONG BufferLength
  33. );
  34. NDIS_STATUS
  35. FASTCALL
  36. ndisPnPNotifyBinding(
  37. IN PNDIS_OPEN_BLOCK Open,
  38. IN PNET_PNP_EVENT NetPnpEvent
  39. );
  40. PNDIS_OPEN_BLOCK
  41. FASTCALL
  42. ndisReferenceNextUnprocessedOpen(
  43. IN PNDIS_MINIPORT_BLOCK Miniport
  44. );
  45. VOID
  46. ndisUnprocessAllOpens(
  47. IN PNDIS_MINIPORT_BLOCK Miniport
  48. );
  49. NTSTATUS
  50. ndisCompletionRoutine(
  51. IN PDEVICE_OBJECT pdo,
  52. IN PIRP pirp,
  53. IN PVOID Context
  54. );
  55. NTSTATUS
  56. ndisPnPDispatch(
  57. IN PDEVICE_OBJECT DeviceObject,
  58. IN PIRP Irp
  59. );
  60. BOOLEAN
  61. ndisMIsr(
  62. IN PKINTERRUPT KInterrupt,
  63. IN PVOID Context
  64. );
  65. VOID
  66. ndisMDpc(
  67. IN PVOID SystemSpecific1,
  68. IN PVOID InterruptContext,
  69. IN PVOID SystemSpecific2,
  70. IN PVOID SystemSpecific3
  71. );
  72. VOID
  73. ndisMWakeUpDpcX(
  74. IN PKDPC Dpc,
  75. IN PVOID Context,
  76. IN PVOID SystemContext1,
  77. IN PVOID SystemContext2
  78. );
  79. VOID
  80. ndisMPollMediaState(
  81. IN PNDIS_MINIPORT_BLOCK Miniport
  82. );
  83. #undef NdisMSetTimer
  84. VOID
  85. NdisMSetTimer(
  86. IN PNDIS_MINIPORT_TIMER MiniportTimer,
  87. IN UINT MillisecondsToDelay
  88. );
  89. VOID
  90. ndisMDpcX(
  91. IN PVOID SystemSpecific1,
  92. IN PVOID InterruptContext,
  93. IN PVOID SystemSpecific2,
  94. IN PVOID SystemSpecific3
  95. );
  96. VOID
  97. ndisMTimerDpcX(
  98. IN PVOID SystemSpecific1,
  99. IN PVOID InterruptContext,
  100. IN PVOID SystemSpecific2,
  101. IN PVOID SystemSpecific3
  102. );
  103. VOID
  104. ndisMWakeUpDpc(
  105. IN PKDPC Dpc,
  106. IN PVOID Context,
  107. IN PVOID SystemContext1,
  108. IN PVOID SystemContext2
  109. );
  110. VOID
  111. ndisMDeferredDpc(
  112. IN PKDPC Dpc,
  113. IN PVOID Context,
  114. IN PVOID SystemContext1,
  115. IN PVOID SystemContext2
  116. );
  117. NDIS_STATUS
  118. NdisCoAssignInstanceName(
  119. IN NDIS_HANDLE NdisVcHandle,
  120. IN PNDIS_STRING BaseInstanceName,
  121. OUT PNDIS_STRING pVcInstanceName OPTIONAL
  122. );
  123. NDIS_STATUS
  124. ndisMChangeClass(
  125. IN UINT OldFilterClasses,
  126. IN UINT NewFilterClasses,
  127. IN NDIS_HANDLE BindingHandle,
  128. IN PNDIS_REQUEST NdisRequest,
  129. IN BOOLEAN Set
  130. );
  131. NDIS_STATUS
  132. ndisMReset(
  133. IN NDIS_HANDLE NdisBindingHandle
  134. );
  135. NDIS_STATUS
  136. ndisMRequest(
  137. IN NDIS_HANDLE NdisBindingHandle,
  138. IN PNDIS_REQUEST NdisRequest
  139. );
  140. NDIS_STATUS
  141. ndisMRequestX(
  142. IN NDIS_HANDLE NdisBindingHandle,
  143. IN PNDIS_REQUEST NdisRequest
  144. );
  145. VOID
  146. FASTCALL
  147. ndisMAbortRequests(
  148. IN PNDIS_MINIPORT_BLOCK Miniport
  149. );
  150. VOID
  151. FASTCALL
  152. ndisMProcessDeferred(
  153. IN PNDIS_MINIPORT_BLOCK Miniport
  154. );
  155. NDIS_STATUS
  156. ndisMTransferData(
  157. IN NDIS_HANDLE NdisBindingHandle,
  158. IN NDIS_HANDLE MacReceiveContext,
  159. IN UINT ByteOffset,
  160. IN UINT BytesToTransfer,
  161. IN OUT PNDIS_PACKET Packet,
  162. OUT PUINT BytesTransferred
  163. );
  164. #undef NdisMTransferDataComplete
  165. VOID
  166. NdisMTransferDataComplete(
  167. IN NDIS_HANDLE MiniportAdapterHandle,
  168. IN PNDIS_PACKET Packet,
  169. IN NDIS_STATUS Status,
  170. IN UINT BytesTransferred
  171. );
  172. VOID
  173. FASTCALL
  174. ndisMDeferredReturnPackets(
  175. IN PNDIS_MINIPORT_BLOCK Miniport
  176. );
  177. VOID
  178. ndisMIndicatePacket(
  179. IN PNDIS_MINIPORT_BLOCK Miniport,
  180. IN PPNDIS_PACKET PacketArray,
  181. IN UINT NumberOfPackets
  182. );
  183. VOID
  184. ndisMDummyIndicatePacket(
  185. IN PNDIS_MINIPORT_BLOCK Miniport,
  186. IN PPNDIS_PACKET PacketArray,
  187. IN UINT NumberOfPackets
  188. );
  189. NTSTATUS
  190. ndisWMIDispatch(
  191. IN PDEVICE_OBJECT DeviceObject,
  192. IN PIRP pirp
  193. );
  194. NTSTATUS
  195. FASTCALL
  196. ndisWmiDisableEvents(
  197. IN PNDIS_MINIPORT_BLOCK Miniport,
  198. IN LPGUID Guid
  199. );
  200. NTSTATUS
  201. FASTCALL
  202. ndisWmiEnableEvents(
  203. IN PNDIS_MINIPORT_BLOCK Miniport,
  204. IN LPGUID Guid
  205. );
  206. NTSTATUS
  207. ndisWmiChangeSingleItem(
  208. IN PNDIS_MINIPORT_BLOCK Miniport,
  209. IN PWNODE_SINGLE_ITEM wnode,
  210. IN ULONG BufferSize,
  211. OUT PULONG pReturnSize,
  212. IN PIRP Irp
  213. );
  214. NTSTATUS
  215. ndisWmiChangeSingleInstance(
  216. IN PNDIS_MINIPORT_BLOCK Miniport,
  217. IN PWNODE_SINGLE_INSTANCE wnode,
  218. IN ULONG BufferSize,
  219. OUT PULONG pReturnSize,
  220. IN PIRP Irp
  221. );
  222. NTSTATUS
  223. ndisWmiQuerySingleInstance(
  224. IN PNDIS_MINIPORT_BLOCK Miniport,
  225. IN PWNODE_SINGLE_INSTANCE wnode,
  226. IN ULONG BufferSize,
  227. OUT PULONG pReturnSize,
  228. IN PIRP Irp
  229. );
  230. NTSTATUS
  231. ndisWmiQueryAllData(
  232. IN PNDIS_MINIPORT_BLOCK Miniport,
  233. IN LPGUID guid,
  234. IN PWNODE_ALL_DATA wnode,
  235. IN ULONG BufferSize,
  236. OUT PULONG pReturnSize,
  237. IN PIRP Irp
  238. );
  239. NTSTATUS
  240. ndisQueryGuidData(
  241. IN PUCHAR Buffer,
  242. IN ULONG BufferLength,
  243. IN PNDIS_MINIPORT_BLOCK Miniport,
  244. IN PNDIS_CO_VC_PTR_BLOCK pVcBlock,
  245. IN LPGUID guid,
  246. IN PIRP Irp
  247. );
  248. BOOLEAN
  249. ndisWmiCheckAccess(
  250. IN PNDIS_GUID pNdisGuid,
  251. IN ULONG DesiredAccess,
  252. IN LONG RequiredPrivilege,
  253. IN PIRP Irp
  254. );
  255. NTSTATUS
  256. ndisQueryGuidDataSize(
  257. OUT PULONG pBytesNeeded,
  258. IN PNDIS_MINIPORT_BLOCK Miniport,
  259. IN PNDIS_CO_VC_PTR_BLOCK pVcBlock OPTIONAL,
  260. IN LPGUID guid
  261. );
  262. NTSTATUS
  263. ndisWmiGetGuid(
  264. OUT PNDIS_GUID * ppNdisGuid,
  265. IN PNDIS_MINIPORT_BLOCK Miniport,
  266. IN LPGUID guid,
  267. IN NDIS_STATUS status
  268. );
  269. NTSTATUS
  270. ndisWmiRegister(
  271. IN PNDIS_MINIPORT_BLOCK Miniport,
  272. IN ULONG_PTR RegistrationType,
  273. IN PWMIREGINFO wmiRegInfo,
  274. IN ULONG wmiRegInfoSize,
  275. IN PULONG pReturnSize
  276. );
  277. VOID
  278. ndisNotifyWmiBindUnbind(
  279. PNDIS_MINIPORT_BLOCK Miniport,
  280. PNDIS_PROTOCOL_BLOCK Protocol,
  281. BOOLEAN fBind
  282. );
  283. VOID
  284. ndisNotifyDevicePowerStateChange(
  285. PNDIS_MINIPORT_BLOCK Miniport,
  286. NDIS_DEVICE_POWER_STATE PowerState
  287. );
  288. NDIS_STATUS
  289. ndisQuerySupportedGuidToOidList(
  290. IN PNDIS_MINIPORT_BLOCK Miniport
  291. );
  292. USHORT
  293. ndisWmiMapOids(
  294. IN OUT PNDIS_GUID pDst,
  295. IN IN USHORT cDst,
  296. IN PNDIS_OID pOidList,
  297. IN USHORT cOidList,
  298. IN PNDIS_GUID ndisSupportedList,
  299. IN ULONG cSupportedList
  300. );
  301. NDIS_STATUS
  302. ndisQueryCustomGuids(
  303. IN PNDIS_MINIPORT_BLOCK Miniport,
  304. IN PNDIS_REQUEST Request,
  305. OUT PNDIS_GUID * ppGuidToOid,
  306. OUT PUSHORT pcGuidToOid
  307. );
  308. NTSTATUS
  309. ndisWmiFindInstanceName(
  310. IN PNDIS_CO_VC_PTR_BLOCK * ppVcBlock,
  311. IN PNDIS_MINIPORT_BLOCK Miniport,
  312. IN PWSTR pInstanceName,
  313. IN USHORT cbInstanceName
  314. );
  315. NDIS_STATUS
  316. ndisQuerySetMiniport(
  317. IN PNDIS_MINIPORT_BLOCK Miniport,
  318. IN PNDIS_CO_VC_PTR_BLOCK pVcBlock OPTIONAL,
  319. IN BOOLEAN fSet,
  320. IN PNDIS_REQUEST pRequest,
  321. IN PLARGE_INTEGER TimeOut OPTIONAL
  322. );
  323. NDIS_STATUS
  324. ndisMProcessResetRequested(
  325. IN PNDIS_MINIPORT_BLOCK Miniport,
  326. OUT PBOOLEAN pAddressingReset
  327. );
  328. #undef NdisMIndicateStatus
  329. VOID
  330. NdisMIndicateStatus(
  331. IN NDIS_HANDLE MiniportHandle,
  332. IN NDIS_STATUS GeneralStatus,
  333. IN PVOID StatusBuffer,
  334. IN UINT StatusBufferSize
  335. );
  336. #undef NdisMIndicateStatusComplete
  337. VOID
  338. NdisMIndicateStatusComplete(
  339. IN NDIS_HANDLE MiniportHandle
  340. );
  341. #undef NdisMResetComplete
  342. VOID
  343. NdisMResetComplete(
  344. IN NDIS_HANDLE MiniportAdapterHandle,
  345. IN NDIS_STATUS Status,
  346. IN BOOLEAN AddressingReset
  347. );
  348. VOID
  349. ndisMResetCompleteStage1(
  350. IN PNDIS_MINIPORT_BLOCK Miniport,
  351. IN NDIS_STATUS Status,
  352. IN BOOLEAN AddressingReset
  353. );
  354. VOID
  355. FASTCALL
  356. ndisMResetCompleteStage2(
  357. IN PNDIS_MINIPORT_BLOCK Miniport
  358. );
  359. //
  360. // WAN Handlers
  361. //
  362. NDIS_STATUS
  363. ndisMWanSend(
  364. IN NDIS_HANDLE NdisBindingHandle,
  365. IN NDIS_HANDLE NdisLinkHandle,
  366. IN PNDIS_WAN_PACKET Packet
  367. );
  368. #undef NdisMWanIndicateReceive
  369. VOID
  370. NdisMWanIndicateReceive(
  371. OUT PNDIS_STATUS Status,
  372. IN NDIS_HANDLE MiniportAdapterHandle,
  373. IN NDIS_HANDLE NdisLinkContext,
  374. IN PUCHAR Packet,
  375. IN ULONG PacketSize
  376. );
  377. #undef NdisMWanIndicateReceiveComplete
  378. VOID
  379. NdisMWanIndicateReceiveComplete(
  380. IN NDIS_HANDLE MiniportAdapterHandle,
  381. IN NDIS_HANDLE NdisLinkContext
  382. );
  383. NDIS_STATUS
  384. ndisMAllocateRequest(
  385. OUT PNDIS_REQUEST * pRequest,
  386. IN NDIS_OID Oid,
  387. IN PVOID Buffer OPTIONAL,
  388. IN ULONG BufferLength
  389. );
  390. NDIS_STATUS
  391. ndisMFilterOutStatisticsOids(
  392. PNDIS_MINIPORT_BLOCK Miniport,
  393. PNDIS_REQUEST Request
  394. );
  395. // VOID
  396. // ndisMFreeInternalRequest(
  397. // IN PVOID PRequest
  398. // )
  399. #define ndisMFreeInternalRequest(_pRequest) FREE_POOL(_pRequest)
  400. VOID
  401. ndisMTimerDpc(
  402. IN PKDPC Dpc,
  403. IN PVOID Context,
  404. IN PVOID SystemContext1,
  405. IN PVOID SystemContext2
  406. );
  407. VOID
  408. FASTCALL
  409. ndisMAbortRequests(
  410. IN PNDIS_MINIPORT_BLOCK Miniport
  411. );
  412. VOID
  413. FASTCALL
  414. ndisMAbortPackets(
  415. IN PNDIS_MINIPORT_BLOCK Miniport,
  416. IN PNDIS_OPEN_BLOCK Open OPTIONAL,
  417. IN PVOID CancelId OPTIONAL
  418. );
  419. BOOLEAN
  420. FASTCALL
  421. ndisMLoopbackPacketX(
  422. IN PNDIS_MINIPORT_BLOCK Miniport,
  423. IN PNDIS_PACKET Packet
  424. );
  425. BOOLEAN
  426. FASTCALL
  427. ndisMIsLoopbackPacket(
  428. IN PNDIS_MINIPORT_BLOCK Miniport,
  429. IN PNDIS_PACKET Packet,
  430. OUT PNDIS_PACKET * LoopbackPacket OPTIONAL
  431. );
  432. VOID
  433. ndisMRundownRequests(
  434. IN PNDIS_WORK_ITEM pWorkItem
  435. );
  436. VOID
  437. FASTCALL
  438. ndisMDoRequests(
  439. IN PNDIS_MINIPORT_BLOCK Miniport
  440. );
  441. VOID
  442. ndisMCopyFromPacketToBuffer(
  443. IN PNDIS_PACKET Packet,
  444. IN UINT Offset,
  445. IN UINT BytesToCopy,
  446. OUT PCHAR Buffer,
  447. OUT PUINT BytesCopied
  448. );
  449. BOOLEAN
  450. FASTCALL
  451. ndisMCreateDummyFilters(
  452. IN PNDIS_MINIPORT_BLOCK Miniport
  453. );
  454. VOID
  455. FASTCALL
  456. ndisMAdjustFilters(
  457. IN PNDIS_MINIPORT_BLOCK Miniport,
  458. IN PFILTERDBS FilterDB
  459. );
  460. LONG
  461. ndisMDoMiniportOp(
  462. IN PNDIS_MINIPORT_BLOCK Miniport,
  463. IN BOOLEAN Query,
  464. IN ULONG Oid,
  465. IN PVOID Buf,
  466. IN LONG BufSize,
  467. IN LONG ErrorCodesToReturn,
  468. IN BOOLEAN fMandatory
  469. );
  470. VOID
  471. ndisMOpenAdapter(
  472. OUT PNDIS_STATUS Status,
  473. IN PNDIS_OPEN_BLOCK NewOpenP,
  474. IN BOOLEAN UsingEncapsulation
  475. );
  476. VOID
  477. FASTCALL
  478. ndisMSyncQueryInformationComplete(
  479. IN PNDIS_MINIPORT_BLOCK Miniport,
  480. IN NDIS_STATUS Status
  481. );
  482. #undef NdisMSetInformationComplete
  483. VOID
  484. NdisMSetInformationComplete(
  485. IN NDIS_HANDLE MiniportAdapterHandle,
  486. IN NDIS_STATUS Status
  487. );
  488. #undef NdisMQueryInformationComplete
  489. VOID
  490. NdisMQueryInformationComplete(
  491. IN NDIS_HANDLE MiniportAdapterHandle,
  492. IN NDIS_STATUS Status
  493. );
  494. VOID
  495. FASTCALL
  496. ndisMSyncSetInformationComplete(
  497. IN PNDIS_MINIPORT_BLOCK Miniport,
  498. IN NDIS_STATUS Status
  499. );
  500. VOID
  501. ndisMRequestSetInformationPost(
  502. IN PNDIS_MINIPORT_BLOCK Miniport,
  503. IN PNDIS_REQUEST Request,
  504. IN NDIS_STATUS Status
  505. );
  506. BOOLEAN
  507. FASTCALL
  508. ndisMQueueRequest(
  509. IN PNDIS_MINIPORT_BLOCK Miniport,
  510. IN PNDIS_REQUEST Request
  511. );
  512. VOID
  513. FASTCALL
  514. ndisMRestoreFilterSettings(
  515. IN PNDIS_MINIPORT_BLOCK Miniport,
  516. IN PNDIS_OPEN_BLOCK Open OPTIONAL,
  517. IN BOOLEAN fReset
  518. );
  519. NDIS_STATUS
  520. FASTCALL
  521. ndisMSetPacketFilter(
  522. IN PNDIS_MINIPORT_BLOCK Miniport,
  523. IN PNDIS_REQUEST Request
  524. );
  525. NDIS_STATUS
  526. FASTCALL
  527. ndisMSetProtocolOptions(
  528. IN PNDIS_MINIPORT_BLOCK Miniport,
  529. IN PNDIS_REQUEST Request
  530. );
  531. NDIS_STATUS
  532. FASTCALL
  533. ndisMSetCurrentLookahead(
  534. IN PNDIS_MINIPORT_BLOCK Miniport,
  535. IN PNDIS_REQUEST Request
  536. );
  537. NDIS_STATUS
  538. FASTCALL
  539. ndisMSetMulticastList(
  540. IN PNDIS_MINIPORT_BLOCK Miniport,
  541. IN PNDIS_REQUEST Request
  542. );
  543. NDIS_STATUS
  544. FASTCALL
  545. ndisMSetFunctionalAddress(
  546. IN PNDIS_MINIPORT_BLOCK Miniport,
  547. IN PNDIS_REQUEST Request
  548. );
  549. NDIS_STATUS
  550. FASTCALL
  551. ndisMSetGroupAddress(
  552. IN PNDIS_MINIPORT_BLOCK Miniport,
  553. IN PNDIS_REQUEST Request
  554. );
  555. NDIS_STATUS
  556. FASTCALL
  557. ndisMSetFddiMulticastList(
  558. IN PNDIS_MINIPORT_BLOCK Miniport,
  559. IN PNDIS_REQUEST Request
  560. );
  561. NDIS_STATUS
  562. FASTCALL
  563. ndisMSetAddWakeUpPattern(
  564. IN PNDIS_MINIPORT_BLOCK Miniport,
  565. IN PNDIS_REQUEST Request
  566. );
  567. NDIS_STATUS
  568. FASTCALL
  569. ndisMSetRemoveWakeUpPattern(
  570. IN PNDIS_MINIPORT_BLOCK Miniport,
  571. IN PNDIS_REQUEST Request
  572. );
  573. NDIS_STATUS
  574. FASTCALL
  575. ndisMSetEnableWakeUp(
  576. IN PNDIS_MINIPORT_BLOCK Miniport,
  577. IN PNDIS_REQUEST Request
  578. );
  579. NDIS_STATUS
  580. ndisMSetInformation(
  581. IN PNDIS_MINIPORT_BLOCK Miniport,
  582. IN PNDIS_REQUEST Request
  583. );
  584. NDIS_STATUS
  585. FASTCALL
  586. ndisMQueryCurrentPacketFilter(
  587. IN PNDIS_MINIPORT_BLOCK Miniport,
  588. IN PNDIS_REQUEST Request
  589. );
  590. NDIS_STATUS
  591. FASTCALL
  592. ndisMQueryMediaSupported(
  593. IN PNDIS_MINIPORT_BLOCK Miniport,
  594. IN PNDIS_REQUEST Request
  595. );
  596. NDIS_STATUS
  597. FASTCALL
  598. ndisMQueryEthernetMulticastList(
  599. IN PNDIS_MINIPORT_BLOCK Miniport,
  600. IN PNDIS_REQUEST Request
  601. );
  602. NDIS_STATUS
  603. FASTCALL
  604. ndisMQueryLongMulticastList(
  605. IN PNDIS_MINIPORT_BLOCK Miniport,
  606. IN PNDIS_REQUEST Request
  607. );
  608. NDIS_STATUS
  609. FASTCALL
  610. ndisMQueryShortMulticastList(
  611. IN PNDIS_MINIPORT_BLOCK Miniport,
  612. IN PNDIS_REQUEST Request
  613. );
  614. NDIS_STATUS
  615. FASTCALL
  616. ndisMQueryMaximumFrameSize(
  617. IN PNDIS_MINIPORT_BLOCK Miniport,
  618. IN PNDIS_REQUEST Request
  619. );
  620. NDIS_STATUS
  621. FASTCALL
  622. ndisMQueryMaximumTotalSize(
  623. IN PNDIS_MINIPORT_BLOCK Miniport,
  624. IN PNDIS_REQUEST Request
  625. );
  626. NDIS_STATUS
  627. FASTCALL
  628. ndisMQueryNetworkAddress(
  629. IN PNDIS_MINIPORT_BLOCK Miniport,
  630. IN PNDIS_REQUEST Request
  631. );
  632. NDIS_STATUS
  633. FASTCALL
  634. ndisMQueryWakeUpPatternList(
  635. IN PNDIS_MINIPORT_BLOCK Miniport,
  636. IN PNDIS_REQUEST Request
  637. );
  638. NDIS_STATUS
  639. FASTCALL
  640. ndisMQueryEnableWakeUp(
  641. IN PNDIS_MINIPORT_BLOCK Miniport,
  642. IN PNDIS_REQUEST Request
  643. );
  644. NDIS_STATUS
  645. ndisMQueryInformation(
  646. IN PNDIS_MINIPORT_BLOCK Miniport,
  647. IN PNDIS_REQUEST Request
  648. );
  649. NDIS_STATUS
  650. FASTCALL
  651. ndisMDispatchRequest(
  652. IN PNDIS_MINIPORT_BLOCK Miniport,
  653. IN PNDIS_REQUEST Request,
  654. IN BOOLEAN fQuery
  655. );
  656. //
  657. // X Filter
  658. //
  659. VOID
  660. FASTCALL
  661. XFilterLockHandler(
  662. IN PETH_FILTER Filter,
  663. IN OUT PLOCK_STATE pLockState
  664. );
  665. VOID
  666. XRemoveAndFreeBinding(
  667. IN PX_FILTER Filter,
  668. IN PX_BINDING_INFO Binding
  669. );
  670. VOID
  671. XRemoveBindingFromLists(
  672. IN PX_FILTER Filter,
  673. IN PX_BINDING_INFO Binding
  674. );
  675. NDIS_STATUS
  676. XFilterAdjust(
  677. IN PX_FILTER Filter,
  678. IN NDIS_HANDLE NdisFilterHandle,
  679. IN UINT FilterClasses,
  680. IN BOOLEAN Set
  681. );
  682. VOID
  683. XUndoFilterAdjust(
  684. IN PX_FILTER Filter,
  685. IN PX_BINDING_INFO Binding
  686. );
  687. BOOLEAN
  688. XNoteFilterOpenAdapter(
  689. IN PX_FILTER Filter,
  690. IN NDIS_HANDLE NdisBindingHandle,
  691. OUT PNDIS_HANDLE NdisFilterHandle
  692. );
  693. //
  694. // EthFilterxxx
  695. //
  696. BOOLEAN
  697. EthCreateFilter(
  698. IN UINT MaximumMulticastAddresses,
  699. IN PUCHAR AdapterAddress,
  700. OUT PETH_FILTER * Filter
  701. );
  702. VOID
  703. EthDeleteFilter(
  704. IN PETH_FILTER Filter
  705. );
  706. NDIS_STATUS
  707. EthDeleteFilterOpenAdapter(
  708. IN PETH_FILTER Filter,
  709. IN NDIS_HANDLE NdisFilterHandle
  710. );
  711. NDIS_STATUS
  712. EthChangeFilterAddresses(
  713. IN PETH_FILTER Filter,
  714. IN NDIS_HANDLE NdisFilterHandle,
  715. IN UINT AddressCount,
  716. IN CHAR Addresses[][ETH_LENGTH_OF_ADDRESS],
  717. IN BOOLEAN Set
  718. );
  719. BOOLEAN
  720. EthShouldAddressLoopBack(
  721. IN PETH_FILTER Filter,
  722. IN CHAR Address[ETH_LENGTH_OF_ADDRESS]
  723. );
  724. UINT
  725. EthNumberOfOpenFilterAddresses(
  726. IN PETH_FILTER Filter,
  727. IN NDIS_HANDLE NdisFilterHandle
  728. );
  729. VOID
  730. EthQueryGlobalFilterAddresses(
  731. OUT PNDIS_STATUS Status,
  732. IN PETH_FILTER Filter,
  733. IN UINT SizeOfArray,
  734. OUT PUINT NumberOfAddresses,
  735. IN OUT CHAR AddressArray[][ETH_LENGTH_OF_ADDRESS]
  736. );
  737. VOID
  738. EthQueryOpenFilterAddresses(
  739. OUT PNDIS_STATUS Status,
  740. IN PETH_FILTER Filter,
  741. IN NDIS_HANDLE NdisFilterHandle,
  742. IN UINT SizeOfArray,
  743. OUT PUINT NumberOfAddresses,
  744. IN OUT CHAR AddressArray[][ETH_LENGTH_OF_ADDRESS]
  745. );
  746. VOID
  747. EthFilterIndicateReceive(
  748. IN PETH_FILTER Filter,
  749. IN NDIS_HANDLE MacReceiveContext,
  750. IN PCHAR Address,
  751. IN PVOID HeaderBuffer,
  752. IN UINT HeaderBufferSize,
  753. IN PVOID LookaheadBuffer,
  754. IN UINT LookaheadBufferSize,
  755. IN UINT PacketSize
  756. );
  757. VOID
  758. EthFilterIndicateReceiveComplete(
  759. IN PETH_FILTER Filter
  760. );
  761. BOOLEAN
  762. FASTCALL
  763. ethFindMulticast(
  764. IN UINT NumberOfAddresses,
  765. IN CHAR AddressArray[][ETH_LENGTH_OF_ADDRESS],
  766. IN CHAR MulticastAddress[ETH_LENGTH_OF_ADDRESS]
  767. );
  768. VOID
  769. ethCompleteChangeFilterAddresses(
  770. IN PETH_FILTER Filter,
  771. IN NDIS_STATUS Status,
  772. IN PETH_BINDING_INFO LocalBinding OPTIONAL,
  773. IN BOOLEAN WriteFilterHeld
  774. );
  775. VOID
  776. ethFilterDprIndicateReceivePacket(
  777. IN NDIS_HANDLE MiniportHandle,
  778. IN PPNDIS_PACKET ReceivedPackets,
  779. IN UINT NumberOfPackets
  780. );
  781. VOID
  782. EthFilterDprIndicateReceive(
  783. IN PETH_FILTER Filter,
  784. IN NDIS_HANDLE MacReceiveContext,
  785. IN PCHAR Address,
  786. IN PVOID HeaderBuffer,
  787. IN UINT HeaderBufferSize,
  788. IN PVOID LookaheadBuffer,
  789. IN UINT LookaheadBufferSize,
  790. IN UINT PacketSize
  791. );
  792. VOID
  793. EthFilterDprIndicateReceiveComplete(
  794. IN PETH_FILTER Filter
  795. );
  796. // UINT
  797. // ethNumberOfGlobalAddresses(
  798. // IN PETH_FILTER Filter
  799. // );
  800. #define ethNumberOfGlobalAddresses(_Filter) (_Filter)->NumAddresses
  801. //
  802. // FddiFilterxxxx
  803. //
  804. BOOLEAN
  805. FddiCreateFilter(
  806. IN UINT MaximumMulticastLongAddresses,
  807. IN UINT MaximumMulticastShortAddresses,
  808. IN PUCHAR AdapterLongAddress,
  809. IN PUCHAR AdapterShortAddress,
  810. OUT PFDDI_FILTER * Filter
  811. );
  812. VOID
  813. FddiDeleteFilter(
  814. IN PFDDI_FILTER Filter
  815. );
  816. NDIS_STATUS
  817. FddiDeleteFilterOpenAdapter(
  818. IN PFDDI_FILTER Filter,
  819. IN NDIS_HANDLE NdisFilterHandle
  820. );
  821. NDIS_STATUS
  822. FddiChangeFilterLongAddresses(
  823. IN PFDDI_FILTER Filter,
  824. IN NDIS_HANDLE NdisFilterHandle,
  825. IN UINT AddressCount,
  826. IN CHAR Addresses[][FDDI_LENGTH_OF_LONG_ADDRESS],
  827. IN BOOLEAN Set
  828. );
  829. NDIS_STATUS
  830. FddiChangeFilterShortAddresses(
  831. IN PFDDI_FILTER Filter,
  832. IN NDIS_HANDLE NdisFilterHandle,
  833. IN UINT AddressCount,
  834. IN CHAR Addresses[][FDDI_LENGTH_OF_SHORT_ADDRESS],
  835. IN BOOLEAN Set
  836. );
  837. BOOLEAN
  838. FddiShouldAddressLoopBack(
  839. IN PFDDI_FILTER Filter,
  840. IN CHAR Address[],
  841. IN UINT LengthOfAddress
  842. );
  843. UINT
  844. FddiNumberOfOpenFilterLongAddresses(
  845. IN PFDDI_FILTER Filter,
  846. IN NDIS_HANDLE NdisFilterHandle
  847. );
  848. UINT
  849. FddiNumberOfOpenFilterShortAddresses(
  850. IN PFDDI_FILTER Filter,
  851. IN NDIS_HANDLE NdisFilterHandle
  852. );
  853. VOID
  854. FddiQueryGlobalFilterLongAddresses(
  855. OUT PNDIS_STATUS Status,
  856. IN PFDDI_FILTER Filter,
  857. IN UINT SizeOfArray,
  858. OUT PUINT NumberOfAddresses,
  859. IN OUT CHAR AddressArray[][FDDI_LENGTH_OF_LONG_ADDRESS]
  860. );
  861. VOID
  862. FddiQueryGlobalFilterShortAddresses(
  863. OUT PNDIS_STATUS Status,
  864. IN PFDDI_FILTER Filter,
  865. IN UINT SizeOfArray,
  866. OUT PUINT NumberOfAddresses,
  867. IN OUT CHAR AddressArray[][FDDI_LENGTH_OF_SHORT_ADDRESS]
  868. );
  869. VOID
  870. FddiQueryOpenFilterLongAddresses(
  871. OUT PNDIS_STATUS Status,
  872. IN PFDDI_FILTER Filter,
  873. IN NDIS_HANDLE NdisFilterHandle,
  874. IN UINT SizeOfArray,
  875. OUT PUINT NumberOfAddresses,
  876. IN OUT CHAR AddressArray[][FDDI_LENGTH_OF_LONG_ADDRESS]
  877. );
  878. VOID
  879. FddiQueryOpenFilterShortAddresses(
  880. OUT PNDIS_STATUS Status,
  881. IN PFDDI_FILTER Filter,
  882. IN NDIS_HANDLE NdisFilterHandle,
  883. IN UINT SizeOfArray,
  884. OUT PUINT NumberOfAddresses,
  885. IN OUT CHAR AddressArray[][FDDI_LENGTH_OF_SHORT_ADDRESS]
  886. );
  887. VOID
  888. FddiFilterIndicateReceive(
  889. IN PFDDI_FILTER Filter,
  890. IN NDIS_HANDLE MacReceiveContext,
  891. IN PCHAR Address,
  892. IN UINT AddressLength,
  893. IN PVOID HeaderBuffer,
  894. IN UINT HeaderBufferSize,
  895. IN PVOID LookaheadBuffer,
  896. IN UINT LookaheadBufferSize,
  897. IN UINT PacketSize
  898. );
  899. VOID
  900. FddiFilterIndicateReceiveComplete(
  901. IN PFDDI_FILTER Filter
  902. );
  903. BOOLEAN
  904. FASTCALL
  905. fddiFindMulticastLongAddress(
  906. IN UINT NumberOfAddresses,
  907. IN CHAR AddressArray[][FDDI_LENGTH_OF_LONG_ADDRESS],
  908. IN CHAR MulticastAddress[FDDI_LENGTH_OF_LONG_ADDRESS]
  909. );
  910. BOOLEAN
  911. FASTCALL
  912. fddiFindMulticastShortAddress(
  913. IN UINT NumberOfAddresses,
  914. IN CHAR AddressArray[][FDDI_LENGTH_OF_SHORT_ADDRESS],
  915. IN CHAR MulticastAddress[FDDI_LENGTH_OF_SHORT_ADDRESS]
  916. );
  917. VOID
  918. fddiCompleteChangeFilterLongAddresses(
  919. IN PFDDI_FILTER Filter,
  920. IN NDIS_STATUS Status
  921. );
  922. VOID
  923. fddiCompleteChangeFilterShortAddresses(
  924. IN PFDDI_FILTER Filter,
  925. IN NDIS_STATUS Status
  926. );
  927. VOID
  928. FddiFilterDprIndicateReceive(
  929. IN PFDDI_FILTER Filter,
  930. IN NDIS_HANDLE MacReceiveContext,
  931. IN PCHAR Address,
  932. IN UINT AddressLength,
  933. IN PVOID HeaderBuffer,
  934. IN UINT HeaderBufferSize,
  935. IN PVOID LookaheadBuffer,
  936. IN UINT LookaheadBufferSize,
  937. IN UINT PacketSize
  938. );
  939. VOID
  940. FddiFilterDprIndicateReceiveComplete(
  941. IN PFDDI_FILTER Filter
  942. );
  943. VOID
  944. fddiFilterDprIndicateReceivePacket(
  945. IN NDIS_HANDLE MiniportHandle,
  946. IN PPNDIS_PACKET ReceivedPackets,
  947. IN UINT NumberOfPackets
  948. );
  949. // UINT
  950. // fddiNumberOfShortGlobalAddresses(
  951. // IN PFDDI_FILTER Filter
  952. // );
  953. #define fddiNumberOfShortGlobalAddresses(_Filter) (_Filter)->NumShortAddresses
  954. // UINT
  955. // fddiNumberOfLongGlobalAddresses(
  956. // IN PFDDI_FILTER Filter
  957. // );
  958. #define fddiNumberOfLongGlobalAddresses(_Filter) (_Filter)->NumLongAddresses
  959. //
  960. // TrFilterxxx
  961. //
  962. BOOLEAN
  963. TrCreateFilter(
  964. IN PUCHAR AdapterAddress,
  965. OUT PTR_FILTER * Filter
  966. );
  967. VOID
  968. TrDeleteFilter(
  969. IN PTR_FILTER Filter
  970. );
  971. NDIS_STATUS
  972. TrDeleteFilterOpenAdapter(
  973. IN PTR_FILTER Filter,
  974. IN NDIS_HANDLE NdisFilterHandle
  975. );
  976. NDIS_STATUS
  977. TrChangeFunctionalAddress(
  978. IN PTR_FILTER Filter,
  979. IN NDIS_HANDLE NdisFilterHandle,
  980. IN CHAR FunctionalAddressArray[TR_LENGTH_OF_FUNCTIONAL],
  981. IN BOOLEAN Set
  982. );
  983. NDIS_STATUS
  984. TrChangeGroupAddress(
  985. IN PTR_FILTER Filter,
  986. IN NDIS_HANDLE NdisFilterHandle,
  987. IN CHAR GroupAddressArray[TR_LENGTH_OF_FUNCTIONAL],
  988. IN BOOLEAN Set
  989. );
  990. BOOLEAN
  991. TrShouldAddressLoopBack(
  992. IN PTR_FILTER Filter,
  993. IN CHAR DestinationAddress[TR_LENGTH_OF_ADDRESS],
  994. IN CHAR SourceAddress[TR_LENGTH_OF_ADDRESS]
  995. );
  996. VOID
  997. TrFilterIndicateReceive(
  998. IN PTR_FILTER Filter,
  999. IN NDIS_HANDLE MacReceiveContext,
  1000. IN PVOID HeaderBuffer,
  1001. IN UINT HeaderBufferSize,
  1002. IN PVOID LookaheadBuffer,
  1003. IN UINT LookaheadBufferSize,
  1004. IN UINT PacketSize
  1005. );
  1006. VOID
  1007. TrFilterIndicateReceiveComplete(
  1008. IN PTR_FILTER Filter
  1009. );
  1010. VOID
  1011. trUndoChangeFunctionalAddress(
  1012. IN OUT PTR_FILTER Filter,
  1013. IN PTR_BINDING_INFO Binding
  1014. );
  1015. VOID
  1016. trUndoChangeGroupAddress(
  1017. IN OUT PTR_FILTER Filter,
  1018. IN PTR_BINDING_INFO Binding
  1019. );
  1020. VOID
  1021. trCompleteChangeGroupAddress(
  1022. IN OUT PTR_FILTER Filter,
  1023. IN PTR_BINDING_INFO Binding
  1024. );
  1025. VOID
  1026. TrFilterDprIndicateReceive(
  1027. IN PTR_FILTER Filter,
  1028. IN NDIS_HANDLE MacReceiveContext,
  1029. IN PVOID HeaderBuffer,
  1030. IN UINT HeaderBufferSize,
  1031. IN PVOID LookaheadBuffer,
  1032. IN UINT LookaheadBufferSize,
  1033. IN UINT PacketSize
  1034. );
  1035. VOID
  1036. TrFilterDprIndicateReceiveComplete(
  1037. IN PTR_FILTER Filter
  1038. );
  1039. VOID
  1040. trFilterDprIndicateReceivePacket(
  1041. IN NDIS_HANDLE MiniportHandle,
  1042. IN PPNDIS_PACKET ReceivedPackets,
  1043. IN UINT NumberOfPackets
  1044. );
  1045. //
  1046. // ArcFilterxxx
  1047. //
  1048. #if ARCNET
  1049. VOID
  1050. ndisMArcCopyFromBufferToPacket(
  1051. IN PCHAR Buffer,
  1052. IN UINT BytesToCopy,
  1053. IN PNDIS_PACKET Packet,
  1054. IN UINT Offset,
  1055. OUT PUINT BytesCopied
  1056. );
  1057. BOOLEAN
  1058. FASTCALL
  1059. ndisMArcnetSendLoopback(
  1060. IN PNDIS_MINIPORT_BLOCK Miniport,
  1061. IN PNDIS_PACKET Packet
  1062. );
  1063. NDIS_STATUS
  1064. ndisMBuildArcnetHeader(
  1065. PNDIS_MINIPORT_BLOCK Miniport,
  1066. PNDIS_OPEN_BLOCK Open,
  1067. PNDIS_PACKET Packet
  1068. );
  1069. VOID
  1070. ndisMFreeArcnetHeader(
  1071. IN PNDIS_MINIPORT_BLOCK Miniport,
  1072. IN PNDIS_PACKET Packet,
  1073. IN PNDIS_OPEN_BLOCK Open
  1074. );
  1075. VOID
  1076. ArcDeleteFilter(
  1077. IN PARC_FILTER Filter
  1078. );
  1079. NDIS_STATUS
  1080. ndisMArcTransferData(
  1081. IN NDIS_HANDLE NdisBindingHandle,
  1082. IN NDIS_HANDLE MacReceiveContext,
  1083. IN UINT ByteOffset,
  1084. IN UINT BytesToTransfer,
  1085. IN OUT PNDIS_PACKET Packet,
  1086. OUT PUINT BytesTransferred
  1087. );
  1088. VOID
  1089. ndisMArcIndicateEthEncapsulatedReceive(
  1090. IN PNDIS_MINIPORT_BLOCK Miniport,
  1091. IN PVOID HeaderBuffer,
  1092. IN PVOID DataBuffer,
  1093. IN UINT Length
  1094. );
  1095. VOID
  1096. arcUndoFilterAdjust(
  1097. IN PARC_FILTER Filter,
  1098. IN PARC_BINDING_INFO Binding
  1099. );
  1100. NDIS_STATUS
  1101. ArcConvertOidListToEthernet(
  1102. IN PNDIS_OID OidList,
  1103. IN PULONG NumberOfOids
  1104. );
  1105. NDIS_STATUS
  1106. ArcAllocateBuffers(
  1107. IN PARC_FILTER Filter
  1108. );
  1109. NDIS_STATUS
  1110. ArcAllocatePackets(
  1111. IN PARC_FILTER Filter
  1112. );
  1113. VOID
  1114. ArcDiscardPacketBuffers(
  1115. IN PARC_FILTER Filter,
  1116. IN PARC_PACKET Packet
  1117. );
  1118. VOID
  1119. ArcDestroyPacket(
  1120. IN PARC_FILTER Filter,
  1121. IN PARC_PACKET Packet
  1122. );
  1123. BOOLEAN
  1124. ArcConvertToNdisPacket(
  1125. IN PARC_FILTER Filter,
  1126. IN PARC_PACKET Packet,
  1127. IN BOOLEAN ConvertWholePacket
  1128. );
  1129. #endif
  1130. //
  1131. // WORK ITEM ROUTINES.
  1132. //
  1133. VOID
  1134. FASTCALL
  1135. ndisMDeQueueWorkItem(
  1136. IN PNDIS_MINIPORT_BLOCK Miniport,
  1137. IN NDIS_WORK_ITEM_TYPE WorkItemType,
  1138. OUT PVOID * WorkItemContext OPTIONAL,
  1139. OUT PVOID * WorkItemHandler OPTIONAL
  1140. );
  1141. NDIS_STATUS
  1142. FASTCALL
  1143. ndisMQueueWorkItem(
  1144. IN PNDIS_MINIPORT_BLOCK Miniport,
  1145. IN NDIS_WORK_ITEM_TYPE WorkItemType,
  1146. OUT PVOID WorkItemContext
  1147. );
  1148. NDIS_STATUS
  1149. FASTCALL
  1150. ndisMQueueNewWorkItem(
  1151. IN PNDIS_MINIPORT_BLOCK Miniport,
  1152. IN NDIS_WORK_ITEM_TYPE WorkItemType,
  1153. OUT PVOID WorkItemContext,
  1154. IN PVOID WorkItemHandler OPTIONAL
  1155. );
  1156. VOID
  1157. FASTCALL
  1158. ndisIMDeQueueWorkItem(
  1159. IN PNDIS_MINIPORT_BLOCK Miniport,
  1160. IN NDIS_WORK_ITEM_TYPE WorkItemType,
  1161. OUT PVOID WorkItemContext
  1162. );
  1163. //
  1164. // SEND HANDLERS
  1165. //
  1166. //
  1167. BOOLEAN
  1168. FASTCALL
  1169. ndisMStartSendPackets(
  1170. IN PNDIS_MINIPORT_BLOCK Miniport
  1171. );
  1172. BOOLEAN
  1173. FASTCALL
  1174. ndisMStartSends(
  1175. IN PNDIS_MINIPORT_BLOCK Miniport
  1176. );
  1177. BOOLEAN
  1178. FASTCALL
  1179. ndisMStartWanSends(
  1180. IN PNDIS_MINIPORT_BLOCK Miniport
  1181. );
  1182. #undef NdisMSendResourcesAvailable
  1183. VOID
  1184. NdisMSendResourcesAvailable(
  1185. IN NDIS_HANDLE MiniportAdapterHandle
  1186. );
  1187. #undef NdisMSendComplete
  1188. VOID
  1189. NdisMSendComplete(
  1190. IN NDIS_HANDLE MiniportAdapterHandle,
  1191. IN PNDIS_PACKET Packet,
  1192. IN NDIS_STATUS Status
  1193. );
  1194. VOID
  1195. ndisMSendCompleteX(
  1196. IN NDIS_HANDLE MiniportAdapterHandle,
  1197. IN PNDIS_PACKET Packet,
  1198. IN NDIS_STATUS Status
  1199. );
  1200. #undef NdisMWanSendComplete
  1201. VOID
  1202. NdisMWanSendComplete(
  1203. IN NDIS_HANDLE MiniportAdapterHandle,
  1204. IN PNDIS_WAN_PACKET Packet,
  1205. IN NDIS_STATUS Status
  1206. );
  1207. VOID
  1208. ndisMSendPackets(
  1209. IN NDIS_HANDLE NdisBindingHandle,
  1210. IN PPNDIS_PACKET PacketArray,
  1211. IN UINT NumberOfPackets
  1212. );
  1213. VOID
  1214. ndisMSendPacketsX(
  1215. IN NDIS_HANDLE NdisBindingHandle,
  1216. IN PPNDIS_PACKET PacketArray,
  1217. IN UINT NumberOfPackets
  1218. );
  1219. NDIS_STATUS
  1220. ndisMSend(
  1221. IN NDIS_HANDLE NdisBindingHandle,
  1222. IN PNDIS_PACKET Packet
  1223. );
  1224. NDIS_STATUS
  1225. ndisMSendX(
  1226. IN NDIS_HANDLE NdisBindingHandle,
  1227. IN PNDIS_PACKET Packet
  1228. );
  1229. NDIS_STATUS
  1230. ndisMCoSendPackets(
  1231. IN NDIS_HANDLE NdisVcHandle,
  1232. IN PPNDIS_PACKET PacketArray,
  1233. IN UINT NumberOfPackets
  1234. );
  1235. NDIS_STATUS
  1236. ndisMRejectSend(
  1237. IN NDIS_HANDLE NdisBindingHandle,
  1238. IN PNDIS_PACKET Packet
  1239. );
  1240. VOID
  1241. ndisMRejectSendPackets(
  1242. IN NDIS_HANDLE NdisBindingHandle,
  1243. IN PPNDIS_PACKET Packets,
  1244. IN UINT NumberOfPackets
  1245. );
  1246. VOID
  1247. FASTCALL
  1248. ndisMRestoreOpenHandlers(
  1249. IN PNDIS_MINIPORT_BLOCK Miniport,
  1250. IN UCHAR Flags
  1251. );
  1252. VOID
  1253. FASTCALL
  1254. ndisMSwapOpenHandlers(
  1255. IN PNDIS_MINIPORT_BLOCK Miniport,
  1256. IN NDIS_STATUS Status,
  1257. IN UCHAR Flags
  1258. );
  1259. NTSTATUS
  1260. ndisPassIrpDownTheStack(
  1261. IN PIRP pIrp,
  1262. IN PDEVICE_OBJECT pNextDeviceObject
  1263. );
  1264. //
  1265. // Co-Ndis prototypes
  1266. //
  1267. VOID
  1268. ndisNotifyAfRegistration(
  1269. IN struct _NDIS_AF_NOTIFY * AfNotify
  1270. );
  1271. NDIS_STATUS
  1272. ndisCreateNotifyQueue(
  1273. IN PNDIS_MINIPORT_BLOCK Miniport,
  1274. IN PNDIS_OPEN_BLOCK Open OPTIONAL,
  1275. IN PCO_ADDRESS_FAMILY AddressFamily OPTIONAL,
  1276. IN PNDIS_AF_NOTIFY * AfNotify
  1277. );
  1278. BOOLEAN
  1279. FASTCALL
  1280. ndisReferenceAf(
  1281. IN PNDIS_CO_AF_BLOCK AfBlock
  1282. );
  1283. VOID
  1284. FASTCALL
  1285. ndisDereferenceAf(
  1286. IN PNDIS_CO_AF_BLOCK AfBlock
  1287. );
  1288. BOOLEAN
  1289. FASTCALL
  1290. ndisReferenceSap(
  1291. IN PNDIS_CO_SAP_BLOCK SapBlock
  1292. );
  1293. VOID
  1294. FASTCALL
  1295. ndisDereferenceSap(
  1296. IN PNDIS_CO_SAP_BLOCK SapBlock
  1297. );
  1298. BOOLEAN
  1299. FASTCALL
  1300. ndisReferenceVcPtr(
  1301. IN PNDIS_CO_VC_PTR_BLOCK VcPtr
  1302. );
  1303. VOID
  1304. FASTCALL
  1305. ndisDereferenceVcPtr(
  1306. IN PNDIS_CO_VC_PTR_BLOCK VcPtr
  1307. );
  1308. VOID
  1309. FASTCALL
  1310. ndisMCoFreeResources(
  1311. PNDIS_OPEN_BLOCK Open
  1312. );
  1313. //
  1314. // Fake handlers
  1315. //
  1316. NDIS_STATUS
  1317. ndisMFakeWanSend(
  1318. IN NDIS_HANDLE NdisBindingHandle,
  1319. IN NDIS_HANDLE NdisLinkHandle,
  1320. IN PVOID Packet
  1321. );
  1322. NDIS_STATUS
  1323. ndisMFakeSend(
  1324. IN NDIS_HANDLE NdisBindingHandle,
  1325. IN PNDIS_PACKET Packet
  1326. );
  1327. VOID
  1328. ndisMFakeSendPackets(
  1329. IN NDIS_HANDLE NdisBindingHandle,
  1330. IN PPNDIS_PACKET PacketArray,
  1331. IN UINT NumberOfPackets
  1332. );
  1333. NDIS_STATUS
  1334. ndisMFakeReset(
  1335. IN NDIS_HANDLE NdisBindingHandle
  1336. );
  1337. NDIS_STATUS
  1338. ndisMFakeRequest(
  1339. IN NDIS_HANDLE NdisBindingHandle,
  1340. IN PNDIS_REQUEST NdisRequest
  1341. );
  1342. //
  1343. // POWER MANAGEMENT ROUTINES
  1344. //
  1345. NTSTATUS
  1346. FASTCALL
  1347. ndisQueryPowerCapabilities(
  1348. IN PNDIS_MINIPORT_BLOCK Miniport
  1349. );
  1350. VOID
  1351. ndisMediaDisconnectWorker(
  1352. IN PPOWER_WORK_ITEM pWorkItem,
  1353. IN PVOID Context
  1354. );
  1355. NTSTATUS
  1356. ndisMediaDisconnectComplete(
  1357. IN PDEVICE_OBJECT pdo,
  1358. IN UCHAR MinorFunction,
  1359. IN POWER_STATE PowerState,
  1360. IN PVOID Context,
  1361. IN PIO_STATUS_BLOCK IoStatus
  1362. );
  1363. VOID
  1364. ndisMediaDisconnectTimeout(
  1365. IN PVOID SystemSpecific1,
  1366. IN PVOID Context,
  1367. IN PVOID SystemSpecific2,
  1368. IN PVOID SystemSpecific3
  1369. );
  1370. NTSTATUS
  1371. ndisWaitWakeComplete(
  1372. IN PDEVICE_OBJECT pdo,
  1373. IN UCHAR MinorFunction,
  1374. IN POWER_STATE PowerState,
  1375. IN PVOID Context,
  1376. IN PIO_STATUS_BLOCK IoStatus
  1377. );
  1378. NTSTATUS
  1379. ndisQueryPowerComplete(
  1380. IN PDEVICE_OBJECT pdo,
  1381. IN PIRP pirp,
  1382. IN PVOID Context
  1383. );
  1384. NTSTATUS
  1385. ndisMPowerPolicy(
  1386. IN PNDIS_MINIPORT_BLOCK Miniport,
  1387. IN SYSTEM_POWER_STATE SystemState,
  1388. IN PDEVICE_POWER_STATE pDeviceState,
  1389. IN BOOLEAN fIsQuery
  1390. );
  1391. NTSTATUS
  1392. ndisQueryPower(
  1393. IN PIRP pirp,
  1394. IN PIO_STACK_LOCATION pirpSp,
  1395. IN PNDIS_MINIPORT_BLOCK Miniport
  1396. );
  1397. VOID
  1398. FASTCALL
  1399. ndisPmHaltMiniport(
  1400. IN PNDIS_MINIPORT_BLOCK Miniport
  1401. );
  1402. NDIS_STATUS
  1403. ndisPmInitializeMiniport(
  1404. IN PNDIS_MINIPORT_BLOCK Miniport
  1405. );
  1406. NDIS_STATUS
  1407. ndisQuerySetMiniportDeviceState(
  1408. IN PNDIS_MINIPORT_BLOCK Miniport,
  1409. IN DEVICE_POWER_STATE DeviceState,
  1410. IN NDIS_OID Oid,
  1411. IN BOOLEAN fSet
  1412. );
  1413. NTSTATUS
  1414. ndisSetSystemPowerComplete(
  1415. IN PDEVICE_OBJECT pdo,
  1416. IN UCHAR MinorFunction,
  1417. IN POWER_STATE PowerState,
  1418. IN PVOID Context,
  1419. IN PIO_STATUS_BLOCK IoStatus
  1420. );
  1421. VOID
  1422. ndisDevicePowerOn(
  1423. IN PPOWER_WORK_ITEM pWorkItem,
  1424. IN PVOID pContext
  1425. );
  1426. NTSTATUS
  1427. ndisSetDevicePowerOnComplete(
  1428. IN PDEVICE_OBJECT pdo,
  1429. IN PIRP pirp,
  1430. IN PVOID Context
  1431. );
  1432. VOID
  1433. ndisDevicePowerDown(
  1434. IN PPOWER_WORK_ITEM pWorkItem,
  1435. IN PVOID pContext
  1436. );
  1437. NTSTATUS
  1438. ndisSetDevicePowerDownComplete(
  1439. IN PDEVICE_OBJECT pdo,
  1440. IN PIRP pirp,
  1441. IN PVOID Context
  1442. );
  1443. NTSTATUS
  1444. ndisSetPower(
  1445. IN PIRP pirp,
  1446. IN PIO_STACK_LOCATION pirpSp,
  1447. IN PNDIS_MINIPORT_BLOCK Miniport
  1448. );
  1449. NTSTATUS
  1450. ndisPowerDispatch(
  1451. IN PDEVICE_OBJECT pdo,
  1452. IN PIRP pirp
  1453. );
  1454. BOOLEAN
  1455. FASTCALL
  1456. ndisQueueOpenOnMiniport(
  1457. IN PNDIS_MINIPORT_BLOCK Miniport,
  1458. IN PNDIS_OPEN_BLOCK MiniportOpen
  1459. );
  1460. NDIS_STATUS
  1461. ndisQueueBindWorkitem(
  1462. IN PNDIS_MINIPORT_BLOCK Miniport
  1463. );
  1464. VOID
  1465. ndisQueuedCheckAdapterBindings(
  1466. IN PNDIS_WORK_ITEM pWorkItem,
  1467. IN PVOID Context
  1468. );
  1469. BOOLEAN
  1470. ndisIsMiniportStarted(
  1471. IN PNDIS_MINIPORT_BLOCK Miniport
  1472. );