getipnodebyname(3) Library Functions Manual getipnodebyname(3) getipnodebyname, getipnodebyaddr, freehostent - LIBRARY Standard C library (libc, -lc) #include #include #include [[deprecated]] struct hostent *getipnodebyname(const char *name, int af, int flags, int *error_num); [[deprecated]] struct hostent *getipnodebyaddr(const void addr[.len], size_t len, int af, int *error_num); [[deprecated]] void freehostent(struct hostent *ip); ( glibc). getaddrinfo(3) getnameinfo(3). getipnodebyname() getipnodebyaddr() . : struct hostent { char *h_name; char **h_aliases; int h_addrtype; int h_length; char **h_addr_list; }; gethostbyname(3) gethostbyaddr(3), IPv4. getipnodebyname() getipnodebyaddr() . gethostby . freehostent() , hostent . getipnodebyname() getipnodebyname() , name. af : AF_INET name IPv4 IPv4. AF_INET6 name IPv6 IPv6. flags . (OR). , flags . AI_V4MAPPED AF_INET6 IPv4 IPv6; IPv4 IPv6. AI_ALL AI_V4MAPPED IPv4 IPv6. IPv4 IPv6. AI_ADDRCONFIG AF_INET6 , IPv6 , IPv6, , , IPv4 , IPv4, . AI_V4MAPPED. AI_DEFAULT (AI_ADDRCONFIG | AI_V4MAPPED). getipnodebyaddr() getipnodebyaddr() , addr. af : AF_INET addr struct in_addr len sizeof(struct in_addr). AF_INET6 addr struct in6_addr len sizeof(struct in6_addr). NULL, error_num : HOST_NOT_FOUND . NO_ADDRESS , . , IPv4, IPv6, . NO_RECOVERY . TRY_AGAIN . , . hostent, : h_name . h_aliases . null. h_addrtype af getipnodebyname() getipnodebyaddr(). h_addrtype AF_INET, af AF_INET. h_addrtype AF_INET6, af AF_INET6. h_length sizeof(struct in_addr), h_addrtype AF_INET, sizeof(struct in6_addr), h_addrtype AF_INET6. h_addr_list . null. None. RFC 2553. Present in glibc 2.1.91-95, but removed again. Several UNIX-like systems support them, but all call them deprecated. . getaddrinfo(3), getnameinfo(3), inet_ntop(3), inet_pton(3) Azamat Hackimov , Dmitry Bolkhovskikh , Vladislav , Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . getipnodebyname(3)