1. A network switch comprising: a packet generalization scheme that maintains information across protocol layers of packets, wherein the information is maintained in a protocol table stored in a memory of the network switch; and a rewrite engine that uses a unique identifier of a packet as a key to the protocol table to access information for each protocol layer of the packet that the rewrite engine requires during modification of the packet.