summaryrefslogtreecommitdiffstats
path: root/src/tests/cmocka/test_iobuf.c
Commit message (Collapse)AuthorAgeFilesLines
* UTIL: Add a generic iobuf moduleJakub Hrozek2017-03-141-0/+195
The KCM responder reads bytes and writes bytes from a buffer of bytes. Instead of letting the caller deal with low-level handling using the SAFEALIGN macros, this patch adds a new iobuf.c module with more high-level functions. The core is a iobuf struct that keeps track of the buffer, its total capacity and a current read or write position. There are helper function to read or write a generic buffer with a set length. Later, we will also add convenience functions to read C data types using the SAFEALIGN macros. Reviewed-by: Pavel Březina <pbrezina@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>