OpenVPN
|
Go to the source code of this file.
Macros | |
#define | PLUGIN_NAME "base64.c" |
Functions | |
static const char * | get_env (const char *name, const char *envp[]) |
Search the environment pointer for a specific env var name. More... | |
OPENVPN_EXPORT int | openvpn_plugin_open_v3 (const int v3structver, struct openvpn_plugin_args_open_in const *args, struct openvpn_plugin_args_open_return *ret) |
This function is called when OpenVPN loads the plug-in. More... | |
OPENVPN_EXPORT int | openvpn_plugin_func_v1 (openvpn_plugin_handle_t handle, const int type, const char *argv[], const char *envp[]) |
This function is called by OpenVPN each time the OpenVPN reaches a point where plug-in calls should happen. More... | |
OPENVPN_EXPORT void | openvpn_plugin_close_v1 (openvpn_plugin_handle_t handle) |
This cleans up the last part of the plug-in, allows it to shut down cleanly and release the plug-in global context buffer. More... | |
Variables | |
plugin_log_t | ovpn_log = NULL |
Pointer to the OpenVPN log function. More... | |
plugin_vlog_t | ovpn_vlog = NULL |
Pointer to the OpenVPN vlog function. More... | |
plugin_base64_encode_t | ovpn_base64_encode = NULL |
Pointer to the openvpn_base64_encode () function. More... | |
plugin_base64_decode_t | ovpn_base64_decode = NULL |
Pointer to the openvpn_base64_decode () function. More... | |
|
static |
Search the environment pointer for a specific env var name.
PLEASE NOTE! The result is not valid outside the local scope of the calling function. Once the calling function returns, any returned pointers are invalid.
name | String containing the env.var name to search for |
envp | String array pointer to the environment variable |
Definition at line 54 of file base64.c.
Referenced by openvpn_plugin_func_v1().
OPENVPN_EXPORT void openvpn_plugin_close_v1 | ( | openvpn_plugin_handle_t | handle | ) |
OPENVPN_EXPORT int openvpn_plugin_func_v1 | ( | openvpn_plugin_handle_t | handle, |
const int | type, | ||
const char * | argv[], | ||
const char * | envp[] | ||
) |
This function is called by OpenVPN each time the OpenVPN reaches a point where plug-in calls should happen.
It only happens for those plug-in hooks enabled in openvpn_plugin_open_v3().
For the arguments, see the include/openvpn-plugin.h file for details on the function parameters
args | Pointer to a struct with details about the plug-in call from the main OpenVPN process. |
returndata | Pointer to a struct where the plug-in can provide information back to OpenVPN to be processed |
Definition at line 154 of file base64.c.
References get_env(), OPENVPN_PLUGIN_CLIENT_CONNECT_V2, OPENVPN_PLUGIN_FUNC_ERROR, OPENVPN_PLUGIN_FUNC_SUCCESS, OPENVPN_PLUGIN_TLS_VERIFY, ovpn_base64_decode, ovpn_base64_encode, ovpn_log, PLOG_ERR, PLOG_NOTE, and PLUGIN_NAME.
OPENVPN_EXPORT int openvpn_plugin_open_v3 | ( | const int | v3structver, |
struct openvpn_plugin_args_open_in const * | args, | ||
struct openvpn_plugin_args_open_return * | ret | ||
) |
This function is called when OpenVPN loads the plug-in.
The purpose is to initialize the plug-in and tell OpenVPN which plug-in hooks this plug-in wants to be involved in
For the arguments, see the include/openvpn-plugin.h file for details on the function parameters
v3structver | An integer containing the API version of the plug-in structs OpenVPN uses |
args | A pointer to the argument struct for information and features provided by OpenVPN to the plug-in |
ret | A pointer to the struct OpenVPN uses to receive information back from the plug-in |
Definition at line 99 of file base64.c.
References openvpn_plugin_args_open_in::callbacks, openvpn_plugin_args_open_return::handle, OPENVPN_PLUGIN_CLIENT_CONNECT_V2, OPENVPN_PLUGIN_FUNC_ERROR, OPENVPN_PLUGIN_FUNC_SUCCESS, OPENVPN_PLUGIN_MASK, OPENVPN_PLUGIN_TLS_VERIFY, OPENVPN_PLUGINv3_STRUCTVER, ovpn_base64_decode, ovpn_base64_encode, ovpn_log, openvpn_plugin_args_open_in::ovpn_version, openvpn_plugin_args_open_in::ovpn_version_major, openvpn_plugin_args_open_in::ovpn_version_minor, openvpn_plugin_args_open_in::ovpn_version_patch, ovpn_vlog, PLOG_NOTE, openvpn_plugin_callbacks::plugin_base64_decode, openvpn_plugin_callbacks::plugin_base64_encode, openvpn_plugin_callbacks::plugin_log, PLUGIN_NAME, openvpn_plugin_callbacks::plugin_vlog, and openvpn_plugin_args_open_return::type_mask.
plugin_base64_decode_t ovpn_base64_decode = NULL |
Pointer to the openvpn_base64_decode () function.
Definition at line 37 of file base64.c.
Referenced by openvpn_plugin_func_v1(), and openvpn_plugin_open_v3().
plugin_base64_encode_t ovpn_base64_encode = NULL |
Pointer to the openvpn_base64_encode () function.
Definition at line 36 of file base64.c.
Referenced by openvpn_plugin_func_v1(), and openvpn_plugin_open_v3().
plugin_log_t ovpn_log = NULL |
Pointer to the OpenVPN log function.
See plugin_log()
Definition at line 34 of file base64.c.
Referenced by openvpn_plugin_func_v1(), and openvpn_plugin_open_v3().
plugin_vlog_t ovpn_vlog = NULL |
Pointer to the OpenVPN vlog function.
See plugin_vlog()
Definition at line 35 of file base64.c.
Referenced by openvpn_plugin_open_v3().