From 4ba84ebc8285c3a5c556fc769101cc29cb3d3708 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 26 Mar 1999 21:37:29 +0000 Subject: Slightly better generator of default protocol instance names. --- nest/proto.c | 1 + nest/protocol.h | 1 + 2 files changed, 2 insertions(+) (limited to 'nest') diff --git a/nest/proto.c b/nest/proto.c index 431c47d..04ee289 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -127,6 +127,7 @@ protos_preconfig(struct config *c) WALK_LIST(p, protocol_list) { debug(" %s", p->name); + p->name_counter = 0; if (p->preconfig) p->preconfig(p, c); } diff --git a/nest/protocol.h b/nest/protocol.h index 1e641a5..626dd99 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -31,6 +31,7 @@ struct protocol { char *name; unsigned debug; /* Default debugging flags */ int priority; /* Protocol priority (usually 0) */ + int name_counter; /* Counter for automatic name generation */ void (*preconfig)(struct protocol *, struct config *); /* Just before configuring */ void (*postconfig)(struct proto_config *); /* After configuring each instance */ -- cgit v1.2.3