...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Implements IP version 4 style addresses.
class address_v4
Name |
Description |
---|---|
The type used to represent an address as an array of bytes. |
|
The type used to represent an address as an unsigned integer. |
Name |
Description |
---|---|
address_v4 [constructor] |
Default constructor. |
any [static] |
Obtain an address object that represents any address. |
broadcast [static] |
Obtain an address object that represents the broadcast address. |
Determine whether the address is a loopback address. |
|
Determine whether the address is a multicast address. |
|
Determine whether the address is unspecified. |
|
loopback [static] |
Obtain an address object that represents the loopback address. |
Assign from another address. |
|
Get the address in bytes, in network byte order. |
|
Get the address as a string in dotted decimal format. |
|
Get the address as an unsigned integer in host byte order. |
Name |
Description |
---|---|
Compare two addresses for inequality. |
|
Compare addresses for ordering. |
|
Compare addresses for ordering. |
|
Compare two addresses for equality. |
|
Compare addresses for ordering. |
|
Compare addresses for ordering. |
Name |
Description |
---|---|
Create an IPv4 address from raw bytes in network order. Create an IPv4 address from an unsigned integer in host byte order. Create an IPv4 address from an IP address string in dotted decimal form. Create an IPv4 address from a IPv4-mapped IPv6 address. |
|
Create an IPv4 network from an address and prefix length. Create an IPv4 network from an address and netmask. |
|
Output an address as a string. Output a network as a string. |
The ip::address_v4
class provides the ability to use and manipulate IP version 4 addresses.
Distinct objects: Safe.
Shared objects: Unsafe.
Header: boost/asio/ip/address_v4.hpp
Convenience header: boost/asio.hpp