X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Finclude%2Fipaddr.h;fp=src%2Fceph%2Fsrc%2Finclude%2Fipaddr.h;h=d9e096886545d64f37dfad603231a865c72f4467;hb=812ff6ca9fcd3e629e49d4328905f33eee8ca3f5;hp=0000000000000000000000000000000000000000;hpb=15280273faafb77777eab341909a3f495cf248d9;p=stor4nfv.git diff --git a/src/ceph/src/include/ipaddr.h b/src/ceph/src/include/ipaddr.h new file mode 100644 index 0000000..d9e0968 --- /dev/null +++ b/src/ceph/src/include/ipaddr.h @@ -0,0 +1,17 @@ +#ifndef CEPH_IPADDR_H +#define CEPH_IPADDR_H + +/* + Find an IP address that is in the wanted subnet. + + If there are multiple matches, the first one is returned; this order + is system-dependent and should not be relied on. + */ +const struct ifaddrs *find_ip_in_subnet(const struct ifaddrs *addrs, + const struct sockaddr *net, + unsigned int prefix_len); + + +bool parse_network(const char *s, struct sockaddr_storage *network, unsigned int *prefix_len); + +#endif