To prevent overflows during the packet
saving step, the system should have a limit on the number
of packets that can be saved at the same time on the Mulle’s
packet queues, defining two types of limits: an outgoing limit
for Confirmable Messages (COM) and an incoming limit
for the received messages. One of the powerful features of
CoAP is the packet-retransmission of Confirmable Packets
(see section III-B), but this could create problems on the
receiver because it might store the same packet more than
one time. To prevent multiple allocations in memory of the
same data the system has to check (only) the previous packet
ID and save it only if this ID is not already in memory (it
is very important do this step exactly when an incoming
message is received, not when the content of the packet is
analyzed).