From bddf8207ed07b2ed7f03b09e5453bb685112c9da Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Fri, 22 Apr 2016 23:51:50 +0200 Subject: [PATCH] Link-stats: use new nbr table API --- core/net/link-stats.c | 4 ++-- core/net/nbr-table.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/net/link-stats.c b/core/net/link-stats.c index 37e764458..e8fd70100 100644 --- a/core/net/link-stats.c +++ b/core/net/link-stats.c @@ -143,7 +143,7 @@ link_stats_packet_sent(const linkaddr_t *lladdr, int status, int numtx) stats = nbr_table_get_from_lladdr(link_stats, lladdr); if(stats == NULL) { /* Add the neighbor */ - stats = nbr_table_add_lladdr(link_stats, lladdr); + stats = nbr_table_add_lladdr(link_stats, lladdr, NBR_TABLE_REASON_LINK_STATS, NULL); if(stats != NULL) { stats->etx = LINK_STATS_INIT_ETX(stats); } else { @@ -175,7 +175,7 @@ link_stats_input_callback(const linkaddr_t *lladdr) stats = nbr_table_get_from_lladdr(link_stats, lladdr); if(stats == NULL) { /* Add the neighbor */ - stats = nbr_table_add_lladdr(link_stats, lladdr); + stats = nbr_table_add_lladdr(link_stats, lladdr, NBR_TABLE_REASON_LINK_STATS, NULL); if(stats != NULL) { /* Initialize */ stats->rssi = packet_rssi; diff --git a/core/net/nbr-table.h b/core/net/nbr-table.h index c797a44ec..320ef2e5f 100644 --- a/core/net/nbr-table.h +++ b/core/net/nbr-table.h @@ -83,7 +83,8 @@ typedef enum { NBR_TABLE_REASON_ROUTE, NBR_TABLE_REASON_IPV6_ND, NBR_TABLE_REASON_MAC, - NBR_TABLE_REASON_LLSEC + NBR_TABLE_REASON_LLSEC, + NBR_TABLE_REASON_LINK_STATS, } nbr_table_reason_t; /** \name Neighbor tables: register and loop through table elements */