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) noexcept |
| | Constructs a MacAddress.
|
| unsigned char | getFirst () const noexcept |
| | Gets the first byte of the address.
|
| unsigned char | getSecond () const noexcept |
| | Gets the second byte of the address.
|
| unsigned char | getThird () const noexcept |
| | Gets the third byte of the address.
|
| unsigned char | getFourth () const noexcept |
| | Gets the fourth byte of the address.
|
| unsigned char | getFifth () const noexcept |
| | Gets the fifth byte of the address.
|
| unsigned char | getSixth () const noexcept |
| | Gets the sixth byte of the address.
|
| std::string | str () const noexcept |
| | 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 ) |
|
noexcept |
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 |
|
noexcept |
Gets the fifth byte of the address.
- Returns
- The fifth byte of the address
◆ getFirst()
| unsigned char Nickvision::Network::MacAddress::getFirst |
( |
| ) |
const |
|
noexcept |
Gets the first byte of the address.
- Returns
- The first byte of the address
◆ getFourth()
| unsigned char Nickvision::Network::MacAddress::getFourth |
( |
| ) |
const |
|
noexcept |
Gets the fourth byte of the address.
- Returns
- The fourth byte of the address
◆ getSecond()
| unsigned char Nickvision::Network::MacAddress::getSecond |
( |
| ) |
const |
|
noexcept |
Gets the second byte of the address.
- Returns
- The second byte of the address
◆ getSixth()
| unsigned char Nickvision::Network::MacAddress::getSixth |
( |
| ) |
const |
|
noexcept |
Gets the sixth byte of the address.
- Returns
- The sixth byte of the address
◆ getThird()
| unsigned char Nickvision::Network::MacAddress::getThird |
( |
| ) |
const |
|
noexcept |
Gets the third byte of the address.
- Returns
- The third byte of the address
◆ parse()
| std::optional< MacAddress > Nickvision::Network::MacAddress::parse |
( |
const std::string & | address | ) |
|
|
staticnoexcept |
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 |
|
noexcept |
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: