From 50df8f91a90d8c91676b81cc9668b58914f85b08 Mon Sep 17 00:00:00 2001 From: flu0r1ne Date: Mon, 20 Nov 2023 17:45:24 -0600 Subject: Allow configurable activation policy, allow -h before dropping caps --- src/wg2nd.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/wg2nd.hpp') diff --git a/src/wg2nd.hpp b/src/wg2nd.hpp index 4e3e18a..fbded13 100644 --- a/src/wg2nd.hpp +++ b/src/wg2nd.hpp @@ -17,6 +17,11 @@ namespace wg2nd { + enum class ActivationPolicy { + MANUAL, + UP, + }; + struct Interface { // File name, or defaults to "wg" std::string name; @@ -143,11 +148,14 @@ namespace wg2nd { SystemdConfig gen_systemd_config( Config const & cfg, std::filesystem::path const & keyfile_or_output_path, - std::optional const & filename + std::optional const & filename, + ActivationPolicy activation_policy = ActivationPolicy::MANUAL ); SystemdConfig wg2nd(std::string const & interface_name, std::istream & stream, std::filesystem::path const & keyfile_or_output_path, - std::optional const & filename); + std::optional const & filename, + ActivationPolicy activation_policy = ActivationPolicy::MANUAL + ); }; -- cgit v1.2.3