X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fdev%2Fetherpkt.hh;h=c71d9cc308c3cd06e341f96679309675aef5622c;hb=eddac53ff60c579eff28134bde84783fe36d6214;hp=80c7baff7c9675c0f8e68609a4402272d72ce0e3;hpb=d2d581cf01d07f6a22f02f471d23e3d31919c695;p=gem5.git diff --git a/src/dev/etherpkt.hh b/src/dev/etherpkt.hh index 80c7baff7..c71d9cc30 100644 --- a/src/dev/etherpkt.hh +++ b/src/dev/etherpkt.hh @@ -36,12 +36,12 @@ #ifndef __ETHERPKT_HH__ #define __ETHERPKT_HH__ +#include #include #include -#include #include "base/refcnt.hh" -#include "sim/host.hh" +#include "base/types.hh" /* * Reference counted class containing ethernet packet data @@ -58,22 +58,21 @@ class EthPacketData : public RefCounted /* * Length of the current packet */ - int length; - - /* - * Extra space taken up by the packet in whatever data structure - * it is in. - * - * NOTE: This can only be use by *one* data structure at a time! - */ - int slack; + unsigned length; public: - EthPacketData() : data(NULL), length(0), slack(0) { } - explicit EthPacketData(size_t size) - : data(new uint8_t[size]), length(0), slack(0) { } - EthPacketData(std::auto_ptr d, int l, int s = 0) - : data(d.release()), length(l), slack(s) { } + EthPacketData() + : data(NULL), length(0) + { } + + explicit EthPacketData(unsigned size) + : data(new uint8_t[size]), length(0) + { } + + EthPacketData(std::auto_ptr d, int l) + : data(d.release()), length(l) + { } + ~EthPacketData() { if (data) delete [] data; } public: