blob: 5f24e57a57e7ebaf966a3d56238a608279d7787c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#ifndef UDP_BROADCAST_COMMON
#define UDP_BROADCAST_COMMON
#include <arpa/inet.h>
#include <errno.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#define SERVERPORT 4950 // the port users will be connecting to
#define SERVERPORT_S "4950"
#define MAXBUFLEN 100
#define ENP(Cmd, Msg) \
if ((Cmd) == -1) { \
perror(Msg); \
exit(1); \
}
#endif // UDP_BROADCAST_COMMON
|