author | Michael Krelin <hacker@klever.net> | 2004-07-05 01:53:09 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2004-07-05 01:53:09 (UTC) |
commit | 955d4e00adc9f39ab93bf21f07506eb75b013c70 (patch) (unidiff) | |
tree | 92493a2c9ac206b822e24a9e5a6f6b1589be6afb /talkd.h | |
download | T42-955d4e00adc9f39ab93bf21f07506eb75b013c70.zip T42-955d4e00adc9f39ab93bf21f07506eb75b013c70.tar.gz T42-955d4e00adc9f39ab93bf21f07506eb75b013c70.tar.bz2 |
initial commit into svn repository
git-svn-id: http://svn.klever.net/kin/T42/trunk@1 fe716a7a-6dde-0310-88d9-d003556173a8
-rw-r--r-- | talkd.h | 47 |
1 files changed, 47 insertions, 0 deletions
@@ -0,0 +1,47 @@ | |||
1 | |||
2 | // Client->Server request message | ||
3 | struct TalkCtlMessage{ | ||
4 | u_char m_Version;// Protocol Version | ||
5 | u_char m_Type; // Request type | ||
6 | u_char m_Answer;// Unused | ||
7 | u_char m_Pad; | ||
8 | u_long m_ID; // Request ID | ||
9 | osockaddrm_Addr; | ||
10 | osockaddrm_ctlAddr; | ||
11 | long m_PID; // Caller's process id | ||
12 | char m_LName[12];// Caller's name (local) | ||
13 | char m_RName[12];// Callee's name (remote) | ||
14 | char m_RTTY[16];// Callee's tty name | ||
15 | |||
16 | }; | ||
17 | |||
18 | // Server->Client response message | ||
19 | struct TalkCtlResponse{ | ||
20 | u_char m_Version;// Protocol Version | ||
21 | u_char m_Type; // Request type | ||
22 | u_char m_Answer;// Response itself | ||
23 | u_char m_Pad; | ||
24 | u_long m_ID; // Request ID | ||
25 | osockaddr m_Addr; // Adress for establishing communication | ||
26 | }; | ||
27 | |||
28 | enum{ | ||
29 | talkCtlVersion = 1, | ||
30 | // Message Types | ||
31 | talkCtlReqLeaveInvite = 0,// Leave an invitation with server | ||
32 | talkCtlReqLookUp = 1,// Check for invitation by callee | ||
33 | talkCtlReqDelete = 2,// Delete invitation by caller | ||
34 | talkCtlReqAnnounce = 3,// Announce invitation by caller | ||
35 | // Answers | ||
36 | talkCtlSuccess = 0,// Operation completed properly | ||
37 | talkCtlNotHere = 1,// Callee not logged in | ||
38 | talkCtlFailed = 2,// Failed for unexplained reason | ||
39 | talkCtlMachineUnknown = 3,// Caller's machine name unknown | ||
40 | talkCtlPermissionDenied = 4,// Callee's tty doesn't permit announce | ||
41 | talkCtlUnknownRequest = 5,// Request has invalid type | ||
42 | talkCtlBadVersion = 6,// Request has invalid protocol version | ||
43 | talkCtlBadAddr = 7,// Request has invalid addr value | ||
44 | talkCtlBadCtlAddr = 8,// Request has invalid ctlAddr value | ||
45 | |||
46 | talkCtlReserved = 255// Internal use | ||
47 | }; \ No newline at end of file | ||