XS-libcares

 view release on metacpan or  search on metacpan

c-ares-1.34.3/src/lib/inet_ntop.c  view on Meta::CPAN

 * author:
 *     Paul Vixie, 1996.
 */
static const char *inet_ntop6(const unsigned char *src, char *dst, size_t size)
{
  /*
   * Note that int32_t and int16_t need only be "at least" large enough
   * to contain a value of the specified size.  On some systems, like
   * Crays, there is no such thing as an integer variable with 16 bits.
   * Keep this in mind if you think this function should have been coded
   * to use pointer overlays.  All the world's not a VAX.
   */
  char  tmp[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
  char *tp;

  struct {
    ares_ssize_t base;
    size_t       len;
  } best, cur;

  unsigned int words[NS_IN6ADDRSZ / NS_INT16SZ];



( run in 0.823 second using v1.01-cache-2.11-cpan-3b35f9de6a3 )