mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-26 14:42:21 +00:00
e5733234f6
We still have quite a number of build macros which are mapped 1:1 to a USE_something setting in the makefile but which have a different name. This patch cleans this up by renaming them to use the USE_something one, allowing to clean up the makefile and make it more obvious when reading the code what build option needs to be added. The following renames were done : ENABLE_POLL -> USE_POLL ENABLE_EPOLL -> USE_EPOLL ENABLE_KQUEUE -> USE_KQUEUE ENABLE_EVPORTS -> USE_EVPORTS TPROXY -> USE_TPROXY NETFILTER -> USE_NETFILTER NEED_CRYPT_H -> USE_CRYPT_H CONFIG_HAP_CRYPT -> USE_LIBCRYPT CONFIG_HAP_NS -> DUSE_NS CONFIG_HAP_LINUX_SPLICE -> USE_LINUX_SPLICE CONFIG_HAP_LINUX_TPROXY -> USE_LINUX_TPROXY CONFIG_HAP_LINUX_VSYSCALL -> USE_LINUX_VSYSCALL
34 lines
675 B
C
34 lines
675 B
C
#ifndef _NAMESPACE_H
|
|
#define _NAMESPACE_H
|
|
|
|
#include <stdlib.h>
|
|
#include <ebistree.h>
|
|
|
|
#ifdef USE_NS
|
|
|
|
struct netns_entry
|
|
{
|
|
struct ebpt_node node;
|
|
size_t name_len;
|
|
int fd;
|
|
};
|
|
|
|
int my_socketat(const struct netns_entry *ns, int domain, int type, int protocol);
|
|
struct netns_entry* netns_store_insert(const char *ns_name);
|
|
const struct netns_entry* netns_store_lookup(const char *ns_name, size_t ns_name_len);
|
|
|
|
int netns_init(void);
|
|
|
|
#else /* no namespace support */
|
|
|
|
struct netns_entry;
|
|
|
|
static inline int my_socketat(const struct netns_entry *ns, int domain, int type, int protocol)
|
|
{
|
|
return socket(domain, type, protocol);
|
|
}
|
|
|
|
#endif /* USE_NS */
|
|
|
|
#endif /* _NAMESPACE_H */
|