man: add ifpps.8 man page
[netsniff-ng.git] / curvetun.h
blob76b2a8fc5e58bc993a6694cce0aa5d553e588cb1
1 /*
2 * netsniff-ng - the packet sniffing beast
3 * Copyright 2011 Daniel Borkmann.
4 * Subject to the GPL, version 2.
5 */
7 #ifndef CURVETUN_H
8 #define CURVETUN_H
10 #include <unistd.h>
12 #define FILE_CLIENTS ".curvetun/clients"
13 #define FILE_SERVERS ".curvetun/servers"
14 #define FILE_PRIVKEY ".curvetun/priv.key"
15 #define FILE_PUBKEY ".curvetun/pub.key"
16 #define FILE_USERNAM ".curvetun/username"
18 #define LOCKFILE "/var/run/curvetun.pid"
20 #define DEFAULT_KEY_LEN 64
22 #define PROTO_FLAG_EXIT (1 << 0)
23 #define PROTO_FLAG_INIT (1 << 1)
25 struct ct_proto {
26 uint16_t payload;
27 uint8_t flags;
28 } __attribute__((packed));
30 /* FIXME: think up sth better */
31 #define TUNBUFF_SIZ (3 * getpagesize())
32 #define MAX_EPOLL_SIZE 10000
33 #define THREADS_PER_CPU 2
35 extern int server_main(char *home, char *dev, char *port, int udp,
36 int ipv4, int log);
37 extern int client_main(char *home, char *dev, char *host, char *port, int udp);
39 #define DEVNAME_SERVER "curves0"
40 #define DEVNAME_CLIENT "curvec0"
42 #endif /* CURVETUN_H */