diff options
author | Kefu Chai <kchai@redhat.com> | 2021-03-26 15:36:21 +0800 |
---|---|---|
committer | Kefu Chai <kchai@redhat.com> | 2021-07-25 19:23:13 +0800 |
commit | b97bdd9ecc02f01f4e23487be9e1cbf72cf3a51f (patch) | |
tree | 1d649f0c15a32cbd576526744f0336df872601c6 | |
parent | 58df0279a59606fb0303b0a21d26a5f8874d8d46 (diff) | |
download | ceph-b97bdd9ecc02f01f4e23487be9e1cbf72cf3a51f.tar.gz |
common/pick_address: document find_ip_in_subnet_list()
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit b106ec0bbf7fa726062989114f461f2d0a1f93a9)
-rw-r--r-- | src/common/pick_address.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/common/pick_address.h b/src/common/pick_address.h index 2621fed8108..7d80d42fec6 100644 --- a/src/common/pick_address.h +++ b/src/common/pick_address.h @@ -68,6 +68,19 @@ std::string pick_iface(CephContext *cct, const struct sockaddr_storage &network) */ bool have_local_addr(CephContext *cct, const std::list<entity_addr_t>& ls, entity_addr_t *match); +/** + * filter the addresses in @c ifa with specified interfaces, networks and IPv + * + * @param cct + * @param ifa a list of network interface addresses to be filtered + * @param ipv bitmask of CEPH_PICK_ADDRESS_IPV4 and CEPH_PICK_ADDRESS_IPV6. + * it is used to filter the @c networks + * @param networks a comma separated list of networks as the allow list. only + * the addresses in the specified networks are allowed. all addresses + * are accepted if it is empty. + * @param interfaces a comma separated list of interfaces for the allow list. + * all addresses are accepted if it is empty + */ const struct sockaddr *find_ip_in_subnet_list( CephContext *cct, const struct ifaddrs *ifa, |