PcapPlusPlus
Next
|
#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 () override |
size_t | getHeaderLen () const override |
void | computeCalculateFields () override |
std::string | toString () const override |
OsiModelLayer | getOsiModelLayer () const override |
Public Member Functions inherited from pcpp::Layer | |
~Layer () override | |
Layer * | getNextLayer () const |
Layer * | getPrevLayer () const |
ProtocolType | getProtocol () const |
bool | isMemberOfProtocolFamily (ProtocolTypeFamily protocolTypeFamily) 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 override |
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 |
|
explicit |
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) |
|
inlineoverridevirtual |
Does nothing for this layer
Implements pcpp::Layer.
|
inlineoverridevirtual |
Implements pcpp::Layer.
|
inlineoverridevirtual |
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 |
|
overridevirtual |
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 |
|
overridevirtual |
Implements pcpp::Layer.