X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fcommon%2Fpick_address.h;fp=src%2Fceph%2Fsrc%2Fcommon%2Fpick_address.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=73020602b7eef303bd1b5c6a2dbe020877d2fe54;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/common/pick_address.h b/src/ceph/src/common/pick_address.h deleted file mode 100644 index 7302060..0000000 --- a/src/ceph/src/common/pick_address.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef CEPH_PICK_ADDRESS_H -#define CEPH_PICK_ADDRESS_H - -#include "common/config.h" - -class CephContext; - - -#define CEPH_PICK_ADDRESS_PUBLIC 0x01 -#define CEPH_PICK_ADDRESS_CLUSTER 0x02 - -/* - Pick addresses based on subnets if needed. - - If an address is not explicitly given, and a list of subnets is - given, find an assigned IP address in the subnets and set that. - - cluster_addr is set based on cluster_network, public_addr is set - based on public_network. - - cluster_network and public_network are a list of ip/prefix pairs. - - All IP addresses assigned to all local network interfaces are - potential matches. - - If multiple IP addresses match the subnet, one of them will be - picked, effectively randomly. - - This function will exit on error. - */ -void pick_addresses(CephContext *cct, int needs); - -/** - * Find a network interface whose address matches the address/netmask - * in `network`. - */ -std::string pick_iface(CephContext *cct, const struct sockaddr_storage &network); - -/** - * check for a locally configured address - * - * check if any of the listed addresses is configured on the local host. - * - * @param cct context - * @param ls list of addresses - * @param match [out] pointer to match, if an item in @a ls is found configured locally. - */ -bool have_local_addr(CephContext *cct, const list& ls, entity_addr_t *match); - - -const struct sockaddr *find_ip_in_subnet_list( - CephContext *cct, - const struct ifaddrs *ifa, - const std::string &networks, - const std::string &interfaces); - -#endif