]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/networkd-route-util.h
network: split networkd-route.[ch]
[thirdparty/systemd.git] / src / network / networkd-route-util.h
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 #include <inttypes.h>
5 #include <stdbool.h>
6
7 #include "conf-parser.h"
8
9 typedef struct Link Link;
10 typedef struct Manager Manager;
11
12 unsigned routes_max(void);
13
14 int manager_find_uplink(Manager *m, int family, Link *exclude, Link **ret);
15
16 bool gateway_is_ready(Link *link, bool onlink, int family, const union in_addr_union *gw);
17
18 int route_type_from_string(const char *s) _pure_;
19 const char *route_type_to_string(int t) _const_;
20
21 int route_scope_from_string(const char *s);
22 int route_scope_to_string_alloc(int t, char **ret);
23
24 int route_protocol_from_string(const char *s);
25 int route_protocol_to_string_alloc(int t, char **ret);
26 int route_protocol_full_from_string(const char *s);
27 int route_protocol_full_to_string_alloc(int t, char **ret);
28
29 int manager_get_route_table_from_string(const Manager *m, const char *table, uint32_t *ret);
30 int manager_get_route_table_to_string(const Manager *m, uint32_t table, char **ret);
31
32 CONFIG_PARSER_PROTOTYPE(config_parse_route_table_names);