summaryrefslogtreecommitdiff
path: root/ctdb/include
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2017-04-06 19:03:51 +1000
committerMartin Schwenke <martins@samba.org>2017-10-10 11:45:18 +0200
commit9c51535775c9564d0f908ede6cefc2998fe7b2c4 (patch)
tree3e8871f6c094dccea3ec18559561a29011cf6ffd /ctdb/include
parenta41571a7dac87481ef022b50903b6061f1a4f788 (diff)
downloadsamba-9c51535775c9564d0f908ede6cefc2998fe7b2c4.tar.gz
ctdb-daemon: Add implementation of tunnel controls
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/include')
-rw-r--r--ctdb/include/ctdb_private.h11
-rw-r--r--ctdb/include/ctdb_protocol.h8
2 files changed, 19 insertions, 0 deletions
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index 227d518c0ce..3c46ef025c9 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -289,6 +289,7 @@ struct ctdb_context {
void *private_data; /* private to transport */
struct ctdb_db_context *db_list;
struct srvid_context *srv;
+ struct srvid_context *tunnels;
struct ctdb_daemon_data daemon;
struct ctdb_statistics statistics;
struct ctdb_statistics statistics_current;
@@ -552,6 +553,9 @@ int daemon_register_message_handler(struct ctdb_context *ctdb,
int daemon_deregister_message_handler(struct ctdb_context *ctdb,
uint32_t client_id, uint64_t srvid);
+void daemon_tunnel_handler(uint64_t tunnel_id, TDB_DATA data,
+ void *private_data);
+
int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork);
struct ctdb_req_header *_ctdb_transport_allocate(struct ctdb_context *ctdb,
@@ -961,6 +965,13 @@ int32_t ctdb_control_set_tunable(struct ctdb_context *ctdb, TDB_DATA indata);
int32_t ctdb_control_list_tunables(struct ctdb_context *ctdb,
TDB_DATA *outdata);
+/* from ctdb_tunnel.c */
+
+int32_t ctdb_control_tunnel_register(struct ctdb_context *ctdb,
+ uint32_t client_id, uint64_t tunnel_id);
+int32_t ctdb_control_tunnel_deregister(struct ctdb_context *ctdb,
+ uint32_t client_id, uint64_t tunnel_id);
+
/* from ctdb_update_record.c */
int32_t ctdb_control_update_record(struct ctdb_context *ctdb,
diff --git a/ctdb/include/ctdb_protocol.h b/ctdb/include/ctdb_protocol.h
index 52ecc456947..7b6014fdff9 100644
--- a/ctdb/include/ctdb_protocol.h
+++ b/ctdb/include/ctdb_protocol.h
@@ -134,6 +134,14 @@ struct ctdb_req_keepalive_old {
uint32_t uptime;
};
+struct ctdb_req_tunnel_old {
+ struct ctdb_req_header hdr;
+ uint64_t tunnel_id;
+ uint32_t flags;
+ uint32_t datalen;
+ uint8_t data[1];
+};
+
/*
Structure used for a nodemap.
The nodemap is the structure containing a list of all nodes