struct tevent_context *event_ctx;
struct messaging_callback *callbacks;
+ struct tevent_req **new_waiters;
+ unsigned num_new_waiters;
+
struct tevent_req **waiters;
unsigned num_waiters;
};
struct messaging_backend {
- NTSTATUS (*send_fn)(struct messaging_context *msg_ctx,
+ NTSTATUS (*send_fn)(struct server_id src,
struct server_id pid, int msg_type,
- const DATA_BLOB *data,
+ const struct iovec *iov, int iovlen,
struct messaging_backend *backend);
void *private_data;
};
struct messaging_backend **presult);
NTSTATUS messaging_dgm_cleanup(struct messaging_context *msg_ctx, pid_t pid);
NTSTATUS messaging_dgm_wipe(struct messaging_context *msg_ctx);
+void *messaging_dgm_register_tevent_context(TALLOC_CTX *mem_ctx,
+ struct messaging_context *msg_ctx,
+ struct tevent_context *ev);
NTSTATUS messaging_ctdbd_init(struct messaging_context *msg_ctx,
TALLOC_CTX *mem_ctx,
struct tevent_context *ev);
struct server_id messaging_server_id(const struct messaging_context *msg_ctx);
+struct messaging_backend *messaging_local_backend(
+ struct messaging_context *msg_ctx);
/*
* re-init after a fork
void messaging_dispatch_rec(struct messaging_context *msg_ctx,
struct messaging_rec *rec);
+struct tevent_req *messaging_filtered_read_send(
+ TALLOC_CTX *mem_ctx, struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ bool (*filter)(struct messaging_rec *rec, void *private_data),
+ void *private_data);
+int messaging_filtered_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
+ struct messaging_rec **presult);
+
struct tevent_req *messaging_read_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct messaging_context *msg,