struct addrinfo { int ai_flags; // ai_passive, ai_canonname, etc. int ai_family; // af_inet, af_inet6, af_unspec int ai_socktype; // sock_stream, sock_dgram int ai_protocol; // use 0 for "any" size_t ai_addrlen; // size of ai_addr in bytes struct sockaddr *ai_addr; // struct sockaddr_in or _in6 char *ai_canonname; // full canonical hostname struct addrinfo *ai_next; // linked list, next node }; Links Byte Order