X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=dev%2Fetherdump.hh;h=b127d05e2f4a31273b084551641118e17452a2ea;hb=86836124ed272945e9d360c068728cd03917398d;hp=ef4399e1aafbab556cf89a7d1fafab68736ba9cd;hpb=3f7b780af5530cc60228ebd3e895ab26d477614e;p=gem5.git diff --git a/dev/etherdump.hh b/dev/etherdump.hh index ef4399e1a..b127d05e2 100644 --- a/dev/etherdump.hh +++ b/dev/etherdump.hh @@ -43,7 +43,8 @@ class EtherDump : public SimObject { private: - std::ofstream stream; + std::ostream *stream; + const int maxlen; void dumpPacket(PacketPtr &packet); void init(); @@ -52,9 +53,9 @@ class EtherDump : public SimObject Tick us_freq; public: - EtherDump(const std::string &name, const std::string &file); + EtherDump(const std::string &name, std::ostream *_stream, int max); - inline void dump(PacketPtr &pkt) { if (stream.is_open()) dumpPacket(pkt); } + inline void dump(PacketPtr &pkt) { dumpPacket(pkt); } }; #endif // __ETHERDUMP_H__