From 43dfb4db16f695cdddf55a4b1895597e3395f780 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Tue, 18 May 2010 12:41:13 +1000 Subject: [PATCH] create macros that define that all server ids for messaging where the top 32 bits are all zero are reserved for samba allocate the prefix 0x00000001 for test purposes --- include/ctdb_protocol.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/ctdb_protocol.h b/include/ctdb_protocol.h index 8eda5d44..58be9e78 100644 --- a/include/ctdb_protocol.h +++ b/include/ctdb_protocol.h @@ -50,6 +50,25 @@ struct ctdb_call_info { */ #define CTDB_FLAG_TORTURE (1<<1) +/* + The top 32 bits of the server id represents the owner of + this part of the srvid space +*/ +#define CTDB_SRVID_MASK 0xFFFFFFFF00000000LL + + +/* + Samba owns all message handler IDs where the top 32 bits are all zero +*/ +#define CTDB_SRVID_SAMBA 0x0000000000000000 +#define CTDB_IS_SAMBA_SRVID ((srvid & CTDB_SRVID_MASK) == CTDB_SRVID_SAMBA) + +/* + Server ids reserved for testing +*/ +#define CTDB_SRVID_TEST 0x0000000100000000 +#define CTDB_IS_TEST_SRVID ((srvid & CTDB_SRVID_MASK) == CTDB_SRVID_TEST) + /* a message handler ID meaning "give me all messages" */ -- 2.34.1