#Diagram demonstrating reading and returning an item in a byte buffer
#Buffer of 128 bytes, with 68 bytes occupied but wrapped. All data is read

packetdiag ring_buffer_read_ret_byte_buf {
    node_width = 6
    node_height = 24
    default_fontsize = 12
    colwidth = 128

    #Initial
    0-29: 30 [color = lightyellow];
    30-89: 60 Free
    90-127: 38 [color = lightyellow];

    #Read all continuous data
    128-157: 30 [color = lightyellow];
    158-217: 60 Free
    218-255: 38 [color = pink];

    #Return data
    256-285: 30 [color = lightyellow];
    286-383: 98 Free

    #Read remaining data
    384-413: 30 [color = pink];
    414-511: 98 Free

    #Return data
    512-639: 128 Free
}
