]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/in-addr-prefix-util.h
cryptenroll: allow to use a public key on a token
[thirdparty/systemd.git] / src / shared / in-addr-prefix-util.h
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 #include "conf-parser.h"
5 #include "in-addr-util.h"
6 #include "set.h"
7
8 struct in_addr_prefix {
9 int family;
10 uint8_t prefixlen;
11 union in_addr_union address;
12 };
13
14 int in_addr_prefix_add(Set **prefixes, const struct in_addr_prefix *prefix);
15 int in_addr_prefixes_reduce(Set *prefixes);
16 int in_addr_prefixes_merge(Set **dest, Set *src);
17 /* Returns true if a set contains the two items necessary for "any" (0.0.0.0/0 and ::/0). */
18 bool in_addr_prefixes_is_any(Set *prefixes);
19
20 extern const struct hash_ops in_addr_prefix_hash_ops;
21 extern const struct hash_ops in_addr_prefix_hash_ops_free;
22
23 CONFIG_PARSER_PROTOTYPE(config_parse_in_addr_prefixes);