Patent ID: 7898985

Claim:
A method, comprising: constructing a first composite next hop that comprises a plurality of next hops used for forwarding data units towards one or more network destinations, where each of the plurality of next hops represents an action to be taken on a first data unit as the first data unit transits a network device or represents another composite next hop, and where the first composite next hop specifies a first function to be performed on the plurality of next hops; storing a reference to the first composite next hop in one of multiple entries of a forwarding table; storing next hop addresses in other entries of the multiple entries of the forwarding table; receiving a second data unit; and using the forwarding table to forward the second data unit towards the one or more network destinations based on the first composite next hop or one of the next hop addresses, where the using the forwarding table to forward the second data unit comprises: retrieving the reference to the first composite next hop from the forwarding table, based on the second data unit, and using the retrieved reference to retrieve the first composite next hop and to perform the first function on the plurality of next hops when processing the second data unit for forwarding towards the one or more network destinations, where the first function comprises creating multiple copies of the second data unit and performing an action associated with one or more of the plurality of next hops on the multiple copies.