]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/networkd-address-pool.h
Merge pull request #8700 from keszybz/hibernation
[thirdparty/systemd.git] / src / network / networkd-address-pool.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5 This file is part of systemd.
6
7 Copyright 2014 Lennart Poettering
8 ***/
9
10 typedef struct AddressPool AddressPool;
11
12 #include "in-addr-util.h"
13 #include "list.h"
14
15 typedef struct Manager Manager;
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);