--- a/src/common/header.h Fri Jun 15 13:30:40 2007 -0700
+++ b/src/common/header.h Sat Jun 16 17:15:58 2007 +0200
@@ -49,6 +49,10 @@
/**
* \returns the size of the serialized Header.
+ *
+ * This method is used by Packet::AddHeader to reserve
+ * enough room in the packet byte buffer prior to calling
+ * Header::Serialize.
*/
virtual uint32_t GetSerializedSize (void) const = 0;
@@ -63,6 +67,10 @@
* deserialize itself. This iterator identifies
* the start of the buffer.
* \returns the number of bytes read from the buffer
+ *
+ * The value returned is used to trim the packet byte buffer of the
+ * corresponding amount when this method is invoked from
+ * Packet::RemoveHeader
*/
virtual uint32_t DeserializeFrom (Buffer::Iterator start) = 0;
};
--- a/src/common/trailer.h Fri Jun 15 13:30:40 2007 -0700
+++ b/src/common/trailer.h Sat Jun 16 17:15:58 2007 +0200
@@ -75,6 +75,10 @@
/**
* \returns the size of the serialized Trailer.
+ *
+ * This method is used by Packet::AddTrailer to reserve
+ * enough room in the packet byte buffer prior to calling
+ * Trailer::Serialize.
*/
virtual uint32_t GetSerializedSize (void) const = 0;
@@ -94,7 +98,9 @@
* \returns the number of bytes read from the buffer
*
* This iterator must be typically moved with the Buffer::Iterator::Prev
- * method before reading any byte in the buffer.
+ * method before reading any byte in the buffer. The value returned
+ * is used to trim the packet byte buffer of the corresponding
+ * amount when this method is invoked from Packet::RemoveTrailer
*/
virtual uint32_t DeserializeFrom (Buffer::Iterator end) = 0;
};