Macros | Functions
init.h File Reference
#include "openvpn.h"
Include dependency graph for init.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define BASE_N_EVENTS   4
#define IVM_LEVEL_1   (1<<0)
#define IVM_LEVEL_2   (1<<1)
#define CC_GC_FREE   (1<<0)
#define CC_USR1_TO_HUP   (1<<1)
#define CC_HARD_USR1_TO_HUP   (1<<2)
#define CC_NO_CLOSE   (1<<3)
#define ISC_ERRORS   (1<<0)
#define ISC_SERVER   (1<<1)


void context_clear (struct context *c)
void context_clear_1 (struct context *c)
void context_clear_2 (struct context *c)
void context_init_1 (struct context *c)
void context_clear_all_except_first_time (struct context *c)
bool init_static (void)
void uninit_static (void)
void init_verb_mute (struct context *c, unsigned int flags)
void init_options_dev (struct options *options)
bool print_openssl_info (const struct options *options)
bool do_genkey (const struct options *options)
bool do_persist_tuntap (const struct options *options)
bool possibly_become_daemon (const struct options *options)
void pre_setup (const struct options *options)
void init_instance_handle_signals (struct context *c, const struct env_set *env, const unsigned int flags)
void init_instance (struct context *c, const struct env_set *env, const unsigned int flags)
void init_query_passwords (const struct context *c)
 Query for private key and auth-user-pass username/passwords. More...
void do_route (const struct options *options, struct route_list *route_list, struct route_ipv6_list *route_ipv6_list, const struct tuntap *tt, const struct plugin_list *plugins, struct env_set *es)
void close_instance (struct context *c)
bool do_test_crypto (const struct options *o)
void context_gc_free (struct context *c)
bool do_up (struct context *c, bool pulled_options, unsigned int option_types_found)
unsigned int pull_permission_mask (const struct context *c)
const char * format_common_name (struct context *c, struct gc_arena *gc)
void reset_coarse_timers (struct context *c)
bool do_deferred_options (struct context *c, const unsigned int found)
void inherit_context_child (struct context *dest, const struct context *src)
void inherit_context_top (struct context *dest, const struct context *src)
void close_context (struct context *c, int sig, unsigned int flags)
struct context_buffersinit_context_buffers (const struct frame *frame)
void free_context_buffers (struct context_buffers *b)
void initialization_sequence_completed (struct context *c, const unsigned int flags)
void init_management (struct context *c)
bool open_management (struct context *c)
void close_management (void)
void management_show_net_callback (void *arg, const int msglevel)
void init_management_callback_p2p (struct context *c)
void uninit_management_callback (void)
void init_plugins (struct context *c)
void open_plugins (struct context *c, const bool import_options, int init_point)
void tun_abort (void)

Macro Definition Documentation


#define BASE_N_EVENTS   4

Definition at line 33 of file init.h.

Referenced by do_event_set_init(), and multi_tcp_init().


#define CC_GC_FREE   (1<<0)

Definition at line 105 of file init.h.

Referenced by close_context(), multi_close_instance(), and multi_top_free().


#define CC_HARD_USR1_TO_HUP   (1<<2)


#define CC_NO_CLOSE   (1<<3)

Definition at line 108 of file init.h.

Referenced by close_context(), and inherit_context_child().


#define CC_USR1_TO_HUP   (1<<1)

Definition at line 106 of file init.h.

Referenced by close_context(), and inherit_context_child().


#define ISC_ERRORS   (1<<0)

Definition at line 116 of file init.h.

Referenced by check_add_routes_action(), and initialization_sequence_completed().


#define ISC_SERVER   (1<<1)


#define IVM_LEVEL_1   (1<<0)

Definition at line 49 of file init.h.

Referenced by do_deferred_options(), init_verb_mute(), openvpn_main(), and test_crypto_thread().


#define IVM_LEVEL_2   (1<<1)

Definition at line 50 of file init.h.

Referenced by do_deferred_options(), init_instance(), and init_verb_mute().

Function Documentation

◆ close_context()

