]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
95b74ef6 SS |
2 | #pragma once |
3 | ||
95b74ef6 SS |
4 | #include <inttypes.h> |
5 | #include <stdbool.h> | |
6 | ||
a2106925 | 7 | #include "conf-parser.h" |
95b74ef6 SS |
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; | |
95b74ef6 SS |
21 | NetworkConfigSection *section; |
22 | ||
95b74ef6 SS |
23 | unsigned char prefixlen; |
24 | uint32_t label; | |
25 | ||
26 | union in_addr_union in_addr; | |
27 | ||
28 | LIST_FIELDS(AddressLabel, labels); | |
29 | }; | |
30 | ||
95b74ef6 SS |
31 | void address_label_free(AddressLabel *label); |
32 | ||
33 | DEFINE_TRIVIAL_CLEANUP_FUNC(AddressLabel*, address_label_free); | |
95b74ef6 SS |
34 | |
35 | int address_label_configure(AddressLabel *address, Link *link, sd_netlink_message_handler_t callback, bool update); | |
36 | ||
a2106925 LP |
37 | CONFIG_PARSER_PROTOTYPE(config_parse_address_label); |
38 | CONFIG_PARSER_PROTOTYPE(config_parse_address_label_prefix); |