Module io

Source

Structs§

IoVec
Analogous to libc::iovec.
IoVecReader
A reader which reads data from IoVec buffers of plugin memory.
IoVecWriter
A writer which writes data to IoVec buffers of plugin memory.
MsgHdr
Analogous to libc::msghdr.

Functions§

read_cstring_vec
Read an array of strings, each of which with max length linux_api::limits::ARG_MAX. e.g. suitable for execve’s argument and environment string lists.
read_iovecs
Read a plugin’s array of libc::iovec into a Vec<IoVec>.
read_msghdr
Read a plugin’s libc::msghdr into a MsgHdr.
read_sockaddr
update_msghdr
Used to update a libc::msghdr. Only writes the libc::msghdr msg_namelen, msg_controllen, and msg_flags fields, which are the only fields that can be changed by recvmsg().
write_partial
Writes val to val_ptr, but will only write a partial value if val_len_bytes is smaller than the size of val. Returns the number of bytes written.
write_sockaddr
Writes the socket address into a buffer at plugin_addr with length plugin_addr_len.
write_sockaddr_and_len
Writes the socket address into a buffer at plugin_addr with length plugin_addr_len, and writes the socket address length into plugin_addr_len.