rwrap: Handle trailing dot in dns names.
[Samba.git] / source3 / lib / ctdb_dummy.c
blob4b360a8b06f5d929fd5e752572c10c2e8b17b5dd
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_blob(struct ctdbd_connection *conn,
34 uint32_t dst_vnn, uint64_t dst_srvid,
35 const uint8_t *buf, size_t buflen)
37 return NT_STATUS_NOT_IMPLEMENTED;
40 NTSTATUS register_with_ctdbd(struct ctdbd_connection *conn, uint64_t srvid)
42 return NT_STATUS_NOT_IMPLEMENTED;
45 NTSTATUS ctdbd_register_reconfigure(struct ctdbd_connection *conn)
47 return NT_STATUS_NOT_IMPLEMENTED;
50 NTSTATUS ctdbd_register_ips(struct ctdbd_connection *conn,
51 const struct sockaddr_storage *_server,
52 const struct sockaddr_storage *_client,
53 bool (*release_ip_handler)(const char *ip_addr,
54 void *private_data),
55 void *private_data)
57 return NT_STATUS_NOT_IMPLEMENTED;
60 const char *lp_ctdbd_socket(void)
62 return "";
65 bool ctdb_serverids_exist_supported(struct ctdbd_connection *conn)
67 return false;
70 bool ctdb_serverids_exist(struct ctdbd_connection *conn,
71 const struct server_id *pids, unsigned num_pids,
72 bool *results)
74 return false;
77 bool ctdb_processes_exist(struct ctdbd_connection *conn,
78 const struct server_id *pids, int num_pids,
79 bool *results)
81 return false;
84 struct dummy_state {
85 uint8_t dummy;
88 static struct tevent_req *dummy_send(TALLOC_CTX *mem_ctx,
89 struct tevent_context *ev)
91 struct tevent_req *req;
92 struct dummy_state *state;
93 req = tevent_req_create(mem_ctx, &state, struct dummy_state);
94 if (req == NULL) {
95 return NULL;
97 tevent_req_done(req);
98 return tevent_req_post(req, ev);
101 struct tevent_req *ctdb_conn_init_send(TALLOC_CTX *mem_ctx,
102 struct tevent_context *ev,
103 const char *sock)
105 return dummy_send(mem_ctx, ev);
108 int ctdb_conn_init_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
109 struct ctdb_conn **pconn)
111 return ENOSYS;
114 struct tevent_req *ctdb_conn_msg_write_send(TALLOC_CTX *mem_ctx,
115 struct tevent_context *ev,
116 struct ctdb_conn *conn,
117 uint32_t vnn, uint64_t srvid,
118 uint8_t *msg, size_t msg_len)
120 return dummy_send(mem_ctx, ev);
123 int ctdb_conn_msg_write_recv(struct tevent_req *req)
125 return ENOSYS;
128 struct tevent_req *ctdb_msg_channel_init_send(
129 TALLOC_CTX *mem_ctx, struct tevent_context *ev,
130 const char *sock, uint64_t srvid)
132 return dummy_send(mem_ctx, ev);
135 int ctdb_msg_channel_init_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
136 struct ctdb_msg_channel **pchannel)
138 return ENOSYS;
141 struct tevent_req *ctdb_msg_read_send(TALLOC_CTX *mem_ctx,
142 struct tevent_context *ev,
143 struct ctdb_msg_channel *channel)
145 return dummy_send(mem_ctx, ev);
148 int ctdb_msg_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
149 uint8_t **pmsg, size_t *pmsg_len)
151 return ENOSYS;
154 struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
155 const char *name,
156 int hash_size, int tdb_flags,
157 int open_flags, mode_t mode,
158 enum dbwrap_lock_order lock_order,
159 uint64_t dbwrap_flags)
161 errno = ENOSYS;
162 return NULL;
165 NTSTATUS messaging_ctdbd_init(struct messaging_context *msg_ctx,
166 TALLOC_CTX *mem_ctx,
167 struct messaging_backend **presult)
169 return NT_STATUS_NOT_IMPLEMENTED;
172 struct ctdbd_connection *messaging_ctdbd_connection(void)
174 return NULL;
177 bool run_ctdb_conn(int dummy)
179 return true;