33 #ifndef NEIGHBORATTR_H_
34 #define NEIGHBORATTR_H_
41 #ifdef NEIGHBOR_CONF_MAX_NEIGHBORS
42 #define NEIGHBOR_ATTR_MAX_NEIGHBORS NEIGHBOR_CONF_MAX_NEIGHBORS
44 #define NEIGHBOR_ATTR_MAX_NEIGHBORS 12
77 #define NEIGHBOR_ATTRIBUTE(type, name, default_value_ptr) \
78 static type _##name##_mem[NEIGHBOR_ATTR_MAX_NEIGHBORS]; \
79 static struct neighbor_attr name = \
80 {NULL, sizeof(type), default_value_ptr, (void*)_##name##_mem} ; \
86 #define NEIGHBOR_ATTRIBUTE_NONSTATIC(type, name, default_value_ptr) \
87 static type _##name##_mem[MAX_NEIGHBORS]; \
88 struct neighbor_attr name = \
89 {NULL, sizeof(type), default_value_ptr, (void*)_##name##_mem} ; \
106 int neighbor_attr_has_neighbor(
const rimeaddr_t * addr);
113 int neighbor_attr_add_neighbor(
const rimeaddr_t * addr);
119 int neighbor_attr_remove_neighbor(
const rimeaddr_t * addr);
132 void *neighbor_attr_get_data(
struct neighbor_attr *,
const rimeaddr_t * addr);
142 int neighbor_attr_set_data(
struct neighbor_attr *,
const rimeaddr_t * addr,
149 void neighbor_attr_set_timeout(uint16_t);
154 uint16_t neighbor_attr_get_timeout(
void);
159 void neighbor_attr_tick(
const rimeaddr_t *);