Current networks typically include devices, such as routers, switches or gateways, which transfer or switch data, such as packets, from one or more sources to one or more destinations. A packet is one format of data in which encapsulated data can be transmitted through a network based on control information that is stored in a header portion of the packet. A router is a switching device that can receive a packet and, based on the packet header, may forward the packet towards its final destination.
Existing routers include forwarding engines for receiving and forwarding incoming packets to their intended destinations. To forward incoming packets from an input port to an appropriate output port, routers may perform complex data manipulation actions on the packet header. Such data manipulation actions frequently result in the router rewriting a portion of the packet header before transmitting the packet to an appropriate output port of the router.