]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/network/networkd-radv.h
network DHCP4: Dont mislead the logs.
[thirdparty/systemd.git] / src / network / networkd-radv.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
091214b6
PF
2#pragma once
3
4/***
96b2fb93 5 Copyright © 2017 Intel Corporation. All rights reserved.
091214b6
PF
6***/
7
a2106925 8#include "conf-parser.h"
6e849e95 9#include "networkd-address.h"
091214b6 10#include "networkd-link.h"
fcbf4cb7 11#include "networkd-util.h"
091214b6 12
6e849e95
PF
13typedef struct Prefix Prefix;
14
ca5ad760
YW
15typedef enum RADVPrefixDelegation {
16 RADV_PREFIX_DELEGATION_NONE,
17 RADV_PREFIX_DELEGATION_STATIC,
18 RADV_PREFIX_DELEGATION_DHCP6,
19 RADV_PREFIX_DELEGATION_BOTH,
20 _RADV_PREFIX_DELEGATION_MAX,
21 _RADV_PREFIX_DELEGATION_INVALID = -1,
22} RADVPrefixDelegation;
23
6e849e95
PF
24struct Prefix {
25 Network *network;
26 NetworkConfigSection *section;
27
28 sd_radv_prefix *radv_prefix;
29
30 LIST_FIELDS(Prefix, prefixes);
31};
32
33int prefix_new(Prefix **ret);
34void prefix_free(Prefix *prefix);
6e849e95 35
fcbf4cb7 36DEFINE_NETWORK_SECTION_FUNCTIONS(Prefix, prefix_free);
6e849e95 37
ca5ad760
YW
38int radv_emit_dns(Link *link);
39int radv_configure(Link *link);
40
41const char* radv_prefix_delegation_to_string(RADVPrefixDelegation i) _const_;
42RADVPrefixDelegation radv_prefix_delegation_from_string(const char *s) _pure_;
43
a2106925
LP
44CONFIG_PARSER_PROTOTYPE(config_parse_router_prefix_delegation);
45CONFIG_PARSER_PROTOTYPE(config_parse_router_preference);
46CONFIG_PARSER_PROTOTYPE(config_parse_prefix);
47CONFIG_PARSER_PROTOTYPE(config_parse_prefix_flags);
48CONFIG_PARSER_PROTOTYPE(config_parse_prefix_lifetime);
ca5ad760
YW
49CONFIG_PARSER_PROTOTYPE(config_parse_radv_dns);
50CONFIG_PARSER_PROTOTYPE(config_parse_radv_search_domains);