8. A system, comprising: a packet buffer; and a hardware-based packet editor comprising a control memory and a control module, wherein the packet editor: receives a packet editing script comprising one or more script entries indicating modifications to be applied to a data packet and a data block comprising data for the modified packet; and stores the packet editing script in the control memory, wherein the control module: retrieves each given script entry stored in the control memory; copies data in the data block at a location and a size identified in the given script entry into the packet buffer; and generates a modified data packet with the data in the packet buffer, wherein copying ( 4 ) the data in the data block at the location and the size identified in the given script entry into the packet buffer, the control module: determines whether the given script entry is a first script entry for the modified data packet; and in response to determining that the given script entry is the first script entry for the modified data packet, reserves the packet buffer for the modified data packet; copies the data in the data block at a block location and with a block length identified in the given script entry into the packet buffer; determines whether the given script entry is a last script entry for the modified data packet; and in response to determining that the given script entry is not the last script entry for the modified data packet, performs, for the next given script entry of the packet editing script, the copying of the data in the data block at the block location and with the block length identified in the given script entry into the packet buffer and the determining whether the given script entry is a last script entry for the modified data packet for the next given script entry of the packet editing script.
8. A system, comprising: a packet buffer; and a hardware-based packet editor comprising a control memory and a control module, wherein the packet editor: receives a packet editing script comprising one or more script entries indicating modifications to be applied to a data packet and a data block comprising data for the modified packet; and stores the packet editing script in the control memory, wherein the control module: retrieves each given script entry stored in the control memory; copies data in the data block at a location and a size identified in the given script entry into the packet buffer; and generates a modified data packet with the data in the packet buffer, wherein copying ( 4 ) the data in the data block at the location and the size identified in the given script entry into the packet buffer, the control module: determines whether the given script entry is a first script entry for the modified data packet; and in response to determining that the given script entry is the first script entry for the modified data packet, reserves the packet buffer for the modified data packet; copies the data in the data block at a block location and with a block length identified in the given script entry into the packet buffer; determines whether the given script entry is a last script entry for the modified data packet; and in response to determining that the given script entry is not the last script entry for the modified data packet, performs, for the next given script entry of the packet editing script, the copying of the data in the data block at the block location and with the block length identified in the given script entry into the packet buffer and the determining whether the given script entry is a last script entry for the modified data packet for the next given script entry of the packet editing script. 12. The system of claim 8 wherein in generating the modified data packet with the data in the packet buffer, the control module: in response to determining that the given script entry is the last script entry for the modified data packet, generates the modified data packet with the data in the packet buffer.