summaryrefslogtreecommitdiff
path: root/memcached.h
diff options
context:
space:
mode:
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;