1 /* $Id: ipx_drv.h,v 1.5 2003-10-12 09:17:47 btb Exp $ */
7 * ipx.h header file for IPX for the DOS emulator
8 * Tim Bird, tbird@novell.com
14 #include <sys/types.h>
16 #define IPX_MANUAL_ADDRESS
18 #define MAX_PACKET_DATA 1500
20 typedef struct IPXAddressStruct {
21 u_char Network[4] __attribute__((packed));
22 u_char Node[6] __attribute__((packed));
23 u_char Socket[2] __attribute__((packed));
26 typedef struct IPXPacketStructure {
27 u_short Checksum __attribute__((packed));
28 u_short Length __attribute__((packed));
29 u_char TransportControl __attribute__((packed));
30 u_char PacketType __attribute__((packed));
31 IPXAddress_t Destination __attribute__((packed));
32 IPXAddress_t Source __attribute__((packed));
35 typedef struct ipx_socket_struct {
37 struct ipx_socket_struct *next;
48 struct ipx_recv_data {
49 /* all network order */
50 u_char src_network[4];
58 int (*GetMyAddress)(void);
59 int (*OpenSocket)(ipx_socket_t *sk, int port);
60 void (*CloseSocket)(ipx_socket_t *mysock);
61 int (*SendPacket)(ipx_socket_t *mysock, IPXPacket_t *IPXHeader,
62 u_char *data, int dataLen);
63 int (*ReceivePacket)(ipx_socket_t *s, char *buffer, int bufsize,
64 struct ipx_recv_data *rec);
65 int (*PacketReady)(ipx_socket_t *s);
66 void (*InitNetgameAuxData)(ipx_socket_t *s, u_char buf[]);
67 int (*HandleNetgameAuxData)(ipx_socket_t *s, const u_char buf[]);
68 void (*HandleLeaveGame)(ipx_socket_t *s);
69 int (*SendGamePacket)(ipx_socket_t *s, u_char *data, int dataLen);
72 int ipx_general_PacketReady(ipx_socket_t *s);
74 extern unsigned char ipx_MyAddress[10];
76 #endif /* _IPX_DRV_H */