summaryrefslogtreecommitdiff
path: root/talk.h
blob: 1f83fdc65563950b3f0d2cb19c0b85d632605258 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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;