CnC_Remastered_Collection

Command and Conquer: Red Alert
Log | Files | Refs | README | LICENSE

WSPIPX.H (4181B)


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