PcapPlusPlus
22.11
|
#include <EthDot3Layer.h>
Public Member Functions | |
EthDot3Layer (uint8_t *data, size_t dataLen, Packet *packet) | |
EthDot3Layer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
EthDot3Layer (const MacAddress &sourceMac, const MacAddress &destMac, uint16_t length) | |
ether_dot3_header * | getEthHeader () const |
MacAddress | getSourceMac () const |
void | setSourceMac (const MacAddress &sourceMac) |
MacAddress | getDestMac () const |
void | setDestMac (const MacAddress &destMac) |
void | parseNextLayer () |
size_t | getHeaderLen () const |
void | computeCalculateFields () |
std::string | toString () const |
OsiModelLayer | getOsiModelLayer () const |
Public Member Functions inherited from pcpp::Layer | |
virtual | ~Layer () |
Layer * | getNextLayer () const |
Layer * | getPrevLayer () const |
ProtocolType | getProtocol () const |
uint8_t * | getData () const |
size_t | getDataLen () const |
uint8_t * | getLayerPayload () const |
size_t | getLayerPayloadSize () const |
bool | isAllocatedToPacket () const |
void | copyData (uint8_t *toArr) const |
uint8_t * | getDataPtr (size_t offset=0) const |
Static Public Member Functions | |
static bool | isDataValid (const uint8_t *data, size_t dataLen) |
Represents an IEEE 802.3 Ethernet protocol layer
|
inline |
A constructor that creates the layer from an existing packet raw data
[in] | data | A pointer to the raw data (will be casted to ether_dot3_header) |
[in] | dataLen | Size of the data in bytes |
[in] | packet | A pointer to the Packet instance where layer will be stored in |
|
inline |
A constructor that creates the layer from an existing packet raw data
[in] | data | A pointer to the raw data (will be casted to ether_header) |
[in] | dataLen | Size of the data in bytes |
[in] | prevLayer | A pointer to the previous layer |
[in] | packet | A pointer to the Packet instance where layer will be stored in |
pcpp::EthDot3Layer::EthDot3Layer | ( | const MacAddress & | sourceMac, |
const MacAddress & | destMac, | ||
uint16_t | length | ||
) |
A constructor that creates a new IEEE 802.3 Ethernet header and allocates the data
[in] | sourceMac | The source MAC address |
[in] | destMac | The destination MAC address |
[in] | length | The frame length |
|
inlinevirtual |
Does nothing for this layer
Implements pcpp::Layer.
|
inline |
Get the destination MAC address
|
inline |
Get a pointer to the Ethernet header. Notice this points directly to the data, so every change will change the actual packet data
|
inlinevirtual |
Implements pcpp::Layer.
|
inlinevirtual |
Implements pcpp::Layer.
|
inline |
Get the source MAC address
|
static |
A static method that validates the input data
[in] | data | The pointer to the beginning of a byte stream of an IEEE 802.3 Eth packet |
[in] | dataLen | The length of the byte stream |
|
virtual |
Currently doesn't identify any particular layer (because LLC is not supported yet) so the payload will always be of type PayloadLayer.
Implements pcpp::Layer.
|
inline |
Set destination MAC address
destMac | Destination MAC to set |
|
inline |
Set source MAC address
sourceMac | Source MAC to set |
|
virtual |
Implements pcpp::Layer.