-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.h
More file actions
31 lines (29 loc) · 812 Bytes
/
header.h
File metadata and controls
31 lines (29 loc) · 812 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
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <errno.h>
#include <netinet/in.h>
#include <netinet/sctp.h>
#include <unistd.h>
#define SERVER_ADDR "192.168.5.2"
#define SERVER_ADDR2 "192.168.5.4"
#define SERVER_ADDR_6 "2000::5:2"
#define SERVER_ADDR2_6 "2000::5:4"
#define SERVER_PORT 36297
#define CLIENT_ADDR "192.168.5.1"
#define CLIENT_ADDR2 "192.168.5.3"
#define CLIENT_ADDR_6 "2000::5:1"
#define CLIENT_ADDR2_6 "2000::5:3"
#define CLIENT_PORT 36296
#define MAX_STREAM 5
#define BUFFER_SIZE 8192
#define handle_error(condition, err, ...) \
if ((condition)) { \
fprintf(stderr, err); \
fprintf(stderr, ": %s\n", strerror(errno)); \
__VA_ARGS__ \
exit(EXIT_FAILURE); \
}