]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
fc2f9534 LP |
2 | #pragma once |
3 | ||
fc2f9534 LP |
4 | typedef struct AddressPool AddressPool; |
5 | ||
71d35b6b | 6 | #include "in-addr-util.h" |
634f0f98 ZJS |
7 | #include "list.h" |
8 | ||
9 | typedef struct Manager Manager; | |
fc2f9534 LP |
10 | |
11 | struct AddressPool { | |
12 | Manager *manager; | |
13 | ||
14 | int family; | |
15 | unsigned prefixlen; | |
16 | ||
17 | union in_addr_union in_addr; | |
18 | ||
19 | LIST_FIELDS(AddressPool, address_pools); | |
20 | }; | |
21 | ||
fc2f9534 LP |
22 | int address_pool_new_from_string(Manager *m, AddressPool **ret, int family, const char *p, unsigned prefixlen); |
23 | void address_pool_free(AddressPool *p); | |
24 | ||
25 | int address_pool_acquire(AddressPool *p, unsigned prefixlen, union in_addr_union *found); |