From e5876fed9b438f1b80f23a693244deefd6eabff2 Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Thu, 29 Aug 2002 19:02:34 +0000 Subject: [PATCH] more network fixing --- arch/linux/include/ipx_drv.h | 73 ++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 arch/linux/include/ipx_drv.h diff --git a/arch/linux/include/ipx_drv.h b/arch/linux/include/ipx_drv.h new file mode 100644 index 0000000..bf37fbd --- /dev/null +++ b/arch/linux/include/ipx_drv.h @@ -0,0 +1,73 @@ +/* $Id: ipx_drv.h,v 1.3 2002-08-29 19:02:34 btb Exp $ */ + +/* + * + * IPX driver interface + * + * parts from: + * ipx.h header file for IPX for the DOS emulator + * Tim Bird, tbird@novell.com + * + */ + +#ifndef _IPX_DRV_H +#define _IPX_DRV_H +#include + +#define IPX_MANUAL_ADDRESS + +#define MAX_PACKET_DATA 1500 + +typedef struct IPXAddressStruct { + u_char Network[4] __attribute__((packed)); + u_char Node[6] __attribute__((packed)); + u_char Socket[2] __attribute__((packed)); +} IPXAddress_t; + +typedef struct IPXPacketStructure { + u_short Checksum __attribute__((packed)); + u_short Length __attribute__((packed)); + u_char TransportControl __attribute__((packed)); + u_char PacketType __attribute__((packed)); + IPXAddress_t Destination __attribute__((packed)); + IPXAddress_t Source __attribute__((packed)); +} IPXPacket_t; + +typedef struct ipx_socket_struct { +#ifdef DOSEMU + struct ipx_socket_struct *next; + far_t listenList; + int listenCount; + far_t AESList; + int AESCount; + u_short PSP; +#endif + u_short socket; + int fd; +} ipx_socket_t; + +struct ipx_recv_data { + /* all network order */ + u_char src_network[4]; + u_char src_node[6]; + u_short src_socket; + u_short dst_socket; + int pkt_type; +}; + +struct ipx_driver { + int (*GetMyAddress)(void); + int (*OpenSocket)(ipx_socket_t *sk, int port); + void (*CloseSocket)(ipx_socket_t *mysock); + int (*SendPacket)(ipx_socket_t *mysock, IPXPacket_t *IPXHeader, + u_char *data, int dataLen); + int (*ReceivePacket)(ipx_socket_t *s, char *buffer, int bufsize, + struct ipx_recv_data *rec); + int (*PacketReady)(ipx_socket_t *s); +}; + +int ipx_general_PacketReady(ipx_socket_t *s); + +extern unsigned char ipx_MyAddress[10]; + +#endif /* _IPX_DRV_H */ -- 2.17.1