summaryrefslogtreecommitdiffabout
path: root/talkd.h
authorMichael Krelin <hacker@klever.net>2004-07-05 01:53:09 (UTC)
committer Michael Krelin <hacker@klever.net>2004-07-05 01:53:09 (UTC)
commit955d4e00adc9f39ab93bf21f07506eb75b013c70 (patch) (side-by-side diff)
tree92493a2c9ac206b822e24a9e5a6f6b1589be6afb /talkd.h
downloadT42-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
Diffstat (limited to 'talkd.h') (more/less context) (ignore whitespace changes)
-rw-r--r--talkd.h47
1 files changed, 47 insertions, 0 deletions
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 @@
+
+// Client->Server request message
+struct TalkCtlMessage {
+ u_char m_Version; // Protocol Version
+ u_char m_Type; // Request type
+ u_char m_Answer; // Unused
+ u_char m_Pad;
+ u_long m_ID; // Request ID
+ osockaddr m_Addr;
+ osockaddr m_ctlAddr;
+ long m_PID; // Caller's process id
+ char m_LName[12];// Caller's name (local)
+ char m_RName[12];// Callee's name (remote)
+ char m_RTTY[16]; // Callee's tty name
+
+};
+
+// Server->Client response message
+struct TalkCtlResponse {
+ u_char m_Version; // Protocol Version
+ u_char m_Type; // Request type
+ u_char m_Answer; // Response itself
+ u_char m_Pad;
+ u_long m_ID; // Request ID
+ osockaddr m_Addr; // Adress for establishing communication
+};
+
+enum {
+ talkCtlVersion = 1,
+ // Message Types
+ talkCtlReqLeaveInvite = 0, // Leave an invitation with server
+ talkCtlReqLookUp = 1, // Check for invitation by callee
+ talkCtlReqDelete = 2, // Delete invitation by caller
+ talkCtlReqAnnounce = 3, // Announce invitation by caller
+ // Answers
+ talkCtlSuccess = 0, // Operation completed properly
+ talkCtlNotHere = 1, // Callee not logged in
+ talkCtlFailed = 2, // Failed for unexplained reason
+ talkCtlMachineUnknown = 3, // Caller's machine name unknown
+ talkCtlPermissionDenied = 4, // Callee's tty doesn't permit announce
+ talkCtlUnknownRequest = 5, // Request has invalid type
+ talkCtlBadVersion = 6, // Request has invalid protocol version
+ talkCtlBadAddr = 7, // Request has invalid addr value
+ talkCtlBadCtlAddr = 8, // Request has invalid ctlAddr value
+
+ talkCtlReserved = 255 // Internal use
+}; \ No newline at end of file