From 00febb25de92b1cd01309cc0f253ed4c3a761b13 Mon Sep 17 00:00:00 2001 From: Erwin Nindl Date: Mon, 24 Dec 2007 17:05:26 +0000 Subject: weihnachtlicher checkin * packet processing now with less memory operations than before * todo: * testing * set cipher / authalgo via commandline * set key operations for hmac calculation --- packet.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packet.cpp') 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) -- cgit v1.2.3