summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
Diffstat (limited to 'nest')
-rw-r--r--nest/proto-hooks.c12
-rw-r--r--nest/protocol.h10
-rw-r--r--nest/route.h2
-rw-r--r--nest/rt-show.c2
-rw-r--r--nest/rt-table.c6
5 files changed, 16 insertions, 16 deletions
diff --git a/nest/proto-hooks.c b/nest/proto-hooks.c
index 71cddd64..bc88b4b4 100644
--- a/nest/proto-hooks.c
+++ b/nest/proto-hooks.c
@@ -258,16 +258,16 @@ void store_tmp_attrs(rte *e, ea_list *attrs)
{ DUMMY; }
/**
- * import_control - pre-filtering decisions on route import
- * @p: protocol instance the route is going to be imported to
+ * preexport - pre-filtering decisions before route export
+ * @p: protocol instance the route is going to be exported to
* @e: the route in question
* @attrs: extended attributes of the route
* @pool: linear pool for allocation of all temporary data
*
- * The import_control() hook is called as the first step of a exporting
+ * The preexport() hook is called as the first step of a exporting
* a route from a routing table to the protocol instance. It can modify
- * route attributes and force acceptance or rejection of the route regardless
- * of user-specified filters. See rte_announce() for a complete description
+ * route attributes and force acceptance or rejection of the route before
+ * the user-specified filters are run. See rte_announce() for a complete description
* of the route distribution process.
*
* The standard use of this hook is to reject routes having originated
@@ -276,7 +276,7 @@ void store_tmp_attrs(rte *e, ea_list *attrs)
* Result: 1 if the route has to be accepted, -1 if rejected and 0 if it
* should be passed to the filters.
*/
-int import_control(struct proto *p, rte **e, ea_list **attrs, struct linpool *pool)
+int preexport(struct proto *p, rte **e, ea_list **attrs, struct linpool *pool)
{ DUMMY; }
/**
diff --git a/nest/protocol.h b/nest/protocol.h
index 61160c0a..3008087b 100644
--- a/nest/protocol.h
+++ b/nest/protocol.h
@@ -191,12 +191,12 @@ struct proto {
* ifa_notify Notify protocol about interface address changes.
* rt_notify Notify protocol about routing table updates.
* neigh_notify Notify protocol about neighbor cache events.
- * make_tmp_attrs Construct ea_list from private attrs stored in rte.
+ * make_tmp_attrs Construct ea_list from private attrs stored in rta.
* store_tmp_attrs Store private attrs back to rta. The route MUST NOT be cached.
- * import_control Called as the first step of the route importing process.
+ * preexport Called as the first step of the route exporting process.
* It can construct a new rte, add private attributes and
- * decide whether the route shall be imported: 1=yes, -1=no,
- * 0=process it through the import filter set by the user.
+ * decide whether the route shall be exported: 1=yes, -1=no,
+ * 0=process it through the export filter set by the user.
* reload_routes Request channel 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).
@@ -210,7 +210,7 @@ struct proto {
void (*neigh_notify)(struct neighbor *neigh);
struct ea_list *(*make_tmp_attrs)(struct rte *rt, struct linpool *pool);
void (*store_tmp_attrs)(struct rte *rt);
- int (*import_control)(struct proto *, struct rte **rt, struct linpool *pool);
+ int (*preexport)(struct proto *, struct rte **rt, struct linpool *pool);
void (*reload_routes)(struct channel *);
void (*feed_begin)(struct channel *, int initial);
void (*feed_end)(struct channel *);
diff --git a/nest/route.h b/nest/route.h
index 60650763..080bbf58 100644
--- a/nest/route.h
+++ b/nest/route.h
@@ -271,7 +271,7 @@ static inline int rte_is_filtered(rte *r) { return !!(r->flags & REF_FILTERED);
#define RA_ANY 3 /* Announcement of any route change */
#define RA_MERGED 4 /* Announcement of optimal route merged with next ones */
-/* Return value of import_control() callback */
+/* Return value of preexport() callback */
#define RIC_ACCEPT 1 /* Accepted by protocol */
#define RIC_PROCESS 0 /* Process it through import filter */
#define RIC_REJECT -1 /* Rejected by protocol */
diff --git a/nest/rt-show.c b/nest/rt-show.c
index 90165c57..c7bcdf2f 100644
--- a/nest/rt-show.c
+++ b/nest/rt-show.c
@@ -133,7 +133,7 @@ rt_show_net(struct cli *c, net *n, struct rt_show_data *d)
else if (d->export_mode)
{
struct proto *ep = ec->proto;
- int ic = ep->import_control ? ep->import_control(ep, &e, c->show_pool) : 0;
+ int ic = ep->preexport ? ep->preexport(ep, &e, c->show_pool) : 0;
if (ec->ra_mode == RA_OPTIMAL || ec->ra_mode == RA_MERGED)
pass = 1;
diff --git a/nest/rt-table.c b/nest/rt-table.c
index e47e03a9..21b6622e 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -407,7 +407,7 @@ export_filter_(struct channel *c, rte *rt0, rte **rt_free, linpool *pool, int si
rte_make_tmp_attrs(&rt, pool);
- v = p->import_control ? p->import_control(p, &rt, pool) : 0;
+ v = p->preexport ? p->preexport(p, &rt, pool) : 0;
if (v < 0)
{
if (silent)
@@ -873,7 +873,7 @@ rt_notify_merged(struct channel *c, net *net, rte *new_changed, rte *old_changed
* routing table @tab) changes In that case @old stores the old route
* from the same protocol.
*
- * For each appropriate protocol, we first call its import_control()
+ * For each appropriate protocol, we first call its preexport()
* hook which performs basic checks on the route (each protocol has a
* right to veto or force accept of the route before any filter is
* asked) and adds default values of attributes specific to the new
@@ -1473,7 +1473,7 @@ rt_examine(rtable *t, net_addr *a, struct proto *p, struct filter *filter)
/* Rest is stripped down export_filter() */
rte_make_tmp_attrs(&rt, rte_update_pool);
- int v = p->import_control ? p->import_control(p, &rt, rte_update_pool) : 0;
+ int v = p->preexport ? p->preexport(p, &rt, rte_update_pool) : 0;
if (v == RIC_PROCESS)
v = (f_run(filter, &rt, rte_update_pool, FF_SILENT) <= F_ACCEPT);