Produced by OmniGraffle 7.7.1 2018-07-04 12:39:41 +0000 rbuf Layer 1 rbuf, rdata rbuf header rmsg (counts derived rdatas still to be delivered) chunk hdr (this level of gray: packed with more receiver state, sampleinfo, rdata, &c.) chunk hdr lastchunk chunk hdr raw packet ddsi receiver state ddsi receiver state sampleinfo rdata rdata fragchain sample.defrag (free space) defrag_iv interval tree defrag admin tree (seq no) data ref: offset+length relative to rmsg rbuf header rdata sampleinfo fixed size reorder admin sample chain sample.reorder interval tree (seq no) last chunk as small as possible fixed size chunks; larger than max packet size (leftover space) (next packet goes here) large enough for storing & processing a largish number of packets rmsg (counts refs by rdata) chunk hdr lastchunk sample chain sampleinfo rdata A receive thread has a pool of receive buffers, rbuf s, each large enough to contain several network packets and derived administrative data. Before requesting a packet from the kernel, a receive thread allocates an rmsg from the buffer, which is the administrative entity representing a raw packet along with additional derived data. During processing the packet, an rdata is created for each Data/DataFrag submessage. These rdata entries contain a reference to the rmsg and a byte range within the packet at which the serialized payload is stored. For each sample (i.e., sequence number), a sampleinfo containing various metadata on the sample is allocated. The sampleinfo includes a reference to the receiver state as described in the DDSI specification, which contains, a.o., time stamps and source addresses. For fragmented data, rdata are chained together into a fragchain , using interval tree pointed to by a sample.defrag . Completed samples that have been received out of order are linked into chains of consecutive samples, with the sample chains organized into an interval tree using sample.reorder . Once a sample has been delivered, the reference count of the rmsg s pointed to by its fragchain are decremented, eventually freeing the original network packets and recovering space in the rbuf s. Note: there is no conceptual difference between light grey arrows and black arrows: it is merely to reduce visual clutter