PcapPlusPlus  22.11
pcpp::MultipleStpLayer Class Reference

#include <StpLayer.h>

Inheritance diagram for pcpp::MultipleStpLayer:
pcpp::RapidStpLayer pcpp::StpConfigurationBPDULayer pcpp::StpTopologyChangeBPDULayer pcpp::StpLayer pcpp::Layer pcpp::IDataContainer

Public Member Functions

 MultipleStpLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
 
mstp_conf_bpdugetMstpHeader () const
 
uint16_t getVersion3Len () const
 
uint8_t getMstConfigurationFormatSelector () const
 
std::string getMstConfigurationName () const
 
uint16_t getMstConfigRevision () const
 
uint8_t * getMstConfigDigest () const
 
uint32_t getCISTIrpc () const
 
uint64_t getCISTBridgeId () const
 
uint16_t getCISTBridgePriority () const
 
uint16_t getCISTBridgeSystemIDExtension () const
 
pcpp::MacAddress getCISTBridgeSystemID () const
 
uint8_t getRemainingHopCount () const
 
uint8_t getNumberOfMSTIConfMessages () const
 
msti_conf_msggetMstiConfMessages () const
 
std::string toString () const
 
- Public Member Functions inherited from pcpp::RapidStpLayer
 RapidStpLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
 
rstp_conf_bpdugetRstpConfHeader () const
 
uint8_t getVersion1Len () const
 
- Public Member Functions inherited from pcpp::StpConfigurationBPDULayer
 StpConfigurationBPDULayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
 
stp_conf_bpdugetStpConfHeader () const
 
uint8_t getFlag () const
 
uint64_t getRootId () const
 
uint16_t getRootPriority () const
 
uint16_t getRootSystemIDExtension () const
 
pcpp::MacAddress getRootSystemID () const
 
uint32_t getPathCost () const
 
uint64_t getBridgeId () const
 
uint16_t getBridgePriority () const
 
uint16_t getBridgeSystemIDExtension () const
 
pcpp::MacAddress getBridgeSystemID () const
 
uint16_t getPortId () const
 
double getMessageAge () const
 
double getMaximumAge () const
 
double getTransmissionInterval () const
 
double getForwardDelay () const
 
- Public Member Functions inherited from pcpp::StpTopologyChangeBPDULayer
 StpTopologyChangeBPDULayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
 
stp_tcn_bpdugetStpTcnHeader ()
 
- Public Member Functions inherited from pcpp::StpLayer
stp_headergetStpHeader () const
 
uint16_t getProtoId () const
 
uint8_t getVersion () const
 
uint8_t getType () const
 
size_t getHeaderLen () const
 
void parseNextLayer ()
 Parses the next layer. STP is the always last so does nothing for this layer.
 
void computeCalculateFields ()
 Does nothing for this layer.
 
OsiModelLayer getOsiModelLayer () const
 
- Public Member Functions inherited from pcpp::Layer
virtual ~Layer ()
 
LayergetNextLayer () const
 
LayergetPrevLayer () 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 isDataValid (const uint8_t *data, size_t dataLen)
 
- Static Public Member Functions inherited from pcpp::RapidStpLayer
static bool isDataValid (const uint8_t *data, size_t dataLen)
 
- Static Public Member Functions inherited from pcpp::StpConfigurationBPDULayer
static bool isDataValid (const uint8_t *data, size_t dataLen)
 
- Static Public Member Functions inherited from pcpp::StpTopologyChangeBPDULayer
static bool isDataValid (const uint8_t *data, size_t dataLen)
 
- Static Public Member Functions inherited from pcpp::StpLayer
static bool isDataValid (const uint8_t *data, size_t dataLen)
 
static StpLayerparseStpLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
 

Additional Inherited Members

- Static Public Attributes inherited from pcpp::StpLayer
static pcpp::MacAddress StpMulticastDstMAC
 STP protocol uses "01:80:C2:00:00:00" multicast address as destination MAC.
 
static pcpp::MacAddress StpUplinkFastMulticastDstMAC
 STP Uplink Fast protocol uses "01:00:0C:CD:CD:CD" as destination MAC.
 

Detailed Description

Represents Multiple Spanning Tree Protocol (MSTP)

Constructor & Destructor Documentation

