summaryrefslogtreecommitdiff
path: root/proto/ospf/ospf.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-05-27 14:17:35 +0000
committerOndrej Filip <feela@network.cz>2000-05-27 14:17:35 +0000
commite8085abaa76c32bb325e378dfe2851bc98602c1e (patch)
tree37a2a185e6653b859e891fb6ef2a8ccd6c356469 /proto/ospf/ospf.c
parent2d5b999236c20d293006af0b4d94af7ae04dd2a7 (diff)
Originating of external LSA.
Diffstat (limited to 'proto/ospf/ospf.c')
-rw-r--r--proto/ospf/ospf.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index 17149927..7e04a518 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",