|
OpenVPN
|

Go to the source code of this file.
Data Structures | |
| struct | plugin_context |
Functions | |
| static const char * | get_env (const char *name, const char *envp[]) |
| OPENVPN_EXPORT openvpn_plugin_handle_t | openvpn_plugin_open_v1 (unsigned int *type_mask, const char *argv[], const char *envp[]) |
| 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. | |
| 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. | |
|
static |
| 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
| handle | Pointer to the plug-in global context buffer, which need to be released by this function |
| type | Type of the hook |
| argv | String array pointer to arguments for the hook |
| envp | String array pointer to current environment variables |
Definition at line 104 of file simple.c.
References get_env(), OPENVPN_PLUGIN_FUNC_ERROR, OPENVPN_PLUGIN_FUNC_SUCCESS, plugin_context::password, and plugin_context::username.
| OPENVPN_EXPORT openvpn_plugin_handle_t openvpn_plugin_open_v1 | ( | unsigned int * | type_mask, |
| const char * | argv[], | ||
| const char * | envp[] | ||
| ) |
Definition at line 74 of file simple.c.
References OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY, and OPENVPN_PLUGIN_MASK.