summaryrefslogtreecommitdiffstats
path: root/nest/route.h
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-06-01 18:16:18 +0200
committerMartin Mares <mj@ucw.cz>2000-06-01 18:16:18 +0200
commitce4aca093a267da3dcd07b25f4390d393fd3c259 (patch)
tree10d292453dfe4ff735cd24732b56c86321f5fb3c /nest/route.h
parenta783e259d8d710208280126177487cc790418515 (diff)
downloadbird-ce4aca093a267da3dcd07b25f4390d393fd3c259.tar
bird-ce4aca093a267da3dcd07b25f4390d393fd3c259.zip
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.
Diffstat (limited to 'nest/route.h')
-rw-r--r--nest/route.h6
1 files changed, 4 insertions, 2 deletions
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 */