#ifndef __NEIGHBORS_H__
#define __NEIGHBORS_H__

#include <802_15_4.h>

#define MAX_NEIGHBORS 10

typedef struct {
  unsigned short addr;
  char           seen;
  unsigned char  rssi;
  unsigned char  lqi;
  unsigned long  timer;
} neighbor_t;

#ifdef __cplusplus
extern "C" {
#endif

  void neighbors_init();
  void neighbors_add(saddr_t addr, char seen,
		     unsigned char rssi, unsigned char lqi);
  void neighbors_dump();
  saddr_t neighbors_get_at(unsigned char i);
  unsigned char neighbors_count();
  void neighbors_refresh();
  void neighbors_recv_advertisement(mac_frame * frame, unsigned char rssi,
				    unsigned char lqi);
  void neighbors_send_advertisement();

#ifdef __cplusplus
}
#endif


#endif /* __NEIGHBORS_H__ */
