diff options
author | Martin Schwenke <martin@meltin.net> | 2016-11-10 16:11:12 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2016-12-19 04:07:07 +0100 |
commit | 7d1b39cf805d54166d16a61d6313a885b5929f7f (patch) | |
tree | a9679b3b6ad5559045200e27f8a05c8ddebe3e30 /ctdb/protocol | |
parent | 44465817dd2d940d08e9c05f257c5032d8add816 (diff) | |
download | samba-7d1b39cf805d54166d16a61d6313a885b5929f7f.tar.gz |
ctdb-client: Add available-only option public IP fetching
Update tool accordingly.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/protocol')
-rw-r--r-- | ctdb/protocol/protocol_api.h | 3 | ||||
-rw-r--r-- | ctdb/protocol/protocol_client.c | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ctdb/protocol/protocol_api.h b/ctdb/protocol/protocol_api.h index 1a1b83abe4e..dfb75d49e35 100644 --- a/ctdb/protocol/protocol_api.h +++ b/ctdb/protocol/protocol_api.h @@ -412,7 +412,8 @@ void ctdb_req_control_takeover_ip(struct ctdb_req_control *request, struct ctdb_public_ip *pubip); int ctdb_reply_control_takeover_ip(struct ctdb_reply_control *reply); -void ctdb_req_control_get_public_ips(struct ctdb_req_control *request); +void ctdb_req_control_get_public_ips(struct ctdb_req_control *request, + bool available_only); int ctdb_reply_control_get_public_ips(struct ctdb_reply_control *reply, TALLOC_CTX *mem_ctx, struct ctdb_public_ip_list **pubip_list); diff --git a/ctdb/protocol/protocol_client.c b/ctdb/protocol/protocol_client.c index 63ccdabe5d1..fe65a8a02c0 100644 --- a/ctdb/protocol/protocol_client.c +++ b/ctdb/protocol/protocol_client.c @@ -1358,7 +1358,8 @@ int ctdb_reply_control_takeover_ip(struct ctdb_reply_control *reply) /* CTDB_CONTROL_GET_PUBLIC_IPS */ -void ctdb_req_control_get_public_ips(struct ctdb_req_control *request) +void ctdb_req_control_get_public_ips(struct ctdb_req_control *request, + bool available_only) { request->opcode = CTDB_CONTROL_GET_PUBLIC_IPS; request->pad = 0; @@ -1367,6 +1368,9 @@ void ctdb_req_control_get_public_ips(struct ctdb_req_control *request) request->flags = 0; request->rdata.opcode = CTDB_CONTROL_GET_PUBLIC_IPS; + if (available_only) { + request->flags = CTDB_PUBLIC_IP_FLAGS_ONLY_AVAILABLE; + } } int ctdb_reply_control_get_public_ips(struct ctdb_reply_control *reply, |