Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

ip::network_v4

Represents an IPv4 network.

class network_v4
Member Functions

Name

Description

address

Obtain the address object specified when the network object was created.

broadcast

Obtain an address object that represents the network's broadcast address.

canonical

Obtain the true network address, omitting any host bits.

hosts

Obtain an address range corresponding to the hosts in the network.

is_host

Test if network is a valid host address.

is_subnet_of

Test if a network is a real subnet of another network.

netmask

Obtain the netmask that was specified when the network object was created.

network

Obtain an address object that represents the network address.

network_v4

Default constructor.

Construct a network based on the specified address and prefix length.

Construct network based on the specified address and netmask.

Copy constructor.

operator=

Assign from another network.

prefix_length

Obtain the prefix length that was specified when the network object was created.

to_string

Get the network as an address in dotted decimal format.

Friends

Name

Description

operator!=

Compare two networks for inequality.

operator==

Compare two networks for equality.

Related Functions

Name

Description

make_network_v4

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.

Thread Safety

Distinct objects: Safe.

Shared objects: Unsafe.

Requirements

Header: boost/asio/ip/network_v4.hpp

Convenience header: boost/asio.hpp


PrevUpHomeNext