Go to the documentation of this file.
28 #ifndef OPENVPN_PLUGIN_H
29 #define OPENVPN_PLUGIN_H
31 #ifdef ENABLE_CRYPTO_OPENSSL
34 #ifdef ENABLE_CRYPTO_MBEDTLS
43 #define MAX_PLUGINS 16
123 const int init_point);
129 const struct argv *av,
132 int current_cert_depth,
142 const char *colname);
147 void plugin_return_print(
const int msglevel,
const char *prefix,
const struct plugin_return *pr);
189 const struct argv *av,
192 int current_cert_depth,
204 const struct argv *av,
struct openvpn_plugin_string_list * list[MAX_PLUGINS]
openvpn_plugin_open_v1 open1
OPENVPN_PLUGIN_DEF void OPENVPN_PLUGIN_FUNC() openvpn_plugin_client_destructor_v1(openvpn_plugin_handle_t handle, void *per_client_context)
void plugin_option_list_print(const struct plugin_option_list *list, int msglevel)
unsigned int plugin_type_mask
struct plugin_list * plugin_list_inherit(const struct plugin_list *src)
OPENVPN_PLUGIN_DEF int OPENVPN_PLUGIN_FUNC() openvpn_plugin_select_initialization_point_v1(void)
openvpn_plugin_abort_v1 abort
void plugin_return_get_column(const struct plugin_return *src, struct plugin_return *dest, const char *colname)
openvpn_plugin_handle_t plugin_handle
static void plugin_return_init(struct plugin_return *pr)
openvpn_plugin_open_v2 open2
openvpn_plugin_select_initialization_point_v1 initialization_point
void plugin_list_close(struct plugin_list *pl)
void plugin_return_free(struct plugin_return *pr)
OPENVPN_PLUGIN_DEF int OPENVPN_PLUGIN_FUNC() openvpn_plugin_min_version_required_v1(void)
struct plugin_option_list * plugin_option_list_new(struct gc_arena *gc)
openvpn_plugin_func_v2 func2
OPENVPN_PLUGIN_DEF void OPENVPN_PLUGIN_FUNC() 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 g...
static int plugin_call(const struct plugin_list *pl, const int type, const struct argv *av, struct plugin_return *pr, struct env_set *es)
void * per_client_context[MAX_PLUGINS]
OPENVPN_PLUGIN_DEF void *OPENVPN_PLUGIN_FUNC() openvpn_plugin_client_constructor_v1(openvpn_plugin_handle_t handle)
struct plugin plugins[MAX_PLUGINS]
openvpn_plugin_close_v1 close
struct plugin_common * common
openvpn_plugin_client_destructor_v1 client_destructor
struct plugin_list * plugin_list_init(const struct plugin_option_list *list)
int plugin_call_ssl(const struct plugin_list *pl, const int type, const struct argv *av, struct plugin_return *pr, struct env_set *es, int current_cert_depth, openvpn_x509_cert_t *current_cert)
OPENVPN_PLUGIN_DEF void OPENVPN_PLUGIN_FUNC() openvpn_plugin_abort_v1(openvpn_plugin_handle_t handle)
OPENVPN_PLUGIN_DEF openvpn_plugin_handle_t OPENVPN_PLUGIN_FUNC() openvpn_plugin_open_v1(unsigned int *type_mask, const char *argv[], const char *envp[])
OPENVPN_PLUGIN_DEF int OPENVPN_PLUGIN_FUNC() openvpn_plugin_open_v3(const int version, struct openvpn_plugin_args_open_in const *arguments, struct openvpn_plugin_args_open_return *retptr)
This function is called when OpenVPN loads the plug-in.
openvpn_plugin_func_v1 func1
static bool plugin_return_defined(const struct plugin_return *pr)
Garbage collection arena used to keep track of dynamically allocated memory.
bool plugin_defined(const struct plugin_list *pl, const int type)
OPENVPN_PLUGIN_DEF int OPENVPN_PLUGIN_FUNC() 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 h...
OPENVPN_PLUGIN_DEF openvpn_plugin_handle_t OPENVPN_PLUGIN_FUNC() openvpn_plugin_open_v2(unsigned int *type_mask, const char *argv[], const char *envp[], struct openvpn_plugin_string_list **return_list)
struct plugin_option plugins[MAX_PLUGINS]
int requested_initialization_point
struct plugin_per_client per_client
void plugin_list_open(struct plugin_list *pl, const struct plugin_option_list *list, struct plugin_return *pr, const struct env_set *es, const int init_point)
openvpn_plugin_open_v3 open3
openvpn_plugin_client_constructor_v1 client_constructor
static int plugin_n(const struct plugin_list *pl)
openvpn_plugin_func_v3 func3
OPENVPN_PLUGIN_DEF int OPENVPN_PLUGIN_FUNC() openvpn_plugin_func_v2(openvpn_plugin_handle_t handle, const int type, const char *argv[], const char *envp[], void *per_client_context, struct openvpn_plugin_string_list **return_list)
bool plugin_option_list_add(struct plugin_option_list *list, char **p, struct gc_arena *gc)
void * openvpn_plugin_handle_t
openvpn_plugin_min_version_required_v1 min_version_required
OPENVPN_PLUGIN_DEF int OPENVPN_PLUGIN_FUNC() openvpn_plugin_func_v3(const int version, struct openvpn_plugin_args_func_in const *arguments, struct openvpn_plugin_args_func_return *retptr)