X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=dev%2Fetherdump.hh;h=b127d05e2f4a31273b084551641118e17452a2ea;hb=86836124ed272945e9d360c068728cd03917398d;hp=e22b661663a72800ee9f6ba74615b961871154da;hpb=85bc028185830fb534c10c244d5f39fcfe8c4da6;p=gem5.git diff --git a/dev/etherdump.hh b/dev/etherdump.hh index e22b66166..b127d05e2 100644 --- a/dev/etherdump.hh +++ b/dev/etherdump.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003 The Regents of The University of Michigan + * Copyright (c) 2002-2004 The Regents of The University of Michigan * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -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__