46 :
Layer(data, dataLen, prevLayer, packet,
TPKT)
113 return portSrc == 102 || portDst == 102;
124 return data && dataSize >=
sizeof(
tpkthdr);
Definition: TpktLayer.h:36
void setVersion(uint8_t version) const
size_t getHeaderLen() const override
Definition: TpktLayer.h:89
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:111
uint8_t getReserved() const
void computeCalculateFields() override
Definition: TpktLayer.h:97
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:122
void parseNextLayer() override
void setLength(uint16_t length) const
OsiModelLayer getOsiModelLayer() const override
Definition: TpktLayer.h:129
The main namespace for the PcapPlusPlus lib.
const ProtocolType TPKT
Definition: ProtocolType.h:308
OsiModelLayer
Definition: ProtocolType.h:354
@ OsiModelTransportLayer
Definition: ProtocolType.h:362
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