Moving Pkt{Src,Dumper} a directory level up.

Also renaming PktSourceComponent to PktSrcComponent.
This commit is contained in:
Robin Sommer 2014-08-22 16:44:35 -07:00
parent ecf1e32f60
commit caa55ad352
23 changed files with 274 additions and 311 deletions

View file

@ -0,0 +1,40 @@
#ifndef IOSOURCE_PKTSRC_PCAP_DUMPER_H
#define IOSOURCE_PKTSRC_PCAP_DUMPER_H
extern "C" {
#include <pcap.h>
}
#include "../PktDumper.h"
namespace iosource {
namespace pktsrc {
class PcapDumper : public PktDumper {
public:
PcapDumper(const std::string& path, bool append);
virtual ~PcapDumper();
static PktDumper* Instantiate(const std::string& path, bool appen);
protected:
// PktDumper interface.
virtual void Open();
virtual void Close();
virtual bool Dump(const Packet* pkt);
private:
Properties props;
bool append;
pcap_dumper_t* dumper;
pcap_t* pd;
};
}
}
#endif