summaryrefslogtreecommitdiff
path: root/nest/rt-fib.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2015-12-21 20:16:05 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2015-12-21 20:28:44 +0100
commit600998fcb1a1d155215ab32644982e9b78767e3e (patch)
tree987193a992951f8a543d3473441202b6b26f0f08 /nest/rt-fib.c
parent67aa88336a91e635753ba42df45d7de5e191ed35 (diff)
Modify FIB_WALK() and FIB_ITERATE() to work with new FIB code
Returned user data pointers have offset relative to fib_node.
Diffstat (limited to 'nest/rt-fib.c')
-rw-r--r--nest/rt-fib.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/nest/rt-fib.c b/nest/rt-fib.c
index 474236e0..c12d0519 100644
--- a/nest/rt-fib.c
+++ b/nest/rt-fib.c
@@ -49,12 +49,6 @@
#define HASH_LO_MIN 10
-static inline void * fib_node_to_user(struct fib *f, struct fib_node *e)
-{ return (void *) ((char *) e - f->node_offset); }
-
-static inline struct fib_node * fib_user_to_node(struct fib *f, void *e)
-{ return (void *) ((char *) e + f->node_offset); }
-
static void
fib_ht_alloc(struct fib *f)
{
@@ -168,7 +162,7 @@ fib_rehash(struct fib *f, int step)
struct fib_node *e = f->hash_table[FIB_HASH(f, a, t)]; \
while (e && !net_equal_##t(CAST(t) e->addr, CAST(t) a)) \
e = e->next; \
- e ? fib_node_to_user(f, e) : NULL; \
+ fib_node_to_user(f, e); \
})
#define FIB_INSERT(f,a,e,t) \