This commit was manufactured by cvs2svn to create tag 'd2x-0_1_2'.
[btb/d2x.git] / arch / linux / include / ukali.h
1 /*
2  * $Source: /cvs/cvsroot/d2x/arch/linux/include/ukali.h,v $
3  * $Revision: 1.3 $
4  * $Author: bradleyb $
5  * $Date: 2001-10-19 07:39:26 $
6  *
7  * FIXME: add description
8  *
9  * $Log: not supported by cvs2svn $
10  * Revision 1.2  2001/10/19 07:29:37  bradleyb
11  * Brought linux networking in line with d1x, moved some arch/linux_* stuff to arch/linux/
12  *
13  *
14  */
15
16 #ifndef __UKALI_H__
17 #define __UKALI_H__
18
19 //added on 10/04/98 by Matt Mueller to show correct ver in kali
20 #include "vers_id.h"
21 //end addition -MM
22
23 // 4213 is the port that KaliNix is listening on
24 //
25 //              char code; // 1 == open, 2 == close, 3 == data, 5 == GetMyAddr
26 //      acks       // 6 == open, 7 == close                             4 == GetMyAddr
27
28 // net data packets structure for send/recv
29 // struct {
30 //              char    code; == 3
31 //              char    sa_nodenum[6];
32 //              char    dport[2];
33 //              char    sport[2];
34 //              char data[];
35 // }
36
37 // net data packets for open/close socket
38 //
39 // process_name is a null terminated 8byte string
40 // struct {
41 //              char code; // 1/6 == open, 2/7 == close
42 //              char socket[2];
43 //              char pid[4];
44 //              char    process_name[9];
45 // }
46
47 // net myaddress struct which is returned after the GetMyAddress call
48 // struct {
49 //              char    code; == 4
50 //              char    sa_nodenum[6];
51 // }
52
53 // net data for GetMyAddress call
54 // struct {
55 //              char    code; == 5
56 // }
57
58 typedef struct kaliaddr_ipx_tag {
59     short sa_family;
60     char  sa_netnum[4];
61     char  sa_nodenum[6];
62     unsigned short sa_socket;
63 } kaliaddr_ipx;
64
65 // Process name that shows up in /whois and /games list.
66 // Maximum of 8 characters.
67 //edited on 10/04/98 by Matt Mueller to show correct ver in kali
68 #define KALI_PROCESS_NAME "D2X" VERSION
69 //end edit -MM
70 #define MAX_PACKET_SIZE 1500
71
72 // struct ipx_helper ipx_kali = {
73 //      ipx_kali_GetMyAddress,
74 //      ipx_kali_OpenSocket,
75 //      ipx_kali_CloseSocket,
76 //      ipx_kali_SendPacket,
77 //      ipx_kali_ReceivePacket,
78 //      ipx_general_PacketReady
79 // };
80
81 int KaliGetNodeNum(kaliaddr_ipx *myaddr);
82 int KaliOpenSocket(unsigned short port);
83 int KaliCloseSocket(int hand);
84 int KaliSendPacket(int hand, char *data, int len, kaliaddr_ipx *to);
85 int KaliReceivePacket(int hand, char *data, int len, kaliaddr_ipx *from);
86
87 #endif // __UKALI_H__