OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::MacGatewayInfo Class Reference

#include <gw.hpp>

Collaboration diagram for openvpn::MacGatewayInfo:
[legend]

Classes

struct  rtmsg
 

Public Types

enum  { ADDR_DEFINED = (1 << 0) , NETMASK_DEFINED = (1 << 1) , HWADDR_DEFINED = (1 << 2) , IFACE_DEFINED = (1 << 3) }
 

Public Member Functions

 OPENVPN_EXCEPTION (route_gateway_error)
 
 MacGatewayInfo (IP::Addr dest, std::ostream *os=nullptr)
 
std::string info () const
 
unsigned int flags () const
 
const IP::Addrgateway_addr () const
 
std::string gateway_addr_str () const
 
const IP::Addrgateway_netmask () const
 
std::string gateway_netmask_str () const
 
std::string iface () const
 
const MACAddrhwaddr () const
 
bool iface_addr_defined () const
 
bool hwaddr_defined () const
 

Private Member Functions

constexpr std::uint32_t openvpn_roundup (std::uint32_t a)
 

Private Attributes

unsigned int flags_ = 0
 
IP::AddrMaskPair gateway_
 
char iface_ [16]
 
MACAddr hwaddr_
 

Detailed Description

Definition at line 44 of file gw.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ADDR_DEFINED 
NETMASK_DEFINED 
HWADDR_DEFINED 
IFACE_DEFINED 

Definition at line 61 of file gw.hpp.

Constructor & Destructor Documentation

◆ MacGatewayInfo()

openvpn::MacGatewayInfo::MacGatewayInfo ( IP::Addr  dest,
std::ostream *  os = nullptr 
)
inline

Definition at line 69 of file gw.hpp.

Member Function Documentation

◆ flags()

unsigned int openvpn::MacGatewayInfo::flags ( ) const
inline

Definition at line 245 of file gw.hpp.

◆ gateway_addr()

const IP::Addr & openvpn::MacGatewayInfo::gateway_addr ( ) const
inline

Definition at line 249 of file gw.hpp.

Here is the caller graph for this function:

◆ gateway_addr_str()

std::string openvpn::MacGatewayInfo::gateway_addr_str ( ) const
inline

Definition at line 253 of file gw.hpp.

◆ gateway_netmask()

const IP::Addr & openvpn::MacGatewayInfo::gateway_netmask ( ) const
inline

Definition at line 257 of file gw.hpp.

Here is the caller graph for this function:

◆ gateway_netmask_str()

std::string openvpn::MacGatewayInfo::gateway_netmask_str ( ) const
inline

Definition at line 261 of file gw.hpp.

◆ hwaddr()

const MACAddr & openvpn::MacGatewayInfo::hwaddr ( ) const
inline

Definition at line 269 of file gw.hpp.

◆ hwaddr_defined()

bool openvpn::MacGatewayInfo::hwaddr_defined ( ) const
inline

Definition at line 279 of file gw.hpp.

◆ iface()

std::string openvpn::MacGatewayInfo::iface ( ) const
inline

Definition at line 265 of file gw.hpp.

◆ iface_addr_defined()

bool openvpn::MacGatewayInfo::iface_addr_defined ( ) const
inline

Definition at line 274 of file gw.hpp.

◆ info()

std::string openvpn::MacGatewayInfo::info ( ) const
inline

Definition at line 226 of file gw.hpp.

◆ OPENVPN_EXCEPTION()

openvpn::MacGatewayInfo::OPENVPN_EXCEPTION ( route_gateway_error  )

◆ openvpn_roundup()

constexpr std::uint32_t openvpn::MacGatewayInfo::openvpn_roundup ( std::uint32_t  a)
inlineconstexprprivate

Definition at line 52 of file gw.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ flags_

unsigned int openvpn::MacGatewayInfo::flags_ = 0
private

Definition at line 285 of file gw.hpp.

◆ gateway_

IP::AddrMaskPair openvpn::MacGatewayInfo::gateway_
private

Definition at line 286 of file gw.hpp.

◆ hwaddr_

MACAddr openvpn::MacGatewayInfo::hwaddr_
private

Definition at line 288 of file gw.hpp.

◆ iface_

char openvpn::MacGatewayInfo::iface_[16]
private

Definition at line 287 of file gw.hpp.


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