From ab56f6b16fd9401565a066122be3231dccd24fb6 Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Thu, 24 Feb 2000 00:26:10 +0000 Subject: Area work and router LSA starts when interface goes up. --- proto/ospf/topology.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'proto/ospf/topology.c') diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c index db2065b..60dbd4f 100644 --- a/proto/ospf/topology.c +++ b/proto/ospf/topology.c @@ -23,6 +23,40 @@ #define HASH_LO_STEP 2 #define HASH_LO_MIN 8 +void +addifa_rtlsa(struct ospf_iface *ifa) +{ + struct ospf_area *oa; + struct proto_ospf *po; + + po=ifa->proto; + oa=po->firstarea; + + while(oa!=NULL) + { + if(oa->areaid==ifa->area) break; + oa=oa->next; + } + + if(oa!=NULL) /* Known area */ + { + /**/; + } + else /* New area */ + { + po->areano++; + oa=po->firstarea; + po->firstarea=sl_alloc(po->areaslab); + po->firstarea->next=oa; + po->firstarea->areaid=ifa->area; + po->firstarea->gr=ospf_top_new(po); + } + + /* FIXME Go on, change router lsa, bits and so on... */ +} + + + static void ospf_top_ht_alloc(struct top_graph *f) { -- cgit v1.2.3