sys_getpeername

Function sys_getpeername 

Source
pub fn sys_getpeername(
    abi: &mut LinuxRiscv64Abi,
    trapframe: &mut Trapframe,
) -> usize
Expand description

Linux sys_getpeername implementation

Gets the address of the peer connected to the socket.

Arguments:

  • arg0: sockfd (socket file descriptor)
  • arg1: addr (pointer to socket address structure)
  • arg2: addrlen (pointer to size of address structure)

Returns:

  • 0 on success
  • usize::MAX (Linux -1) indicating failure