From f73f11865e8601a0cb3983a6f2b2beb5ebabd14d Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 1 Feb 2013 13:17:41 +0100 Subject: Improved IPv6 featureset * Fix reloading of ula-prefixes * Added support for temporary addresses and routes * Added support for offlink addresses * Improved status-output for assigned prefixes --- interface-ip.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'interface-ip.h') diff --git a/interface-ip.h b/interface-ip.h index 054ed40..9b4f0a1 100644 --- a/interface-ip.h +++ b/interface-ip.h @@ -33,6 +33,9 @@ enum device_addr_flags { /* route automatically added by kernel */ DEVADDR_KERNEL = (1 << 5), + + /* address is off-link (no subnet-route) */ + DEVADDR_OFFLINK = (1 << 6), }; union if_addr { @@ -88,11 +91,12 @@ struct device_route { bool keep; union if_addr nexthop; - int metric; int mtu; + time_t valid_until; /* must be last */ enum device_addr_flags flags; + int metric; // there can be multiple routes to the same target unsigned int mask; union if_addr addr; }; @@ -129,8 +133,8 @@ struct interface *interface_ip_add_target_route(union if_addr *addr, bool v6); void interface_ip_set_prefix_assignment(struct device_prefix *prefix, struct interface *iface, uint8_t length); -void interface_ip_add_device_prefix(struct interface *iface, struct in6_addr *addr, - uint8_t length, time_t valid_until, time_t preferred_until); +struct device_prefix* interface_ip_add_device_prefix(struct interface *iface, + struct in6_addr *addr, uint8_t length, time_t valid_until, time_t preferred_until); void interface_ip_set_ula_prefix(const char *prefix); #endif -- cgit v1.2.3