PcapPlusPlus  19.12
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
pcpp::OsiModelLayer
OsiModelLayer
Definition: ProtocolType.h:224
pcpp::PacketTrailerLayer::toString
std::string toString() const
pcpp::Packet
Definition: Packet.h:26
pcpp::OsiModelDataLinkLayer
Definition: ProtocolType.h:229
pcpp::PacketTrailerLayer::PacketTrailerLayer
PacketTrailerLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: PacketTrailerLayer.h:39
Layer.h
pcpp::PacketTrailerLayer::computeCalculateFields
void computeCalculateFields()
Definition: PacketTrailerLayer.h:75
pcpp::PacketTrailerLayer::getTrailerDataAsHexString
std::string getTrailerDataAsHexString() const
pcpp::PacketTrailerLayer::getTrailerData
uint8_t * getTrailerData() const
Definition: PacketTrailerLayer.h:47
pcpp::PacketTrailerLayer::getHeaderLen
size_t getHeaderLen() const
Definition: PacketTrailerLayer.h:70
pcpp
The main namespace for the PcapPlusPlus lib.
pcpp::PacketTrailerLayer::getTrailerLen
size_t getTrailerLen() const
Definition: PacketTrailerLayer.h:58
pcpp::PacketTrailer
Definition: ProtocolType.h:201
pcpp::PacketTrailerLayer::parseNextLayer
void parseNextLayer()
Definition: PacketTrailerLayer.h:65
pcpp::Layer
Definition: Layer.h:70
pcpp::PacketTrailerLayer::getOsiModelLayer
OsiModelLayer getOsiModelLayer() const
Definition: PacketTrailerLayer.h:79
pcpp::PacketTrailerLayer
Definition: PacketTrailerLayer.h:30