1.fp 5 B
2.de Af
3.ds ;G \\*(;G\\f\\$1\\$3\\f\\$2
4.if !\\$4 .Af \\$2 \\$1 "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
5..
6.de aF
7.ie \\$3 .ft \\$1
8.el \{\
9.ds ;G \&
10.nr ;G \\n(.f
11.Af "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
12\\*(;G
13.ft \\n(;G \}
14..
15.de L
16.aF 5 \\n(.f "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
17..
18.de LR
19.aF 5 1 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
20..
21.de RL
22.aF 1 5 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
23..
24.de EX		\" start example
25.ta 1i 2i 3i 4i 5i 6i
26.PP
27.RS 
28.PD 0
29.ft 5
30.nf
31..
32.de EE		\" end example
33.fi
34.ft
35.PD
36.RE
37.PP
38..
39.TH IP6 3
40.SH NAME
41ip6 \- IP V6 address support
42.SH SYNOPSIS
43.EX
44#include <ip6.h>
45
46char*      fmtip6(unsigned char* addr, int bits);
47int        strtoip6(const char* str, char** end, unsigned char* addr, unsigned char* bits);
48.EE
49
50.SH DESCRIPTION
51.L fmtip6()
52formats the IPV6 address
53.L addr
54with optional prefix bits
55.L bits
56(0 if not a prefix) into a thread-specific 0-terminated temporary buffer and returns a pointer
57to the formatted value.
58
59.PP
60.L strtoip6()
61converts a formatted IPV6 address from the 0-terminated string
62.L str
63into a host order IPV6 address in
64.L addr
65which must be a buffer of at least
66.L IP6ADDR
67bytes.
68If
69.L bits
70is not 0 then an optional
71.BI / bits
72(prefix size in bits) is parsed and
73.L *bits
74is set to the number of prefix bits.
75If
76.L end
77is not 0 then
78.L *end
79will point to the first unparsed character in
80.L str
81on return.
820 is returned on success, -1 on failure.
83
84.SH "SEE ALSO"
85dss(1)
86