Struct:addrinfo

Jump to: navigation, search
#include trsocket.h
 
struct addrinfo
{
    int                 ai_flags;
    int                 ai_family;
    int                 ai_socktype;
    int                 ai_protocol;
    unsigned int        ai_addrlen;
    char *              ai_canonname;
    struct sockaddr *   ai_addr;
    struct addrinfo *   ai_next;
};

Structure Description

Structure used to return address information for a hostname to a user by getaddrinfo, and used by a user to specify what sort of addresses should be returned by getaddrinfo. Also used internally to store a series of mail host (MX) records on the cache entry.


Members

  • ai_flags
    AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST
  • ai_family
    Protocol family (PF_INET or PF_INET6)
  • ai_socktype
    Not used.
  • ai_protocol
    Not used.
  • ai_addrlen
    length of ai_addr
  • ai_canonname
    canonical name for nodename
  • ai_addr
    binary address
  • ai_next
    next structure in linked list