1 #ifndef PCAPPP_FILE_DEVICE 2 #define PCAPPP_FILE_DEVICE 9 typedef struct pcap_dumper pcap_dumper_t;
27 std::string m_FileName;
56 uint32_t m_NumOfPacketsRead;
57 uint32_t m_NumOfPacketsNotParsed;
76 uint64_t getFileSize()
const;
78 virtual bool getNextPacket(
RawPacket& rawPacket) = 0;
87 int getNextPackets(
RawPacketVector& packetVec,
int numOfPacketsToRead = -1);
139 bool getNextPacket(
RawPacket& rawPacket);
189 std::string getOS()
const;
197 std::string getHardware()
const;
205 std::string getCaptureApplication()
const;
213 std::string getCaptureFileComment()
const;
223 bool getNextPacket(
RawPacket& rawPacket, std::string& packetComment);
233 bool getNextPacket(
RawPacket& rawPacket);
253 bool setFilter(std::string filterAsString);
269 uint32_t m_NumOfPacketsWritten;
270 uint32_t m_NumOfPacketsNotWritten;
281 virtual bool writePacket(
RawPacket const& packet) = 0;
286 virtual bool open(
bool appendMode) = 0;
299 pcap_dumper_t* m_PcapDumpHandler;
332 bool writePacket(
RawPacket const& packet);
363 bool open(
bool appendMode);
368 virtual void close();
394 int m_CompressionLevel;
431 bool open(
const std::string& os,
const std::string& hardware,
const std::string& captureApp,
const std::string& fileComment);
441 bool writePacket(
RawPacket const& packet,
const std::string& comment);
451 bool writePacket(
RawPacket const& packet);
479 bool open(
bool appendMode);
502 bool setFilter(std::string filterAsString);
The main namespace for the PcapPlusPlus lib.
Definition: PcapFileDevice.h:24
Definition: RawPacket.h:30
Definition: PcapFileDevice.h:53
std::string getFileName() const
Definition: PcapFileDevice.h:160
Definition: PcapDevice.h:39
virtual ~PcapFileReaderDevice()
Definition: PcapFileDevice.h:123
Definition: PointerVector.h:24
virtual ~IFileReaderDevice()
Definition: PcapFileDevice.h:71
Definition: RawPacket.h:252
virtual ~IFileWriterDevice()
Definition: PcapFileDevice.h:279
Definition: PcapFileDevice.h:390
Definition: PcapFileDevice.h:296
Definition: PcapFilter.h:77
~PcapFileWriterDevice()
Definition: PcapFileDevice.h:322
Definition: PcapFileDevice.h:103
LinkLayerType
Definition: RawPacket.h:25
PcapFileReaderDevice(const std::string &fileName)
Definition: PcapFileDevice.h:118
virtual void getStatistics(PcapStats &stats) const =0
LinkLayerType getLinkLayerType() const
Definition: PcapFileDevice.h:128
virtual ~PcapNgFileWriterDevice()
Definition: PcapFileDevice.h:414
virtual bool setFilter(std::string filterAsString)
Definition: PcapFileDevice.h:266
virtual ~PcapNgFileReaderDevice()
Definition: PcapFileDevice.h:181
Definition: PcapDevice.h:53