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 e22b661663a72800ee9f6ba74615b961871154da..b127d05e2f4a31273b084551641118e17452a2ea 100644
(file)
--- a/
dev/etherdump.hh
+++ b/
dev/etherdump.hh
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 200
3
The Regents of The University of Michigan
+ * Copyright (c) 200
2-2004
The Regents of The University of Michigan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@
-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__