1. A network switch comprising: an input port for receiving packets; a packet generalization scheme that maintains information across a plurality of combination of protocol layers of headers of packets, wherein the information is maintained in a protocol table stored in a memory of the network switch, and further wherein each of the protocol layer combinations is associated with a different unique identifier and the information is indexed within the protocol table according to the unique identifiers; a rewrite engine that uses the unique identifier of a packet of the packets as a key to the protocol table to access the information for each protocol layer of the protocol layer combination of the header of the packet that the rewrite engine requires during modification of the packet, wherein the rewrite engine expands one or more of the protocol layers based on the information associated with the protocol layer within the protocol table, wherein the expanding includes identifying fields of each of the one or more of the protocol layers; and an output port for outputting the packets.