summaryrefslogtreecommitdiffhomepage
path: root/src/router.h
diff options
context:
space:
mode:
authorsbyx <steven@midlink.org>2013-12-10 06:52:57 -0800
committersbyx <steven@midlink.org>2013-12-10 06:52:57 -0800
commit93a6018520bf3521a6e853e5ffbff827d33f96b9 (patch)
treee7841f18874a861d492d863790b79d71f6f7ac13 /src/router.h
parentdd3a301be17b33079306ae54b4a3fc30fcafba57 (diff)
parent3f417e55d5208df5b91aa9b101657bbc7a461614 (diff)
Merge pull request #4 from dedeckeh/master
Bugfixes
Diffstat (limited to 'src/router.h')
-rw-r--r--src/router.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/router.h b/src/router.h
index 1e8649c..8d74967 100644
--- a/src/router.h
+++ b/src/router.h
@@ -20,15 +20,25 @@
struct icmpv6_opt {
uint8_t type;
uint8_t len;
- uint8_t data[6];
};
+struct nd_opt_slla {
+ uint8_t type;
+ uint8_t len;
+ uint8_t addr[6];
+};
+
+struct nd_opt_recursive_dns {
+ uint8_t type;
+ uint8_t len;
+ uint8_t pad;
+ uint8_t pad2;
+ uint32_t lifetime;
+};
#define icmpv6_for_each_option(opt, start, end)\
for (opt = (struct icmpv6_opt*)(start);\
- (void*)(opt + 1) <= (void*)(end) && opt->len > 0 &&\
- (void*)(opt + opt->len) <= (void*)(end); opt += opt->len)
-
+ (void*)(opt + (opt->len << 3)) <= (void*)(end); opt += (opt->len << 3))
#define MaxRtrAdvInterval 600
#define MinRtrAdvInterval (MaxRtrAdvInterval / 3)