Patent ID: 7590777

Claim:
A method, comprising: requesting, by an application, a buffer from a first component; allocating, by the first component, the buffer; calculating, by the first component, a first and second offsets in the buffer, where the first offset is calculated to point to a position in the buffer to provide a first sufficient amount of space in the buffer preceding the first offset to write first and second headers in front of the first offset in the buffer, and wherein the second offset is calculated to provide a second sufficient amount of space in the buffer to write the second header in front of the second offset in the buffer, wherein the first and second offsets are calculated to provide first and second sufficient amounts of space to allow the writing of data in front of data previously written to the buffer; returning, by the first component, to the application the first offset in the buffer for application data and the second offset in the buffer for the first header; writing, by the application, the application data at the first offset in the buffer; writing, by the application, the first header at the second offset in the buffer; writing a second header to a third offset in the buffer; passing a pointer to the second header to a second component; and processing, by the second component, the second header in the buffer in response to receiving the pointer to determine how to process the buffer.