A method and apparatus for reassembling packets using a limited number of
reassembly contexts is presented. Upon receipt of a first cell of a
packet corresponding to a selected source, a reassembly context is
allocated to the selected source. The reassembly context is allocated
from a limited set of reassembly contexts. The first cell is then stored
in a buffer and the reassembly context is updated to reflect the storage
of the first cell in the buffer. As subsequent cells of the packet are
received they are stored in the buffer and the reassembly context is
updated to reflect the storage of each of these subsequent cells. When an
end of message cell is received for the packet that indicates the end of
the packet, reassembly of the packet within the buffer is completed to
produce a reassembled packet. The reassembled packet is then queued for
transmission to a destination, and the reassembly context is deallocated
such that is can be used for reassembly of a subsequently received
packet.