Small packet dumper API change.

This commit is contained in:
Robin Sommer 2014-08-22 16:49:14 -07:00
parent caa55ad352
commit 0186061aa8
7 changed files with 8 additions and 16 deletions

View file

@ -50,11 +50,6 @@ int PktDumper::HdrSize() const
return is_open ? props.hdr_size : -1;
}
bool PktDumper::Record(const Packet* pkt)
{
return Dump(pkt);
}
void PktDumper::Opened(const Properties& arg_props)
{
is_open = true;

View file

@ -25,8 +25,10 @@ public:
int HdrSize() const;
bool Record(const Packet* pkt);
// PktSrc interface for derived classes to implement.
virtual void Close() = 0;
virtual void Open() = 0;
virtual bool Dump(const Packet* pkt) = 0;
protected:
// Methods to use by derived classed.
@ -41,10 +43,6 @@ protected:
void Closed();
void Error(const std::string& msg);
// PktSrc interface for derived classes to implement.
virtual bool Dump(const Packet* pkt) = 0;
private:
bool is_open;
Properties props;