Added a function for getting the default RPL instance

This commit is contained in:
Adam Dunkels 2015-03-24 14:41:19 +01:00
parent bab1c48912
commit 06daa08ffc
2 changed files with 9 additions and 0 deletions

View File

@ -517,6 +517,12 @@ rpl_set_default_instance(rpl_instance_t *instance)
default_instance = instance; default_instance = instance;
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
rpl_instance_t *
rpl_get_default_instance(void)
{
return default_instance;
}
/*---------------------------------------------------------------------------*/
void void
rpl_free_instance(rpl_instance_t *instance) rpl_free_instance(rpl_instance_t *instance)
{ {

View File

@ -320,4 +320,7 @@ void rpl_reset_periodic_timer(void);
/* Route poisoning. */ /* Route poisoning. */
void rpl_poison_routes(rpl_dag_t *, rpl_parent_t *); void rpl_poison_routes(rpl_dag_t *, rpl_parent_t *);
rpl_instance_t *rpl_get_default_instance(void);
#endif /* RPL_PRIVATE_H */ #endif /* RPL_PRIVATE_H */