PcapPlusPlus
22.11
|
#include <VxlanLayer.h>
Public Member Functions | |
VxlanLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
VxlanLayer (uint32_t vni=0, uint16_t groupPolicyID=0, bool setGbpFlag=false, bool setPolicyAppliedFlag=false, bool setDontLearnFlag=false) | |
vxlan_header * | getVxlanHeader () const |
uint32_t | getVNI () const |
void | setVNI (uint32_t vni) |
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 | isVxlanPort (uint16_t port) |
Represents a VXLAN (Virtual eXtensible Local Area Network) protocol layer
|
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::VxlanLayer::VxlanLayer | ( | uint32_t | vni = 0 , |
uint16_t | groupPolicyID = 0 , |
||
bool | setGbpFlag = false , |
||
bool | setPolicyAppliedFlag = false , |
||
bool | setDontLearnFlag = false |
||
) |
A constructor that creates a new VXLAN header and allocates the data. Note: the VNI present flag is set automatically
[in] | vni | VNI (VXLAN Network ID) to set. Optional parameter (default is 0) |
[in] | groupPolicyID | Group Policy ID to set. Optional parameter (default is 0) |
[in] | setGbpFlag | Set GBP flag. Optional parameter (default is false) |
[in] | setPolicyAppliedFlag | Set Policy Applied flag. Optional parameter (default is false) |
[in] | setDontLearnFlag | Set Don't Learn flag. Optional parameter (default is false) |
|
inlinevirtual |
Does nothing for this layer
Implements pcpp::Layer.
|
inlinevirtual |
Implements pcpp::Layer.
|
inlinevirtual |
Implements pcpp::Layer.
uint32_t pcpp::VxlanLayer::getVNI | ( | ) | const |
|
inline |
Get a pointer to the VXLAN header. Notice this points directly to the data, so every change will change the actual packet data
|
inlinestatic |
A static method that checks whether the port is considered as VxLAN
[in] | port | The port number to be checked |
|
virtual |
Next layer for VXLAN is always Ethernet
Implements pcpp::Layer.
void pcpp::VxlanLayer::setVNI | ( | uint32_t | vni | ) |
Set VXLAN Network ID (VNI) value
[in] | vni | VNI value to set |
|
virtual |
Implements pcpp::Layer.