From de5c4f910203dd976ad8c17eff90874f548d6bc3 Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Thu, 31 Jan 2008 11:39:39 +0000 Subject: packet and cypher fixes --- plainPacket.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'plainPacket.h') diff --git a/plainPacket.h b/plainPacket.h index 8234f41..22664f4 100644 --- a/plainPacket.h +++ b/plainPacket.h @@ -33,8 +33,8 @@ #include "datatypes.h" #include "buffer.h" -#include "authTag.h" +class Cypher; /** * plain SATP packet class
* includes payload_type and payload @@ -63,17 +63,19 @@ public: */ void setPayloadType(payload_type_t payload_type); + void setCompletePayloadLength(u_int32_t payload_length); + /** * Set the real payload length * @param length the real payload length */ - void setRealPayloadLengt(u_int32_t length); + //void setRealPayloadLengt(u_int32_t length); /** * Get the real payload length * @return the real length of the payload */ - u_int32_t getRealPayloadLength(); + //u_int32_t getRealPayloadLength(); /** * Set the length of the payload @@ -85,13 +87,18 @@ public: * Get the size of the allocated memory for the payload * @return maximum size of payload */ - u_int32_t getSize() const; + u_int32_t getMaxLength() const; private: PlainPacket(); PlainPacket(const PlainPacket &src); + void splitPayload(); + u_int32_t max_length_; payload_type_t* payload_type_; - u_int32_t size_; +protected: + friend class Cypher; + u_int8_t * complete_payload_; + u_int32_t complete_payload_length_; }; #endif -- cgit v1.2.3