From 72163bd5f3ccefc1edda585f6f605c37e774a0b8 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Tue, 9 Jan 2018 18:42:22 +0100 Subject: Nest: Allow modification of channels inherited from templates Multiple definitions of same channels are forbidden, but inherited channel can be redefined. In such case channel options are merged. --- nest/protocol.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nest/protocol.h') diff --git a/nest/protocol.h b/nest/protocol.h index c8f37367..9afd3a0a 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -461,6 +461,7 @@ struct channel_config { const char *name; const struct channel_class *channel; + struct proto_config *parent; /* Where channel is defined (proto or template) */ struct rtable_config *table; /* Table we're attached to */ struct filter *in_filter, *out_filter; /* Attached filters */ struct channel_limit rx_limit; /* Limit for receiving routes from protocol @@ -585,7 +586,8 @@ static inline void channel_open(struct channel *c) { channel_set_state(c, CS_UP) static inline void channel_close(struct channel *c) { channel_set_state(c, CS_FLUSHING); } void channel_request_feeding(struct channel *c); -void *channel_config_new(const struct channel_class *cc, uint net_type, struct proto_config *proto); +void *channel_config_new(const struct channel_class *cc, const char *name, uint net_type, struct proto_config *proto); +void *channel_config_get(const struct channel_class *cc, const char *name, uint net_type, struct proto_config *proto); int channel_reconfigure(struct channel *c, struct channel_config *cf); -- cgit v1.2.3