ADDRINFOTOTEXT(3)                                            ADDRINFOTOTEXT(3)



NAME
       addrinfototext - present the contents of a struct addrinfo as a string

SYNOPSIS
       #include <easyv6.h>

       char *addrinfototext(const struct addrinfo *address,
                            char *buf, size_t bytes);

DESCRIPTION
       Return the IP address of the first addrinfo structure as a text string.

       If buf is NULL, malloc() enough memory to hold the text address.

RETURN VALUE
       On success, return a 0 terminated string containing a textual represen-
       tation of the IPv4, IPv6 or future protocol address.  On error,  return
       NULL.

EXAMPLE
       See connectbyname (3) for an example.

SEE ALSO
       connectbyaddrinfo(3),       connectbyname(3),       getpeernametext(3),
       listenbyname(3), timeoutgetaddrinfo(3),

AUTHOR
       libeasyv6 was written by William Herrin <bill@herrin.us>.



                                March 18, 2012               ADDRINFOTOTEXT(3)
