WSPIPX.H 4.0 KB

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