2020-11-09 05:23:58 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
2017-04-25 12:36:50 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <inttypes.h>
|
|
|
|
|
2018-05-22 13:10:17 +02:00
|
|
|
#include "conf-parser.h"
|
2017-04-25 12:36:50 +02:00
|
|
|
#include "in-addr-util.h"
|
2019-03-01 05:27:47 +01:00
|
|
|
#include "networkd-util.h"
|
2017-04-25 12:36:50 +02:00
|
|
|
|
|
|
|
typedef struct Network Network;
|
|
|
|
typedef struct Link Link;
|
|
|
|
|
2020-09-29 18:40:03 +02:00
|
|
|
typedef struct AddressLabel {
|
2017-04-25 12:36:50 +02:00
|
|
|
Network *network;
|
|
|
|
NetworkConfigSection *section;
|
|
|
|
|
|
|
|
unsigned char prefixlen;
|
|
|
|
uint32_t label;
|
|
|
|
union in_addr_union in_addr;
|
2020-09-29 18:40:03 +02:00
|
|
|
} AddressLabel;
|
2017-04-25 12:36:50 +02:00
|
|
|
|
2020-09-29 18:25:12 +02:00
|
|
|
AddressLabel *address_label_free(AddressLabel *label);
|
2017-04-25 12:36:50 +02:00
|
|
|
|
2020-10-06 20:21:59 +02:00
|
|
|
void network_drop_invalid_address_labels(Network *network);
|
2020-09-29 18:28:35 +02:00
|
|
|
|
2020-09-29 18:33:25 +02:00
|
|
|
int link_set_address_labels(Link *link);
|
2017-04-25 12:36:50 +02:00
|
|
|
|
2018-05-22 13:10:17 +02:00
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_address_label);
|
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_address_label_prefix);
|