PcapPlusPlus  21.05
PacketTrailerLayer.h
Go to the documentation of this file.
1 #ifndef PACKETPP_PACKET_TRAILER_LAYER
2 #define PACKETPP_PACKET_TRAILER_LAYER
3 
5 
6 #include "Layer.h"
7 
8 namespace pcpp
9 {
30  class PacketTrailerLayer : public Layer
31  {
32  public:
39  PacketTrailerLayer(uint8_t* data, size_t dataLen, Layer* prevLayer, Packet* packet) : Layer(data, dataLen, prevLayer, packet) { m_Protocol = PacketTrailer; }
40 
41  ~PacketTrailerLayer() {}
42 
47  uint8_t* getTrailerData() const { return m_Data; }
48 
52  std::string getTrailerDataAsHexString() const;
53 
58  size_t getTrailerLen() const { return m_DataLen; }
59 
60  // implement abstract methods
61 
65  void parseNextLayer() {}
66 
70  size_t getHeaderLen() const { return m_DataLen; }
71 
76 
77  std::string toString() const;
78 
80  };
81 
82 }
83 
84 #endif // PACKETPP_PACKET_TRAILER_LAYER
The main namespace for the PcapPlusPlus lib.
OsiModelLayer
Definition: ProtocolType.h:253
Definition: ProtocolType.h:258
Definition: Layer.h:70
void computeCalculateFields()
Definition: PacketTrailerLayer.h:75
Definition: Packet.h:26
PacketTrailerLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: PacketTrailerLayer.h:39
Definition: PacketTrailerLayer.h:30
std::string getTrailerDataAsHexString() const
uint8_t * getTrailerData() const
Definition: PacketTrailerLayer.h:47
size_t getHeaderLen() const
Definition: PacketTrailerLayer.h:70
size_t getTrailerLen() const
Definition: PacketTrailerLayer.h:58
const ProtocolType PacketTrailer
Definition: ProtocolType.h:203
void parseNextLayer()
Definition: PacketTrailerLayer.h:65
OsiModelLayer getOsiModelLayer() const
Definition: PacketTrailerLayer.h:79
std::string toString() const