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::address_v4

Implements IP version 4 style addresses.

class address_v4
Types

Name

Description

bytes_type

The type used to represent an address as an array of bytes.

Member Functions

Name

Description

address_v4

Default constructor.

any

Obtain an address object that represents any address.

broadcast

Obtain an address object that represents the broadcast address.

from_string

Create an address from an IP address string in dotted decimal form.

is_class_a

Determine whether the address is a class A address.

is_class_b

Determine whether the address is a class B address.

is_class_c

Determine whether the address is a class C address.

is_multicast

Determine whether the address is a multicast address.

loopback

Obtain an address object that represents the loopback address.

netmask

Obtain the netmask that corresponds to the address, based on its address class.

operator=

Assign from another address.

to_bytes

Get the address in bytes.

to_string

Get the address as a string in dotted decimal format.

to_ulong

Get the address as an unsigned long in host byte order.

Friends

Name

Description

operator!=

Compare two addresses for inequality.

operator<

Compare addresses for ordering.

operator<=

Compare addresses for ordering.

operator==

Compare two addresses for equality.

operator>

Compare addresses for ordering.

operator>=

Compare addresses for ordering.

Related Functions

Name

Description

operator<<

Output an address as a string.

The ip::address_v4 class provides the ability to use and manipulate IP version 4 addresses.

Thread Safety

Distinct objects: Safe.

Shared objects: Unsafe.


PrevUpHomeNext