summaryrefslogtreecommitdiffstats
path: root/nest/rt-table.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1998-10-20 17:13:18 +0200
committerMartin Mares <mj@ucw.cz>1998-10-20 17:13:18 +0200
commita0762910a62085d875b5bf5e1494c4fdde6f603f (patch)
treefd7d94a5b8abf9c06b98c4b2596a4050ad2fe295 /nest/rt-table.c
parentb6903c948b2325f11cfb07f2df0590708920b987 (diff)
downloadbird-a0762910a62085d875b5bf5e1494c4fdde6f603f.tar
bird-a0762910a62085d875b5bf5e1494c4fdde6f603f.zip
Added pointer to network to RTE. The complications with passing NET separately
aren't worth 4 bytes per RTE. rte_discard and rte_dump don't need net * as parameter.
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r--nest/rt-table.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index f278c51..7ec4011 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -209,16 +209,19 @@ rte_update(net *net, struct proto *p, rte *new)
}
void
-rte_discard(net *net, rte *old) /* Non-filtered route deletion, used during garbage collection */
+rte_discard(rte *old) /* Non-filtered route deletion, used during garbage collection */
{
- rte_update(net, old->attrs->proto, NULL);
+ rte_update(old->net, old->attrs->proto, NULL);
}
void
-rte_dump(net *n, rte *e)
+rte_dump(rte *e)
{
+ net *n = e->net;
if (n)
debug("%1I/%2d ", n->n.prefix, n->n.pxlen);
+ else
+ debug("??? ");
debug("PF=%02x pref=%d lm=%d ", e->pflags, e->pref, now-e->lastmod);
rta_dump(e->attrs);
if (e->flags & REF_CHOSEN)
@@ -240,7 +243,7 @@ rt_dump(rtable *t)
{
n = (net *) fn;
for(e=n->routes; e; e=e->next)
- rte_dump(n, e);
+ rte_dump(e);
}
FIB_WALK_END;
t = t->sibling;