X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fdev%2Fetherdump.hh;h=cf4213b2766edfedc068f94798d8769116018fae;hb=eac5eac67ae8076e934d78063a24eeef08f25413;hp=f3080f34147aeda2ee5013db199b1534049823d1;hpb=15a8f050605919579e81b6abb98a0b596334216d;p=gem5.git diff --git a/src/dev/etherdump.hh b/src/dev/etherdump.hh index f3080f341..cf4213b27 100644 --- a/src/dev/etherdump.hh +++ b/src/dev/etherdump.hh @@ -38,6 +38,7 @@ #include #include "dev/etherpkt.hh" #include "sim/sim_object.hh" +#include "params/EtherDump.hh" /* * Simple object for creating a simple pcap style packet trace @@ -45,15 +46,14 @@ class EtherDump : public SimObject { private: - std::ofstream stream; - const int maxlen; + std::ostream *stream; + const unsigned maxlen; void dumpPacket(EthPacketPtr &packet); void init(); - Tick curtime; - public: - EtherDump(const std::string &name, const std::string &file, int max); + typedef EtherDumpParams Params; + EtherDump(const Params *p); inline void dump(EthPacketPtr &pkt) { dumpPacket(pkt); } };