shadow_rs::host::syscall::io

Function write_sockaddr

source
pub fn write_sockaddr(
    mem: &mut MemoryManager,
    addr: &SockaddrStorage,
    plugin_addr: ForeignPtr<u8>,
    plugin_addr_len: socklen_t,
) -> Result<socklen_t, Errno>
Expand description

Writes the socket address into a buffer at plugin_addr with length plugin_addr_len.

If the buffer length is smaller than the socket address length, the written address will be truncated. The length of the socket address is returned.