Patent ID: 8913617

Claim:
A network device, comprising: a first port configured to receive an incoming data packet including a header portion and a data portion; memory configured to store the incoming data packet; a second port configured to transmit an outgoing data packet to a network; and a packet processor configured to: generate a data structure corresponding to the incoming data packet, the data structure including at least some information based on the header portion of the incoming data packet and, in each of a plurality of processing operations, perform at least one processing task according to the data structure, the processing operations including (i) at least one of adding to and subtracting from the information stored in the data structure, and (ii) preparing the data structure to be further modified in a subsequent processing operation, the packet processor further configured to perform header alteration to: modify the header portion of the stored incoming data packet according to the data structure as modified at the plurality of processing operations; and provide the stored incoming data packet with the modified header portion to the second port to be output as the outgoing data packet.