summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2015-10-23 15:28:56 +1100
committerMartin Schwenke <martins@samba.org>2015-10-30 02:00:28 +0100
commitbeadc5039da28c9578c9afd4d2784e41dcddf45c (patch)
treef28b9e50c02006d1ee331014b17cf8e17502787c
parentc0a20b9e803ab86c7fe1b03c05e8ab3f41e74ed9 (diff)
downloadsamba-beadc5039da28c9578c9afd4d2784e41dcddf45c.tar.gz
ctdb-include: Group function prototypes from server/ctdb_server.c
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
-rw-r--r--ctdb/include/ctdb_client.h16
-rw-r--r--ctdb/include/ctdb_private.h34
2 files changed, 23 insertions, 27 deletions
diff --git a/ctdb/include/ctdb_client.h b/ctdb/include/ctdb_client.h
index 37682170094..c3edd19f368 100644
--- a/ctdb/include/ctdb_client.h
+++ b/ctdb/include/ctdb_client.h
@@ -62,30 +62,14 @@ struct tevent_context;
struct ctdb_context *ctdb_init(struct tevent_context *ev);
/*
- choose the transport
-*/
-int ctdb_set_transport(struct ctdb_context *ctdb, const char *transport);
-
-/*
set some flags
*/
void ctdb_set_flags(struct ctdb_context *ctdb, unsigned flags);
-/*
- tell ctdb what address to listen on, in transport specific format
-*/
-int ctdb_set_address(struct ctdb_context *ctdb, const char *address);
-
int ctdb_set_socketname(struct ctdb_context *ctdb, const char *socketname);
const char *ctdb_get_socketname(struct ctdb_context *ctdb);
/*
- Check that a specific ip address exists in the node list and returns
- the id for the node or -1
-*/
-int ctdb_ip_to_nodeid(struct ctdb_context *ctdb, const ctdb_sock_addr *nodeip);
-
-/*
attach to a ctdb database
*/
struct ctdb_db_context *ctdb_attach(struct ctdb_context *ctdb,
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index 41ad0085902..c7cdbf3cd93 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -674,10 +674,6 @@ struct ctdb_fetch_handle {
void ctdb_request_message(struct ctdb_context *ctdb, struct ctdb_req_header *hdr);
-void ctdb_queue_packet(struct ctdb_context *ctdb, struct ctdb_req_header *hdr);
-void ctdb_queue_packet_opcode(struct ctdb_context *ctdb, struct ctdb_req_header *hdr, unsigned opcode);
-void ctdb_input_pkt(struct ctdb_context *ctdb, struct ctdb_req_header *);
-
/*
allocate a packet for use in client<->daemon communication
*/
@@ -816,9 +812,6 @@ void ctdb_start_tcp_tickle_update(struct ctdb_context *ctdb);
int32_t ctdb_run_eventscripts(struct ctdb_context *ctdb, struct ctdb_req_control *c, TDB_DATA data, bool *async_reply);
-void ctdb_node_dead(struct ctdb_node *node);
-void ctdb_node_connected(struct ctdb_node *node);
-
int32_t ctdb_control_takeover_ip(struct ctdb_context *ctdb,
struct ctdb_req_control *c,
TDB_DATA indata,
@@ -933,8 +926,6 @@ int ctdb_event_script_callback(struct ctdb_context *ctdb,
const char *fmt, ...) PRINTF_ATTRIBUTE(6,7);
void ctdb_release_all_ips(struct ctdb_context *ctdb);
-int ctdb_set_recovery_lock_file(struct ctdb_context *ctdb, const char *file);
-
int32_t ctdb_control_get_tunable(struct ctdb_context *ctdb, TDB_DATA indata,
TDB_DATA *outdata);
int32_t ctdb_control_set_tunable(struct ctdb_context *ctdb, TDB_DATA indata);
@@ -1021,8 +1012,6 @@ int ctdb_client_async_control(struct ctdb_context *ctdb,
client_async_callback fail_callback,
void *callback_data);
-void ctdb_load_nodes_file(struct ctdb_context *ctdb);
-
extern int script_log_level;
extern bool fast_start;
extern const char *ctdbd_pidfile;
@@ -1462,4 +1451,27 @@ int32_t ctdb_control_continue_node(struct ctdb_context *ctdb);
int ctdb_start_recoverd(struct ctdb_context *ctdb);
void ctdb_stop_recoverd(struct ctdb_context *ctdb);
+/* from ctdb_server.c */
+
+int ctdb_set_transport(struct ctdb_context *ctdb, const char *transport);
+
+int ctdb_ip_to_nodeid(struct ctdb_context *ctdb, const ctdb_sock_addr *nodeip);
+
+int ctdb_set_recovery_lock_file(struct ctdb_context *ctdb, const char *file);
+
+void ctdb_load_nodes_file(struct ctdb_context *ctdb);
+
+int ctdb_set_address(struct ctdb_context *ctdb, const char *address);
+
+uint32_t ctdb_get_num_active_nodes(struct ctdb_context *ctdb);
+
+void ctdb_input_pkt(struct ctdb_context *ctdb, struct ctdb_req_header *);
+
+void ctdb_node_dead(struct ctdb_node *node);
+void ctdb_node_connected(struct ctdb_node *node);
+
+void ctdb_queue_packet(struct ctdb_context *ctdb, struct ctdb_req_header *hdr);
+void ctdb_queue_packet_opcode(struct ctdb_context *ctdb,
+ struct ctdb_req_header *hdr, unsigned opcode);
+
#endif