lib: Add msghdr_prep_recv_fds
[Samba.git] / source3 / lib / ctdb_conn.h
blob21a69c76718cf0e80aeb984fd31c2cc33cae19d6
1 /*
2 Unix SMB/CIFS implementation.
3 Samba3 ctdb connection handling
4 Copyright (C) Volker Lendecke 2012
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef _CTDB_CONN_H
21 #define _CTDB_CONN_H
23 #include "tevent.h"
24 #include "librpc/gen_ndr/messaging.h"
26 struct ctdb_conn;
27 struct ctdb_reply_control;
29 struct tevent_req *ctdb_conn_control_send(TALLOC_CTX *mem_ctx,
30 struct tevent_context *ev,
31 struct ctdb_conn *conn,
32 uint32_t vnn, uint32_t opcode,
33 uint64_t srvid, uint32_t flags,
34 uint8_t *data, size_t datalen);
35 int ctdb_conn_control_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
36 struct ctdb_reply_control **preply);
38 struct tevent_req *ctdb_conn_init_send(TALLOC_CTX *mem_ctx,
39 struct tevent_context *ev,
40 const char *sock);
41 int ctdb_conn_init_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
42 struct ctdb_conn **pconn);
44 struct tevent_req *ctdb_conn_msg_write_send(TALLOC_CTX *mem_ctx,
45 struct tevent_context *ev,
46 struct ctdb_conn *conn,
47 uint32_t vnn, uint64_t srvid,
48 uint8_t *msg, size_t msg_len);
49 int ctdb_conn_msg_write_recv(struct tevent_req *req);
51 struct ctdb_msg_channel;
53 struct tevent_req *ctdb_msg_channel_init_send(
54 TALLOC_CTX *mem_ctx, struct tevent_context *ev,
55 const char *sock, uint64_t srvid);
56 int ctdb_msg_channel_init_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
57 struct ctdb_msg_channel **pchannel);
59 struct tevent_req *ctdb_msg_read_send(TALLOC_CTX *mem_ctx,
60 struct tevent_context *ev,
61 struct ctdb_msg_channel *channel);
62 int ctdb_msg_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
63 uint8_t **pmsg, size_t *pmsg_len);
65 #endif /* _CTDB_CONN_H */