]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/networkd-neighbor.h
network: drop sections contain invalid settings in network_verify()
[thirdparty/systemd.git] / src / network / networkd-neighbor.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 #include "sd-netlink.h"
5
6 #include "conf-parser.h"
7 #include "ether-addr-util.h"
8 #include "in-addr-util.h"
9 #include "list.h"
10 #include "macro.h"
11
12 typedef struct Neighbor Neighbor;
13
14 #include "networkd-link.h"
15 #include "networkd-network.h"
16 #include "networkd-util.h"
17
18 struct Neighbor {
19 Network *network;
20 Link *link;
21 NetworkConfigSection *section;
22
23 int family;
24 union in_addr_union in_addr;
25 bool mac_configured;
26 struct ether_addr mac;
27
28 LIST_FIELDS(Neighbor, neighbors);
29 };
30
31 void neighbor_free(Neighbor *neighbor);
32
33 DEFINE_NETWORK_SECTION_FUNCTIONS(Neighbor, neighbor_free);
34
35 int neighbor_configure(Neighbor *neighbor, Link *link, link_netlink_message_handler_t callback);
36
37 CONFIG_PARSER_PROTOTYPE(config_parse_neighbor_address);
38 CONFIG_PARSER_PROTOTYPE(config_parse_neighbor_hwaddr);