Go to the documentation of this file.
57 #define OPTION_PARM_SIZE 256
58 #define OPTION_LINE_SIZE 256
93 #if !defined(ENABLE_CRYPTO_OPENSSL) && !defined(ENABLE_CRYPTO_MBEDTLS)
94 #error "At least one of OpenSSL or mbed TLS needs to be defined."
143 #define CE_DISABLED (1<<0)
144 #define CE_MAN_QUERY_PROXY (1<<1)
145 #define CE_MAN_QUERY_REMOTE_UNDEF 0
146 #define CE_MAN_QUERY_REMOTE_QUERY 1
147 #define CE_MAN_QUERY_REMOTE_ACCEPT 2
148 #define CE_MAN_QUERY_REMOTE_MOD 3
149 #define CE_MAN_QUERY_REMOTE_SKIP 4
150 #define CE_MAN_QUERY_REMOTE_MASK (0x07)
151 #define CE_MAN_QUERY_REMOTE_SHIFT (2)
180 #define CONNECTION_LIST_SIZE 64
214 #define RH_HOST_LEN 80
216 #define RH_PORT_LEN 20
245 #define MODE_POINT_TO_POINT 0
246 #define MODE_SERVER 1
293 #if ENABLE_MANAGEMENT
321 #ifdef ENABLE_MEMSTATS
341 #define PING_RESTART 2
348 #if PASSTOS_CAPABILITY
363 #ifdef ENABLE_SELINUX
364 char *selinux_context;
429 #ifdef ENABLE_MANAGEMENT
458 #define SF_NOPOOL (1<<0)
459 #define SF_TCP_NODELAY_HELPER (1<<1)
460 #define SF_NO_PUSH_ROUTE_GATEWAY (1<<2)
533 char *port_share_host;
534 char *port_share_port;
535 const char *port_share_journal_dir;
548 #ifdef ENABLE_MANAGEMENT
568 #ifdef ENABLE_PREDICTION_RESISTANCE
569 bool use_prediction_resistance;
612 bool pkcs11_protected_authentication[
MAX_PARMS];
614 int pkcs11_pin_cache_period;
615 const char *pkcs11_id;
619 #ifdef ENABLE_CRYPTOAPI
635 #ifdef ENABLE_X509ALTUSERNAME
685 #ifdef HAVE_EXPORT_KEYING_MATERIAL
687 const char *keying_material_exporter_label;
688 int keying_material_exporter_length;
707 #define streq(x, y) (!strcmp((x), (y)))
712 #define OPT_P_GENERAL (1<<0)
713 #define OPT_P_UP (1<<1)
714 #define OPT_P_ROUTE (1<<2)
715 #define OPT_P_DHCPDNS (1<<3)
716 #define OPT_P_SCRIPT (1<<4)
717 #define OPT_P_SETENV (1<<5)
718 #define OPT_P_SHAPER (1<<6)
719 #define OPT_P_TIMER (1<<7)
720 #define OPT_P_PERSIST (1<<8)
721 #define OPT_P_PERSIST_IP (1<<9)
722 #define OPT_P_COMP (1<<10)
723 #define OPT_P_MESSAGES (1<<11)
724 #define OPT_P_NCP (1<<12)
725 #define OPT_P_TLS_PARMS (1<<13)
726 #define OPT_P_MTU (1<<14)
727 #define OPT_P_NICE (1<<15)
728 #define OPT_P_PUSH (1<<16)
729 #define OPT_P_INSTANCE (1<<17)
730 #define OPT_P_CONFIG (1<<18)
731 #define OPT_P_EXPLICIT_NOTIFY (1<<19)
732 #define OPT_P_ECHO (1<<20)
733 #define OPT_P_INHERIT (1<<21)
734 #define OPT_P_ROUTE_EXTRAS (1<<22)
735 #define OPT_P_PULL_MODE (1<<23)
736 #define OPT_P_PLUGIN (1<<24)
737 #define OPT_P_SOCKBUF (1<<25)
738 #define OPT_P_SOCKFLAGS (1<<26)
739 #define OPT_P_CONNECTION (1<<27)
740 #define OPT_P_PEER_ID (1<<28)
741 #define OPT_P_INLINE (1<<29)
742 #define OPT_P_PUSH_MTU (1<<30)
744 #define OPT_P_DEFAULT (~(OPT_P_INSTANCE|OPT_P_PULL_MODE))
746 #define PULL_DEFINED(opt) ((opt)->pull)
747 #define PUSH_DEFINED(opt) ((opt)->push_list)
750 #define PULL_DEFINED(opt) (false)
754 #define PUSH_DEFINED(opt) (false)
758 #define ROUTE_OPTION_FLAGS(o) ((o)->route_method & ROUTE_METHOD_MASK)
760 #define ROUTE_OPTION_FLAGS(o) (0)
763 #define SHAPER_DEFINED(opt) ((opt)->shaper)
766 #define PLUGIN_OPTION_LIST(opt) ((opt)->plugin_list)
768 #define PLUGIN_OPTION_LIST(opt) (NULL)
771 #ifdef ENABLE_MANAGEMENT
772 #define MAN_CLIENT_AUTH_ENABLED(opt) ((opt)->management_flags & MF_CLIENT_AUTH)
774 #define MAN_CLIENT_AUTH_ENABLED(opt) (false)
781 const unsigned int permission_mask,
782 unsigned int *option_types_found,
785 void notnull(
const char *arg,
const char *description);
836 const char *opt_name,
struct gc_arena *gc);
847 unsigned int permission_mask,
848 unsigned int *option_types_found,
854 const char *filename,
856 unsigned int permission_mask,
857 unsigned int *option_types_found,
885 #define AR_INTERACT 1
886 #define AR_NOINTERACT 2
897 const unsigned int permission_mask,
898 unsigned int *option_types_found,
const char * tls_crypt_file
struct in6_addr server_network_ipv6
enum genkey_type genkey_type
struct verify_hash_list * verify_hash
struct static_challenge_info sc_info
const char * client_connect_script
bool enable_ncp_fallback
If defined fall back to ciphername if NCP fails.
@ VLAN_ONLY_UNTAGGED_OR_PRIORITY
void options_warning_safe(char *actual, const char *expected, size_t actual_n)
int connect_retry_seconds
int explicit_exit_notification
bool route_gateway_via_dhcp
const char * socks_proxy_server
const char * route_ipv6_default_gateway
unsigned int server_flags
const char * auth_token_secret_file
bool tls_crypt_file_inline
void show_dco_version(const unsigned int flags)
int64_t inactivity_minimum_bytes
in_addr_t server_bridge_ip
struct verify_hash_list * next
const char title_string[]
bool string_defined_equal(const char *s1, const char *s2)
int status_file_update_freq
const char * shared_secret_file
bool extra_certs_file_inline
bool tls_crypt_v2_force_cookie
@ GENKEY_TLS_CRYPTV2_CLIENT
struct in6_addr push_ifconfig_ipv6_local
provider_t * providers[MAX_PARMS]
struct connection_entry ce
const char * auth_retry_print(void)
void options_server_import(struct options *o, const char *filename, int msglevel, unsigned int permission_mask, unsigned int *option_types_found, struct env_set *es)
bool ifconfig_ipv6_pool_defined
hash_algo_type verify_hash_algo
const char * genkey_extra_data
int ping_rec_timeout_action
const char * tls_export_peer_cert_dir
const char * options_string_version(const char *s, struct gc_arena *gc)
Packet geometry parameters.
bool allow_deprecated_insecure_static_crypto
struct route_ipv6_option_list * routes_ipv6
const char * names[MAX_PARMS]
bool allow_recursive_routing
struct route_ipv6_option_list * routes_ipv6
void options_postprocess(struct options *options, struct env_set *es)
const char * tls_cert_profile
unsigned short sa_family_t
int parse_topology(const char *str, const int msglevel)
const char ** ignore_unknown_option
int parse_line(const char *line, char *p[], const int n, const char *file, const int line_num, int msglevel, struct gc_arena *gc)
struct http_proxy_options * http_proxy_override
const char * cipher_list_tls13
bool tuntap_options_defined
const char * socks_proxy_port
const char * management_port
struct remote_host_store * rh_store
int connect_retry_seconds_max
const char * ip_remote_hint
const char * auth_user_pass_file
struct client_nat_option_list * client_nat
struct route_option_list * routes
enum windows_driver_type windows_driver
const struct x509_track * x509_track
bool shared_secret_file_inline
struct options_pre_connect * pre_connect
const char * management_client_group
const char * route_default_gateway
int ifconfig_ipv6_netbits
bool push_ifconfig_ipv6_defined
const char * tls_crypt_file
void setenv_settings(struct env_set *es, const struct options *o)
struct compress_options comp
unsigned int imported_protocol_flags
void parse_argv(struct options *options, const int argc, char *argv[], const int msglevel, const unsigned int permission_mask, unsigned int *option_types_found, struct env_set *es)
const char * tls_crypt_v2_file
bool push_ifconfig_ipv6_blocked
int management_state_buffer_size
bool push_ifconfig_defined
const char * tls_auth_file
unsigned int backwards_compatible
What version we should try to be compatible with as major * 10000 + minor * 100 + patch,...
bool tls_crypt_v2_file_inline
const char * tls_auth_file
bool tls_crypt_v2_file_inline
const char * route_predown_script
bool push_ifconfig_constraint_defined
bool tls_auth_file_inline
bool auth_token_secret_file_inline
unsigned int server_netbits_ipv6
const char * tls_crypt_v2_file
bool auth_user_pass_file_inline
struct provider_list providers
const char * management_addr
hash_algo_type
Types referencing specific message digest hashing algorithms.
in_addr_t ifconfig_pool_netmask
int push_ifconfig_ipv6_netbits
bool tls_crypt_file_inline
int renegotiate_seconds_min
int stale_routes_check_interval
int scheduled_exit_interval
struct client_nat_option_list * client_nat
const char * client_crresponse_script
Wrapper structure for dynamically allocated memory.
@ GENKEY_TLS_CRYPTV2_SERVER
const char * verify_x509_name
void options_warning(char *actual, const char *expected)
const char * route_ipv6_default_gateway
const char * exit_event_name
struct in6_addr push_ifconfig_ipv6_remote
const char * management_certificate
struct compress_options comp
unsigned remote_cert_ku[MAX_PARMS]
bool key_is_external(const struct options *options)
bool force_key_material_export
bool server_bridge_proxy_dhcp
bool push_ifconfig_ipv4_blocked
unsigned int management_flags
in_addr_t server_bridge_pool_start
int management_echo_buffer_size
unsigned int unsuccessful_attempts
struct connection_entry ** array
void show_settings(const struct options *o)
const char * client_config_dir
Garbage collection arena used to keep track of dynamically allocated memory.
const char * genkey_filename
bool auth_token_call_auth
struct remote_entry ** array
int resolve_retry_seconds
void rol_check_alloc(struct options *options)
struct http_proxy_options * http_proxy_options
char * options_string_extract_option(const char *options_string, const char *opt_name, struct gc_arena *gc)
Given an OpenVPN options string, extract the value of an option.
in_addr_t server_bridge_netmask
struct plugin_option_list * plugin_list
bool priv_key_file_inline
static bool dco_enabled(const struct options *o)
Returns whether the current configuration has dco enabled.
void init_options(struct options *o, const bool init_gc)
bool tls_auth_file_inline
int management_log_history_cache
const char * socks_proxy_authfile
in_addr_t ifconfig_pool_end
bool exit_event_initial_state
void options_string_import(struct options *options, const char *config, const int msglevel, const unsigned int permission_mask, unsigned int *option_types_found, struct env_set *es)
void pre_connect_restore(struct options *o, struct gc_arena *gc)
#define SHA256_DIGEST_LENGTH
bool ifconfig_pool_defined
bool options_postprocess_pull(struct options *o, struct env_set *es)
bool apply_push_options(struct options *options, struct buffer *buf, unsigned int permission_mask, unsigned int *option_types_found, struct env_set *es)
bool machine_readable_output
const char * tls_crypt_v2_verify_script
const char * key_pass_file
bool tun_mtu_extra_defined
const char * print_topology(const int topology)
const char * packet_id_file
in_addr_t push_ifconfig_remote_netmask
struct connection_list * connection_list
const char * ifconfig_remote_netmask
struct route_option_list * routes
int ifconfig_ipv6_pool_netbits
int max_routes_per_client
const char * cryptoapi_cert
in_addr_t server_bridge_pool_end
in_addr_t ifconfig_pool_start
void pre_pull_default(struct options *o)
void notnull(const char *arg, const char *description)
const char * extra_certs_file
const char * ifconfig_pool_persist_filename
bool auth_user_pass_verify_script_via_file
void options_detach(struct options *o)
bool mute_replay_warnings
struct in6_addr ifconfig_ipv6_pool_base
const char * ifconfig_ipv6_local
const char * priv_key_file
const char * client_disconnect_script
unsigned int push_option_types_found
int stale_routes_ageing_time
bool auth_retry_set(const int msglevel, const char *option)
char * options_string(const struct options *o, const struct frame *frame, struct tuntap *tt, openvpn_net_ctx_t *ctx, bool remote, struct gc_arena *gc)
struct iroute_ipv6 * iroutes_ipv6
bool options_cmp_equal_safe(char *actual, const char *expected, size_t actual_n)
struct remote_list * remote_list
struct pull_filter_list * pull_filter_list
in_addr_t push_ifconfig_local_alias
void show_library_versions(const unsigned int flags)
in_addr_t push_ifconfig_constraint_network
const char * route_script
struct tuntap_options tuntap_options
enum vlan_acceptable_frames vlan_accept
const char * ifconfig_local
in_addr_t push_ifconfig_local
const char * learn_address_script
int ping_rec_timeout_action
const char * management_client_user
void uninit_options(struct options *o)
static bool pkcs11_id_management
const char * auth_user_pass_verify_script
const char * tls_crypt_v2_metadata
int ifconfig_pool_persist_refresh_freq
const char * ifconfig_ipv6_remote
bool server_bridge_defined
const char * management_user_pass
in_addr_t push_ifconfig_constraint_netmask
const char * remote_cert_eku
bool options_cmp_equal(char *actual, const char *expected)
void show_windows_version(const unsigned int flags)
const char * route_default_gateway