Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   getaddrinfo    ( 3 )

сетевой адрес и перевод услуг (network address and service translation)

  Name  |    Synopsis    |  Description  |  Return value  |  Files  |  Attributes  |  Conforming to  |  Note  |  Examples  |  See also  |

Синопсис (Synopsis)

#include <sys/types.h> #include <sys/socket.h> #include <netdb.h>

int getaddrinfo(const char *restrict node, const char *restrict service, const struct addrinfo *restrict hints, struct addrinfo **restrict res);

void freeaddrinfo(struct addrinfo *res);

const char *gai_strerror(int errcode);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getaddrinfo(), freeaddrinfo(), gai_strerror(): Since glibc 2.22: _POSIX_C_SOURCE >= 200112L Glibc 2.21 and earlier: _POSIX_C_SOURCE