PcapPlusPlus
|
#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 () |
uint32_t | getVNI () |
void | setVNI (uint32_t vni) |
void | parseNextLayer () |
size_t | getHeaderLen () |
void | computeCalculateFields () |
std::string | toString () |
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) |
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 | ( | ) |
|
inline |
Get a pointer to the VXLAN header. Notice this points directly to the data, so every change will change the actual packet data
|
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.