From 6be0bac1a15cf528c787cb74fc3e2d71abda2c23 Mon Sep 17 00:00:00 2001 From: nvt-se Date: Fri, 12 Mar 2010 13:40:13 +0000 Subject: [PATCH] minor include fix + added documentation --- core/net/neighbor-info.h | 22 +++++++++++++++++++++- core/net/sicslowpan.c | 3 ++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/core/net/neighbor-info.h b/core/net/neighbor-info.h index b799d0da8..e01c15125 100644 --- a/core/net/neighbor-info.h +++ b/core/net/neighbor-info.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: neighbor-info.h,v 1.1 2010/03/12 13:19:45 nvt-se Exp $ + * $Id: neighbor-info.h,v 1.2 2010/03/12 13:40:13 nvt-se Exp $ */ /** * \file @@ -44,10 +44,30 @@ typedef void (*neighbor_info_subscriber_t)(const rimeaddr_t *, int known, int etx); +/** + * Notify the neighbor information module about the status of + * a packet transmission. + * + * \param status The MAC status code for this packet. + * + * \param numtx The amount of transmissions made for this packet. + */ void neighbor_info_packet_sent(int status, int numtx); +/** + * Notify the neighbor information module that a packet was received. + * + * \param status The MAC status code for this packet. + * + * \param numtx The amount of transmissions made for this packet. + */ void neighbor_info_packet_received(void); +/** + * Subscribe to notifications of changed neighbor information. + * + * \return Returns 1 if the subscription was successful, and 0 if not. + */ int neighbor_info_subscribe(neighbor_info_subscriber_t); #endif /* NEIGHBOR_INFO_H */ diff --git a/core/net/sicslowpan.c b/core/net/sicslowpan.c index 180fe1078..62695ba49 100644 --- a/core/net/sicslowpan.c +++ b/core/net/sicslowpan.c @@ -32,7 +32,7 @@ * * This file is part of the Contiki operating system. * - * $Id: sicslowpan.c,v 1.26 2010/03/12 13:25:14 nvt-se Exp $ + * $Id: sicslowpan.c,v 1.27 2010/03/12 13:40:13 nvt-se Exp $ */ /** * \file @@ -65,6 +65,7 @@ #include "net/uip-netif.h" #include "net/rime.h" #include "net/sicslowpan.h" +#include "net/neighbor-info.h" #include "net/netstack.h" #define DEBUG 0