摘要 |
Embodiments of the apparatus for modifying packet headers relate to a packet generalization scheme that maintains information across protocol layers of packets. The packet generalization scheme uses a protocol table that includes layer information for all possible protocol layer combinations. The protocol layer combinations in the protocol table are manually configured through software. Each protocol layer combination in the protocol table is uniquely identified by a PktID. A rewrite engine of a network device receives the PktID for a packet and uses that unique identifier as 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. The packet generalization scheme eliminates the need for a parser engine of the network device to pass parsed data to the rewrite engine, which is resource intensive. |