summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
Diffstat (limited to 'nest')
-rw-r--r--nest/proto.c7
-rw-r--r--nest/protocol.h6
2 files changed, 9 insertions, 4 deletions
diff --git a/nest/proto.c b/nest/proto.c
index 7339e4f4..44cfb637 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -942,8 +942,8 @@ proto_feed_more(void *P)
p->export_state = ES_READY;
proto_log_state_change(p);
- if (p->feed_done)
- p->feed_done(p);
+ if (p->feed_end)
+ p->feed_end(p);
}
else
{
@@ -976,6 +976,9 @@ proto_schedule_feed(struct proto *p, int initial)
p->attn->hook = initial ? proto_feed_initial : proto_feed_more;
ev_schedule(p->attn);
+
+ if (p->feed_begin)
+ p->feed_begin(p, initial);
}
/*
diff --git a/nest/protocol.h b/nest/protocol.h
index f46e0b13..8660cc2c 100644
--- a/nest/protocol.h
+++ b/nest/protocol.h
@@ -179,7 +179,8 @@ struct proto {
* reload_routes Request protocol to reload all its routes to the core
* (using rte_update()). Returns: 0=reload cannot be done,
* 1= reload is scheduled and will happen (asynchronously).
- * feed_done Notify protocol about finish of route feeding.
+ * feed_begin Notify protocol about beginning of route feeding.
+ * feed_end Notify protocol about finish of route feeding.
*/
void (*if_notify)(struct proto *, unsigned flags, struct iface *i);
@@ -190,7 +191,8 @@ struct proto {
void (*store_tmp_attrs)(struct rte *rt, struct ea_list *attrs);
int (*import_control)(struct proto *, struct rte **rt, struct ea_list **attrs, struct linpool *pool);
int (*reload_routes)(struct proto *);
- void (*feed_done)(struct proto *);
+ void (*feed_begin)(struct proto *, int initial);
+ void (*feed_end)(struct proto *);
/*
* Routing entry hooks (called only for routes belonging to this protocol):