/*---------------------------------------------------------------------------*/ uint16_t collect_neighbor_link_estimate(struct collect_neighbor *n) { if(collect_neighbor_is_congested(n)) { /* printf("Congested %d.%d, sould return %d, returning %d\n", n->addr.u8[0], n->addr.u8[1], collect_link_estimate(&n->le), collect_link_estimate(&n->le) + CONGESTION_PENALTY);*/ return collect_link_estimate(&n->le) + CONGESTION_PENALTY; } else { return collect_link_estimate(&n->le); } }
/*---------------------------------------------------------------------------*/ uint16_t collect_neighbor_rtmetric_link_estimate(struct collect_neighbor *n) { if(n == NULL) { return 0; } return n->rtmetric + collect_link_estimate(&n->le); }