Go to the documentation of this file.
128 if ((a & subnet) != (b & subnet))
130 msg(
M_USAGE,
"%s IP addresses %s and %s are not in the same %s subnet",
200 msg(
M_USAGE,
"--server-ipv6 and --client cannot be used together");
205 msg(
M_USAGE,
"--server-ipv6 is incompatible with 'nopool' option");
209 msg(
M_USAGE,
"--server-ipv6 already defines an ifconfig-ipv6-pool, so you can't also specify --ifconfig-pool explicitly");
276 msg(
M_USAGE,
"--server and --client cannot be used together");
281 msg(
M_USAGE,
"--server and --server-bridge cannot be used together");
286 msg(
M_USAGE,
"--server and --secret cannot be used together (you must use SSL/TLS keys)");
291 msg(
M_USAGE,
"--server already defines an ifconfig-pool, so you can't also specify --ifconfig-pool explicitly");
296 msg(
M_USAGE,
"--server directive only makes sense with --dev tun or --dev tap");
302 msg(
M_USAGE,
"--server directive network/netmask combination is invalid");
307 msg(
M_USAGE,
"--server directive netmask is invalid");
312 msg(
M_USAGE,
"--server directive netmask allows for too many host addresses (subnet must be %s or higher)",
318 int pool_end_reserve = 4;
322 msg(
M_USAGE,
"--server directive when used with --dev tun must define a subnet of %s or lower",
328 pool_end_reserve = 0;
388 msg(
M_WARN,
"WARNING: --topology net30 support for server "
389 "configs with IPv4 pools will be removed in a future "
390 "release. Please migrate to --topology subnet as soon "
398 msg(
M_USAGE,
"--server directive when used with --dev tap must define a subnet of %s or lower",
461 msg(
M_USAGE,
"--server-bridge and --client cannot be used together");
466 msg(
M_USAGE,
"--server-bridge already defines an ifconfig-pool, so you can't also specify --ifconfig-pool explicitly");
471 msg(
M_USAGE,
"--server-bridge and --secret cannot be used together (you must use SSL/TLS keys)");
476 msg(
M_USAGE,
"--server-bridge directive only makes sense with --dev tap");
550 msg(
M_USAGE,
"--keepalive parameters must be > 0");
554 msg(
M_USAGE,
"the second parameter to --keepalive (restart timeout=%d) must be at least twice the value of the first parameter (ping interval=%d). A ratio of 1:5 or 1:6 would be even better. Recommended setting is --keepalive 10 60.",
560 msg(
M_USAGE,
"--keepalive conflicts with --ping, --ping-exit, or --ping-restart. If you use --keepalive, you don't need any of the other --ping directives.");
struct in6_addr server_network_ipv6
void helper_setdefault_topology(struct options *o)
Set –topology default depending on –mode.
bool netmask_to_netbits(const in_addr_t network, const in_addr_t netmask, int *netbits)
void helper_client_server(struct options *o)
#define SF_NO_PUSH_ROUTE_GATEWAY
static struct gc_arena gc_new(void)
#define SF_TCP_NODELAY_HELPER
unsigned int server_flags
static const char * print_netmask(int netbits, struct gc_arena *gc)
in_addr_t server_bridge_ip
const char * shared_secret_file
struct buffer alloc_buf_gc(size_t size, struct gc_arena *gc)
static void verify_common_subnet(const char *opt, const in_addr_t a, const in_addr_t b, const in_addr_t subnet)
static const char * print_opt_route(const in_addr_t network, const in_addr_t netmask, struct gc_arena *gc)
bool ifconfig_ipv6_pool_defined
void add_route_to_option_list(struct route_option_list *l, const char *network, const char *netmask, const char *gateway, const char *metric)
void push_option(struct options *o, const char *opt, int msglevel)
void helper_tcp_nodelay(struct options *o)
const char * print_in6_addr(struct in6_addr a6, unsigned int flags, struct gc_arena *gc)
const char * print_topology(const int topology)
int ifconfig_ipv6_netbits
#define IFCONFIG_POOL_MIN_NETBITS
bool push_ifconfig_constraint_defined
unsigned int server_netbits_ipv6
static const char * print_str(const char *str, struct gc_arena *gc)
void helper_keepalive(struct options *o)
in_addr_t ifconfig_pool_netmask
Wrapper structure for dynamically allocated memory.
const char * print_in_addr_t(in_addr_t addr, unsigned int flags, struct gc_arena *gc)
static const char * print_opt_topology(const int topology, struct gc_arena *gc)
bool server_bridge_proxy_dhcp
in_addr_t server_bridge_pool_start
Garbage collection arena used to keep track of dynamically allocated memory.
#define MODE_POINT_TO_POINT
in_addr_t server_bridge_netmask
void rol_check_alloc(struct options *options)
in_addr_t ifconfig_pool_end
static const char * print_str_int(const char *str, const int i, struct gc_arena *gc)
bool ifconfig_pool_defined
static in_addr_t netbits_to_netmask(const int netbits)
static SERVICE_STATUS status
static void gc_free(struct gc_arena *a)
static const char * print_opt_route_gateway(const in_addr_t route_gateway, struct gc_arena *gc)
const char * ifconfig_remote_netmask
struct route_option_list * routes
int ifconfig_ipv6_pool_netbits
static void helper_add_route(const in_addr_t network, const in_addr_t netmask, struct options *o)
in_addr_t server_bridge_pool_end
in_addr_t ifconfig_pool_start
struct in6_addr ifconfig_ipv6_pool_base
const char * ifconfig_ipv6_local
static const char * print_opt_route_gateway_dhcp(struct gc_arena *gc)
in_addr_t push_ifconfig_constraint_network
bool ifconfig_pool_verify_range(const int msglevel, const in_addr_t start, const in_addr_t end)
struct in6_addr add_in6_addr(struct in6_addr base, uint32_t add)
const char * ifconfig_local
int ping_rec_timeout_action
const char * ifconfig_ipv6_remote
bool buf_printf(struct buffer *buf, const char *format,...)
bool server_bridge_defined
in_addr_t push_ifconfig_constraint_netmask
int dev_type_enum(const char *dev, const char *dev_type)
const char * route_default_gateway