subsys/net/ip/rpl.c
/* Remove DAG parents with a rank that is at least the same as minimum_rank.
 */
Remove DAG parents with a rank that is at least the same as minimum_rank.
Remove DAG parents with a rank that is at least the same as minimum_rank .
static void remove_parents(struct net_if *iface,
			   struct net_rpl_dag *dag,
			   u16_t minimum_rank)
{
	int i;
	NET_DBG("Removing parents minimum rank %u", minimum_rank);
	for (i = 0; i < CONFIG_NET_IPV6_MAX_NEIGHBORS; i++) {
		struct net_nbr *nbr = get_nbr(i);
		struct net_rpl_parent *parent;
		parent = nbr_data(nbr);
		if (dag == parent->dag && parent->rank >= minimum_rank) {
			net_rpl_remove_parent(iface, parent, nbr);
		}
	}
}
static void remove_parents ( struct net_if * iface , struct net_rpl_dag * dag , u16_t minimum_rank ) { int i ; NET_DBG ( " " , minimum_rank ) ; for ( i = 0 ; i < CONFIG_NET_IPV6_MAX_NEIGHBORS ; i ++ ) { struct net_nbr * nbr = get_nbr ( i ) ; struct net_rpl_parent * parent ; parent = nbr_data ( nbr ) ; if ( dag == parent -> dag && parent -> rank >= minimum_rank ) { net_rpl_remove_parent ( iface , parent , nbr ) ; } } }
Remove DAG parents with a rank that is at least the same as minimum_rank.
Remove DAG parents with a rank that is at least the same as minimum_rank .