-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdataServer.h
More file actions
53 lines (46 loc) · 1018 Bytes
/
dataServer.h
File metadata and controls
53 lines (46 loc) · 1018 Bytes
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
48
49
50
51
52
53
#ifndef _DATASERVER_H
#define _DATASERVER_H
#define _GNU_SOURCE
#include <math.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <stdarg.h>
#include <termios.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <pthread.h>
#include <netdb.h>
#include <limits.h>
#include <float.h>
#include "sndup.h"
#include "error.h"
#include "file.h"
#include "socket.h"
#include "net.h"
#include "packet.h"
#include "httpd.h"
enum STATE { BOOT, IDLE, RUN, HALT };
/* mcp root data structure */
struct dataServer {
pthread_mutex_t file_mutex;
char *log_file;
FILE *fp;
unsigned int total_packets;
unsigned int udp_port;
unsigned int httpd_port;
int sock_fd;
httpd_t httpd; /* mini-web server for interacting w/ dataServer */
};
#define TIME_SIZE 128
#endif /* _DATASERVER_H */