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.

1183 lines
22 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. vwinapi.c
  5. Abstract:
  6. ntVdm netWare (Vw) IPX/SPX Functions
  7. Contains handlers for WOW IPX/SPX calls (netware functions). The IPX/SPX
  8. APIs use WinSock to perform the actual operations
  9. Contents:
  10. VWinIPXCancelEvent
  11. VWinIPXCloseSocket
  12. VWinIPXDisconnectFromTarget
  13. VWinIPXGetInternetworkAddress
  14. VWinIPXGetIntervalMarker
  15. VWinIPXGetLocalTarget
  16. VWinIPXGetLocalTargetAsync
  17. VWinIPXGetMaxPacketSize
  18. VWinIPXInitialize
  19. VWinIPXListenForPacket
  20. VWinIPXOpenSocket
  21. VWinIPXRelinquishControl
  22. VWinIPXScheduleIPXEvent
  23. VWinIPXSendPacket
  24. VWinIPXSPXDeinit
  25. VWinSPXAbortConnection
  26. VWinSPXEstablishConnection
  27. VWinSPXGetConnectionStatus
  28. VWinSPXInitialize
  29. VWinSPXListenForConnection
  30. VWinSPXListenForSequencedPacket
  31. VWinSPXSendSequencedPacket
  32. VWinSPXTerminateConnection
  33. Author:
  34. Yi-Hsin Sung ( yihsins ) 28-Oct-1993
  35. Environment:
  36. User-mode Win32
  37. Revision History:
  38. 28-Oct-1993 yihsins
  39. Created
  40. --*/
  41. #include "vw.h"
  42. #pragma hdrstop
  43. //
  44. // functions
  45. //
  46. WORD
  47. VWinIPXCancelEvent(
  48. IN DWORD IPXTaskID,
  49. IN LPECB pEcb
  50. )
  51. /*++
  52. Routine Description:
  53. Cancels event described by an ECB
  54. This call is Synchronous
  55. Arguments:
  56. Inputs
  57. IPXTaskID
  58. pECB
  59. Return Value:
  60. 00h Success
  61. F9h Can't cancel ECB
  62. FFh ECB not in use
  63. --*/
  64. {
  65. IPXDBGPRINT((__FILE__, __LINE__,
  66. FUNCTION_IPXCancelEvent,
  67. IPXDBG_LEVEL_INFO,
  68. "VWinIPXCancelEvent\n"
  69. ));
  70. // ignore IPXTaskID for now
  71. UNREFERENCED_PARAMETER( IPXTaskID );
  72. return _VwIPXCancelEvent( pEcb );
  73. }
  74. VOID
  75. VWinIPXCloseSocket(
  76. IN DWORD IPXTaskID,
  77. IN WORD socketNumber
  78. )
  79. /*++
  80. Routine Description:
  81. Closes a socket and cancels any outstanding events on the socket.
  82. Closing an unopened socket does not return an error
  83. ESRs in cancelled ECBs are not called
  84. This call is Synchronous
  85. Arguments:
  86. Inputs
  87. IPXTaskID
  88. socketNumber
  89. Return Value:
  90. None.
  91. --*/
  92. {
  93. IPXDBGPRINT((__FILE__, __LINE__,
  94. FUNCTION_IPXCloseSocket,
  95. IPXDBG_LEVEL_INFO,
  96. "VWinIPXCloseSocket(%#x)\n",
  97. B2LW(socketNumber)
  98. ));
  99. // ignore IPXTaskID for now
  100. UNREFERENCED_PARAMETER( IPXTaskID );
  101. _VwIPXCloseSocket( socketNumber );
  102. }
  103. VOID
  104. VWinIPXDisconnectFromTarget(
  105. IN DWORD IPXTaskID,
  106. IN LPBYTE pNetworkAddress
  107. )
  108. /*++
  109. Routine Description:
  110. Performs no action for NTVDM IPX
  111. This call is Synchronous
  112. Arguments:
  113. Inputs
  114. IPXTaskID
  115. pNetworkAddress
  116. Outputs
  117. Nothing
  118. Return Value:
  119. None.
  120. --*/
  121. {
  122. IPXDBGPRINT((__FILE__, __LINE__,
  123. FUNCTION_IPXDisconnectFromTarget,
  124. IPXDBG_LEVEL_INFO,
  125. "VWinIPXDisconnectFromTarget\n"
  126. ));
  127. }
  128. VOID
  129. VWinIPXGetInternetworkAddress(
  130. IN DWORD IPXTaskID,
  131. OUT LPINTERNET_ADDRESS pNetworkAddress
  132. )
  133. /*++
  134. Routine Description:
  135. Returns a buffer containing the net number and node number for this
  136. station.
  137. This function cannot return an error (!)
  138. Assumes: 1. GetInternetAddress has been successfully called in the
  139. DLL initialization phase
  140. This call is Synchronous
  141. Arguments:
  142. Inputs
  143. IPXTaskID
  144. Outputs
  145. pNetworkAddress
  146. Return Value:
  147. None.
  148. --*/
  149. {
  150. IPXDBGPRINT((__FILE__, __LINE__,
  151. FUNCTION_IPXGetInternetworkAddress,
  152. IPXDBG_LEVEL_INFO,
  153. "VWinIPXGetInternetworkAddress\n"
  154. ));
  155. // ignore IPXTaskID for now
  156. UNREFERENCED_PARAMETER( IPXTaskID );
  157. _VwIPXGetInternetworkAddress( pNetworkAddress );
  158. }
  159. WORD
  160. VWinIPXGetIntervalMarker(
  161. IN DWORD IPXTaskID
  162. )
  163. /*++
  164. Routine Description:
  165. Just returns the tick count maintained by Asynchronous Event Scheduler
  166. This call is Synchronous
  167. Arguments:
  168. Inputs
  169. IPXTaskID
  170. Outputs
  171. Return Value:
  172. The tick count.
  173. --*/
  174. {
  175. WORD intervalMarker = _VwIPXGetIntervalMarker();
  176. IPXDBGPRINT((__FILE__, __LINE__,
  177. FUNCTION_IPXGetIntervalMarker,
  178. IPXDBG_LEVEL_INFO,
  179. "VWinIPXGetIntervalMarker: Returning %04x\n",
  180. intervalMarker
  181. ));
  182. // ignore IPXTaskID for now
  183. UNREFERENCED_PARAMETER( IPXTaskID );
  184. return intervalMarker;
  185. }
  186. WORD
  187. VWinIPXGetLocalTarget(
  188. IN DWORD IPXTaskID,
  189. IN LPBYTE pNetworkAddress,
  190. OUT LPBYTE pImmediateAddress,
  191. OUT ULPWORD pTransportTime
  192. )
  193. /*++
  194. Routine Description:
  195. Given a target address of the form (network address {4}, node address {6}),
  196. returns the node address of the target if on the same network, or the node
  197. address of the router which knows how to get to the next hop in reaching the
  198. eventual target
  199. This call is Synchronous
  200. Arguments:
  201. Inputs
  202. IPXTaskID
  203. pNetworkAddress
  204. Outputs
  205. pImmediateAddress
  206. pTransportTime
  207. Return Value:
  208. 00h Success
  209. F1h Ipx/Spx Not Initialized
  210. FAh No path to destination node found
  211. --*/
  212. {
  213. IPXDBGPRINT((__FILE__, __LINE__,
  214. FUNCTION_IPXGetLocalTarget,
  215. IPXDBG_LEVEL_INFO,
  216. "VWinIPXGetLocalTarget\n"
  217. ));
  218. // ignore IPXTaskID for now
  219. UNREFERENCED_PARAMETER( IPXTaskID );
  220. return _VwIPXGetLocalTarget( pNetworkAddress,
  221. pImmediateAddress,
  222. pTransportTime );
  223. }
  224. WORD
  225. VWinIPXGetLocalTargetAsync(
  226. IN LPBYTE pSendAGLT,
  227. OUT LPBYTE pListenAGLT,
  228. IN WORD windowsHandle
  229. )
  230. /*++
  231. Routine Description:
  232. description-of-function.
  233. This call is Asynchronous
  234. Arguments:
  235. pSendAGLT
  236. pListenAGLT
  237. windowsHandle
  238. Return Value:
  239. 00h Success
  240. F1h Ipx/Spx Not Initialized
  241. FAh No Local Target Identified
  242. --*/
  243. {
  244. IPXDBGPRINT((__FILE__, __LINE__,
  245. FUNCTION_ANY,
  246. IPXDBG_LEVEL_INFO,
  247. "VWinIPXGetLocalTargetAsync\n"
  248. ));
  249. return IPX_SUCCESS; // return success for now
  250. }
  251. WORD
  252. VWinIPXGetMaxPacketSize(
  253. VOID
  254. )
  255. /*++
  256. Routine Description:
  257. Returns the maximum packet size the underlying network can handle
  258. Assumes: 1. A successfull call to GetMaxPacketSize has been made during
  259. DLL initialization
  260. 2. Maximum packet size is constant
  261. This call is Synchronous
  262. Arguments:
  263. Inputs
  264. None.
  265. Return Value:
  266. The max packet size.
  267. --*/
  268. {
  269. //
  270. // this is a WORD function in DOS and Windows: always return MaxPacketSize
  271. // in AX
  272. //
  273. WORD maxPacketSize = _VwIPXGetMaxPacketSize( NULL );
  274. IPXDBGPRINT((__FILE__, __LINE__,
  275. FUNCTION_IPXGetMaxPacketSize,
  276. IPXDBG_LEVEL_INFO,
  277. "VWinIPXGetMaxPacketSize: PacketSize=%d\n",
  278. maxPacketSize
  279. ));
  280. return maxPacketSize;
  281. }
  282. WORD
  283. VWinIPXInitialize(
  284. IN OUT ULPDWORD pIPXTaskID,
  285. IN WORD maxECBs,
  286. IN WORD maxPacketSize
  287. )
  288. /*++
  289. Routine Description:
  290. Get the entry address for the IPX Interface.
  291. Arguments:
  292. Inputs
  293. maxECBs
  294. maxPacketSize
  295. Output
  296. pIPXTaskID
  297. Return Value:
  298. 00h Success
  299. F0h Ipx NotInstalled
  300. F1h Ipx/Spx Not Initialized
  301. F2h No Dos Memory
  302. F3h No Free Ecb
  303. F4h Lock Failed
  304. F5h Over the maximum limit
  305. F6h Ipx/Spx Previously Initialized
  306. --*/
  307. {
  308. IPXDBGPRINT((__FILE__, __LINE__,
  309. FUNCTION_ANY,
  310. IPXDBG_LEVEL_INFO,
  311. "VWinIPXInitialize (MaxECBs=%04x, MaxPacketSize=%04x)\n",
  312. maxECBs,
  313. maxPacketSize
  314. ));
  315. UNREFERENCED_PARAMETER( maxECBs ); // ignore for now
  316. UNREFERENCED_PARAMETER( maxPacketSize ); // ignore for now
  317. return IPX_SUCCESS;
  318. }
  319. VOID
  320. VWinIPXListenForPacket(
  321. IN DWORD IPXTaskID,
  322. IN LPECB pEcb,
  323. IN ECB_ADDRESS EcbAddress
  324. )
  325. /*++
  326. Routine Description:
  327. Queue a listen request against a socket. All listen requests will be
  328. completed asynchronously, unless cancelled by app
  329. This call is Asynchronous
  330. Arguments:
  331. Inputs
  332. IPXTaskID
  333. pEcb
  334. EcbAddress
  335. Return Value:
  336. None.
  337. --*/
  338. {
  339. IPXDBGPRINT((__FILE__, __LINE__,
  340. FUNCTION_IPXListenForPacket,
  341. IPXDBG_LEVEL_INFO,
  342. "VWinIPXListenForPacket(%04x:%04x)\n",
  343. HIWORD(EcbAddress),
  344. LOWORD(EcbAddress)
  345. ));
  346. // ignore IPXTaskID for now
  347. UNREFERENCED_PARAMETER( IPXTaskID );
  348. (VOID) _VwIPXListenForPacket( pEcb, EcbAddress );
  349. }
  350. WORD
  351. VWinIPXOpenSocket(
  352. IN DWORD IPXTaskID,
  353. IN OUT ULPWORD pSocketNumber,
  354. IN BYTE socketType
  355. )
  356. /*++
  357. Routine Description:
  358. Opens a socket for use by IPX or SPX.Puts the socket into non-blocking mode.
  359. The socket will be bound to IPX.
  360. This call is Synchronous
  361. Arguments:
  362. Inputs
  363. IPXTaskID
  364. *pSocketNumber
  365. socketType - Socket Longevity flag
  366. Outputs
  367. pSocketNumber - Assigned socket number
  368. Return Value:
  369. 00h Success
  370. F0h Ipx Not Installed
  371. F1h Ipx/Spx Not Initialized
  372. FEh Socket table full
  373. FFh Socket already open
  374. --*/
  375. {
  376. IPXDBGPRINT((__FILE__, __LINE__,
  377. FUNCTION_IPXOpenSocket,
  378. IPXDBG_LEVEL_INFO,
  379. "VwIPXOpenSocket(Life=%02x, Socket=%04x)\n",
  380. socketType,
  381. B2LW(*pSocketNumber)
  382. ));
  383. // ignore IPXTaskID for now
  384. UNREFERENCED_PARAMETER( IPXTaskID );
  385. return _VwIPXOpenSocket( pSocketNumber,
  386. socketType,
  387. 0 );
  388. }
  389. VOID
  390. VWinIPXRelinquishControl(
  391. VOID
  392. )
  393. /*++
  394. Routine Description:
  395. Just sleep for a nominal amount. Netware seems to be dependent on the
  396. default setting of the PC clock, so one timer tick (1/18 second) would
  397. seem to be a good value
  398. This call is Synchronous
  399. Arguments:
  400. None.
  401. Return Value:
  402. None.
  403. --*/
  404. {
  405. IPXDBGPRINT((__FILE__, __LINE__,
  406. FUNCTION_IPXRelinquishControl,
  407. IPXDBG_LEVEL_INFO,
  408. "VWinIPXRelinquishControl\n"
  409. ));
  410. _VwIPXRelinquishControl();
  411. }
  412. VOID
  413. VWinIPXScheduleIPXEvent(
  414. IN DWORD IPXTaskID,
  415. IN WORD time,
  416. IN LPECB pEcb,
  417. IN ECB_ADDRESS EcbAddress
  418. )
  419. /*++
  420. Routine Description:
  421. Schedules a an event to occur in some number of ticks. When the tick count
  422. reaches 0, the ECB InUse field is cleared and any ESR called
  423. This call is Asynchronous
  424. Arguments:
  425. Inputs
  426. IPXTaskID
  427. time
  428. pEcb
  429. EcbAddress
  430. Outputs
  431. Nothing
  432. Return Value:
  433. None.
  434. --*/
  435. {
  436. IPXDBGPRINT((__FILE__, __LINE__,
  437. FUNCTION_IPXScheduleIPXEvent,
  438. IPXDBG_LEVEL_INFO,
  439. "VWinIPXScheduleIPXEvent(%04x:%04x, Time:%04x)\n",
  440. HIWORD( EcbAddress ),
  441. LOWORD( EcbAddress ),
  442. time
  443. ));
  444. // ignore IPXTaskID for now
  445. UNREFERENCED_PARAMETER( IPXTaskID );
  446. _VwIPXScheduleIPXEvent( time, pEcb, EcbAddress );
  447. }
  448. VOID
  449. VWinIPXSendPacket(
  450. IN DWORD IPXTaskID,
  451. IN LPECB pEcb,
  452. IN ECB_ADDRESS EcbAddress
  453. )
  454. /*++
  455. Routine Description:
  456. Sends a packet to the target machine/router. This call can be made on a
  457. socket that is not open
  458. The app must have filled in the following IPX_ECB fields:
  459. EsrAddress
  460. Socket
  461. ImmediateAddress
  462. FragmentCount
  463. fragment descriptor fields
  464. and the following IPX_PACKET fields:
  465. PacketType
  466. Destination.Net
  467. Destination.Node
  468. Destination.Socket
  469. This call is Asynchronous
  470. Arguments:
  471. Inputs
  472. IPXTaskID
  473. pEcb
  474. EcbAddress
  475. Return Value:
  476. None.
  477. --*/
  478. {
  479. IPXDBGPRINT((__FILE__, __LINE__,
  480. FUNCTION_IPXSendPacket,
  481. IPXDBG_LEVEL_INFO,
  482. "VWinIPXSendPacket(%04x:%04x)\n",
  483. HIWORD( EcbAddress ),
  484. LOWORD( EcbAddress )
  485. ));
  486. // ignore IPXTaskID for now
  487. UNREFERENCED_PARAMETER( IPXTaskID );
  488. _VwIPXSendPacket( pEcb, EcbAddress, 0);
  489. }
  490. WORD
  491. VWinIPXSPXDeinit(
  492. IN DWORD IPXTaskID
  493. )
  494. /*++
  495. Routine Description:
  496. Release any resources allocated to an application by NWIPXSPX.DLL
  497. for use by other applications.
  498. This call is Synchronous
  499. Arguments:
  500. None.
  501. Return Value:
  502. 00h Successful
  503. F1h IPX/SPX Not Initialized
  504. --*/
  505. {
  506. IPXDBGPRINT((__FILE__, __LINE__,
  507. FUNCTION_ANY,
  508. IPXDBG_LEVEL_INFO,
  509. "VwIPXSPXDeinit\n"
  510. ));
  511. // ignore IPXTaskID for now
  512. UNREFERENCED_PARAMETER( IPXTaskID );
  513. return IPX_SUCCESS;
  514. }
  515. VOID
  516. VWinSPXAbortConnection(
  517. IN WORD SPXConnectionID
  518. )
  519. /*++
  520. Routine Description:
  521. Abort an SPX connection.
  522. This call is Synchronous
  523. Arguments:
  524. SPXConnectionID
  525. Return Value:
  526. None.
  527. --*/
  528. {
  529. IPXDBGPRINT((__FILE__, __LINE__,
  530. FUNCTION_SPXAbortConnection,
  531. IPXDBG_LEVEL_INFO,
  532. "VWinSPXAbortConnection(%04x)\n",
  533. SPXConnectionID
  534. ));
  535. _VwSPXAbortConnection(SPXConnectionID);
  536. }
  537. WORD
  538. VWinSPXEstablishConnection(
  539. IN DWORD IPXTaskID,
  540. IN BYTE retryCount,
  541. IN BYTE watchDog,
  542. OUT ULPWORD pSPXConnectionID,
  543. IN LPECB pEcb,
  544. IN ECB_ADDRESS EcbAddress
  545. )
  546. /*++
  547. Routine Description:
  548. Establish a connection with a listening socket.
  549. This call is Synchronous
  550. Arguments:
  551. Inputs
  552. IPXTaskID
  553. retryCount
  554. watchDog
  555. pEcb
  556. EcbAddress
  557. Outputs
  558. pSPXConnectionID
  559. pEcb
  560. Return Value:
  561. 00h Success
  562. EFh Connection Table Full
  563. F1h IPX/SPX Not Initialized
  564. FDh Malformed Packet
  565. FFh Socket Not Opened
  566. --*/
  567. {
  568. IPXDBGPRINT((__FILE__, __LINE__,
  569. FUNCTION_SPXEstablishConnection,
  570. IPXDBG_LEVEL_INFO,
  571. "VWinSPXEstablishConnection(%02x, %02x, %04x:%04x)\n",
  572. retryCount,
  573. watchDog,
  574. HIWORD(EcbAddress),
  575. LOWORD(EcbAddress)
  576. ));
  577. // ignore IPXTaskID for now
  578. UNREFERENCED_PARAMETER( IPXTaskID );
  579. return _VwSPXEstablishConnection( retryCount,
  580. watchDog,
  581. pSPXConnectionID,
  582. pEcb,
  583. EcbAddress );
  584. }
  585. WORD
  586. VWinSPXGetConnectionStatus(
  587. IN DWORD IPXTaskID,
  588. IN WORD SPXConnectionID,
  589. IN LPSPX_CONNECTION_STATS pConnectionStats
  590. )
  591. /*++
  592. Routine Description:
  593. Return the status of an SPX connection.
  594. This call is Synchronous
  595. Arguments:
  596. Inputs
  597. IPXTaskID
  598. SPXConnectionID
  599. Outputs
  600. pConnectionStats
  601. Return Value:
  602. 00h Success
  603. EEh Invalid Connection
  604. F1h IPX/SPX Not Initialized
  605. --*/
  606. {
  607. IPXDBGPRINT((__FILE__, __LINE__,
  608. FUNCTION_SPXGetConnectionStatus,
  609. IPXDBG_LEVEL_INFO,
  610. "VWinSPXGetConnectionStatus\n"
  611. ));
  612. // ignore IPXTaskID for now
  613. UNREFERENCED_PARAMETER( IPXTaskID );
  614. return _VwSPXGetConnectionStatus( SPXConnectionID,
  615. pConnectionStats );
  616. }
  617. WORD
  618. VWinSPXInitialize(
  619. IN OUT ULPDWORD pIPXTaskID,
  620. IN WORD maxECBs,
  621. IN WORD maxPacketSize,
  622. OUT LPBYTE pMajorRevisionNumber,
  623. OUT LPBYTE pMinorRevisionNumber,
  624. OUT ULPWORD pMaxConnections,
  625. OUT ULPWORD pAvailableConnections
  626. )
  627. /*++
  628. Routine Description:
  629. Informs the app that SPX is present on this station
  630. This call is Synchronous
  631. Arguments:
  632. pIPXTaskID - on input, specifies how resources will be
  633. allocated:
  634. 0x00000000 - directly to calling application
  635. 0xFFFFFFFE - directly to calling application,
  636. but multiple initializations are
  637. allowed
  638. 0xFFFFFFFF - resources allocated in a pool for
  639. multiple applications
  640. maxECBs - maximum number of outstanding ECBs
  641. maxPacketSize - maximum packet size to be sent by the app
  642. pMajorRevisionNumber - returned SPX major version #
  643. pMinorRevisionNumber - returned SPX minor version #
  644. pMaxConnections - maximum connections supported by this SPX version
  645. pAvailableConnections - number of connections available to this app
  646. Return Value:
  647. WORD
  648. 0x0000 SPX not installed
  649. 0x00F1 IPX/SPX not installed
  650. 0x00F2 no DOS memory
  651. 0x00F3 no free ECBs
  652. 0x00F4 lock failed
  653. 0x00F5 exceeded maximum limit
  654. 0x00F6 IPX/SPX already initialized
  655. 0x00FF SPX installed
  656. --*/
  657. {
  658. IPXDBGPRINT((__FILE__, __LINE__,
  659. FUNCTION_SPXInitialize,
  660. IPXDBG_LEVEL_INFO,
  661. "VWinSPXInitialize\n"
  662. ));
  663. UNREFERENCED_PARAMETER( maxECBs ); // ignore for now
  664. UNREFERENCED_PARAMETER( maxPacketSize ); // ignore for now
  665. //
  666. // do the same thing as 16-bit windows and return the task ID unchanged
  667. //
  668. // *pIPXTaskID = 0;
  669. return _VwSPXInitialize( pMajorRevisionNumber,
  670. pMinorRevisionNumber,
  671. pMaxConnections,
  672. pAvailableConnections );
  673. }
  674. VOID
  675. VWinSPXListenForConnection(
  676. IN DWORD IPXTaskID,
  677. IN BYTE retryCount,
  678. IN BYTE watchDog,
  679. IN LPECB pEcb,
  680. IN ECB_ADDRESS EcbAddress
  681. )
  682. /*++
  683. Routine Description:
  684. Listens for an incoming connection request
  685. This call is Asynchronous
  686. Arguments:
  687. Inputs
  688. IPXTaskID
  689. retryCount
  690. watchDogFlag
  691. pEcb
  692. EcbAddress
  693. Outputs
  694. Nothing
  695. Return Value:
  696. None.
  697. --*/
  698. {
  699. IPXDBGPRINT((__FILE__, __LINE__,
  700. FUNCTION_SPXListenForConnection,
  701. IPXDBG_LEVEL_INFO,
  702. "VWinSPXListenForConnection(%02x, %02x, %04x:%04x)\n",
  703. retryCount,
  704. watchDog,
  705. HIWORD(EcbAddress),
  706. LOWORD(EcbAddress)
  707. ));
  708. // ignore IPXTaskID for now
  709. UNREFERENCED_PARAMETER( IPXTaskID );
  710. _VwSPXListenForConnection( retryCount,
  711. watchDog,
  712. pEcb,
  713. EcbAddress );
  714. }
  715. VOID
  716. VWinSPXListenForSequencedPacket(
  717. IN DWORD IPXTaskID,
  718. IN LPECB pEcb,
  719. IN ECB_ADDRESS EcbAddress
  720. )
  721. /*++
  722. Routine Description:
  723. Attempts to receive an SPX packet.
  724. This call is Asynchronous
  725. Arguments:
  726. Inputs
  727. IPXTaskID
  728. pEcb
  729. EcbAddress
  730. Outputs
  731. Nothing
  732. Return Value:
  733. None.
  734. --*/
  735. {
  736. IPXDBGPRINT((__FILE__, __LINE__,
  737. FUNCTION_SPXListenForSequencedPacket,
  738. IPXDBG_LEVEL_INFO,
  739. "VWinSPXListenForSequencedPacket(%04x:%04x)\n",
  740. HIWORD(EcbAddress),
  741. LOWORD(EcbAddress)
  742. ));
  743. // ignore IPXTaskID for now
  744. UNREFERENCED_PARAMETER( IPXTaskID );
  745. _VwSPXListenForSequencedPacket( pEcb,
  746. EcbAddress );
  747. }
  748. VOID
  749. VWinSPXSendSequencedPacket(
  750. IN DWORD IPXTaskID,
  751. IN WORD SPXConnectionID,
  752. IN LPECB pEcb,
  753. IN ECB_ADDRESS EcbAddress
  754. )
  755. /*++
  756. Routine Description:
  757. Sends a packet on an SPX connection
  758. This call is Asynchronous
  759. Arguments:
  760. Inputs
  761. IPXTaskID
  762. SPXConnectionID
  763. pEcb
  764. EcbAddress
  765. Outputs
  766. Nothing
  767. Return Value:
  768. None.
  769. --*/
  770. {
  771. IPXDBGPRINT((__FILE__, __LINE__,
  772. FUNCTION_SPXSendSequencedPacket,
  773. IPXDBG_LEVEL_INFO,
  774. "VWinSPXSendSequencedPacket(%04x, %04x:%04x)\n",
  775. SPXConnectionID,
  776. HIWORD(EcbAddress),
  777. LOWORD(EcbAddress)
  778. ));
  779. // ignore IPXTaskID for now
  780. UNREFERENCED_PARAMETER( IPXTaskID );
  781. _VwSPXSendSequencedPacket( SPXConnectionID,
  782. pEcb,
  783. EcbAddress );
  784. }
  785. VOID
  786. VWinSPXTerminateConnection(
  787. IN DWORD IPXTaskID,
  788. IN WORD SPXConnectionID,
  789. IN LPECB pEcb,
  790. IN ECB_ADDRESS EcbAddress
  791. )
  792. /*++
  793. Routine Description:
  794. Terminate an SPX connection by passing a connection ID and an
  795. ECB address to SPX. Then return control to the calling application.
  796. This call is Asynchronous
  797. Arguments:
  798. Inputs
  799. IPXTaskID
  800. SPXConnectionID
  801. pEcb
  802. EcbAddress
  803. Outputs
  804. Nothing
  805. Return Value:
  806. None.
  807. --*/
  808. {
  809. IPXDBGPRINT((__FILE__, __LINE__,
  810. FUNCTION_SPXTerminateConnection,
  811. IPXDBG_LEVEL_INFO,
  812. "VWinSPXTerminateConnection(%04x, %04x:%04x)\n",
  813. SPXConnectionID,
  814. HIWORD(EcbAddress),
  815. LOWORD(EcbAddress)
  816. ));
  817. // ignore IPXTaskID for now
  818. UNREFERENCED_PARAMETER( IPXTaskID );
  819. _VwSPXTerminateConnection(SPXConnectionID, pEcb, EcbAddress);
  820. }