From bd5d0d62f10c65d56e1900014be5989a3feb8380 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 29 Nov 1998 14:40:39 +0000 Subject: Allow setting debug value and `disabled' flag in protocol definition. --- nest/config.Y | 6 +++++- nest/protocol.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'nest') diff --git a/nest/config.Y b/nest/config.Y index f467a1a..9efebbe 100644 --- a/nest/config.Y +++ b/nest/config.Y @@ -12,7 +12,7 @@ static struct proto *this_proto; CF_DECLS -CF_KEYWORDS(ROUTER, ID, PROTOCOL, PREFERENCE) +CF_KEYWORDS(ROUTER, ID, PROTOCOL, PREFERENCE, DISABLED, DEBUG, ALL, OFF) %type idval @@ -58,6 +58,10 @@ proto_item: if ($2 < 0 || $2 > 255) cf_error("Invalid preference"); this_proto->preference = $2; } + | DISABLED { this_proto->disabled = 1; } + | DEBUG expr { this_proto->debug = $2; } + | DEBUG ALL { this_proto->debug = ~0; } + | DEBUG OFF { this_proto->debug = 0; } ; CF_CODE diff --git a/nest/protocol.h b/nest/protocol.h index d94e02d..34624e9 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -60,6 +60,7 @@ struct proto { pool *pool; /* Local objects */ unsigned preference; /* Default route preference */ unsigned state; /* PRS_... */ + unsigned disabled; /* Manually disabled */ void (*if_notify)(struct proto *, unsigned flags, struct iface *new, struct iface *old); void (*rt_notify)(struct proto *, struct network *net, struct rte *new, struct rte *old); -- cgit v1.2.3