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

Go to the source code of this file.

Functions

 OPENVPN_SIMPLE_EXCEPTION (ipv4_bad_prefix_len)
 
 OPENVPN_SIMPLE_EXCEPTION (ipv4_bad_netmask)
 
IPv4::Addr::base_type prefix_len_to_netmask_unchecked (const unsigned int prefix_len)
 
IPv4::Addr::base_type prefix_len_to_netmask (const unsigned int prefix_len)
 
int prefix_len (const IPv4::Addr::base_type mask)
 
 TEST (IPAddr, test32)
 
 TEST (IPAddr, prefixlen)
 
void testbig ()
 

Function Documentation

◆ OPENVPN_SIMPLE_EXCEPTION() [1/2]

OPENVPN_SIMPLE_EXCEPTION ( ipv4_bad_netmask  )

◆ OPENVPN_SIMPLE_EXCEPTION() [2/2]

OPENVPN_SIMPLE_EXCEPTION ( ipv4_bad_prefix_len  )

◆ prefix_len()

int prefix_len ( const IPv4::Addr::base_type  mask)
inline

Definition at line 27 of file test_prefixlen.cpp.

Here is the caller graph for this function:

◆ prefix_len_to_netmask()

IPv4::Addr::base_type prefix_len_to_netmask ( const unsigned int  prefix_len)
inline

Definition at line 19 of file test_prefixlen.cpp.

Here is the caller graph for this function:

◆ prefix_len_to_netmask_unchecked()

IPv4::Addr::base_type prefix_len_to_netmask_unchecked ( const unsigned int  prefix_len)
inline

Definition at line 14 of file test_prefixlen.cpp.

Here is the caller graph for this function:

◆ TEST() [1/2]

TEST ( IPAddr  ,
prefixlen   
)

Definition at line 63 of file test_prefixlen.cpp.

◆ TEST() [2/2]

TEST ( IPAddr  ,
test32   
)

Definition at line 50 of file test_prefixlen.cpp.

◆ testbig()

void testbig ( )

Definition at line 74 of file test_prefixlen.cpp.