pub fn sys_socket_sendto(tf: &mut Trapframe) -> usizeExpand description
System call: Send datagram to specified address
Sends a datagram to a specific address. Used for UDP and Local datagram sockets.
§Arguments (via trapframe)
a0: Socket handle IDa1: Pointer to data buffera2: Data lengtha3: Pointer to SocketAddress structure (destination address)
§Returns
Number of bytes sent on success, usize::MAX (-1) on error
§Errors
Returns usize::MAX (-1) if:
- Invalid handle ID
- Invalid buffer pointer
- Invalid address
- Socket error