addrinfo

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This structure is used by the getaddrinfo function 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 getaddrinfo function. 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_addr member.
  • ai_canonname
    Canonical name for the host.
  • ai_addr
    Pointer to a sockaddr structure.
  • ai_ next
    Pointer to the next structure in a linked list. The last addrinfo structure 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

See Also

Reference

getaddrinfo
sockaddr