5 * ipx.h header file for IPX for the DOS emulator
6 * Tim Bird, tbird@novell.com
10 #define IPX_MANUAL_ADDRESS
14 #if defined(__WINDOWS__) || defined(__MINGW32__)
17 #include <netinet/in.h> /* for htons & co. */
20 #define MAX_PACKET_DATA 1500
23 #pragma pack (push, 1)
26 typedef struct IPXAddressStruct {
27 ubyte Network[4] __pack__;
28 ubyte Node[6] __pack__;
29 ubyte Socket[2] __pack__;
32 typedef struct IPXPacketStructure {
33 ushort Checksum __pack__;
34 ushort Length __pack__;
35 ubyte TransportControl __pack__;
36 ubyte PacketType __pack__;
37 IPXAddress_t Destination __pack__;
38 IPXAddress_t Source __pack__;
45 typedef struct ipx_socket_struct {
50 struct ipx_recv_data {
51 /* all network order */
60 // int (*GetMyAddress)(void);
61 int (*OpenSocket)(int port);
62 void (*CloseSocket)(void);
63 int (*SendPacket)(IPXPacket_t *IPXHeader,
64 ubyte *data, int dataLen);
65 int (*ReceivePacket)(char *buffer, int bufsize,
66 struct ipx_recv_data *rec);
67 int (*PacketReady)(void);
68 int (*CheckReadyToJoin)(unsigned char *server, unsigned char *node);
69 int usepacketnum;//we can save 4 bytes
70 void (*GetLocalTarget) ( ubyte * server, ubyte * node, ubyte * local_target );
71 int (*GetPacketData) ( ubyte * data );
72 void (*SendPacketData) ( ubyte * data, int datasize, ubyte *network, ubyte *address, ubyte *immediate_address );
75 int ipx_general_PacketReady(int fd);
77 extern unsigned char ipx_MyAddress[10];
79 extern ubyte broadcast_addr[];
80 extern ubyte null_addr[];
81 extern u_int32_t ipx_network;
83 struct ipx_driver * arch_ipx_set_driver(char *arg);
85 #ifdef SUPPORTS_NET_IP
86 extern struct ipx_driver ipx_ip;
89 #endif /* _IPX_DRV_H */