mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
examples: don't advertise IPv6 prefix
Cleaning up the IPv6 address initialization and removed the addition of an IPv6 prefix to advertise.
This commit is contained in:
parent
8b34d323e2
commit
4e48c25ecd
@ -37,7 +37,6 @@
|
||||
|
||||
char monitor_stack_buffer[MONITOR_STACK_SIZE];
|
||||
radio_address_t id;
|
||||
ipv6_addr_t std_addr;
|
||||
|
||||
uint8_t is_root = 0;
|
||||
|
||||
@ -104,18 +103,16 @@ void rpl_udp_init(int argc, char **argv)
|
||||
return;
|
||||
}
|
||||
|
||||
/* TODO: check if this works as intended */
|
||||
ipv6_addr_t prefix, tmp;
|
||||
ipv6_addr_init(&std_addr, 0xabcd, 0x0, 0x0, 0x0, 0x3612, 0x00ff, 0xfe00, id);
|
||||
ipv6_addr_init_prefix(&prefix, &std_addr, 64);
|
||||
ndp_add_prefix_info(0, &prefix, 64, NDP_OPT_PI_VLIFETIME_INFINITE,
|
||||
NDP_OPT_PI_PLIFETIME_INFINITE, 1,
|
||||
ICMPV6_NDP_OPT_PI_FLAG_AUTONOM);
|
||||
ipv6_init_as_router();
|
||||
/* add global address */
|
||||
ipv6_addr_set_by_eui64(&tmp, 0, &std_addr);
|
||||
ipv6_addr_t tmp;
|
||||
/* initialize prefix */
|
||||
ipv6_addr_init(&tmp, 0xabcd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, id);
|
||||
/* set host suffix */
|
||||
ipv6_addr_set_by_eui64(&tmp, 0, &tmp);
|
||||
ipv6_net_if_add_addr(0, &tmp, NDP_ADDR_STATE_PREFERRED, 0, 0, 0);
|
||||
|
||||
ipv6_init_as_router();
|
||||
|
||||
/* set channel to 10 */
|
||||
tcmd.transceivers = TRANSCEIVER;
|
||||
tcmd.data = &chan;
|
||||
|
@ -86,9 +86,6 @@ void *rpl_udp_monitor(void *arg);
|
||||
/** @brief The nodes radio address */
|
||||
extern radio_address_t id;
|
||||
|
||||
/** @brief The node's default IP address */
|
||||
extern ipv6_addr_t std_addr;
|
||||
|
||||
/** @brief Char array for IP address printing */
|
||||
extern char addr_str[IPV6_MAX_ADDR_STR_LEN];
|
||||
#endif /* RPL_UDP_H */
|
||||
|
Loading…
Reference in New Issue
Block a user