9a9b5e1 UTIL: Add a generic iobuf module

4 files Authored by jhrozek 7 years ago, Committed by lslebodn 7 years ago,
    UTIL: Add a generic iobuf module
    
    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>
    
        
file modified
+22 -0
file added
+205
file added
+118