Lines Matching refs:addr

197     pub fn connect(fd: usize, addr: *const SockAddr, addrlen: usize) -> Result<usize, SystemError> {  in connect()
198 let endpoint: Endpoint = SockAddr::to_endpoint(addr, addrlen)?; in connect()
214 pub fn bind(fd: usize, addr: *const SockAddr, addrlen: usize) -> Result<usize, SystemError> { in bind()
215 let endpoint: Endpoint = SockAddr::to_endpoint(addr, addrlen)?; in bind()
237 addr: *const SockAddr, in sendto()
240 let endpoint = if addr.is_null() { in sendto()
243 Some(SockAddr::to_endpoint(addr, addrlen)?) in sendto()
266 addr: *mut SockAddr, in recvfrom()
280 if !addr.is_null() { in recvfrom()
283 sockaddr_in.write_to_user(addr, addrlen)?; in recvfrom()
359 pub fn accept(fd: usize, addr: *mut SockAddr, addrlen: *mut u32) -> Result<usize, SystemError> { in accept()
360 return Self::do_accept(fd, addr, addrlen, 0); in accept()
382 addr: *mut SockAddr, in accept4()
395 return Self::do_accept(fd, addr, addrlen, flags); in accept4()
400 addr: *mut SockAddr, in do_accept()
430 if !addr.is_null() { in do_accept()
435 sockaddr_in.write_to_user(addr, addrlen)?; in do_accept()
453 addr: *mut SockAddr, in getsockname()
456 if addr.is_null() { in getsockname()
468 sockaddr_in.write_to_user(addr, addrlen)?; in getsockname()
482 addr: *mut SockAddr, in getpeername()
485 if addr.is_null() { in getpeername()
498 sockaddr_in.write_to_user(addr, addrlen)?; in getpeername()
562 pub fn to_endpoint(addr: *const SockAddr, len: usize) -> Result<Endpoint, SystemError> { in to_endpoint()
564 VirtAddr::new(addr as usize), in to_endpoint()
569 let addr = unsafe { addr.as_ref() }.ok_or(SystemError::EFAULT)?; in to_endpoint() localVariable
571 match AddressFamily::try_from(addr.family)? { in to_endpoint()
573 if len < addr.len()? { in to_endpoint()
577 let addr_in: SockAddrIn = addr.addr_in; in to_endpoint()
587 let addr_un: SockAddrUn = addr.addr_un; in to_endpoint()
644 addr: *mut SockAddr, in write_to_user()
648 if addr.is_null() || addr_len.is_null() { in write_to_user()
654 VirtAddr::new(addr as usize), in write_to_user()
667 let buf = core::slice::from_raw_parts_mut(addr as *mut u8, to_write); in write_to_user()
693 match ip_endpoint.addr { in from()