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