MACAddress Class Reference

A network hardware (MAC) address. More...

#include <MACAddress.h++>

List of all members.

Public Member Functions

 MACAddress ()
 Construct a new, null MACAddress (00:00:00:00:00:00).
 MACAddress (const byte_t octets[6])
 Construct a new MACAddress with the given octets.
 ~MACAddress ()
 Destructor.
void getOctets (byte_t octets[6]) const
 Get the octets of the MAC address.
void setOctets (const byte_t octets[6])
 Set the octets of the MAC address.
byte_t operator[] (int index) const throw (OutOfBoundsException)
 Get the octet at the given index in the MAC address.
byte_toperator[] (int index) throw (OutOfBoundsException)
 Get a reference to the octet at the given index in the MAC address.
String toString () const
 Return a String representation of the MACAddress.
bool operator== (const MACAddress &other) const
 Equality operator.
bool operator!= (const MACAddress &other) const
 Inequality operator.
bool operator! () const
 Test if this is a null address (00:00:00:00:00:00).

Detailed Description

A network hardware (MAC) address.

Author:
Mark Lindner

Constructor & Destructor Documentation

MACAddress (  ) 

Construct a new, null MACAddress (00:00:00:00:00:00).

MACAddress ( const byte_t  octets[6]  ) 

Construct a new MACAddress with the given octets.

~MACAddress (  ) 

Destructor.


Member Function Documentation

void getOctets ( byte_t  octets[6]  )  const

Get the octets of the MAC address.

bool operator! (  )  const

Test if this is a null address (00:00:00:00:00:00).

bool operator!= ( const MACAddress other  )  const [inline]

Inequality operator.

bool operator== ( const MACAddress other  )  const

Equality operator.

byte_t & operator[] ( int  index  )  throw (OutOfBoundsException)

Get a reference to the octet at the given index in the MAC address.

Parameters:
index The index.
Returns:
A reference to the octet at the given index.
Exceptions:
OutOfBoundsException If the index is invalid.
byte_t operator[] ( int  index  )  const throw (OutOfBoundsException)

Get the octet at the given index in the MAC address.

Parameters:
index The index.
Returns:
The octet at the given index.
Exceptions:
OutOfBoundsException If the index is invalid.
void setOctets ( const byte_t  octets[6]  ) 

Set the octets of the MAC address.

String toString (  )  const

Return a String representation of the MACAddress.


The documentation for this class was generated from the following files:
Generated on Sat Nov 26 16:49:09 2011 for libcommonc++ by  doxygen 1.6.3