Contiki 2.6

neighbor-info.c File Reference

A generic module for management of neighbor information. More...

#include "net/neighbor-info.h"
#include "net/neighbor-attr.h"
#include "net/uip-ds6.h"
#include "net/uip-nd6.h"
#include "net/uip-debug.h"

Go to the source code of this file.

Functions

void neighbor_info_packet_sent (int status, int numtx)
 Notify the neighbor information module about the status of a packet transmission.
void neighbor_info_packet_received (void)
 Notify the neighbor information module that a packet was received.
int neighbor_info_subscribe (neighbor_info_subscriber_t s)
 Subscribe to notifications of changed neighbor information.
link_metric_t neighbor_info_get_metric (const rimeaddr_t *addr)
 Get link metric value for a specific neighbor.

Detailed Description

A generic module for management of neighbor information.

Author:
Nicolas Tsiftes <nvt@sics.se>

Definition in file neighbor-info.c.


Function Documentation

link_metric_t neighbor_info_get_metric ( const rimeaddr_t *  addr)

Get link metric value for a specific neighbor.

Returns:
Returns link metric if the neighbor exists, and 0 if not.

Definition at line 185 of file neighbor-info.c.

References NULL.

void neighbor_info_packet_received ( void  )

Notify the neighbor information module that a packet was received.

Parameters:
statusThe MAC status code for this packet.
numtxThe amount of transmissions made for this packet.

Definition at line 156 of file neighbor-info.c.

References rimeaddr_cmp(), and rimeaddr_null.

void neighbor_info_packet_sent ( int  status,
int  numtx 
)

Notify the neighbor information module about the status of a packet transmission.

Parameters:
statusThe MAC status code for this packet.
numtxThe amount of transmissions made for this packet.

Definition at line 109 of file neighbor-info.c.

References MAC_TX_NOACK, MAC_TX_OK, NULL, rimeaddr_cmp(), rimeaddr_null, and stimer_set().

int neighbor_info_subscribe ( neighbor_info_subscriber_t  )

Subscribe to notifications of changed neighbor information.

Returns:
Returns 1 if the subscription was successful, and 0 if not.

Definition at line 172 of file neighbor-info.c.

References NULL.