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
This commit is contained in:
Steve Raasch 2003-10-29 20:24:47 -05:00
parent 31342830ff
commit dcc0197caa

View file

@ -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;