]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/networkd-nexthop.h
network: bridgeFDB: rename FdbEntry -> BridgeFDB
[thirdparty/systemd.git] / src / network / networkd-nexthop.h
1 /* SPDX-License-Identifier: LGPL-2.1-or-later
2 * Copyright © 2019 VMware, Inc.
3 */
4
5 #pragma once
6
7 #include <inttypes.h>
8
9 #include "sd-netlink.h"
10
11 #include "conf-parser.h"
12 #include "in-addr-util.h"
13 #include "networkd-util.h"
14
15 typedef struct Link Link;
16 typedef struct Manager Manager;
17 typedef struct Network Network;
18 typedef struct Request Request;
19
20 typedef struct NextHop {
21 Network *network;
22 NetworkConfigSection *section;
23
24 Manager *manager;
25 Link *link;
26
27 uint8_t protocol;
28
29 uint32_t id;
30 bool blackhole;
31 int family;
32 union in_addr_union gw;
33 int onlink;
34 } NextHop;
35
36 NextHop *nexthop_free(NextHop *nexthop);
37
38 void network_drop_invalid_nexthops(Network *network);
39
40 int link_drop_nexthops(Link *link);
41 int link_drop_foreign_nexthops(Link *link);
42
43 int link_request_static_nexthops(Link *link, bool only_ipv4);
44 int request_process_nexthop(Request *req);
45
46 int manager_get_nexthop_by_id(Manager *manager, uint32_t id, NextHop **ret);
47 int manager_rtnl_process_nexthop(sd_netlink *rtnl, sd_netlink_message *message, Manager *m);
48
49 CONFIG_PARSER_PROTOTYPE(config_parse_nexthop_id);
50 CONFIG_PARSER_PROTOTYPE(config_parse_nexthop_gateway);
51 CONFIG_PARSER_PROTOTYPE(config_parse_nexthop_family);
52 CONFIG_PARSER_PROTOTYPE(config_parse_nexthop_onlink);
53 CONFIG_PARSER_PROTOTYPE(config_parse_nexthop_blackhole);