limb 0.2.0

2024-01-09

siovec.h(0)
limb manual
siovec.h(0)

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.

skalibs

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 :

siov_bytechr(3)

Similar to byte_chr(3) but for vectors.

siov_bytein(3)

Similar to byte_in(3) but for vectors.

siov_deal(3)

Copy the data from an array of vectors into another. Think memcpy(3) for vectors.

siov_gather(3)

Gather data in an array of vectors to the given memory location.

siov_gather0(3)

Similar to siov_gather(3) but ensures the data gathered is NUL-terminated.

siov_len(3)

Return the length of data in an array of vectors.

siov_memcmp(3)

Compare data in an array of vectors with a byte array.

siov_off(3)

Return the byte at a given offset in an array of vectors.

siov_scatter(3)

Scatter data from a byte array into an array of vectors.

siov_search(3)

Search for a byte array inside an array of vectors.

siov_seek(3)

Seek into an array of vectors. Think s += len for vectors.

siov_seek_bytechr(3)

Similar to siov_bytechr(3) but from an offset.

siov_seek_bytein(3)

Similar to siov_bytein(3) but from an offset.

siov_seek_gather(3)

Similar to siov_gather(3) but from an offset.

siov_seek_gather0(3)

Similar to siov_gather0(3) but from an offset.

siov_trunc(3)

Truncate an array of vectors.

limb 0.1.0
2023-07-24
siovec.h(0)