dissectors: lldp: check for all mandatory TLVs at correct position
[netsniff-ng.git] / curvetun.h
blob343fc51a7f04015b1863b0211e613fa715512ff7
1 /*
2 * netsniff-ng - the packet sniffing beast
3 * By Daniel Borkmann <daniel@netsniff-ng.org>
4 * Copyright 2011 Daniel Borkmann.
5 * Subject to the GPL, version 2.
6 */
8 #ifndef CURVETUN_H
9 #define CURVETUN_H
11 #include <unistd.h>
13 #define FILE_CLIENTS ".curvetun/clients"
14 #define FILE_SERVERS ".curvetun/servers"
15 #define FILE_PRIVKEY ".curvetun/priv.key"
16 #define FILE_PUBKEY ".curvetun/pub.key"
17 #define FILE_USERNAM ".curvetun/username"
19 #define LOCKFILE "/var/run/curvetun.pid"
21 #define DEFAULT_KEY_LEN 64
23 #define PROTO_FLAG_EXIT (1 << 0)
24 #define PROTO_FLAG_INIT (1 << 1)
26 struct ct_proto {
27 uint16_t payload;
28 uint8_t flags;
29 } __attribute__((packed));
31 /* FIXME: think up sth better */
32 #define TUNBUFF_SIZ (3 * getpagesize())
33 #define MAX_EPOLL_SIZE 10000
34 #define THREADS_PER_CPU 2
36 extern int server_main(char *home, char *dev, char *port, int udp,
37 int ipv4, int log);
38 extern int client_main(char *home, char *dev, char *host, char *port, int udp);
40 #define DEVNAME_SERVER "curves0"
41 #define DEVNAME_CLIENT "curvec0"
43 #endif /* CURVETUN_H */