From 1c8e710c2b479129c3ad06a0e8e2d21ae4aefd38 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sun, 25 Oct 2015 14:46:21 +0100 Subject: networkd: route - track routes --- src/network/networkd-route.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/network/networkd-route.h') diff --git a/src/network/networkd-route.h b/src/network/networkd-route.h index b1ed5d1085..785bd1663a 100644 --- a/src/network/networkd-route.h +++ b/src/network/networkd-route.h @@ -30,6 +30,8 @@ struct Route { Network *network; unsigned section; + Link *link; + int family; unsigned char dst_prefixlen; unsigned char src_prefixlen; @@ -53,6 +55,12 @@ void route_free(Route *route); int route_configure(Route *route, Link *link, sd_netlink_message_handler_t callback); int route_remove(Route *route, Link *link, sd_netlink_message_handler_t callback); +int route_get(Link *link, int family, union in_addr_union *dst, unsigned char dst_prefixlen, unsigned char tos, uint32_t priority, unsigned char table, Route **ret); +int route_add(Link *link, int family, union in_addr_union *dst, unsigned char dst_prefixlen, unsigned char tos, uint32_t priority, unsigned char table, Route **ret); +int route_add_foreign(Link *link, int family, union in_addr_union *dst, unsigned char dst_prefixlen, unsigned char tos, uint32_t priority, unsigned char table, Route **ret); +int route_update(Route *route, union in_addr_union *src, unsigned char src_prefixlen, union in_addr_union *gw, union in_addr_union *prefsrc, unsigned char scope, unsigned char protocol); +void route_drop(Route *route); + DEFINE_TRIVIAL_CLEANUP_FUNC(Route*, route_free); #define _cleanup_route_free_ _cleanup_(route_freep) -- cgit v1.2.3-54-g00ecf