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.

1028 lines
21 KiB

  1. /*++
  2. Copyright (c) 1989-1993 Microsoft Corporation
  3. Module Name:
  4. NTProcs.c
  5. Abstract:
  6. This file contains the function prototypes that are specific to the NT
  7. portion of the NBT driver.
  8. Author:
  9. Johnl 29-Mar-1993 Created
  10. Revision History:
  11. --*/
  12. #ifndef VXD
  13. //---------------------------------------------------------------------
  14. //
  15. // FROM DRIVER.C
  16. //
  17. NTSTATUS
  18. NbtDispatchCleanup(
  19. IN PDEVICE_OBJECT Device,
  20. IN PIRP irp
  21. );
  22. NTSTATUS
  23. NbtDispatchClose(
  24. IN PDEVICE_OBJECT device,
  25. IN PIRP irp
  26. );
  27. NTSTATUS
  28. NbtDispatchCreate(
  29. IN PDEVICE_OBJECT Device,
  30. IN PIRP pIrp
  31. );
  32. NTSTATUS
  33. NbtDispatchDevCtrl(
  34. IN PDEVICE_OBJECT device,
  35. IN PIRP irp
  36. );
  37. NTSTATUS
  38. NbtDispatchInternalCtrl(
  39. IN PDEVICE_OBJECT device,
  40. IN PIRP irp
  41. );
  42. PFILE_FULL_EA_INFORMATION
  43. FindInEA(
  44. IN PFILE_FULL_EA_INFORMATION start,
  45. IN PCHAR wanted
  46. );
  47. USHORT
  48. GetDriverName(
  49. IN PFILE_OBJECT pfileobj,
  50. OUT PUNICODE_STRING name
  51. );
  52. int
  53. shortreply(
  54. IN PIRP pIrp,
  55. IN int status,
  56. IN int nbytes
  57. );
  58. //---------------------------------------------------------------------
  59. //
  60. // FROM NTISOL.C
  61. //
  62. NTSTATUS
  63. NTOpenControl(
  64. IN tDEVICECONTEXT *pDeviceContext,
  65. IN PIRP pIrp);
  66. NTSTATUS
  67. NTOpenAddr(
  68. IN tDEVICECONTEXT *pDeviceContext,
  69. IN PIRP pIrp,
  70. IN PFILE_FULL_EA_INFORMATION ea);
  71. NTSTATUS
  72. NTOpenConnection(
  73. IN tDEVICECONTEXT *pDeviceContext,
  74. IN PIRP pIrp,
  75. IN PFILE_FULL_EA_INFORMATION ea);
  76. VOID
  77. NTSetFileObjectContexts(
  78. IN PIRP pIrp,
  79. IN PVOID FsContext,
  80. IN PVOID FsContext2);
  81. VOID
  82. NTCompleteIOListen(
  83. IN tCLIENTELE *pClientEle,
  84. IN NTSTATUS Status);
  85. VOID
  86. NTIoComplete(
  87. IN PIRP pIrp,
  88. IN NTSTATUS Status,
  89. IN ULONG SentLength);
  90. VOID
  91. NTCompleteRegistration(
  92. IN tCLIENTELE *pClientEle,
  93. IN NTSTATUS Status);
  94. NTSTATUS
  95. NTAssocAddress(
  96. IN tDEVICECONTEXT *pDeviceContext,
  97. IN PIRP pIrp);
  98. NTSTATUS
  99. NTCloseAddress(
  100. IN tDEVICECONTEXT *pDeviceContext,
  101. IN PIRP pIrp);
  102. VOID
  103. NTClearFileObjectContext(
  104. IN PIRP pIrp
  105. );
  106. NTSTATUS
  107. NTCloseConnection(
  108. IN tDEVICECONTEXT *pDeviceContext,
  109. IN PIRP pIrp);
  110. NTSTATUS
  111. NTSetSharedAccess(
  112. IN tDEVICECONTEXT *pDeviceContext,
  113. IN PIRP pIrp,
  114. IN tADDRESSELE *pAddress);
  115. NTSTATUS
  116. NTCheckSharedAccess(
  117. IN tDEVICECONTEXT *pDeviceContext,
  118. IN PIRP pIrp,
  119. IN tADDRESSELE *pAddress);
  120. NTSTATUS
  121. NTCleanUpAddress(
  122. IN tDEVICECONTEXT *pDeviceContext,
  123. IN PIRP pIrp);
  124. NTSTATUS
  125. NTCleanUpConnection(
  126. IN tDEVICECONTEXT *pDeviceContext,
  127. IN PIRP pIrp);
  128. VOID
  129. NbtCancelDisconnectWait(
  130. IN PDEVICE_OBJECT DeviceContext,
  131. IN PIRP pIrp
  132. );
  133. VOID
  134. NbtCancelListen(
  135. IN PDEVICE_OBJECT DeviceContext,
  136. IN PIRP Irp
  137. );
  138. VOID
  139. NbtCancelRcvDgram(
  140. IN PDEVICE_OBJECT DeviceContext,
  141. IN PIRP pIrp
  142. );
  143. VOID
  144. NbtCancelDgramSend(
  145. IN PDEVICE_OBJECT DeviceContext,
  146. IN PIRP pIrp
  147. );
  148. NTSTATUS
  149. NTAccept(
  150. IN tDEVICECONTEXT *pDeviceContext,
  151. IN PIRP pIrp);
  152. NTSTATUS
  153. NTAssocAddress(
  154. IN tDEVICECONTEXT *pDeviceContext,
  155. IN PIRP pIrp);
  156. NTSTATUS
  157. NTDisAssociateAddress(
  158. IN tDEVICECONTEXT *pDeviceContext,
  159. IN PIRP pIrp);
  160. NTSTATUS
  161. NTConnect(
  162. IN tDEVICECONTEXT *pDeviceContext,
  163. IN PIRP pIrp);
  164. NTSTATUS
  165. NTDisconnect(
  166. IN tDEVICECONTEXT *pDeviceContext,
  167. IN PIRP pIrp);
  168. NTSTATUS
  169. NTListen(
  170. IN tDEVICECONTEXT *pDeviceContext,
  171. IN PIRP pIrp);
  172. NTSTATUS
  173. NTQueryInformation(
  174. IN tDEVICECONTEXT *pDeviceContext,
  175. IN PIRP pIrp);
  176. NTSTATUS
  177. NTReceive(
  178. IN tDEVICECONTEXT *pDeviceContext,
  179. IN PIRP pIrp);
  180. NTSTATUS
  181. NTReceiveDatagram(
  182. IN tDEVICECONTEXT *pDeviceContext,
  183. IN PIRP pIrp);
  184. NTSTATUS
  185. NTSend(
  186. IN tDEVICECONTEXT *pDeviceContext,
  187. IN PIRP pIrp);
  188. NTSTATUS
  189. NTSendDatagram(
  190. IN tDEVICECONTEXT *pDeviceContext,
  191. IN PIRP pIrp);
  192. NTSTATUS
  193. NTSetEventHandler(
  194. IN tDEVICECONTEXT *pDeviceContext,
  195. IN PIRP pIrp);
  196. NTSTATUS
  197. NTSetInformation(
  198. IN tDEVICECONTEXT *pDeviceContext,
  199. IN PIRP pIrp);
  200. NTSTATUS
  201. NTCheckSetCancelRoutine(
  202. IN PIRP pIrp,
  203. IN PVOID CancelRoutine,
  204. IN tDEVICECONTEXT *pDeviceContext
  205. );
  206. NTSTATUS
  207. NbtSetCancelRoutine(
  208. IN PIRP pIrp,
  209. IN PVOID CancelRoutine,
  210. IN tDEVICECONTEXT *pDeviceContext
  211. );
  212. VOID
  213. NbtCancelSession(
  214. IN PDEVICE_OBJECT DeviceContext,
  215. IN PIRP pIrp
  216. );
  217. VOID
  218. NbtCancelLmhSvcIrp(
  219. IN PDEVICE_OBJECT DeviceContext,
  220. IN PIRP pIrp
  221. );
  222. VOID
  223. NbtCancelWaitForLmhSvcIrp(
  224. IN PDEVICE_OBJECT DeviceContext,
  225. IN PIRP pIrp
  226. );
  227. NTSTATUS
  228. NTSendSession(
  229. IN tDGRAM_SEND_TRACKING *pTracker,
  230. IN tLOWERCONNECTION *pLowerConn,
  231. IN PVOID pCompletion
  232. );
  233. VOID
  234. NTSendDgramNoWindup(
  235. IN tDGRAM_SEND_TRACKING *pTracker,
  236. IN ULONG IpAddress,
  237. IN PVOID pCompletion);
  238. NTSTATUS
  239. NTQueueToWorkerThread(
  240. IN PVOID DelayedWorkerRoutine,
  241. IN tDGRAM_SEND_TRACKING *pTracker,
  242. IN PVOID pClientContext,
  243. IN PVOID ClientCompletion,
  244. IN tDEVICECONTEXT *pDeviceContext,
  245. IN BOOLEAN fJointLockHeld
  246. );
  247. #ifdef _PNP_POWER_
  248. VOID
  249. NTExecuteWorker(
  250. IN PVOID pContextInfo
  251. );
  252. #endif
  253. VOID
  254. SecurityDelete(
  255. IN PVOID pContext
  256. );
  257. NTSTATUS
  258. NbtSetTcpInfo(
  259. IN HANDLE FileHandle,
  260. IN ULONG ToiId,
  261. IN ULONG ToiType,
  262. IN ULONG InfoBufferValue
  263. );
  264. NTSTATUS
  265. DispatchIoctls(
  266. IN tDEVICECONTEXT *pDeviceContext,
  267. IN PIRP pIrp,
  268. IN PIO_STACK_LOCATION pIrpSp);
  269. NTSTATUS
  270. NbtCancelCancelRoutine(
  271. IN PIRP pIrp
  272. );
  273. VOID
  274. NTClearContextCancel(
  275. IN NBT_WORK_ITEM_CONTEXT *pContext
  276. );
  277. VOID
  278. NbtCancelFindName(
  279. IN PDEVICE_OBJECT DeviceContext,
  280. IN PIRP pIrp
  281. );
  282. //---------------------------------------------------------------------
  283. //
  284. // FROM TDIADDR.C
  285. //
  286. NTSTATUS
  287. NbtProcessIPRequest(
  288. IN ULONG IPControlCode,
  289. IN PVOID pInBuffer,
  290. IN ULONG InBufferLen,
  291. OUT PVOID *pOutBuffer,
  292. IN OUT ULONG *pOutBufferLen
  293. );
  294. //---------------------------------------------------------------------
  295. //
  296. // FROM NTUTIL.C
  297. //
  298. #ifdef _PNP_POWER_
  299. NTSTATUS
  300. NbtAllocAndInitDevice(
  301. PUNICODE_STRING pucBindName,
  302. PUNICODE_STRING pucExportName,
  303. tDEVICECONTEXT **ppDeviceContext,
  304. enum eNbtDevice DeviceType
  305. );
  306. #endif // _PNP_POWER_
  307. NTSTATUS
  308. NbtCreateDeviceObject(
  309. PUNICODE_STRING pBindName,
  310. PUNICODE_STRING pExportName,
  311. tADDRARRAY *pAddrs,
  312. tDEVICECONTEXT **ppDeviceContext,
  313. enum eNbtDevice DeviceType
  314. );
  315. VOID
  316. NbtDeleteDevice(
  317. IN PVOID pContext
  318. );
  319. BOOLEAN
  320. NBT_REFERENCE_DEVICE(
  321. IN tDEVICECONTEXT *pDeviceContext,
  322. ULONG ReferenceContext,
  323. IN BOOLEAN fLocked
  324. );
  325. VOID
  326. NBT_DEREFERENCE_DEVICE(
  327. IN tDEVICECONTEXT *pDeviceContext,
  328. ULONG ReferenceContext,
  329. IN BOOLEAN fLocked
  330. );
  331. tDEVICECONTEXT *
  332. GetDeviceWithIPAddress(
  333. tIPADDRESS IpAddress
  334. );
  335. NTSTATUS
  336. NbtProcessDhcpRequest(
  337. tDEVICECONTEXT *pDeviceContext
  338. );
  339. NTSTATUS
  340. ConvertToUlong(
  341. IN PUNICODE_STRING pucAddress,
  342. OUT ULONG *pulValue);
  343. NTSTATUS
  344. NbtCreateAddressObjects(
  345. IN ULONG IpAddress,
  346. IN ULONG SubnetMask,
  347. OUT tDEVICECONTEXT *pDeviceContext);
  348. VOID
  349. NbtGetMdl(
  350. PMDL *ppMdl,
  351. enum eBUFFER_TYPES eBuffType);
  352. NTSTATUS
  353. NbtInitMdlQ(
  354. PSINGLE_LIST_ENTRY pListHead,
  355. enum eBUFFER_TYPES eBuffType);
  356. NTSTATUS
  357. NTZwCloseFile(
  358. IN HANDLE Handle
  359. );
  360. NTSTATUS
  361. NTReReadRegistry(
  362. IN tDEVICECONTEXT *pDeviceContext
  363. );
  364. NTSTATUS
  365. NbtInitIrpQ(
  366. PLIST_ENTRY pListHead,
  367. int iNumBuffers);
  368. NTSTATUS
  369. NbtLogEvent(
  370. IN ULONG EventCode,
  371. IN NTSTATUS Status,
  372. IN ULONG Location
  373. );
  374. VOID
  375. DelayedNbtLogDuplicateNameEvent(
  376. IN PVOID Context1,
  377. IN PVOID Context2,
  378. IN PVOID Context3,
  379. IN tDEVICECONTEXT *pDeviceContext
  380. );
  381. NTSTATUS
  382. SaveClientSecurity(
  383. IN tDGRAM_SEND_TRACKING *pTracker
  384. );
  385. VOID
  386. NtDeleteClientSecurity(
  387. IN tDGRAM_SEND_TRACKING *pTracker
  388. );
  389. VOID
  390. LogLockOperation(
  391. char operation,
  392. PKSPIN_LOCK PSpinLock,
  393. KIRQL OldIrql,
  394. KIRQL NewIrql,
  395. char *File,
  396. int Line
  397. );
  398. StrmpInitializeLockLog(
  399. VOID
  400. );
  401. VOID
  402. PadEntry(
  403. char *EntryPtr
  404. );
  405. VOID
  406. DelayedNbtCloseFileHandles(
  407. IN tDGRAM_SEND_TRACKING *pUnused1,
  408. IN PVOID pContext,
  409. IN PVOID pUnused2,
  410. IN tDEVICECONTEXT *pUnused3
  411. );
  412. NTSTATUS
  413. CloseAddressesWithTransport(
  414. IN tDEVICECONTEXT *pDeviceContext
  415. );
  416. PVOID
  417. CTEAllocMemDebug(
  418. IN ULONG Size,
  419. IN PVOID pBuffer,
  420. IN UCHAR *File,
  421. IN ULONG Line
  422. );
  423. VOID
  424. AcquireSpinLockDebug(
  425. IN tNBT_LOCK_INFO *pLockInfo,
  426. IN PKIRQL pOldIrq,
  427. IN INT LineNumber
  428. );
  429. VOID
  430. FreeSpinLockDebug(
  431. IN tNBT_LOCK_INFO *pLockInfo,
  432. IN KIRQL OldIrq,
  433. IN INT LineNumber
  434. );
  435. VOID
  436. AcquireSpinLockAtDpcDebug(
  437. IN tNBT_LOCK_INFO *pLockInfo,
  438. IN INT LineNumber
  439. );
  440. VOID
  441. FreeSpinLockAtDpcDebug(
  442. IN tNBT_LOCK_INFO *pLockInfo,
  443. IN INT LineNumber
  444. );
  445. VOID
  446. GetDgramMdl(
  447. OUT PMDL *ppMdl
  448. );
  449. NTSTATUS
  450. NbtDestroyDevice(
  451. IN tDEVICECONTEXT *pDeviceContext,
  452. IN BOOLEAN fWait
  453. );
  454. //---------------------------------------------------------------------
  455. //
  456. // FROM REGISTRY.C
  457. //
  458. NTSTATUS
  459. NbtReadRegistry(
  460. OUT tDEVICES **ppBindDevices,
  461. OUT tDEVICES **ppExportDevices,
  462. OUT tADDRARRAY **ppAddrArray
  463. );
  464. VOID
  465. NbtReadRegistryCleanup( // release resources allocated by NbtReadRegistry
  466. IN tDEVICES **ppBindDevices,
  467. IN tDEVICES **ppExportDevices,
  468. IN tADDRARRAY **ppAddrArray
  469. );
  470. NTSTATUS
  471. ReadNameServerAddresses (
  472. IN HANDLE NbtConfigHandle,
  473. IN tDEVICES *BindDevices,
  474. IN ULONG NumberDevices,
  475. OUT tADDRARRAY **ppAddrArray
  476. );
  477. NTSTATUS
  478. GetIPFromRegistry(
  479. IN PUNICODE_STRING pucBindDevice,
  480. OUT tIPADDRESS *pIpAddresses,
  481. OUT tIPADDRESS *pSubnetMask,
  482. IN ULONG MaxIpAddresses,
  483. OUT ULONG *pNumIpAddresses,
  484. IN enum eNbtIPAddressType IPAddressType
  485. );
  486. NTSTATUS
  487. ReadElement(
  488. IN HANDLE HandleToKey,
  489. IN PWSTR pwsValueName,
  490. OUT PUNICODE_STRING pucString
  491. );
  492. NTSTATUS
  493. NTReadIniString (
  494. IN HANDLE ParametersHandle,
  495. IN PWSTR Key,
  496. OUT PUCHAR *ppString
  497. );
  498. ULONG
  499. NbtReadSingleParameter(
  500. IN HANDLE ParametersHandle,
  501. IN PWCHAR ValueName,
  502. IN ULONG DefaultValue,
  503. IN ULONG MinimumValue
  504. );
  505. NTSTATUS
  506. NTGetLmHostPath(
  507. OUT PUCHAR *ppPath
  508. );
  509. NTSTATUS
  510. NbtParseMultiSzEntries(
  511. IN PWSTR StartBindValue,
  512. IN PWSTR EndBindValue,
  513. IN ULONG MaxBindings,
  514. OUT tDEVICES *pDevices,
  515. OUT ULONG *pNumDevices
  516. );
  517. //---------------------------------------------------------------------
  518. //
  519. // FROM tdihndlr.c
  520. //
  521. NTSTATUS
  522. Normal(
  523. IN PVOID ReceiveEventContext,
  524. IN tLOWERCONNECTION *pLowerConn,
  525. IN USHORT ReceiveFlags,
  526. IN ULONG BytesIndicated,
  527. IN ULONG BytesAvailable,
  528. OUT PULONG BytesTaken,
  529. IN PVOID pTsdu,
  530. OUT PVOID *ppIrp
  531. );
  532. NTSTATUS
  533. FillIrp(
  534. IN PVOID ReceiveEventContext,
  535. IN tLOWERCONNECTION *pLowerConn,
  536. IN USHORT ReceiveFlags,
  537. IN ULONG BytesIndicated,
  538. IN ULONG BytesAvailable,
  539. OUT PULONG BytesTaken,
  540. IN PVOID pTsdu,
  541. OUT PVOID *ppIrp
  542. );
  543. NTSTATUS
  544. IndicateBuffer(
  545. IN PVOID ReceiveEventContext,
  546. IN tLOWERCONNECTION *pLowerConn,
  547. IN USHORT ReceiveFlags,
  548. IN ULONG BytesIndicated,
  549. IN ULONG BytesAvailable,
  550. OUT PULONG BytesTaken,
  551. IN PVOID pTsdu,
  552. OUT PVOID *ppIrp
  553. );
  554. NTSTATUS
  555. PartialRcv(
  556. IN PVOID ReceiveEventContext,
  557. IN tLOWERCONNECTION *pLowerConn,
  558. IN USHORT ReceiveFlags,
  559. IN ULONG BytesIndicated,
  560. IN ULONG BytesAvailable,
  561. OUT PULONG BytesTaken,
  562. IN PVOID pTsdu,
  563. OUT PVOID *ppIrp
  564. );
  565. NTSTATUS
  566. TdiReceiveHandler (
  567. IN PVOID ReceiveEventContext,
  568. IN PVOID ConnectionContext,
  569. IN USHORT ReceiveFlags,
  570. IN ULONG BytesIndicated,
  571. IN ULONG BytesAvailable,
  572. OUT PULONG BytesTaken,
  573. IN PVOID Tsdu,
  574. OUT PIRP *IoRequestPacket
  575. );
  576. NTSTATUS
  577. PassRcvToTransport(
  578. IN tLOWERCONNECTION *pLowerConn,
  579. IN tCONNECTELE *pConnectEle,
  580. IN PVOID pIoRequestPacket,
  581. IN PULONG pRcvLength
  582. );
  583. NTSTATUS
  584. CompletionRcv(
  585. IN PDEVICE_OBJECT DeviceObject,
  586. IN PIRP Irp,
  587. IN PVOID Context
  588. );
  589. NTSTATUS
  590. NtBuildIrpForReceive (
  591. IN tLOWERCONNECTION *pLowerConn,
  592. IN ULONG Length,
  593. OUT PVOID *ppIrp
  594. );
  595. NTSTATUS
  596. SetEventHandler (
  597. IN PDEVICE_OBJECT DeviceObject,
  598. IN PFILE_OBJECT FileObject,
  599. IN ULONG EventType,
  600. IN PVOID EventHandler,
  601. IN PVOID Context
  602. );
  603. NTSTATUS
  604. SubmitTdiRequest (
  605. IN PFILE_OBJECT FileObject,
  606. IN PIRP Irp
  607. );
  608. NTSTATUS
  609. TdiConnectHandler (
  610. IN PVOID pConnectEventContext,
  611. IN int RemoteAddressLength,
  612. IN PVOID pRemoteAddress,
  613. IN int UserDataLength,
  614. IN PVOID pUserData,
  615. IN int OptionsLength,
  616. IN PVOID pOptions,
  617. OUT CONNECTION_CONTEXT *pConnectionContext,
  618. OUT PIRP *ppAcceptIrp
  619. );
  620. NTSTATUS
  621. TdiDisconnectHandler (
  622. PVOID EventContext,
  623. PVOID ConnectionContext,
  624. ULONG DisconnectDataLength,
  625. PVOID DisconnectData,
  626. ULONG DisconnectInformationLength,
  627. PVOID DisconnectInformation,
  628. ULONG DisconnectIndicators
  629. );
  630. NTSTATUS
  631. TdiRcvDatagramHandler(
  632. IN PVOID pDgramEventContext,
  633. IN int SourceAddressLength,
  634. IN PVOID pSourceAddress,
  635. IN int OptionsLength,
  636. IN PVOID pOptions,
  637. IN ULONG ReceiveDatagramFlags,
  638. IN ULONG BytesIndicated,
  639. IN ULONG BytesAvailable,
  640. OUT ULONG *pBytesTaken,
  641. IN PVOID pTsdu,
  642. OUT PIRP *pIoRequestPacket
  643. );
  644. NTSTATUS
  645. TdiRcvNameSrvHandler(
  646. IN PVOID pDgramEventContext,
  647. IN int SourceAddressLength,
  648. IN PVOID pSourceAddress,
  649. IN int OptionsLength,
  650. IN PVOID pOptions,
  651. IN ULONG ReceiveDatagramFlags,
  652. IN ULONG BytesIndicated,
  653. IN ULONG BytesAvailable,
  654. OUT ULONG *pBytesTaken,
  655. IN PVOID pTsdu,
  656. OUT PIRP *pIoRequestPacket
  657. );
  658. NTSTATUS
  659. TdiErrorHandler (
  660. IN PVOID Context,
  661. IN NTSTATUS Status
  662. );
  663. NTSTATUS
  664. CompletionRcvDgram(
  665. IN PDEVICE_OBJECT DeviceObject,
  666. IN PIRP Irp,
  667. IN PVOID Context
  668. );
  669. VOID
  670. MakePartialMdl (
  671. IN tCONNECTELE *pConnEle,
  672. IN PIRP pIrp,
  673. IN ULONG ToCopy
  674. );
  675. NTSTATUS
  676. OutOfRsrcKill(
  677. OUT tLOWERCONNECTION *pLowerConn);
  678. VOID
  679. CopyToStartofIndicate (
  680. IN tLOWERCONNECTION *pLowerConn,
  681. IN ULONG DataTaken
  682. );
  683. //---------------------------------------------------------------------
  684. //
  685. // FROM tdicnct.c
  686. //
  687. NTSTATUS
  688. CreateDeviceString(
  689. IN PWSTR AppendingString,
  690. IN OUT PUNICODE_STRING pucDevice
  691. );
  692. //---------------------------------------------------------------------
  693. //
  694. // FROM winsif.c
  695. //
  696. NTSTATUS
  697. NTOpenWinsAddr(
  698. IN tDEVICECONTEXT *pDeviceContext,
  699. IN PIRP pIrp,
  700. IN tIPADDRESS IpAddress
  701. );
  702. NTSTATUS
  703. NTCleanUpWinsAddr(
  704. IN tDEVICECONTEXT *pDeviceContext,
  705. IN PIRP pIrp
  706. );
  707. NTSTATUS
  708. NTCloseWinsAddr(
  709. IN tDEVICECONTEXT *pDeviceContext,
  710. IN PIRP pIrp
  711. );
  712. NTSTATUS
  713. RcvIrpFromWins (
  714. IN PCTE_IRP pIrp
  715. );
  716. NTSTATUS
  717. PassNamePduToWins (
  718. IN tDEVICECONTEXT *pDeviceContext,
  719. IN PVOID pSrcAddress,
  720. IN tNAMEHDR UNALIGNED *pNameSrv,
  721. IN ULONG uNumBytes
  722. );
  723. NTSTATUS
  724. WinsSendDatagram(
  725. IN tDEVICECONTEXT *pDeviceContext,
  726. IN PIRP pIrp,
  727. IN BOOLEAN MustSend);
  728. NTSTATUS
  729. WinsRegisterName(
  730. IN tDEVICECONTEXT *pDeviceContext,
  731. IN tNAMEADDR *pNameAddr,
  732. IN PUCHAR pScope,
  733. IN enum eNSTYPE eNsType
  734. );
  735. NTSTATUS
  736. WinsSetInformation(
  737. IN tWINS_INFO *pWins,
  738. IN tWINS_SET_INFO *pWinsSetInfo
  739. );
  740. //---------------------------------------------------------------------
  741. //
  742. // FROM ntpnp.c
  743. //
  744. VOID
  745. NbtNotifyTdiClients(
  746. IN tDEVICECONTEXT *pDeviceContext,
  747. IN enum eTDI_ACTION Action
  748. );
  749. #ifdef _NETBIOSLESS
  750. tDEVICECONTEXT *
  751. NbtCreateSmbDevice(
  752. );
  753. #endif
  754. NTSTATUS
  755. NbtDeviceAdd(
  756. PUNICODE_STRING pucBindString
  757. );
  758. NTSTATUS
  759. NbtDeviceRemove(
  760. PUNICODE_STRING pucBindString
  761. );
  762. VOID
  763. TdiAddressArrival(
  764. IN PTA_ADDRESS Addr,
  765. IN PUNICODE_STRING pDeviceName,
  766. IN PTDI_PNP_CONTEXT Context
  767. );
  768. VOID
  769. TdiAddressDeletion(
  770. IN PTA_ADDRESS Addr,
  771. IN PUNICODE_STRING pDeviceName,
  772. IN PTDI_PNP_CONTEXT Context
  773. );
  774. VOID
  775. TdiBindHandler(
  776. IN TDI_PNP_OPCODE PnPOpcode,
  777. IN PUNICODE_STRING DeviceName,
  778. IN PWSTR MultiSZBindList
  779. );
  780. NTSTATUS
  781. TdiPnPPowerHandler(
  782. IN PUNICODE_STRING DeviceName,
  783. IN PNET_PNP_EVENT PnPEvent,
  784. IN PTDI_PNP_CONTEXT Context1,
  785. IN PTDI_PNP_CONTEXT Context2
  786. );
  787. VOID
  788. NbtPnPPowerComplete(
  789. IN PNET_PNP_EVENT NetEvent,
  790. IN NTSTATUS ProviderStatus
  791. );
  792. NTSTATUS
  793. CheckSetWakeupPattern(
  794. tDEVICECONTEXT *pDeviceContext,
  795. PUCHAR pName,
  796. BOOLEAN RequestAdd
  797. );
  798. NTSTATUS
  799. NbtCreateNetBTDeviceObject(
  800. PDRIVER_OBJECT DriverObject,
  801. tNBTCONFIG *pConfig,
  802. PUNICODE_STRING RegistryPath
  803. );
  804. NTSTATUS
  805. NbtNtPNPInit(
  806. VOID
  807. );
  808. VOID
  809. NbtFailedNtPNPInit(
  810. VOID
  811. );
  812. NTSTATUS
  813. NbtAddressAdd(
  814. IN ULONG IpAddr,
  815. IN tDEVICECONTEXT *pDeviceContext,
  816. IN PUNICODE_STRING pucBindString
  817. );
  818. NTSTATUS
  819. NbtAddNewInterface (
  820. IN PIRP pIrp,
  821. IN PVOID *pBuffer,
  822. IN ULONG Size
  823. );
  824. VOID
  825. NbtAddressDelete(
  826. ULONG IpAddr
  827. );
  828. tDEVICECONTEXT *
  829. NbtFindAndReferenceDevice(
  830. PUNICODE_STRING pucBindName,
  831. BOOLEAN fNameIsBindName
  832. );
  833. #if FAST_DISP
  834. NTSTATUS
  835. NbtQueryIpHandler(
  836. IN PFILE_OBJECT FileObject,
  837. IN ULONG IOControlCode,
  838. OUT PVOID *EntryPoint
  839. );
  840. #endif
  841. //---------------------------------------------------------------------
  842. //
  843. // FROM AutoDial.c
  844. //
  845. VOID
  846. NbtAcdBind(
  847. );
  848. VOID
  849. NbtAcdUnbind(
  850. );
  851. NTSTATUS
  852. LookupDeviceInRegistry(
  853. IN PUNICODE_STRING pBindName,
  854. OUT tADDRARRAY* pAddrs,
  855. OUT PUNICODE_STRING pExportName);
  856. void SetNodeType(void);
  857. void NbtUpBootCounter(void);
  858. void NbtDownBootCounter(void);
  859. NTSTATUS
  860. NbtSetSmbBindingInfo2(
  861. IN tDEVICECONTEXT *pDeviceContext,
  862. IN NETBT_SMB_BIND_REQUEST *pSmbRequest
  863. );
  864. #endif // !VXD