75 S7CommParameter(uint8_t* data,
size_t dataLen) : m_Data(data), m_DataLen(dataLen)
96 S7CommLayer(uint8_t msgType, uint16_t pduRef, uint16_t paramLength, uint16_t dataLength, uint8_t errorClass = 0,
97 uint8_t errorCode = 0);
109 m_Parameter =
nullptr;
222 s7comm_ack_data_hdr* getS7commAckDataHeader()
const
224 if (getS7commHeader()->msgType == 0x03)
226 return (s7comm_ack_data_hdr*)m_Data;
231 size_t getS7commHeaderLength()
const;
233 S7CommParameter* m_Parameter;
Definition: S7CommLayer.h:85
void setErrorCode(uint8_t errorCode) const
uint16_t getPduRef() const
void computeCalculateFields() override
Definition: S7CommLayer.h:192
const S7CommParameter * getParameter()
uint8_t getProtocolId() const
void setErrorClass(uint8_t errorClass) const
static bool isDataValid(const uint8_t *data, size_t dataSize)
OsiModelLayer getOsiModelLayer() const override
Definition: S7CommLayer.h:211
void setPduRef(uint16_t pduRef) const
size_t getHeaderLen() const override
Definition: S7CommLayer.h:184
uint8_t getErrorClass() const
uint16_t getDataLength() const
S7CommLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: S7CommLayer.h:106
uint8_t getMsgType() const
uint8_t getErrorCode() const
void setMsgType(uint8_t msgType) const
S7CommLayer(uint8_t msgType, uint16_t pduRef, uint16_t paramLength, uint16_t dataLength, uint8_t errorClass=0, uint8_t errorCode=0)
std::string toString() const override
uint16_t getParamLength() const
void parseNextLayer() override
Definition: S7CommLayer.h:198
Definition: S7CommLayer.h:49
size_t getDataLength() const
Definition: S7CommLayer.h:69
uint8_t * getData() const
Definition: S7CommLayer.h:62
The main namespace for the PcapPlusPlus lib.
const ProtocolType S7COMM
Definition: ProtocolType.h:338
OsiModelLayer
Definition: ProtocolType.h:354
@ OsiModelApplicationLayer
Definition: ProtocolType.h:368
Definition: S7CommLayer.h:36
uint8_t errorClass
Definition: S7CommLayer.h:38
uint8_t errorCode
Definition: S7CommLayer.h:40
Definition: S7CommLayer.h:14
uint16_t dataLength
Definition: S7CommLayer.h:26
uint16_t paramLength
Definition: S7CommLayer.h:24
uint8_t protocolId
Definition: S7CommLayer.h:16
uint8_t msgType
Definition: S7CommLayer.h:18
uint16_t reserved
Definition: S7CommLayer.h:20
uint16_t pduRef
Definition: S7CommLayer.h:22