mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
Random IP addresses in the full range. There is no extra workload to check the effectiveness '::' optimization for a set of 0-oct sets (although it would be a possible workload). Reviewed-by: DJ Delorie <dj@redhat.com>
11 lines
294 B
C
11 lines
294 B
C
#include <arpa/inet.h>
|
|
#include <stdint.h>
|
|
|
|
static void
|
|
inet_ntop_ipv6 (uint32_t addr1, uint32_t addr2, uint32_t addr3, uint32_t addr4)
|
|
{
|
|
struct in6_addr saddr = { .s6_addr32 = { addr1, addr2, addr3, addr4 } };
|
|
char dst[INET6_ADDRSTRLEN];
|
|
inet_ntop (AF_INET6, &saddr, dst, sizeof dst);
|
|
}
|