8 * ipx.h header file for IPX for the DOS emulator
9 * Tim Bird, tbird@novell.com
16 #define IPX_MANUAL_ADDRESS
20 typedef unsigned char ubyte;
21 typedef unsigned short ushort;
22 typedef unsigned int uint;
25 # define __pack__ __attribute__((packed))
30 #define MAX_PACKET_DATA 1500
33 #pragma pack (push, 1)
36 typedef struct IPXAddressStruct {
37 u_char Network[4] __pack__;
38 u_char Node[6] __pack__;
39 u_char Socket[2] __pack__;
42 typedef struct IPXPacketStructure {
43 u_short Checksum __pack__;
44 u_short Length __pack__;
45 u_char TransportControl __pack__;
46 u_char PacketType __pack__;
47 IPXAddress_t Destination __pack__;
48 IPXAddress_t Source __pack__;
55 typedef struct ipx_socket_struct {
60 struct ipx_recv_data {
61 /* all network order */
62 u_char src_network[4];
70 int (*GetMyAddress)(void);
71 int (*OpenSocket)(ipx_socket_t *sk, int port);
72 void (*CloseSocket)(ipx_socket_t *mysock);
73 int (*SendPacket)(ipx_socket_t *mysock, IPXPacket_t *IPXHeader,
74 u_char *data, int dataLen);
75 int (*ReceivePacket)(ipx_socket_t *s, char *buffer, int bufsize,
76 struct ipx_recv_data *rec);
77 int (*PacketReady)(ipx_socket_t *s);
80 int ipx_general_PacketReady(ipx_socket_t *s);
82 extern unsigned char ipx_MyAddress[10];
84 #endif /* _IPX_DRV_H */