*/
#define CTDB_SRVID_RELEASE_IP 0xF300000000000000LL
+/*
+ a message handler ID meaning that an IP address has been taken
+ */
+#define CTDB_SRVID_TAKE_IP 0xF301000000000000LL
+
/*
a message ID to set the node flags in the recovery daemon
*/
*/
#define CTDB_SRVID_TAKEOVER_RUN_RESPONSE 0xFD00000000000000LL
-/* A port reserved for samba (top 32 bits)
+/* A range of ports reserved for samba (top 32 bits)
+ * All ports matching the 32 top bits are reserved for exclusive use by
+ * CIFS server
*/
#define CTDB_SRVID_SAMBA_NOTIFY 0xFE00000000000000LL
+#define CTDB_SRVID_SAMBA_RANGE 0xFE00000000000000LL
+
+/* A range of ports reserved for a CTDB NFS server (top 32 bits)
+ * All ports matching the 32 top bits are reserved for exclusive use by
+ * NFS server
+ */
+#define CTDB_SRVID_NFSD_RANGE 0xFE01000000000000LL
+
+/* A range of ports reserved for a CTDB ISCSI server (top 32 bits)
+ * All ports matching the 32 top bits are reserved for exclusive use by
+ * ISCSI server
+ */
+#define CTDB_SRVID_ISCSID_RANGE 0xFE02000000000000LL
/* used on the domain socket, send a pdu to the local daemon */
#define CTDB_CURRENT_NODE 0xF0000001
CTDB_EVENT_SHUTDOWN, /* CTDB shutting down: no args. */
CTDB_EVENT_RELOAD, /* magic */
CTDB_EVENT_UPDATE_IP, /* IP updating: old interface, new interface, IP address, netmask bits. */
+ CTDB_EVENT_IPREALLOCATED, /* when a takeover_run() completes */
CTDB_EVENT_MAX
};
uint32_t laccessor;
uint32_t lacount;
};
+
+
+/*
+ definitions for different socket structures
+ */
+typedef struct sockaddr_in ctdb_addr_in;
+typedef struct sockaddr_in6 ctdb_addr_in6;
+typedef union {
+ struct sockaddr sa;
+ ctdb_addr_in ip;
+ ctdb_addr_in6 ip6;
+} ctdb_sock_addr;
+
+/*
+ A structure describing a single node, its flags and its address
+*/
+struct ctdb_node_and_flags {
+ uint32_t pnn;
+ uint32_t flags;
+ ctdb_sock_addr addr;
+};
+
+
+/*
+ Structure used for a nodemap.
+ The nodemap is the structure containing a list of all nodes
+ known to the cluster and their associated flags.
+*/
+struct ctdb_node_map {
+ uint32_t num;
+ struct ctdb_node_and_flags nodes[1];
+};
+
+/*
+ * Node flags
+ */
+#define NODE_FLAGS_DISCONNECTED 0x00000001 /* node isn't connected */
+#define NODE_FLAGS_UNHEALTHY 0x00000002 /* monitoring says node is unhealthy */
+#define NODE_FLAGS_PERMANENTLY_DISABLED 0x00000004 /* administrator has disabled node */
+#define NODE_FLAGS_BANNED 0x00000008 /* recovery daemon has banned the node */
+#define NODE_FLAGS_DELETED 0x00000010 /* this node has been deleted */
+#define NODE_FLAGS_STOPPED 0x00000020 /* this node has been stopped */
+#define NODE_FLAGS_DISABLED (NODE_FLAGS_UNHEALTHY|NODE_FLAGS_PERMANENTLY_DISABLED)
+#define NODE_FLAGS_INACTIVE (NODE_FLAGS_DELETED|NODE_FLAGS_DISCONNECTED|NODE_FLAGS_BANNED|NODE_FLAGS_STOPPED)
+
+
#endif