[#boost-urls-ipv4_address]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::ipv4&lowbar;address
:relfileprefix: ../../
:mrdocs:


An IP version 4 style address&period;

== Synopsis


Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/ipv4_address.hpp#L53[boost&sol;url&sol;ipv4&lowbar;address&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class ipv4&lowbar;address;
----

== Types

[cols=2]
|===
| Name | Description 

| xref:boost/urls/ipv4_address/bytes_type.adoc[`bytes&lowbar;type`] 
| The type used to represent an address as an array of bytes

| xref:boost/urls/ipv4_address/uint_type.adoc[`uint&lowbar;type`] 
| The type used to represent an address as an unsigned integer

|===
== Member Functions

[cols=2]
|===
| Name | Description 

| xref:boost/urls/ipv4_address/2constructor.adoc[`ipv4&lowbar;address`]         [.small]#[constructor]#
| Construct from a string&period;

Construct from an array of bytes&period;

Construct from an unsigned integer&period;

Constructor&period;


| xref:boost/urls/ipv4_address/is_loopback.adoc[`is&lowbar;loopback`] 
| Return true if the address is a loopback address

| xref:boost/urls/ipv4_address/is_multicast.adoc[`is&lowbar;multicast`] 
| Return true if the address is a multicast address

| xref:boost/urls/ipv4_address/is_unspecified.adoc[`is&lowbar;unspecified`] 
| Return true if the address is unspecified

| xref:boost/urls/ipv4_address/operator_assign.adoc[`operator&equals;`] 
| Copy Assignment&period;

| xref:boost/urls/ipv4_address/to_buffer.adoc[`to&lowbar;buffer`] 
| Write a dotted decimal string representing the address to a buffer

| xref:boost/urls/ipv4_address/to_bytes.adoc[`to&lowbar;bytes`] 
| Return the address as bytes, in network byte order&period;

| xref:boost/urls/ipv4_address/to_string.adoc[`to&lowbar;string`] 
| Return the address as a string in dotted decimal format

| xref:boost/urls/ipv4_address/to_uint.adoc[`to&lowbar;uint`] 
| Return the address as an unsigned integer&period;

|===
== Static Member Functions

[cols=2]
|===
| Name | Description 

| xref:boost/urls/ipv4_address/any.adoc[`any`] 
| Return an address object that represents any address

| xref:boost/urls/ipv4_address/broadcast.adoc[`broadcast`] 
| Return an address object that represents the broadcast address

| xref:boost/urls/ipv4_address/loopback.adoc[`loopback`] 
| Return an address object that represents the loopback address

|===
== Static Data Members

[cols=2]
|===
| Name | Description 

| xref:boost/urls/ipv4_address/max_str_len.adoc[`max&lowbar;str&lowbar;len`] 
| The number of characters in the longest possible IPv4 string&period;

|===
== Friends

[cols=2]
|===
| Name | Description 

| xref:boost/urls/ipv4_address/08friend-08.adoc[`operator!&equals;`] 
| Return true if two addresses are not equal

| xref:boost/urls/ipv4_address/08friend-07.adoc[`operator&lt;&lt;`] 
| Format the address to an output stream&period;

| xref:boost/urls/ipv4_address/08friend-01.adoc[`operator&equals;&equals;`] 
| Return true if two addresses are equal

|===



== Description


Objects of this type are used to construct,    parse, and manipulate IP version 6 addresses&period;


=== BNF

[,cpp]
----
IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet

dec-octet   = DIGIT                 ; 0-9
            / %x31-39 DIGIT         ; 10-99
            / "1" 2DIGIT            ; 100-199
            / "2" %x30-34 DIGIT     ; 200-249
            / "25" %x30-35          ; 250-255
----

=== Specification

* link:https://en.wikipedia.org/wiki/IPv4[IPv4 (Wikipedia)]
    
* link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2[3&period;2&period;2&period; Host (rfc3986)]



== See Also


xref:boost/urls/parse_ipv4_address.adoc[parse&lowbar;ipv4&lowbar;address],        xref:boost/urls/ipv6_address.adoc[ipv6&lowbar;address]&period;






[.small]#Created with https://www.mrdocs.com[MrDocs]#
