libcommonc++
0.7
|
A network hardware (MAC) address. More...
#include <MACAddress.h++>
Public Member Functions | |
MACAddress () | |
Construct a new, null MACAddress (00:00:00:00:00:00). More... | |
MACAddress (const byte_t octets[6]) | |
Construct a new MACAddress with the given octets. More... | |
~MACAddress () | |
Destructor. More... | |
void | getOctets (byte_t octets[6]) const |
Get the octets of the MAC address. More... | |
void | setOctets (const byte_t octets[6]) |
Set the octets of the MAC address. More... | |
byte_t | operator[] (int index) const |
Get the octet at the given index in the MAC address. More... | |
byte_t & | operator[] (int index) |
Get a reference to the octet at the given index in the MAC address. More... | |
String | toString () const |
Return a String representation of the MACAddress. More... | |
bool | operator== (const MACAddress &other) const |
Equality operator. More... | |
bool | operator!= (const MACAddress &other) const |
Inequality operator. More... | |
bool | operator! () const |
Test if this is a null address (00:00:00:00:00:00). More... | |
A network hardware (MAC) address.
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.
bool operator! | ( | ) | const |
Test if this is a null address (00:00:00:00:00:00).
|
inline |
Inequality operator.
bool operator== | ( | const MACAddress & | other | ) | const |
Equality operator.
byte_t operator[] | ( | int | index | ) | const |
Get the octet at the given index in the MAC address.
index | The index. |
OutOfBoundsException | If the index is invalid. |
byte_t & operator[] | ( | int | index | ) |
Get a reference to the octet at the given index in the MAC address.
index | The index. |
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.