summaryrefslogtreecommitdiff
path: root/nest/proto.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-03-17 14:31:26 +0000
committerMartin Mares <mj@ucw.cz>1999-03-17 14:31:26 +0000
commit529c414953c24c326d9063a8f06fa652f0dfbc30 (patch)
tree805c97ac7b12e7a5d81ab2e69e7138c314855881 /nest/proto.c
parente0f2e42f4f420f7bbdda3d4656c9dda585f1297a (diff)
Allow input and output filters (only accept/reject style as we didn't define
modifying filters yet) to be attached to protocol instances.
Diffstat (limited to 'nest/proto.c')
-rw-r--r--nest/proto.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/nest/proto.c b/nest/proto.c
index 4df625ff..431c47db 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -18,6 +18,7 @@
#include "conf/conf.h"
#include "nest/route.h"
#include "nest/iface.h"
+#include "filter/filter.h"
static pool *proto_pool;
@@ -85,6 +86,8 @@ proto_new(struct proto_config *c, unsigned size)
p->preference = c->preference;
p->disabled = c->disabled;
p->proto = pr;
+ p->in_filter = c->in_filter;
+ p->out_filter = c->out_filter;
return p;
}
@@ -242,6 +245,10 @@ protos_dump_all(void)
{
debug(" protocol %s (pri=%d): state %s/%s\n", p->name, p->proto->priority,
p_states[p->proto_state], c_states[p->core_state]);
+ if (p->in_filter)
+ debug("\tInput filter: %s\n", p->in_filter->name);
+ if (p->out_filter)
+ debug("\tOutput filter: %s\n", p->out_filter->name);
if (p->disabled)
debug("\tDISABLED\n");
else if (p->proto->dump)