summaryrefslogtreecommitdiff
path: root/plainPacket.h
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 /plainPacket.h
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 'plainPacket.h')
-rw-r--r--plainPacket.h44
1 files changed, 36 insertions, 8 deletions
diff --git a/plainPacket.h b/plainPacket.h
index cd02196..8234f41 100644
--- a/plainPacket.h
+++ b/plainPacket.h
@@ -46,24 +46,52 @@ public:
~PlainPacket();
/**
- * Packet Constructor
- * @param max_payload_length Payload Length
+ * Packet constructor
+ * @param max_payload_length maximum payload length
*/
PlainPacket(u_int32_t max_payload_length);
+ /**
+ * Get the payload type
+ * @return the id of the payload type
+ */
payload_type_t getPayloadType() const;
+
+ /**
+ * Set the payload type
+ * @param payload_type payload type id
+ */
void setPayloadType(payload_type_t payload_type);
-// bool hasPayloadType() const;
-// Packet& withPayloadType(bool b);
-// payload_type_t getPayloadType() const;
-// Packet& addPayloadType(payload_type_t payload_type);
-// Packet& removePayloadType();
-
+ /**
+ * Set the real payload length
+ * @param length the real payload length
+ */
+ void setRealPayloadLengt(u_int32_t length);
+
+ /**
+ * Get the real payload length
+ * @return the real length of the payload
+ */
+ u_int32_t getRealPayloadLength();
+
+ /**
+ * Set the length of the payload
+ * @param length length of the payload
+ */
+ void setLength(u_int32_t length);
+
+ /**
+ * Get the size of the allocated memory for the payload
+ * @return maximum size of payload
+ */
+ u_int32_t getSize() const;
+
private:
PlainPacket();
PlainPacket(const PlainPacket &src);
payload_type_t* payload_type_;
+ u_int32_t size_;
};
#endif