diff options
Diffstat (limited to 'nest')
-rw-r--r-- | nest/config.Y | 2 | ||||
-rw-r--r-- | nest/protocol.h | 1 | ||||
-rw-r--r-- | nest/rt-dev.c | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/nest/config.Y b/nest/config.Y index 0cb11080..4bccc166 100644 --- a/nest/config.Y +++ b/nest/config.Y @@ -76,7 +76,7 @@ proto_start: PROTOCOL proto_name: /* EMPTY */ { - struct symbol *s = cf_default_name(this_proto->protocol->name, &this_proto->protocol->name_counter); + struct symbol *s = cf_default_name(this_proto->protocol->template, &this_proto->protocol->name_counter); s->class = SYM_PROTO; s->def = this_proto; this_proto->name = s->name; diff --git a/nest/protocol.h b/nest/protocol.h index d5b5810a..815a7a7b 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -33,6 +33,7 @@ struct symbol; struct protocol { node n; char *name; + char *template; /* Template for automatic generation of names */ unsigned debug; /* Default debugging flags */ int priority; /* Protocol priority (usually 0) */ int name_counter; /* Counter for automatic name generation */ diff --git a/nest/rt-dev.c b/nest/rt-dev.c index 23d9b565..89b22502 100644 --- a/nest/rt-dev.c +++ b/nest/rt-dev.c @@ -88,6 +88,7 @@ dev_reconfigure(struct proto *p, struct proto_config *new) struct protocol proto_device = { name: "Direct", + template: "direct%d", priority: 90, init: dev_init, reconfigure: dev_reconfigure |