Added root_start to routing driver
This commit is contained in:
parent
83e9414a71
commit
bc73bb3284
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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: ");
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
|
@ -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) {
|
||||
|
@ -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,
|
||||
|
@ -357,6 +357,7 @@ const struct routing_driver rpl_classic_driver = {
|
||||
"RPL Classic",
|
||||
rpl_init,
|
||||
rpl_dag_root_set_prefix,
|
||||
rpl_dag_root_start,
|
||||
};
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
|
@ -197,6 +197,7 @@ const struct routing_driver rpl_lite_driver = {
|
||||
"RPL Lite",
|
||||
rpl_init,
|
||||
rpl_dag_root_set_prefix,
|
||||
rpl_dag_root_start,
|
||||
};
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
|
@ -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
|
||||
|
@ -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");
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user