astraceroute: use switch instead of lookup table for short proto id
[netsniff-ng.git] / curvetun.h
blob227412497c7d85508ca08b2f736d69892e7619d3
1 #ifndef CURVETUN_H
2 #define CURVETUN_H
4 #include <unistd.h>
6 #define FILE_CLIENTS ".curvetun/clients"
7 #define FILE_SERVERS ".curvetun/servers"
8 #define FILE_PRIVKEY ".curvetun/priv.key"
9 #define FILE_PUBKEY ".curvetun/pub.key"
10 #define FILE_USERNAM ".curvetun/username"
12 #define LOCKFILE "/var/run/curvetun.pid"
14 #define DEFAULT_KEY_LEN 64
16 #define PROTO_FLAG_EXIT (1 << 0)
17 #define PROTO_FLAG_INIT (1 << 1)
19 struct ct_proto {
20 uint16_t payload;
21 uint8_t flags;
22 } __attribute__((packed));
24 /* FIXME: think up sth better */
25 #define TUNBUFF_SIZ (3 * RUNTIME_PAGE_SIZE)
26 #define MAX_EPOLL_SIZE 10000
27 #define THREADS_PER_CPU 2
29 extern int server_main(char *home, char *dev, char *port, int udp,
30 int ipv4, int log);
31 extern int client_main(char *home, char *dev, char *host, char *port, int udp);
33 #define DEVNAME_SERVER "curves0"
34 #define DEVNAME_CLIENT "curvec0"
36 #endif /* CURVETUN_H */