Constructors

Synopses

Declared in <netaddress.h>

Construct an unspecified, invalid network address.

Construct a network address from an IPv4 address.

explicit
CNetAddr(in_addr const& ipv4Addr);

Construct a network address from an IPv6 address and optional scope id.

explicit
CNetAddr(
    in6_addr const& pipv6Addr,
    uint32_t scope = 0);

Parameters

Name

Description

ipv4Addr

The IPv4 address to store.

pipv6Addr

The IPv6 address to store.

scope

The scope id for scoped/link‐local IPv6 addresses.

Created with MrDocs