From ce4aca093a267da3dcd07b25f4390d393fd3c259 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 1 Jun 2000 16:16:18 +0000 Subject: FIB documentation. I've changed the init callback type to a typedef to work around a bug in kernel-doc I'm too lazy to hunt now. --- nest/route.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'nest/route.h') diff --git a/nest/route.h b/nest/route.h index bc8f351..6d8cc6b 100644 --- a/nest/route.h +++ b/nest/route.h @@ -48,6 +48,8 @@ struct fib_iterator { /* See lib/slists.h for an explanation */ unsigned int hash; }; +typedef void (*fib_init_func)(struct fib_node *); + struct fib { pool *fib_pool; /* Pool holding all our data */ slab *fib_slab; /* Slab holding all fib nodes */ @@ -57,10 +59,10 @@ struct fib { unsigned int hash_shift; /* 16 - hash_log */ unsigned int entries; /* Number of entries */ unsigned int entries_min, entries_max;/* Entry count limits (else start rehashing) */ - void (*init)(struct fib_node *); /* Constructor */ + fib_init_func init; /* Constructor */ }; -void fib_init(struct fib *, pool *, unsigned node_size, unsigned hash_order, void (*init)(struct fib_node *)); +void fib_init(struct fib *, pool *, unsigned node_size, unsigned hash_order, fib_init_func init); void *fib_find(struct fib *, ip_addr *, int); /* Find or return NULL if doesn't exist */ void *fib_get(struct fib *, ip_addr *, int); /* Find or create new if nonexistent */ void *fib_route(struct fib *, ip_addr, int); /* Longest-match routing lookup */ -- cgit v1.2.3