2 * Copyright (c) 2013 Proofpoint, Inc. and its suppliers.
5 * By using this file, you agree to the terms and conditions set
6 * forth in the LICENSE file which can be found at the top level of
7 * the sendmail distribution.
12 SM_RCSID("@(#)$Id: inet6_ntop.c,v 1.2 2013-11-22 20:51:43 ca Exp $")
16 # include <sm/types.h>
18 # include <sm/string.h>
19 # include <netinet/in.h>
22 ** SM_INET6_NTOP -- convert IPv6 address to ASCII string (uncompressed)
25 ** ipv6 -- IPv6 address
26 ** dst -- ASCII representation of address (output)
27 ** len -- length of dst
34 sm_inet6_ntop(ipv6, dst, len)
42 u16 = (SM_UINT16 *)ipv6;
43 r = sm_snprintf(dst, len,
44 "%x:%x:%x:%x:%x:%x:%x:%x"