NAME
siovec.h - manipulating struct iovec
SYNOPSIS
#include <limb/siovec.h>
DESCRIPTION
The header defines the needed functions to manipulate vectors (i.e. struct iovec
) containing range of bytes in similar manner as byte arrays.
This header is a complement to skalibs' own header, intended to be used as a "replacement". However, instead of re-inventing the wheel, it depends/includes skalibs' header, and some of the functions below are actually implemented in skalibs, or macros to such functions.
Functions
The following functions/macros are defined :
Similar to byte_chr(3) but for vectors.
Similar to byte_in(3) but for vectors.
Copy the data from an array of vectors into another. Think memcpy(3) for vectors.
Gather data in an array of vectors to the given memory location.
Similar to siov_gather(3) but ensures the data gathered is NUL-terminated.
Return the length of data in an array of vectors.
Compare data in an array of vectors with a byte array.
Return the byte at a given offset in an array of vectors.
Scatter data from a byte array into an array of vectors.
Search for a byte array inside an array of vectors.
Seek into an array of vectors. Think s += len
for vectors.
Similar to siov_bytechr(3) but from an offset.
Similar to siov_bytein(3) but from an offset.
Similar to siov_gather(3) but from an offset.
Similar to siov_gather0(3) but from an offset.
Truncate an array of vectors.