Provides linked-list scatter / gather IO.
More...
Provides linked-list scatter / gather IO.
|
| file | iolist.h |
| | iolist scatter / gather IO
|
| |
◆ iolist_count()
| unsigned iolist_count |
( |
const iolist_t * |
iolist | ) |
|
Count number of entries in an iolist_t.
- Parameters
-
| [in] | iolist | iolist to count |
- Returns
- number of entries (zero for NULL parameter)
◆ iolist_size()
| size_t iolist_size |
( |
const iolist_t * |
iolist | ) |
|
Sum up number of bytes in iolist.
This function returns the summed ip length values of all entries in iolist.
- Parameters
-
| [in] | iolist | iolist to sum up |
- Returns
- summed up number of bytes or zero if
iolist == NULL
◆ iolist_to_buffer()
| ssize_t iolist_to_buffer |
( |
const iolist_t * |
iolist, |
|
|
void * |
dst, |
|
|
size_t |
len |
|
) |
| |
Copies the bytes of the iolist to a buffer.
- Parameters
-
| [in] | iolist | iolist to read from |
| [out] | dst | Destination buffer |
| [in] | len | Size of the destination buffer |
- Returns
- iolist_size(iolist) on success -ENOBUFS if the buffer is too small
◆ iolist_to_iovec()
| size_t iolist_to_iovec |
( |
const iolist_t * |
iolist, |
|
|
struct iovec * |
iov, |
|
|
unsigned * |
count |
|
) |
| |
Create struct iovec from iolist.
This function fills an array of struct iovecs with the contents of iolist. It will write the number of used array entries into count.
The caller must ensure that iov p points to an array of size >= count!
- Parameters
-
| [in] | iolist | iolist to read from |
| [out] | iov | ptr to array of struct iovec that will be filled |
| [out] | count | number of elements in iolist |
- Returns
- iolist_size(iolist)