buildtools: Expose the Python 3 ABI tag
[Samba.git] / source3 / lib / ctdb_dummy.c
blobe19765b125a8ce1adca44b5f933aa3ca0315bd47
1 /*
2 Unix SMB/CIFS implementation.
3 Copyright (C) 2014 Björn Baumbach
4 Copyright (C) 2014 Stefan Metzmacher
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 #include "includes.h"
21 #include "messages.h"
22 #include "ctdb_conn.h"
23 #include "ctdbd_conn.h"
24 #include "lib/dbwrap/dbwrap.h"
25 #include "lib/dbwrap/dbwrap_ctdb.h"
26 #include "torture/proto.h"
28 NTSTATUS ctdbd_probe(void)
30 return NT_STATUS_NOT_IMPLEMENTED;
33 NTSTATUS ctdbd_messaging_send(struct ctdbd_connection *conn,
34 uint32_t dst_vnn, uint64_t dst_srvid,
35 struct messaging_rec *msg)
37 return NT_STATUS_NOT_IMPLEMENTED;
40 NTSTATUS ctdbd_messaging_send_blob(struct ctdbd_connection *conn,
41 uint32_t dst_vnn, uint64_t dst_srvid,
42 const uint8_t *buf, size_t buflen)
44 return NT_STATUS_NOT_IMPLEMENTED;
47 NTSTATUS register_with_ctdbd(struct ctdbd_connection *conn, uint64_t srvid)
49 return NT_STATUS_NOT_IMPLEMENTED;
52 NTSTATUS ctdbd_register_reconfigure(struct ctdbd_connection *conn)
54 return NT_STATUS_NOT_IMPLEMENTED;
57 NTSTATUS ctdbd_register_ips(struct ctdbd_connection *conn,
58 const struct sockaddr_storage *_server,
59 const struct sockaddr_storage *_client,
60 bool (*release_ip_handler)(const char *ip_addr,
61 void *private_data),
62 void *private_data)
64 return NT_STATUS_NOT_IMPLEMENTED;
67 const char *lp_ctdbd_socket(void)
69 return "";
72 bool ctdb_serverids_exist_supported(struct ctdbd_connection *conn)
74 return false;
77 bool ctdb_serverids_exist(struct ctdbd_connection *conn,
78 const struct server_id *pids, unsigned num_pids,
79 bool *results)
81 return false;
84 bool ctdb_processes_exist(struct ctdbd_connection *conn,
85 const struct server_id *pids, int num_pids,
86 bool *results)
88 return false;
91 struct dummy_state {
92 uint8_t dummy;
95 static struct tevent_req *dummy_send(TALLOC_CTX *mem_ctx,
96 struct tevent_context *ev)
98 struct tevent_req *req;
99 struct dummy_state *state;
100 req = tevent_req_create(mem_ctx, &state, struct dummy_state);
101 if (req == NULL) {
102 return NULL;
104 tevent_req_done(req);
105 return tevent_req_post(req, ev);
108 struct tevent_req *ctdb_conn_init_send(TALLOC_CTX *mem_ctx,
109 struct tevent_context *ev,
110 const char *sock)
112 return dummy_send(mem_ctx, ev);
115 int ctdb_conn_init_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
116 struct ctdb_conn **pconn)
118 return ENOSYS;
121 struct tevent_req *ctdb_conn_msg_write_send(TALLOC_CTX *mem_ctx,
122 struct tevent_context *ev,
123 struct ctdb_conn *conn,
124 uint32_t vnn, uint64_t srvid,
125 uint8_t *msg, size_t msg_len)
127 return dummy_send(mem_ctx, ev);
130 int ctdb_conn_msg_write_recv(struct tevent_req *req)
132 return ENOSYS;
135 struct tevent_req *ctdb_msg_channel_init_send(
136 TALLOC_CTX *mem_ctx, struct tevent_context *ev,
137 const char *sock, uint64_t srvid)
139 return dummy_send(mem_ctx, ev);
142 int ctdb_msg_channel_init_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
143 struct ctdb_msg_channel **pchannel)
145 return ENOSYS;
148 struct tevent_req *ctdb_msg_read_send(TALLOC_CTX *mem_ctx,
149 struct tevent_context *ev,
150 struct ctdb_msg_channel *channel)
152 return dummy_send(mem_ctx, ev);
155 int ctdb_msg_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
156 uint8_t **pmsg, size_t *pmsg_len)
158 return ENOSYS;
161 struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
162 const char *name,
163 int hash_size, int tdb_flags,
164 int open_flags, mode_t mode,
165 enum dbwrap_lock_order lock_order,
166 uint64_t dbwrap_flags)
168 errno = ENOSYS;
169 return NULL;
172 NTSTATUS messaging_ctdbd_init(struct messaging_context *msg_ctx,
173 TALLOC_CTX *mem_ctx,
174 struct messaging_backend **presult)
176 return NT_STATUS_NOT_IMPLEMENTED;
179 struct ctdbd_connection *messaging_ctdbd_connection(void)
181 return NULL;
184 bool run_ctdb_conn(int dummy)
186 return true;