|
PcapPlusPlus
24.09
|
#include <CotpLayer.h>
Public Member Functions | |
| CotpLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
| CotpLayer (uint8_t tpduNumber) | |
| uint8_t | getLength () const |
| uint8_t | getPduType () const |
| uint8_t | getTpduNumber () const |
| size_t | getHeaderLen () const override |
| void | setLength (uint8_t length) const |
| void | setPduType (uint8_t pduType) const |
| void | setTpduNumber (uint8_t tpduNumber) const |
| void | computeCalculateFields () override |
| void | parseNextLayer () override |
| std::string | toString () const override |
| OsiModelLayer | getOsiModelLayer () const override |
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 dataSize) |
Represents a COTP (Connection Oriented Transport Protocol)
|
explicit |
A constructor that allocates a new COTP header
| [in] | tpduNumber | Protocol TPDU number |
|
inlineoverridevirtual |
Does nothing for this layer
Implements pcpp::Layer.
|
inlineoverridevirtual |
Implements pcpp::Layer.
| uint8_t pcpp::CotpLayer::getLength | ( | ) | const |
|
inlineoverridevirtual |
Implements pcpp::Layer.
| uint8_t pcpp::CotpLayer::getPduType | ( | ) | const |
| uint8_t pcpp::CotpLayer::getTpduNumber | ( | ) | const |
|
static |
A static method that takes a byte array and detects whether it is a COTP
| [in] | data | A byte array |
| [in] | dataSize | The byte array size (in bytes) |
|
overridevirtual |
Currently parses the rest of the packet as a S7COMM or generic payload (PayloadLayer)
Implements pcpp::Layer.
| void pcpp::CotpLayer::setLength | ( | uint8_t | length | ) | const |
Set the value of the length
| [in] | length | The value of the length |
| void pcpp::CotpLayer::setPduType | ( | uint8_t | pduType | ) | const |
Set the value of the version
| [in] | pduType | The number of the PDU type |
| void pcpp::CotpLayer::setTpduNumber | ( | uint8_t | tpduNumber | ) | const |
Set the value of the version
| [in] | tpduNumber | The value of the TPDU number |
|
overridevirtual |
Implements pcpp::Layer.