Lines Matching refs:addr
216 let addr = regs.r9 as usize; in sys_connect() localVariable
218 return do_connect(fd, addr as *const SockAddr, addrlen) in sys_connect()
230 pub fn do_connect(fd: usize, addr: *const SockAddr, addrlen: usize) -> Result<i64, SystemError> { in do_connect()
231 let endpoint: Endpoint = SockAddr::to_endpoint(addr, addrlen)?; in do_connect()
244 let addr = regs.r9 as usize; in sys_bind() localVariable
246 return do_bind(fd, addr as *const SockAddr, addrlen) in sys_bind()
258 pub fn do_bind(fd: usize, addr: *const SockAddr, addrlen: usize) -> Result<i64, SystemError> { in do_bind()
259 let endpoint: Endpoint = SockAddr::to_endpoint(addr, addrlen)?; in do_bind()
274 let addr = regs.r12 as usize; in sys_sendto() localVariable
281 addr as *const SockAddr, in sys_sendto()
303 addr: *const SockAddr, in do_sendto()
310 let endpoint = if addr.is_null() { in do_sendto()
313 Some(SockAddr::to_endpoint(addr, addrlen)?) in do_sendto()
329 let addr = regs.r12 as usize; in sys_recvfrom() localVariable
336 addr as *mut SockAddr, in sys_recvfrom()
358 addr: *mut SockAddr, in do_recvfrom()
385 if !addr.is_null() { in do_recvfrom()
388 sockaddr_in.write_to_user(addr, addrlen)?; in do_recvfrom()
493 let addr = regs.r9 as usize; in sys_accept() localVariable
495 return do_accept(fd, addr as *mut SockAddr, addrlen as *mut u32) in sys_accept()
507 pub fn do_accept(fd: usize, addr: *mut SockAddr, addrlen: *mut u32) -> Result<i64, SystemError> { in do_accept()
522 if !addr.is_null() { in do_accept()
527 sockaddr_in.write_to_user(addr, addrlen)?; in do_accept()
536 let addr = regs.r9 as usize; in sys_getsockname() localVariable
538 return do_getsockname(fd, addr as *mut SockAddr, addrlen as *mut u32) in sys_getsockname()
555 addr: *mut SockAddr, in do_getsockname()
558 if addr.is_null() { in do_getsockname()
570 sockaddr_in.write_to_user(addr, addrlen)?; in do_getsockname()
578 let addr = regs.r9 as usize; in sys_getpeername() localVariable
580 return do_getpeername(fd, addr as *mut SockAddr, addrlen as *mut u32) in sys_getpeername()
594 addr: *mut SockAddr, in do_getpeername()
597 if addr.is_null() { in do_getpeername()
610 sockaddr_in.write_to_user(addr, addrlen)?; in do_getpeername()
673 pub fn to_endpoint(addr: *const SockAddr, len: usize) -> Result<Endpoint, SystemError> { in to_endpoint()
676 addr as usize as u64, in to_endpoint()
684 let addr = unsafe { addr.as_ref() }.ok_or(SystemError::EFAULT)?; in to_endpoint() localVariable
685 if len < addr.len()? { in to_endpoint()
689 match AddressFamily::try_from(addr.family)? { in to_endpoint()
691 let addr_in: SockAddrIn = addr.addr_in; in to_endpoint()
739 addr: *mut SockAddr, in write_to_user()
743 if addr.is_null() || addr_len.is_null() { in write_to_user()
748 addr as usize as u64, in write_to_user()
757 let buf = core::slice::from_raw_parts_mut(addr as *mut u8, to_write); in write_to_user()
783 match ip_endpoint.addr { in from()