summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-07-17 11:57:51 +0000
committerJeremy Allison <jra@samba.org>2014-08-11 23:57:13 +0200
commita1529c3302656fad3daf1247141a987d36801066 (patch)
tree7900d897f1c22fef2599a596c05553a751cd124a /source3
parent274998fb89e9225db5549e8a6500cbe982e84c42 (diff)
downloadsamba-a1529c3302656fad3daf1247141a987d36801066.tar.gz
samba-a1529c3302656fad3daf1247141a987d36801066.tar.xz
samba-a1529c3302656fad3daf1247141a987d36801066.zip
messaging3: Add messages_dgm.h
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/include/messages.h24
-rw-r--r--source3/lib/messages_dgm.c2
-rw-r--r--source3/lib/messages_dgm.h46
3 files changed, 48 insertions, 24 deletions
diff --git a/source3/include/messages.h b/source3/include/messages.h
index 81f29db5d7..862e5ea94d 100644
--- a/source3/include/messages.h
+++ b/source3/include/messages.h
@@ -59,6 +59,7 @@
#define MSG_SRVID_SAMBA 0x0000000100000000LL
#include "librpc/gen_ndr/server_id.h"
+#include "lib/messages_dgm.h"
#define MSG_BROADCAST_PID_STR "0:0"
@@ -73,29 +74,6 @@ struct messaging_backend {
void *private_data;
};
-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,
- void (*recv_cb)(int msg_type,
- struct server_id src,
- struct server_id dst,
- const uint8_t *msg,
- size_t msg_len,
- void *private_data),
- void *recv_cb_private_data,
- struct messaging_dgm_context **pctx);
-int messaging_dgm_send(struct messaging_dgm_context *ctx,
- struct server_id src, struct server_id pid,
- int msg_type, 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 *messaging_dgm_register_tevent_context(TALLOC_CTX *mem_ctx,
- struct messaging_dgm_context *ctx,
- struct tevent_context *ev);
-
NTSTATUS messaging_ctdbd_init(struct messaging_context *msg_ctx,
TALLOC_CTX *mem_ctx,
struct messaging_backend **presult);
diff --git a/source3/lib/messages_dgm.c b/source3/lib/messages_dgm.c
index 6d59e46ed9..dee1f6476b 100644
--- a/source3/lib/messages_dgm.c
+++ b/source3/lib/messages_dgm.c
@@ -22,7 +22,7 @@
#include "lib/util/debug.h"
#include "lib/unix_msg/unix_msg.h"
#include "system/filesys.h"
-#include "messages.h"
+#include "lib/messages_dgm.h"
#include "lib/param/param.h"
#include "poll_funcs/poll_funcs_tevent.h"
#include "unix_msg/unix_msg.h"
diff --git a/source3/lib/messages_dgm.h b/source3/lib/messages_dgm.h
new file mode 100644
index 0000000000..0172d7bad6
--- /dev/null
+++ b/source3/lib/messages_dgm.h
@@ -0,0 +1,46 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * messages_dgm.c header
+ * Copyright (C) Volker Lendecke 2014
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#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,
+ void (*recv_cb)(int msg_type,
+ struct server_id src,
+ struct server_id dst,
+ const uint8_t *msg,
+ size_t msg_len,
+ void *private_data),
+ void *recv_cb_private_data,
+ struct messaging_dgm_context **pctx);
+int messaging_dgm_send(struct messaging_dgm_context *ctx,
+ struct server_id src, struct server_id pid,
+ int msg_type, 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 *messaging_dgm_register_tevent_context(TALLOC_CTX *mem_ctx,
+ struct messaging_dgm_context *ctx,
+ struct tevent_context *ev);
+
+#endif