Skip to main content

gethostbyname

Function gethostbyname 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn gethostbyname( name: *const c_char, ) -> *mut hostent
👎Deprecated
Expand description

See https://pubs.opengroup.org/onlinepubs/009696799/functions/gethostbyaddr.html. Resolve host information by name or IP address.

§Arguments

  • name - Host name or IP address.

§Safety

name must be a valid string. This function is not reentrant and may modify static data.

§Panics

Panics if name is a null pointer.

§Deprecation

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