|
diff --git a/talkd.h b/talkd.h new file mode 100644 index 0000000..2deb124 --- a/dev/null +++ b/ talkd.h |
|
@@ -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 |
|