AnCH Framework 0.1
Another C++ Hack Framework
 
Loading...
Searching...
No Matches
anch::device::NetworkInterface Class Reference

#include <networkInterface.hpp>

+ Collaboration diagram for anch::device::NetworkInterface:

Public Member Functions

 NetworkInterface (const struct ifreq &interface, bool isLocalhost)
 
virtual ~NetworkInterface ()
 
const std::string & getName () const
 
const std::string & getIpAddress () const
 
const std::string & getMacAddress () const
 
const std::string & getBroadcastAddress () const
 
const std::string & getNetmask () const
 
int getMtu () const
 
int getMetric () const
 
bool isLocalhost () const
 

Detailed Description

Network interface

Author
Vincent Lachenal

Constructor & Destructor Documentation

◆ NetworkInterface()

anch::device::NetworkInterface::NetworkInterface ( const struct ifreq & interface,
bool isLocalhost )

NetworkInterface constructor.

Parameters
interfacedata retrieved through ioctl POSIX call
isLocalhostinterface is local loopback
Exceptions
anch::device::DeviceExceptionDevice error
+ Here is the call graph for this function:

◆ ~NetworkInterface()

virtual anch::device::NetworkInterface::~NetworkInterface ( )
virtual

NetworkInterface destructor

Member Function Documentation

◆ getBroadcastAddress()

const std::string & anch::device::NetworkInterface::getBroadcastAddress ( ) const
inline

Interface broadcast address getter

Returns
The interface broadcast address

◆ getIpAddress()

const std::string & anch::device::NetworkInterface::getIpAddress ( ) const
inline

Interface IP address getter

Returns
The interface IP address

◆ getMacAddress()

const std::string & anch::device::NetworkInterface::getMacAddress ( ) const
inline

MAC address getter

Returns
The MAC address

◆ getMetric()

int anch::device::NetworkInterface::getMetric ( ) const
inline

Interface metric getter

Returns
The interface metric

◆ getMtu()

int anch::device::NetworkInterface::getMtu ( ) const
inline

Interface MTU getter

Returns
The interface MTU

◆ getName()

const std::string & anch::device::NetworkInterface::getName ( ) const
inline

Interface name getter

Returns
The interface name

◆ getNetmask()

const std::string & anch::device::NetworkInterface::getNetmask ( ) const
inline

Interface netmask getter

Returns
The interface netmask

◆ isLocalhost()

bool anch::device::NetworkInterface::isLocalhost ( ) const
inline

Is interface localhost getter

Returns
true if interface is localhost, false otherwise

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