void close_context ( struct context c,
int  sig,
unsigned int  flags 

◆ close_instance()

void close_instance ( struct context c)

◆ close_management()

void close_management ( void  )

Definition at line 3982 of file init.c.

References management_close().

Referenced by open_management(), and openvpn_main().

◆ context_clear()

void context_clear ( struct context c)

Definition at line 70 of file init.c.

References CLEAR.

Referenced by context_clear_all_except_first_time(), and do_test_crypto().

◆ context_clear_1()

void context_clear_1 ( struct context c)

Definition at line 76 of file init.c.

References context::c1, and CLEAR.

Referenced by context_init_1().

◆ context_clear_2()

void context_clear_2 ( struct context c)

Definition at line 82 of file init.c.

References context::c2, and CLEAR.

Referenced by tunnel_point_to_point(), tunnel_server_tcp(), and tunnel_server_udp_single_threaded().

◆ context_clear_all_except_first_time()

void context_clear_all_except_first_time ( struct context c)

Definition at line 88 of file init.c.

References context_clear(), context::first_time, and context::persist.

Referenced by openvpn_main().

◆ context_gc_free()

void context_gc_free ( struct context c)

◆ context_init_1()

void context_init_1 ( struct context c)

◆ do_deferred_options()

bool do_deferred_options ( struct context c,
const unsigned int  found 

◆ do_genkey()

bool do_genkey ( const struct options options)

◆ do_persist_tuntap()

bool do_persist_tuntap ( const struct options options)

◆ do_route()

void do_route ( const struct options options,
struct route_list route_list,
struct route_ipv6_list route_ipv6_list,
const struct tuntap tt,
const struct plugin_list plugins,
struct env_set es 

◆ do_test_crypto()

bool do_test_crypto ( const struct options o)

◆ do_up()

bool do_up ( struct context c,
bool  pulled_options,
unsigned int  option_types_found 

◆ format_common_name()

const char* format_common_name ( struct context c,
struct gc_arena gc 

◆ free_context_buffers()

void free_context_buffers ( struct context_buffers b)

◆ inherit_context_child()

void inherit_context_child ( struct context dest,
const struct context src 

◆ inherit_context_top()

void inherit_context_top ( struct context dest,
const struct context src 

◆ init_context_buffers()

struct context_buffers* init_context_buffers ( const struct frame frame)

◆ init_instance()

void init_instance ( struct context c,
const struct env_set env,
const unsigned int  flags 

Definition at line 4032 of file init.c.

References AR_INTERACT, auth_retry_get(), context::c2, options::ce, CF_INIT_TLS_AUTH_STANDALONE, CF_INIT_TLS_MULTI, CF_LOAD_PERSISTED_PACKET_ID, close_context(), CM_CHILD_TCP, CM_CHILD_UDP, CM_P2P, CM_TOP, context_2::did_open_tun, do_compute_occ_strings(), do_event_set_init(), do_inherit_env(), do_init_buffers(), do_init_crypto(), do_init_first_time(), do_init_fragment(), do_init_frame(), do_init_frame_tls(), do_init_server_poll_timeout(), do_init_socket_1(), do_init_socket_2(), do_init_timers(), do_init_traffic_shaper(), do_link_socket_new(), do_open_ifconfig_pool_persist(), do_open_status_output(), do_open_tun(), do_option_warnings(), do_preresolve(), do_print_data_channel_mtu_parms(), do_setup_fast_io(), do_signal_on_tls_errors(), do_startup_pause(), do_uid_gid_chroot(), context::first_time, connection_entry::fragment, context_2::fragment, fragment_init(), context_2::frame, frame_init_mssfix(), context_2::frame_initial, context_2::gc, gc_init(), init_management_callback_p2p(), init_proxy(), init_query_passwords(), init_verb_mute(), IS_SIG, IVM_LEVEL_2, LS_MODE_DEFAULT, LS_MODE_TCP_ACCEPT_FROM, LS_MODE_TCP_LISTEN, options::mlock, context::mode, next_connection_entry(), context_2::occ_op, occ_reset_op(), open_plugins(), OPENVPN_PLUGIN_INIT_POST_DAEMON, OPENVPN_PLUGIN_INIT_POST_UID_CHANGE, OPENVPN_PLUGIN_INIT_PRE_DAEMON, context::options, P2P_ERROR_DELAY_MS, platform_mlockall(), connection_entry::proto, PROTO_TCP_SERVER, PULL_DEFINED, options::resolve_in_advance, set_check_status_error_delay(), SHAPER_DEFINED, context::sig, SIG_SOURCE_SOFT, signal_info::signal_received, signal_info::signal_text, signal_info::source, and options::up_delay.

Referenced by inherit_context_child(), and init_instance_handle_signals().

◆ init_instance_handle_signals()

void init_instance_handle_signals ( struct context c,
const struct env_set env,
const unsigned int  flags 

◆ init_management()

void init_management ( struct context c)

Definition at line 3922 of file init.c.

References management_init().

Referenced by openvpn_main().

◆ init_management_callback_p2p()

void init_management_callback_p2p ( struct context c)

◆ init_options_dev()

void init_options_dev ( struct options options)

Definition at line 1004 of file init.c.

References basename(), options::dev, options::dev_node, and string_alloc().

Referenced by openvpn_main().

◆ init_plugins()

void init_plugins ( struct context c)

◆ init_query_passwords()

void init_query_passwords ( const struct context c)

Query for private key and auth-user-pass username/passwords.

Definition at line 531 of file init.c.

References options::auth_user_pass_file, auth_user_pass_setup(), options::key_pass_file, context::options, pem_password_setup(), and options::sc_info.

Referenced by init_instance(), and openvpn_main().

◆ init_static()

bool init_static ( void  )

◆ init_verb_mute()

void init_verb_mute ( struct context c,
unsigned int  flags 

◆ initialization_sequence_completed()

void initialization_sequence_completed ( struct context c,
const unsigned int  flags 

◆ management_show_net_callback()

void management_show_net_callback ( void *  arg,
const int  msglevel 

◆ open_management()

bool open_management ( struct context c)

◆ open_plugins()

void open_plugins ( struct context c,
const bool  import_options,
int  init_point 

◆ possibly_become_daemon()

bool possibly_become_daemon ( const struct options options)

◆ pre_setup()

void pre_setup ( const struct options options)

◆ print_openssl_info()

bool print_openssl_info ( const struct options options)

◆ pull_permission_mask()

unsigned int pull_permission_mask ( const struct context c)

◆ reset_coarse_timers()

void reset_coarse_timers ( struct context c)

◆ tun_abort()

void tun_abort ( void  )

Definition at line 2047 of file init.c.

References do_close_tun(), and static_context.

Referenced by openvpn_exit().

◆ uninit_management_callback()

void uninit_management_callback ( void  )

◆ uninit_static()

void uninit_static ( void  )

Definition at line 963 of file init.c.

References free_ssl_lib().

Referenced by openvpn_main().