6 * ipx.h header file for IPX for the DOS emulator
7 * Tim Bird, tbird@novell.com
13 #include <sys/types.h>
15 #define IPX_MANUAL_ADDRESS
17 #define MAX_PACKET_DATA 1500
19 typedef struct IPXAddressStruct {
20 u_char Network[4] __attribute__((packed));
21 u_char Node[6] __attribute__((packed));
22 u_char Socket[2] __attribute__((packed));
25 typedef struct IPXPacketStructure {
26 u_short Checksum __attribute__((packed));
27 u_short Length __attribute__((packed));
28 u_char TransportControl __attribute__((packed));
29 u_char PacketType __attribute__((packed));
30 IPXAddress_t Destination __attribute__((packed));
31 IPXAddress_t Source __attribute__((packed));
34 typedef struct ipx_socket_struct {
36 struct ipx_socket_struct *next;
47 struct ipx_recv_data {
48 /* all network order */
49 u_char src_network[4];
57 int (*GetMyAddress)(void);
58 int (*OpenSocket)(ipx_socket_t *sk, int port);
59 void (*CloseSocket)(ipx_socket_t *mysock);
60 int (*SendPacket)(ipx_socket_t *mysock, IPXPacket_t *IPXHeader,
61 u_char *data, int dataLen);
62 int (*ReceivePacket)(ipx_socket_t *s, char *buffer, int bufsize,
63 struct ipx_recv_data *rec);
64 int (*PacketReady)(ipx_socket_t *s);
65 void (*InitNetgameAuxData)(ipx_socket_t *s, u_char buf[]);
66 int (*HandleNetgameAuxData)(ipx_socket_t *s, const u_char buf[]);
67 void (*HandleLeaveGame)(ipx_socket_t *s);
68 int (*SendGamePacket)(ipx_socket_t *s, u_char *data, int dataLen);
71 int ipx_general_PacketReady(ipx_socket_t *s);
73 extern unsigned char ipx_MyAddress[10];
75 #endif /* _IPX_DRV_H */