libcommonc++  0.7
NetworkInterface Class Reference

An aggregation of information about a network interface. More...

#include <NetworkInterface.h++>

Public Member Functions

 ~NetworkInterface ()
 Destructor. More...
 
String getName () const
 Get the interface name. More...
 
InetAddress getAddress () const
 Get the unicast address. More...
 
MACAddress getHardwareAddress () const
 Get the hardware (MAC) address. More...
 
InetAddress getBroadcastAddress () const
 Get the broadcast address. More...
 
InetAddress getDestAddress () const
 Get the destination address. More...
 
InetAddress getNetMask () const
 Get the netmask. More...
 
uint_t getPrefixLength () const
 Get the subnet prefix length. More...
 
uint32_t getFlags () const
 Get the interface flags. More...
 
bool isUp () const
 Test if the interface is up. More...
 
bool isBroadcastSupported () const
 Test if the interface has broadcast capability. More...
 
bool isMulticastSupported () const
 Test if the interface has multicast capability. More...
 
bool isLoopback () const
 Test if the interface is a loopback interface. More...
 
bool isPPP () const
 Test if the interface is a PPP interface. More...
 
bool isRunning () const
 Test if the interface is running. More...
 
int getMTU () const
 Get the maximum transmission unit (MTU). More...
 
int getMetric () const
 Get the routing metric. More...
 

Static Public Attributes

static const uint32_t FLAG_UP = 1 << 0
 A flag indicating that an interface is up. More...
 
static const uint32_t FLAG_BROADCAST = 1 << 1
 A flag indicating that an interface has broadcast capability. More...
 
static const uint32_t FLAG_LOOPBACK = 1 << 2
 A flag identifying an interface as a loopback interface. More...
 
static const uint32_t FLAG_PPP = 1 << 3
 A flag identifying an interface as a Point-to-Point link interface. More...
 
static const uint32_t FLAG_RUNNING = 1 << 4
 A flag indicating that an interface is running. More...
 
static const uint32_t FLAG_MULTICAST = 1 << 5
 A flag indicating that an interface has multicast capability. More...
 
static const uint32_t FLAG_MASK = 0x3F
 Flag mask (all flag bits set). More...
 

Friends

class Network
 

Detailed Description

An aggregation of information about a network interface.

Author
Mark Lindner

Constructor & Destructor Documentation

◆ ~NetworkInterface()

Destructor.

Member Function Documentation

◆ getAddress()

InetAddress getAddress ( ) const
inline

Get the unicast address.

◆ getBroadcastAddress()

InetAddress getBroadcastAddress ( ) const
inline

Get the broadcast address.

◆ getDestAddress()

InetAddress getDestAddress ( ) const
inline

Get the destination address.

◆ getFlags()

uint32_t getFlags ( ) const
inline

Get the interface flags.

◆ getHardwareAddress()

MACAddress getHardwareAddress ( ) const
inline

Get the hardware (MAC) address.

◆ getMetric()

int getMetric ( ) const
inline

Get the routing metric.

◆ getMTU()

int getMTU ( ) const
inline

Get the maximum transmission unit (MTU).

◆ getName()

String getName ( ) const
inline

Get the interface name.

◆ getNetMask()

InetAddress getNetMask ( ) const
inline

Get the netmask.

◆ getPrefixLength()

uint_t getPrefixLength ( ) const
inline

Get the subnet prefix length.

◆ isBroadcastSupported()

bool isBroadcastSupported ( ) const
inline

Test if the interface has broadcast capability.

◆ isLoopback()

bool isLoopback ( ) const
inline

Test if the interface is a loopback interface.

◆ isMulticastSupported()

bool isMulticastSupported ( ) const
inline

Test if the interface has multicast capability.

◆ isPPP()

bool isPPP ( ) const
inline

Test if the interface is a PPP interface.

◆ isRunning()

bool isRunning ( ) const
inline

Test if the interface is running.

◆ isUp()

bool isUp ( ) const
inline

Test if the interface is up.

Friends And Related Function Documentation

◆ Network

friend class Network
friend

Member Data Documentation

◆ FLAG_BROADCAST

const uint32_t FLAG_BROADCAST = 1 << 1
static

A flag indicating that an interface has broadcast capability.

◆ FLAG_LOOPBACK

const uint32_t FLAG_LOOPBACK = 1 << 2
static

A flag identifying an interface as a loopback interface.

◆ FLAG_MASK

const uint32_t FLAG_MASK = 0x3F
static

Flag mask (all flag bits set).

◆ FLAG_MULTICAST

const uint32_t FLAG_MULTICAST = 1 << 5
static

A flag indicating that an interface has multicast capability.

◆ FLAG_PPP

const uint32_t FLAG_PPP = 1 << 3
static

A flag identifying an interface as a Point-to-Point link interface.

◆ FLAG_RUNNING

const uint32_t FLAG_RUNNING = 1 << 4
static

A flag indicating that an interface is running.

◆ FLAG_UP

const uint32_t FLAG_UP = 1 << 0
static

A flag indicating that an interface is up.


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