summaryrefslogtreecommitdiff
path: root/proto/radv/radv.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2014-07-07 22:56:21 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2014-07-07 22:56:21 +0200
commit751482899c190194b4958bc54ded428f98f565e9 (patch)
tree041d9ca1531d9b6ee95b80d5dc6c385789ee8472 /proto/radv/radv.h
parent6285793f18817091060c7257f7d4af0db010a67a (diff)
Implements default router preference (RFC 4191) for RAdv.
Thanks to Baptiste Jonglez for the patch.
Diffstat (limited to 'proto/radv/radv.h')
-rw-r--r--proto/radv/radv.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/proto/radv/radv.h b/proto/radv/radv.h
index f80e4530..bb80d65f 100644
--- a/proto/radv/radv.h
+++ b/proto/radv/radv.h
@@ -80,6 +80,7 @@ struct radv_iface_config
u32 current_hop_limit;
u32 default_lifetime;
u8 default_lifetime_sensitive; /* Whether default_lifetime depends on trigger */
+ u8 default_preference; /* Default Router Preference (RFC 4191) */
};
struct radv_prefix_config
@@ -144,6 +145,11 @@ struct radv_iface
#define RA_EV_CHANGE 2 /* Change of options or prefixes */
#define RA_EV_RS 3 /* Received RS */
+/* Default Router Preferences (RFC 4191) */
+#define RA_PREF_LOW 0x18
+#define RA_PREF_MEDIUM 0x00
+#define RA_PREF_HIGH 0x08
+#define RA_PREF_MASK 0x18
#ifdef LOCAL_DEBUG