:relfileprefix: ../../
[#boost-urls-ipv6_address_rule]

== xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::ipv6_address_rule


Rule for An IP version 6 style address


=== Synopsis

Declared in header `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/rfc/ipv6_address_rule.hpp#L125[boost/url/rfc/ipv6_address_rule.hpp,window=blank_]>`

[source,cpp,subs="verbatim,macros,-callouts"]
----
constexpr
pass:q[_implementation-defined_] ipv6_address_rule = {};
----

=== Description

[,cpp]
----
using value_type = ipv6_address;
----

=== Rules are used with the function

xref:boost/urls/grammar/parse-02.adoc[grammar::parse]
.
[,cpp]
----
system::result< ipv6_address > rv = grammar::parse( "2001:0db8:85a3:0000:0000:8a2e:0370:7334", ipv6_address_rule );
----
[,cpp]
----
IPv6address =                            6( h16 ":" ) ls32
            /                       "::" 5( h16 ":" ) ls32
            / [               h16 ] "::" 4( h16 ":" ) ls32
            / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
            / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
            / [ *3( h16 ":" ) h16 ] "::"    h16 ":"   ls32
            / [ *4( h16 ":" ) h16 ] "::"              ls32
            / [ *5( h16 ":" ) h16 ] "::"              h16
            / [ *6( h16 ":" ) h16 ] "::"

ls32        = ( h16 ":" h16 ) / IPv4address
            ; least-significant 32 bits of address

h16         = 1*4HEXDIG
            ; 16 bits of address represented in hexadecimal
----

* link:https://datatracker.ietf.org/doc/html/rfc4291[IP Version 6 Addressing Architecture (rfc4291)]

* link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2[3.2.2. Host (rfc3986)]



=== See Also


xref:boost/urls/ipv6_address.adoc[ipv6_address]
,
xref:boost/urls/parse_ipv6_address.adoc[parse_ipv6_address]
,
xref:boost/urls/grammar/parse-02.adoc[grammar::parse]
.



