]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/networkd-neighbor.h
Merge pull request #22463 from poettering/kernel-install-propagate-machine-id
[thirdparty/systemd.git] / src / network / networkd-neighbor.h
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 #include <stdbool.h>
5
6 #include "sd-netlink.h"
7
8 #include "conf-parser.h"
9 #include "ether-addr-util.h"
10 #include "in-addr-util.h"
11 #include "networkd-util.h"
12
13 typedef struct Link Link;
14 typedef struct Manager Manager;
15 typedef struct Network Network;
16
17 typedef struct Neighbor {
18 Network *network;
19 Link *link;
20 ConfigSection *section;
21 NetworkConfigSource source;
22 NetworkConfigState state;
23
24 int family;
25 union in_addr_union in_addr;
26 struct hw_addr_data ll_addr;
27 } Neighbor;
28
29 Neighbor *neighbor_free(Neighbor *neighbor);
30
31 void network_drop_invalid_neighbors(Network *network);
32
33 int link_drop_managed_neighbors(Link *link);
34 int link_drop_foreign_neighbors(Link *link);
35 void link_foreignize_neighbors(Link *link);
36
37 int link_request_static_neighbors(Link *link);
38
39 int manager_rtnl_process_neighbor(sd_netlink *rtnl, sd_netlink_message *message, Manager *m);
40
41 DEFINE_NETWORK_CONFIG_STATE_FUNCTIONS(Neighbor, neighbor);
42
43 CONFIG_PARSER_PROTOTYPE(config_parse_neighbor_address);
44 CONFIG_PARSER_PROTOTYPE(config_parse_neighbor_lladdr);