From 6a40276c7500c2d0a2fe44b1a450ffe9cb2f37cd Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Fri, 10 Jul 2015 15:22:28 +0200 Subject: Provide OpenVPN runtime version information to plug-ins Also updated the log_v3 sample-plugin to demonstrate how this works. $ openvpn --plugin log_v3.so --dev tun Fri Jul 10 15:17:28 2015 OpenVPN 2.3_git [git:dev/plugin-version/f05d8623a29078bf+]..... ...more.openvpn.logging... log_v3: OpenVPN 2.3_git (Major: 2, Minor: 3, Patch: git:dev/plugin-version/f05d8623a29078bf+) ...more.openvpn.logging... $ Signed-off-by: David Sommerseth Acked-by: Gert Doering Message-Id: <1436534548-21507-3-git-send-email-openvpn.list@topphemmelig.net> URL: http://article.gmane.org/gmane.network.openvpn.devel/9904 Signed-off-by: Gert Doering --- include/openvpn-plugin.h.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/openvpn-plugin.h.in') diff --git a/include/openvpn-plugin.h.in b/include/openvpn-plugin.h.in index ddf3298..d4bf622 100644 --- a/include/openvpn-plugin.h.in +++ b/include/openvpn-plugin.h.in @@ -215,8 +215,11 @@ struct openvpn_plugin_string_list * which identifies the SSL implementation OpenVPN is compiled * against. * + * 3 Added ovpn_version, ovpn_version_major, ovpn_version_minor + * and ovpn_version_patch to provide the runtime version of + * OpenVPN to plug-ins. */ -#define OPENVPN_PLUGINv3_STRUCTVER 2 +#define OPENVPN_PLUGINv3_STRUCTVER 3 /** * Definitions needed for the plug-in callback functions. @@ -311,6 +314,10 @@ struct openvpn_plugin_args_open_in const char ** const envp; struct openvpn_plugin_callbacks *callbacks; const ovpnSSLAPI ssl_api; + const char *ovpn_version; + const unsigned int ovpn_version_major; + const unsigned int ovpn_version_minor; + const char * const ovpn_version_patch; }; -- cgit