]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/networkd-neighbor.h
Merge pull request #11827 from keszybz/pkgconfig-variables
[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
17 struct Neighbor {
18 Network *network;
19 Link *link;
20 NetworkConfigSection *section;
21
22 int family;
23 union in_addr_union in_addr;
24 bool mac_configured;
25 struct ether_addr mac;
26
27 LIST_FIELDS(Neighbor, neighbors);
28 };
29
30 void neighbor_free(Neighbor *neighbor);
31
32 DEFINE_TRIVIAL_CLEANUP_FUNC(Neighbor*, neighbor_free);
33
34 int neighbor_configure(Neighbor *neighbor, Link *link, link_netlink_message_handler_t callback);
35
36 CONFIG_PARSER_PROTOTYPE(config_parse_neighbor_address);
37 CONFIG_PARSER_PROTOTYPE(config_parse_neighbor_hwaddr);