Check assumed SLAAC addresses by pinging them.

This commit is contained in:
Simon Kelley
2012-03-19 20:07:51 +00:00
parent e759d426fa
commit 353ae4d270
13 changed files with 414 additions and 177 deletions

View File

@@ -17,6 +17,13 @@
#define ALL_HOSTS "FF02::1"
#define ALL_ROUTERS "FF02::2"
struct ping_packet {
u8 type, code;
u16 checksum;
u16 identifier;
u16 sequence_no;
};
struct ra_packet {
u8 type, code;
u16 checksum;
@@ -32,9 +39,6 @@ struct prefix_opt {
struct in6_addr prefix;
};
#define ICMP6_ROUTER_SOLICIT 133
#define ICMP6_ROUTER_ADVERT 134
#define ICMP6_OPT_SOURCE_MAC 1
#define ICMP6_OPT_PREFIX 3
#define ICMP6_OPT_MTU 5