|
PcapPlusPlus
19.12
|
#include <PayloadLayer.h>
Public Member Functions | |
| PayloadLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
| PayloadLayer (const uint8_t *data, size_t dataLen, bool dummy) | |
| uint8_t * | getPayload () const |
| size_t | getPayloadLen () const |
| 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 a generic or unknown layer or a packet payload
|
inline |
A constructor that creates the layer from an existing packet raw data
| [in] | data | A pointer to the raw data |
| [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::PayloadLayer::PayloadLayer | ( | const uint8_t * | data, |
| size_t | dataLen, | ||
| bool | dummy | ||
| ) |
A constructor that allocates a new payload
| [in] | data | A raw buffer that will be used as a payload. This data will be copied to the layer |
| [in] | dataLen | The raw buffer length |
| [in] | dummy | A dummy parameter to separate the constructor signature from the other constructor. Its value isn't used anywhere |
|
inlinevirtual |
Does nothing for this layer
Implements pcpp::Layer.
|
inlinevirtual |
Implements pcpp::Layer.
|
inlinevirtual |
Implements pcpp::Layer.
|
inline |
Get a pointer to the payload data
|
inline |
Get the payload data length
|
inlinevirtual |
Does nothing for this layer (PayloadLayer is always last)
Implements pcpp::Layer.
|
virtual |
Implements pcpp::Layer.