From 07478016d7354274cd53ff2b4ec1dda3f0f439d1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 8 Feb 2007 00:58:17 +0000 Subject: r21230: added the hooks needed in the cluster layer and the messaging code for handling messages to remote nodes. Implemented dummy functions in the 'local' cluster backend for the messaging hooks, and modified the messaging layer to check if the destination is remote and redirect messages via the cluster layer (This used to be commit 4474552e8fb73efebef32ad8480d7fe9a1e379ef) --- source4/cluster/cluster.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'source4/cluster/cluster.h') diff --git a/source4/cluster/cluster.h b/source4/cluster/cluster.h index f56a8e9bb6..6f076e7f78 100644 --- a/source4/cluster/cluster.h +++ b/source4/cluster/cluster.h @@ -28,10 +28,23 @@ */ #define cluster_id_equal(id1, id2) ((id1)->id == (id2)->id && (id1)->node == (id2)->node) +/* + test for same cluster node +*/ +#define cluster_node_equal(id1, id2) ((id1)->node == (id2)->node) + +struct messaging_context; +typedef void (*cluster_message_fn_t)(struct messaging_context *, + struct server_id, uint32_t, DATA_BLOB); + /* prototypes */ struct server_id cluster_id(uint32_t id); const char *cluster_id_string(TALLOC_CTX *mem_ctx, struct server_id id); struct tdb_wrap *cluster_tdb_tmp_open(TALLOC_CTX *mem_ctx, const char *dbname, int flags); -void *cluster_private(void); +void *cluster_backend_handle(void); + +NTSTATUS cluster_message_init(struct messaging_context *msg, struct server_id server, + cluster_message_fn_t handler); +NTSTATUS cluster_message_send(struct server_id server, uint32_t msg_type, DATA_BLOB *data); #endif -- cgit