summaryrefslogtreecommitdiff
path: root/dev/etherpkt.hh
diff options
context:
space:
mode:
authorSteve Raasch <sraasch@umich.edu>2003-10-29 20:24:47 -0500
committerSteve Raasch <sraasch@umich.edu>2003-10-29 20:24:47 -0500
commitdcc0197caa30844056865080d9d412d43bf77116 (patch)
treeed1228d4696c06137f955d93d598d9c552060d58 /dev/etherpkt.hh
parent31342830fff9f13095e228686252e641181ba3df (diff)
downloadgem5-dcc0197caa30844056865080d9d412d43bf77116.tar.xz
Add serialization for etherdev
These changes don't seem to break anything, and may even be correct. dev/etherpkt.hh: Add serialization --HG-- extra : convert_revision : 02962b9bef01c1c3f35a095788117bd95e7ed4bc
Diffstat (limited to 'dev/etherpkt.hh')
-rw-r--r--dev/etherpkt.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/dev/etherpkt.hh b/dev/etherpkt.hh
index 678b83b33..030f51317 100644
--- a/dev/etherpkt.hh
+++ b/dev/etherpkt.hh
@@ -39,6 +39,8 @@
#include "base/refcnt.hh"
+class IniFile;
+
/*
* Reference counted class containing ethernet packet data
*/
@@ -58,6 +60,9 @@ class EtherPacket : public RefCounted
bool IsUnicast() { return data[0] == 0x00; }
bool IsMulticast() { return data[0] == 0x01; }
bool IsBroadcast() { return data[0] == 0xff; }
+
+ virtual void serialize(std::ostream &os);
+ virtual void unserialize(const IniFile *db, const std::string &section);
};
typedef RefCountingPtr<EtherPacket> PacketPtr;