OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::IP Namespace Reference

Namespaces

namespace  internal
 

Classes

class  Addr
 
class  AddressSpaceSplitter
 
class  AddrList
 
struct  AddrMaskPair
 
class  PoolType
 
class  RangePartitionType
 divide a range of IP addresses into smaller, equal-sized partitions More...
 
class  RangeType
 designed to represent and manage a range of IP addresses. More...
 
class  RouteType
 
struct  RouteTypeList
 

Typedefs

typedef PoolType< IP::AddrPool
 
using Range = RangeType< IP::Addr >
 
using RangePartition = RangePartitionType< IP::Addr >
 
typedef RouteType< IP::AddrRoute
 
typedef RouteType< IPv4::AddrRoute4
 
typedef RouteType< IPv6::AddrRoute6
 
typedef RouteTypeList< IP::AddrRouteList
 
typedef RouteTypeList< IPv4::AddrRoute4List
 
typedef RouteTypeList< IPv6::AddrRoute6List
 

Functions

 OPENVPN_EXCEPTION (ip_exception)
 
IPv4::Addr random_addr_v4 (RandomAPI &prng)
 
IPv6::Addr random_addr_v6 (RandomAPI &prng)
 
Addr random_addr (const Addr::Version v, RandomAPI &prng)
 
Route random_subnet (const Route &templ, const unsigned int prefix_len, RandomAPI &prng)
 
std::string v4_regex ()
 
std::string v6_regex ()
 
const std::regex re_v4 (v4_regex(), std::regex_constants::ECMAScript|std::regex_constants::nosubs)
 
const std::regex re_v6 (v6_regex(), std::regex_constants::ECMAScript|std::regex_constants::nosubs)
 
bool is_ipv4_address (const std::string &host)
 
bool is_ipv6_address (const std::string &host)
 
bool is_ip_address (const std::string &host)
 
 OPENVPN_OSTREAM (Route, to_string)
 
 OPENVPN_OSTREAM (RouteList, to_string)
 
template<typename TITLE >
Route route_from_string_prefix (const std::string &addrstr, const unsigned int prefix_len, const TITLE &title, const IP::Addr::Version required_version=IP::Addr::UNSPEC)
 
template<typename TITLE >
Route route_from_string (const std::string &rtstr, const TITLE &title, const IP::Addr::Version required_version=IP::Addr::UNSPEC)
 

Typedef Documentation

◆ Pool

Definition at line 183 of file pool.hpp.

◆ Range

Definition at line 215 of file range.hpp.

◆ RangePartition

Definition at line 249 of file range.hpp.

◆ Route

Definition at line 357 of file route.hpp.

◆ Route4

Definition at line 358 of file route.hpp.

◆ Route4List

Definition at line 362 of file route.hpp.

◆ Route6

Definition at line 359 of file route.hpp.

◆ Route6List

Definition at line 363 of file route.hpp.

◆ RouteList

Definition at line 361 of file route.hpp.

Function Documentation

◆ is_ip_address()

bool openvpn::IP::is_ip_address ( const std::string &  host)
inline

Definition at line 34 of file regex_static.hpp.

◆ is_ipv4_address()

bool openvpn::IP::is_ipv4_address ( const std::string &  host)
inline

Definition at line 24 of file regex_static.hpp.

Here is the caller graph for this function:

◆ is_ipv6_address()

bool openvpn::IP::is_ipv6_address ( const std::string &  host)
inline

Definition at line 29 of file regex_static.hpp.

Here is the caller graph for this function:

◆ OPENVPN_EXCEPTION()

openvpn::IP::OPENVPN_EXCEPTION ( ip_exception  )

◆ OPENVPN_OSTREAM() [1/2]

openvpn::IP::OPENVPN_OSTREAM ( Route  ,
to_string   
)

◆ OPENVPN_OSTREAM() [2/2]

openvpn::IP::OPENVPN_OSTREAM ( RouteList  ,
to_string   
)

◆ random_addr()

Addr openvpn::IP::random_addr ( const Addr::Version  v,
RandomAPI prng 
)
inline

Definition at line 32 of file randaddr.hpp.

Here is the caller graph for this function:

◆ random_addr_v4()

IPv4::Addr openvpn::IP::random_addr_v4 ( RandomAPI prng)
inline

Definition at line 20 of file randaddr.hpp.

Here is the caller graph for this function:

◆ random_addr_v6()

IPv6::Addr openvpn::IP::random_addr_v6 ( RandomAPI prng)
inline

Definition at line 25 of file randaddr.hpp.

Here is the caller graph for this function:

◆ random_subnet()

Route openvpn::IP::random_subnet ( const Route templ,
const unsigned int  prefix_len,
RandomAPI prng 
)
inline

Definition at line 46 of file randaddr.hpp.

◆ re_v4()

const std::regex openvpn::IP::re_v4 ( v4_regex()  ,
std::regex_constants::ECMAScript|std::regex_constants::nosubs   
)
inline
Here is the caller graph for this function:

◆ re_v6()

const std::regex openvpn::IP::re_v6 ( v6_regex()  ,
std::regex_constants::ECMAScript|std::regex_constants::nosubs   
)
inline
Here is the caller graph for this function:

◆ route_from_string()

template<typename TITLE >
Route openvpn::IP::route_from_string ( const std::string &  rtstr,
const TITLE &  title,
const IP::Addr::Version  required_version = IP::Addr::UNSPEC 
)
inline

Definition at line 390 of file route.hpp.

◆ route_from_string_prefix()

template<typename TITLE >
Route openvpn::IP::route_from_string_prefix ( const std::string &  addrstr,
const unsigned int  prefix_len,
const TITLE &  title,
const IP::Addr::Version  required_version = IP::Addr::UNSPEC 
)
inline

Definition at line 376 of file route.hpp.

Here is the caller graph for this function:

◆ v4_regex()

std::string openvpn::IP::v4_regex ( )
inline

Definition at line 21 of file regex.hpp.

Here is the caller graph for this function:

◆ v6_regex()

std::string openvpn::IP::v6_regex ( )
inline

Definition at line 27 of file regex.hpp.