A model of a MAC address.
More...
#include <macaddress.h>
|
| MacAddress (unsigned char oui1, unsigned char oui2, unsigned char oui3, unsigned char nic1, unsigned char nic2, unsigned char nic3) |
| Constructs a MacAddress.
|
|
unsigned char | getFirst () const |
| Gets the first byte of the address.
|
|
unsigned char | getSecond () const |
| Gets the second byte of the address.
|
|
unsigned char | getThird () const |
| Gets the third byte of the address.
|
|
unsigned char | getFourth () const |
| Gets the fourth byte of the address.
|
|
unsigned char | getFifth () const |
| Gets the fifth byte of the address.
|
|
unsigned char | getSixth () const |
| Gets the sixth byte of the address.
|
|
std::string | str () const |
| Gets the string representation of the address.
|
|
A model of a MAC address.
◆ MacAddress()
Nickvision::Network::MacAddress::MacAddress |
( |
unsigned char | oui1, |
|
|
unsigned char | oui2, |
|
|
unsigned char | oui3, |
|
|
unsigned char | nic1, |
|
|
unsigned char | nic2, |
|
|
unsigned char | nic3 ) |
Constructs a MacAddress.
- Parameters
-
oui1 | The first byte of the OUI |
oui2 | The second byte of the OUI |
oui3 | The third byte of the OUI |
nic1 | The first byte of the NIC |
nic2 | The second byte of the NIC |
nic3 | The third byte of the NIC |
◆ getFifth()
unsigned char Nickvision::Network::MacAddress::getFifth |
( |
| ) |
const |
Gets the fifth byte of the address.
- Returns
- The fifth byte of the address
◆ getFirst()
unsigned char Nickvision::Network::MacAddress::getFirst |
( |
| ) |
const |
Gets the first byte of the address.
- Returns
- The first byte of the address
◆ getFourth()
unsigned char Nickvision::Network::MacAddress::getFourth |
( |
| ) |
const |
Gets the fourth byte of the address.
- Returns
- The fourth byte of the address
◆ getSecond()
unsigned char Nickvision::Network::MacAddress::getSecond |
( |
| ) |
const |
Gets the second byte of the address.
- Returns
- The second byte of the address
◆ getSixth()
unsigned char Nickvision::Network::MacAddress::getSixth |
( |
| ) |
const |
Gets the sixth byte of the address.
- Returns
- The sixth byte of the address
◆ getThird()
unsigned char Nickvision::Network::MacAddress::getThird |
( |
| ) |
const |
Gets the third byte of the address.
- Returns
- The third byte of the address
◆ parse()
static std::optional< MacAddress > Nickvision::Network::MacAddress::parse |
( |
const std::string & | address | ) |
|
|
static |
Parses a MacAddress from a string.
- Parameters
-
address | The string address to parse |
- Returns
- The parsed address if successful, else std::nullopt
◆ str()
std::string Nickvision::Network::MacAddress::str |
( |
| ) |
const |
Gets the string representation of the address.
- Returns
- The string representation of the address
The documentation for this class was generated from the following file: