|
PcapPlusPlus
Next
|
#include <StpLayer.h>
Public Member Functions | |
| 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) |
| size_t | getHeaderLen () const override |
| void | computeCalculateFields () override |
| Does nothing for this layer. | |
| 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 |
| virtual void | parseNextLayer ()=0 |
| Each layer is responsible for parsing the next layer. | |
| virtual std::string | toString () const =0 |
Static Public Member Functions | |
| static bool | isDataValid (const uint8_t *data, size_t dataLen) |
| static StpLayer * | parseStpLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) |
Static Public Attributes | |
| 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. | |
Additional Inherited Members | |
Protected Member Functions inherited from pcpp::Layer | |
| template<typename T , typename... Args> | |
| Layer * | constructNextLayer (uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs) |
| template<typename T , typename TFallback , typename... Args> | |
| Layer * | tryConstructNextLayerWithFallback (uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs) |
Static Protected Member Functions inherited from pcpp::Layer | |
| template<typename T > | |
| static bool | canReinterpretAs (const uint8_t *data, size_t dataLen) |
| Check if the data is large enough to reinterpret as a type. More... | |
Represents an Spanning Tree Protocol Layer
|
inlineoverridevirtual |
Implements pcpp::Layer.
Reimplemented in pcpp::RapidStpLayer, pcpp::StpConfigurationBPDULayer, and pcpp::StpTopologyChangeBPDULayer.
|
inlineoverridevirtual |
Implements pcpp::Layer.
|
inline |
Returns the protocol id. Fixed at 0x0 for STP messages which represents IEEE 802.1d
|
inline |
Get a pointer to base Spanning tree header
|
inline |
Returns the type of configuration message.
|
inline |
Returns the version. Fixed at 0x0 for STP messages
|
static |
A static method that validates the input data
| [in] | data | The pointer to the beginning of a byte stream of an Spanning Tree packet |
| [in] | dataLen | The length of the byte stream |
|
static |
A method to create STP layer from existing packet
| [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 |
|
inline |
Sets the protocol id
| [in] | value | ID of the protocol |
|
inline |
Sets the type of configuration message
| [in] | value | Type of configuration message |
|
inline |
Sets the version
| [in] | value | Version number |