]> git.decadent.org.uk Git - odhcp6c.git/blob - src/ra.h
Add RA-handling support
[odhcp6c.git] / src / ra.h
1 #pragma once
2
3 #define ALL_IPV6_NODES {{{0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
4                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}
5
6 #define ALL_IPV6_ROUTERS {{{0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
7                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}}}
8
9 struct icmpv6_opt {
10         uint8_t type;
11         uint8_t len;
12         uint8_t data[6];
13 };
14
15 #define ND_OPT_ROUTE_INFORMATION 24
16
17
18 #define icmpv6_for_each_option(opt, start, end)\
19         for (opt = (struct icmpv6_opt*)(start);\
20         (void*)(opt + 1) <= (void*)(end) && opt->len > 0 &&\
21         (void*)(opt + opt->len) <= (void*)(end); opt += opt->len)
22
23
24 int ra_init(const char *ifname);
25 bool ra_process(void);
26 bool ra_rtnl_process(void);