[#CSubNet-2constructor-01]
= xref:CSubNet.adoc[CSubNet]::CSubNet
:relfileprefix: ../
:mrdocs:

Construct from a given network start and mask&period;

== Synopsis

Declared in `&lt;netaddress&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
CSubNet(
    xref:CNetAddr.adoc[CNetAddr] const& addr,
    xref:CNetAddr.adoc[CNetAddr] const& mask);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *addr* [in]
| Network start&period; Must be IPv4 or IPv6, otherwise an invalid subnet is created&period;
| *mask* [in]
| Network mask, must be of the same type as `addr` and not contain 0&hyphen;bits followed by 1&hyphen;bits&period; Otherwise an invalid subnet is created&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
