]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/network/networkd-neighbor.h
test: also flush and rotate journal before read
[thirdparty/systemd.git] / src / network / networkd-neighbor.h
CommitLineData
db9ecf05 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
e4a71bf3
WKI
2#pragma once
3
1939ebeb
YW
4#include <stdbool.h>
5
e4a71bf3
WKI
6#include "sd-netlink.h"
7
8#include "conf-parser.h"
9#include "ether-addr-util.h"
10#include "in-addr-util.h"
fcbf4cb7 11#include "networkd-util.h"
e4a71bf3 12
40ca350e
YW
13typedef struct Link Link;
14typedef struct Manager Manager;
15typedef struct Network Network;
1939ebeb 16
1939ebeb 17typedef struct Neighbor {
e4a71bf3
WKI
18 Network *network;
19 Link *link;
307fe3cd 20 ConfigSection *section;
193c4af9
YW
21 NetworkConfigSource source;
22 NetworkConfigState state;
e4a71bf3 23
2a75f23b
YW
24 unsigned n_ref;
25
e4a71bf3
WKI
26 int family;
27 union in_addr_union in_addr;
17193d76 28 struct hw_addr_data ll_addr;
1939ebeb 29} Neighbor;
e4a71bf3 30
2a75f23b
YW
31Neighbor* neighbor_ref(Neighbor *neighbor);
32Neighbor* neighbor_unref(Neighbor *neighbor);
78ada14f 33
c902fa08
YW
34int neighbor_get(Link *link, const Neighbor *in, Neighbor **ret);
35int neighbor_remove(Neighbor *neighbor, Link *link);
36
aa9626ee 37int network_drop_invalid_neighbors(Network *network);
e4a71bf3 38
e09b7588 39int link_drop_static_neighbors(Link *link);
59048336 40int link_drop_foreign_neighbors(Link *link);
b4564f4e 41void link_foreignize_neighbors(Link *link);
58f1fe9a 42
40ca350e 43int link_request_static_neighbors(Link *link);
40ca350e 44
eab052d2
YW
45int manager_rtnl_process_neighbor(sd_netlink *rtnl, sd_netlink_message *message, Manager *m);
46
193c4af9
YW
47DEFINE_NETWORK_CONFIG_STATE_FUNCTIONS(Neighbor, neighbor);
48
e4a71bf3 49CONFIG_PARSER_PROTOTYPE(config_parse_neighbor_address);
b956364d 50CONFIG_PARSER_PROTOTYPE(config_parse_neighbor_lladdr);