diff options
author | Ondrej Filip <feela@network.cz> | 2000-06-07 23:23:37 +0000 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2000-06-07 23:23:37 +0000 |
commit | 1186369bbd45ab901eccc313708cc20f9dbf0f42 (patch) | |
tree | 0928a3de04a78d7c8e403c27fbf1e3e6fb8b211e /proto/ospf | |
parent | 37c3e558ab31a5e6088cef063dcd1e267238be74 (diff) |
Doc.
Diffstat (limited to 'proto/ospf')
-rw-r--r-- | proto/ospf/Doc | 1 | ||||
-rw-r--r-- | proto/ospf/rt.c | 25 |
2 files changed, 22 insertions, 4 deletions
diff --git a/proto/ospf/Doc b/proto/ospf/Doc index 40b1534c..af741942 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 726fe043..46fd134b 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; |