summaryrefslogtreecommitdiff
path: root/memcached.h
diff options
context:
space:
mode:
authorDavid CARLIER <devnexen@gmail.com>2022-02-26 08:13:46 +0000
committerdormando <dormando@rydia.net>2022-08-25 20:38:07 -0700
commita76c1155140bf04751ff437db6d1eb0b66af349b (patch)
tree4affa9d513bf52d9d3cd018d41ed56f6a09564a0 /memcached.h
parent8f478cdaf50c1467fc2191ac1c3a8e85ec2efcff (diff)
downloadmemcached-a76c1155140bf04751ff437db6d1eb0b66af349b.tar.gz
sock ip filtering tagging support for FBSD/OBSD
Also linux.
Diffstat (limited to 'memcached.h')
-rw-r--r--memcached.h11
1 files changed, 11 insertions, 0 deletions
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;