#include "common.h"
Go to the source code of this file.
Functions | |
| iovec * | iov_alloc_n (size_t n) |
| Allocates an array of "struct iov" elements. | |
| iovec | iov_get (gpointer base, size_t size) |
| void | iov_reset_n (struct iovec *iov, size_t n) |
| Resets an array of "struct iov" elements, so that iov_base is NULL and iov_len is 0 for each element. | |
| size_t | iov_init_from_string_vector (struct iovec *iov, size_t iov_cnt, gchar *argv[], size_t argc) |
| Initializes the elements of an struct iovec array from an array of strings. | |
| gboolean | iov_is_contiguous (const struct iovec *const a, const struct iovec *const b) |
| Checks whether two given struct iovec point to contiguous memory. | |
| size_t | iov_contiguous_size (const struct iovec *iov, size_t iov_cnt) |
| Returns the size of contiguous memory buffers. | |
| void | iov_clear (struct iovec *iov, size_t byte_offset) |
| Clear all bytes in the buffer starting at the given offset. | |
| size_t | iov_calculate_size (struct iovec *iov, size_t iov_cnt) |
| Calculates the cumulative size of the memory buffers. | |
| size_t | iov_scatter_string (struct iovec *iov, size_t iov_cnt, const gchar *s) |
| Scatters a NUL-terminated string over an array of struct iovec buffers. | |
|
|
Allocates an array of "struct iov" elements.
|
|
||||||||||||
|
Calculates the cumulative size of the memory buffers. This uses saturation arithmetic, so the returned value can never overflow.
|
|
||||||||||||
|
Clear all bytes in the buffer starting at the given offset. If the offset is beyond iov->iov_len, nothing happens.
|
|
||||||||||||
|
Returns the size of contiguous memory buffers.
|
|
||||||||||||
|
|
|
||||||||||||||||||||
|
Initializes the elements of an struct iovec array from an array of strings. iov_len is set to string length plus one to include the trailing NUL.
|
|
||||||||||||
|
Checks whether two given struct iovec point to contiguous memory.
|
|
||||||||||||
|
Resets an array of "struct iov" elements, so that iov_base is NULL and iov_len is 0 for each element.
|
|
||||||||||||||||
|
Scatters a NUL-terminated string over an array of struct iovec buffers. The trailing buffer space is zero-filled. If the string is too long, it is truncated, so that there is a terminating NUL in any case, except if the buffer space is zero.
|
1.3.9.1