OpenVPN 3 Core Library
Loading...
Searching...
No Matches
tunmtu.hpp
Go to the documentation of this file.
1
// OpenVPN -- An application to securely tunnel IP networks
2
// over a single port, with support for SSL/TLS-based
3
// session authentication and key exchange,
4
// packet encryption, packet authentication, and
5
// packet compression.
6
//
7
// Copyright (C) 2012- OpenVPN Inc.
8
//
9
// SPDX-License-Identifier: MPL-2.0 OR AGPL-3.0-only WITH openvpn3-openssl-exception
10
//
11
12
#ifndef OPENVPN_TUN_TUNMTU_H
13
#define OPENVPN_TUN_TUNMTU_H
14
15
#include <
openvpn/common/options.hpp
>
16
17
namespace
openvpn
{
18
enum
19
{
20
TUN_MTU_DEFAULT
= 1500,
21
};
22
23
inline
unsigned
int
parse_tun_mtu
(
const
OptionList
&opt,
unsigned
int
default_value)
24
{
25
return
opt.
get_num
<
unsigned
int
>(
"tun-mtu"
, 1, default_value, 576, 65535);
26
}
27
28
inline
unsigned
int
parse_tun_mtu_max
(
const
OptionList
&opt,
unsigned
int
default_value)
29
{
30
return
opt.
get_num
<
unsigned
int
>(
"tun-mtu-max"
, 1, default_value, 576, 65535);
31
}
32
}
// namespace openvpn
33
34
#endif
openvpn::OptionList
Definition
options.hpp:517
openvpn::OptionList::get_num
T get_num(const std::string &name, const size_t idx, const T default_value) const
Definition
options.hpp:1416
openvpn
Support deferred server-side state creation when client connects.
Definition
ovpncli.cpp:95
openvpn::parse_tun_mtu_max
unsigned int parse_tun_mtu_max(const OptionList &opt, unsigned int default_value)
Definition
tunmtu.hpp:28
openvpn::TUN_MTU_DEFAULT
@ TUN_MTU_DEFAULT
Definition
tunmtu.hpp:20
openvpn::parse_tun_mtu
unsigned int parse_tun_mtu(const OptionList &opt, unsigned int default_value)
Definition
tunmtu.hpp:23
options.hpp
openvpn
tun
tunmtu.hpp
Generated by
1.9.8