From e8085abaa76c32bb325e378dfe2851bc98602c1e Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Sat, 27 May 2000 14:17:35 +0000 Subject: Originating of external LSA. --- proto/ospf/ospf.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'proto/ospf/ospf.c') diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c index 1714992..7e04a51 100644 --- a/proto/ospf/ospf.c +++ b/proto/ospf/ospf.c @@ -68,6 +68,7 @@ ospf_init(struct proto_config *c) init_list(&(po->iface_list)); init_list(&(po->area_list)); p->import_control = ospf_import_control; + p->rt_notify = ospf_rt_notify; return p; } @@ -120,7 +121,6 @@ ospf_postconfig(struct proto_config *c) int ospf_import_control(struct proto *p, rte **new, ea_list **attrs, struct linpool *pool) { - int i; rte *e=*new; struct proto_ospf *po=(struct proto_ospf *)p; @@ -129,6 +129,26 @@ ospf_import_control(struct proto *p, rte **new, ea_list **attrs, struct linpool return 0; } +void +ospf_rt_notify(struct proto *p, net *n, rte *new, rte *old, ea_list *attrs) +{ + struct proto_ospf *po=(struct proto_ospf *)p; + + debug("%s: Got route %I/%d %s\n", p->name, n->n.prefix, + n->n.pxlen, new ? "up" : "down"); + + if(new) /* Got some new route */ + { + int i; + /* Originate new external LSA */ + } + else + { + int i; + /* Flush some old external LSA */ + } +} + struct protocol proto_ospf = { name: "OSPF", template: "ospf%d", -- cgit v1.2.3