Changes in RPL implementation :

- Structural modification of RPL data storage.
- Support multiple gateways (multiple DODAG-ID with a unique InstanceID)
- Use Lollipop counters
- Add leaf-only configuration option for RPL
Bugfix :
- Correctly send "Grounded" flag in DIO
This commit is contained in:
Vincent Brillault 2011-07-11 15:50:51 +02:00
parent 2ac91d53b5
commit dc9cbe647d
15 changed files with 1497 additions and 555 deletions

View file

@ -71,7 +71,8 @@ collect_common_net_print(void)
{
rpl_dag_t *dag;
int i;
dag = rpl_get_dag(RPL_ANY_INSTANCE);
/* Let's suppose we have only one instance */
dag = rpl_get_any_dag();
if(dag->preferred_parent != NULL) {
PRINTF("Preferred parent: ");
PRINT6ADDR(&dag->preferred_parent->addr);
@ -128,7 +129,8 @@ collect_common_send(void)
rimeaddr_copy(&parent, &rimeaddr_null);
parent_etx = 0;
dag = rpl_get_dag(RPL_DEFAULT_INSTANCE);
/* Let's suppose we have only one instance */
dag = rpl_get_any_dag();
if(dag != NULL) {
preferred_parent = dag->preferred_parent;
if(preferred_parent != NULL) {

View file

@ -151,8 +151,7 @@ PROCESS_THREAD(udp_server_process, ev, data)
root_if = uip_ds6_addr_lookup(&ipaddr);
if(root_if != NULL) {
rpl_dag_t *dag;
rpl_set_root((uip_ip6addr_t *)&ipaddr);
dag = rpl_get_dag(RPL_ANY_INSTANCE);
dag = rpl_set_root(RPL_DEFAULT_INSTANCE,(uip_ip6addr_t *)&ipaddr);
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
rpl_set_prefix(dag, &ipaddr, 64);
PRINTF("created a new RPL dag\n");
@ -181,7 +180,7 @@ PROCESS_THREAD(udp_server_process, ev, data)
tcpip_handler();
} else if (ev == sensors_event && data == &button_sensor) {
PRINTF("Initiaing global repair\n");
rpl_repair_dag(rpl_get_dag(RPL_ANY_INSTANCE));
rpl_repair_root(RPL_DEFAULT_INSTANCE);
}
}