◆ MultipleStpLayer()

pcpp::MultipleStpLayer::MultipleStpLayer ( uint8_t *  data,
size_t  dataLen,
Layer prevLayer,
Packet packet 
)
inline

A constructor that creates the layer from an existing packet raw data

Parameters
[in]dataA pointer to the raw data
[in]dataLenSize of the data in bytes
[in]prevLayerA pointer to the previous layer
[in]packetA pointer to the Packet instance where layer will be stored in

Member Function Documentation

◆ getCISTBridgeId()

uint64_t pcpp::MultipleStpLayer::getCISTBridgeId ( ) const

Returns CIST bridge identifier

Returns
Value of the bridge identifier

◆ getCISTBridgePriority()

uint16_t pcpp::MultipleStpLayer::getCISTBridgePriority ( ) const

Returns the priority of CIST bridge

Returns
Priority of CIST bridge

◆ getCISTBridgeSystemID()

pcpp::MacAddress pcpp::MultipleStpLayer::getCISTBridgeSystemID ( ) const
inline

Returns the system identifier of CIST bridge

Returns
System identifier of CIST bridge

◆ getCISTBridgeSystemIDExtension()

uint16_t pcpp::MultipleStpLayer::getCISTBridgeSystemIDExtension ( ) const

Returns the system identifier extension of CIST bridge

Returns
System extension of CIST bridge

◆ getCISTIrpc()

uint32_t pcpp::MultipleStpLayer::getCISTIrpc ( ) const

Returns CIST internal root path cost

Returns
Value of the internal root path cost

◆ getMstConfigDigest()

uint8_t* pcpp::MultipleStpLayer::getMstConfigDigest ( ) const
inline

Returns the pointer to configuration message digest. The field itself always 16 bytes long.

Returns
A pointer to configuration digest

◆ getMstConfigRevision()

uint16_t pcpp::MultipleStpLayer::getMstConfigRevision ( ) const
inline

Returns the revision of configuration ID

Returns
Revision of configuration ID

◆ getMstConfigurationFormatSelector()

uint8_t pcpp::MultipleStpLayer::getMstConfigurationFormatSelector ( ) const
inline

Returns the configuration ID format selector

Returns
Configuration ID of format selector

◆ getMstConfigurationName()

std::string pcpp::MultipleStpLayer::getMstConfigurationName ( ) const

Returns the pointer to configuration name field.

Returns
Configuration name

◆ getMstiConfMessages()

msti_conf_msg* pcpp::MultipleStpLayer::getMstiConfMessages ( ) const

Returns a reference to MSTI configuration messages. An MSTP packet can contain between 0 to 64 MSTI messages. The number of messages can be obtained by using getNumberOfMSTIConfMessages()

Returns
An array pointer to MSTI configuration messages. Returns NULL if there is no MSTI message.

◆ getMstpHeader()

mstp_conf_bpdu* pcpp::MultipleStpLayer::getMstpHeader ( ) const
inline

Get a pointer to Multiple STP header

Returns
A pointer to Multiple STP header

◆ getNumberOfMSTIConfMessages()

uint8_t pcpp::MultipleStpLayer::getNumberOfMSTIConfMessages ( ) const
inline

Returns the total number of MSTI configuration messages

Returns
Number of MSTI configuration messages. Can be between 0 and 64.

◆ getRemainingHopCount()

uint8_t pcpp::MultipleStpLayer::getRemainingHopCount ( ) const
inline

Returns the remaining hop count

Returns
Value of remaining hop count

◆ getVersion3Len()

uint16_t pcpp::MultipleStpLayer::getVersion3Len ( ) const
Returns
Returns the length of version3 field.

◆ isDataValid()

static bool pcpp::MultipleStpLayer::isDataValid ( const uint8_t *  data,
size_t  dataLen 
)
inlinestatic

A static method that validates the input data

Parameters
[in]dataThe pointer to the beginning of a byte stream of an Multiple STP packet
[in]dataLenThe length of the byte stream
Returns
True if the data is valid and can represent an Spanning Tree packet

◆ toString()

std::string pcpp::MultipleStpLayer::toString ( ) const
inlinevirtual
Returns
Returns the protocol info as readable string

Reimplemented from pcpp::RapidStpLayer.