58 #define OPTION_PARM_SIZE 256 59 #define OPTION_LINE_SIZE 256 84 #if defined(ENABLE_CRYPTO) && !defined(ENABLE_CRYPTO_OPENSSL) && !defined(ENABLE_CRYPTO_MBEDTLS) 85 #error "At least one of OpenSSL or mbed TLS needs to be defined." 125 #define CE_DISABLED (1<<0) 126 #define CE_MAN_QUERY_PROXY (1<<1) 127 #define CE_MAN_QUERY_REMOTE_UNDEF 0 128 #define CE_MAN_QUERY_REMOTE_QUERY 1 129 #define CE_MAN_QUERY_REMOTE_ACCEPT 2 130 #define CE_MAN_QUERY_REMOTE_MOD 3 131 #define CE_MAN_QUERY_REMOTE_SKIP 4 132 #define CE_MAN_QUERY_REMOTE_MASK (0x07) 133 #define CE_MAN_QUERY_REMOTE_SHIFT (2) 145 #define CONNECTION_LIST_SIZE 64 162 #define RH_HOST_LEN 80 164 #define RH_PORT_LEN 20 178 #define MODE_POINT_TO_POINT 0 179 #define MODE_SERVER 1 212 #if ENABLE_MANAGEMENT 232 #ifdef ENABLE_FEATURE_SHAPER 242 #ifdef ENABLE_MEMSTATS 260 #define PING_RESTART 2 268 #if PASSTOS_CAPABILITY 283 #ifdef ENABLE_SELINUX 284 char *selinux_context;
319 struct compress_options comp;
353 #ifdef ENABLE_MANAGEMENT 385 struct in6_addr server_network_ipv6;
388 #define SF_NOPOOL (1<<0) 389 #define SF_TCP_NODELAY_HELPER (1<<1) 390 #define SF_NO_PUSH_ROUTE_GATEWAY (1<<2) 410 struct in6_addr ifconfig_ipv6_pool_base;
433 struct in6_addr push_ifconfig_ipv6_local;
435 struct in6_addr push_ifconfig_ipv6_remote;
451 char *port_share_host;
452 char *port_share_port;
453 const char *port_share_journal_dir;
466 #ifdef ENABLE_CLIENT_CR 490 #ifdef ENABLE_PREDICTION_RESISTANCE 491 bool use_prediction_resistance;
530 bool pkcs11_protected_authentication[
MAX_PARMS];
532 int pkcs11_pin_cache_period;
533 const char *pkcs11_id;
534 bool pkcs11_id_management;
537 #ifdef ENABLE_CRYPTOAPI 538 const char *cryptoapi_cert;
556 #ifdef ENABLE_X509ALTUSERNAME 558 char *x509_username_field;
575 #ifdef ENABLE_PUSH_PEER_INFO 600 #if defined(ENABLE_CRYPTO_OPENSSL) && OPENSSL_VERSION_NUMBER >= 0x10001000 602 const char *keying_material_exporter_label;
603 int keying_material_exporter_length;
613 #define streq(x, y) (!strcmp((x), (y))) 618 #define OPT_P_GENERAL (1<<0) 619 #define OPT_P_UP (1<<1) 620 #define OPT_P_ROUTE (1<<2) 621 #define OPT_P_IPWIN32 (1<<3) 622 #define OPT_P_SCRIPT (1<<4) 623 #define OPT_P_SETENV (1<<5) 624 #define OPT_P_SHAPER (1<<6) 625 #define OPT_P_TIMER (1<<7) 626 #define OPT_P_PERSIST (1<<8) 627 #define OPT_P_PERSIST_IP (1<<9) 628 #define OPT_P_COMP (1<<10) 629 #define OPT_P_MESSAGES (1<<11) 630 #define OPT_P_NCP (1<<12) 631 #define OPT_P_TLS_PARMS (1<<13) 632 #define OPT_P_MTU (1<<14) 633 #define OPT_P_NICE (1<<15) 634 #define OPT_P_PUSH (1<<16) 635 #define OPT_P_INSTANCE (1<<17) 636 #define OPT_P_CONFIG (1<<18) 637 #define OPT_P_EXPLICIT_NOTIFY (1<<19) 638 #define OPT_P_ECHO (1<<20) 639 #define OPT_P_INHERIT (1<<21) 640 #define OPT_P_ROUTE_EXTRAS (1<<22) 641 #define OPT_P_PULL_MODE (1<<23) 642 #define OPT_P_PLUGIN (1<<24) 643 #define OPT_P_SOCKBUF (1<<25) 644 #define OPT_P_SOCKFLAGS (1<<26) 645 #define OPT_P_CONNECTION (1<<27) 646 #define OPT_P_PEER_ID (1<<28) 648 #define OPT_P_DEFAULT (~(OPT_P_INSTANCE|OPT_P_PULL_MODE)) 651 #define PULL_DEFINED(opt) ((opt)->pull) 653 #define PUSH_DEFINED(opt) ((opt)->push_list) 658 #define PULL_DEFINED(opt) (false) 662 #define PUSH_DEFINED(opt) (false) 666 #define ROUTE_OPTION_FLAGS(o) ((o)->route_method & ROUTE_METHOD_MASK) 668 #define ROUTE_OPTION_FLAGS(o) (0) 671 #ifdef ENABLE_FEATURE_SHAPER 672 #define SHAPER_DEFINED(opt) ((opt)->shaper) 674 #define SHAPER_DEFINED(opt) (false) 678 #define PLUGIN_OPTION_LIST(opt) ((opt)->plugin_list) 680 #define PLUGIN_OPTION_LIST(opt) (NULL) 683 #ifdef MANAGEMENT_DEF_AUTH 684 #define MAN_CLIENT_AUTH_ENABLED(opt) ((opt)->management_flags & MF_CLIENT_AUTH) 686 #define MAN_CLIENT_AUTH_ENABLED(opt) (false) 693 const unsigned int permission_mask,
694 unsigned int *option_types_found,
697 void notnull(
const char *arg,
const char *description);
749 const char *opt_name,
struct gc_arena *gc);
760 unsigned int permission_mask,
761 unsigned int *option_types_found,
767 const char *filename,
769 unsigned int permission_mask,
770 unsigned int *option_types_found,
800 #define AR_INTERACT 1 801 #define AR_NOINTERACT 2 814 const unsigned int permission_mask,
815 unsigned int *option_types_found,
818 bool get_ipv6_addr(
const char *prefix_str,
struct in6_addr *network,
819 unsigned int *netbits,
int msglevel );
void options_warning_safe(char *actual, const char *expected, size_t actual_n)
const char * tls_crypt_file
bool get_ipv6_addr(const char *prefix_str, struct in6_addr *network, unsigned int *netbits, int msglevel)
int ifconfig_pool_persist_refresh_freq
const char * ca_file_inline
struct route_ipv6_option_list * routes_ipv6
const char * management_certificate
const char * socks_proxy_port
bool options_cmp_equal(char *actual, const char *expected)
unsigned int management_flags
struct client_nat_option_list * client_nat
void show_windows_version(const unsigned int flags)
bool mute_replay_warnings
bool push_ifconfig_ipv6_blocked
bool exit_event_initial_state
int management_log_history_cache
const char * ifconfig_pool_persist_filename
bool server_bridge_proxy_dhcp
int ping_rec_timeout_action
Packet geometry parameters.
bool string_defined_equal(const char *s1, const char *s2)
const char * tls_auth_file
const char * learn_address_script
const char * shared_secret_file
const char * priv_key_file
int push_ifconfig_ipv6_netbits
struct remote_list * remote_list
unsigned short sa_family_t
int connect_retry_seconds
in_addr_t push_ifconfig_remote_netmask
bool ifconfig_pool_defined
const char * auth_retry_print(void)
int inactivity_minimum_bytes
const char * crl_file_inline
char * options_string(const struct options *o, const struct frame *frame, struct tuntap *tt, bool remote, struct gc_arena *gc)
const char title_string[]
struct connection_list * connection_list
const char * exit_event_name
struct http_proxy_options * http_proxy_override
const char * route_script
int management_state_buffer_size
int resolve_retry_seconds
hash_algo_type
Types referencing specific message digest hashing algorithms.
const char * tls_auth_file_inline
const char * route_predown_script
struct route_option_list * routes
const char * pkcs12_file_inline
static bool push_peer_info(struct buffer *buf, struct tls_session *session)
bool allow_recursive_routing
in_addr_t ifconfig_pool_end
struct remote_host_store * rh_store
int parse_topology(const char *str, const int msglevel)
const char * client_disconnect_script
int explicit_exit_notification
int status_file_update_freq
unsigned int unsuccessful_attempts
int scheduled_exit_interval
void pre_pull_save(struct options *o)
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)
const char * options_string_version(const char *s, struct gc_arena *gc)
const char * tls_export_cert
const char * route_default_gateway
struct client_nat_option_list * client_nat
bool auth_user_pass_verify_script_via_file
bool push_ifconfig_constraint_defined
in_addr_t push_ifconfig_local
int parse_line(const char *line, char *p[], const int n, const char *file, const int line_num, int msglevel, struct gc_arena *gc)
const char * verify_x509_name
const char * socks_proxy_server
const char * management_write_peer_info_file
in_addr_t server_bridge_pool_start
struct plugin_option_list * plugin_list
int stale_routes_check_interval
bool tuntap_options_defined
bool ifconfig_ipv6_pool_defined
in_addr_t push_ifconfig_constraint_netmask
int ifconfig_ipv6_netbits
void setenv_settings(struct env_set *es, const struct options *o)
const struct x509_track * x509_track
unsigned __int32 uint32_t
const char ** ignore_unknown_option
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 * socks_proxy_authfile
const char * client_config_dir
struct http_proxy_options * http_proxy_options
const char * remote_cert_eku
in_addr_t server_bridge_ip
int prng_nonce_secret_len
const char * extra_certs_file
int max_routes_per_client
const char * auth_user_pass_file
int connect_retry_seconds_max
const char * management_user_pass
const char * cert_file_inline
in_addr_t ifconfig_pool_start
hash_algo_type verify_hash_algo
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.
void options_warning(char *actual, const char *expected)
bool push_ifconfig_defined
void rol_check_alloc(struct options *options)
void show_settings(const struct options *o)
const char * ifconfig_ipv6_remote
const char * ifconfig_ipv6_local
const char * management_port
const char * client_connect_script
const char * tls_crypt_inline
in_addr_t ifconfig_pool_netmask
void pre_pull_restore(struct options *o, struct gc_arena *gc)
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 init_options(struct options *o, const bool init_gc)
const char * ip_remote_hint
const char * key_pass_file
unsigned int push_option_types_found
struct options_pre_pull * pre_pull
const char * extra_certs_file_inline
bool push_ifconfig_ipv6_defined
Wrapper structure for dynamically allocated memory.
void options_postprocess(struct options *options)
in_addr_t push_ifconfig_local_alias
const char * print_topology(const int topology)
bool apply_push_options(struct options *options, struct buffer *buf, unsigned int permission_mask, unsigned int *option_types_found, struct env_set *es)
const char * auth_user_pass_verify_script
struct route_option_list * routes
struct iroute_ipv6 * iroutes_ipv6
const char * management_addr
struct pull_filter_list * pull_filter_list
struct route_ipv6_option_list * routes_ipv6
bool options_cmp_equal_safe(char *actual, const char *expected, size_t actual_n)
unsigned int server_flags
bool machine_readable_output
Garbage collection arena used to keep track of dynamically allocated memory.
const char * management_client_group
void show_library_versions(const unsigned int flags)
unsigned int auth_token_lifetime
unsigned int server_netbits_ipv6
const char * ifconfig_local
void pre_pull_default(struct options *o)
void notnull(const char *arg, const char *description)
const char * packet_id_file
void options_detach(struct options *o)
const char * management_client_user
in_addr_t server_bridge_pool_end
in_addr_t push_ifconfig_constraint_network
bool auth_retry_set(const int msglevel, const char *option)
bool tun_mtu_extra_defined
int stale_routes_ageing_time
int management_echo_buffer_size
const char * dh_file_inline
#define CONNECTION_LIST_SIZE
const char * ifconfig_remote_netmask
in_addr_t server_bridge_netmask
bool server_bridge_defined
char * priv_key_file_inline
const char * shared_secret_file_inline
void uninit_options(struct options *o)
int ifconfig_ipv6_pool_netbits
bool route_gateway_via_dhcp