Skip to main content

gethostbyaddr

Function gethostbyaddr 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn gethostbyaddr( v: *const c_void, length: socklen_t, format: c_int, ) -> *mut hostent
👎Deprecated
Expand description

See https://pubs.opengroup.org/onlinepubs/009696799/functions/gethostbyaddr.html. Resolve a host name from a given network address.

§Arguments

  • v - Address to resolve as a non-null in_addr
  • length -
  • format - AF_INET or AF_INET6

§Safety

  • v must be a valid pointer.
  • length must correctly match the size of v as expected by format (usually 4 or 16).
  • This function is not reentrant and may modify static data.

§Panics

Panics if v is a null pointer.

§Deprecation

Deprecated as of POSIX.1-2001 and removed in POSIX.1-2008. New code should use getaddrinfo instead.