Patent ID: 6847645

Claim:
A method for managing a packet header buffer associated with at least one processor of a forwarding engine contained within an intermediate node of a computer network, the method comprising the steps of: storing a context in the packet header buffer, the context comprising an original packet header of a complete packet received at the node; processing the context to generate a processed context having an extended packet header that is longer than the original packet header; overwriting an unmodified portion of the original packet header with a modified portion of the extended packet header to ensure that the extended packet header can be stored in the packet header buffer, the overwritten portion of the extended packet header residing at a predetermined offset within the processed context; specifying the predetermined offset using a wrap control function of the processed context; and detecting the end of the processed context and wrapping to the predetermined offset within the processed context using the wrap control function when retrieving the extended packet header from the processed context.