X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=dev%2Fetherdump.hh;h=b127d05e2f4a31273b084551641118e17452a2ea;hb=86836124ed272945e9d360c068728cd03917398d;hp=62364359e22f70e65cdc39ac051182426f48d7c3;hpb=b1fa4e9f0a687f8005ab0ba3cbfb5f4e6fb0172f;p=gem5.git diff --git a/dev/etherdump.hh b/dev/etherdump.hh index 62364359e..b127d05e2 100644 --- a/dev/etherdump.hh +++ b/dev/etherdump.hh @@ -43,7 +43,7 @@ class EtherDump : public SimObject { private: - std::ofstream stream; + std::ostream *stream; const int maxlen; void dumpPacket(PacketPtr &packet); void init(); @@ -53,9 +53,9 @@ class EtherDump : public SimObject Tick us_freq; public: - EtherDump(const std::string &name, const std::string &file, int max); + 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__