]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/pick_address: document find_ip_in_subnet_list()
authorKefu Chai <kchai@redhat.com>
Fri, 26 Mar 2021 07:36:21 +0000 (15:36 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 25 Jul 2021 11:23:13 +0000 (19:23 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit b106ec0bbf7fa726062989114f461f2d0a1f93a9)

src/common/pick_address.h

index 2621fed8108db1182cc03912c8b2767734dfe75d..7d80d42fec640b63e78e2bde361ed047fb3d379b 100644 (file)
@@ -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,