]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/network/networkd-address-pool.h
tree-wide: drop license boilerplate
[thirdparty/systemd.git] / src / network / networkd-address-pool.h
CommitLineData
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
10typedef struct AddressPool AddressPool;
11
71d35b6b 12#include "in-addr-util.h"
634f0f98
ZJS
13#include "list.h"
14
15typedef struct Manager Manager;
fc2f9534
LP
16
17struct 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
28int address_pool_new(Manager *m, AddressPool **ret, int family, const union in_addr_union *u, unsigned prefixlen);
29int address_pool_new_from_string(Manager *m, AddressPool **ret, int family, const char *p, unsigned prefixlen);
30void address_pool_free(AddressPool *p);
31
32int address_pool_acquire(AddressPool *p, unsigned prefixlen, union in_addr_union *found);