summaryrefslogtreecommitdiffstats
path: root/src/basic/in-addr-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-09-05 17:41:34 +0200
committerLennart Poettering <lennart@poettering.net>2017-09-22 15:24:55 +0200
commit1274b6c68759be1b06140d13e5ec3a0ce3967e94 (patch)
tree6c129d674b1ee28d684b011f442d2349bb44bd5e /src/basic/in-addr-util.h
parentmkosi: when the build fails, show its log output, and propagate error (diff)
downloadsystemd-1274b6c68759be1b06140d13e5ec3a0ce3967e94.tar.xz
systemd-1274b6c68759be1b06140d13e5ec3a0ce3967e94.zip
ip-address-access: minimize IP address lists
Let's drop redundant items from the IP address list after parsing. Let's also mask out redundant bits hidden by the prefixlength.
Diffstat (limited to 'src/basic/in-addr-util.h')
-rw-r--r--src/basic/in-addr-util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/in-addr-util.h b/src/basic/in-addr-util.h
index bb57c089bf..d129bf5585 100644
--- a/src/basic/in-addr-util.h
+++ b/src/basic/in-addr-util.h
@@ -60,6 +60,7 @@ struct in_addr* in4_addr_prefixlen_to_netmask(struct in_addr *addr, unsigned cha
int in4_addr_default_prefixlen(const struct in_addr *addr, unsigned char *prefixlen);
int in4_addr_default_subnet_mask(const struct in_addr *addr, struct in_addr *mask);
int in_addr_mask(int family, union in_addr_union *addr, unsigned char prefixlen);
+int in_addr_prefix_covers(int family, const union in_addr_union *prefix, unsigned char prefixlen, const union in_addr_union *address);
int in_addr_parse_prefixlen(int family, const char *p, unsigned char *ret);
int in_addr_prefix_from_string(const char *p, int family, union in_addr_union *ret_prefix, unsigned char *ret_prefixlen);
int in_addr_prefix_from_string_auto(const char *p, int *ret_family, union in_addr_union *ret_prefix, unsigned char *ret_prefixlen);