-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommunication.h
38 lines (25 loc) · 1.1 KB
/
communication.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/************************************************************************************
* This header file contains the declarations for communication-related functions.
* **********************************************************************************/
#include "headers.h"
#include <sys/msg.h>
#define message_queue_key 131
#define message_length 1024
struct mesg
{
long type;
char text[message_length];
};
/* to initialize a message queue */
int get_msgid();
/*==========================================================
client-to-server communication functions
============================================================*/
int check_credentials(int msgid, char *username, char *password);
int username_available(int msgid, char *username);
int register_user(int msgid, char* username, char* password, int k);
/*===============================================================
server-to-honeychecker communication functions
=================================================================*/
int set_user(int msgid, char username[], int a);
int check_user(int msgid, char username[], int a);