asio C++ library

PrevUpHomeNext

ip::address_iterator_v4::reference

The type of a reference to an element pointed to by the iterator.

typedef const address_v4 & reference;
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.

Construct an address from raw bytes.

Construct an address from an unsigned long in host byte order.

Copy constructor.

any

Obtain an address object that represents any address.

broadcast

Obtain an address object that represents the broadcast address.

Obtain an address object that represents the broadcast address that corresponds to the specified address and netmask.

from_string

(Deprecated: Use make_address_v4().) 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_loopback

Determine whether the address is a loopback address.

is_multicast

Determine whether the address is a multicast address.

is_unspecified

Determine whether the address is unspecified.

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, in network byte order.

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

make_address_v4

Create an IPv4 address from raw bytes in network order.

Create an IPv4 address from an unsigned long 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.

make_network_v4

Create an IPv4 network from an address and prefix length.

Create an IPv4 network from an address and netmask.

operator<<

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.

Thread Safety

Distinct objects: Safe.

Shared objects: Unsafe.

Requirements

Header: asio/ip/address_iterator_v4.hpp

Convenience header: asio.hpp


PrevUpHomeNext