]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/networkd-address-label.h
Merge pull request #11827 from keszybz/pkgconfig-variables
[thirdparty/systemd.git] / src / network / networkd-address-label.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 #include <inttypes.h>
5 #include <stdbool.h>
6
7 #include "conf-parser.h"
8 #include "in-addr-util.h"
9
10 typedef struct AddressLabel AddressLabel;
11
12 #include "networkd-link.h"
13 #include "networkd-network.h"
14
15 typedef struct Network Network;
16 typedef struct Link Link;
17 typedef struct NetworkConfigSection NetworkConfigSection;
18
19 struct AddressLabel {
20 Network *network;
21 NetworkConfigSection *section;
22
23 unsigned char prefixlen;
24 uint32_t label;
25
26 union in_addr_union in_addr;
27
28 LIST_FIELDS(AddressLabel, labels);
29 };
30
31 void address_label_free(AddressLabel *label);
32
33 DEFINE_TRIVIAL_CLEANUP_FUNC(AddressLabel*, address_label_free);
34
35 int address_label_configure(AddressLabel *address, Link *link, link_netlink_message_handler_t callback, bool update);
36
37 CONFIG_PARSER_PROTOTYPE(config_parse_address_label);
38 CONFIG_PARSER_PROTOTYPE(config_parse_address_label_prefix);