SPX.H 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
  3. SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
  4. END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
  5. ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
  6. IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
  7. SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
  8. FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
  9. CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
  10. AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
  11. COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
  12. */
  13. /*
  14. * $Source: f:/miner/source/main/rcs/ipx.h $
  15. * $Revision: 1.3 $
  16. * $Author: john $
  17. * $Date: 1994/07/25 12:33:22 $
  18. *
  19. * Prototype for IPX communications.
  20. *
  21. * $Log: ipx.h $
  22. * Revision 1.3 1994/07/25 12:33:22 john
  23. * Network "pinging" in.
  24. *
  25. * Revision 1.2 1994/07/20 15:58:29 john
  26. * First installment of ipx stuff.
  27. *
  28. * Revision 1.1 1994/07/19 15:43:05 john
  29. * Initial revision
  30. *
  31. *
  32. */
  33. #ifndef _IPX_H
  34. #define _IPX_H
  35. // The default socket to use.
  36. #define IPX_DEFAULT_SOCKET 0x869d
  37. //---------------------------------------------------------------
  38. // Initializes all IPX internals.
  39. // If socket_number==0, then opens next available socket.
  40. // Returns: 0 if successful.
  41. // -1 if socket already open.
  42. // -2 if socket table full.
  43. // -3 if IPX not installed.
  44. // -4 if couldn't allocate low dos memory
  45. // -5 if error with getting internetwork address
  46. extern int ipx_init( int socket_number );
  47. // Returns a pointer to 6-byte address
  48. extern ubyte * ipx_get_my_local_address();
  49. // If any packets waiting to be read in, this fills data in with the packet data and returns
  50. // the number of bytes read. Else returns 0 if no packets waiting.
  51. extern int ipx_get_packet_data( ubyte * data );
  52. // Sends a broadcast packet to everyone on this socket.
  53. extern void ipx_send_broadcast_packet_data( ubyte * data, int datasize );
  54. // Sends a packet to a certain address
  55. extern void ipx_send_packet_data( ubyte * data, int datasize, ubyte *address );
  56. #define IPX_MAX_DATA_SIZE (534-4)
  57. #endif
  58.