OpenVPN
Data Structures | Macros | Functions
simple.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "openvpn-plugin.h"
Include dependency graph for simple.c:

Go to the source code of this file.

Data Structures

struct  plugin_context
 
struct  plugin_per_client_context
 

Macros

#define bool   int
 
#define true   1
 
#define false   0
 

Functions

static const char * get_env (const char *name, const char *envp[])
 
static const char * np (const char *str)
 
static int atoi_null0 (const char *str)
 
OPENVPN_EXPORT openvpn_plugin_handle_t openvpn_plugin_open_v1 (unsigned int *type_mask, const char *argv[], const char *envp[])
 
static int auth_user_pass_verify (struct plugin_context *context, struct plugin_per_client_context *pcc, const char *argv[], const char *envp[])
 
static int tls_final (struct plugin_context *context, struct plugin_per_client_context *pcc, const char *argv[], const char *envp[])
 
OPENVPN_EXPORT int 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)
 
OPENVPN_EXPORT void * openvpn_plugin_client_constructor_v1 (openvpn_plugin_handle_t handle)
 
OPENVPN_EXPORT void openvpn_plugin_client_destructor_v1 (openvpn_plugin_handle_t handle, void *per_client_context)
 
OPENVPN_EXPORT void openvpn_plugin_close_v1 (openvpn_plugin_handle_t handle)
 

Macro Definition Documentation

◆ bool

#define bool   int

Definition at line 61 of file simple.c.

◆ false

#define false   0

Definition at line 63 of file simple.c.

Referenced by add_option().

◆ true

#define true   1

Definition at line 62 of file simple.c.

Function Documentation

◆ atoi_null0()

static int atoi_null0 ( const char *  str)
static

Definition at line 121 of file simple.c.

References OPENVPN_EXPORT.

Referenced by openvpn_plugin_open_v1().

◆ auth_user_pass_verify()

static int auth_user_pass_verify ( struct plugin_context context,
struct plugin_per_client_context pcc,
const char *  argv[],
const char *  envp[] 
)
static

◆ get_env()

static const char* get_env ( const char *  name,
const char *  envp[] 
)
static

◆ np()

static const char* np ( const char *  str)
static

◆ openvpn_plugin_client_constructor_v1()

OPENVPN_EXPORT void* openvpn_plugin_client_constructor_v1 ( openvpn_plugin_handle_t  handle)

Definition at line 320 of file simple.c.

References OPENVPN_EXPORT.

◆ openvpn_plugin_client_destructor_v1()

OPENVPN_EXPORT void openvpn_plugin_client_destructor_v1 ( openvpn_plugin_handle_t  handle,
void *  per_client_context 
)

Definition at line 327 of file simple.c.

References free, and OPENVPN_EXPORT.

◆ openvpn_plugin_close_v1()

OPENVPN_EXPORT void openvpn_plugin_close_v1 ( openvpn_plugin_handle_t  handle)

Definition at line 334 of file simple.c.

References free.

◆ openvpn_plugin_func_v2()

OPENVPN_EXPORT int 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 
)

◆ openvpn_plugin_open_v1()

OPENVPN_EXPORT openvpn_plugin_handle_t openvpn_plugin_open_v1 ( unsigned int *  type_mask,
const char *  argv[],
const char *  envp[] 
)

◆ tls_final()

static int tls_final ( struct plugin_context context,
struct plugin_per_client_context pcc,
const char *  argv[],
const char *  envp[] 
)
static