sys_connect

Function sys_connect 

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

Linux sys_connect implementation (mock)

Connects a socket to an address. This is a mock implementation that always succeeds to allow applications to proceed.

Arguments:

  • abi: LinuxRiscv64Abi context
  • trapframe: Trapframe containing syscall arguments
    • arg0: sockfd (socket file descriptor)
    • arg1: addr (pointer to socket address structure)
    • arg2: addrlen (size of address structure)

Returns:

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