Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
A version of this page is also available for
4/8/2010
This structure is used by the getaddrinfofunction to hold host address information.
Syntax
struct addrinfo { int ai_flags; int ai_family; int ai_socktype; int ai_protocol; size_t ai_addrlen; char* ai_canonname; struct sockaddr* ai_addr; struct addrinfo* ai_next; }; |
Members
- ai_flags
-
Flags that indicate options used in the getaddrinfofunction. See AI_PASSIVE, AI_CANONNAME, and AI_NUMERICHOST.
- ai_family
-
Protocol family, such as PF_INET.
- ai_socktype
-
Socket type, such as SOCK_RAW, SOCK_STREAM, or SOCK_DGRAM.
- ai_protocol
-
Protocol, such as IPPROTO_TCP or IPPROTO_UDP. For protocols other than IPv4 and IPv6, set this value to zero.
- ai_addrlen
-
Length of the ai_addrmember.
- ai_canonname
-
Canonical name for the host.
- ai_addr
-
Pointer to a sockaddrstructure.
- ai_ next
-
Pointer to the next structure in a linked list. The last addrinfostructure of a linked list sets this value to NULL.
Requirements
Header | ws2tcpip.h |
Windows Embedded CE | Windows CE .NET 4.1 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |