PcapPlusPlus
19.12
|
#include <SllLayer.h>
Public Member Functions | |
SllLayer (uint8_t *data, size_t dataLen, Packet *packet) | |
SllLayer (uint16_t packetType, uint16_t ARPHRDType) | |
sll_header * | getSllHeader () const |
bool | setLinkLayerAddr (uint8_t *addr, size_t addrLength) |
bool | setMacAddressAsLinkLayer (MacAddress macAddr) |
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 |
Represents an SLL (Linux cooked capture) 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_header) |
[in] | dataLen | Size of the data in bytes |
[in] | packet | A pointer to the Packet instance where layer will be stored in |
pcpp::SllLayer::SllLayer | ( | uint16_t | packetType, |
uint16_t | ARPHRDType | ||
) |
A constructor that creates a new SLL header and allocates the data
[in] | packetType | The packet type |
[in] | ARPHRDType | The ARPHRD type |
|
virtual |
Calculate the next protocol type for known protocols: IPv4, IPv6, ARP, VLAN
Implements pcpp::Layer.
|
inlinevirtual |
Implements pcpp::Layer.
|
inlinevirtual |
Implements pcpp::Layer.
|
inline |
Get a pointer to the Sll header. Notice this points directly to the data, so every change will change the actual packet data
|
virtual |
Currently identifies the following next layers: IPv4Layer, IPv6Layer, ArpLayer, VlanLayer, PPPoESessionLayer, PPPoEDiscoveryLayer, MplsLayer. Otherwise sets PayloadLayer
Implements pcpp::Layer.
bool pcpp::SllLayer::setLinkLayerAddr | ( | uint8_t * | addr, |
size_t | addrLength | ||
) |
A setter for the link layer address field
[in] | addr | The address to set. Memory will be copied to packet |
[in] | addrLength | Address length, must be lower or equal to 8 (which is max length for SLL address) |
bool pcpp::SllLayer::setMacAddressAsLinkLayer | ( | MacAddress | macAddr | ) |
Set a MAC address in the link layer address field
[in] | macAddr | MAC address to set |
|
virtual |
Implements pcpp::Layer.