#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/msg.h>

#define MAX_USER_CNT 2
#define MAX_USER_NAME 10
#define MAX_CHAT_LENGTH 255

int msqid = 0;
int shmid = 0;
void* shmaddr = NULL;	// detach shared memory addr
struct shmid_ds info;	// buffer pointer with get shared memmory info

struct ClientData {
	int pid;
	char name[MAX_USER_NAME];
};

struct SharedData {
	int pid;
	int cliencnt;
	struct ClientData client[MAX_USER_CNT];
} *shData;

struct ChatData {
	int send_pid;
	char message[MAX_CHAT_LENGTH];
} chat;
