diff options
author | Nathan Binkert <binkertn@umich.edu> | 2004-07-22 23:54:24 -0400 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2004-07-22 23:54:24 -0400 |
commit | c9e6a15196a87fd1aa923b9ee0f6ff736ad6d33b (patch) | |
tree | f752cfa7c27196feb766eaf7502b7c7de87546fb /dev/etherdump.hh | |
parent | 552b9541808a76c8da570e918c14b1435570c6fb (diff) | |
download | gem5-c9e6a15196a87fd1aa923b9ee0f6ff736ad6d33b.tar.xz |
Add support to store less than the full packet in an etherdump
and actually default to only storing a max of 96 bytes per
packet since that should be plenty to fit all of the headers in.
--HG--
extra : convert_revision : 0c4a6571d80536477ed166e695d957e39da0334e
Diffstat (limited to 'dev/etherdump.hh')
-rw-r--r-- | dev/etherdump.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dev/etherdump.hh b/dev/etherdump.hh index ef4399e1a..62364359e 100644 --- a/dev/etherdump.hh +++ b/dev/etherdump.hh @@ -44,6 +44,7 @@ class EtherDump : public SimObject { private: std::ofstream stream; + const int maxlen; void dumpPacket(PacketPtr &packet); void init(); @@ -52,7 +53,7 @@ class EtherDump : public SimObject Tick us_freq; public: - EtherDump(const std::string &name, const std::string &file); + EtherDump(const std::string &name, const std::string &file, int max); inline void dump(PacketPtr &pkt) { if (stream.is_open()) dumpPacket(pkt); } }; |