ctdb-protocol: Add REQ_TUNNEL packet type
authorAmitay Isaacs <amitay@gmail.com>
Wed, 5 Apr 2017 06:07:10 +0000 (16:07 +1000)
committerMartin Schwenke <martins@samba.org>
Tue, 10 Oct 2017 09:45:18 +0000 (11:45 +0200)
This allows to tunnel new protocols using ctdb transport.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/protocol/protocol.h

index ed5deb8c629b5c87f0511e6b75aa72cc977734d6..dc939a6ccbb9eb5142b96aa85dd8811f7c2b7619 100644 (file)
@@ -36,6 +36,7 @@ enum ctdb_operation {
        CTDB_REQ_CONTROL        = 7,
        CTDB_REPLY_CONTROL      = 8,
        CTDB_REQ_KEEPALIVE      = 9,
+       CTDB_REQ_TUNNEL         = 10,
 };
 
 /* used on the domain socket, send a pdu to the local daemon */
@@ -998,6 +999,16 @@ struct ctdb_req_keepalive {
        uint32_t uptime;
 };
 
+#define CTDB_TUNNEL_FLAG_REQUEST       0x00000001
+#define CTDB_TUNNEL_FLAG_REPLY         0x00000002
+#define CTDB_TUNNEL_FLAG_NOREPLY       0x00000010
+
+struct ctdb_req_tunnel {
+       uint64_t tunnel_id;
+       uint32_t flags;
+       TDB_DATA data;
+};
+
 
 /* This is equivalent to server_id */
 struct ctdb_server_id {