summaryrefslogtreecommitdiff
path: root/interface-ip.h
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2013-02-01 13:17:41 +0100
committerSteven Barth <steven@midlink.org>2013-02-01 13:17:41 +0100
commitf73f11865e8601a0cb3983a6f2b2beb5ebabd14d (patch)
treece6165fabeba21f4e0905ecda3ee08e99b8c2d10 /interface-ip.h
parent4bb99d4eb462776336928392010b372236ac3c93 (diff)
downloadnetifd-f73f11865e8601a0cb3983a6f2b2beb5ebabd14d.tar.gz
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
Diffstat (limited to 'interface-ip.h')
-rw-r--r--interface-ip.h10
1 files changed, 7 insertions, 3 deletions
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