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/>.
23 #ifdef CLUSTER_SUPPORT
26 #include <ctdb_protocol.h>
28 #else /* CLUSTER_SUPPORT */
30 struct ctdb_reply_control
;
32 #endif /* CLUSTER_SUPPORT */
35 #include "librpc/gen_ndr/messaging.h"
39 struct tevent_req
*ctdb_conn_control_send(TALLOC_CTX
*mem_ctx
,
40 struct tevent_context
*ev
,
41 struct ctdb_conn
*conn
,
42 uint32_t vnn
, uint32_t opcode
,
43 uint64_t srvid
, uint32_t flags
,
44 uint8_t *data
, size_t datalen
);
45 int ctdb_conn_control_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
46 struct ctdb_reply_control
**preply
);
48 struct tevent_req
*ctdb_conn_init_send(TALLOC_CTX
*mem_ctx
,
49 struct tevent_context
*ev
,
51 int ctdb_conn_init_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
52 struct ctdb_conn
**pconn
);
54 struct tevent_req
*ctdb_conn_msg_write_send(TALLOC_CTX
*mem_ctx
,
55 struct tevent_context
*ev
,
56 struct ctdb_conn
*conn
,
57 uint32_t vnn
, uint64_t srvid
,
58 uint8_t *msg
, size_t msg_len
);
59 int ctdb_conn_msg_write_recv(struct tevent_req
*req
);
61 struct ctdb_msg_channel
;
63 struct tevent_req
*ctdb_msg_channel_init_send(
64 TALLOC_CTX
*mem_ctx
, struct tevent_context
*ev
,
65 const char *sock
, uint64_t srvid
);
66 int ctdb_msg_channel_init_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
67 struct ctdb_msg_channel
**pchannel
);
69 struct tevent_req
*ctdb_msg_read_send(TALLOC_CTX
*mem_ctx
,
70 struct tevent_context
*ev
,
71 struct ctdb_msg_channel
*channel
);
72 int ctdb_msg_read_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
73 uint8_t **pmsg
, size_t *pmsg_len
);
75 #endif /* _CTDB_CONN_H */