CNetAddr::CNetAddr

Constructors

Synopses

Declared in <netaddress.h>

Construct an unspecified, invalid network address.

CNetAddr();
» more...

Construct a network address from an IPv4 address.

explicit
CNetAddr(in_addr const& ipv4Addr);
» more...

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

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

Parameters

NameDescription
ipv4AddrThe IPv4 address to store.
pipv6AddrThe IPv6 address to store.
scopeThe scope id for scoped/link-local IPv6 addresses.