1 #ifndef PCAPPP_FILE_DEVICE 2 #define PCAPPP_FILE_DEVICE 9 typedef struct pcap_dumper pcap_dumper_t;
27 std::string m_FileName;
57 uint32_t m_NumOfPacketsRead;
58 uint32_t m_NumOfPacketsNotParsed;
77 uint64_t getFileSize()
const;
79 virtual bool getNextPacket(
RawPacket& rawPacket) = 0;
88 int getNextPackets(
RawPacketVector& packetVec,
int numOfPacketsToRead = -1);
140 bool getNextPacket(
RawPacket& rawPacket);
190 std::string getOS()
const;
198 std::string getHardware()
const;
206 std::string getCaptureApplication()
const;
214 std::string getCaptureFileComment()
const;
224 bool getNextPacket(
RawPacket& rawPacket, std::string& packetComment);
234 bool getNextPacket(
RawPacket& rawPacket);
254 bool setFilter(std::string filterAsString);
270 uint32_t m_NumOfPacketsWritten;
271 uint32_t m_NumOfPacketsNotWritten;
282 virtual bool writePacket(
RawPacket const& packet) = 0;
287 virtual bool open(
bool appendMode) = 0;
300 pcap_dumper_t* m_PcapDumpHandler;
333 bool writePacket(
RawPacket const& packet);
364 bool open(
bool appendMode);
369 virtual void close();
395 int m_CompressionLevel;
432 bool open(
const std::string& os,
const std::string& hardware,
const std::string& captureApp,
const std::string& fileComment);
442 bool writePacket(
RawPacket const& packet,
const std::string& comment);
452 bool writePacket(
RawPacket const& packet);
480 bool open(
bool appendMode);
503 bool setFilter(std::string filterAsString);
The main namespace for the PcapPlusPlus lib.
Definition: PcapFileDevice.h:24
Definition: RawPacket.h:30
Definition: PcapFileDevice.h:54
std::string getFileName() const
Definition: PcapFileDevice.h:161
Definition: PcapDevice.h:39
virtual ~PcapFileReaderDevice()
Definition: PcapFileDevice.h:124
Definition: PointerVector.h:24
virtual ~IFileReaderDevice()
Definition: PcapFileDevice.h:72
Definition: RawPacket.h:252
virtual ~IFileWriterDevice()
Definition: PcapFileDevice.h:280
Definition: PcapFileDevice.h:391
Definition: PcapFileDevice.h:297
Definition: PcapFilter.h:77
~PcapFileWriterDevice()
Definition: PcapFileDevice.h:323
Definition: PcapFileDevice.h:104
LinkLayerType
Definition: RawPacket.h:25
PcapFileReaderDevice(const std::string &fileName)
Definition: PcapFileDevice.h:119
virtual void getStatistics(PcapStats &stats) const =0
LinkLayerType getLinkLayerType() const
Definition: PcapFileDevice.h:129
virtual ~PcapNgFileWriterDevice()
Definition: PcapFileDevice.h:415
virtual bool setFilter(std::string filterAsString)
Definition: PcapFileDevice.h:267
virtual ~PcapNgFileReaderDevice()
Definition: PcapFileDevice.h:182
Definition: PcapDevice.h:53