Patent ID: 8514744

Claim:
A method comprising: identifying, by a device and based on a header of a data unit, a plurality of next hops associated with the data unit; obtaining, by the device and from a first data structure of the device, references to information identifying the plurality of next hops, the information identifying the plurality of next hops being stored in a second data structure of the device, the information identifying the plurality of next hops, stored in the second data structure, identifying a plurality of actions to be performed on the data unit; rewriting, by the device, one or more portions of the header of the data unit to include the obtained references to the information identifying the plurality of next hops; and forwarding, by the device and based on the obtained references to the information identifying the plurality of next hops, the data unit towards one or more destinations, after rewriting the one or more portions of the header of the data unit.