]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/network/networkd-nexthop.h
network: use request queue to configure neighbors
[thirdparty/systemd.git] / src / network / networkd-nexthop.h
CommitLineData
db9ecf05 1/* SPDX-License-Identifier: LGPL-2.1-or-later
c16c7808
SS
2 * Copyright © 2019 VMware, Inc.
3 */
4
5#pragma once
6
75156ccb 7#include <inttypes.h>
c16c7808 8
75156ccb 9#include "sd-netlink.h"
c16c7808 10
75156ccb
YW
11#include "conf-parser.h"
12#include "in-addr-util.h"
c16c7808
SS
13#include "networkd-util.h"
14
75156ccb
YW
15typedef struct Link Link;
16typedef struct Manager Manager;
17typedef struct Network Network;
18
19typedef struct NextHop {
c16c7808
SS
20 Network *network;
21 NetworkConfigSection *section;
22
30f10837 23 Manager *manager;
c16c7808
SS
24 Link *link;
25
0e9d129c 26 uint8_t protocol;
c16c7808 27
c16c7808 28 uint32_t id;
30f10837 29 bool blackhole;
8c112218 30 int family;
c16c7808 31 union in_addr_union gw;
2ddd52d1 32 int onlink;
75156ccb 33} NextHop;
c16c7808 34
75156ccb 35NextHop *nexthop_free(NextHop *nexthop);
0992f9fb 36
13ffa39f 37void network_drop_invalid_nexthops(Network *network);
c16c7808 38
f345918d 39int link_set_nexthops(Link *link);
25b82b6e
YW
40int link_drop_nexthops(Link *link);
41int link_drop_foreign_nexthops(Link *link);
c133770a 42
324e3422 43int manager_get_nexthop_by_id(Manager *manager, uint32_t id, NextHop **ret);
454c87b5
YW
44int manager_rtnl_process_nexthop(sd_netlink *rtnl, sd_netlink_message *message, Manager *m);
45
c16c7808
SS
46CONFIG_PARSER_PROTOTYPE(config_parse_nexthop_id);
47CONFIG_PARSER_PROTOTYPE(config_parse_nexthop_gateway);
f1923efc 48CONFIG_PARSER_PROTOTYPE(config_parse_nexthop_family);
2ddd52d1 49CONFIG_PARSER_PROTOTYPE(config_parse_nexthop_onlink);
30f10837 50CONFIG_PARSER_PROTOTYPE(config_parse_nexthop_blackhole);