]>
Commit | Line | Data |
---|---|---|
db9ecf05 | 1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
95b74ef6 SS |
2 | #pragma once |
3 | ||
baa3fadf | 4 | #include <netinet/in.h> |
95b74ef6 | 5 | |
baa3fadf | 6 | #include "networkd-forward.h" |
95b74ef6 | 7 | |
fb486c90 | 8 | typedef struct AddressLabel { |
489671d2 | 9 | Manager *manager; |
95b74ef6 | 10 | Network *network; |
307fe3cd | 11 | ConfigSection *section; |
95b74ef6 | 12 | |
95b74ef6 | 13 | uint32_t label; |
834f4294 YW |
14 | struct in6_addr prefix; |
15 | unsigned char prefixlen; | |
16 | bool prefix_set; | |
fb486c90 | 17 | } AddressLabel; |
95b74ef6 | 18 | |
cae418a3 | 19 | AddressLabel *address_label_free(AddressLabel *label); |
95b74ef6 | 20 | |
13ffa39f | 21 | void network_drop_invalid_address_labels(Network *network); |
489671d2 | 22 | void manager_drop_invalid_address_labels(Manager *manager); |
ab316813 | 23 | |
354bc760 | 24 | int link_request_static_address_labels(Link *link); |
489671d2 | 25 | int manager_request_static_address_labels(Manager *manager); |
95b74ef6 | 26 | |
934cf1c0 YW |
27 | typedef enum IPv6AddressLabelConfParserType { |
28 | IPV6_ADDRESS_LABEL, | |
29 | IPV6_ADDRESS_LABEL_PREFIX, | |
30 | _IPV6_ADDRESS_LABEL_CONF_PARSER_MAX, | |
31 | _IPV6_ADDRESS_LABEL_CONF_PARSER_INVALID = -EINVAL, | |
32 | ||
33 | IPV6_ADDRESS_LABEL_BY_MANAGER = 1 << 16, | |
34 | IPV6_ADDRESS_LABEL_SECTION_MASK = IPV6_ADDRESS_LABEL_BY_MANAGER - 1, | |
35 | } IPv6AddressLabelConfParserType; | |
36 | ||
37 | assert_cc(IPV6_ADDRESS_LABEL_BY_MANAGER >= _IPV6_ADDRESS_LABEL_CONF_PARSER_MAX); | |
38 | ||
39 | CONFIG_PARSER_PROTOTYPE(config_parse_ipv6_address_label_section); |