Partager via


addrinfo (Windows Embedded CE 6.0)

1/6/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

See Also

Reference

Winsock Structures
getaddrinfo
sockaddr