Representation of the etherner header.
More...
#include <headers.hpp>
|
static std::string | addrToStr (std::array< uint8_t, 6 > addr) |
|
Representation of the etherner header.
Definition at line 15 of file headers.hpp.
◆ addrToStr()
static std::string Headers::Ethernet::addrToStr |
( |
std::array< uint8_t, 6 > |
addr | ) |
|
|
inlinestatic |
◆ getDstAddr()
std::string Headers::Ethernet::getDstAddr |
( |
| ) |
|
|
inline |
◆ getEthertype()
uint16_t Headers::Ethernet::getEthertype |
( |
| ) |
|
|
inline |
Get the ethertype.
- Returns
- Ethertype in host byte order
Definition at line 44 of file headers.hpp.
◆ getPayload()
void* Headers::Ethernet::getPayload |
( |
| ) |
|
|
inline |
Get the SDU.
- Returns
- Pointer to the payload
Definition at line 23 of file headers.hpp.
◆ getSrcAddr()
std::string Headers::Ethernet::getSrcAddr |
( |
| ) |
|
|
inline |
◆ setDstAddr()
void Headers::Ethernet::setDstAddr |
( |
std::array< uint8_t, 6 > |
addr | ) |
|
|
inline |
◆ setEthertype()
void Headers::Ethernet::setEthertype |
( |
uint16_t |
type | ) |
|
|
inline |
Set the ethertype.
- Parameters
-
type | Ethertype in host byte order |
Definition at line 52 of file headers.hpp.
◆ setSrcAddr()
void Headers::Ethernet::setSrcAddr |
( |
const std::array< uint8_t, 6 > |
addr | ) |
|
|
inline |
◆ destMac
std::array<uint8_t, 6> Headers::Ethernet::destMac |
◆ ethertype
uint16_t Headers::Ethernet::ethertype |
◆ ETHERTYPE_IPv4
constexpr uint16_t Headers::Ethernet::ETHERTYPE_IPv4 = 0x0800 |
|
static |
◆ ETHERTYPE_IPv6
constexpr uint16_t Headers::Ethernet::ETHERTYPE_IPv6 = 0x86dd |
|
static |
◆ srcMac
std::array<uint8_t, 6> Headers::Ethernet::srcMac |
The documentation for this struct was generated from the following file: