A method for processing a first packet, the method comprising: providing a packet data modification processor with a processor readable medium having commands within and conforming to a command instruction set, wherein the command instruction set has a format that specifies a packet address for the first packet, wherein the packet address comprises a first portion representing an encapsulated layer of the packet and a second portion representing a location within the encapsulated layer, wherein a context pointer points to the encapsulated layer of the packet; wherein a packet classification engine classifies the packet and stores data representative of the packet classification in parser result RAM, the classification data comprising an Address Filtering Header hereafter called an AF header of the packet which is pre-pended to the packet; implementing Transmit Modification Index, hereafter called TXMI, processing by extracting the TXMI from the AF header of the packet then using the TXMI to access a TXMI link in External Transmit SRAM containing a recipe of modifications commands and storing the recipe in Recipe RAM; wherein a packet modification engine then executes the recipe and in the process of executing the recipe stores modified fragments of the packet in a fragment buffer using pointers to the modified fragments of the packet as stored in the fragment buffer and pointers to the unmodified fragments of the packet as stored in a Transmit In Data Buffer; wherein a command from the command instruction set or the recipe specifies the formation, modification, or replacing of at least a portion of the first packet at the location within the encapsulated layer represented by the second portion, based on or using data derived from data taken from a second packet or the command. providing a packet data modification processor with a processor readable medium having commands within and conforming to a command instruction set, wherein the command instruction set has a format that specifies a packet address for the first packet, wherein the packet address comprises a first portion representing an encapsulated layer of the packet and a second portion representing a location within the encapsulated layer, wherein a context pointer points to the encapsulated layer of the packet; wherein a packet classification engine classifies the packet and stores data representative of the packet classification in parser result RAM, the classification data comprising an Address Filtering Header hereafter called an AF header of the packet which is pre-pended to the packet; implementing Transmit Modification Index, hereafter called TXMI, processing by extracting the TXMI from the AF header of the packet then using the TXMI to access a TXMI link in External Transmit SRAM containing a recipe of modifications commands and storing the recipe in Recipe RAM; wherein a packet modification engine then executes the recipe and in the process of executing the recipe stores modified fragments of the packet in a fragment buffer using pointers to the modified fragments of the packet as stored in the fragment buffer and pointers to the unmodified fragments of the packet as stored in a Transmit In Data Buffer; wherein a command from the command instruction set or the recipe specifies the formation, modification, or replacing of at least a portion of the first packet at the location within the encapsulated layer represented by the second portion, based on or using data derived from data taken from a second packet or the command.