1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
4 #include <netinet/in.h>
6 #include "networkd-forward.h"
8 typedef struct AddressLabel
{
11 ConfigSection
*section
;
14 struct in6_addr prefix
;
15 unsigned char prefixlen
;
19 AddressLabel
*address_label_free(AddressLabel
*label
);
21 void network_drop_invalid_address_labels(Network
*network
);
22 void manager_drop_invalid_address_labels(Manager
*manager
);
24 int link_request_static_address_labels(Link
*link
);
25 int manager_request_static_address_labels(Manager
*manager
);
27 typedef enum IPv6AddressLabelConfParserType
{
29 IPV6_ADDRESS_LABEL_PREFIX
,
30 _IPV6_ADDRESS_LABEL_CONF_PARSER_MAX
,
31 _IPV6_ADDRESS_LABEL_CONF_PARSER_INVALID
= -EINVAL
,
33 IPV6_ADDRESS_LABEL_BY_MANAGER
= 1 << 16,
34 IPV6_ADDRESS_LABEL_SECTION_MASK
= IPV6_ADDRESS_LABEL_BY_MANAGER
- 1,
35 } IPv6AddressLabelConfParserType
;
37 assert_cc(IPV6_ADDRESS_LABEL_BY_MANAGER
>= _IPV6_ADDRESS_LABEL_CONF_PARSER_MAX
);
39 CONFIG_PARSER_PROTOTYPE(config_parse_ipv6_address_label_section
);