From 412e341def88b0734fbac2c2f19fcecf2486ee86 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 18 Oct 2015 03:32:21 +0200 Subject: config: make on_up/down/establish/disestablish commands configurable per peer group --- src/peer_group.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/peer_group.h') diff --git a/src/peer_group.h b/src/peer_group.h index ce3a2dc..edba73e 100644 --- a/src/peer_group.h +++ b/src/peer_group.h @@ -48,9 +48,14 @@ struct fastd_peer_group { char *name; /**< The group's name; NULL for the root group */ fastd_string_stack_t *peer_dirs; /**< List of peer directories which belong to this group */ - /* constraints */ int max_connections; /**< The maximum number of connections to allow in this group; -1 for no limit */ fastd_string_stack_t *methods; /**< The list of configured method names */ + + fastd_shell_command_t on_up; /**< The command to execute after the initialization of the tunnel interface */ + fastd_shell_command_t on_down; /**< The command to execute before the destruction of the tunnel interface */ + fastd_shell_command_t on_connect; /**< The command to execute before a handshake is sent to establish a new connection */ + fastd_shell_command_t on_establish; /**< The command to execute when a new connection has been established */ + fastd_shell_command_t on_disestablish; /**< The command to execute when a connection has been disestablished */ }; -- cgit v1.2.3