Construct from a given network start and number of bits (CIDR mask).

Synopsis

Declared in <netaddress.h>

CSubNet(
    CNetAddr const& addr,
    uint8_t mask);

Parameters

Name

Description

addr [in]

Network start. Must be IPv4 or IPv6, otherwise an invalid subnet is created.

mask [in]

CIDR mask, must be in [0, 32]for IPv4 addresses and in [0, 128]for IPv6 addresses. Otherwise an invalid subnet is created.

Created with MrDocs