OpenVPN
|
Go to the source code of this file.
Data Structures | |
struct | in_src |
Macros | |
#define | IS_TYPE_FP 1 |
#define | IS_TYPE_BUF 2 |
Functions | |
static void | bypass_doubledash (char **p) |
static bool | space (char c) |
int | parse_line (const char *line, char *p[], const int n, const char *file, const int line_num, msglvl_t msglevel, struct gc_arena *gc) |
static bool | in_src_get (const struct in_src *is, char *line, const int size) |
static char * | read_inline_file (struct in_src *is, const char *close_tag, int *num_lines, struct gc_arena *gc) |
static int | check_inline_file (struct in_src *is, char *p[], struct gc_arena *gc) |
static int | check_inline_file_via_fp (FILE *fp, char *p[], struct gc_arena *gc) |
static int | check_inline_file_via_buf (struct buffer *multiline, char *p[], struct gc_arena *gc) |
void | read_config_file (struct options *options, const char *file, int level, const char *top_file, const int top_line, const msglvl_t msglevel, const unsigned int permission_mask, unsigned int *option_types_found, struct env_set *es) |
void | read_config_string (const char *prefix, struct options *options, const char *config, const msglvl_t msglevel, const unsigned int permission_mask, unsigned int *option_types_found, struct env_set *es) |
void | parse_argv (struct options *options, const int argc, char *argv[], const msglvl_t msglevel, const unsigned int permission_mask, unsigned int *option_types_found, struct env_set *es) |
bool | apply_push_options (struct context *c, struct options *options, struct buffer *buf, unsigned int permission_mask, unsigned int *option_types_found, struct env_set *es, bool is_update) |
void | options_server_import (struct options *o, const char *filename, msglvl_t msglevel, unsigned int permission_mask, unsigned int *option_types_found, struct env_set *es) |
void | options_string_import (struct options *options, const char *config, const msglvl_t msglevel, const unsigned int permission_mask, unsigned int *option_types_found, struct env_set *es) |
#define IS_TYPE_BUF 2 |
Definition at line 228 of file options_parse.c.
#define IS_TYPE_FP 1 |
Definition at line 227 of file options_parse.c.
bool apply_push_options | ( | struct context * | c, |
struct options * | options, | ||
struct buffer * | buf, | ||
unsigned int | permission_mask, | ||
unsigned int * | option_types_found, | ||
struct env_set * | es, | ||
bool | is_update | ||
) |
Definition at line 512 of file options_parse.c.
|
static |
Definition at line 35 of file options_parse.c.
Referenced by read_config_file(), and read_config_string().
Definition at line 305 of file options_parse.c.
References alloc_buf(), BSTR, buf_printf(), free_buf(), gc, buffer::len, read_inline_file(), and string_alloc().
Referenced by check_inline_file_via_buf(), and check_inline_file_via_fp().
|
static |
Definition at line 338 of file options_parse.c.
References check_inline_file(), gc, IS_TYPE_BUF, in_src::multiline, in_src::type, and in_src::u.
Referenced by read_config_string().
|
static |
Definition at line 329 of file options_parse.c.
References check_inline_file(), in_src::fp, gc, IS_TYPE_FP, in_src::type, and in_src::u.
Referenced by read_config_file().
|
static |
Definition at line 238 of file options_parse.c.
References ASSERT, BOOL_CAST, buf_parse(), IS_TYPE_BUF, IS_TYPE_FP, buffer::len, and status.
Referenced by read_inline_file().
void options_server_import | ( | struct options * | o, |
const char * | filename, | ||
msglvl_t | msglevel, | ||
unsigned int | permission_mask, | ||
unsigned int * | option_types_found, | ||
struct env_set * | es | ||
) |
Definition at line 576 of file options_parse.c.
References D_PUSH, es, buffer::len, msg, and read_config_file().
Referenced by multi_client_connect_post().
void options_string_import | ( | struct options * | options, |
const char * | config, | ||
const msglvl_t | msglevel, | ||
const unsigned int | permission_mask, | ||
unsigned int * | option_types_found, | ||
struct env_set * | es | ||
) |
Definition at line 586 of file options_parse.c.
References es, buffer::len, and read_config_string().
Referenced by multi_client_connect_mda(), multi_client_connect_post_plugin(), and open_plugins().
void parse_argv | ( | struct options * | options, |
const int | argc, | ||
char * | argv[], | ||
const msglvl_t | msglevel, | ||
const unsigned int | permission_mask, | ||
unsigned int * | option_types_found, | ||
struct env_set * | es | ||
) |
Definition at line 450 of file options_parse.c.
References add_option(), CLEAR, es, i, buffer::len, MAX_PARMS, msg, and usage().
Referenced by openvpn_main().
int parse_line | ( | const char * | line, |
char * | p[], | ||
const int | n, | ||
const char * | file, | ||
const int | line_num, | ||
msglvl_t | msglevel, | ||
struct gc_arena * | gc | ||
) |
Definition at line 50 of file options_parse.c.
References gc, gc_malloc(), i, M_INFO, M_MSG_VIRT_OUT, M_NOPREFIX, msg, OPTION_PARM_SIZE, SIZE, and space().
Referenced by apply_push_options(), argv_parse_cmd(), make_arg_array(), man_process_command(), read_config_file(), read_config_string(), and remove_iroutes_from_push_route_list().
void read_config_file | ( | struct options * | options, |
const char * | file, | ||
int | level, | ||
const char * | top_file, | ||
const int | top_line, | ||
const msglvl_t | msglevel, | ||
const unsigned int | permission_mask, | ||
unsigned int * | option_types_found, | ||
struct env_set * | es | ||
) |
Definition at line 347 of file options_parse.c.
References add_option(), bypass_doubledash(), check_inline_file_via_fp(), CLEAR, es, in_src::fp, options::gc, MAX_PARMS, msg, OPTION_LINE_SIZE, parse_line(), platform_fopen(), secure_memzero(), SIZE, and streq.
Referenced by add_option(), and options_server_import().
void read_config_string | ( | const char * | prefix, |
struct options * | options, | ||
const char * | config, | ||
const msglvl_t | msglevel, | ||
const unsigned int | permission_mask, | ||
unsigned int * | option_types_found, | ||
struct env_set * | es | ||
) |
Definition at line 421 of file options_parse.c.
References add_option(), buf_parse(), buf_set_read(), bypass_doubledash(), check_inline_file_via_buf(), CLEAR, es, options::gc, buffer::len, MAX_PARMS, OPTION_LINE_SIZE, parse_line(), secure_memzero(), and SIZE.
Referenced by add_option(), options_string_import(), and read_single_config().
|
static |
Definition at line 261 of file options_parse.c.
References alloc_buf(), ASSERT, BSTR, buf_clear(), buf_copy(), buf_printf(), buf_safe(), buffer::capacity, free_buf(), gc, in_src_get(), buffer::len, M_FATAL, msg, OPTION_LINE_SIZE, secure_memzero(), and string_alloc().
Referenced by check_inline_file().
|
inlinestatic |
Definition at line 44 of file options_parse.c.
Referenced by parse_line().