1fmt_ip6_flat(3)            Library Functions Manual            fmt_ip6_flat(3)
2
3
4

NAME

6       fmt_ip6_flat - write a formatted ASCII representation of an IPv6 number
7

SYNTAX

9       #include <ip6.h>
10
11       unsigned int fmt_ip6_flat(char *dest,const char ip[16]);
12

DESCRIPTION

14       fmt_ip6_flat formats an IPv6 number in a flat ASCII representation from
15       ip and writes the result into dest. It  returns  the  number  of  bytes
16       written (always 32).
17
18       This  representation  does not contain colons and is meant to be easily
19       machine-readable.  Use fmt_ip6 for the  normal  (standard)  representa‐
20       tion.   This  function is meant for places which use colons to separate
21       fields and thus have problems interpreting the standard IPv6 notation.
22
23       If dest equals FMT_LEN (i.e. is zero), fmt_ip6_flat returns the  number
24       of bytes it would have written.
25
26       fmt_ip6_flat does not append \0.
27
28       For  convenience, ip6.h defines the integer IP6_FMT to be big enough to
29       contain every possible fmt_ip6_flat output plus \0.
30

EXAMPLE

32       #include <ip6.h>
33
34         char buf[IP6_FMT];
35         char ip[16];
36         buf[fmt_ip6_flat(buf,ip)]=0;
37

SEE ALSO

39       scan_ip6_flat(3), fmt_ip6(3)
40
41
42
43                                                               fmt_ip6_flat(3)
Impressum