Leaked source code of windows server 2003
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.

1664 lines
39 KiB

  1. /*++
  2. Copyright (c) 1989-1993 Microsoft Corporation
  3. Module Name:
  4. Nbtprocs.h
  5. Abstract:
  6. This file contains the OS independent function prototypes.
  7. Author:
  8. Jim Stewart (Jimst) 10-2-92
  9. Revision History:
  10. Johnl 05-Apr-1993 Hacked on to support VXD
  11. --*/
  12. #ifndef _NBTPROCS_H_
  13. #define _NBTPROCS_H_
  14. #include "types.h"
  15. #ifndef VXD
  16. #include <ntprocs.h>
  17. #else
  18. #include <vxdprocs.h>
  19. #endif
  20. //---------------------------------------------------------------------
  21. // FROM NAMESRV.C
  22. //
  23. NTSTATUS
  24. NbtRegisterName(
  25. IN enum eNbtLocation Location,
  26. IN ULONG IpAddress,
  27. IN PCHAR pName,
  28. IN tNAMEADDR *pNameAddrIn,
  29. IN tCLIENTELE *pClientEle,
  30. IN PVOID pClientCompletion,
  31. IN USHORT uAddressType,
  32. IN tDEVICECONTEXT *pDeviceContext
  33. );
  34. NTSTATUS
  35. ReleaseNameOnNet(
  36. tNAMEADDR *pNameAddr,
  37. PCHAR pScope,
  38. PVOID pClientCompletion,
  39. ULONG NodeType,
  40. tDEVICECONTEXT *pDeviceContext
  41. );
  42. VOID
  43. NameReleaseDone(
  44. PVOID pContext,
  45. NTSTATUS status
  46. );
  47. NTSTATUS
  48. RegOrQueryFromNet(
  49. IN BOOL fReg,
  50. IN tDEVICECONTEXT *pDeviceContext,
  51. IN tNAMEHDR UNALIGNED *pNameHdr,
  52. IN LONG lNumBytes,
  53. IN PCHAR pName,
  54. IN PUCHAR pScope
  55. );
  56. NTSTATUS
  57. QueryNameOnNet(
  58. IN PCHAR pName,
  59. IN PCHAR pScope,
  60. IN USHORT uType,
  61. IN tDGRAM_SEND_TRACKING *pClientContextTracker,
  62. IN PVOID pClientCompletion,
  63. IN ULONG NodeType,
  64. IN tNAMEADDR *pNameAddrIn,
  65. IN tDEVICECONTEXT *pDeviceContext,
  66. IN CTELockHandle *pJointLockOldIrq
  67. );
  68. #ifdef MULTIPLE_WINS
  69. NTSTATUS
  70. ContinueQueryNameOnNet(
  71. IN tDGRAM_SEND_TRACKING *pTracker,
  72. IN PUCHAR pName,
  73. IN tDEVICECONTEXT *pDeviceContext,
  74. IN PVOID QueryCompletion,
  75. IN OUT BOOLEAN *pfNameReferenced
  76. );
  77. #endif
  78. VOID
  79. CompleteClientReq(
  80. COMPLETIONCLIENT pClientCompletion,
  81. tDGRAM_SEND_TRACKING *pTracker,
  82. NTSTATUS status
  83. );
  84. VOID
  85. NodeStatusTimeout(
  86. PVOID pContext,
  87. PVOID pContext2,
  88. tTIMERQENTRY *pTimerQEntry
  89. );
  90. VOID
  91. RefreshRegCompletion(
  92. PVOID pContext,
  93. PVOID pContext2,
  94. tTIMERQENTRY *pTimerQEntry
  95. );
  96. VOID
  97. RefreshTimeout(
  98. PVOID pContext,
  99. PVOID pContext2,
  100. tTIMERQENTRY *pTimerQEntry
  101. );
  102. VOID
  103. WakeupRefreshTimeout(
  104. PVOID pContext,
  105. PVOID pContext2,
  106. tTIMERQENTRY *pTimerQEntry
  107. );
  108. VOID
  109. RemoteHashTimeout(
  110. PVOID pContext,
  111. PVOID pContext2,
  112. tTIMERQENTRY *pTimerQEntry
  113. );
  114. VOID
  115. SessionKeepAliveTimeout(
  116. PVOID pContext,
  117. PVOID pContext2,
  118. tTIMERQENTRY *pTimerQEntry
  119. );
  120. VOID
  121. IncrementNameStats(
  122. IN ULONG StatType,
  123. IN BOOLEAN IsNameServer
  124. );
  125. VOID
  126. SaveBcastNameResolved(
  127. IN PUCHAR pName
  128. );
  129. //---------------------------------------------------------------------
  130. // FROM NAME.C
  131. VOID
  132. FreeRcvBuffers(
  133. tCONNECTELE *pConnEle,
  134. CTELockHandle *pOldIrq
  135. );
  136. NTSTATUS
  137. NbtRegisterCompletion(
  138. IN tCLIENTELE *pClientEle,
  139. IN NTSTATUS Status);
  140. NTSTATUS
  141. NbtOpenAddress(
  142. IN TDI_REQUEST *pRequest,
  143. IN TA_ADDRESS *pTaAddress,
  144. IN tIPADDRESS IpAddress,
  145. IN tDEVICECONTEXT *pContext,
  146. IN PVOID pIrp);
  147. NTSTATUS
  148. NbtOpenConnection(
  149. IN TDI_REQUEST *pRequest,
  150. IN CONNECTION_CONTEXT pConnectionContext,
  151. IN tDEVICECONTEXT *pContext);
  152. NTSTATUS
  153. NbtOpenAndAssocConnection(
  154. IN tDEVICECONTEXT *pDeviceContext,
  155. IN tCONNECTELE *pConnEle,
  156. OUT tLOWERCONNECTION **ppLowerConn,
  157. IN UCHAR Identifier
  158. );
  159. NTSTATUS
  160. NbtAssociateAddress(
  161. IN TDI_REQUEST *pRequest,
  162. IN tCLIENTELE *pClientEle,
  163. IN PVOID pIrp);
  164. NTSTATUS
  165. NbtDisassociateAddress(
  166. IN TDI_REQUEST *pRequest
  167. );
  168. NTSTATUS
  169. NbtCloseAddress(
  170. IN TDI_REQUEST *pRequest,
  171. OUT TDI_REQUEST_STATUS *pRequestStatus,
  172. IN tDEVICECONTEXT *pContext,
  173. IN PVOID pIrp);
  174. NTSTATUS
  175. NbtCleanUpAddress(
  176. IN tCLIENTELE *pClientEle,
  177. IN tDEVICECONTEXT *pDeviceContext
  178. );
  179. NTSTATUS
  180. NbtCloseConnection(
  181. IN TDI_REQUEST *pRequest,
  182. OUT TDI_REQUEST_STATUS *pRequestStatus,
  183. IN tDEVICECONTEXT *pContext,
  184. IN PVOID pIrp);
  185. NTSTATUS
  186. NbtCleanUpConnection(
  187. IN tCONNECTELE *pConnEle,
  188. IN tDEVICECONTEXT *pDeviceContext
  189. );
  190. VOID
  191. RelistConnection(
  192. IN tCONNECTELE *pConnEle
  193. );
  194. NTSTATUS
  195. CleanupConnectingState(
  196. IN tCONNECTELE *pConnEle,
  197. IN tDEVICECONTEXT *pDeviceContext,
  198. IN CTELockHandle *OldIrq,
  199. IN CTELockHandle *OldIrq2
  200. );
  201. NTSTATUS
  202. NbtConnect(
  203. IN TDI_REQUEST *pRequest,
  204. IN PVOID pTimeout,
  205. IN PTDI_CONNECTION_INFORMATION pCallInfo,
  206. IN PIRP pIrp
  207. );
  208. tNAMEADDR *
  209. FindNameRemoteThenLocal(
  210. IN tDGRAM_SEND_TRACKING *pTracker,
  211. OUT tIPADDRESS *pIpAddress,
  212. OUT PULONG plNameType
  213. );
  214. VOID
  215. SessionStartupContinue(
  216. IN PVOID pContext,
  217. IN NTSTATUS status,
  218. IN ULONG lInfo);
  219. VOID
  220. SessionSetupContinue(
  221. IN PVOID pContext,
  222. IN NTSTATUS status
  223. );
  224. VOID
  225. SessionStartupTimeoutCompletion(
  226. IN tDGRAM_SEND_TRACKING *pTracker,
  227. IN NTSTATUS status
  228. );
  229. VOID
  230. SessionStartupTimeout (
  231. PVOID pContext,
  232. PVOID pContext2,
  233. tTIMERQENTRY *pTimerQEntry
  234. );
  235. VOID
  236. QueueCleanup(
  237. IN tCONNECTELE *pConnEle,
  238. IN CTELockHandle *pOldIrqJointLock,
  239. IN CTELockHandle *pOldIrqConnEle
  240. );
  241. NTSTATUS
  242. NbtDisconnect(
  243. IN TDI_REQUEST *pRequest,
  244. IN PVOID pTimeout,
  245. IN ULONG Flags,
  246. IN PTDI_CONNECTION_INFORMATION pCallInfo,
  247. IN PTDI_CONNECTION_INFORMATION pReturnInfo,
  248. IN PIRP pIrp);
  249. NTSTATUS
  250. NbtSend(
  251. IN TDI_REQUEST *pRequest,
  252. IN USHORT Flags,
  253. IN ULONG SendLength,
  254. OUT LONG *pSentLength,
  255. IN PVOID *pBuffer,
  256. IN tDEVICECONTEXT *pContext,
  257. IN PIRP pIrp
  258. );
  259. NTSTATUS
  260. NbtSendDatagram(
  261. IN TDI_REQUEST *pRequest,
  262. IN PTDI_CONNECTION_INFORMATION pSendInfo,
  263. IN LONG SendLength,
  264. IN LONG *pSentLength,
  265. IN PVOID pBuffer,
  266. IN tDEVICECONTEXT *pDeviceContext,
  267. IN PIRP pIrp
  268. );
  269. NTSTATUS
  270. SendDgram(
  271. IN tNAMEADDR *pNameAddr,
  272. IN tDGRAM_SEND_TRACKING *pTracker
  273. );
  274. NTSTATUS
  275. BuildSendDgramHdr(
  276. IN ULONG SendLength,
  277. IN tDEVICECONTEXT *pDeviceContext,
  278. IN PCHAR pSourceName,
  279. IN PCHAR pDestinationName,
  280. IN ULONG NameLength,
  281. IN PVOID pBuffer,
  282. OUT tDGRAMHDR **ppDgramHdr,
  283. OUT tDGRAM_SEND_TRACKING **ppTracker
  284. );
  285. VOID
  286. NodeStatusDone(
  287. IN PVOID pContext,
  288. IN NTSTATUS status
  289. );
  290. NTSTATUS
  291. NbtSendNodeStatus(
  292. IN tDEVICECONTEXT *pDeviceContext,
  293. IN PCHAR pName,
  294. IN PULONG pIpAddrsList,
  295. IN PVOID ClientContext,
  296. IN PVOID CompletionRoutine
  297. );
  298. NTSTATUS
  299. NbtQueryFindName(
  300. IN PTDI_CONNECTION_INFORMATION pInfo,
  301. IN tDEVICECONTEXT *pDeviceContext,
  302. IN PIRP pIrp,
  303. IN BOOLEAN IsIoctl
  304. );
  305. NTSTATUS
  306. CopyFindNameData(
  307. IN tNAMEADDR *pNameAddr,
  308. IN PIRP pIrp,
  309. IN tDGRAM_SEND_TRACKING *pTracker
  310. );
  311. NTSTATUS
  312. NbtListen(
  313. IN TDI_REQUEST *pRequest,
  314. IN ULONG Flags,
  315. IN TDI_CONNECTION_INFORMATION *pRequestConnectInfo,
  316. OUT TDI_CONNECTION_INFORMATION *pReturnConnectInfo,
  317. IN PVOID pIrp);
  318. NTSTATUS
  319. NbtAccept(
  320. IN TDI_REQUEST *pRequest,
  321. IN TDI_CONNECTION_INFORMATION *pAcceptInfo,
  322. OUT TDI_CONNECTION_INFORMATION *pReturnAcceptInfo,
  323. IN PIRP pIrp);
  324. NTSTATUS
  325. NbtReceiveDatagram(
  326. IN TDI_REQUEST *pRequest,
  327. IN PTDI_CONNECTION_INFORMATION pReceiveInfo,
  328. IN PTDI_CONNECTION_INFORMATION pReturnedInfo,
  329. IN LONG ReceiveLength,
  330. IN LONG *pReceivedLength,
  331. IN PVOID pBuffer,
  332. IN tDEVICECONTEXT *pDeviceContext,
  333. IN PIRP pIrp
  334. );
  335. NTSTATUS
  336. NbtSetEventHandler(
  337. tCLIENTELE *pClientEle,
  338. int EventType,
  339. PVOID pEventHandler,
  340. PVOID pEventContext
  341. );
  342. NTSTATUS
  343. NbtAddEntryToRemoteHashTable(
  344. IN tDEVICECONTEXT *pDeviceContext,
  345. IN USHORT NameAddFlag,
  346. IN PUCHAR Name,
  347. IN ULONG IpAddress,
  348. IN ULONG Ttl,
  349. IN UCHAR name_flags
  350. );
  351. NTSTATUS
  352. NbtQueryAdapterStatus(
  353. IN tDEVICECONTEXT *pDeviceContext,
  354. OUT PVOID *ppAdapterStatus,
  355. OUT PLONG pSize,
  356. enum eNbtLocation Location
  357. );
  358. NTSTATUS
  359. NbtQueryConnectionList(
  360. IN tDEVICECONTEXT *pDeviceContext,
  361. OUT PVOID *ppConnList,
  362. IN OUT PLONG pSize
  363. );
  364. VOID
  365. DelayedNbtResyncRemoteCache(
  366. IN PVOID Unused1,
  367. IN PVOID Unused2,
  368. IN PVOID Unused3,
  369. IN tDEVICECONTEXT *Unused4
  370. );
  371. NTSTATUS
  372. NbtQueryBcastVsWins(
  373. IN tDEVICECONTEXT *pDeviceContext,
  374. OUT PVOID *ppBuffer,
  375. IN OUT PLONG pSize
  376. );
  377. NTSTATUS
  378. NbtNewDhcpAddress(
  379. tDEVICECONTEXT *pDeviceContext,
  380. ULONG IpAddress,
  381. ULONG SubnetMask);
  382. VOID
  383. FreeTracker(
  384. IN tDGRAM_SEND_TRACKING *pTracker,
  385. IN ULONG Actions
  386. );
  387. NTSTATUS
  388. DatagramDistribution(
  389. IN tDGRAM_SEND_TRACKING *pTracker,
  390. IN tNAMEADDR *pNameAddr
  391. );
  392. VOID
  393. DeleteAddressElement(
  394. IN tADDRESSELE *pAddress
  395. );
  396. VOID
  397. DeleteClientElement(
  398. IN tCLIENTELE *pClientEle
  399. );
  400. VOID
  401. ReleaseNameCompletion(
  402. IN PVOID pContext,
  403. IN NTSTATUS status,
  404. IN ULONG lInfo);
  405. NTSTATUS
  406. DisconnectLower(
  407. IN tLOWERCONNECTION *pLowerConn,
  408. IN ULONG state,
  409. IN ULONG Flags,
  410. IN PVOID Timeout,
  411. IN BOOLEAN Wait
  412. );
  413. extern
  414. USHORT
  415. GetTransactId(
  416. );
  417. NTSTATUS
  418. NbtDeleteLowerConn(
  419. IN tLOWERCONNECTION *pLowerConn
  420. );
  421. tDEVICECONTEXT *
  422. GetAndRefNextDeviceFromNameAddr(
  423. IN tNAMEADDR *pNameAddr
  424. );
  425. tDEVICECONTEXT *
  426. GetDeviceFromInterface(
  427. IN tIPADDRESS IpAddress,
  428. IN BOOLEAN fReferenceDevice
  429. );
  430. VOID
  431. NbtDereferenceName(
  432. IN tNAMEADDR *pNameAddr,
  433. IN ULONG RefContext,
  434. IN BOOLEAN fLocked
  435. );
  436. VOID
  437. NbtDereferenceLowerConnection(
  438. IN tLOWERCONNECTION *pLowerConn,
  439. IN ULONG RefContext,
  440. IN BOOLEAN fJointLockHeld
  441. );
  442. VOID
  443. NbtDereferenceTracker(
  444. IN tDGRAM_SEND_TRACKING *pTracker,
  445. IN BOOLEAN fLocked
  446. );
  447. NTSTATUS
  448. NbtDereferenceAddress(
  449. IN tADDRESSELE *pAddressEle,
  450. IN ULONG Context
  451. );
  452. VOID
  453. NbtDereferenceConnection(
  454. IN tCONNECTELE *pConnEle,
  455. IN ULONG RefContext
  456. );
  457. VOID
  458. NbtDereferenceClient(
  459. IN tCLIENTELE *pClientEle
  460. );
  461. //---------------------------------------------------------------------
  462. //
  463. // FROM TDICNCT.C
  464. //
  465. NTSTATUS
  466. NbtTdiOpenConnection (
  467. IN tLOWERCONNECTION *pLowerConn,
  468. IN tDEVICECONTEXT *pDeviceContext
  469. );
  470. NTSTATUS
  471. NbtTdiAssociateConnection(
  472. IN PFILE_OBJECT pFileObject,
  473. IN HANDLE Handle
  474. );
  475. NTSTATUS
  476. NbtTdiCloseConnection(
  477. IN tLOWERCONNECTION *pLowerConn
  478. );
  479. NTSTATUS
  480. NbtTdiCloseAddress(
  481. IN tLOWERCONNECTION *pLowerConn
  482. );
  483. //---------------------------------------------------------------------
  484. //
  485. // FROM TDIADDR.C
  486. //
  487. NTSTATUS
  488. NbtTdiOpenAddress (
  489. OUT PHANDLE pFileHandle,
  490. OUT PDEVICE_OBJECT *pDeviceObject,
  491. OUT PFILE_OBJECT *pFileObject,
  492. IN tDEVICECONTEXT *pDeviceContext,
  493. IN USHORT PortNumber,
  494. IN ULONG IpAddress,
  495. IN ULONG Flags
  496. );
  497. NTSTATUS
  498. NbtTdiCompletionRoutine(
  499. IN PDEVICE_OBJECT DeviceObject,
  500. IN PIRP Irp,
  501. IN PVOID Context
  502. );
  503. NTSTATUS
  504. NbtTdiOpenControl (
  505. IN tDEVICECONTEXT *pDeviceContext
  506. );
  507. //---------------------------------------------------------------------
  508. //
  509. // FROM NBTUTILS.C
  510. //
  511. BOOLEAN
  512. IsEntryInList(
  513. PLIST_ENTRY pEntryToFind,
  514. PLIST_ENTRY pListToSearch
  515. );
  516. void
  517. FreeList(
  518. PLIST_ENTRY pHead,
  519. PLIST_ENTRY pFreeQ);
  520. void
  521. NbtFreeAddressObj(
  522. tADDRESSELE *pBlk);
  523. void
  524. NbtFreeClientObj(
  525. tCLIENTELE *pBlk);
  526. void
  527. FreeConnectionObj(
  528. tCONNECTELE *pBlk);
  529. tCLIENTELE *
  530. NbtAllocateClientBlock(
  531. tADDRESSELE *pAddrEle,
  532. tDEVICECONTEXT *pDeviceContext
  533. );
  534. NTSTATUS
  535. NbtAddPermanentName(
  536. IN tDEVICECONTEXT *pDeviceContext
  537. );
  538. NTSTATUS
  539. NbtAddPermanentNameNotFound(
  540. IN tDEVICECONTEXT *pDeviceContext
  541. );
  542. VOID
  543. NbtRemovePermanentName(
  544. IN tDEVICECONTEXT *pDeviceContext
  545. );
  546. NTSTATUS
  547. ConvertDottedDecimalToUlong(
  548. IN PUCHAR pInString,
  549. OUT PULONG IpAddress);
  550. NTSTATUS
  551. NbtInitQ(
  552. PLIST_ENTRY pListHead,
  553. LONG iSizeBuffer,
  554. LONG iNumBuffers);
  555. NTSTATUS
  556. NbtInitTrackerQ(
  557. LONG iNumBuffers
  558. );
  559. tDGRAM_SEND_TRACKING *
  560. NbtAllocTracker(
  561. IN VOID
  562. );
  563. NTSTATUS
  564. NbtGetBuffer(
  565. PLIST_ENTRY pListHead,
  566. PLIST_ENTRY *ppListEntry,
  567. enum eBUFFER_TYPES eBuffType);
  568. NTSTATUS
  569. NewInternalAddressFromTransportAddress(
  570. IN TRANSPORT_ADDRESS UNALIGNED *pTransportAddress,
  571. IN ULONG MaxInputBufferLength,
  572. OUT PTA_NETBT_INTERNAL_ADDRESS *ppNetBT
  573. );
  574. VOID
  575. DeleteInternalAddress(
  576. IN PTA_NETBT_INTERNAL_ADDRESS pNetBT
  577. );
  578. NTSTATUS
  579. GetNetBiosNameFromTransportAddress(
  580. IN TRANSPORT_ADDRESS UNALIGNED *pTransportAddress,
  581. IN ULONG MaxInputBufferLength,
  582. OUT PTDI_ADDRESS_NETBT_INTERNAL pNetBT
  583. );
  584. NTSTATUS
  585. ConvertToAscii(
  586. IN PCHAR pNameHdr,
  587. IN LONG NumBytes,
  588. OUT PCHAR pName,
  589. OUT PCHAR *pScope,
  590. OUT PULONG pNameSize
  591. );
  592. PCHAR
  593. ConvertToHalfAscii(
  594. OUT PCHAR pDest,
  595. IN PCHAR pName,
  596. IN PCHAR pScope,
  597. IN ULONG ScopeSize
  598. );
  599. ULONG
  600. Nbt_inet_addr(
  601. IN PCHAR pName,
  602. IN ULONG Flags
  603. );
  604. NTSTATUS
  605. BuildQueryResponse(
  606. IN USHORT sNameSize,
  607. IN tNAMEHDR *pNameHdr,
  608. IN ULONG uTtl,
  609. IN ULONG IpAddress,
  610. OUT ULONG uNumBytes,
  611. OUT PVOID pResponse,
  612. IN PVOID pName,
  613. IN USHORT NameType,
  614. IN USHORT RetCode
  615. );
  616. NTSTATUS
  617. GetTracker(
  618. OUT tDGRAM_SEND_TRACKING **ppTracker,
  619. IN enum eTRACKER_TYPE TrackerType);
  620. NTSTATUS
  621. GetIrp(
  622. OUT PIRP *ppIrp);
  623. VOID
  624. NbtFreeIrp (
  625. IN PIRP pIrp
  626. );
  627. ULONG
  628. CountLocalNames(IN tNBTCONFIG *pNbtConfig
  629. );
  630. ULONG
  631. CountUpperConnections(
  632. IN tDEVICECONTEXT *pDeviceContext
  633. );
  634. NTSTATUS
  635. DisableInboundConnections(
  636. IN tDEVICECONTEXT *pDeviceContext
  637. );
  638. ULONG
  639. CloseLowerConnections(
  640. IN PLIST_ENTRY pLowerConnFreeHead
  641. );
  642. NTSTATUS
  643. ReRegisterLocalNames(
  644. IN tDEVICECONTEXT *pDeviceContext,
  645. IN BOOLEAN fSendNameRelease
  646. );
  647. VOID
  648. NbtStopRefreshTimer(
  649. );
  650. NTSTATUS
  651. strnlen(
  652. PUCHAR SrcString,
  653. LONG MaxBufferLength,
  654. LONG *pStringLen
  655. );
  656. //---------------------------------------------------------------------
  657. //
  658. // FROM hndlrs.c
  659. //
  660. NTSTATUS
  661. RcvHandlrNotOs (
  662. IN PVOID ReceiveEventContext,
  663. IN PVOID ConnectionContext,
  664. IN USHORT ReceiveFlags,
  665. IN ULONG BytesIndicated,
  666. IN ULONG BytesAvailable,
  667. OUT PULONG BytesTaken,
  668. IN PVOID pTsdu,
  669. OUT PVOID *RcvBuffer
  670. );
  671. NTSTATUS
  672. Inbound (
  673. IN PVOID ReceiveEventContext,
  674. IN PVOID ConnectionContext,
  675. IN USHORT ReceiveFlags,
  676. IN ULONG BytesIndicated,
  677. IN ULONG BytesAvailable,
  678. OUT PULONG BytesTaken,
  679. IN PVOID pTsdu,
  680. OUT PVOID *RcvBuffer
  681. );
  682. NTSTATUS
  683. Outbound (
  684. IN PVOID ReceiveEventContext,
  685. IN PVOID ConnectionContext,
  686. IN USHORT ReceiveFlags,
  687. IN ULONG BytesIndicated,
  688. IN ULONG BytesAvailable,
  689. OUT PULONG BytesTaken,
  690. IN PVOID pTsdu,
  691. OUT PVOID *RcvBuffer
  692. );
  693. NTSTATUS
  694. RejectAnyData(
  695. IN PVOID ReceiveEventContext,
  696. IN tLOWERCONNECTION *pLowerConn,
  697. IN USHORT ReceiveFlags,
  698. IN ULONG BytesIndicated,
  699. IN ULONG BytesAvailable,
  700. OUT PULONG BytesTaken,
  701. IN PVOID pTsdu,
  702. OUT PVOID *ppIrp
  703. );
  704. VOID
  705. RejectSession(
  706. IN tLOWERCONNECTION *pLowerConn,
  707. IN ULONG StatusCode,
  708. IN ULONG SessionStatus,
  709. IN BOOLEAN SendNegativeSessionResponse
  710. );
  711. VOID
  712. GetIrpIfNotCancelled(
  713. IN tCONNECTELE *pConnEle,
  714. OUT PIRP *ppIrp
  715. );
  716. NTSTATUS
  717. FindSessionEndPoint(
  718. IN VOID UNALIGNED *pTsdu,
  719. IN PVOID ConnectionContext,
  720. IN ULONG BytesIndicated,
  721. OUT tCLIENTELE **ppClientEle,
  722. OUT PVOID *ppRemoteAddress,
  723. OUT PULONG pRemoteAddressLength
  724. );
  725. VOID
  726. SessionRetry(
  727. IN PVOID pContext,
  728. IN PVOID pContext2,
  729. IN tTIMERQENTRY *pTimerQEntry
  730. );
  731. tCONNECTELE *
  732. SearchConnectionList(
  733. IN tCLIENTELE *pClientEle,
  734. IN PVOID pClientContext
  735. );
  736. NTSTATUS
  737. ConnectHndlrNotOs (
  738. IN PVOID pConnectionContext,
  739. IN LONG RemoteAddressLength,
  740. IN PVOID pRemoteAddress,
  741. IN int UserDataLength,
  742. IN PVOID pUserData,
  743. OUT CONNECTION_CONTEXT *ppConnectionId
  744. );
  745. NTSTATUS
  746. DisconnectHndlrNotOs (
  747. PVOID EventContext,
  748. PVOID ConnectionContext,
  749. ULONG DisconnectDataLength,
  750. PVOID pDisconnectData,
  751. ULONG DisconnectInformationLength,
  752. PVOID pDisconnectInformation,
  753. ULONG DisconnectIndicators
  754. );
  755. NTSTATUS
  756. DgramHndlrNotOs(
  757. IN PVOID ReceiveEventContext,
  758. IN ULONG SourceAddrLength,
  759. IN PVOID pSourceAddr,
  760. IN ULONG OptionsLength,
  761. IN PVOID pOptions,
  762. IN ULONG ReceiveDatagramFlags,
  763. IN ULONG BytesIndicated,
  764. IN ULONG BytesAvailable,
  765. OUT PULONG pBytesTaken,
  766. IN PVOID pTsdu,
  767. OUT PVOID *ppRcvBuffer,
  768. OUT tCLIENTLIST **ppAddressEle
  769. );
  770. NTSTATUS
  771. NameSrvHndlrNotOs (
  772. IN tDEVICECONTEXT *pDeviceContext,
  773. IN PVOID pSrcAddress,
  774. IN tNAMEHDR UNALIGNED *pNameSrv,
  775. IN ULONG uNumBytes,
  776. IN BOOLEAN fBroadcast
  777. );
  778. //---------------------------------------------------------------------
  779. //
  780. // FROM proxy.c
  781. //
  782. NTSTATUS
  783. ReleaseResponseFromNet(
  784. IN tDEVICECONTEXT *pDeviceContext,
  785. IN PVOID pSrcAddress,
  786. IN tNAMEHDR UNALIGNED *pNameHdr,
  787. IN LONG NumBytes
  788. );
  789. NTSTATUS
  790. ProxyQueryFromNet(
  791. IN tDEVICECONTEXT *pDeviceContext,
  792. IN PVOID pSrcAddress,
  793. IN tNAMEHDR UNALIGNED *pNameHdr,
  794. IN LONG lNumBytes,
  795. IN USHORT OpCodeFlags
  796. );
  797. NTSTATUS
  798. ProxyDoDgramDist(
  799. IN tDGRAMHDR UNALIGNED *pDgram,
  800. IN DWORD DgramLen,
  801. IN tNAMEADDR *pNameAddr,
  802. IN tDEVICECONTEXT *pDeviceContext
  803. );
  804. VOID
  805. ProxyTimerComplFn (
  806. IN PVOID pContext,
  807. IN PVOID pContext2,
  808. IN tTIMERQENTRY *pTimerQEntry
  809. );
  810. VOID
  811. ProxyRespond (
  812. IN tQUERYRESP *pQuery,
  813. IN PUCHAR pName,
  814. IN tDEVICECONTEXT *pDeviceContext,
  815. IN tNAMEHDR *pNameHdr,
  816. IN ULONG lNameSize,
  817. IN ULONG SrcAddress,
  818. IN PTDI_ADDRESS_IP pAddressIp
  819. );
  820. //---------------------------------------------------------------------
  821. //
  822. // FROM hashtbl.c
  823. //
  824. NTSTATUS
  825. CreateHashTable(
  826. tHASHTABLE **pHashTable,
  827. LONG NumBuckets,
  828. enum eNbtLocation LocalRemote
  829. );
  830. #ifdef _PNP_POWER_
  831. VOID
  832. DestroyHashTables(
  833. );
  834. #endif // _PNP_POWER_
  835. NTSTATUS
  836. LockAndAddToHashTable(
  837. IN tHASHTABLE *pHashTable,
  838. IN PCHAR pName,
  839. IN PCHAR pScope,
  840. IN tIPADDRESS IpAddress,
  841. IN enum eNbtAddrType NameType,
  842. IN tNAMEADDR *pNameAddr,
  843. OUT tNAMEADDR **ppNameAddress,
  844. IN tDEVICECONTEXT *pDeviceContext,
  845. IN USHORT NameAddFlags
  846. );
  847. NTSTATUS
  848. AddToHashTable(
  849. IN tHASHTABLE *pHashTable,
  850. IN PCHAR pName,
  851. IN PCHAR pScope,
  852. IN tIPADDRESS IpAddress,
  853. IN enum eNbtAddrType NameType,
  854. IN tNAMEADDR *pNameAddr,
  855. OUT tNAMEADDR **ppNameAddress,
  856. IN tDEVICECONTEXT *pDeviceContext,
  857. IN USHORT NameAddFlags
  858. );
  859. NTSTATUS
  860. DeleteFromHashTable(
  861. tHASHTABLE *pHashTable,
  862. PCHAR pName
  863. );
  864. tNAMEADDR *
  865. LockAndFindName(
  866. enum eNbtLocation Location,
  867. PCHAR pName,
  868. PCHAR pScope,
  869. ULONG *pRetNameType
  870. );
  871. tNAMEADDR *
  872. FindName(
  873. enum eNbtLocation Location,
  874. PCHAR pName,
  875. PCHAR pScope,
  876. ULONG *pRetNameType
  877. );
  878. NTSTATUS
  879. ChgStateOfScopedNameInHashTable(
  880. tHASHTABLE *pHashTable,
  881. PCHAR pName,
  882. PCHAR pScope,
  883. DWORD NewState
  884. );
  885. NTSTATUS
  886. FindInHashTable(
  887. tHASHTABLE *pHashTable,
  888. PCHAR pName,
  889. PCHAR pScope,
  890. tNAMEADDR **pNameAddress
  891. );
  892. NTSTATUS
  893. FindNoScopeInHashTable(
  894. tHASHTABLE *pHashTable,
  895. PCHAR pName,
  896. tNAMEADDR **pNameAddress
  897. );
  898. NTSTATUS
  899. UpdateHashTable(
  900. tHASHTABLE *pHashTable,
  901. PCHAR pName,
  902. PCHAR pScope,
  903. ULONG IpAddress,
  904. BOOLEAN bGroup,
  905. tNAMEADDR **ppNameAddr
  906. );
  907. //---------------------------------------------------------------------
  908. //
  909. // FROM timer.c
  910. //
  911. NTSTATUS
  912. InitTimerQ(
  913. VOID
  914. );
  915. #ifdef _PNP_POWER_
  916. NTSTATUS
  917. DestroyTimerQ(
  918. );
  919. #endif // _PNP_POWER_
  920. NTSTATUS
  921. InterlockedCallCompletion(
  922. IN tTIMERQENTRY *pTimer,
  923. IN NTSTATUS status
  924. );
  925. NTSTATUS
  926. StartTimer(
  927. IN PVOID CompletionRoutine,
  928. IN ULONG DeltaTime,
  929. IN PVOID Context,
  930. IN PVOID Context2,
  931. IN PVOID ContextClient,
  932. IN PVOID CompletionClient,
  933. IN tDEVICECONTEXT *pDeviceContext,
  934. OUT tTIMERQENTRY **ppTimerEntry,
  935. IN USHORT Retries,
  936. BOOLEAN fLocked);
  937. NTSTATUS
  938. StopTimer(
  939. IN tTIMERQENTRY *pTimerEntry,
  940. OUT COMPLETIONCLIENT *pClient,
  941. OUT PVOID *ppContext
  942. );
  943. VOID
  944. DelayedNbtStartWakeupTimer(
  945. IN tDGRAM_SEND_TRACKING *pUnused1,
  946. IN PVOID Unused2,
  947. IN PVOID Unused3,
  948. IN tDEVICECONTEXT *Unused4
  949. );
  950. VOID
  951. DelayedNbtStopWakeupTimer(
  952. IN tDGRAM_SEND_TRACKING *pUnused1,
  953. IN PVOID pClientContext,
  954. IN PVOID Unused2,
  955. IN tDEVICECONTEXT *Unused3
  956. );
  957. //---------------------------------------------------------------------
  958. //
  959. // FROM udpsend.c
  960. //
  961. NTSTATUS
  962. UdpSendQueryNs(
  963. PCHAR pName,
  964. PCHAR pScope
  965. );
  966. NTSTATUS
  967. UdpSendQueryBcast(
  968. IN PCHAR pName,
  969. IN PCHAR pScope,
  970. IN tDGRAM_SEND_TRACKING *pSentList
  971. );
  972. NTSTATUS
  973. UdpSendRegistrationNs(
  974. PCHAR pName,
  975. PCHAR pScope
  976. );
  977. NTSTATUS
  978. UdpSendNSBcast(
  979. IN tNAMEADDR *pNameAddr,
  980. IN PCHAR pScope,
  981. IN tDGRAM_SEND_TRACKING *pSentList,
  982. IN PVOID pCompletionRoutine,
  983. IN PVOID pClientContext,
  984. IN PVOID pClientCompletion,
  985. IN ULONG Retries,
  986. IN ULONG Timeout,
  987. IN enum eNSTYPE eNsType,
  988. IN BOOL SendFlag
  989. );
  990. VOID
  991. NameDgramSendCompleted(
  992. PVOID pContext,
  993. NTSTATUS status,
  994. ULONG lInfo
  995. );
  996. NTSTATUS
  997. UdpSendResponse(
  998. IN ULONG lNameSize,
  999. IN tNAMEHDR UNALIGNED *pNameHdrIn,
  1000. IN tNAMEADDR *pNameAddr,
  1001. IN PTDI_ADDRESS_IP pDestIpAddress,
  1002. IN tDEVICECONTEXT *pDeviceContext,
  1003. IN ULONG Rcode,
  1004. IN enum eNSTYPE NsType,
  1005. IN CTELockHandle OldIrq
  1006. );
  1007. NTSTATUS
  1008. UdpSendDatagram(
  1009. IN tDGRAM_SEND_TRACKING *pDgramTracker,
  1010. IN ULONG IpAddress,
  1011. IN PVOID pCompletionRoutine,
  1012. IN PVOID CompletionContext,
  1013. IN USHORT Port,
  1014. IN ULONG Service
  1015. );
  1016. PVOID
  1017. CreatePdu(
  1018. IN PCHAR pName,
  1019. IN PCHAR pScope,
  1020. IN ULONG IpAddress,
  1021. IN USHORT NameType,
  1022. IN enum eNSTYPE eNsType,
  1023. OUT PVOID *pHdrs,
  1024. OUT PULONG pLength,
  1025. IN tDGRAM_SEND_TRACKING *pTracker
  1026. );
  1027. NTSTATUS
  1028. TcpSessionStart(
  1029. IN tDGRAM_SEND_TRACKING *pTracker,
  1030. IN ULONG IpAddress,
  1031. IN tDEVICECONTEXT *pDeviceContext,
  1032. IN PVOID pCompletionRoutine,
  1033. IN ULONG Port
  1034. );
  1035. NTSTATUS
  1036. TcpSendSessionResponse(
  1037. IN tLOWERCONNECTION *pLowerConn,
  1038. IN ULONG lStatusCode,
  1039. IN ULONG lSessionStatus
  1040. );
  1041. NTSTATUS
  1042. TcpSendSession(
  1043. IN tDGRAM_SEND_TRACKING *pTracker,
  1044. IN tLOWERCONNECTION *LowerConn,
  1045. IN PVOID pCompletionRoutine
  1046. );
  1047. NTSTATUS
  1048. SendTcpDisconnect(
  1049. IN tLOWERCONNECTION *pLowerConnId
  1050. );
  1051. NTSTATUS
  1052. TcpDisconnect(
  1053. IN tDGRAM_SEND_TRACKING *pTracker,
  1054. IN PVOID Timeout,
  1055. IN ULONG Flags,
  1056. IN BOOLEAN Wait
  1057. );
  1058. VOID
  1059. FreeTrackerOnDisconnect(
  1060. IN tDGRAM_SEND_TRACKING *pTracker
  1061. );
  1062. VOID
  1063. QueryRespDone(
  1064. IN PVOID pContext,
  1065. IN NTSTATUS status,
  1066. IN ULONG lInfo);
  1067. VOID
  1068. DisconnectDone(
  1069. IN PVOID pContext,
  1070. IN NTSTATUS status,
  1071. IN ULONG lInfo);
  1072. //---------------------------------------------------------------------
  1073. //
  1074. // FROM tdiout.c
  1075. //
  1076. NTSTATUS
  1077. TdiSendDatagram(
  1078. IN PTDI_REQUEST pRequestInfo,
  1079. IN PTDI_CONNECTION_INFORMATION pSendDgramInfo,
  1080. IN ULONG SendLength,
  1081. OUT PULONG pSentSize,
  1082. IN tDGRAM_SEND_TRACKING *pDgramTracker
  1083. );
  1084. NTSTATUS
  1085. TdiConnect(
  1086. IN PTDI_REQUEST pRequestInfo,
  1087. IN ULONG_PTR lTimeout,
  1088. IN PTDI_CONNECTION_INFORMATION pSendInfo,
  1089. OUT PVOID pIrp
  1090. );
  1091. NTSTATUS
  1092. TdiSend(
  1093. IN PTDI_REQUEST pRequestInfo,
  1094. IN USHORT sFlags,
  1095. IN ULONG SendLength,
  1096. OUT PULONG pSentSize,
  1097. IN tBUFFER *pSendBuffer,
  1098. IN ULONG Flags
  1099. );
  1100. NTSTATUS
  1101. TdiDisconnect(
  1102. IN PTDI_REQUEST pRequestInfo,
  1103. IN PVOID lTimeout,
  1104. IN ULONG Flags,
  1105. IN PTDI_CONNECTION_INFORMATION pSendInfo,
  1106. IN PCTE_IRP pClientIrp,
  1107. IN BOOLEAN Wait
  1108. );
  1109. //---------------------------------------------------------------------
  1110. //
  1111. // FROM inbound.c
  1112. //
  1113. NTSTATUS
  1114. QueryFromNet(
  1115. IN tDEVICECONTEXT *pDeviceContext,
  1116. IN PVOID pSrcAddress,
  1117. IN tNAMEHDR UNALIGNED *pNameHdr,
  1118. IN LONG lNumBytes,
  1119. IN USHORT OpCodeFlags,
  1120. IN BOOLEAN fBroadcast
  1121. );
  1122. NTSTATUS
  1123. RegResponseFromNet(
  1124. IN tDEVICECONTEXT *pDeviceContext,
  1125. IN PVOID pSrcAddress,
  1126. IN tNAMEHDR UNALIGNED *pNameHdr,
  1127. IN LONG lNumBytes,
  1128. IN USHORT OpCodeFlags
  1129. );
  1130. NTSTATUS
  1131. CheckRegistrationFromNet(
  1132. IN tDEVICECONTEXT *pDeviceContext,
  1133. IN PVOID pSrcAddress,
  1134. IN tNAMEHDR UNALIGNED *pNameHdr,
  1135. IN LONG lNumBytes
  1136. );
  1137. NTSTATUS
  1138. NameReleaseFromNet(
  1139. IN tDEVICECONTEXT *pDeviceContext,
  1140. IN PVOID pSrcAddress,
  1141. IN tNAMEHDR UNALIGNED *pNameHdr,
  1142. IN LONG lNumBytes
  1143. );
  1144. NTSTATUS
  1145. WackFromNet(
  1146. IN tDEVICECONTEXT *pDeviceContext,
  1147. IN PVOID pSrcAddress,
  1148. IN tNAMEHDR UNALIGNED *pNameHdr,
  1149. IN LONG lNumBytes
  1150. );
  1151. VOID
  1152. SetupRefreshTtl(
  1153. IN tNAMEHDR UNALIGNED *pNameHdr,
  1154. IN tNAMEADDR *pNameAddr,
  1155. IN LONG lNameSize
  1156. );
  1157. #ifdef MULTIPLE_WINS
  1158. BOOLEAN
  1159. IsNameServerForDevice(
  1160. IN ULONG SrcAddress,
  1161. IN tDEVICECONTEXT *pDevContext
  1162. );
  1163. #endif
  1164. BOOLEAN
  1165. SrcIsNameServer(
  1166. IN ULONG SrcAddress,
  1167. IN USHORT SrcPort
  1168. );
  1169. VOID
  1170. SwitchToBackup(
  1171. IN tDEVICECONTEXT *pDeviceContext
  1172. );
  1173. BOOLEAN
  1174. SrcIsUs(
  1175. IN ULONG SrcAddress
  1176. );
  1177. NTSTATUS
  1178. FindOnPendingList(
  1179. IN PUCHAR pName,
  1180. IN tNAMEHDR UNALIGNED *pNameHdr,
  1181. IN BOOLEAN DontCheckTransactionId,
  1182. IN ULONG BytesToCompare,
  1183. OUT tNAMEADDR **ppNameAddr
  1184. );
  1185. //---------------------------------------------------------------------
  1186. //
  1187. // FROM init.c
  1188. //
  1189. NTSTATUS
  1190. InitNotOs(
  1191. void
  1192. ) ;
  1193. NTSTATUS
  1194. InitTimersNotOs(
  1195. void
  1196. );
  1197. NTSTATUS
  1198. StopInitTimers(
  1199. void
  1200. );
  1201. VOID
  1202. ReadParameters(
  1203. IN tNBTCONFIG *pConfig,
  1204. IN HANDLE ParmHandle
  1205. );
  1206. VOID
  1207. ReadParameters2(
  1208. IN tNBTCONFIG *pConfig,
  1209. IN HANDLE ParmHandle
  1210. );
  1211. //---------------------------------------------------------------------
  1212. //
  1213. // FROM parse.c
  1214. //
  1215. unsigned long
  1216. LmGetIpAddr (
  1217. IN PUCHAR path,
  1218. IN PUCHAR target,
  1219. IN CHAR RecurseDepth,
  1220. OUT BOOLEAN *bFindName
  1221. );
  1222. VOID
  1223. RemovePreloads (
  1224. );
  1225. VOID
  1226. SetNameState(
  1227. IN tNAMEADDR *pNameAddr,
  1228. IN PULONG pIpList,
  1229. IN BOOLEAN IpAddrResolved
  1230. );
  1231. LONG
  1232. PrimeCache(
  1233. IN PUCHAR path,
  1234. IN PUCHAR ignored,
  1235. IN CHAR RecurseDepth,
  1236. OUT BOOLEAN *ignored2
  1237. );
  1238. NTSTATUS
  1239. NtProcessLmHSvcIrp(
  1240. IN tDEVICECONTEXT *pDeviceContext,
  1241. IN PVOID *pBuffer,
  1242. IN LONG Size,
  1243. IN PCTE_IRP pIrp,
  1244. IN enum eNbtLmhRequestType RequestType
  1245. );
  1246. VOID
  1247. NbtCompleteLmhSvcRequest(
  1248. IN NBT_WORK_ITEM_CONTEXT *Context,
  1249. IN ULONG *IpList,
  1250. IN enum eNbtLmhRequestType RequestType,
  1251. IN ULONG lNameLength,
  1252. IN PWSTR pwsName,
  1253. IN BOOLEAN IpAddrResolved
  1254. );
  1255. NTSTATUS
  1256. NbtProcessLmhSvcRequest(
  1257. IN NBT_WORK_ITEM_CONTEXT *Context,
  1258. IN enum eNbtLmhRequestType RequestType
  1259. );
  1260. VOID
  1261. StartLmHostTimer(
  1262. NBT_WORK_ITEM_CONTEXT *pContext,
  1263. IN BOOLEAN fLockedOnEntry
  1264. );
  1265. NTSTATUS
  1266. LmHostQueueRequest(
  1267. IN tDGRAM_SEND_TRACKING *pTracker,
  1268. IN PVOID pClientContext,
  1269. IN PVOID ClientCompletion,
  1270. IN PVOID pDeviceContext
  1271. );
  1272. VOID
  1273. TimeoutLmHRequests(
  1274. IN tTIMERQENTRY *pTimerQEntry,
  1275. IN tDEVICECONTEXT *pDeviceContext,
  1276. IN BOOLEAN fLocked,
  1277. IN CTELockHandle *pJointLockOldIrq
  1278. );
  1279. tNAMEADDR *
  1280. FindInDomainList (
  1281. IN PUCHAR pName,
  1282. IN PLIST_ENTRY pDomainHead
  1283. );
  1284. //---------------------------------------------------------------------
  1285. //
  1286. // Delayed (Non-Dpc) Worker routines:
  1287. //
  1288. typedef
  1289. VOID
  1290. (*PNBT_WORKER_THREAD_ROUTINE)(
  1291. tDGRAM_SEND_TRACKING *pTracker,
  1292. PVOID pClientContext,
  1293. PVOID ClientCompletion,
  1294. tDEVICECONTEXT *pDeviceContext
  1295. );
  1296. //
  1297. // In nbt\hndlrs.c
  1298. //
  1299. VOID
  1300. DelayedAllocLowerConn(
  1301. IN tDGRAM_SEND_TRACKING *pTracker,
  1302. IN PVOID pClientContext,
  1303. IN PVOID ClientCompletion,
  1304. IN tDEVICECONTEXT *pDeviceContext
  1305. );
  1306. VOID
  1307. DelayedAllocLowerConnSpecial(
  1308. IN tDGRAM_SEND_TRACKING *pTracker,
  1309. IN PVOID pClientContext,
  1310. IN PVOID ClientCompletion,
  1311. IN tDEVICECONTEXT *pDeviceContext
  1312. );
  1313. VOID
  1314. DelayedCleanupAfterDisconnect(
  1315. IN tDGRAM_SEND_TRACKING *pTracker,
  1316. IN PVOID pClientContext,
  1317. IN PVOID ClientCompletion,
  1318. IN tDEVICECONTEXT *pDeviceContext
  1319. );
  1320. //
  1321. // In nbt\Inbound.c
  1322. //
  1323. VOID
  1324. ExtractServerNameCompletion(
  1325. IN tDGRAM_SEND_TRACKING *pClientTracker,
  1326. IN NTSTATUS status
  1327. );
  1328. VOID
  1329. CopyNodeStatusResponseCompletion(
  1330. IN tDGRAM_SEND_TRACKING *pTracker,
  1331. IN NTSTATUS status
  1332. );
  1333. //
  1334. // In nbt\Name.c
  1335. //
  1336. VOID
  1337. DelayedReConnect(
  1338. IN tDGRAM_SEND_TRACKING *pTracker,
  1339. IN PVOID pClientContext,
  1340. IN PVOID ClientCompletion,
  1341. IN tDEVICECONTEXT *pDeviceContext
  1342. );
  1343. VOID
  1344. DelayedSendDgramDist (
  1345. IN tDGRAM_SEND_TRACKING *pTracker,
  1346. IN PVOID pClientContext,
  1347. IN PVOID Unused1,
  1348. IN tDEVICECONTEXT *Unused2
  1349. );
  1350. VOID
  1351. DelayedWipeOutLowerconn(
  1352. IN tDGRAM_SEND_TRACKING *pTracker,
  1353. IN PVOID pClientContext,
  1354. IN PVOID ClientCompletion,
  1355. IN tDEVICECONTEXT *pDeviceContext
  1356. );
  1357. //
  1358. // In nbt\NameSrv.c
  1359. //
  1360. VOID
  1361. DelayedNextRefresh(
  1362. IN tDGRAM_SEND_TRACKING *pTracker,
  1363. IN PVOID pClientContext,
  1364. IN PVOID ClientCompletion,
  1365. IN tDEVICECONTEXT *pDeviceContext
  1366. );
  1367. VOID
  1368. DelayedRefreshBegin(
  1369. IN tDGRAM_SEND_TRACKING *pTracker,
  1370. IN PVOID pClientContext,
  1371. IN PVOID ClientCompletion,
  1372. IN tDEVICECONTEXT *pDeviceContext
  1373. );
  1374. VOID
  1375. DelayedSessionKeepAlive(
  1376. IN tDGRAM_SEND_TRACKING *pTracker,
  1377. IN PVOID pClientContext,
  1378. IN PVOID ClientCompletion,
  1379. IN tDEVICECONTEXT *pDeviceContext
  1380. );
  1381. //
  1382. // In nbt\NbtUtils.c
  1383. //
  1384. VOID
  1385. DelayedFreeAddrObj(
  1386. IN tDGRAM_SEND_TRACKING *pTracker,
  1387. IN PVOID pClientContext,
  1388. IN PVOID ClientCompletion,
  1389. IN tDEVICECONTEXT *pDeviceContext
  1390. );
  1391. //
  1392. // In nbt\parse.c
  1393. //
  1394. VOID
  1395. DelayedScanLmHostFile (
  1396. IN tDGRAM_SEND_TRACKING *pTracker,
  1397. IN PVOID pClientContext,
  1398. IN PVOID ClientCompletion,
  1399. IN tDEVICECONTEXT *pDeviceContext
  1400. );
  1401. #ifndef VXD
  1402. //
  1403. // In nt\NtIsol.c
  1404. //
  1405. NTSTATUS
  1406. DelayedNbtProcessConnect(
  1407. IN tDGRAM_SEND_TRACKING *pTracker,
  1408. IN PVOID pClientContext,
  1409. IN PVOID ClientCompletion,
  1410. IN tDEVICECONTEXT *pDeviceContext
  1411. );
  1412. //
  1413. // In nt\NtUtil.c
  1414. //
  1415. VOID
  1416. DelayedNbtDeleteDevice(
  1417. IN tDGRAM_SEND_TRACKING *pTracker,
  1418. IN PVOID pClientContext,
  1419. IN PVOID ClientCompletion,
  1420. IN tDEVICECONTEXT *pDeviceContext
  1421. );
  1422. #endif // !VXD
  1423. #define MIN(x,y) (((x) < (y)) ? (x) : (y))
  1424. #define MAX(x,y) (((x) > (y)) ? (x) : (y))
  1425. int check_unicode_string(IN PUNICODE_STRING str);
  1426. NTSTATUS
  1427. PickBestAddress(
  1428. IN tNAMEADDR *pNameAddr,
  1429. IN tDEVICECONTEXT *pDeviceContext,
  1430. OUT tIPADDRESS *pIpAddress
  1431. );
  1432. #endif // _NBTPROCS_H_