25 static_assert(
sizeof(
cotphdr) == 3,
"cotphdr size is not 3 bytes");
38 :
Layer(data, dataLen, prevLayer, packet,
COTP)
85 static bool isDataValid(
const uint8_t* data,
size_t dataSize);
97 return reinterpret_cast<cotphdr*
>(m_Data);
Definition: CotpLayer.h:30
uint8_t getTpduNumber() const
CotpLayer(uint8_t tpduNumber)
size_t getHeaderLen() const override
Definition: CotpLayer.h:57
uint8_t getPduType() const
OsiModelLayer getOsiModelLayer() const override
Definition: CotpLayer.h:89
uint8_t getLength() const
void setPduType(uint8_t pduType) const
CotpLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: CotpLayer.h:37
std::string toString() const override
void setLength(uint8_t length) const
void setTpduNumber(uint8_t tpduNumber) const
void parseNextLayer() override
Currently parses the rest of the packet as a S7COMM or generic payload (PayloadLayer)
static bool isDataValid(const uint8_t *data, size_t dataSize)
void computeCalculateFields() override
Does nothing for this layer.
Definition: CotpLayer.h:75
The main namespace for the PcapPlusPlus lib.
const ProtocolType COTP
COTP protocol.
Definition: ProtocolType.h:200
OsiModelLayer
An enum representing OSI model layers.
Definition: ProtocolType.h:225
@ OsiModelTransportLayer
Transport layer (layer 4)
Definition: ProtocolType.h:233
Definition: CotpLayer.h:16
uint8_t tpduNumber
TPDU number sequence.
Definition: CotpLayer.h:22
uint8_t length
length
Definition: CotpLayer.h:18
uint8_t pduType
PDU type identifier.
Definition: CotpLayer.h:20