...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Represents an IPv4 network.
class network_v4
Name |
Description |
---|---|
Obtain the address object specified when the network object was created. |
|
Obtain an address object that represents the network's broadcast address. |
|
Obtain the true network address, omitting any host bits. |
|
Obtain an address range corresponding to the hosts in the network. |
|
Test if network is a valid host address. |
|
Test if a network is a real subnet of another network. |
|
Obtain the netmask that was specified when the network object was created. |
|
Obtain an address object that represents the network address. |
|
network_v4 [constructor] |
Default constructor. |
Assign from another network. |
|
Obtain the prefix length that was specified when the network object was created. |
|
Get the network as an address in dotted decimal format. |
Name |
Description |
---|---|
Compare two networks for inequality. |
|
Compare two networks for equality. |
Name |
Description |
---|---|
Create an IPv4 network from a string containing IP address and prefix length. |
The ip::network_v4
class provides the ability to use and manipulate IP version 4 networks.
Distinct objects: Safe.
Shared objects: Unsafe.
Header: boost/asio/ip/network_v4.hpp
Convenience header: boost/asio.hpp