openvpn-plugin.h   openvpn-plugin.h 
skipping to change at line 203 skipping to change at line 203
/* Defines version of the v3 plugin argument structs /* Defines version of the v3 plugin argument structs
* *
* Whenever one or more of these structs are modified, this constant * Whenever one or more of these structs are modified, this constant
* must be updated. A changelog should be appended in this comment * must be updated. A changelog should be appended in this comment
* as well, to make it easier to see what information is available * as well, to make it easier to see what information is available
* in the different versions. * in the different versions.
* *
* Version Comment * Version Comment
* 1 Initial plugin v3 structures providing the same API as * 1 Initial plugin v3 structures providing the same API as
* the v2 plugin interface + X509 certificate information. * the v2 plugin interface, X509 certificate information +
* a logging API for plug-ins.
*
* 2 Added ssl_api member in struct openvpn_plugin_args_open_in
* which identifies the SSL implementation OpenVPN is compiled
* against.
* *
*/ */
#define OPENVPN_PLUGINv3_STRUCTVER 1 #define OPENVPN_PLUGINv3_STRUCTVER 2
/** /**
* Definitions needed for the plug-in callback functions. * Definitions needed for the plug-in callback functions.
*/ */
typedef enum typedef enum
{ {
PLOG_ERR = (1 << 0), /* Error condition message */ PLOG_ERR = (1 << 0), /* Error condition message */
PLOG_WARN = (1 << 1), /* General warning message */ PLOG_WARN = (1 << 1), /* General warning message */
PLOG_NOTE = (1 << 2), /* Informational message */ PLOG_NOTE = (1 << 2), /* Informational message */
PLOG_DEBUG = (1 << 3), /* Debug message, displayed if verb >= 7 */ PLOG_DEBUG = (1 << 3), /* Debug message, displayed if verb >= 7 */
skipping to change at line 261 skipping to change at line 266
* is set. PLOG_DEBUG messages will only be displayed with pl ug-in * is set. PLOG_DEBUG messages will only be displayed with pl ug-in
* debug log verbosity (at the time of writing that's verb >= 7). * debug log verbosity (at the time of writing that's verb >= 7).
*/ */
struct openvpn_plugin_callbacks struct openvpn_plugin_callbacks
{ {
plugin_log_t plugin_log; plugin_log_t plugin_log;
plugin_vlog_t plugin_vlog; plugin_vlog_t plugin_vlog;
}; };
/** /**
* Used by the openvpn_plugin_open_v3() function to indicate to the
* plug-in what kind of SSL implementation OpenVPN uses. This is
* to avoid SEGV issues when OpenVPN is complied against PolarSSL
* and the plug-in against OpenSSL.
*/
typedef enum {
SSLAPI_NONE,
SSLAPI_OPENSSL,
SSLAPI_POLARSSL
} ovpnSSLAPI;
/**
* Arguments used to transport variables to the plug-in. * Arguments used to transport variables to the plug-in.
* The struct openvpn_plugin_args_open_in is only used * The struct openvpn_plugin_args_open_in is only used
* by the openvpn_plugin_open_v3() function. * by the openvpn_plugin_open_v3() function.
* *
* STRUCT MEMBERS * STRUCT MEMBERS
* *
* type_mask : Set by OpenVPN to the logical OR of all script * type_mask : Set by OpenVPN to the logical OR of all script
* types which this version of OpenVPN supports. * types which this version of OpenVPN supports.
* *
* argv : a NULL-terminated array of options provided to the OpenVPN * argv : a NULL-terminated array of options provided to the OpenVPN
skipping to change at line 287 skipping to change at line 304
* *
* callbacks : a pointer to the plug-in callback function struct. * callbacks : a pointer to the plug-in callback function struct.
* *
*/ */
struct openvpn_plugin_args_open_in struct openvpn_plugin_args_open_in
{ {
const int type_mask; const int type_mask;
const char ** const argv; const char ** const argv;
const char ** const envp; const char ** const envp;
struct openvpn_plugin_callbacks *callbacks; struct openvpn_plugin_callbacks *callbacks;
const ovpnSSLAPI ssl_api;
}; };
/** /**
* Arguments used to transport variables from the plug-in back * Arguments used to transport variables from the plug-in back
* to the OpenVPN process. The struct openvpn_plugin_args_open_return * to the OpenVPN process. The struct openvpn_plugin_args_open_return
* is only used by the openvpn_plugin_open_v3() function. * is only used by the openvpn_plugin_open_v3() function.
* *
* STRUCT MEMBERS * STRUCT MEMBERS
* *
* *type_mask : The plug-in should set this value to the logical OR of all script * *type_mask : The plug-in should set this value to the logical OR of all script
skipping to change at line 555 skipping to change at line 573
* *
* REQUIRED: YES * REQUIRED: YES
* *
* Called on initial plug-in load. OpenVPN will preserve plug-in state * Called on initial plug-in load. OpenVPN will preserve plug-in state
* across SIGUSR1 restarts but not across SIGHUP restarts. A SIGHUP reset * across SIGUSR1 restarts but not across SIGHUP restarts. A SIGHUP reset
* will cause the plugin to be closed and reopened. * will cause the plugin to be closed and reopened.
* *
* ARGUMENTS * ARGUMENTS
* *
* version : fixed value, defines the API version of the OpenVPN plug-in AP I. The plug-in * version : fixed value, defines the API version of the OpenVPN plug-in AP I. The plug-in
* should validate that this value is matching the OPENVPN_PLUGIN_ * should validate that this value is matching the OPENVPN_PLUGINv
VERSION value. 3_STRUCTVER
* value.
* *
* arguments : Structure with all arguments available to the plug-in. * arguments : Structure with all arguments available to the plug-in.
* *
* retptr : used to return data back to OpenVPN. * retptr : used to return data back to OpenVPN.
* *
* RETURN VALUE * RETURN VALUE
* *
* OPENVPN_PLUGIN_FUNC_SUCCESS on success, OPENVPN_PLUGIN_FUNC_ERROR on fai lure * OPENVPN_PLUGIN_FUNC_SUCCESS on success, OPENVPN_PLUGIN_FUNC_ERROR on fai lure
*/ */
OPENVPN_PLUGIN_DEF int OPENVPN_PLUGIN_FUNC(openvpn_plugin_open_v3) OPENVPN_PLUGIN_DEF int OPENVPN_PLUGIN_FUNC(openvpn_plugin_open_v3)
 End of changes. 5 change blocks. 
4 lines changed or deleted 23 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/