PcapPlusPlus
|
#include <GreLayer.h>
Public Member Functions | |
bool | getSequenceNumber (uint32_t &seqNumber) |
bool | setSequenceNumber (uint32_t seqNumber) |
bool | unsetSequenceNumber () |
void | parseNextLayer () |
size_t | getHeaderLen () |
OsiModelLayer | getOsiModelLayer () |
Public Member Functions inherited from pcpp::Layer | |
virtual | ~Layer () |
Layer * | getNextLayer () |
Layer * | getPrevLayer () |
ProtocolType | getProtocol () |
uint8_t * | getData () |
size_t | getDataLen () |
uint8_t * | getLayerPayload () |
size_t | getLayerPayloadSize () |
bool | isAllocatedToPacket () |
void | copyData (uint8_t *toArr) |
uint8_t * | getDataPtr (size_t offset=0) |
virtual void | computeCalculateFields ()=0 |
virtual std::string | toString ()=0 |
Static Public Member Functions | |
static ProtocolType | getGREVersion (uint8_t *greData, size_t greDataLen) |
Abstract base class for GRE layers (GREv0Layer and GREv1Layer). Cannot be instantiated and contains common logic for derived classes
|
static |
A static method that determines the GRE version of GRE layer raw data by looking at the gre_basic_header::version field
[in] | greData | GRE layer raw data |
[in] | greDataLen | Size of raw data |
|
virtual |
Implements pcpp::Layer.
|
inlinevirtual |
Implements pcpp::Layer.
bool pcpp::GreLayer::getSequenceNumber | ( | uint32_t & | seqNumber | ) |
Get sequence number value if field exists in layer
[out] | seqNumber | The returned sequence number value if exists in layer. Else remain unchanged |
|
virtual |
Currently identifies the following next layers: IPv4Layer, IPv6Layer, VlanLayer, MplsLayer and PPP_PPTPLayer. Otherwise sets PayloadLayer
Implements pcpp::Layer.
bool pcpp::GreLayer::setSequenceNumber | ( | uint32_t | seqNumber | ) |
Set sequence number value. If field already exists (gre_basic_header::sequenceNumBit is set) then only the new value is set. If field doesn't exist it will be added to the layer, gre_basic_header::sequenceNumBit will be set and the new value will be set
[in] | seqNumber | The sequence number value to set |
bool pcpp::GreLayer::unsetSequenceNumber | ( | ) |
Unset sequence number and remove it from the layer