Bitvantage.InternetProtocol.NetworkPrefixLookup.IPNetwork2
3.1.0
Prefix Reserved
dotnet add package Bitvantage.InternetProtocol.NetworkPrefixLookup.IPNetwork2 --version 3.1.0
NuGet\Install-Package Bitvantage.InternetProtocol.NetworkPrefixLookup.IPNetwork2 -Version 3.1.0
<PackageReference Include="Bitvantage.InternetProtocol.NetworkPrefixLookup.IPNetwork2" Version="3.1.0" />
<PackageVersion Include="Bitvantage.InternetProtocol.NetworkPrefixLookup.IPNetwork2" Version="3.1.0" />
<PackageReference Include="Bitvantage.InternetProtocol.NetworkPrefixLookup.IPNetwork2" />
paket add Bitvantage.InternetProtocol.NetworkPrefixLookup.IPNetwork2 --version 3.1.0
#r "nuget: Bitvantage.InternetProtocol.NetworkPrefixLookup.IPNetwork2, 3.1.0"
#:package Bitvantage.InternetProtocol.NetworkPrefixLookup.IPNetwork2@3.1.0
#addin nuget:?package=Bitvantage.InternetProtocol.NetworkPrefixLookup.IPNetwork2&version=3.1.0
#tool nuget:?package=Bitvantage.InternetProtocol.NetworkPrefixLookup.IPNetwork2&version=3.1.0
Bitvantage.InternetProtocol.NetworkPrefixLookup.IPNetwork2
Longest-prefix-match lookups over IPNetwork2 networks from the IPNetwork2
package. Given an address, a lookup finds the most specific stored network that contains it and the value stored with
that network.
dotnet add package Bitvantage.InternetProtocol.NetworkPrefixLookup.IPNetwork2
Or from the NuGet Package Manager console:
PM> NuGet\Install-Package Bitvantage.InternetProtocol.NetworkPrefixLookup.IPNetwork2
using System.Net;
using Bitvantage.InternetProtocol.NetworkPrefixLookup;
var zones = new IPNetwork2Lookup<string>
{
{ IPNetwork2.Parse("192.168.0.0/16"), "office" },
{ IPNetwork2.Parse("192.168.10.0/24"), "lab" },
};
// the most specific stored network that contains the address
if (zones.TryGetMatch(IPAddress.Parse("192.168.10.7"), out var network, out var zone))
Console.WriteLine($"{network} -> {zone}"); // 192.168.10.0/24 -> lab
// a read-only copy with faster lookups
var snapshot = zones.Freeze();
IPNetwork2Lookup<TValue> and its frozen form have the same members as the core package's lookups for
System.Net.IPNetwork: lookups from addresses, integers and bytes, queries about networks, batches and frozen tables.
The main README describes them and their
performance.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Bitvantage.InternetProtocol.NetworkPrefixLookup (>= 3.1.0)
- IPNetwork2 (>= 4.3.0)
-
net8.0
- Bitvantage.InternetProtocol.NetworkPrefixLookup (>= 3.1.0)
- IPNetwork2 (>= 4.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.