diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-06-02 20:34:21 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-06-06 19:59:09 +0200 |
commit | 34380032fb8bdfd801fbd43c03acfb7ac664d2bb (patch) | |
tree | dfa2a75dee05eb9383d052eff00c14f842ed1bf0 /src/basic/in-addr-util.h | |
parent | util-lib: add accessors for unaligned native endian words (diff) | |
download | systemd-34380032fb8bdfd801fbd43c03acfb7ac664d2bb.tar.xz systemd-34380032fb8bdfd801fbd43c03acfb7ac664d2bb.zip |
util: make it easier to check whether in_addr or in6_addr addresses are NULL
Diffstat (limited to 'src/basic/in-addr-util.h')
-rw-r--r-- | src/basic/in-addr-util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/basic/in-addr-util.h b/src/basic/in-addr-util.h index 17798ce816..62cc1e1aa4 100644 --- a/src/basic/in-addr-util.h +++ b/src/basic/in-addr-util.h @@ -36,6 +36,9 @@ struct in_addr_data { union in_addr_union address; }; +bool in4_addr_is_null(const struct in_addr *a); +bool in6_addr_is_null(const struct in6_addr *a); + int in_addr_is_null(int family, const union in_addr_union *u); int in_addr_is_link_local(int family, const union in_addr_union *u); int in_addr_is_localhost(int family, const union in_addr_union *u); |