DOSBox-X
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
include/ipxserver.h
00001 /*
00002  *  Copyright (C) 2002-2020  The DOSBox Team
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License along
00015  *  with this program; if not, write to the Free Software Foundation, Inc.,
00016  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  */
00018 
00019 #ifndef DOSBOX_IPXSERVER_H_
00020 #define DOSBOX_IPXSERVER_H_
00021 
00022 #if C_IPX
00023 
00024 #include "SDL_net.h"
00025 
00026 struct packetBuffer {
00027         Bit8u buffer[1024];
00028         Bit16s packetSize;  // Packet size remaining in read
00029         Bit16s packetRead;  // Bytes read of total packet
00030         bool inPacket;      // In packet reception flag
00031         bool connected;         // Connected flag
00032         bool waitsize;
00033 };
00034 
00035 #define SOCKETTABLESIZE 16
00036 #define CONVIP(hostvar) hostvar & 0xff, (hostvar >> 8) & 0xff, (hostvar >> 16) & 0xff, (hostvar >> 24) & 0xff
00037 #define CONVIPX(hostvar) hostvar[0], hostvar[1], hostvar[2], hostvar[3], hostvar[4], hostvar[5]
00038 
00039 
00040 void IPX_StopServer();
00041 bool IPX_StartServer(Bit16u portnum);
00042 bool IPX_isConnectedToServer(Bits tableNum, IPaddress ** ptrAddr);
00043 
00044 Bit8u packetCRC(Bit8u *buffer, Bit16u bufSize);
00045 
00046 #endif
00047 
00048 #endif