summaryrefslogtreecommitdiff
path: root/packet.cpp
diff options
context:
space:
mode:
authorErwin Nindl <nine@wirdorange.org>2007-12-24 17:05:26 +0000
committerErwin Nindl <nine@wirdorange.org>2007-12-24 17:05:26 +0000
commit00febb25de92b1cd01309cc0f253ed4c3a761b13 (patch)
treeba0ffffdaf897e96ec2237a03cc523a4025b52f5 /packet.cpp
parentmesh syncing works now (diff)
weihnachtlicher checkin
* packet processing now with less memory operations than before * todo: * testing * set cipher / authalgo via commandline * set key operations for hmac calculation
Diffstat (limited to 'packet.cpp')
-rw-r--r--packet.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/packet.cpp b/packet.cpp
index d592e1e..3a80682 100644
--- a/packet.cpp
+++ b/packet.cpp
@@ -46,11 +46,12 @@ Packet::Packet()
has_auth_tag_ = false;
}
-Packet::Packet(u_int32_t length) : Buffer(length)
+Packet::Packet(u_int32_t payload_length)
+ : Buffer(payload_length + sizeof(struct HeaderStruct) + sizeof(payload_type_t) + AUTHTAG_SIZE)
{
has_header_ = false;
has_payload_type_ = false;
- has_auth_tag_ = false;
+ has_auth_tag_ = false;
}
Packet::Packet(const Buffer &src) : Buffer(src)