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;