]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/networkd-address-pool.h
libudev: hide definition of struct udev_list from other libudev components
[thirdparty/systemd.git] / src / network / networkd-address-pool.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 typedef struct AddressPool AddressPool;
5
6 #include "in-addr-util.h"
7 #include "list.h"
8
9 typedef struct Manager Manager;
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
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);