2017-11-18 17:09:20 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1+ */
|
2017-05-12 15:48:32 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
/***
|
2018-06-12 19:00:24 +02:00
|
|
|
Copyright © 2017 Intel Corporation. All rights reserved.
|
2017-05-12 15:48:32 +02:00
|
|
|
***/
|
|
|
|
|
2018-05-22 13:10:17 +02:00
|
|
|
#include "conf-parser.h"
|
2018-01-04 14:11:38 +01:00
|
|
|
#include "networkd-address.h"
|
2017-05-12 15:48:32 +02:00
|
|
|
#include "networkd-link.h"
|
|
|
|
|
2018-01-04 14:11:38 +01:00
|
|
|
typedef struct Prefix Prefix;
|
|
|
|
|
|
|
|
struct Prefix {
|
|
|
|
Network *network;
|
|
|
|
NetworkConfigSection *section;
|
|
|
|
|
|
|
|
sd_radv_prefix *radv_prefix;
|
|
|
|
|
|
|
|
LIST_FIELDS(Prefix, prefixes);
|
|
|
|
};
|
|
|
|
|
|
|
|
int prefix_new(Prefix **ret);
|
|
|
|
void prefix_free(Prefix *prefix);
|
2018-05-22 13:10:17 +02:00
|
|
|
int prefix_new_static(Network *network, const char *filename, unsigned section, Prefix **ret);
|
2018-01-04 14:11:38 +01:00
|
|
|
|
|
|
|
DEFINE_TRIVIAL_CLEANUP_FUNC(Prefix*, prefix_free);
|
|
|
|
|
2018-05-22 13:10:17 +02:00
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_router_prefix_delegation);
|
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_router_preference);
|
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_prefix);
|
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_prefix_flags);
|
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_prefix_lifetime);
|
2018-01-04 14:11:38 +01:00
|
|
|
|
2017-09-29 13:23:38 +02:00
|
|
|
int radv_emit_dns(Link *link);
|
2017-05-12 15:48:32 +02:00
|
|
|
int radv_configure(Link *link);
|