summaryrefslogtreecommitdiff
path: root/nest/route.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2015-10-05 12:14:50 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2015-10-05 13:18:10 +0200
commit8465dccb06afffed171dc1e224e4eb5f67cc3326 (patch)
tree9e5209b312ba8b7eabd0f5a22aea4a0888cd8c9f /nest/route.h
parentc7b99a932cab1873042e356143ab71755920157a (diff)
Major RIP redesign
The new RIP implementation fixes plenty of old bugs and also adds support for many new features: ECMP support, link state support, BFD support, configurable split horizon and more. Most options are now per-interface.
Diffstat (limited to 'nest/route.h')
-rw-r--r--nest/route.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/nest/route.h b/nest/route.h
index 6067526d..285fb372 100644
--- a/nest/route.h
+++ b/nest/route.h
@@ -75,6 +75,8 @@ void fib_check(struct fib *); /* Consistency check for debugging */
void fit_init(struct fib_iterator *, struct fib *); /* Internal functions, don't call */
struct fib_node *fit_get(struct fib *, struct fib_iterator *);
void fit_put(struct fib_iterator *, struct fib_node *);
+void fit_put_next(struct fib *f, struct fib_iterator *i, struct fib_node *n, uint hpos);
+
#define FIB_WALK(fib, z) do { \
struct fib_node *z, **ff = (fib)->hash_table; \
@@ -103,6 +105,11 @@ void fit_put(struct fib_iterator *, struct fib_node *);
#define FIB_ITERATE_PUT(it, z) fit_put(it, z)
+#define FIB_ITERATE_PUT_NEXT(it, fib, z) fit_put_next(fib, it, z, hpos)
+
+#define FIB_ITERATE_UNLINK(it, fib) fit_get(fib, it)
+
+
/*
* Master Routing Tables. Generally speaking, each of them contains a FIB
* with each entry pointing to a list of route entries representing routes
@@ -196,10 +203,9 @@ typedef struct rte {
union { /* Protocol-dependent data (metrics etc.) */
#ifdef CONFIG_RIP
struct {
- node garbage; /* List for garbage collection */
- byte metric; /* RIP metric */
+ struct iface *from; /* Incoming iface */
+ u8 metric; /* RIP metric */
u16 tag; /* External route tag */
- struct rip_entry *entry;
} rip;
#endif
#ifdef CONFIG_OSPF