NAME
ip6 - IP V6 address support
SYNOPSIS
#include <ip6.h> char* fmtip6(unsigned char* addr, int bits); int strtoip6(const char* str, char** end, unsigned char* addr, unsigned char* bits);
DESCRIPTION
$1$2fmtip6()fmtip6()fmtip6()fmtip6()fmtip6()fmtip6()fmtip6()fmtip6() formats the IPV6 address $1$2addraddraddraddraddraddraddraddr with optional prefix bits $1$2bitsbitsbitsbitsbitsbitsbitsbits (0 if not a prefix) into a thread-specific 0-terminated temporary buffer and returns a pointer to the formatted value.
$1$2strtoip6()strtoip6()strtoip6()strtoip6()strtoip6()strtoip6()strtoip6()strtoip6() converts a formatted IPV6 address from the 0-terminated string $1$2strstrstrstrstrstrstrstr into a host order IPV6 address in $1$2addraddraddraddraddraddraddraddr which must be a buffer of at least $1$2IP6ADDRIP6ADDRIP6ADDRIP6ADDRIP6ADDRIP6ADDRIP6ADDRIP6ADDR bytes. If $1$2bitsbitsbitsbitsbitsbitsbitsbits is not 0 then an optional /bits (prefix size in bits) is parsed and $1$2*bits*bits*bits*bits*bits*bits*bits*bits is set to the number of prefix bits. If $1$2endendendendendendendend is not 0 then $1$2*end*end*end*end*end*end*end*end will point to the first unparsed character in $1$2strstrstrstrstrstrstrstr on return. 0 is returned on success, -1 on failure.
SEE ALSO
dss(1)