mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
LSA structure changes. (Len added.)
This commit is contained in:
parent
de769e24c0
commit
14a7921c83
@ -23,7 +23,7 @@
|
|||||||
#define HASH_LO_STEP 2
|
#define HASH_LO_STEP 2
|
||||||
#define HASH_LO_MIN 8
|
#define HASH_LO_MIN 8
|
||||||
|
|
||||||
void
|
unsigned int
|
||||||
make_rt_lsa(struct ospf_area *oa, struct proto_ospf *p)
|
make_rt_lsa(struct ospf_area *oa, struct proto_ospf *p)
|
||||||
{
|
{
|
||||||
struct ospf_iface *ifa;
|
struct ospf_iface *ifa;
|
||||||
@ -147,17 +147,16 @@ make_rt_lsa(struct ospf_area *oa, struct proto_ospf *p)
|
|||||||
rt->links=i;
|
rt->links=i;
|
||||||
if(old->lsa_body!=NULL) mb_free(old->lsa_body);
|
if(old->lsa_body!=NULL) mb_free(old->lsa_body);
|
||||||
old->lsa_body=rt;
|
old->lsa_body=rt;
|
||||||
|
return rt->links*sizeof(struct ospf_lsa_rt_link)+sizeof(struct ospf_lsa_rt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
addifa_rtlsa(struct ospf_iface *ifa)
|
addifa_rtlsa(struct ospf_iface *ifa)
|
||||||
{
|
{
|
||||||
struct ospf_area *oa;
|
struct ospf_area *oa;
|
||||||
struct proto_ospf *po;
|
struct proto_ospf *po;
|
||||||
u32 rtid;
|
u32 rtid;
|
||||||
struct top_hash_entry *rt;
|
|
||||||
struct top_graph_rtlsa_link *li, *lih;
|
struct top_graph_rtlsa_link *li, *lih;
|
||||||
|
|
||||||
po=ifa->proto;
|
po=ifa->proto;
|
||||||
@ -196,8 +195,7 @@ addifa_rtlsa(struct ospf_iface *ifa)
|
|||||||
DBG("%s: New OSPF area \"%d\" added.\n", po->proto.name, ifa->an);
|
DBG("%s: New OSPF area \"%d\" added.\n", po->proto.name, ifa->an);
|
||||||
|
|
||||||
}
|
}
|
||||||
make_rt_lsa(oa, po);
|
oa->rt->body_len=make_rt_lsa(oa, po);
|
||||||
/* FIXME length? */
|
|
||||||
/*FIXME seq no++ */
|
/*FIXME seq no++ */
|
||||||
/*FIXME lsa_flood(oa->rt) */
|
/*FIXME lsa_flood(oa->rt) */
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ struct top_hash_entry { /* Index for fast mapping (type,rtrid,LSid)->vertex */
|
|||||||
struct top_hash_entry *next; /* Next in hash chain */
|
struct top_hash_entry *next; /* Next in hash chain */
|
||||||
struct ospf_lsa_header lsa;
|
struct ospf_lsa_header lsa;
|
||||||
void *lsa_body;
|
void *lsa_body;
|
||||||
|
unsigned int body_len;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct top_graph {
|
struct top_graph {
|
||||||
|
Loading…
Reference in New Issue
Block a user