|
OpenVPN
|
#include "basic.h"#include "common.h"#include "mtu.h"#include "route.h"#include "tun.h"#include "socket_util.h"#include "plugin.h"#include "manage.h"#include "proxy.h"#include "comp.h"#include "pushlist.h"#include "clinat.h"#include "crypto_backend.h"#include "dns.h"

Go to the source code of this file.
Data Structures | |
| struct | options_pre_connect |
| struct | local_entry |
| struct | connection_entry |
| struct | remote_entry |
| struct | local_list |
| struct | connection_list |
| struct | remote_list |
| struct | provider_list |
| struct | remote_host_store |
| struct | verify_hash_list |
| struct | options |
| struct | pull_filter |
| struct | pull_filter_list |
Macros | |
| #define | MAX_PARMS 16 |
| #define | OPTION_PARM_SIZE 256 |
| #define | OPTION_LINE_SIZE 256 |
| #define | PING_TIMEOUT_MAX 86400 /* one day (in seconds) */ |
| #define | CE_DISABLED (1u << 0) |
| #define | CE_MAN_QUERY_PROXY (1u << 1) |
| #define | CE_MAN_QUERY_REMOTE_UNDEF 0 |
| #define | CE_MAN_QUERY_REMOTE_QUERY 1 |
| #define | CE_MAN_QUERY_REMOTE_ACCEPT 2 |
| #define | CE_MAN_QUERY_REMOTE_MOD 3 |
| #define | CE_MAN_QUERY_REMOTE_SKIP 4 |
| #define | CE_MAN_QUERY_REMOTE_MASK (0x07u) |
| #define | CE_MAN_QUERY_REMOTE_SHIFT (2) |
| #define | CONNECTION_LIST_SIZE 64 |
| #define | RH_HOST_LEN 80 |
| #define | RH_PORT_LEN 20 |
| #define | MODE_POINT_TO_POINT 0 |
| #define | MODE_SERVER 1 |
| #define | PING_UNDEF 0 |
| #define | PING_EXIT 1 |
| #define | PING_RESTART 2 |
| #define | SF_NOPOOL (1 << 0) |
| #define | SF_TCP_NODELAY_HELPER (1 << 1) |
| #define | SF_NO_PUSH_ROUTE_GATEWAY (1 << 2) |
| #define | OPT_P_GENERAL (1u << 0) |
| #define | OPT_P_UP (1u << 1) |
| #define | OPT_P_ROUTE (1u << 2) |
| #define | OPT_P_DHCPDNS (1u << 3) /* includes ip windows options like */ |
| #define | OPT_P_SCRIPT (1u << 4) |
| #define | OPT_P_SETENV (1u << 5) |
| #define | OPT_P_SHAPER (1u << 6) |
| #define | OPT_P_TIMER (1u << 7) |
| #define | OPT_P_PERSIST (1u << 8) |
| #define | OPT_P_PERSIST_IP (1u << 9) |
| #define | OPT_P_COMP (1u << 10) /* TODO */ |
| #define | OPT_P_MESSAGES (1u << 11) |
| #define | OPT_P_NCP (1u << 12) |
| Negotiable crypto parameters. | |
| #define | OPT_P_TLS_PARMS (1u << 13) /* TODO */ |
| #define | OPT_P_MTU (1u << 14) /* TODO */ |
| #define | OPT_P_NICE (1u << 15) |
| #define | OPT_P_PUSH (1u << 16) |
| #define | OPT_P_INSTANCE (1u << 17) |
| allowed in ccd, client-connect etc | |
| #define | OPT_P_CONFIG (1u << 18) |
| #define | OPT_P_EXPLICIT_NOTIFY (1u << 19) |
| #define | OPT_P_ECHO (1u << 20) |
| #define | OPT_P_INHERIT (1u << 21) |
| #define | OPT_P_ROUTE_EXTRAS (1u << 22) |
| #define | OPT_P_PULL_MODE (1u << 23) |
| #define | OPT_P_PLUGIN (1u << 24) |
| #define | OPT_P_SOCKBUF (1u << 25) |
| #define | OPT_P_SOCKFLAGS (1u << 26) |
| #define | OPT_P_CONNECTION (1u << 27) |
| #define | OPT_P_PEER_ID (1u << 28) |
| #define | OPT_P_INLINE (1u << 29) |
| #define | OPT_P_PUSH_MTU (1u << 30) |
| #define | OPT_P_ROUTE_TABLE (1u << 31) |
| #define | OPT_P_ACC (1ull << 32) |
| #define | OPT_P_DEFAULT (~(OPT_P_INSTANCE | OPT_P_PULL_MODE | OPT_P_PEER_ID | OPT_P_ACC)) |
| #define | PULL_DEFINED(opt) |
| #define | ROUTE_OPTION_FLAGS(o) |
| #define | SHAPER_DEFINED(opt) |
| #define | PLUGIN_OPTION_LIST(opt) |
| #define | MAN_CLIENT_AUTH_ENABLED(opt) |
| #define | OPT_P_U_ROUTE (1 << 0) |
| #define | OPT_P_U_ROUTE6 (1 << 1) |
| #define | OPT_P_U_DNS (1 << 2) |
| #define | OPT_P_U_DHCP (1 << 3) |
| #define | OPT_P_U_REDIR_GATEWAY (1 << 4) |
| #define | PUF_TYPE_UNDEF 0 |
| undefined filter type | |
| #define | PUF_TYPE_ACCEPT 1 |
| filter type to accept a matching option | |
| #define | PUF_TYPE_IGNORE 2 |
| filter type to ignore a matching option | |
| #define | PUF_TYPE_REJECT 3 |
| filter type to reject and trigger SIGUSR1 | |
| #define | AR_NONE 0 |
| #define | AR_INTERACT 1 |
| #define | AR_NOINTERACT 2 |
Enumerations | |
| enum | vlan_acceptable_frames { VLAN_ONLY_TAGGED , VLAN_ONLY_UNTAGGED_OR_PRIORITY , VLAN_ALL } |
| enum | genkey_type { GENKEY_SECRET , GENKEY_TLS_CRYPTV2_CLIENT , GENKEY_TLS_CRYPTV2_SERVER , GENKEY_AUTH_TOKEN } |
Functions | |
| void | add_option (struct options *options, char *p[], bool is_inline, const char *file, int line, const int level, const msglvl_t msglevel, const uint64_t permission_mask, uint64_t *option_types_found, struct env_set *es) |
| void | remove_option (struct context *c, struct options *options, char *p[], bool is_inline, const char *file, int line, const msglvl_t msglevel, const uint64_t permission_mask, uint64_t *option_types_found, struct env_set *es) |
| Resets options found in the PUSH_UPDATE message that are preceded by the - flag. | |
| void | update_option (struct context *c, struct options *options, char *p[], bool is_inline, const char *file, int line, const int level, const msglvl_t msglevel, const uint64_t permission_mask, uint64_t *option_types_found, struct env_set *es) |
| Processes an option to update. | |
| void | parse_argv (struct options *options, const int argc, char *argv[], const msglvl_t msglevel, const uint64_t permission_mask, uint64_t *option_types_found, struct env_set *es) |
| 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 uint64_t permission_mask, uint64_t *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 uint64_t permission_mask, uint64_t *option_types_found, struct env_set *es) |
| void | notnull (const char *arg, const char *description) |
| void | usage_small (void) |
| void | usage (void) |
| void | show_library_versions (const unsigned int flags) |
| static void | show_debug_warning (const unsigned int flags) |
| void | show_windows_version (const unsigned int flags) |
| void | show_dco_version (const unsigned int flags) |
| void | init_options (struct options *o) |
| void | uninit_options (struct options *o) |
| void | setenv_settings (struct env_set *es, const struct options *o) |
| void | options_postprocess (struct options *options, struct env_set *es) |
| bool | options_postprocess_pull (struct options *o, struct env_set *es) |
| void | pre_connect_restore (struct options *o, struct gc_arena *gc) |
| bool | apply_push_options (struct context *c, struct options *options, struct buffer *buf, uint64_t permission_mask, uint64_t *option_types_found, struct env_set *es, bool is_update) |
| void | options_detach (struct options *o) |
| void | options_server_import (struct options *o, const char *filename, msglvl_t msglevel, uint64_t permission_mask, uint64_t *option_types_found, struct env_set *es) |
| void | rol_check_alloc (struct options *options) |
| 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) |
| int | parse_topology (const char *str, const msglvl_t msglevel) |
| const char * | print_topology (const int topology) |
| int | auth_retry_get (void) |
| bool | auth_retry_set (const msglvl_t msglevel, const char *option) |
| const char * | auth_retry_print (void) |
| void | options_string_import (struct options *options, const char *config, const msglvl_t msglevel, const uint64_t permission_mask, uint64_t *option_types_found, struct env_set *es) |
| bool | key_is_external (const struct options *options) |
| bool | has_udp_in_local_list (const struct options *options) |
| static bool | dco_enabled (const struct options *o) |
| Returns whether the current configuration has dco enabled. | |
Variables | |
| const char | title_string [] |
| #define AR_INTERACT 1 |
Definition at line 960 of file options.h.
Referenced by auth_retry_print(), auth_retry_set(), do_init_crypto_tls_c1(), init_instance(), and receive_auth_failed().
| #define AR_NOINTERACT 2 |
Definition at line 961 of file options.h.
Referenced by auth_retry_print(), auth_retry_set(), do_init_crypto_tls_c1(), receive_auth_failed(), and socket_restart_pause().
| #define AR_NONE 0 |
Definition at line 959 of file options.h.
Referenced by auth_retry_print(), auth_retry_set(), do_init_crypto_tls_c1(), and receive_auth_failed().
| #define CE_DISABLED (1u << 0) |
Definition at line 155 of file options.h.
Referenced by management_callback_remote_entry_get(), next_connection_entry(), options_postprocess_http_proxy_override(), and options_postprocess_mutate_ce().
| #define CE_MAN_QUERY_PROXY (1u << 1) |
Definition at line 156 of file options.h.
Referenced by ce_management_query_proxy(), and management_callback_proxy_cmd().
| #define CE_MAN_QUERY_REMOTE_ACCEPT 2 |
Definition at line 159 of file options.h.
Referenced by management_callback_remote_cmd().
| #define CE_MAN_QUERY_REMOTE_MASK (0x07u) |
Definition at line 162 of file options.h.
Referenced by ce_management_query_remote(), and management_callback_remote_cmd().
| #define CE_MAN_QUERY_REMOTE_MOD 3 |
Definition at line 160 of file options.h.
Referenced by management_callback_remote_cmd().
| #define CE_MAN_QUERY_REMOTE_QUERY 1 |
Definition at line 158 of file options.h.
Referenced by ce_management_query_remote(), and management_callback_remote_cmd().
| #define CE_MAN_QUERY_REMOTE_SHIFT (2) |
Definition at line 163 of file options.h.
Referenced by ce_management_query_remote(), and management_callback_remote_cmd().
| #define CE_MAN_QUERY_REMOTE_SKIP 4 |
Definition at line 161 of file options.h.
Referenced by ce_management_query_remote(), and management_callback_remote_cmd().
| #define CONNECTION_LIST_SIZE 64 |
Definition at line 192 of file options.h.
Referenced by alloc_connection_entry(), and alloc_remote_entry().
| #define MAN_CLIENT_AUTH_ENABLED | ( | opt | ) |
Definition at line 795 of file options.h.
Referenced by options_postprocess_verify_ce().
| #define MAX_PARMS 16 |
Definition at line 51 of file options.h.
Referenced by add_option(), apply_push_options(), argv_parse_cmd(), check_tokens(), context_init_1(), init_early(), make_arg_array(), man_process_command(), parse_argv(), read_config_file(), read_config_string(), remove_iroutes_from_push_route_list(), show_settings(), test_parse_line(), test_read_config(), uninit_early(), update_option(), and verify_peer_cert().
| #define MODE_POINT_TO_POINT 0 |
Definition at line 264 of file options.h.
Referenced by add_option(), create_socket_dco_win(), do_up(), helper_keepalive(), init_options(), link_socket_init_phase1(), openvpn_main(), options_postprocess_mutate_invariant(), options_postprocess_mutate_le(), options_string(), ovpn_dco_init(), process_incoming_tun(), and process_outgoing_link().
| #define MODE_SERVER 1 |
Definition at line 265 of file options.h.
Referenced by add_option(), check_tls(), create_socket_dco_win(), determine_common_acc_protocols(), do_init_crypto_tls(), do_init_socket_phase1(), do_option_warnings(), helper_client_server(), helper_keepalive(), helper_setdefault_topology(), helper_tcp_nodelay(), key_method_2_write(), log_acc_message(), multi_io_process_flags(), open_management(), openvpn_main(), options_postprocess_cipher(), options_postprocess_mutate(), options_postprocess_mutate_ce(), options_postprocess_mutate_invariant(), options_postprocess_verify_ce(), options_process_mutate_prf(), ovpn_dco_init(), push_peer_info(), push_peer_info_peerid(), receive_exit_message(), session_move_active(), test_acc_common_protocols(), test_acc_parse_client_messages(), tls_multi_init_finalize(), and tunnel_server().
| #define OPT_P_ACC (1ull << 32) |
Definition at line 773 of file options.h.
Referenced by add_option(), do_deferred_options(), and pull_permission_mask().
| #define OPT_P_COMP (1u << 10) /* TODO */ |
Definition at line 751 of file options.h.
Referenced by add_option(), do_deferred_options(), multi_client_connect_compress_migrate(), and pull_permission_mask().
| #define OPT_P_CONFIG (1u << 18) |
Definition at line 759 of file options.h.
Referenced by add_option().
| #define OPT_P_CONNECTION (1u << 27) |
Definition at line 768 of file options.h.
Referenced by add_option(), remove_option(), and verify_permission().
| #define OPT_P_DEFAULT (~(OPT_P_INSTANCE | OPT_P_PULL_MODE | OPT_P_PEER_ID | OPT_P_ACC)) |
Definition at line 776 of file options.h.
Referenced by open_plugins(), openvpn_main(), and read_single_config().
| #define OPT_P_DHCPDNS (1u << 3) /* includes ip windows options like */ |
Definition at line 744 of file options.h.
Referenced by add_option(), do_deferred_options(), pull_permission_mask(), remove_option(), and update_option().
| #define OPT_P_ECHO (1u << 20) |
Definition at line 761 of file options.h.
Referenced by add_option(), and pull_permission_mask().
| #define OPT_P_EXPLICIT_NOTIFY (1u << 19) |
Definition at line 760 of file options.h.
Referenced by add_option(), do_deferred_options(), and pull_permission_mask().
| #define OPT_P_GENERAL (1u << 0) |
Definition at line 741 of file options.h.
Referenced by add_option().
| #define OPT_P_INHERIT (1u << 21) |
Definition at line 762 of file options.h.
Referenced by add_option().
| #define OPT_P_INLINE (1u << 29) |
Definition at line 770 of file options.h.
Referenced by add_option(), and verify_permission().
| #define OPT_P_INSTANCE (1u << 17) |
allowed in ccd, client-connect etc
Definition at line 758 of file options.h.
Referenced by add_option().
| #define OPT_P_MESSAGES (1u << 11) |
Definition at line 752 of file options.h.
Referenced by add_option(), do_deferred_options(), and pull_permission_mask().
| #define OPT_P_MTU (1u << 14) /* TODO */ |
Definition at line 755 of file options.h.
Referenced by add_option().
| #define OPT_P_NCP (1u << 12) |
Negotiable crypto parameters.
Definition at line 753 of file options.h.
Referenced by add_option(), check_pull_client_ncp(), and pull_permission_mask().
| #define OPT_P_NICE (1u << 15) |
Definition at line 756 of file options.h.
Referenced by add_option().
| #define OPT_P_PEER_ID (1u << 28) |
Definition at line 769 of file options.h.
Referenced by add_option(), do_deferred_options(), and pull_permission_mask().
| #define OPT_P_PERSIST (1u << 8) |
Definition at line 749 of file options.h.
Referenced by add_option(), do_deferred_options(), and pull_permission_mask().
| #define OPT_P_PERSIST_IP (1u << 9) |
Definition at line 750 of file options.h.
Referenced by add_option().
| #define OPT_P_PLUGIN (1u << 24) |
Definition at line 765 of file options.h.
Referenced by add_option(), and open_plugins().
| #define OPT_P_PULL_MODE (1u << 23) |
Definition at line 764 of file options.h.
Referenced by add_option(), pull_permission_mask(), remove_option(), update_option(), and verify_permission().
| #define OPT_P_PUSH (1u << 16) |
Definition at line 757 of file options.h.
Referenced by add_option().
| #define OPT_P_PUSH_MTU (1u << 30) |
Definition at line 771 of file options.h.
Referenced by add_option(), do_deferred_options(), pull_permission_mask(), and remove_option().
| #define OPT_P_ROUTE (1u << 2) |
Definition at line 743 of file options.h.
Referenced by add_option(), do_deferred_options(), pull_permission_mask(), remove_option(), and update_option().
| #define OPT_P_ROUTE_EXTRAS (1u << 22) |
Definition at line 763 of file options.h.
Referenced by add_option(), do_deferred_options(), pull_permission_mask(), and remove_option().
| #define OPT_P_ROUTE_TABLE (1u << 31) |
Definition at line 772 of file options.h.
Referenced by add_option().
| #define OPT_P_SCRIPT (1u << 4) |
Definition at line 745 of file options.h.
Referenced by add_option().
| #define OPT_P_SETENV (1u << 5) |
Definition at line 746 of file options.h.
Referenced by add_option(), do_deferred_options(), and pull_permission_mask().
| #define OPT_P_SHAPER (1u << 6) |
Definition at line 747 of file options.h.
Referenced by add_option(), do_deferred_options(), and pull_permission_mask().
| #define OPT_P_SOCKBUF (1u << 25) |
Definition at line 766 of file options.h.
Referenced by add_option(), do_deferred_options(), and pull_permission_mask().
| #define OPT_P_SOCKFLAGS (1u << 26) |
Definition at line 767 of file options.h.
Referenced by add_option(), and pull_permission_mask().
| #define OPT_P_TIMER (1u << 7) |
Definition at line 748 of file options.h.
Referenced by add_option(), do_deferred_options(), and pull_permission_mask().
| #define OPT_P_TLS_PARMS (1u << 13) /* TODO */ |
Definition at line 754 of file options.h.
Referenced by add_option().
| #define OPT_P_U_DHCP (1 << 3) |
Definition at line 806 of file options.h.
Referenced by update_option().
| #define OPT_P_U_DNS (1 << 2) |
Definition at line 805 of file options.h.
Referenced by update_option().
| #define OPT_P_U_REDIR_GATEWAY (1 << 4) |
Definition at line 807 of file options.h.
Referenced by update_option().
| #define OPT_P_U_ROUTE (1 << 0) |
Definition at line 803 of file options.h.
Referenced by apply_push_options(), and update_option().
| #define OPT_P_U_ROUTE6 (1 << 1) |
Definition at line 804 of file options.h.
Referenced by update_option().
| #define OPT_P_UP (1u << 1) |
Definition at line 742 of file options.h.
Referenced by add_option(), do_deferred_options(), pull_permission_mask(), remove_option(), and send_single_push_update().
| #define OPTION_LINE_SIZE 256 |
Definition at line 57 of file options.h.
Referenced by make_inline_array(), options_string(), parse_auth_pending_keywords(), read_config_file(), read_config_string(), and read_inline_file().
| #define OPTION_PARM_SIZE 256 |
Definition at line 56 of file options.h.
Referenced by add_option(), apply_push_options(), options_warning_extract_parm1(), options_warning_safe_ml(), options_warning_safe_scan1(), options_warning_safe_scan2(), parse_line(), and push_update_digest().
| #define PING_EXIT 1 |
Definition at line 355 of file options.h.
Referenced by add_option(), tls_print_deferred_options_results(), and trigger_ping_timeout_signal().
| #define PING_RESTART 2 |
Definition at line 356 of file options.h.
Referenced by add_option(), helper_keepalive(), trigger_ping_timeout_signal(), and update_options_ce_post().
| #define PING_TIMEOUT_MAX 86400 /* one day (in seconds) */ |
Definition at line 59 of file options.h.
Referenced by add_option(), and helper_keepalive().
| #define PING_UNDEF 0 |
Definition at line 354 of file options.h.
Referenced by tls_print_deferred_options_results(), and update_options_ce_post().
| #define PLUGIN_OPTION_LIST | ( | opt | ) |
Definition at line 789 of file options.h.
Referenced by options_postprocess_verify_ce().
| #define PUF_TYPE_ACCEPT 1 |
filter type to accept a matching option
Definition at line 812 of file options.h.
Referenced by add_option(), apply_pull_filter(), and pull_filter_type_name().
| #define PUF_TYPE_IGNORE 2 |
filter type to ignore a matching option
Definition at line 813 of file options.h.
Referenced by add_option(), apply_pull_filter(), and pull_filter_type_name().
| #define PUF_TYPE_REJECT 3 |
filter type to reject and trigger SIGUSR1
Definition at line 814 of file options.h.
Referenced by add_option(), apply_pull_filter(), and pull_filter_type_name().
| #define PULL_DEFINED | ( | opt | ) |
Definition at line 778 of file options.h.
Referenced by do_up(), init_instance(), and options_string().
| #define RH_HOST_LEN 80 |
Definition at line 233 of file options.h.
Referenced by management_callback_remote_cmd().
| #define RH_PORT_LEN 20 |
Definition at line 235 of file options.h.
Referenced by management_callback_remote_cmd().
| #define ROUTE_OPTION_FLAGS | ( | o | ) |
Definition at line 781 of file options.h.
Referenced by do_close_tun(), do_route(), reset_routes_v4(), and reset_routes_v6().
| #define SF_NO_PUSH_ROUTE_GATEWAY (1 << 2) |
Definition at line 476 of file options.h.
Referenced by add_option(), and helper_client_server().
| #define SF_NOPOOL (1 << 0) |
Definition at line 474 of file options.h.
Referenced by add_option(), and helper_client_server().
| #define SF_TCP_NODELAY_HELPER (1 << 1) |
Definition at line 475 of file options.h.
Referenced by add_option(), helper_tcp_nodelay(), and options_postprocess_verify_ce().
| #define SHAPER_DEFINED | ( | opt | ) |
| enum genkey_type |
| void add_option | ( | struct options * | options, |
| char * | p[], | ||
| bool | is_inline, | ||
| const char * | file, | ||
| int | line, | ||
| const int | level, | ||
| const msglvl_t | msglevel, | ||
| const uint64_t | permission_mask, | ||
| uint64_t * | option_types_found, | ||
| struct env_set * | es ) |
Definition at line 4041 of file options.c.
References ACC_MAX_MSG_LEN, ACC_MIN_MSG_LEN, options::acc_protocols, add_client_nat_to_option_list(), add_route_ipv6_to_option_list(), add_route_to_option_list(), options::aead_usage_limit_override, connection_entry::af, remote_entry::af, compress_options::alg, ALLOC_ARRAY_GC, alloc_buf_gc(), alloc_connection_entry(), alloc_local_entry(), alloc_pull_filter(), alloc_remote_entry(), options::allow_pull_fqdn, options::allow_recursive_routing, ascii2af(), ascii2ipset(), ascii2keydirection(), ascii2proto(), ASSERT, atoi_constrained(), atoi_warn(), atou(), http_proxy_options::auth_file, http_proxy_options::auth_file_up, http_proxy_options::auth_method_string, http_proxy_options::auth_retry, auth_retry_set(), options::auth_token_call_auth, options::auth_token_generate, options::auth_token_lifetime, options::auth_token_renewal, options::auth_token_secret_file, options::auth_token_secret_file_inline, options::auth_user_pass_file, options::auth_user_pass_file_inline, options::auth_user_pass_username_only, options::auth_user_pass_verify_script, options::auth_user_pass_verify_script_via_file, options::authname, options::backwards_compatible, connection_entry::bind_defined, options::bind_dev, connection_entry::bind_ipv6_only, connection_entry::bind_local, options::block_ipv6, options::block_outside_dns, BOOL_CAST, boolean_flag(), BSTR, buf_cstr(), buf_len(), buf_printf(), options::ca_file, options::ca_file_inline, options::ca_path, CC_ALNUM, CC_COLON, CC_DASH, CC_UNDERBAR, options::ccd_exclusive, options::cd_dir, options::ce, options::cert_file, options::cert_file_inline, options::cf_initial_max, options::cf_initial_per, options::cf_max, options::cf_per, static_challenge_info::challenge_text, check_dns_option(), check_expected_uint, check_route6_option(), check_route_option(), options::chroot_dir, options::cipher_list, options::cipher_list_tls13, options::ciphername, options::client, options::client_config_dir, options::client_connect_script, options::client_crresponse_script, options::client_disconnect_script, options::client_nat, cnol_check_alloc(), CO_EPOCH_DATA_KEY_FORMAT, CO_USE_CC_EXIT_NOTIFY, CO_USE_DYNAMIC_TLS_CRYPT, CO_USE_TLS_KEY_MATERIAL_EXPORT, options::comp, COMP_ALG_LZ4, COMP_ALG_LZO, COMP_ALG_STUB, COMP_ALG_UNDEF, COMP_ALGV2_LZ4, COMP_ALGV2_UNCOMPRESSED, COMP_F_ADVERTISE_STUBS_ONLY, COMP_F_ALLOW_ASYM, COMP_F_ALLOW_STUB_ONLY, COMP_F_MIGRATE, COMP_F_SWAP, comp_non_stub_enabled(), options::config, options::connect_retry_max, connection_entry::connect_retry_seconds, connection_entry::connect_retry_seconds_max, connection_entry::connect_timeout, connection_entry_load_re(), constrain_int(), http_custom_header::content, options::crl_file, options::crl_file_inline, options::cryptoapi_cert, http_proxy_options::custom_headers, D_PUSH, D_TLS_DEBUG_MED, options::daemon, options::dev, options::dev_node, options::dev_type, options::dh_file, options::dh_file_inline, tuntap_options::dhcp_lease_time, tuntap_options::dhcp_masq_custom_offset, tuntap_options::dhcp_masq_offset, dhcp_option_address_parse(), dhcp_option_dns6_parse(), tuntap_options::dhcp_options, DHCP_OPTIONS_DHCP_OPTIONAL, DHCP_OPTIONS_DHCP_REQUIRED, tuntap_options::dhcp_pre_release, dhcp_release_by_adapter_index(), tuntap_options::dhcp_renew, dhcp_renew_by_adapter_index(), options::disable, options::disable_dco, tuntap_options::disable_nbt, options::dns_options, DNS_UPDOWN_FORCED, DNS_UPDOWN_NO_FLAGS, DNS_UPDOWN_USER_SET, dns_updown_user_set(), options::down_pre, options::down_script, options::duplicate_cn, options::ecdh_curve, options::enable_c2c, options::enable_ncp_fallback, options::engine, errors_to_stderr(), options::exit_event_initial_state, options::exit_event_name, connection_entry::explicit_exit_notification, EXPORT_KEY_DATA_LABEL, options::extra_certs_file, options::extra_certs_file_inline, compress_options::flags, route_ipv6_option_list::flags, route_option_list::flags, static_challenge_info::flags, options::force_key_material_export, options::forward_compatible, connection_entry::fragment, connection_entry::fragment_encap, dns_options::from_dhcp, gc, options::gc, gc_free(), gc_new(), gc_transfer(), options::genkey, GENKEY_AUTH_TOKEN, options::genkey_extra_data, options::genkey_filename, GENKEY_SECRET, GENKEY_TLS_CRYPTV2_CLIENT, GENKEY_TLS_CRYPTV2_SERVER, options::genkey_type, get_default_gateway(), get_default_gateway_ipv6(), get_ip_addr(), get_ipv6_addr(), get_ipv6_addr_no_netbits(), get_list_intersection(), getaddr(), GETADDR_HOST_ORDER, GETADDR_RESOLVE, options::groupname, options::handshake_window, connection_entry::http_proxy_options, options::http_proxy_override, http_proxy_options::http_version, options::ifconfig_ipv6_local, options::ifconfig_ipv6_netbits, options::ifconfig_ipv6_pool_base, options::ifconfig_ipv6_pool_defined, options::ifconfig_ipv6_pool_netbits, options::ifconfig_ipv6_remote, options::ifconfig_local, options::ifconfig_noexec, options::ifconfig_nowarn, options::ifconfig_pool_defined, options::ifconfig_pool_end, options::ifconfig_pool_netmask, options::ifconfig_pool_persist_filename, options::ifconfig_pool_persist_refresh_freq, options::ifconfig_pool_start, ifconfig_pool_verify_range(), options::ifconfig_remote_netmask, options::ignore_unknown_option, options::imported_protocol_flags, options::inactivity_minimum_bytes, options::inactivity_timeout, init_http_proxy_options_once(), init_options(), http_proxy_options::inline_creds, ip_or_dns_addr_safe(), options::ip_remote_hint, tuntap_options::ip_win32_defined, tuntap_options::ip_win32_type, options::ipchange, ipconfig_register_dns(), ipset2ascii_all(), ipv6_addr_safe(), IPW32_SET_ADAPTIVE, IPW32_SET_ADAPTIVE_DELAY_WINDOW, IPW32_SET_DHCP_MASQ, is_special_addr(), options::keepalive_ping, options::keepalive_timeout, connection_entry::key_direction, options::key_direction, KEY_DIRECTION_BIDIRECTIONAL, options::key_pass_file, options::keying_material_exporter_label, options::keying_material_exporter_length, options::learn_address_script, connection_entry::link_mtu, connection_entry::link_mtu_defined, options::lladdr, local_entry::local, connection_entry::local_port, connection_entry::local_port_defined, options::log, M_DEBUG_LEVEL, M_ERR, M_FATAL, M_INFO, M_NOPREFIX, M_VERB0, M_WARN, mac_addr_safe(), options::machine_readable_output, options::management_addr, management_auth_token(), options::management_certificate, options::management_client_group, options::management_client_user, management_echo(), options::management_flags, options::management_log_history_cache, options::management_port, options::management_user_pass, options::mark, options::max_clients, MAX_CUSTOM_HTTP_HEADER, max_int(), MAX_PARMS, MAX_PEER_ID, options::max_routes_per_client, MAX_SEQ_BACKTRACK, MAX_TIME_BACKTRACK, MBUF_SIZE_MAX, MD_SHA1, MD_SHA256, MF_CLIENT_AUTH, MF_CONNECT_AS_CLIENT, MF_EXTERNAL_CERT, MF_EXTERNAL_KEY, MF_EXTERNAL_KEY_DIGEST, MF_EXTERNAL_KEY_NOPADDING, MF_EXTERNAL_KEY_PKCS1PAD, MF_EXTERNAL_KEY_PSSPAD, MF_FORGET_DISCONNECT, MF_HOLD, MF_QUERY_PASSWORDS, MF_QUERY_PROXY, MF_QUERY_REMOTE, MF_SIGNAL, MF_UNIX_SOCK, MF_UP_DOWN, MIN_SEQ_BACKTRACK, MIN_TIME_BACKTRACK, options::mlock, options::mode, MODE_POINT_TO_POINT, MODE_SERVER, msg, options::msg_channel, msglevel_forward_compatible(), msglevel_unknown_option(), connection_entry::mssfix, connection_entry::mssfix_default, connection_entry::mssfix_encap, connection_entry::mssfix_fixed, connection_entry::mtu_discover_type, options::mtu_test, options::mute, options::mute_replay_warnings, options::n_bcast_buf, N_SEARCH_LIST_LEN, http_custom_header::name, provider_list::names, tuntap_options::nbdd, tuntap_options::nbdd_len, options::ncp_ciphers, net_ctx_init(), tuntap_options::netbios_node_type, tuntap_options::netbios_scope, verify_hash_list::next, options::nice, NM_QUOTE_HINT, no_more_than_n_args(), NS_CERT_CHECK_CLIENT, NS_CERT_CHECK_SERVER, options::ns_cert_type, tuntap_options::ntp, tuntap_options::ntp_len, options::occ, connection_entry::occ_mtu, open_syslog(), OPENVPN_8021Q_MAX_VID, OPENVPN_8021Q_MIN_VID, openvpn_exit(), OPENVPN_EXIT_STATUS_GOOD, OPENVPN_KU_REQUIRED, OPT_P_ACC, OPT_P_COMP, OPT_P_CONFIG, OPT_P_CONNECTION, OPT_P_DHCPDNS, OPT_P_ECHO, OPT_P_EXPLICIT_NOTIFY, OPT_P_GENERAL, OPT_P_INHERIT, OPT_P_INLINE, OPT_P_INSTANCE, OPT_P_MESSAGES, OPT_P_MTU, OPT_P_NCP, OPT_P_NICE, OPT_P_PEER_ID, OPT_P_PERSIST, OPT_P_PERSIST_IP, OPT_P_PLUGIN, OPT_P_PULL_MODE, OPT_P_PUSH, OPT_P_PUSH_MTU, OPT_P_ROUTE, OPT_P_ROUTE_EXTRAS, OPT_P_ROUTE_TABLE, OPT_P_SCRIPT, OPT_P_SETENV, OPT_P_SHAPER, OPT_P_SOCKBUF, OPT_P_SOCKFLAGS, OPT_P_TIMER, OPT_P_TLS_PARMS, OPT_P_UP, option_iroute(), option_iroute_ipv6(), OPTION_PARM_SIZE, options::override_username, PAR_ALL, PAR_NCT, parse_hash_fingerprint_multiline(), parse_http_proxy_override(), parse_topology(), pull_filter::pattern, options::peer_id, options::persist_config, options::persist_local_ip, options::persist_mode, options::persist_remote_ip, options::persist_tun, PING_EXIT, options::ping_rec_timeout, options::ping_rec_timeout_action, PING_RESTART, options::ping_send_timeout, PING_TIMEOUT_MAX, options::ping_timer_remote, options::pkcs12_file, options::pkcs12_file_inline, platform_chdir(), options::plugin_list, plugin_option_list_add(), plugin_option_list_new(), http_proxy_options::port, local_entry::port, positive_atoi(), positive_atoll(), print_default_gateway(), options::priv_key_file, options::priv_key_file_inline, connection_entry::proto, local_entry::proto, remote_entry::proto, proto2ascii_all(), options::proto_force, options::providers, PUF_TYPE_ACCEPT, PUF_TYPE_IGNORE, PUF_TYPE_REJECT, options::pull, options::push_continuation, options::push_ifconfig_constraint_defined, options::push_ifconfig_constraint_netmask, options::push_ifconfig_constraint_network, options::push_ifconfig_defined, options::push_ifconfig_ipv6_blocked, options::push_ifconfig_ipv6_defined, options::push_ifconfig_ipv6_local, options::push_ifconfig_ipv6_netbits, options::push_ifconfig_ipv6_remote, options::push_ifconfig_local, options::push_ifconfig_local_alias, options::push_ifconfig_remote_netmask, push_options(), options::push_peer_info, push_remove_option(), push_reset(), options::pushed_acc_max_message_length, options::pushed_acc_negotiated_protocols, options::rcvbuf, read_config_file(), read_config_string(), options::real_hash_size, redirect_stdout_stderr(), tuntap_options::register_dns, RELIABLE_MAX_INITIAL_TIMEOUT, remap_redirect_gateway_flags(), options::remap_sigusr1, connection_entry::remote, remote_entry::remote, options::remote_cert_eku, options::remote_cert_ku, connection_entry::remote_float, connection_entry::remote_port, remote_entry::remote_port, options::remote_random, options::renegotiate_bytes, options::renegotiate_packets, options::renegotiate_seconds, options::renegotiate_seconds_min, options::replay_time, options::replay_window, RESOLV_RETRY_INFINITE, options::resolve_in_advance, options::resolve_retry_seconds, RG_AUTO_LOCAL, RG_BLOCK_LOCAL, RG_BYPASS_DHCP, RG_BYPASS_DNS, RG_DEF1, RG_ENABLE, RG_LOCAL, RG_REROUTE_GW, rol6_check_alloc(), rol_check_alloc(), options::route_default_gateway, options::route_default_metric, options::route_default_table_id, options::route_delay, options::route_delay_defined, options::route_delay_window, options::route_gateway_via_dhcp, options::route_ipv6_default_gateway, options::route_method, ROUTE_METHOD_ADAPTIVE, ROUTE_METHOD_EXE, ROUTE_METHOD_IPAPI, ROUTE_METHOD_SERVICE, options::route_noexec, options::route_nopull, options::route_predown_script, options::route_script, options::routes, options::routes_ipv6, SC_CONCAT, SC_ECHO, options::sc_info, script_security_set(), SDL_CONSTRAIN, http_proxy_options::server, options::server_bridge_defined, options::server_bridge_ip, options::server_bridge_netmask, options::server_bridge_pool_end, options::server_bridge_pool_start, options::server_bridge_proxy_dhcp, options::server_defined, options::server_flags, options::server_ipv6_defined, options::server_netbits_ipv6, options::server_netmask, options::server_network, options::server_network_ipv6, options::session_timeout, set_debug_level(), set_machine_readable_output(), set_pause_exit_win32(), set_suppress_timestamps(), set_user_script(), set_win_sys_path(), setenv_int(), setenv_str(), setenv_str_safe(), SF_HOST_RANDOMIZE, SF_NO_PUSH_ROUTE_GATEWAY, SF_NOPOOL, SF_PKTINFO_COPY_IIF, SF_TCP_NODELAY_HELPER, SF_USE_IP_PKTINFO, SHA256_DIGEST_LENGTH, SHA_DIGEST_LENGTH, options::shaper, SHAPER_MAX, SHAPER_MIN, show_adapters(), options::show_ciphers, show_compression_warning(), options::show_curves, options::show_digests, options::show_engines, options::show_net_up, show_routes(), show_tap_win_adapters(), options::show_tls_ciphers, show_valid_win32_tun_subnets(), options::sid_hash_size, SIGHUP, SIGTERM, options::single_session, pull_filter::size, sleep, options::sndbuf, options::sockflags, connection_entry::socks_proxy_authfile, connection_entry::socks_proxy_port, connection_entry::socks_proxy_server, SSEC_NONE, SSEC_PW_ENV, options::ssl_flags, ssl_set_auth_nocache(), ssl_set_auth_token(), ssl_set_auth_token_user(), SSLF_AUTH_USER_PASS_OPTIONAL, SSLF_CLIENT_CERT_NOT_REQUIRED, SSLF_CLIENT_CERT_OPTIONAL, SSLF_CRL_VERIFY_DIR, SSLF_TLS_DEBUG_ENABLED, SSLF_TLS_VERSION_MAX_MASK, SSLF_TLS_VERSION_MAX_SHIFT, SSLF_TLS_VERSION_MIN_MASK, SSLF_TLS_VERSION_MIN_SHIFT, SSLF_USERNAME_AS_COMMON_NAME, options::stale_routes_ageing_time, options::stale_routes_check_interval, options::status_file, options::status_file_update_freq, options::status_file_version, streq, string_class(), string_substitute(), options::suppress_timestamps, tap_allow_nonadmin_access(), tuntap_options::tap_sleep, options::tcp_queue_limit, options::test_crypto, connection_entry::tls_auth_file, options::tls_auth_file, connection_entry::tls_auth_file_inline, options::tls_auth_file_inline, options::tls_cert_profile, TLS_CHANNEL_BUF_SIZE, TLS_CHANNEL_MTU_MIN, options::tls_client, connection_entry::tls_crypt_file, options::tls_crypt_file, connection_entry::tls_crypt_file_inline, options::tls_crypt_file_inline, connection_entry::tls_crypt_v2_file, options::tls_crypt_v2_file, connection_entry::tls_crypt_v2_file_inline, options::tls_crypt_v2_file_inline, connection_entry::tls_crypt_v2_force_cookie, options::tls_crypt_v2_max_age, options::tls_crypt_v2_verify_script, options::tls_exit, options::tls_export_peer_cert_dir, options::tls_groups, connection_entry::tls_mtu, options::tls_server, options::tls_timeout, TLS_VER_1_2, TLS_VER_BAD, options::tls_verify, tls_version_parse(), options::tmp_dir, options::topology, options::transition_window, translate_mtu_discover_type_name(), connection_entry::tun_mtu, connection_entry::tun_mtu_defined, connection_entry::tun_mtu_extra, connection_entry::tun_mtu_extra_defined, TUN_MTU_MAX, connection_entry::tun_mtu_max, TUN_MTU_MAX_MIN, TUN_MTU_MIN, options::tuntap_options, pull_filter::type, uninit_options(), options::up_delay, options::up_restart, options::up_script, dns_options::updown, dns_options::updown_flags, usage(), usage_version(), options::use_peer_id, http_proxy_options::user_agent, USER_PASS_LEN, options::username, valid_integer(), validate_domain(), options::verbosity, options::verify_hash, options::verify_hash_algo, options::verify_hash_depth, VERIFY_PERMISSION, options::verify_x509_name, VERIFY_X509_SUBJECT_DN, VERIFY_X509_SUBJECT_RDN, VERIFY_X509_SUBJECT_RDN_PREFIX, options::verify_x509_type, options::virtual_hash_size, options::vlan_accept, VLAN_ALL, VLAN_ONLY_TAGGED, VLAN_ONLY_UNTAGGED_OR_PRIORITY, options::vlan_pvid, options::vlan_tagging, tuntap_options::wins, tuntap_options::wins_len, options::writepid, options::x509_track, x509_track_add(), options::x509_username_field, and x509_username_field_ext_supported().
Referenced by apply_push_options(), parse_argv(), read_config_file(), read_config_string(), test_read_config(), and update_option().
| bool apply_push_options | ( | struct context * | c, |
| struct options * | options, | ||
| struct buffer * | buf, | ||
| uint64_t | permission_mask, | ||
| uint64_t * | option_types_found, | ||
| struct env_set * | es, | ||
| bool | is_update ) |
Definition at line 517 of file options_parse.c.
References add_option(), apply_pull_filter(), buf_parse(), check_push_update_option_flags(), CLEAR, D_PUSH_ERRORS, options::gc, M_OPTERR, MAX_PARMS, OPT_P_U_ROUTE, OPTION_PARM_SIZE, parse_line(), options::pull_filter_list, options::push_continuation, PUSH_OPT_OPTIONAL, PUSH_OPT_TO_REMOVE, options::push_update_options_found, remove_option(), route_add_count, route_reset_count, SIZE, and update_option().
Referenced by process_incoming_push_reply(), and process_push_update().
| int auth_retry_get | ( | void | ) |
Definition at line 3288 of file options.c.
References global_auth_retry.
Referenced by do_init_crypto_tls_c1(), init_instance(), receive_auth_failed(), and socket_restart_pause().
| const char * auth_retry_print | ( | void | ) |
Definition at line 3317 of file options.c.
References AR_INTERACT, AR_NOINTERACT, AR_NONE, and global_auth_retry.
Referenced by man_dispatch_command().
| bool auth_retry_set | ( | const msglvl_t | msglevel, |
| const char * | option ) |
Definition at line 3294 of file options.c.
References AR_INTERACT, AR_NOINTERACT, AR_NONE, global_auth_retry, msg, and streq.
Referenced by add_option(), and man_dispatch_command().
|
inlinestatic |
Returns whether the current configuration has dco enabled.
Definition at line 981 of file options.h.
References options::disable_dco.
Referenced by check_dco_key_status(), check_inactivity_timeout(), do_deferred_options(), do_init_crypto_tls(), do_init_route_ipv6_list(), do_init_route_list(), do_init_timers(), do_init_tun(), do_open_tun(), do_persist_tuntap(), encrypt_sign(), link_socket_init_phase2(), man_persist_client_stats(), management_check_bytecount_client(), management_check_bytecount_server(), multi_client_set_protocol_options(), multi_client_setup_dco_initial(), multi_connection_established(), multi_instance_string(), multi_print_status(), multi_uninit(), need_keep_caps(), options_postprocess_mutate(), options_postprocess_setdefault_ncpciphers(), options_postprocess_verify(), print_status(), process_incoming_link_part1(), process_incoming_push_msg(), read_incoming_tun(), send_push_update(), and tls_session_update_crypto_params_do_work().
| bool has_udp_in_local_list | ( | const struct options * | options | ) |
Definition at line 7811 of file options.c.
References local_list::array, options::ce, local_list::len, connection_entry::local_list, local_entry::proto, and proto_is_dgram().
Referenced by multi_process_signal().
| void init_options | ( | struct options * | o | ) |
Definition at line 805 of file options.c.
References connection_entry::af, options::allow_recursive_routing, options::auth_token_generate, options::authname, connection_entry::bind_ipv6_only, connection_entry::bind_local, options::block_outside_dns, options::ce, options::cf_initial_max, options::cf_initial_per, CLEAR, options::connect_retry_max, connection_entry::connect_retry_seconds, connection_entry::connect_retry_seconds_max, connection_entry::connect_timeout, DEFAULT_SEQ_BACKTRACK, DEFAULT_TIME_BACKTRACK, options::dev, tuntap_options::dhcp_lease_time, tuntap_options::dhcp_masq_offset, options::disable_dco, options::dns_options, options::ecdh_curve, dns_options::gc, options::gc, gc_init(), options::handshake_window, options::ifconfig_pool_persist_refresh_freq, tuntap_options::ip_win32_type, IPW32_SET_ADAPTIVE, IPW32_SET_DHCP_MASQ, options::key_direction, KEY_DIRECTION_BIDIRECTIONAL, connection_entry::link_mtu, LINK_MTU_DEFAULT, connection_entry::local_port, options::management_echo_buffer_size, options::management_log_history_cache, options::management_state_buffer_size, options::max_clients, options::max_routes_per_client, options::mode, MODE_POINT_TO_POINT, connection_entry::mssfix, connection_entry::mssfix_default, connection_entry::mssfix_encap, connection_entry::mtu_discover_type, options::n_bcast_buf, NET_ROUTE_TABLE_DEFAULT, options::occ, connection_entry::occ_mtu, OPENVPN_PORT, options::persist_mode, platform_get_tmp_dir(), connection_entry::proto, options::proto_force, PROTO_UDP, connection_entry::remote_port, options::renegotiate_bytes, options::renegotiate_seconds, options::renegotiate_seconds_min, options::replay_time, options::replay_window, RESOLV_RETRY_INFINITE, options::resolve_in_advance, options::resolve_retry_seconds, options::route_default_table_id, options::route_delay_window, options::route_method, ROUTE_METHOD_ADAPTIVE, options::scheduled_exit_interval, options::stale_routes_check_interval, options::status_file_update_freq, options::status_file_version, options::tcp_queue_limit, options::tls_cert_profile, connection_entry::tls_mtu, TLS_MTU_DEFAULT, options::tls_timeout, options::tmp_dir, TOP_UNDEF, options::topology, options::transition_window, connection_entry::tun_mtu, TUN_MTU_DEFAULT, options::tuntap_options, dns_options::updown, options::verbosity, options::vlan_accept, VLAN_ALL, options::vlan_pvid, options::windows_driver, WINDOWS_DRIVER_UNSPECIFIED, options::x509_username_field, and X509_USERNAME_FIELD_DEFAULT.
Referenced by add_option(), openvpn_main(), options_postprocess_verify_ce(), and usage().
| bool key_is_external | ( | const struct options * | options | ) |
Definition at line 4022 of file options.c.
References options::cryptoapi_cert, options::management_flags, and MF_EXTERNAL_KEY.
Referenced by init_ssl().
| void notnull | ( | const char * | arg, |
| const char * | description ) |
Definition at line 3431 of file options.c.
Referenced by do_persist_tuntap(), and options_postprocess_verify_ce().
| void options_detach | ( | struct options * | o | ) |
Definition at line 1260 of file options.c.
References options::client_nat, clone_push_list(), options::dns_options, dns_options::gc, options::gc, gc_detach(), and options::routes.
Referenced by inherit_context_child(), and inherit_context_top().
Definition at line 3204 of file options.c.
References options_postprocess_filechecks(), options_postprocess_mutate(), and options_postprocess_verify().
Referenced by openvpn_main().
Definition at line 3218 of file options.c.
References D_PUSH_ERRORS, options::dns_options, dns_options_postprocess_pull(), dns_options_verify(), and tuntap_options_postprocess_dns().
Referenced by incoming_push_message().
| void options_server_import | ( | struct options * | o, |
| const char * | filename, | ||
| msglvl_t | msglevel, | ||
| uint64_t | permission_mask, | ||
| uint64_t * | option_types_found, | ||
| struct env_set * | es ) |
Definition at line 585 of file options_parse.c.
References D_PUSH, 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 uint64_t | permission_mask, | ||
| uint64_t * | option_types_found, | ||
| struct env_set * | es ) |
Definition at line 595 of file options_parse.c.
References 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 uint64_t | permission_mask, | ||
| uint64_t * | option_types_found, | ||
| struct env_set * | es ) |
Definition at line 455 of file options_parse.c.
References add_option(), CLEAR, 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(), M_INFO, M_MSG_VIRT_OUT, M_NOPREFIX, M_OPTERR, 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().
| int parse_topology | ( | const char * | str, |
| const msglvl_t | msglevel ) |
Definition at line 3238 of file options.c.
References msg, streq, TOP_NET30, TOP_P2P, TOP_SUBNET, and TOP_UNDEF.
Referenced by add_option().
Definition at line 2391 of file options.c.
References options::authname, options_pre_connect::authname, options::ciphername, options_pre_connect::ciphername, CLEAR, options::client_nat, options_pre_connect::client_nat, options_pre_connect::client_nat_defined, clone_dns_options(), cnol_check_alloc(), options::comp, options_pre_connect::comp, copy_client_nat_option_list(), copy_route_ipv6_option_list(), copy_route_option_list(), options::dns_options, options_pre_connect::dns_options, options::foreign_option_index, options_pre_connect::foreign_option_index, dns_options::gc, gc, gc_free(), gc_new(), options::ifconfig_ipv6_local, options_pre_connect::ifconfig_ipv6_local, options::ifconfig_local, options_pre_connect::ifconfig_local, options::imported_protocol_flags, options::ping_rec_timeout, options_pre_connect::ping_rec_timeout, options::ping_rec_timeout_action, options_pre_connect::ping_rec_timeout_action, options::ping_send_timeout, options_pre_connect::ping_send_timeout, options::pre_connect, options::push_continuation, options::push_option_types_found, options::push_update_options_found, options::pushed_acc_max_message_length, options::pushed_acc_negotiated_protocols, rol6_check_alloc(), rol_check_alloc(), options::route_default_gateway, options_pre_connect::route_default_gateway, options::route_ipv6_default_gateway, options_pre_connect::route_ipv6_default_gateway, options::routes, options_pre_connect::routes, options_pre_connect::routes_defined, options::routes_ipv6, options_pre_connect::routes_ipv6, options_pre_connect::routes_ipv6_defined, options::tuntap_options, options_pre_connect::tuntap_options, and options_pre_connect::tuntap_options_defined.
Referenced by init_instance().
| const char * print_topology | ( | const int | topology | ) |
Definition at line 3260 of file options.c.
References TOP_NET30, TOP_P2P, TOP_SUBNET, and TOP_UNDEF.
Referenced by do_ifconfig_ipv4(), and print_opt_topology().
| 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 uint64_t | permission_mask, | ||
| uint64_t * | option_types_found, | ||
| struct env_set * | es ) |
Definition at line 353 of file options_parse.c.
References add_option(), bypass_doubledash(), check_inline_file_via_fp(), CLEAR, 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 uint64_t | permission_mask, | ||
| uint64_t * | option_types_found, | ||
| struct env_set * | es ) |
Definition at line 426 of file options_parse.c.
References add_option(), buf_parse(), buf_set_read(), bypass_doubledash(), check_inline_file_via_buf(), CLEAR, options::gc, MAX_PARMS, OPTION_LINE_SIZE, parse_line(), secure_memzero(), and SIZE.
Referenced by add_option(), options_string_import(), and read_single_config().
| void remove_option | ( | struct context * | c, |
| struct options * | options, | ||
| char * | p[], | ||
| bool | is_inline, | ||
| const char * | file, | ||
| int | line, | ||
| const msglvl_t | msglevel, | ||
| const uint64_t | permission_mask, | ||
| uint64_t * | option_types_found, | ||
| struct env_set * | es ) |
Resets options found in the PUSH_UPDATE message that are preceded by the - flag.
This function is used in push-updates to reset specified options. The number of parameters p must always be 1. If the permission is verified, all related options are erased or reset to their default values. Upon successful permission verification (by VERIFY_PERMISSION()), option_types_found is filled with the flag corresponding to the option.
| c | The context structure. |
| options | A pointer to the options structure. |
| p | An array of strings containing the options and their parameters. |
| is_inline | A boolean indicating if the option is inline. |
| file | The file where the function is called. |
| line | The line number where the function is called. |
| msglevel | The message level. |
| permission_mask | The permission mask used by VERIFY_PERMISSION(). |
| option_types_found | A pointer to the variable where the flags corresponding to the options found are stored. |
| es | The environment set structure. |
Definition at line 3653 of file options.c.
References options::block_ipv6, options::block_outside_dns, options::ce, helper_setdefault_topology(), options::ifconfig_ipv6_local, options::ifconfig_ipv6_netbits, options::ifconfig_ipv6_remote, options::ifconfig_local, options::ifconfig_remote_netmask, msg, msglevel_forward_compatible(), msglevel_unknown_option(), connection_entry::occ_mtu, OPT_P_CONNECTION, OPT_P_DHCPDNS, OPT_P_PULL_MODE, OPT_P_PUSH_MTU, OPT_P_ROUTE, OPT_P_ROUTE_EXTRAS, OPT_P_UP, options::push_continuation, reset_dhcp_options(), reset_dns_options(), reset_redirect_gateway(), reset_routes_v4(), reset_routes_v6(), options::route_default_gateway, options::route_default_metric, options::route_gateway_via_dhcp, streq, TOP_UNDEF, options::topology, connection_entry::tun_mtu, TUN_MTU_DEFAULT, connection_entry::tun_mtu_defined, and VERIFY_PERMISSION.
Referenced by apply_push_options().
| void rol_check_alloc | ( | struct options * | options | ) |
Definition at line 1280 of file options.c.
References options::gc, new_route_option_list(), and options::routes.
Referenced by add_option(), check_route_option(), helper_add_route(), and pre_connect_restore().
Definition at line 954 of file options.c.
References connection_list::array, local_list::array, options::ce, options::config, options::connection_list, options::daemon, connection_list::len, local_list::len, connection_entry::local_list, options::log, platform_getpid(), setenv_connection_entry(), setenv_int(), setenv_local_entry(), setenv_long_long(), setenv_str(), and options::verbosity.
Referenced by openvpn_main().
| void show_dco_version | ( | const unsigned int | flags | ) |
Definition at line 3382 of file options.c.
References dco_version_string(), gc, gc_free(), gc_new(), and msg.
Referenced by openvpn_main(), and usage_version().
|
inlinestatic |
Definition at line 904 of file options.h.
References msg.
Referenced by openvpn_main(), and usage_version().
| void show_library_versions | ( | const unsigned int | flags | ) |
Definition at line 3392 of file options.c.
References get_ssl_library_version(), LZO_LIB_VER_STR, and msg.
Referenced by openvpn_main(), and usage_version().
| void show_windows_version | ( | const unsigned int | flags | ) |
Definition at line 3373 of file options.c.
References gc, gc_free(), gc_new(), msg, and win32_version_string().
Referenced by openvpn_main(), and usage_version().
| void uninit_options | ( | struct options * | o | ) |
Definition at line 907 of file options.c.
References CLEAR, options::connection_list, options::dns_options, dns_options::gc, options::gc, gc_free(), and options::remote_list.
Referenced by add_option(), openvpn_main(), options_postprocess_verify_ce(), and send_single_push_update().
| void update_option | ( | struct context * | c, |
| struct options * | options, | ||
| char * | p[], | ||
| bool | is_inline, | ||
| const char * | file, | ||
| int | line, | ||
| const int | level, | ||
| const msglvl_t | msglevel, | ||
| const uint64_t | permission_mask, | ||
| uint64_t * | option_types_found, | ||
| struct env_set * | es ) |
Processes an option to update.
It first checks whether it has already received an option of the same type within the same update message. If the option has already been received, it calls add_option(). Otherwise, it deletes all existing values related to that option before calling add_option().
| c | The context structure. |
| options | A pointer to the options structure. |
| p | An array of strings containing the options and their parameters. |
| is_inline | A boolean indicating if the option is inline. |
| file | The file where the function is called. |
| line | The line number where the function is called. |
| level | The level of the option. |
| msglevel | The message level for logging. |
| permission_mask | The permission mask used by VERIFY_PERMISSION(). |
| option_types_found | A pointer to the variable where the flags corresponding to the options found are stored. |
| es | The environment set structure. |
Definition at line 3910 of file options.c.
References add_option(), ASSERT, BOOL_CAST, check_dns_option(), check_route6_option(), check_route_option(), MAX_PARMS, msg, OPT_P_DHCPDNS, OPT_P_PULL_MODE, OPT_P_ROUTE, OPT_P_U_DHCP, OPT_P_U_DNS, OPT_P_U_REDIR_GATEWAY, OPT_P_U_ROUTE, OPT_P_U_ROUTE6, options::push_update_options_found, reset_dhcp_options(), reset_dns_options(), reset_redirect_gateway(), reset_routes_v4(), reset_routes_v6(), streq, and VERIFY_PERMISSION.
Referenced by apply_push_options().
| void usage | ( | void | ) |
Definition at line 3339 of file options.c.
References options::authname, options::ce, connection_entry::connect_retry_seconds, connection_entry::connect_retry_seconds_max, options::handshake_window, init_options(), connection_entry::local_port, msg_fp(), openvpn_exit(), OPENVPN_EXIT_STATUS_USAGE, connection_entry::remote_port, options::renegotiate_seconds, options::replay_time, options::replay_window, TAP_MTU_EXTRA_DEFAULT, title_string, options::tls_timeout, options::transition_window, TUN_MTU_DEFAULT, TUN_MTU_MAX_MIN, usage_message, and options::verbosity.
Referenced by add_option(), main(), and parse_argv().
| void usage_small | ( | void | ) |
Definition at line 3365 of file options.c.
References M_NOPREFIX, M_WARN, msg, openvpn_exit(), and OPENVPN_EXIT_STATUS_USAGE.
Referenced by x_msg_va().
|
extern |
Definition at line 75 of file options.c.
Referenced by do_test_crypto(), man_dispatch_command(), man_help(), multi_print_status(), openvpn_main(), usage(), usage(), usage_version(), and wmain().