AnCH Framework  0.1
Another C++ Hack Framework
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
anch::device::NetworkInterface Class Reference

#include <networkInterface.hpp>

Collaboration diagram for anch::device::NetworkInterface:

Public Member Functions

 NetworkInterface (const struct ifreq &interface, bool isLocalhost) throw (anch::device::DeviceException)
 
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::NetworkInterface ( const struct ifreq &  interface,
bool  isLocalhost 
)
throw (anch::device::DeviceException
)

NetworkInterface constructor.

Parameters
interfacedata retrieved through ioctl POSIX call
isLocalhostinterface is local loopback
Exceptions
anch::device::DeviceExceptionDevice error

NetworkInterface constructor.

Parameters
interfaceData retrieved through ioctl POSIX call
isLocalhostInterface is local loopback
Exceptions
DeviceExceptionDevice error
NetworkInterface::~NetworkInterface ( )
virtual

NetworkInterface destructor

Member Function Documentation

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

Interface broadcast address getter

Returns
The interface broadcast address
const std::string& anch::device::NetworkInterface::getIpAddress ( ) const
inline

Interface IP address getter

Returns
The interface IP address
const std::string& anch::device::NetworkInterface::getMacAddress ( ) const
inline

MAC address getter

Returns
The MAC address
int anch::device::NetworkInterface::getMetric ( ) const
inline

Interface metric getter

Returns
The interface metric
int anch::device::NetworkInterface::getMtu ( ) const
inline

Interface MTU getter

Returns
The interface MTU
const std::string& anch::device::NetworkInterface::getName ( ) const
inline

Interface name getter

Returns
The interface name
const std::string& anch::device::NetworkInterface::getNetmask ( ) const
inline

Interface netmask getter

Returns
The interface netmask
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 files: