-
Notifications
You must be signed in to change notification settings - Fork 0
/
storage_server.h
47 lines (41 loc) · 887 Bytes
/
storage_server.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
39
40
41
42
43
44
45
46
47
#include <stdio.h>
#include <stdlib.h>
#include <dirent.h>
#include <string.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <pthread.h>
#include <fcntl.h>
#include <ftw.h>
#define _XOPEN_SOURCE 500
#define FTW_DEPTH 10
#define FTW_PHYS 20
#define NM_PORT 12345
#define NM_PORT2 12346
#define BUFFER_SIZE 1024
#define NAMING_SERVER_IP "127.0.0.1"
#define NO_OF_PATHS 100
#define MAX_SS 100
#define MAX_CLIENTS 100
struct Info_for_Client
{
char ip_address[16]; // Assuming IPv4 address
int port;
};
struct ServerInfo
{
char ip_address[16]; // Assuming IPv4 address
int nm_connection_port;
int client_connection_port;
int no_of_paths;
char accessible_path[NO_OF_PATHS][BUFFER_SIZE];
};
struct for_copy
{
char to_be_sent[100][1024];
};
extern int client_port;
extern int index1;
extern int index2;