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;
160 struct bpf_program m_Bpf;
161 bool m_BpfInitialized;
163 std::string m_CurFilter;
169 bool matchPacketWithFilter(
const uint8_t* packetData,
size_t packetLen, timeval packetTimestamp, uint16_t linkType);
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;
364 bool open(
bool appendMode);
369 virtual void close();
390 struct bpf_program m_Bpf;
391 bool m_BpfInitialized;
393 std::string m_CurFilter;
399 bool matchPacketWithFilter(
const uint8_t* packetData,
size_t packetLen, timeval packetTimestamp, uint16_t linkType);
430 bool open(
const char* os,
const char* hardware,
const char* captureApp,
const char* fileComment);
478 bool open(
bool appendMode);
496 bool setFilter(std::string filterAsString);
Definition: PcapFileDevice.h:49
std::string getFileName()
bool setFilter(std::string filterAsString)
Definition: PcapFileDevice.h:386
bool writePackets(const RawPacketVector &packets)
bool getNextPacket(RawPacket &rawPacket, std::string &packetComment)
virtual ~IFileWriterDevice()
Definition: PcapFileDevice.h:280
Definition: PcapFileDevice.h:156
virtual ~PcapNgFileWriterDevice()
Definition: PcapFileDevice.h:413
bool writePackets(const RawPacketVector &packets)
bool writePacket(RawPacket const &packet)
static IFileReaderDevice * getReader(const char *fileName)
Definition: PointerVector.h:24
bool writePacket(RawPacket const &packet, const char *comment)
virtual ~IFileReaderDevice()
Definition: PcapFileDevice.h:67
int getNextPackets(RawPacketVector &packetVec, int numOfPacketsToRead=-1)
std::string getCaptureApplication()
IFileReaderDevice(const char *fileName)
Definition: RawPacket.h:219
Definition: PcapFileDevice.h:297
Definition: PcapFileDevice.h:99
Definition: PcapFileDevice.h:267
virtual ~PcapFileReaderDevice()
Definition: PcapFileDevice.h:119
void getStatistics(pcap_stat &stats)
virtual ~PcapNgFileReaderDevice()
Definition: PcapFileDevice.h:182
Definition: RawPacket.h:29
virtual void getStatistics(pcap_stat &stats)
void getStatistics(pcap_stat &stats)
Definition: PcapFileDevice.h:20
LinkLayerType getLinkLayerType()
std::string getCaptureFileComment()
The main namespace for the PcapPlusPlus lib.
LinkLayerType
Definition: RawPacket.h:24
bool getNextPacket(RawPacket &rawPacket)
Definition: PcapDevice.h:32
bool setFilter(std::string filterAsString)
std::string getHardware()
void getStatistics(pcap_stat &stats)