Rewrite of the ipx client code by h-a-l-9000 (Should support more games). Modified it a bit so ipx support can be runtime enabled/disabled.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2254
This commit is contained in:
parent
b4fb1af8a2
commit
5a46ec0241
3 changed files with 502 additions and 369 deletions
|
@ -16,9 +16,21 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: ipx.h,v 1.6 2005-07-30 10:02:39 qbix79 Exp $ */
|
||||
|
||||
#ifndef DOSBOX_IPX_H
|
||||
#define DOSBOX_IPX_H
|
||||
|
||||
// Uncomment this for a lot of debug messages:
|
||||
//#define IPX_DEBUGMSG
|
||||
|
||||
#ifndef DOSBOX_DOSBOX_H
|
||||
#include "dosbox.h"
|
||||
#endif
|
||||
#ifndef DOSBOX_MEM_H
|
||||
#include "mem.h"
|
||||
#endif
|
||||
|
||||
// In Use Flag codes
|
||||
#define USEFLAG_AVAILABLE 0x00
|
||||
#define USEFLAG_AESTEMP 0xe0
|
||||
|
@ -31,7 +43,6 @@
|
|||
#define USEFLAG_LISTENING 0xfe
|
||||
#define USEFLAG_SENDING 0xff
|
||||
|
||||
|
||||
// Completion codes
|
||||
#define COMP_SUCCESS 0x00
|
||||
#define COMP_REMOTETERM 0xec
|
||||
|
@ -52,7 +63,6 @@
|
|||
// For Uint8 type
|
||||
#include "SDL_net.h"
|
||||
|
||||
|
||||
struct PackedIP {
|
||||
Uint32 host;
|
||||
Uint16 port;
|
||||
|
@ -78,6 +88,45 @@ struct IPXHeader {
|
|||
} dest, src;
|
||||
} GCC_ATTRIBUTE(packed);
|
||||
|
||||
struct fragmentDescriptor {
|
||||
Bit16u offset;
|
||||
Bit16u segment;
|
||||
Bit16u size;
|
||||
};
|
||||
|
||||
class ECBClass {
|
||||
public:
|
||||
RealPt ECBAddr;
|
||||
bool isInESRList;
|
||||
ECBClass *prevECB;
|
||||
ECBClass *nextECB;
|
||||
Bit8u iuflag;
|
||||
|
||||
#ifdef IPX_DEBUGMSG
|
||||
Bitu SerialNumber;
|
||||
#endif
|
||||
|
||||
ECBClass::ECBClass(Bit16u segment, Bit16u offset);
|
||||
Bit16u getSocket(void);
|
||||
|
||||
Bit8u getInUseFlag(void);
|
||||
|
||||
void setInUseFlag(Bit8u flagval);
|
||||
|
||||
void setCompletionFlag(Bit8u flagval);
|
||||
|
||||
Bit16u getFragCount(void);
|
||||
|
||||
void getFragDesc(Bit16u descNum, fragmentDescriptor *fragDesc);
|
||||
RealPt getESRAddr(void);
|
||||
|
||||
void NotifyESR(void);
|
||||
|
||||
void setImmAddress(Bit8u *immAddr);
|
||||
|
||||
~ECBClass();
|
||||
};
|
||||
|
||||
// The following routines may not be needed on all systems. On my build of SDL the IPaddress structure is 8 octects
|
||||
// and therefore screws up my IPXheader structure since it needs to be packed.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue