There are many places in the router's C codebase where we need to work with data spanning a chained qd_buffer_t list. In particular the low level operations such as:
- advance N bytes
- compare N bytes
- copy N bytes
are common throughout the code.
Similar logic is implemented in message.c and parse.c.
We should de-duplicate this code by providing a common implementation as part of the buffer handling code.