Networking TS

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.

uint_type

The type used to represent an address as an unsigned integer.

Member Functions

Name

Description

address_v4

Default constructor.

Construct an address from raw bytes.

Construct an address from an unsigned integer 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.

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.

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_uint

Get the address as an unsigned integer 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 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.

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.


PrevUpHomeNext