diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-01-09 18:42:22 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-01-09 18:42:22 +0100 |
commit | 72163bd5f3ccefc1edda585f6f605c37e774a0b8 (patch) | |
tree | 59df1629a4c0884e2072c8082e9b4d392be648e4 /nest/protocol.h | |
parent | 09c1e370b3084f7acb7c3777427670a69945368a (diff) |
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.
Diffstat (limited to 'nest/protocol.h')
-rw-r--r-- | nest/protocol.h | 4 |
1 files changed, 3 insertions, 1 deletions
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); |