summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-06-08 01:23:37 +0200
committerOndrej Filip <feela@network.cz>2000-06-08 01:23:37 +0200
commit1186369bbd45ab901eccc313708cc20f9dbf0f42 (patch)
tree0928a3de04a78d7c8e403c27fbf1e3e6fb8b211e
parent37c3e558ab31a5e6088cef063dcd1e267238be74 (diff)
downloadbird-1186369bbd45ab901eccc313708cc20f9dbf0f42.tar
bird-1186369bbd45ab901eccc313708cc20f9dbf0f42.zip
Doc.
-rw-r--r--proto/ospf/Doc1
-rw-r--r--proto/ospf/rt.c25
2 files changed, 22 insertions, 4 deletions
diff --git a/proto/ospf/Doc b/proto/ospf/Doc
index 40b1534..af74194 100644
--- a/proto/ospf/Doc
+++ b/proto/ospf/Doc
@@ -5,3 +5,4 @@ S iface.c
S packet.c
S lsalib.c
S dbdes.c
+S rt.c
diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c
index 726fe04..46fd134 100644
--- a/proto/ospf/rt.c
+++ b/proto/ospf/rt.c
@@ -28,6 +28,16 @@ init_efib(struct fib_node *fn)
f->nhi=NULL;
}
+/**
+ * ospf_rt_spfa - calculate internal routes
+ * @oa: OSPF area
+ *
+ * Calculation of internal paths in area is described in 16.1 of RFC 2328.
+ * It's based on Dijkstra shortest path tree algorithmus.
+ * RFC recommends to add ASBR routers into routing table. I don't do this
+ * and latter parts of routing table calculation looks directly into LSA
+ * Database. This function is invoked from area_disp().
+ */
void
ospf_rt_spfa(struct ospf_area *oa)
{
@@ -38,7 +48,6 @@ ospf_rt_spfa(struct ospf_area *oa)
struct fib *in=&oa->infib;
struct infib *nf;
struct fib_iterator fit;
- bird_clock_t delta;
int age=0,flush=0;
struct proto *p=&oa->po->proto;
struct proto_ospf *po=oa->po;
@@ -220,7 +229,7 @@ again:
a0.proto=p;
a0.source=RTS_OSPF;
- a0.scope=SCOPE_UNIVERSE; /* What's this good for? */
+ a0.scope=SCOPE_UNIVERSE;
a0.cast=RTC_UNICAST;
if(ipa_to_u32(en->nh)==0) a0.dest=RTD_DEVICE;
else a0.dest=RTD_ROUTER;
@@ -232,7 +241,7 @@ again:
e=rte_get_temp(&a0);
e->u.ospf.metric1=nf->metric;
e->u.ospf.metric2=LSINFINITY;
- e->u.ospf.tag=0; /* FIXME Some config? */
+ e->u.ospf.tag=0;
e->pflags = 0;
e->net=ne;
e->pref = p->preference;
@@ -248,6 +257,14 @@ skip:
ospf_ext_spfa(po);
}
+/**
+ * ospf_ext_spfa - calculate external paths
+ * @po: protocol
+ *
+ * After routing table for any area is calculated, calculation of external
+ * path is invoked. This process is described in 16.6 of RFC 2328.
+ * Inter- and Intra-area paths are always prefered over externals.
+ */
void
ospf_ext_spfa(struct proto_ospf *po) /* FIXME looking into inter-area */
{
@@ -454,7 +471,7 @@ noch:
a0.proto=p;
a0.source=RTS_OSPF_EXT;
- a0.scope=SCOPE_UNIVERSE; /* What's this good for? */
+ a0.scope=SCOPE_UNIVERSE;
a0.cast=RTC_UNICAST;
a0.dest=RTD_ROUTER;
a0.flags=0;