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.

864 lines
16 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Copyright (c) 1991 Nokia Data Systems AB
  4. Module Name:
  5. dlcext.h
  6. Abstract:
  7. This module includes all internal prototypes and
  8. externals of dlc (api driver) module.
  9. Author:
  10. Antti Saarenheimo 22-Jul-1991
  11. Environment:
  12. Kernel mode
  13. Revision History:
  14. --*/
  15. extern USHORT aSpecialOutputBuffers[];
  16. extern BOOLEAN MemoryLockFailed;
  17. extern KSPIN_LOCK DlcSpinLock;
  18. NTSTATUS
  19. BufferPoolCreate(
  20. #if DBG
  21. IN PDLC_FILE_CONTEXT pFileContext,
  22. #endif
  23. IN PVOID pUserBuffer,
  24. IN LONG MaxBufferSize,
  25. IN LONG MinFreeSizeThreshold,
  26. OUT HANDLE *pBufferPoolHandle,
  27. OUT PVOID* AlignedAddress,
  28. OUT PULONG AlignedSize
  29. );
  30. NTSTATUS
  31. BufferPoolExpand(
  32. #if DBG
  33. IN PDLC_FILE_CONTEXT pFileContext,
  34. #endif
  35. IN PDLC_BUFFER_POOL pBufferPool
  36. );
  37. VOID
  38. BufferPoolFreeExtraPages(
  39. #if DBG
  40. IN PDLC_FILE_CONTEXT pFileContext,
  41. #endif
  42. IN PDLC_BUFFER_POOL pBufferPool
  43. );
  44. VOID
  45. DeallocateBuffer(
  46. #if DBG
  47. IN PDLC_FILE_CONTEXT pFileContext,
  48. #endif
  49. IN PDLC_BUFFER_POOL pBufferPool,
  50. IN PDLC_BUFFER_HEADER pBuffer
  51. );
  52. NTSTATUS
  53. AllocateBufferHeader(
  54. #if DBG
  55. IN PDLC_FILE_CONTEXT pFileContext,
  56. #endif
  57. IN PDLC_BUFFER_POOL pBufferPool,
  58. IN PDLC_BUFFER_HEADER pParent,
  59. IN UCHAR Size,
  60. IN UCHAR Index,
  61. IN UINT FreeListTableIndex
  62. );
  63. NTSTATUS
  64. BufferPoolAllocate(
  65. #if DBG
  66. IN PDLC_FILE_CONTEXT pFileContext,
  67. #endif
  68. IN PDLC_BUFFER_POOL pBufferPool,
  69. IN UINT BufferSize,
  70. IN UINT FrameHeaderSize,
  71. IN UINT UserDataSize,
  72. IN UINT FrameLength,
  73. IN UINT SegmentSizeIndex,
  74. IN OUT PDLC_BUFFER_HEADER *ppBufferHeader,
  75. OUT PUINT puiBufferSizeLeft
  76. );
  77. NTSTATUS
  78. BufferPoolDeallocate(
  79. IN PDLC_BUFFER_POOL pBufferPool,
  80. IN UINT BufferCount,
  81. IN PLLC_TRANSMIT_DESCRIPTOR pBuffers
  82. );
  83. NTSTATUS
  84. BufferPoolBuildXmitBuffers(
  85. IN PDLC_BUFFER_POOL pBufferPool,
  86. IN UINT BufferCount,
  87. IN PLLC_TRANSMIT_DESCRIPTOR pBuffers,
  88. IN OUT PDLC_PACKET pPacket
  89. );
  90. VOID
  91. BufferPoolFreeXmitBuffers(
  92. IN PDLC_BUFFER_POOL pBufferPool,
  93. IN OUT PDLC_PACKET pPacket
  94. );
  95. PDLC_BUFFER_HEADER
  96. GetBufferHeader(
  97. IN PDLC_BUFFER_POOL pBufferPool,
  98. IN PVOID pUserBuffer
  99. );
  100. VOID
  101. BufferPoolDereference(
  102. #if DBG
  103. IN PDLC_FILE_CONTEXT pFileContext,
  104. #endif
  105. IN PDLC_BUFFER_POOL *pBufferPool
  106. );
  107. NTSTATUS
  108. BufferPoolReference(
  109. IN HANDLE hExternalHandle,
  110. OUT PVOID *phOpaqueHandle
  111. );
  112. VOID
  113. BufferPoolDeallocateList(
  114. IN PDLC_BUFFER_POOL pBufferPool,
  115. IN PDLC_BUFFER_HEADER pBufferList
  116. );
  117. NTSTATUS
  118. DriverEntry(
  119. IN PDRIVER_OBJECT pDriverObject,
  120. IN PUNICODE_STRING RegistryPath
  121. );
  122. NTSTATUS
  123. CreateAdapterFileContext(
  124. IN PDEVICE_OBJECT pDeviceObject,
  125. IN PIRP pIrp
  126. );
  127. NTSTATUS
  128. CloseAdapterFileContext(
  129. IN PDEVICE_OBJECT pDeviceObject,
  130. IN PIRP pIrp
  131. );
  132. VOID
  133. DlcKillFileContext(
  134. IN PDLC_FILE_CONTEXT pFileContext
  135. );
  136. VOID
  137. DlcDriverUnload(
  138. IN PDRIVER_OBJECT pDeviceObject
  139. );
  140. NTSTATUS
  141. CleanupAdapterFileContext(
  142. IN PDEVICE_OBJECT pDeviceObject,
  143. IN PIRP pIrp
  144. );
  145. NTSTATUS
  146. DlcDeviceIoControl(
  147. IN PDEVICE_OBJECT pDeviceContext,
  148. IN PIRP pIrp
  149. );
  150. VOID
  151. DlcCompleteIoRequest(
  152. IN PIRP pIrp,
  153. IN BOOLEAN InCancel
  154. );
  155. VOID
  156. DlcCancelIrp(
  157. IN PDEVICE_OBJECT DeviceObject,
  158. IN PIRP Irp
  159. );
  160. VOID
  161. SetIrpCancelRoutine(
  162. IN PIRP Irp,
  163. IN BOOLEAN Set
  164. );
  165. #ifdef DLC_PRIVATE_PROTOTYPES
  166. DLC_STATUS
  167. LlcReceiveIndication(
  168. IN PDLC_FILE_CONTEXT hFileContext,
  169. IN PDLC_OBJECT hDlcObject,
  170. IN NDIS_HANDLE MacReceiveContext,
  171. IN USHORT FrameType,
  172. IN PUCHAR pLookBuf,
  173. IN UINT cbLookBuf
  174. );
  175. VOID
  176. LlcEventIndication(
  177. IN PDLC_FILE_CONTEXT pFileContext,
  178. IN PVOID hEventObject,
  179. IN UINT Event,
  180. IN PVOID pEventInformation,
  181. IN ULONG SecondaryInfo
  182. );
  183. VOID
  184. LlcCommandCompletion(
  185. IN PDLC_FILE_CONTEXT pFileContext,
  186. IN PDLC_OBJECT pDlcObject,
  187. IN PDLC_PACKET pPacket
  188. );
  189. #else
  190. DLC_STATUS
  191. LlcReceiveIndication(
  192. IN PVOID hFileContext,
  193. IN PVOID hClientHandle,
  194. IN NDIS_HANDLE MacReceiveContext,
  195. IN USHORT FrameType,
  196. IN PVOID pLookBuf,
  197. IN UINT cbLookBuf
  198. );
  199. VOID
  200. LlcEventIndication(
  201. IN PVOID hFileContext,
  202. IN PVOID hEventObject,
  203. IN UINT Event,
  204. IN PVOID pEventInformation,
  205. IN ULONG SecondaryInformation
  206. );
  207. VOID
  208. LlcCommandCompletion(
  209. IN PVOID hFileContext,
  210. IN PVOID hDlcObject,
  211. IN PVOID hRequest
  212. );
  213. #endif
  214. VOID
  215. CompleteTransmitCommand(
  216. IN PDLC_FILE_CONTEXT pFileContext,
  217. IN PIRP pIrp,
  218. IN PDLC_OBJECT pChainObject,
  219. IN PDLC_PACKET pRootXmitNode
  220. );
  221. NTSTATUS
  222. DlcQueryInformation(
  223. IN PIRP pIrp,
  224. IN PDLC_FILE_CONTEXT pFileContext,
  225. IN PNT_DLC_PARMS pDlcParms,
  226. IN ULONG InputBufferLength,
  227. IN ULONG OutputBufferLength
  228. );
  229. NTSTATUS
  230. DlcSetInformation(
  231. IN PIRP pIrp,
  232. IN PDLC_FILE_CONTEXT pFileContext,
  233. IN PNT_DLC_PARMS pDlcParms,
  234. IN ULONG InputBufferLength,
  235. IN ULONG OutputBufferLength
  236. );
  237. VOID
  238. GetOpenSapAndStationCount(
  239. IN PDLC_FILE_CONTEXT pFileContext,
  240. OUT PUCHAR OpenSaps,
  241. OUT PUCHAR OpenStations
  242. );
  243. NTSTATUS
  244. SetupGroupSaps(
  245. IN PDLC_FILE_CONTEXT pFileContext,
  246. IN PDLC_OBJECT pDlcObject,
  247. IN UINT GroupSapCount,
  248. IN PUCHAR pGroupSapList
  249. );
  250. NTSTATUS
  251. MakeDlcEvent(
  252. IN PDLC_FILE_CONTEXT pFileContext,
  253. IN ULONG Event,
  254. IN USHORT StationId,
  255. IN PDLC_OBJECT pDlcObject,
  256. IN PVOID pEventInformation,
  257. IN ULONG SecondaryInfo,
  258. IN BOOLEAN FreeEventInfo
  259. );
  260. NTSTATUS
  261. QueueDlcCommand(
  262. IN PDLC_FILE_CONTEXT pFileContext,
  263. IN ULONG Event,
  264. IN USHORT StationId,
  265. IN USHORT StationIdMask,
  266. IN PIRP pIrp,
  267. IN PVOID AbortHandle,
  268. IN PFCOMPLETION_HANDLER pfCompletionHandler
  269. );
  270. NTSTATUS
  271. AbortCommand(
  272. IN PDLC_FILE_CONTEXT pFileContext,
  273. IN USHORT StationId,
  274. IN USHORT StationIdMask,
  275. IN PVOID AbortHandle,
  276. IN OUT PVOID *ppCcbLink,
  277. IN UINT CancelStatus,
  278. IN BOOLEAN SuppressCommandCompletion
  279. );
  280. VOID
  281. CancelDlcCommand(
  282. IN PDLC_FILE_CONTEXT pFileContext,
  283. IN PDLC_COMMAND pDlcCommand,
  284. IN OUT PVOID *ppCcbLink,
  285. IN UINT CancelStatus,
  286. IN BOOLEAN SuppressCommandCompletion
  287. );
  288. VOID
  289. PurgeDlcEventQueue(
  290. IN PDLC_FILE_CONTEXT pFileContext
  291. );
  292. VOID
  293. PurgeDlcFlowControlQueue(
  294. IN PDLC_FILE_CONTEXT pFileContext
  295. );
  296. VOID
  297. CompleteDlcCommand(
  298. IN PDLC_FILE_CONTEXT pFileContext,
  299. IN USHORT StationId,
  300. IN PDLC_COMMAND pDlcCommand,
  301. IN UINT Status
  302. );
  303. PDLC_COMMAND
  304. IsCommandOnList(
  305. IN PVOID RequestHandle,
  306. IN PLIST_ENTRY List
  307. );
  308. PDLC_COMMAND
  309. SearchAndRemoveCommand(
  310. IN PLIST_ENTRY pListHead,
  311. IN ULONG EventMask,
  312. IN USHORT StationId,
  313. IN USHORT StationIdMask
  314. );
  315. PDLC_COMMAND
  316. SearchAndRemoveCommandByHandle(
  317. IN PLIST_ENTRY pListHead,
  318. IN ULONG EventMask,
  319. IN USHORT StationId,
  320. IN USHORT StationIdMask,
  321. IN PVOID AbortHandle
  322. );
  323. PDLC_COMMAND
  324. SearchAndRemoveSpecificCommand(
  325. IN PLIST_ENTRY pListHead,
  326. IN PVOID AbortHandle
  327. );
  328. PDLC_COMMAND
  329. SearchAndRemoveAnyCommand(
  330. IN PDLC_FILE_CONTEXT pFileContext,
  331. IN ULONG Event,
  332. IN USHORT StationId,
  333. IN USHORT StationIdMask,
  334. IN PVOID pSearchHandle
  335. );
  336. VOID
  337. SearchReadCommandForClose(
  338. IN PDLC_FILE_CONTEXT pFileContext,
  339. IN PDLC_CLOSE_WAIT_INFO pClosingInfo,
  340. IN PVOID pCcbAddress,
  341. IN ULONG CommandCompletionFlag,
  342. IN USHORT StationId,
  343. IN USHORT StationIdMask
  344. );
  345. NTSTATUS
  346. DlcBufferFree(
  347. IN PIRP pIrp,
  348. IN PDLC_FILE_CONTEXT pFileContext,
  349. IN PNT_DLC_PARMS pDlcParms,
  350. IN ULONG InputBufferLength,
  351. IN ULONG OutputBufferLength
  352. );
  353. NTSTATUS
  354. DlcBufferGet(
  355. IN PIRP pIrp,
  356. IN PDLC_FILE_CONTEXT pFileContext,
  357. IN PNT_DLC_PARMS pDlcParms,
  358. IN ULONG InputBufferLength,
  359. IN ULONG OutputBufferLength
  360. );
  361. NTSTATUS
  362. DlcBufferCreate(
  363. IN PIRP pIrp,
  364. IN PDLC_FILE_CONTEXT pFileContext,
  365. IN PNT_DLC_PARMS pDlcParms,
  366. IN ULONG InputBufferLength,
  367. IN ULONG OutputBufferLength
  368. );
  369. NTSTATUS
  370. DlcBufferMaintain(
  371. IN PIRP pIrp,
  372. IN PDLC_FILE_CONTEXT pFileContext,
  373. IN PNT_DLC_PARMS pDlcParms,
  374. IN ULONG InputBufferLength,
  375. IN ULONG OutputBufferLength
  376. );
  377. NTSTATUS
  378. DlcConnectStation(
  379. IN PIRP pIrp,
  380. IN PDLC_FILE_CONTEXT pFileContext,
  381. IN PNT_DLC_PARMS pDlcParms,
  382. IN ULONG InputBufferLength,
  383. IN ULONG OutputBufferLength
  384. );
  385. NTSTATUS
  386. DlcFlowControl(
  387. IN PIRP pIrp,
  388. IN PDLC_FILE_CONTEXT pFileContext,
  389. IN PNT_DLC_PARMS pDlcParms,
  390. IN ULONG InputBufferLength,
  391. IN ULONG OutputBufferLength
  392. );
  393. NTSTATUS
  394. DlcReallocate(
  395. IN PIRP pIrp,
  396. IN PDLC_FILE_CONTEXT pFileContext,
  397. IN PNT_DLC_PARMS pDlcParms,
  398. IN ULONG InputBufferLength,
  399. IN ULONG OutputBufferLength
  400. );
  401. NTSTATUS
  402. DlcReset(
  403. IN PIRP pIrp,
  404. IN PDLC_FILE_CONTEXT pFileContext,
  405. IN PNT_DLC_PARMS pDlcParms,
  406. IN ULONG InputBufferLength,
  407. IN ULONG OutputBufferLength
  408. );
  409. BOOLEAN
  410. ConnectCompletion(
  411. IN PDLC_FILE_CONTEXT pFileContext,
  412. IN PDLC_OBJECT pDlcObject,
  413. IN PIRP pIrp,
  414. IN UINT Event,
  415. IN PVOID pEventInformation,
  416. IN ULONG SecondaryInfo
  417. );
  418. NTSTATUS
  419. DirSetExceptionFlags(
  420. IN PIRP pIrp,
  421. IN PDLC_FILE_CONTEXT pFileContext,
  422. IN PNT_DLC_PARMS pDlcParms,
  423. IN ULONG InputBufferLength,
  424. IN ULONG OutputBufferLength
  425. );
  426. VOID
  427. DlcCompleteRequest(
  428. IN PIRP pIrp,
  429. IN PVOID pUserCcbPointer
  430. );
  431. VOID
  432. CompleteAsyncCommand(
  433. IN PDLC_FILE_CONTEXT pFileContext,
  434. IN UINT Status,
  435. IN PIRP pIrp,
  436. IN PVOID pUserCcbPointer,
  437. IN BOOLEAN InCancel
  438. );
  439. NTSTATUS
  440. GetLinkStation(
  441. IN PDLC_FILE_CONTEXT pFileContext,
  442. IN USHORT StationId,
  443. OUT PDLC_OBJECT *ppLinkStation
  444. );
  445. NTSTATUS
  446. GetSapStation(
  447. IN PDLC_FILE_CONTEXT pFileContext,
  448. IN USHORT StationId,
  449. OUT PDLC_OBJECT *ppLinkStation
  450. );
  451. NTSTATUS
  452. GetStation(
  453. IN PDLC_FILE_CONTEXT pFileContext,
  454. IN USHORT StationId,
  455. OUT PDLC_OBJECT *ppStation
  456. );
  457. NTSTATUS
  458. DlcReadCancel(
  459. IN PIRP pIrp,
  460. IN PDLC_FILE_CONTEXT pFileContext,
  461. IN PNT_DLC_PARMS pDlcParms,
  462. IN ULONG ParameterLength,
  463. IN ULONG OutputBufferLength
  464. );
  465. NTSTATUS
  466. DirOpenAdapter(
  467. IN PIRP pIrp,
  468. IN PDLC_FILE_CONTEXT pFileContext,
  469. IN PNT_DLC_PARMS pDlcParms,
  470. IN ULONG ParameterLength,
  471. IN ULONG OutputBufferLength
  472. );
  473. NTSTATUS
  474. DirCloseAdapter(
  475. IN PIRP pIrp,
  476. IN PDLC_FILE_CONTEXT pFileContext,
  477. IN PNT_DLC_PARMS pDlcParms,
  478. IN ULONG ParameterLength,
  479. IN ULONG OutputBufferLength
  480. );
  481. VOID
  482. CompleteDirInitialize(
  483. IN PDLC_FILE_CONTEXT pFileContext,
  484. IN PDLC_CLOSE_WAIT_INFO pClosingInfo,
  485. IN PVOID pCcbLink
  486. );
  487. VOID
  488. CompleteDirCloseAdapter(
  489. IN PDLC_FILE_CONTEXT pFileContext,
  490. IN PDLC_CLOSE_WAIT_INFO pClosingInfo,
  491. IN PVOID pCcbLink
  492. );
  493. NTSTATUS
  494. DlcTransmit(
  495. IN PIRP pIrp,
  496. IN PDLC_FILE_CONTEXT pFileContext,
  497. IN PNT_DLC_PARMS pParameters,
  498. IN ULONG ParameterLength,
  499. IN ULONG OutputBufferLength
  500. );
  501. NTSTATUS
  502. DirTimerSet(
  503. IN PIRP pIrp,
  504. IN PDLC_FILE_CONTEXT pFileContext,
  505. IN PNT_DLC_PARMS pDlcParms,
  506. IN ULONG InputBufferLength,
  507. IN ULONG OutputBufferLength
  508. );
  509. BOOLEAN
  510. DirTimerSetCompletion(
  511. IN PDLC_FILE_CONTEXT pFileContext,
  512. IN PDLC_OBJECT pDlcObject,
  513. IN PIRP pIrp,
  514. IN UINT Event,
  515. IN PVOID pEventInformation,
  516. IN ULONG SecondaryInfo
  517. );
  518. NTSTATUS
  519. DirTimerCancelGroup(
  520. IN PIRP pIrp,
  521. IN PDLC_FILE_CONTEXT pFileContext,
  522. IN PNT_DLC_PARMS pDlcParms,
  523. IN ULONG InputBufferLength,
  524. IN ULONG OutputBufferLength
  525. );
  526. NTSTATUS
  527. DirTimerCancel(
  528. IN PIRP pIrp,
  529. IN PDLC_FILE_CONTEXT pFileContext,
  530. IN PNT_DLC_PARMS pDlcParms,
  531. IN ULONG ParameterLength,
  532. IN ULONG OutputBufferLength
  533. );
  534. PDLC_COMMAND*
  535. SearchTimerCommand(
  536. IN PDLC_COMMAND *ppQueue,
  537. IN PVOID pSearchHandle,
  538. IN BOOLEAN SearchCompletionFlags
  539. );
  540. PDLC_COMMAND
  541. SearchPrevCommandWithFlag(
  542. IN PDLC_COMMAND pQueueBase,
  543. IN ULONG Event,
  544. IN ULONG CommandCompletionFlag
  545. );
  546. VOID
  547. AbortCommandsWithFlag(
  548. IN PDLC_FILE_CONTEXT pFileContext,
  549. IN ULONG CommandCompletionFlag,
  550. IN OUT PVOID *ppCcbLink,
  551. IN UINT CancelStatus
  552. );
  553. NTSTATUS
  554. DlcOpenSap(
  555. IN PIRP pIrp,
  556. IN PDLC_FILE_CONTEXT pFileContext,
  557. IN PNT_DLC_PARMS pDlcParms,
  558. IN ULONG InputBufferLength,
  559. IN ULONG OutputBufferLength
  560. );
  561. NTSTATUS
  562. DirOpenDirect(
  563. IN PIRP pIrp,
  564. IN PDLC_FILE_CONTEXT pFileContext,
  565. IN PNT_DLC_PARMS pDlcParms,
  566. IN ULONG InputBufferLength,
  567. IN ULONG OutputBufferLength
  568. );
  569. NTSTATUS
  570. DlcOpenLinkStation(
  571. IN PIRP pIrp,
  572. IN PDLC_FILE_CONTEXT pFileContext,
  573. IN PNT_DLC_PARMS pDlcParms,
  574. IN ULONG InputBufferLength,
  575. IN ULONG OutputBufferLength
  576. );
  577. NTSTATUS
  578. InitializeLinkStation(
  579. IN PDLC_FILE_CONTEXT pFileContext,
  580. IN PDLC_OBJECT pSap,
  581. IN PNT_DLC_PARMS pDlcParms OPTIONAL,
  582. IN PVOID LlcLinkHandle OPTIONAL,
  583. OUT PDLC_OBJECT *ppLinkStation
  584. );
  585. NTSTATUS
  586. DlcCloseStation(
  587. IN PIRP pIrp,
  588. IN PDLC_FILE_CONTEXT pFileContext,
  589. IN PNT_DLC_PARMS pDlcParms,
  590. IN ULONG InputBufferLength,
  591. IN ULONG OutputBufferLength
  592. );
  593. BOOLEAN
  594. CloseAllStations(
  595. IN PDLC_FILE_CONTEXT pFileContext,
  596. IN PIRP pIrp,
  597. IN ULONG Event,
  598. IN PFCLOSE_COMPLETE pfCloseComplete,
  599. IN PNT_DLC_PARMS pDlcParms,
  600. IN PDLC_CLOSE_WAIT_INFO pClosingInfo
  601. );
  602. VOID
  603. CloseAnyStation(
  604. IN PDLC_OBJECT pDlcObject,
  605. IN PDLC_CLOSE_WAIT_INFO pClosingInfo,
  606. IN BOOLEAN DoImmediateClose
  607. );
  608. VOID
  609. CompleteCloseReset(
  610. IN PDLC_FILE_CONTEXT pFileContext,
  611. IN PDLC_CLOSE_WAIT_INFO pClosingInfo
  612. );
  613. NTSTATUS
  614. DlcReceiveRequest(
  615. IN PIRP pIrp,
  616. IN PDLC_FILE_CONTEXT pFileContext,
  617. IN PNT_DLC_PARMS pDlcParms,
  618. IN ULONG InputBufferLength,
  619. IN ULONG OutputBufferLength
  620. );
  621. BOOLEAN
  622. ReceiveCompletion(
  623. IN PDLC_FILE_CONTEXT pFileContext,
  624. IN PDLC_OBJECT pDlcObject,
  625. IN PIRP pIrp,
  626. IN ULONG Event,
  627. IN PVOID pEventInformation,
  628. IN ULONG SecondaryInfo
  629. );
  630. NTSTATUS
  631. DlcReadRequest(
  632. IN PIRP pIrp,
  633. IN PDLC_FILE_CONTEXT pFileContext,
  634. IN PNT_DLC_PARMS pDlcParms,
  635. IN ULONG ParameterLength,
  636. IN ULONG OutputBufferLength
  637. );
  638. BOOLEAN
  639. ReadCompletion(
  640. IN PDLC_FILE_CONTEXT pFileContext,
  641. IN PDLC_OBJECT pDlcObject,
  642. IN PIRP pIrp,
  643. IN ULONG Event,
  644. IN PVOID pEventInformation,
  645. IN ULONG SecondaryInfo
  646. );
  647. VOID
  648. CreateBufferChain(
  649. IN PDLC_BUFFER_HEADER pBufferHeaders,
  650. OUT PVOID *pFirstBuffer,
  651. OUT PUSHORT pReceivedFrameCount
  652. );
  653. NTSTATUS
  654. DlcReceiveCancel(
  655. IN PIRP pIrp,
  656. IN PDLC_FILE_CONTEXT pFileContext,
  657. IN PNT_DLC_PARMS pDlcParms,
  658. IN ULONG ParameterLength,
  659. IN ULONG OutputBufferLength
  660. );
  661. NTSTATUS
  662. DlcCompleteCommand(
  663. IN PIRP pIrp,
  664. IN PDLC_FILE_CONTEXT pFileContext,
  665. IN PNT_DLC_PARMS pDlcParms,
  666. IN ULONG InputBufferLength,
  667. IN ULONG OutputBufferLength
  668. );
  669. VOID
  670. GetDlcErrorCounters(
  671. IN PDLC_FILE_CONTEXT pFileContext,
  672. IN PUCHAR pAdapterErrors
  673. );
  674. VOID
  675. QueueDlcEvent(
  676. IN PDLC_FILE_CONTEXT pFileContext,
  677. IN PDLC_PACKET pPacket
  678. );
  679. VOID
  680. CompleteCloseStation(
  681. IN PDLC_FILE_CONTEXT pFileContext,
  682. IN PDLC_OBJECT pDlcObject
  683. );
  684. VOID
  685. CloseStation(
  686. IN PDLC_FILE_CONTEXT pFileContext,
  687. IN PDLC_OBJECT pDlcObject,
  688. IN BOOLEAN DoImmediateClose
  689. );
  690. VOID
  691. CleanUpEvents(
  692. IN PDLC_FILE_CONTEXT pFileContext,
  693. IN PDLC_CLOSE_WAIT_INFO pClosingInfo,
  694. IN PDLC_OBJECT pDlcObject
  695. );
  696. VOID
  697. CompleteCompletionPacket(
  698. IN PDLC_FILE_CONTEXT pFileContext,
  699. IN PDLC_COMPLETION_EVENT_INFO pCompletionInfo,
  700. IN OUT PNT_DLC_PARMS pParms
  701. );
  702. PMDL
  703. AllocateProbeAndLockMdl(
  704. IN PVOID UserBuffer,
  705. IN UINT UserBufferLength
  706. );
  707. VOID
  708. BuildMappedPartialMdl(
  709. IN PMDL pMappedSourceMdl,
  710. IN OUT PMDL pTargetMdl,
  711. IN PVOID BaseVa,
  712. IN ULONG Length
  713. );
  714. VOID
  715. BufferTrace(
  716. IN PDLC_BUFFER_POOL pBufferPool,
  717. IN PSZ DebugString
  718. );
  719. VOID
  720. CheckIrql(
  721. PKIRQL pOldIrqLevel
  722. );
  723. VOID
  724. ResetLocalBusyBufferStates(
  725. IN PDLC_FILE_CONTEXT pFileContext
  726. );
  727. VOID
  728. CompleteLlcObjectClose(
  729. IN PDLC_OBJECT pDlcObject
  730. );
  731. VOID
  732. UnlockAndFreeMdl(
  733. PMDL pMdl
  734. );
  735. BOOLEAN
  736. DecrementCloseCounters(
  737. PDLC_FILE_CONTEXT pFileContext,
  738. PDLC_CLOSE_WAIT_INFO pClosingInfo
  739. );
  740. VOID
  741. CompleteDirectOutIrp(
  742. IN PIRP Irp,
  743. IN UCHAR Status,
  744. IN PLLC_CCB NextCcb
  745. );
  746.