From a1529c3302656fad3daf1247141a987d36801066 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 17 Jul 2014 11:57:51 +0000 Subject: [PATCH] messaging3: Add messages_dgm.h Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/include/messages.h | 24 +------------------- source3/lib/messages_dgm.c | 2 +- source3/lib/messages_dgm.h | 46 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 24 deletions(-) create mode 100644 source3/lib/messages_dgm.h diff --git a/source3/include/messages.h b/source3/include/messages.h index 81f29db5d7d..862e5ea94d2 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 6d59e46ed90..dee1f6476b1 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 00000000000..0172d7bad61 --- /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 . + */ + +#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 -- 2.34.1