1 /* SPDX-License-Identifier: LGPL-2.1+
2 * Copyright © 2019 VMware, Inc.
7 #include "conf-parser.h"
10 typedef struct NextHop NextHop
;
11 typedef struct NetworkConfigSection NetworkConfigSection
;
13 #include "networkd-network.h"
14 #include "networkd-util.h"
18 NetworkConfigSection
*section
;
22 unsigned char protocol
;
28 union in_addr_union gw
;
30 LIST_FIELDS(NextHop
, nexthops
);
33 extern const struct hash_ops nexthop_hash_ops
;
35 int nexthop_new(NextHop
**ret
);
36 void nexthop_free(NextHop
*nexthop
);
37 int nexthop_configure(NextHop
*nexthop
, Link
*link
, link_netlink_message_handler_t callback
);
38 int nexthop_remove(NextHop
*nexthop
, Link
*link
, link_netlink_message_handler_t callback
);
40 int nexthop_get(Link
*link
, NextHop
*in
, NextHop
**ret
);
41 int nexthop_add(Link
*link
, NextHop
*in
, NextHop
**ret
);
42 int nexthop_add_foreign(Link
*link
, NextHop
*in
, NextHop
**ret
);
43 bool nexthop_equal(NextHop
*r1
, NextHop
*r2
);
45 int nexthop_section_verify(NextHop
*nexthop
);
47 DEFINE_NETWORK_SECTION_FUNCTIONS(NextHop
, nexthop_free
);
49 CONFIG_PARSER_PROTOTYPE(config_parse_nexthop_id
);
50 CONFIG_PARSER_PROTOTYPE(config_parse_nexthop_gateway
);