X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fdev%2Fetherdump.hh;h=cc8fa9151262a11aec534e7385756d50221472da;hb=9957035a42653a0666e30c744ab02fb0074db3a3;hp=8bba073fe16c4e032f966cbc5d10d37a14f18d0e;hpb=ba2eae5d528487900d1510fc0a160e660f2c394c;p=gem5.git diff --git a/src/dev/etherdump.hh b/src/dev/etherdump.hh index 8bba073fe..cc8fa9151 100644 --- a/src/dev/etherdump.hh +++ b/src/dev/etherdump.hh @@ -24,6 +24,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Authors: Nathan Binkert */ /* @file @@ -34,7 +36,9 @@ #define __ETHERDUMP_H__ #include + #include "dev/etherpkt.hh" +#include "params/EtherDump.hh" #include "sim/sim_object.hh" /* @@ -43,15 +47,14 @@ class EtherDump : public SimObject { private: - std::ofstream stream; - const int maxlen; + std::ostream *stream; + const unsigned maxlen; void dumpPacket(EthPacketPtr &packet); void init(); - Tick curtime; - public: - EtherDump(const std::string &name, const std::string &file, int max); + typedef EtherDumpParams Params; + EtherDump(const Params *p); inline void dump(EthPacketPtr &pkt) { dumpPacket(pkt); } };