mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-01-16 22:31:42 +01:00
Implement two new functions to report the total data stored accross the whole buffer and the data stored at a specific offset until the next gap or the buffer end. To facilitate implementation of these new functions and also future add/delete operations, a new abstraction is introduced : ncb_blk. This structure represents a block of either data or gap in the buffer. It simplifies operation when moving forward in the buffer. The first buffer block can be retrieved via ncb_blk_first(buf). The block at a specific offset is accessed via ncb_blk_find(buf, off). This abstraction is purely used in functions but not stored in the ncbuf structure per-se. This is necessary to keep the minimal memory footprint.