pub fn sys_socket_bind(tf: &mut Trapframe) -> usizeExpand description
System call: Bind socket to a path
Binds a socket to a named path in the socket namespace. This allows other processes to connect to this socket by name.
§Arguments (via trapframe)
a0: Socket handle IDa1: Pointer to path string (null-terminated)a2: Length of path string (excluding null terminator)
§Returns
0 on success, usize::MAX (-1) on error
§Errors
Returns usize::MAX (-1) if:
- Invalid handle ID
- Invalid path pointer or length
- Path already in use
- Socket already bound