Function pack_mhdr_to_receive

Source
unsafe fn pack_mhdr_to_receive<S>(
    iov_buffer: *mut IoSliceMut<'_>,
    iov_buffer_len: usize,
    cmsg_buffer: *mut u8,
    cmsg_capacity: usize,
    address: *mut S,
) -> msghdr
where S: SockaddrLike,
Expand description

Pack pointers to various structures into into msghdr

ยงSafety

iov_buffer and iov_buffer_len must point to a slice of IoSliceMut and number of available elements or be a null pointer and 0

cmsg_buffer and cmsg_capacity must point to a byte buffer used to store control headers later or be a null pointer and 0 if control headers are not used

Buffers must remain valid for the whole lifetime of msghdr