Patent ID: 7801136

Claim:
A computer implemented method performed in a first node for multi-casting a packet, the method comprising: receiving a first packet having a label stack including a plurality of labels compatible with MPLS (multi-protocol label switching), wherein the label stack is formed in a hierarchical structure based on levels of the label stack, including arranging substantially all nodes involved in a plurality of label switch paths (LSPs) into an array according to the hierarchical structure, from root to bottom and from left to right, and encoding the hierarchical structure into an offset based level order sequential representation (LOSR), wherein a pointer from a parent node to a child node is encoded as an offset representing a number of elements between the parent node and the child node; duplicating by a processor the first packet into a second packet as a function of contents of a topmost label of the label stack; forming by the processor a third packet by removing at least two labels from the top of the label stack of the second packet; and transmitting by the processor the first and third packets to different destination nodes as a function of respective contents of the topmost labels of the first and third packets.