PcapPlusPlus
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  inline uint8_t* getTrailerData() { return m_Data; }
48 
52  std::string getTrailerDataAsHexString();
53 
58  inline size_t getTrailerLen() { return m_DataLen; }
59 
60  // implement abstract methods
61 
65  void parseNextLayer() {}
66 
70  inline size_t getHeaderLen() { return m_DataLen; }
71 
76 
77  std::string toString();
78 
80  };
81 
82 }
83 
84 #endif // PACKETPP_PACKET_TRAILER_LAYER
Definition: ProtocolType.h:218
std::string getTrailerDataAsHexString()
uint8_t * getTrailerData()
Definition: PacketTrailerLayer.h:47
OsiModelLayer getOsiModelLayer()
Definition: PacketTrailerLayer.h:79
void computeCalculateFields()
Definition: PacketTrailerLayer.h:75
Definition: Layer.h:70
Definition: Packet.h:26
void parseNextLayer()
Definition: PacketTrailerLayer.h:65
OsiModelLayer
Definition: ProtocolType.h:213
PacketTrailerLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: PacketTrailerLayer.h:39
Definition: ProtocolType.h:201
size_t getHeaderLen()
Definition: PacketTrailerLayer.h:70
Definition: PacketTrailerLayer.h:30
The main namespace for the PcapPlusPlus lib.
size_t getTrailerLen()
Definition: PacketTrailerLayer.h:58