Lines Matching refs:addr
167 pub fn connect(fd: usize, addr: *const SockAddr, addrlen: usize) -> Result<usize, SystemError> { in connect()
168 let endpoint: Endpoint = SockAddr::to_endpoint(addr, addrlen)?; in connect()
185 pub fn bind(fd: usize, addr: *const SockAddr, addrlen: usize) -> Result<usize, SystemError> { in bind()
186 let endpoint: Endpoint = SockAddr::to_endpoint(addr, addrlen)?; in bind()
208 addr: *const SockAddr, in sendto()
211 let endpoint = if addr.is_null() { in sendto()
214 Some(SockAddr::to_endpoint(addr, addrlen)?) in sendto()
237 addr: *mut SockAddr, in recvfrom()
251 if !addr.is_null() { in recvfrom()
254 sockaddr_in.write_to_user(addr, addrlen)?; in recvfrom()
330 pub fn accept(fd: usize, addr: *mut SockAddr, addrlen: *mut u32) -> Result<usize, SystemError> { in accept()
345 if !addr.is_null() { in accept()
350 sockaddr_in.write_to_user(addr, addrlen)?; in accept()
368 addr: *mut SockAddr, in getsockname()
371 if addr.is_null() { in getsockname()
383 sockaddr_in.write_to_user(addr, addrlen)?; in getsockname()
397 addr: *mut SockAddr, in getpeername()
400 if addr.is_null() { in getpeername()
413 sockaddr_in.write_to_user(addr, addrlen)?; in getpeername()
477 pub fn to_endpoint(addr: *const SockAddr, len: usize) -> Result<Endpoint, SystemError> { in to_endpoint()
480 addr as usize as u64, in to_endpoint()
488 let addr = unsafe { addr.as_ref() }.ok_or(SystemError::EFAULT)?; in to_endpoint() localVariable
489 if len < addr.len()? { in to_endpoint()
493 match AddressFamily::try_from(addr.family)? { in to_endpoint()
495 let addr_in: SockAddrIn = addr.addr_in; in to_endpoint()
543 addr: *mut SockAddr, in write_to_user()
547 if addr.is_null() || addr_len.is_null() { in write_to_user()
552 addr as usize as u64, in write_to_user()
561 let buf = core::slice::from_raw_parts_mut(addr as *mut u8, to_write); in write_to_user()
587 match ip_endpoint.addr { in from()