PcapPlusPlus
20.08
|
#include <GreLayer.h>
Public Member Functions | |
bool | getSequenceNumber (uint32_t &seqNumber) const |
bool | setSequenceNumber (uint32_t seqNumber) |
bool | unsetSequenceNumber () |
void | parseNextLayer () |
size_t | getHeaderLen () 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 |
virtual void | computeCalculateFields ()=0 |
virtual std::string | toString () const =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 | ) | const |
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