46 :
Layer(data, dataLen, prevLayer, packet,
TPKT)
112 return portSrc == 102 || portDst == 102;
123 return data && dataSize >=
sizeof(
tpkthdr);
142 return reinterpret_cast<tpkthdr*
>(m_Data);
Definition: TpktLayer.h:36
void setVersion(uint8_t version) const
size_t getHeaderLen() const override
Definition: TpktLayer.h:88
std::string toString() const override
uint8_t getVersion() const
TpktLayer(uint8_t version, uint16_t length)
uint16_t getLength() const
static bool isTpktPort(uint16_t portSrc, uint16_t portDst)
Definition: TpktLayer.h:110
uint8_t getReserved() const
void computeCalculateFields() override
Definition: TpktLayer.h:96
TpktLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: TpktLayer.h:45
static bool isDataValid(const uint8_t *data, size_t dataSize)
Definition: TpktLayer.h:121
void parseNextLayer() override
void setLength(uint16_t length) const
OsiModelLayer getOsiModelLayer() const override
Definition: TpktLayer.h:128
The main namespace for the PcapPlusPlus lib.
const ProtocolType TPKT
Definition: ProtocolType.h:308
OsiModelLayer
Definition: ProtocolType.h:364
@ OsiModelTransportLayer
Definition: ProtocolType.h:372
Definition: TpktLayer.h:21
uint8_t version
Definition: TpktLayer.h:23
uint8_t reserved
Definition: TpktLayer.h:25
uint16_t length
Definition: TpktLayer.h:27