From a76c1155140bf04751ff437db6d1eb0b66af349b Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Sat, 26 Feb 2022 08:13:46 +0000 Subject: sock ip filtering tagging support for FBSD/OBSD Also linux. --- memcached.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'memcached.h') diff --git a/memcached.h b/memcached.h index 379a993..ba495d3 100644 --- a/memcached.h +++ b/memcached.h @@ -37,6 +37,14 @@ #endif #endif +#if defined(__linux__) +# define SOCK_COOKIE_ID SO_MARK +#elif defined(__FreeBSD__) +# define SOCK_COOKIE_ID SO_USER_COOKIE +#elif defined(__OpenBSD__) +# define SOCK_COOKIE_ID SO_RTABLE +#endif + #include "itoa_ljust.h" #include "protocol_binary.h" #include "cache.h" @@ -525,6 +533,9 @@ struct settings { char *proxy_startfile; /* lua file to run when workers start */ void *proxy_ctx; /* proxy's state context */ #endif +#ifdef SOCK_COOKIE_ID + uint32_t sock_cookie_id; +#endif }; extern struct stats stats; -- cgit v1.2.1