---
name: "scan_ip6_flat"
section: "3"
platform: "linux"
package: "libowfat-dev"
version: "0.32-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/scan_ip6_flat"
---

# scan\_ip6\_flat(3)

parse an IPv6 number in flat ASCII representation

## NAME

scan\_ip6\_flat - parse an IPv6 number in flat ASCII representation

## SYNTAX

**#include \<libowfat/ip6.h\>**

int **scan\_ip6\_flat**(const char \**src*,char *ip*\[16\]);

## DESCRIPTION

scan\_ip6\_flat parses an IPv6 number in flat ASCII representation from *src* and writes the result into *ip*. It returns the number of bytes read from *src* or 0 if the parsing failed.

scan\_ip6\_flat accepts upper and lower case hex letters.

The flat representation should have been output by fmt\_ip6\_flat.

## EXAMPLE

\#include \<libowfat/str.h\>\
 \#include \<libowfat/ip6.h\>

  char buf\[\]="00000000000000000000000000000001";\
   char ip\[16\];\
   if (scan\_ip6\_flat(buf,ip) != str\_len(buf))\
     parse\_error();

## SEE ALSO

[fmt\_ip6\_flat(3)](/fmt_ip6_flat/3.md), [scan\_ip6(3)](/scan_ip6/3.md)
