From: Kefu Chai Date: Fri, 26 Mar 2021 07:36:21 +0000 (+0800) Subject: common/pick_address: document find_ip_in_subnet_list() X-Git-Tag: v14.2.22~47^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4e0211b3d79a3a7db4f085ff6a3887b0746ff581;p=ceph.git common/pick_address: document find_ip_in_subnet_list() Signed-off-by: Kefu Chai (cherry picked from commit b106ec0bbf7fa726062989114f461f2d0a1f93a9) --- diff --git a/src/common/pick_address.h b/src/common/pick_address.h index ba9473a9649..e7645988b87 100644 --- a/src/common/pick_address.h +++ b/src/common/pick_address.h @@ -73,6 +73,19 @@ std::string pick_iface(CephContext *cct, const struct sockaddr_storage &network) */ bool have_local_addr(CephContext *cct, const std::list& 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,