Added root_start to routing driver

This commit is contained in:
Simon Duquennoy 2017-12-09 05:23:35 -08:00
parent 83e9414a71
commit bc73bb3284
23 changed files with 23 additions and 21 deletions

View File

@ -77,7 +77,7 @@ PROCESS_THREAD(node_process, ev, data)
#endif
if(is_coordinator) {
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
}
NETSTACK_MAC.on();

View File

@ -65,7 +65,7 @@ PROCESS_THREAD(node_process, ev, data)
#endif
if(is_coordinator) {
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
}
NETSTACK_MAC.on();

View File

@ -73,7 +73,7 @@ PROCESS_THREAD(node_process, ev, data)
#endif
if(is_coordinator) {
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
}
NETSTACK_MAC.on();

View File

@ -14,7 +14,7 @@ PROCESS_THREAD(router_node_process, ev, data)
PROCESS_BEGIN();
/* Set us up as a RPL root node. */
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
/* Initialize the IP64 module so we'll start translating packets */
ip64_init();

View File

@ -237,7 +237,7 @@ setup_network(void)
#endif
NETSTACK_ROUTING.root_set_prefix(&ipaddr, &ipaddr);
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
#endif /* UIP_CONF_ROUTER */
PRINTF("IPv6 addresses: ");

View File

@ -111,7 +111,7 @@ PROCESS_THREAD(rpl_root_process, ev, data)
PRINTF("Multicast Engine: '%s'\n", UIP_MCAST6.name);
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
prepare_mcast();

View File

@ -129,7 +129,7 @@ PROCESS_THREAD(start_app, ev, data)
/* Start net stack */
if(is_coordinator) {
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
}
NETSTACK_MAC.on();
printf("Starting RPL node\n");

View File

@ -349,7 +349,7 @@ PROCESS_THREAD(start_app, ev, data)
/* Start net stack */
if(is_coordinator) {
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
}
NETSTACK_MAC.on();
printf("Starting RPL node\n");

View File

@ -350,7 +350,7 @@ PROCESS_THREAD(start_app, ev, data)
/* Start net stack */
if(is_coordinator) {
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
}
NETSTACK_MAC.on();
printf("Starting RPL node\n");

View File

@ -96,7 +96,7 @@ PROCESS_THREAD(node_process, ev, data)
is_coordinator = node_role > role_6ln;
if(is_coordinator) {
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
}
NETSTACK_MAC.on();

View File

@ -169,7 +169,7 @@ PROCESS_THREAD(node_process, ev, data)
is_coordinator = node_role > role_6ln;
if(is_coordinator) {
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
}
NETSTACK_MAC.on();

View File

@ -104,7 +104,7 @@ PROCESS_THREAD(start_app, ev, data)
/* Start network stack */
if(is_coordinator) {
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
}
NETSTACK_MAC.on();
printf("Starting RPL node\n");

View File

@ -157,7 +157,7 @@ PROCESS_THREAD(border_router_process, ev, data)
PRINTF("\n");
NETSTACK_ROUTING.root_set_prefix(&prefix, NULL);
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
coap_engine_init();
coap_activate_resource(&resource_get_rssi, "Get-RSSI");

View File

@ -145,7 +145,7 @@ PROCESS_THREAD(start_app, ev, data)
/* Start network stack */
if(is_coordinator) {
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
}
NETSTACK_MAC.on();
printf("Starting RPL node\n");

View File

@ -307,7 +307,7 @@ PROCESS_THREAD(router_node_process, ev, data)
leds_off(LEDS_DHCP);
/* Set us up as a RPL root node. */
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
/* ... and do nothing more. */
while(1) {

View File

@ -71,7 +71,7 @@ PROCESS_THREAD(udp_server_process, ev, data)
PROCESS_BEGIN();
/* Initialize DAG root */
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
/* Initialize UDP connection */
simple_udp_register(&udp_conn, UDP_SERVER_PORT, NULL,

View File

@ -357,6 +357,7 @@ const struct routing_driver rpl_classic_driver = {
"RPL Classic",
rpl_init,
rpl_dag_root_set_prefix,
rpl_dag_root_start,
};
/*---------------------------------------------------------------------------*/

View File

@ -197,6 +197,7 @@ const struct routing_driver rpl_lite_driver = {
"RPL Lite",
rpl_init,
rpl_dag_root_set_prefix,
rpl_dag_root_start,
};
/*---------------------------------------------------------------------------*/

View File

@ -65,7 +65,7 @@ set_prefix_64(uip_ipaddr_t *prefix_64)
{
prefix_set = 1;
NETSTACK_ROUTING.root_set_prefix(prefix_64, NULL);
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
}
/*---------------------------------------------------------------------------*/
void

View File

@ -325,7 +325,7 @@ PT_THREAD(cmd_rpl_set_root(struct pt *pt, shell_output_func output, char *args))
shell_output_6addr(output, &prefix);
SHELL_OUTPUT(output, "/64\n");
NETSTACK_ROUTING.root_set_prefix(&prefix, NULL);
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
} else {
SHELL_OUTPUT(output, "Node is already a DAG root\n");
}

View File

@ -40,7 +40,7 @@ PROCESS_THREAD(udp_process, ev, data)
PROCESS_BEGIN();
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
simple_udp_register(&broadcast_connection, UDP_PORT,
NULL, UDP_PORT,

View File

@ -74,7 +74,7 @@ PROCESS_THREAD(unicast_receiver_process, ev, data)
{
PROCESS_BEGIN();
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
simple_udp_register(&unicast_connection, UDP_PORT,
NULL, UDP_PORT, receiver);

View File

@ -72,7 +72,7 @@ PROCESS_THREAD(unicast_receiver_process, ev, data)
{
PROCESS_BEGIN();
rpl_dag_root_start();
NETSTACK_ROUTING.root_start();
simple_udp_register(&unicast_connection, UDP_PORT,
NULL, UDP_PORT, receiver);