* 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 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 before
+ * a route from a routing table to the protocol instance. It can
+ * 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
- * from the same instance and to set default values of the protocol's metrics.
+ * from the same instance.
*
* Result: 1 if the route has to be accepted, -1 if rejected and 0 if it
* should be passed to the filters.
*/
-int preexport(struct proto *p, rte **e, ea_list **attrs, struct linpool *pool)
+int preexport(struct proto *p, rte **e)
{ DUMMY; }
/**
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 (*preexport)(struct proto *, struct rte **rt, struct linpool *pool);
+ int (*preexport)(struct proto *, struct rte **rt);
void (*reload_routes)(struct channel *);
void (*feed_begin)(struct channel *, int initial);
void (*feed_end)(struct channel *);
else if (d->export_mode)
{
struct proto *ep = ec->proto;
- int ic = ep->preexport ? ep->preexport(ep, &e, c->show_pool) : 0;
+ int ic = ep->preexport ? ep->preexport(ep, &e) : 0;
if (ec->ra_mode == RA_OPTIMAL || ec->ra_mode == RA_MERGED)
pass = 1;
rte_make_tmp_attrs(&rt, pool);
- v = p->preexport ? p->preexport(p, &rt, pool) : 0;
+ v = p->preexport ? p->preexport(p, &rt) : 0;
if (v < 0)
{
if (silent)
/* Rest is stripped down export_filter() */
rte_make_tmp_attrs(&rt, lp);
- int v = p->preexport ? p->preexport(p, &rt, lp) : 0;
+ int v = p->preexport ? p->preexport(p, &rt) : 0;
if (v == RIC_PROCESS)
v = (f_run(filter, &rt, lp, FF_SILENT) <= F_ACCEPT);
static int
-babel_preexport(struct proto *P, struct rte **new, struct linpool *pool UNUSED)
+babel_preexport(struct proto *P, struct rte **new)
{
struct rta *a = (*new)->attrs;
*/
int
-bgp_preexport(struct proto *P, rte **new, struct linpool *pool UNUSED)
+bgp_preexport(struct proto *P, rte **new)
{
rte *e = *new;
struct proto *SRC = e->attrs->src->proto;
int bgp_rte_recalculate(rtable *table, net *net, rte *new, rte *old, rte *old_best);
struct rte *bgp_rte_modify_stale(struct rte *r, struct linpool *pool);
void bgp_rt_notify(struct proto *P, struct channel *C, net *n, rte *new, rte *old);
-int bgp_preexport(struct proto *, struct rte **, struct linpool *);
+int bgp_preexport(struct proto *, struct rte **);
int bgp_get_attr(struct eattr *e, byte *buf, int buflen);
void bgp_get_route_info(struct rte *, byte *buf);
#include <stdlib.h>
#include "ospf.h"
-static int ospf_preexport(struct proto *P, rte **new, struct linpool *pool);
+static int ospf_preexport(struct proto *P, rte **new);
static struct ea_list *ospf_make_tmp_attrs(struct rte *rt, struct linpool *pool);
static void ospf_store_tmp_attrs(struct rte *rt);
static void ospf_reload_routes(struct channel *C);
* import to the filters.
*/
static int
-ospf_preexport(struct proto *P, rte **new, struct linpool *pool UNUSED)
+ospf_preexport(struct proto *P, rte **new)
{
struct ospf_proto *p = (struct ospf_proto *) P;
struct ospf_area *oa = ospf_main_area(p);
}
static int
-pipe_preexport(struct proto *P, rte **ee, struct linpool *p UNUSED)
+pipe_preexport(struct proto *P, rte **ee)
{
struct proto *pp = (*ee)->sender->proto;
}
int
-radv_preexport(struct proto *P, rte **new, struct linpool *pool UNUSED)
+radv_preexport(struct proto *P, rte **new)
{
// struct radv_proto *p = (struct radv_proto *) P;
struct radv_config *cf = (struct radv_config *) (P->cf);
}
static int
-krt_preexport(struct proto *P, rte **new, struct linpool *pool UNUSED)
+krt_preexport(struct proto *P, rte **new)
{
// struct krt_proto *p = (struct krt_proto *) P;
rte *e = *new;