#ifndef CURVETUN_H #define CURVETUN_H #include #define FILE_CLIENTS ".curvetun/clients" #define FILE_SERVERS ".curvetun/servers" #define FILE_PRIVKEY ".curvetun/priv.key" #define FILE_PUBKEY ".curvetun/pub.key" #define FILE_USERNAM ".curvetun/username" #define LOCKFILE "/var/run/curvetun.pid" #define DEFAULT_KEY_LEN 64 #define PROTO_FLAG_EXIT (1 << 0) #define PROTO_FLAG_INIT (1 << 1) struct ct_proto { uint16_t payload; uint8_t flags; } __attribute__((packed)); /* FIXME: think up sth better */ #define TUNBUFF_SIZ (3 * RUNTIME_PAGE_SIZE) #define MAX_EPOLL_SIZE 10000 #define THREADS_PER_CPU 2 extern int server_main(char *home, char *dev, char *port, int udp, int ipv4, int log); extern int client_main(char *home, char *dev, char *host, char *port, int udp); #define DEVNAME_SERVER "curves0" #define DEVNAME_CLIENT "curvec0" #endif /* CURVETUN_H */ hod='get'> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2016-08-24 12:31:31 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-08-26 17:29:41 +0200
commit5ca8cc5bf11faed257c762018aea9106d529232f (patch)
treefbde5c6f8c70195e649dbb0b0f69e6a808eb37e9
parent6133740d6e80d969ff7d41098a9db1091d0f9c94 (diff)
rhashtable: add rhashtable_lookup_get_insert_key()
This patch modifies __rhashtable_insert_fast() so it returns the existing object that clashes with the one that you want to insert. In case the object is successfully inserted, NULL is returned. Otherwise, you get an error via ERR_PTR(). This patch adapts the existing callers of __rhashtable_insert_fast() so they handle this new logic, and it adds a new rhashtable_lookup_get_insert_key() interface to fetch this existing object. nf_tables needs this change to improve handling of EEXIST cases via honoring the NLM_F_EXCL flag and by checking if the data part of the mapping matches what we have. Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Thomas Graf <tgraf@suug.ch> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: Herbert Xu <herbert@gondor.apana.org.au>