getaddrinfo- все статьи тега ➜ страница 0


getaddrinfo и IPv6

Я пытаюсь понять, что возвращает функция getaddrinfo: #include <stdlib.h> #include <sys/types.h> #include <unistd.h> #include <sys/socket.h> #include <netdb.h> int main (int argc, char *argv[]) { struct addrinfo *res = 0 ; getaddrinfo("localhost", NULL ,NULL,&res); printf("ai_flags -> %in", res->ai_flags) ; printf("ai_family -> %in", res->ai_family) ; printf("ai_socktype -> %in", res->ai_socktype) ; printf("ai_protocol -> ...