OpenVPN 3 Core Library
Loading...
Searching...
No Matches
unittests::SitnlTest Class Reference
Inheritance diagram for unittests::SitnlTest:
[legend]
Collaboration diagram for unittests::SitnlTest:
[legend]

Protected Member Functions

void SetUp () override
 
void TearDown () override
 
template<typename CALLBACK >
void cmd (const Argv &argv, CALLBACK cb)
 
template<typename CALLBACK >
void ip_a_show_dev (CALLBACK cb)
 
template<typename CALLBACK >
void ip_route_get (std::string dst, CALLBACK cb)
 

Static Protected Member Functions

static void SetUpTestSuite ()
 
static bool haveCapNetAdmin ()
 

Protected Attributes

std::string dev = "tun999"
 
std::string dev2 = "tun9999"
 
std::string addr4 = "10.10.0.2"
 
std::string route4 = "10.110.0.0/24"
 
std::string gw4 = "10.10.0.1"
 
std::string addr6 = "fe80:20c3:aaaa:bbbb::cccc"
 
std::string route6 = "fe80:20c3:cccc:dddd::0/64"
 
std::string gw6 = "fe80:20c3:aaaa:bbbb:cccc:dddd:eeee:1"
 
int ipv4_prefix_len = 16
 
int ipv6_prefix_len = 64
 
int mtu = 1234
 

Private Member Functions

void add_device (std::string name)
 
void remove_device (std::string name)
 

Detailed Description

Definition at line 30 of file test_sitnl.cpp.

Member Function Documentation

◆ add_device()

void unittests::SitnlTest::add_device ( std::string  name)
inlineprivate

Definition at line 33 of file test_sitnl.cpp.

Here is the caller graph for this function:

◆ cmd()

template<typename CALLBACK >
void unittests::SitnlTest::cmd ( const Argv argv,
CALLBACK  cb 
)
inlineprotected

Definition at line 101 of file test_sitnl.cpp.

Here is the caller graph for this function:

◆ haveCapNetAdmin()

static bool unittests::SitnlTest::haveCapNetAdmin ( )
inlinestaticprotected

Definition at line 76 of file test_sitnl.cpp.

Here is the caller graph for this function:

◆ ip_a_show_dev()

template<typename CALLBACK >
void unittests::SitnlTest::ip_a_show_dev ( CALLBACK  cb)
inlineprotected

Definition at line 126 of file test_sitnl.cpp.

◆ ip_route_get()

template<typename CALLBACK >
void unittests::SitnlTest::ip_route_get ( std::string  dst,
CALLBACK  cb 
)
inlineprotected

Definition at line 140 of file test_sitnl.cpp.

◆ remove_device()

void unittests::SitnlTest::remove_device ( std::string  name)
inlineprivate

Definition at line 46 of file test_sitnl.cpp.

Here is the caller graph for this function:

◆ SetUp()

void unittests::SitnlTest::SetUp ( )
inlineoverrideprotected

Definition at line 85 of file test_sitnl.cpp.

◆ SetUpTestSuite()

static void unittests::SitnlTest::SetUpTestSuite ( )
inlinestaticprotected

Definition at line 60 of file test_sitnl.cpp.

◆ TearDown()

void unittests::SitnlTest::TearDown ( )
inlineoverrideprotected

Definition at line 94 of file test_sitnl.cpp.

Member Data Documentation

◆ addr4

std::string unittests::SitnlTest::addr4 = "10.10.0.2"
protected

Definition at line 155 of file test_sitnl.cpp.

◆ addr6

std::string unittests::SitnlTest::addr6 = "fe80:20c3:aaaa:bbbb::cccc"
protected

Definition at line 159 of file test_sitnl.cpp.

◆ dev

std::string unittests::SitnlTest::dev = "tun999"
protected

Definition at line 152 of file test_sitnl.cpp.

◆ dev2

std::string unittests::SitnlTest::dev2 = "tun9999"
protected

Definition at line 153 of file test_sitnl.cpp.

◆ gw4

std::string unittests::SitnlTest::gw4 = "10.10.0.1"
protected

Definition at line 157 of file test_sitnl.cpp.

◆ gw6

std::string unittests::SitnlTest::gw6 = "fe80:20c3:aaaa:bbbb:cccc:dddd:eeee:1"
protected

Definition at line 161 of file test_sitnl.cpp.

◆ ipv4_prefix_len

int unittests::SitnlTest::ipv4_prefix_len = 16
protected

Definition at line 163 of file test_sitnl.cpp.

◆ ipv6_prefix_len

int unittests::SitnlTest::ipv6_prefix_len = 64
protected

Definition at line 164 of file test_sitnl.cpp.

◆ mtu

int unittests::SitnlTest::mtu = 1234
protected

Definition at line 165 of file test_sitnl.cpp.

◆ route4

std::string unittests::SitnlTest::route4 = "10.110.0.0/24"
protected

Definition at line 156 of file test_sitnl.cpp.

◆ route6

std::string unittests::SitnlTest::route6 = "fe80:20c3:cccc:dddd::0/64"
protected

Definition at line 160 of file test_sitnl.cpp.


The documentation for this class was generated from the following file: