OpenVPN 3 Core Library
Loading...
Searching...
No Matches
test_ip.cpp File Reference
#include "test_common.hpp"
#include <iostream>
#include <openvpn/common/size.hpp>
#include <openvpn/common/exception.hpp>
#include <openvpn/ip/ping6.hpp>
#include <openvpn/addr/ip.hpp>
#include <openvpn/addr/pool.hpp>
#include <openvpn/addr/ipv6.hpp>
Include dependency graph for test_ip.cpp:

Go to the source code of this file.

Classes

struct  test_case
 

Functions

 TEST (IPAddr, icmp6csum)
 
 TEST (IPAddr, pool)
 
 TEST (Pool, AcquiringNotAvailableAddressReturnsFalse)
 
 TEST (Range, EmptyRangeBeginEndIteratorsAreEqual)
 
void do_shift_tests (const std::vector< test_case > &test_vectors, bool leftshift)
 
 TEST (IPAddr, left_shift)
 
 TEST (IPAddr, left_shift_random)
 
 TEST (IPAddr, right_shift)
 
 TEST (IPAddr, right_shift_random)
 
 TEST (IPAddr, mapped_v4)
 

Variables

static const uint8_t icmp6_packet []
 
static bool verbose = false
 

Function Documentation

◆ do_shift_tests()

void do_shift_tests ( const std::vector< test_case > &  test_vectors,
bool  leftshift 
)

Definition at line 130 of file test_ip.cpp.

Here is the caller graph for this function:

◆ TEST() [1/9]

TEST ( IPAddr  ,
icmp6csum   
)

Definition at line 33 of file test_ip.cpp.

◆ TEST() [2/9]

TEST ( IPAddr  ,
left_shift   
)

Definition at line 174 of file test_ip.cpp.

◆ TEST() [3/9]

TEST ( IPAddr  ,
left_shift_random   
)

Definition at line 192 of file test_ip.cpp.

◆ TEST() [4/9]

TEST ( IPAddr  ,
mapped_v4   
)

Definition at line 248 of file test_ip.cpp.

◆ TEST() [5/9]

TEST ( IPAddr  ,
pool   
)

Definition at line 51 of file test_ip.cpp.

◆ TEST() [6/9]

TEST ( IPAddr  ,
right_shift   
)

Definition at line 211 of file test_ip.cpp.

◆ TEST() [7/9]

TEST ( IPAddr  ,
right_shift_random   
)

Definition at line 230 of file test_ip.cpp.

◆ TEST() [8/9]

TEST ( Pool  ,
AcquiringNotAvailableAddressReturnsFalse   
)

Definition at line 109 of file test_ip.cpp.

◆ TEST() [9/9]

TEST ( Range  ,
EmptyRangeBeginEndIteratorsAreEqual   
)

Definition at line 116 of file test_ip.cpp.

Variable Documentation

◆ icmp6_packet

const uint8_t icmp6_packet[]
static
Initial value:
= {
0x60, 0x06, 0x22, 0xe5, 0x00, 0x40, 0x3a, 0x28, 0x26, 0x01, 0x02, 0x81, 0x84, 0x80, 0x14, 0xe0,
0xbc, 0xc1, 0x91, 0x20, 0xfc, 0xa3, 0x0e, 0x22, 0x26, 0x00, 0x1f, 0x18, 0x47, 0x2b, 0x89, 0x05,
0x2a, 0xc4, 0x3b, 0xf3, 0xd5, 0x77, 0x29, 0x42, 0x80, 0x00, 0x99, 0x99, 0x3f, 0xd4, 0x00, 0x0e,
0x43, 0xd4, 0xc3, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x3d, 0xc2, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37
}

Definition at line 18 of file test_ip.cpp.

◆ verbose

bool verbose = false
static

Definition at line 31 of file test_ip.cpp.