amd64 fixes
[btb/d2x.git] / arch / linux / include / ukali.h
1 /* $Id: ukali.h,v 1.7 2003-03-19 23:20:09 btb Exp $ */
2 /*
3  *
4  * Header for kali support functions
5  *
6  */
7
8 #ifndef __UKALI_H__
9 #define __UKALI_H__
10
11 // 4213 is the port that KaliNix is listening on
12 //
13 //              char code; // 1 == open, 2 == close, 3 == data, 5 == GetMyAddr
14 //      acks       // 6 == open, 7 == close                             4 == GetMyAddr
15
16 // net data packets structure for send/recv
17 // struct {
18 //              char    code; == 3
19 //              char    sa_nodenum[6];
20 //              char    dport[2];
21 //              char    sport[2];
22 //              char data[];
23 // }
24
25 // net data packets for open/close socket
26 //
27 // process_name is a null terminated 8byte string
28 // struct {
29 //              char code; // 1/6 == open, 2/7 == close
30 //              char socket[2];
31 //              char pid[4];
32 //              char    process_name[9];
33 // }
34
35 // net myaddress struct which is returned after the GetMyAddress call
36 // struct {
37 //              char    code; == 4
38 //              char    sa_nodenum[6];
39 // }
40
41 // net data for GetMyAddress call
42 // struct {
43 //              char    code; == 5
44 // }
45
46 typedef struct kaliaddr_ipx_tag {
47     short sa_family;
48     char  sa_netnum[4];
49     char  sa_nodenum[6];
50     unsigned short sa_socket;
51 } kaliaddr_ipx;
52
53 // Process name that shows up in /whois and /games list.
54 // Maximum of 8 characters.
55 //edited on 10/04/98 by Matt Mueller to show correct ver in kali
56 #define KALI_PROCESS_NAME "D2X" VERSION
57 //end edit -MM
58 #define MAX_PACKET_SIZE 1500
59
60 // struct ipx_helper ipx_kali = {
61 //      ipx_kali_GetMyAddress,
62 //      ipx_kali_OpenSocket,
63 //      ipx_kali_CloseSocket,
64 //      ipx_kali_SendPacket,
65 //      ipx_kali_ReceivePacket,
66 //      ipx_general_PacketReady
67 // };
68
69 int KaliGetNodeNum(kaliaddr_ipx *myaddr);
70 int KaliOpenSocket(unsigned short port);
71 int KaliCloseSocket(int hand);
72 int KaliSendPacket(int hand, char *data, int len, kaliaddr_ipx *to);
73 int KaliReceivePacket(int hand, char *data, int len, kaliaddr_ipx *from);
74
75 #endif // __UKALI_H__