WSPIPX.H 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. //
  2. // Copyright 2020 Electronic Arts Inc.
  3. //
  4. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free
  5. // software: you can redistribute it and/or modify it under the terms of
  6. // the GNU General Public License as published by the Free Software Foundation,
  7. // either version 3 of the License, or (at your option) any later version.
  8. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed
  9. // in the hope that it will be useful, but with permitted additional restrictions
  10. // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
  11. // distributed with this program. You should have received a copy of the
  12. // GNU General Public License along with permitted additional restrictions
  13. // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
  14. /***********************************************************************************************
  15. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  16. ***********************************************************************************************
  17. * *
  18. * Project Name : Command & Conquer *
  19. * *
  20. * $Archive:: /Sun/WSPIPX.h $*
  21. * *
  22. * $Author:: Joe_b $*
  23. * *
  24. * $Modtime:: 8/12/97 5:42p $*
  25. * *
  26. * $Revision:: 3 $*
  27. * *
  28. *---------------------------------------------------------------------------------------------*
  29. * Functions: *
  30. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  31. #ifndef WSPIPX_H
  32. #define WSPIPX_H
  33. #include "WSProto.h"
  34. /*
  35. ** Include Windows specific extensions for Winsock that allow IPX over winsock 1.1
  36. */
  37. #include <wsipx.h>
  38. /*
  39. ** This file normally resides with the SDK. However, since it needs fixing up before watcom will
  40. ** compile it, it has been incorporated into the project.
  41. */
  42. #include "wsnwlink.h"
  43. /*
  44. ** IPX interface class. This handles access to the IPX specific portions of the
  45. ** Winsock interface.
  46. **
  47. */
  48. class IPXInterfaceClass : public WinsockInterfaceClass {
  49. public:
  50. IPXInterfaceClass (void);
  51. //virtual ~IPXInterfaceClass(void){Close();};
  52. bool Get_Network_Card_Address (int card_number, SOCKADDR_IPX *addr);
  53. virtual long Message_Handler(HWND window, UINT message, UINT wParam, LONG lParam);
  54. virtual bool Open_Socket ( SOCKET socketnum );
  55. virtual ProtocolEnum Get_Protocol (void) {
  56. return (PROTOCOL_IPX);
  57. };
  58. virtual int Protocol_Event_Message (void) {
  59. return (WM_IPXASYNCEVENT);
  60. };
  61. private:
  62. /*
  63. ** The address of the network we will send broadcasts to. Normally you would expect
  64. ** this to be ff,ff,ff,ff but this fails under NT 4.0. Instead, we can use the network
  65. ** number of the net that this PC is attached to. This limits broadcasts to the current
  66. ** network.
  67. */
  68. unsigned char BroadcastNet[4];
  69. /*
  70. ** The node to use as a broadcast address. Normally ff,ff,ff,ff,ff,ff.
  71. */
  72. unsigned char BroadcastNode[6];
  73. /*
  74. ** The id of the network cars in this machine.
  75. */
  76. unsigned char MyNode[6];
  77. /*
  78. ** The socket number to connect with. Normally this will be virgins reserved socket
  79. ** number - VIRGIN_SOCKET (0x8813).
  80. */
  81. SOCKET IPXSocketNumber;
  82. };
  83. #endif