Lightweight library for working with various networking objects
varsubnet=Ipv4Subnet.Parse("10.0.0.0/29");Console.WriteLine($" Network Address: {subnet.NetworkAddress}");// 10.0.0.0Console.WriteLine($" First Usable: {subnet.FirstUsable}");// 10.0.0.1Console.WriteLine($" Last Usable: {subnet.LastUsable}");// 10.0.0.6Console.WriteLine($"Broadcast Address: {subnet.BroadcastAddress}");// 10.0.0.7Console.WriteLine($" Total Hosts: {subnet.TotalHosts}");// 8Console.WriteLine($" Usable Hosts: {subnet.UsableHosts}");// 6foreach(varaddressinsubnet.GetUsableAddresses()){Console.WriteLine(address);}The core NetworkPrimitives package contains the types themselves.
The package NetworkPrimitives.JsonConverters contains converters for System.Text.Json
Overall goals are:
- Fast parsing times
- Low (preferably zero) allocations
- Overall efficiency