|
PcapPlusPlus
19.12
|
Go to the documentation of this file. 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);
190 std::string
getOS()
const;
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 int m_CompressionLevel;
391 struct bpf_program m_Bpf;
392 bool m_BpfInitialized;
394 std::string m_CurFilter;
400 bool matchPacketWithFilter(
const uint8_t* packetData,
size_t packetLen, timeval packetTimestamp, uint16_t linkType);
432 bool open(
const char* os,
const char* hardware,
const char* captureApp,
const char* fileComment);
480 bool open(
bool appendMode);
498 bool setFilter(std::string filterAsString);
uint64_t getFileSize() const
Definition: PcapFileDevice.h:267
bool getNextPacket(RawPacket &rawPacket)
virtual ~PcapNgFileReaderDevice()
Definition: PcapFileDevice.h:182
static IFileReaderDevice * getReader(const char *fileName)
Definition: RawPacket.h:29
bool writePackets(const RawPacketVector &packets)
std::string getCaptureFileComment() const
PcapFileReaderDevice(const char *fileName)
Definition: PcapFileDevice.h:114
std::string getOS() const
void getStatistics(pcap_stat &stats) const
virtual void getStatistics(pcap_stat &stats) const
bool getNextPacket(RawPacket &rawPacket, std::string &packetComment)
LinkLayerType getLinkLayerType() const
Definition: PcapFileDevice.h:124
virtual ~IFileReaderDevice()
Definition: PcapFileDevice.h:67
virtual ~IFileWriterDevice()
Definition: PcapFileDevice.h:280
std::string getHardware() const
IFileReaderDevice(const char *fileName)
Definition: PcapFileDevice.h:156
void getStatistics(pcap_stat &stats) const
bool writePacket(RawPacket const &packet, const char *comment)
virtual ~PcapFileReaderDevice()
Definition: PcapFileDevice.h:119
bool setFilter(std::string filterAsString)
virtual ~PcapNgFileWriterDevice()
Definition: PcapFileDevice.h:415
Definition: PcapFileDevice.h:297
bool setFilter(std::string filterAsString)
Definition: PcapFileDevice.h:386
Definition: PcapDevice.h:35
Definition: PcapFileDevice.h:49
void getStatistics(pcap_stat &stats) const
The main namespace for the PcapPlusPlus lib.
std::string getCaptureApplication() const
LinkLayerType
Definition: RawPacket.h:24
Definition: PcapFileDevice.h:99
bool writePacket(RawPacket const &packet)
std::string getFileName() const
Definition: PointerVector.h:24
Definition: PcapFileDevice.h:20
bool writePackets(const RawPacketVector &packets)
Definition: RawPacket.h:219
int getNextPackets(RawPacketVector &packetVec, int numOfPacketsToRead=-1)