#ifndef _MESSAGES_DGM_H_
#define _MESSAGES_DGM_H_
-struct messaging_dgm_context;
-int messaging_dgm_init(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct server_id pid,
- const char *cache_dir,
- uid_t dir_owner,
+#include "replace.h"
+#include "system/filesys.h"
+#include <tevent.h>
+
+int messaging_dgm_init(struct tevent_context *ev,
+ uint64_t unique,
+ const char *socket_dir,
+ const char *lockfile_dir,
void (*recv_cb)(const uint8_t *msg,
size_t msg_len,
+ int *fds,
+ size_t num_fds,
void *private_data),
- void *recv_cb_private_data,
- struct messaging_dgm_context **pctx);
-int messaging_dgm_send(struct messaging_dgm_context *ctx, pid_t pid,
- const struct iovec *iov, int iovlen);
-int messaging_dgm_cleanup(struct messaging_dgm_context *ctx, pid_t pid);
-int messaging_dgm_wipe(struct messaging_dgm_context *ctx);
+ void *recv_cb_private_data);
+void messaging_dgm_destroy(void);
+int messaging_dgm_send(pid_t pid,
+ const struct iovec *iov, int iovlen,
+ const int *fds, size_t num_fds);
+int messaging_dgm_cleanup(pid_t pid);
+int messaging_dgm_wipe(void);
void *messaging_dgm_register_tevent_context(TALLOC_CTX *mem_ctx,
- struct messaging_dgm_context *ctx,
struct tevent_context *ev);
#endif