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

NAME

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

SYNTAX

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

DESCRIPTION

14       fmt_ip6  formats  an  IPv6  number  in ASCII representation from ip and
15       writes the result into dest. It returns the number of bytes written.
16
17       fmt_ip6 will apply "::" compression to the output.
18
19       If ip is an IPv4-mapped IPv6 address, fmt_ip6 will output  the  last  4
20       bytes as IPv4 number in dotted-decimal notation.
21
22       If  dest  equals  FMT_LEN (i.e. is zero), fmt_ip6 returns the number of
23       bytes it would have written.
24
25       fmt_ip6 does not append \0.
26
27       For convenience, ip6.h defines the integer IP6_FMT to be big enough  to
28       contain every possible fmt_ip6 output plus \0.
29

EXAMPLE

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

SEE ALSO

38       fmt_ip6c(3), fmt_ip6if(3), scan_ip6(3), fmt_ip4(3), inet_ntop(3)
39
40
41
42                                                                    fmt_ip6(3)
Impressum