PcapPlusPlus
24.09
|
#include <StpLayer.h>
Public Member Functions | |
MultipleStpLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
MultipleStpLayer () | |
mstp_conf_bpdu * | getMstpHeader () const |
uint16_t | getVersion3Len () const |
void | setVersion3Len (uint16_t value) |
uint8_t | getMstConfigurationFormatSelector () const |
void | setMstConfigurationFormatSelector (uint8_t value) |
std::string | getMstConfigurationName () const |
void | setMstConfigurationName (const std::string &value) |
uint16_t | getMstConfigRevision () const |
void | setMstConfigRevision (uint16_t value) |
uint8_t * | getMstConfigDigest () const |
void | setMstConfigDigest (const uint8_t *value, uint8_t len) |
uint32_t | getCISTIrpc () const |
void | setCISTIrpc (uint32_t value) |
uint64_t | getCISTBridgeId () const |
void | setCISTBridgeId (uint64_t value) |
uint16_t | getCISTBridgePriority () const |
void | setCISTBridgePriority (uint16_t value) |
uint16_t | getCISTBridgeSystemIDExtension () const |
void | setCISTBridgeSystemIDExtension (uint16_t value) |
pcpp::MacAddress | getCISTBridgeSystemID () const |
void | setCISTBridgeSystemID (const pcpp::MacAddress &value) |
uint8_t | getRemainingHopCount () const |
void | setRemainingHopCount (uint8_t value) |
uint8_t | getNumberOfMSTIConfMessages () const |
msti_conf_msg * | getMstiConfMessages () const |
void | parseNextLayer () |
Parses next layer. | |
std::string | toString () const |
Public Member Functions inherited from pcpp::RapidStpLayer | |
RapidStpLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
RapidStpLayer () | |
rstp_conf_bpdu * | getRstpConfHeader () const |
uint8_t | getVersion1Len () const |
void | setVersion1Len (uint8_t value) |
size_t | getHeaderLen () const |
Public Member Functions inherited from pcpp::StpConfigurationBPDULayer | |
StpConfigurationBPDULayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
StpConfigurationBPDULayer () | |
stp_conf_bpdu * | getStpConfHeader () const |
uint8_t | getFlag () const |
void | setFlag (uint8_t value) |
uint64_t | getRootId () const |
void | setRootId (uint64_t value) |
uint16_t | getRootPriority () const |
void | setRootPriority (uint16_t value) |
uint16_t | getRootSystemIDExtension () const |
void | setRootSystemIDExtension (uint16_t value) |
pcpp::MacAddress | getRootSystemID () const |
void | setRootSystemID (const pcpp::MacAddress &value) |
uint32_t | getPathCost () const |
void | setPathCost (uint32_t value) |
uint64_t | getBridgeId () const |
void | setBridgeId (uint64_t value) |
uint16_t | getBridgePriority () const |
void | setBridgePriority (uint16_t value) |
uint16_t | getBridgeSystemIDExtension () const |
void | setBridgeSystemIDExtension (uint16_t value) |
pcpp::MacAddress | getBridgeSystemID () const |
void | setBridgeSystemID (const pcpp::MacAddress &value) |
uint16_t | getPortId () const |
void | setPortId (uint16_t value) |
double | getMessageAge () const |
void | setMessageAge (double value) |
double | getMaximumAge () const |
void | setMaximumAge (double value) |
double | getTransmissionInterval () const |
void | setTransmissionInterval (double value) |
double | getForwardDelay () const |
void | setForwardDelay (double value) |
Public Member Functions inherited from pcpp::StpTopologyChangeBPDULayer | |
StpTopologyChangeBPDULayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
StpTopologyChangeBPDULayer () | |
stp_tcn_bpdu * | getStpTcnHeader () |
Public Member Functions inherited from pcpp::StpLayer | |
stp_header * | getStpHeader () const |
uint16_t | getProtoId () const |
void | setProtoId (uint16_t value) |
uint8_t | getVersion () const |
void | setVersion (uint8_t value) |
uint8_t | getType () const |
void | setType (uint8_t value) |
void | computeCalculateFields () |
Does nothing for this layer. | |
OsiModelLayer | getOsiModelLayer () const |
Public Member Functions inherited from pcpp::Layer | |
virtual | ~Layer () |
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 |
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 StpLayer * | parseStpLayer (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. | |
Represents Multiple Spanning Tree Protocol (MSTP). It has limited capabilities (no crafting / limited editing) over MSTI configuration
|
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::MultipleStpLayer::MultipleStpLayer | ( | ) |
Empty c'tor to create a new Multiple STP layer. Initializes the protocol identifier, version and STP type fields with correct values
uint64_t pcpp::MultipleStpLayer::getCISTBridgeId | ( | ) | const |
Returns CIST bridge identifier
uint16_t pcpp::MultipleStpLayer::getCISTBridgePriority | ( | ) | const |
Returns the priority of CIST bridge
|
inline |
Returns the system identifier of CIST bridge
uint16_t pcpp::MultipleStpLayer::getCISTBridgeSystemIDExtension | ( | ) | const |
Returns the system identifier extension of CIST bridge
uint32_t pcpp::MultipleStpLayer::getCISTIrpc | ( | ) | const |
Returns CIST internal root path cost
|
inline |
Returns the pointer to configuration message digest. The field itself always 16 bytes long.
uint16_t pcpp::MultipleStpLayer::getMstConfigRevision | ( | ) | const |
Returns the revision of configuration ID
|
inline |
Returns the configuration ID format selector
std::string pcpp::MultipleStpLayer::getMstConfigurationName | ( | ) | const |
Returns the pointer to configuration name field
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()
|
inline |
Get a pointer to Multiple STP header
|
inline |
Returns the total number of MSTI configuration messages
|
inline |
Returns the remaining hop count
uint16_t pcpp::MultipleStpLayer::getVersion3Len | ( | ) | const |
|
inlinestatic |
A static method that validates the input data
[in] | data | The pointer to the beginning of a byte stream of an Multiple STP packet |
[in] | dataLen | The length of the byte stream |
void pcpp::MultipleStpLayer::setCISTBridgeId | ( | uint64_t | value | ) |
Sets CIST bridge identifier
[in] | value | Value of the bridge identifier |
void pcpp::MultipleStpLayer::setCISTBridgePriority | ( | uint16_t | value | ) |
Sets the priority of CIST bridge
[in] | value | Priority of CIST bridge |
void pcpp::MultipleStpLayer::setCISTBridgeSystemID | ( | const pcpp::MacAddress & | value | ) |
Sets the system identifier of CIST bridge
[in] | value | System identifier of CIST bridge |
void pcpp::MultipleStpLayer::setCISTBridgeSystemIDExtension | ( | uint16_t | value | ) |
Sets the system identifier extension of CIST bridge
[in] | value | System extension of CIST bridge |
void pcpp::MultipleStpLayer::setCISTIrpc | ( | uint32_t | value | ) |
Sets CIST internal root path cost
[in] | value | Value of the internal root path cost |
void pcpp::MultipleStpLayer::setMstConfigDigest | ( | const uint8_t * | value, |
uint8_t | len | ||
) |
Sets the pointer to configuration message digest. The field itself always 16 bytes long.
[in] | value | Pointer to digest |
[in] | len | Length of the digest, should be less than 16. If longer first 16 bytes are used |
void pcpp::MultipleStpLayer::setMstConfigRevision | ( | uint16_t | value | ) |
Sets the revision of configuration ID
[in] | value | Revision of configuration ID |
|
inline |
Sets the configuration ID format selector
[in] | value | Configuration ID of format selector |
void pcpp::MultipleStpLayer::setMstConfigurationName | ( | const std::string & | value | ) |
Sets the configuration name field
[in] | value | Configuration name. Length should be less than 32, if longer value provided first 32 characters are used |
|
inline |
Returns the remaining hop count
[in] | value | Value of remaining hop count |
void pcpp::MultipleStpLayer::setVersion3Len | ( | uint16_t | value | ) |
Sets the length of version3 field
[in] | value | Length of version3 field |
|
inlinevirtual |
Reimplemented from pcpp::RapidStpLayer.