summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-03-26 21:37:29 +0000
committerMartin Mares <mj@ucw.cz>1999-03-26 21:37:29 +0000
commit4ba84ebc8285c3a5c556fc769101cc29cb3d3708 (patch)
treea8f532314dbde727e7865e005863da28f58269c2 /nest
parent241b7311ec5a091b7f3e1a1f2a776f3ef403c500 (diff)
Slightly better generator of default protocol instance names.
Diffstat (limited to 'nest')
-rw-r--r--nest/proto.c1
-rw-r--r--nest/protocol.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/nest/proto.c b/nest/proto.c
index 431c47db..04ee289b 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 1e641a5f..626dd994 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 */