A method and apparatus for merging a plurality of virtual connections to
form a merged virtual connection is presented. As cells for each of the
plurality of virtual connections are received, they are buffered into a
corresponding plurality of cell buffers, where each virtual connection
has a corresponding cell buffer. When enough cells to constitute a
complete packet are buffered for a particular virtual connection in its
corresponding cell buffer, the identity of that virtual connection is
queued into a queue, which may take the form of a linked list. A
plurality of linked lists may be included such that differentiation
between various virtual connections based on class is possible, where the
class division may be based on a number of different factors.
Prioritization information for the merged virtual connection is then
obtained, where in the case where a plurality of classes are supported,
the prioritization information includes class prioritization information.
A cell stream for the merged virtual circuit is then generated based on
the prioritization information and the virtual connection identities
currently stored in the queue structure. The cell stream is generated
such that entire packets are included in the cell stream in a continuous
manner and no intermingling of cells corresponding to different packets
occurs.