]> icculus.org git repositories - btb/d2x.git/blob - arch/linux/include/ipx_hlpr.h
formatting
[btb/d2x.git] / arch / linux / include / ipx_hlpr.h
1 /* $Id: ipx_hlpr.h,v 1.4 2003-03-13 00:20:21 btb Exp $ */
2 /*
3  *
4  * FIXME: add description
5  *
6  */
7
8 #ifndef IPXHELPER_H_
9 #define IPXHELPER_H_
10 #include <sys/types.h>
11 #include "ipx_ld.h"
12
13 #define IPX_MANUAL_ADDRESS
14
15 struct ipx_recv_data {
16         /* all network order */
17         u_char src_network[4];
18         u_char src_node[6];
19         u_short src_socket;
20         u_short dst_socket;
21         int pkt_type;
22 };
23
24 struct ipx_helper {
25         int (*GetMyAddress)(void);
26         int (*OpenSocket)(ipx_socket_t *sk, int port);
27         void (*CloseSocket)(ipx_socket_t *mysock);
28         int (*SendPacket)(ipx_socket_t *mysock, IPXPacket_t *IPXHeader,
29          u_char *data, int dataLen);
30         int (*ReceivePacket)(ipx_socket_t *s, char *buffer, int bufsize, 
31          struct ipx_recv_data *rec);
32         int (*PacketReady)(ipx_socket_t *s);
33 };
34
35 #endif /* IPXHELPER_H_ */