unsigned int ip6_fmt(char *s,char ip[16]);
unsigned int ip6_fmt_flat(char *s,char ip[16]);
unsigned int ip6_scan_flat(const char *s,char ip[16]);
unsigned int ip6_scan(const char *s,char ip[16]);
unsigned int ip6_scanbracket(const char *s,char ip[16]);
unsigned int ip6_ifscan(char *s,char ip[16],stralloc *ifname);
unsigned int ip6_cidr(char *s,char ip[16],unsigned long *plen);
unsigned int ip6_bytestring(stralloc *ip6string,char ip[16],int plen);
ip6_fmt_flat reads the char[16] IPv6 address and returns all hexadecimal IPv6 address labels as string fe80:0000:....:fefe.
ip6_scan reads a compactified IPv6 address string fe80::fefe and converts it to the char[16] IPv6 address.
ip6_scan_flat reads an uncompressed IPv6 address als hexadecimal string and returns it's char[16] IPv6 address.
ip6_scanbracket reads a compactified IPv6 address string enclosed in brackets [fe80::fefe] removes the brackets and calls ip6_scan on the result.
ip6_ifscan reads the compactified IPv6 address string appended with the interface_name fe80::fefe%eth0 returns ifname and calls ip6_scan for the (stripped) IPv6 address.
ip6_cidr reads the compactified CIDR IPv6 address string fe80::fefe/64 determines the prefix as integer plen and calls ip6_scan. If no prefix is identfied, it returns 128.
ip6_bytestring reads the IPv6 address given as char[16] while returning a 0-terminated 'bytestring' representation 1001001.... up to the given prefix length plen.
The macro ipv6_v4mapped reads the IPv6 addresses given as char[16] and returns 0 in case the given IPv6 address is not a IPv4 mapped address.