summaryrefslogtreecommitdiff
path: root/talk.h
diff options
context:
space:
mode:
Diffstat (limited to 'talk.h')
-rw-r--r--talk.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/talk.h b/talk.h
new file mode 100644
index 0000000..1f83fdc
--- /dev/null
+++ b/talk.h
@@ -0,0 +1,19 @@
+typedef enum packettype {
+ MSG = 0,
+ GET = 1,
+ NEWUSER = 2,
+ USERMAKEERROR = 3,
+ UNKNOWNCMD = 4,
+ PASSAUTHFAIL = 5,
+ NOSUCHUSER = 6,
+ NEVERMSGED = 7,
+} packettype;
+
+typedef struct packet {
+ packettype type;
+ char username[30];
+ char password[30];
+ char recipient[30];
+ int msglen;
+ char *msg;
+} packet;