summaryrefslogtreecommitdiff
path: root/src/dev/etherpkt.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev/etherpkt.hh')
-rw-r--r--src/dev/etherpkt.hh12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/dev/etherpkt.hh b/src/dev/etherpkt.hh
index 80c7baff7..db2e0d6b5 100644
--- a/src/dev/etherpkt.hh
+++ b/src/dev/etherpkt.hh
@@ -69,11 +69,17 @@ class EthPacketData : public RefCounted
int slack;
public:
- EthPacketData() : data(NULL), length(0), slack(0) { }
+ EthPacketData() : data(NULL), length(0), slack(0)
+ { }
+
explicit EthPacketData(size_t size)
- : data(new uint8_t[size]), length(0), slack(0) { }
+ : data(new uint8_t[size]), length(0), slack(0)
+ { }
+
EthPacketData(std::auto_ptr<uint8_t> d, int l, int s = 0)
- : data(d.release()), length(l), slack(s) { }
+ : data(d.release()), length(l), slack(s)
+ { }
+
~EthPacketData() { if (data) delete [] data; }
public: