1 /* $Id: ipx_drv.h,v 1.7 2003-10-12 09:17:47 btb Exp $ */
8 * ipx.h header file for IPX for the DOS emulator
9 * Tim Bird, tbird@novell.com
16 #define IPX_MANUAL_ADDRESS
22 #define MAX_PACKET_DATA 1500
25 #pragma pack (push, 1)
28 typedef struct IPXAddressStruct {
29 u_char Network[4] __pack__;
30 u_char Node[6] __pack__;
31 u_char Socket[2] __pack__;
34 typedef struct IPXPacketStructure {
35 u_short Checksum __pack__;
36 u_short Length __pack__;
37 u_char TransportControl __pack__;
38 u_char PacketType __pack__;
39 IPXAddress_t Destination __pack__;
40 IPXAddress_t Source __pack__;
47 typedef struct ipx_socket_struct {
52 struct ipx_recv_data {
53 /* all network order */
54 u_char src_network[4];
62 int (*GetMyAddress)(void);
63 int (*OpenSocket)(ipx_socket_t *sk, int port);
64 void (*CloseSocket)(ipx_socket_t *mysock);
65 int (*SendPacket)(ipx_socket_t *mysock, IPXPacket_t *IPXHeader,
66 u_char *data, int dataLen);
67 int (*ReceivePacket)(ipx_socket_t *s, char *buffer, int bufsize,
68 struct ipx_recv_data *rec);
69 int (*PacketReady)(ipx_socket_t *s);
70 void (*InitNetgameAuxData)(ipx_socket_t *s, u_char buf[]);
71 int (*HandleNetgameAuxData)(ipx_socket_t *s, const u_char buf[]);
72 void (*HandleLeaveGame)(ipx_socket_t *s);
73 int (*SendGamePacket)(ipx_socket_t *s, u_char *data, int dataLen);
76 int ipx_general_PacketReady(ipx_socket_t *s);
78 extern unsigned char ipx_MyAddress[10];
80 #endif /* _IPX_DRV_H */