1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

ctdb-protocol: Add tunnel id prefix for testing

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Amitay Isaacs 2017-09-29 12:16:21 +10:00 committed by Martin Schwenke
parent ad1a9176d1
commit 6fed8a731a
2 changed files with 7 additions and 1 deletions

View File

@ -1003,6 +1003,8 @@ struct ctdb_req_keepalive {
uint32_t uptime;
};
#define CTDB_TUNNEL_TEST 0xffffffff00000000
#define CTDB_TUNNEL_FLAG_REQUEST 0x00000001
#define CTDB_TUNNEL_FLAG_REPLY 0x00000002
#define CTDB_TUNNEL_FLAG_NOREPLY 0x00000010

View File

@ -356,7 +356,11 @@ static void ctdb_srvid_print(uint64_t srvid, FILE *fp)
static void ctdb_tunnel_id_print(uint64_t tunnel_id, FILE *fp)
{
fprintf(fp, "0x%"PRIx64, tunnel_id);
if ((tunnel_id & CTDB_TUNNEL_TEST) == CTDB_TUNNEL_TEST) {
fprintf(fp, "TEST-%"PRIx64, tunnel_id);
} else {
fprintf(fp, "0x%"PRIx64, tunnel_id);
}
}
static void ctdb_tunnel_flags_print(uint32_t flags, FILE *fp)