summaryrefslogtreecommitdiff
path: root/src/network/networkd-route.h
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-10-25 14:46:21 +0100
committerTom Gundersen <teg@jklm.no>2015-10-30 12:32:48 +0100
commit1c8e710c2b479129c3ad06a0e8e2d21ae4aefd38 (patch)
tree3266403866a23d603f8156ee510672e2ec3d8bcc /src/network/networkd-route.h
parentcab974b035c24a87f9a8cf152ea415b0c14404b7 (diff)
networkd: route - track routes
Diffstat (limited to 'src/network/networkd-route.h')
-rw-r--r--src/network/networkd-route.h8
1 files changed, 8 insertions, 0 deletions
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)