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

Synopsis

Declared in <netaddress.h>

class CSubNet;

Member Functions

Name

Description

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

Name

Description

netmask

Netmask, in network byte order

network

Network (base) address

valid

Is this value valid? (only used to signal parse errors)

Friends

Name

Description

operator<

Order two subnets.

operator==

Compare two subnets for equality.

Non-Member Functions

Name

Description

LookupSubNet

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

Created with MrDocs