Commit 6f3203fa authored by Ondřej Filip's avatar Ondřej Filip

cleanup in lsupd.c, indenting, "struct proto" removed...

parent 9b7de4c4
......@@ -102,7 +102,7 @@ iface_chstate(struct ospf_iface *ifa, u8 state)
ifa->nlsa->lsa.age=LSA_MAXAGE;
if(state>=OSPF_IS_WAITING)
{
net_flush_lsa(ifa->nlsa,po,ifa->oa);
ospf_lsupd_flush_nlsa(ifa->nlsa,ifa->oa);
}
if(can_flush_lsa(ifa->oa)) flush_lsa(ifa->nlsa,ifa->oa);
ifa->nlsa=NULL;
......
/*
* BIRD -- OSPF
*
* (c) 1999 - 2000 Ondrej Filip <feela@network.cz>
* (c) 1999--2004 Ondrej Filip <feela@network.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
......@@ -70,7 +70,7 @@ ospf_age(struct ospf_area *oa)
en->inst_t=now;
en->ini_age=0;
lsasum_calculate(&en->lsa,en->lsa_body,po);
flood_lsa(NULL,NULL,&en->lsa,po,NULL,oa,1);
ospf_lsupd_flood(NULL,NULL,&en->lsa,NULL,oa,1);
continue;
}
if((en->lsa.age=(en->ini_age+(now-en->inst_t)))>=LSA_MAXAGE)
......
......@@ -116,6 +116,6 @@ ospf_lsreq_receive(struct ospf_lsreq_packet *ps,
return;
}
}
ospf_lsupd_tx_list(n, &uplist);
ospf_lsupd_send_list(n, &uplist);
rfree(upslab);
}
This diff is collapsed.
/*
* BIRD -- OSPF
*
* (c) 2000 Ondrej Filip <feela@network.cz>
* (c) 2000--2004 Ondrej Filip <feela@network.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*
......@@ -10,14 +10,12 @@
#ifndef _BIRD_OSPF_LSUPD_H_
#define _BIRD_OSPF_LSUPD_H_
void ospf_lsupd_tx_list(struct ospf_neighbor *n, list *l);
void ospf_lsupd_send_list(struct ospf_neighbor *n, list * l);
void ospf_lsupd_receive(struct ospf_lsupd_packet *ps,
struct ospf_iface *ifa, u16 size);
int flood_lsa(struct ospf_neighbor *n, struct ospf_lsa_header *hn,
struct ospf_lsa_header *hh, struct proto_ospf *po, struct ospf_iface *iff,
struct ospf_area *oa, int rtl);
void net_flush_lsa(struct top_hash_entry *en, struct proto_ospf *po,
struct ospf_area *oa);
struct ospf_iface *ifa, u16 size);
int ospf_lsupd_flood(struct ospf_neighbor *n, struct ospf_lsa_header *hn,
struct ospf_lsa_header *hh, struct ospf_iface *iff,
struct ospf_area *oa, int rtl);
void ospf_lsupd_flush_nlsa(struct top_hash_entry *en, struct ospf_area *oa);
#endif /* _BIRD_OSPF_LSUPD_H_ */
......@@ -600,7 +600,7 @@ rxmt_timer_hook(timer *timer)
en->lsa.id, en->lsa.rt, en->lsa.type);
add_tail(&uplist, NODE llsh);
}
ospf_lsupd_tx_list(n, &uplist);
ospf_lsupd_send_list(n, &uplist);
rfree(upslab);
}
}
......
......@@ -405,7 +405,7 @@ ospf_rt_notify(struct proto *p, net *n, rte *new, rte *old, ea_list *attrs)
ext=en->lsa_body;
if(ipa_compare(ext->netmask, ipa_mkmask(n->n.pxlen))==0)
{
net_flush_lsa(en,po,oa);
ospf_lsupd_flush_nlsa(en,oa);
break;
}
}
......
......@@ -2,7 +2,7 @@
* BIRD -- OSPF Topological Database
*
* (c) 1999 Martin Mares <mj@ucw.cz>
* (c) 1999 - 2000 Ondrej Filip <feela@network.cz>
* (c) 1999 - 2004 Ondrej Filip <feela@network.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
......@@ -215,7 +215,7 @@ originate_rt_lsa(struct ospf_area *oa)
lsasum_calculate(&lsa,body,po);
en=lsa_install_new(&lsa, body, oa);
oa->rt=en;
flood_lsa(NULL,NULL,&oa->rt->lsa,po,NULL,oa,1);
ospf_lsupd_flood(NULL,NULL,&oa->rt->lsa,NULL,oa,1);
schedule_rtcalc(oa);
oa->origrt=0;
}
......@@ -282,7 +282,7 @@ originate_net_lsa(struct ospf_iface *ifa)
ifa->iface->name);
ifa->nlsa->lsa.sn+=1;
ifa->nlsa->lsa.age=LSA_MAXAGE;
flood_lsa(NULL,NULL,&ifa->nlsa->lsa,po,NULL,ifa->oa,0);
ospf_lsupd_flood(NULL,NULL,&ifa->nlsa->lsa,NULL,ifa->oa,0);
s_rem_node(SNODE ifa->nlsa);
if(ifa->nlsa->lsa_body!=NULL) mb_free(ifa->nlsa->lsa_body);
ifa->nlsa->lsa_body=NULL;
......@@ -312,7 +312,7 @@ originate_net_lsa(struct ospf_iface *ifa)
body=originate_net_lsa_body(ifa, &lsa.length, po);
lsasum_calculate(&lsa,body,po);
ifa->nlsa=lsa_install_new(&lsa, body, ifa->oa);
flood_lsa(NULL,NULL,&ifa->nlsa->lsa,po,NULL,ifa->oa,1);
ospf_lsupd_flood(NULL,NULL,&ifa->nlsa->lsa,NULL,ifa->oa,1);
ifa->orignet=0;
}
......@@ -445,7 +445,7 @@ originate_ext_lsa(net *n, rte *e, struct proto_ospf *po, struct ea_list *attrs)
WALK_LIST(oa, po->area_list)
{
en=lsa_install_new(&lsa, body, oa);
flood_lsa(NULL,NULL,&en->lsa,po,NULL,oa,1);
ospf_lsupd_flood(NULL,NULL,&en->lsa,NULL,oa,1);
body=originate_ext_lsa_body(n, e, po, attrs);
}
mb_free(body);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment