1 #ifndef PCAPPP_FILE_DEVICE 2 #define PCAPPP_FILE_DEVICE 52 uint32_t m_NumOfPacketsRead;
53 uint32_t m_NumOfPacketsNotParsed;
74 virtual bool getNextPacket(
RawPacket& rawPacket) = 0;
162 struct bpf_program m_Bpf;
163 bool m_BpfInitialized;
165 std::string m_CurFilter;
171 bool matchPacketWithFilter(
const uint8_t* packetData,
size_t packetLen, timeval packetTimestamp, uint16_t linkType);
256 bool setFilter(std::string filterAsString);
272 uint32_t m_NumOfPacketsWritten;
273 uint32_t m_NumOfPacketsNotWritten;
284 virtual bool writePacket(
RawPacket const& packet) = 0;
289 virtual bool open(
bool appendMode) = 0;
302 pcap_dumper_t* m_PcapDumpHandler;
366 bool open(
bool appendMode);
371 virtual void close();
427 bool open(
const char* os,
const char* hardware,
const char* captureApp,
const char* fileComment);
475 bool open(
bool appendMode);
Definition: PcapFileDevice.h:299
int getNextPackets(RawPacketVector &packetVec, int numOfPacketsToRead=-1)
static IFileReaderDevice * getReader(const char *fileName)
std::string getCaptureApplication()
void getStatistics(pcap_stat &stats)
Definition: RawPacket.h:30
Definition: PcapFileDevice.h:101
Definition: RawPacket.h:220
Definition: PcapDevice.h:38
virtual ~IFileWriterDevice()
Definition: PcapFileDevice.h:282
bool writePackets(const RawPacketVector &packets)
The main namespace for the PcapPlusPlus lib.
LinkLayerType
Definition: RawPacket.h:25
bool writePacket(RawPacket const &packet)
virtual ~PcapFileReaderDevice()
Definition: PcapFileDevice.h:121
Definition: PcapFileDevice.h:269
void getStatistics(pcap_stat &stats)
Definition: PcapFileDevice.h:49
Definition: PointerVector.h:24
bool getNextPacket(RawPacket &rawPacket)
Definition: PcapFileDevice.h:388
Definition: PcapFileDevice.h:158
std::string getCaptureFileComment()
IFileReaderDevice(const char *fileName)
bool getNextPacket(RawPacket &rawPacket, std::string &packetComment)
virtual ~IFileReaderDevice()
Definition: PcapFileDevice.h:67
void getStatistics(pcap_stat &stats)
virtual ~PcapNgFileWriterDevice()
Definition: PcapFileDevice.h:410
std::string getHardware()
virtual ~PcapNgFileReaderDevice()
Definition: PcapFileDevice.h:184
virtual void getStatistics(pcap_stat &stats)
bool writePackets(const RawPacketVector &packets)
LinkLayerType getLinkLayerType()
std::string getFileName()
bool setFilter(std::string filterAsString)
Definition: PcapFileDevice.h:20
bool writePacket(RawPacket const &packet, const char *comment)