1 /* SPDX-License-Identifier: LGPL-2.1-or-later
2 * Copyright © 2019 VMware, Inc.
9 #include "sd-netlink.h"
11 #include "conf-parser.h"
12 #include "in-addr-util.h"
13 #include "networkd-util.h"
15 typedef struct Link Link
;
16 typedef struct Manager Manager
;
17 typedef struct Network Network
;
18 typedef struct Request Request
;
20 typedef struct NextHop
{
22 NetworkConfigSection
*section
;
32 union in_addr_union gw
;
36 NextHop
*nexthop_free(NextHop
*nexthop
);
38 void network_drop_invalid_nexthops(Network
*network
);
40 int link_drop_nexthops(Link
*link
);
41 int link_drop_foreign_nexthops(Link
*link
);
43 int link_request_static_nexthops(Link
*link
, bool only_ipv4
);
44 int request_process_nexthop(Request
*req
);
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
);
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
);