CSubNet

A subnet: a network base address together with a netmask.

Synopsis

Declared in <netaddress.h>

class CSubNet;

Member Functions

NameDescription
CSubNet [constructor]Constructors
IsValid Whether this subnet was parsed/constructed successfully.
Match Whether the given address falls within this subnet.
ToString Get a human-readable CIDR representation of this subnet.

Protected Data Members

NameDescription
netmask Netmask, in network byte order
network Network (base) address
valid Is this value valid? (only used to signal parse errors)

Friends

NameDescription
operator<Order two subnets.
operator==Compare two subnets for equality.

Non-Member Functions

NameDescription
LookupSubNetParse and resolve a specified subnet string into the appropriate internal representation.