projects
/
gem5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
always initalize the size of a packet (forgotten on checkpoints
[gem5.git]
/
dev
/
etherdump.hh
diff --git
a/dev/etherdump.hh
b/dev/etherdump.hh
index ef4399e1aafbab556cf89a7d1fafab68736ba9cd..b127d05e2f4a31273b084551641118e17452a2ea 100644
(file)
--- a/
dev/etherdump.hh
+++ b/
dev/etherdump.hh
@@
-43,7
+43,8
@@
class EtherDump : public SimObject
{
private:
class EtherDump : public SimObject
{
private:
- std::ofstream stream;
+ std::ostream *stream;
+ const int maxlen;
void dumpPacket(PacketPtr &packet);
void init();
void dumpPacket(PacketPtr &packet);
void init();
@@
-52,9
+53,9
@@
class EtherDump : public SimObject
Tick us_freq;
public:
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__
};
#endif // __ETHERDUMP_H__