2020-11-09 05:23:58 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1-or-later
|
2019-10-04 21:40:51 +02:00
|
|
|
* Copyright © 2019 VMware, Inc.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-09-29 10:47:28 +02:00
|
|
|
#include <inttypes.h>
|
2019-10-04 21:40:51 +02:00
|
|
|
|
2020-09-29 10:47:28 +02:00
|
|
|
#include "sd-netlink.h"
|
2019-10-04 21:40:51 +02:00
|
|
|
|
2020-09-29 10:47:28 +02:00
|
|
|
#include "conf-parser.h"
|
|
|
|
#include "in-addr-util.h"
|
2019-10-04 21:40:51 +02:00
|
|
|
#include "networkd-util.h"
|
|
|
|
|
2020-09-29 10:47:28 +02:00
|
|
|
typedef struct Link Link;
|
|
|
|
typedef struct Manager Manager;
|
|
|
|
typedef struct Network Network;
|
|
|
|
|
|
|
|
typedef struct NextHop {
|
2019-10-04 21:40:51 +02:00
|
|
|
Network *network;
|
|
|
|
NetworkConfigSection *section;
|
|
|
|
|
|
|
|
Link *link;
|
|
|
|
|
|
|
|
unsigned char protocol;
|
|
|
|
|
|
|
|
uint32_t id;
|
2020-09-29 15:20:23 +02:00
|
|
|
int family;
|
2019-10-04 21:40:51 +02:00
|
|
|
union in_addr_union gw;
|
2020-09-29 10:47:28 +02:00
|
|
|
} NextHop;
|
2019-10-04 21:40:51 +02:00
|
|
|
|
2020-09-29 10:47:28 +02:00
|
|
|
NextHop *nexthop_free(NextHop *nexthop);
|
2020-09-29 17:58:01 +02:00
|
|
|
|
2020-10-06 20:21:59 +02:00
|
|
|
void network_drop_invalid_nexthops(Network *network);
|
2019-10-04 21:40:51 +02:00
|
|
|
|
2020-09-29 10:18:55 +02:00
|
|
|
int link_set_nexthop(Link *link);
|
|
|
|
|
2020-09-29 10:20:40 +02:00
|
|
|
int manager_rtnl_process_nexthop(sd_netlink *rtnl, sd_netlink_message *message, Manager *m);
|
|
|
|
|
2019-10-04 21:40:51 +02:00
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_nexthop_id);
|
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_nexthop_gateway);
|