Eigenverft.NetLib.Networking 1.0.0.5

dotnet add package Eigenverft.NetLib.Networking --version 1.0.0.5
                    
NuGet\Install-Package Eigenverft.NetLib.Networking -Version 1.0.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Eigenverft.NetLib.Networking" Version="1.0.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Eigenverft.NetLib.Networking" Version="1.0.0.5" />
                    
Directory.Packages.props
<PackageReference Include="Eigenverft.NetLib.Networking" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Eigenverft.NetLib.Networking --version 1.0.0.5
                    
#r "nuget: Eigenverft.NetLib.Networking, 1.0.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Eigenverft.NetLib.Networking@1.0.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Eigenverft.NetLib.Networking&version=1.0.0.5
                    
Install as a Cake Addin
#tool nuget:?package=Eigenverft.NetLib.Networking&version=1.0.0.5
                    
Install as a Cake Tool

Eigenverft.NetLib.Networking

NuGet Version NuGet Downloads Repository CI Targets License

Host-independent IP address normalization, CIDR parsing, and cached address matching for IPv4 and IPv6.

✨ At a glance

Package Eigenverft.NetLib.Networking
APIs IPAddress.Normalize(), CidrNetwork, IPAddress.Matches(...)
Framework dependency Microsoft.Extensions.Caching.Memory
ASP.NET Core dependency None
Target frameworks .NET 8 and .NET 10
License MIT

📦 Installation

dotnet add package Eigenverft.NetLib.Networking

🚀 Quick start

Normalize IPv4-mapped IPv6 addresses, parse a network, and match an address against one CIDR or a list:

using System;
using System.Net;
using Eigenverft.NetLib.Networking;

IPAddress canonical = IPAddress.Parse("::ffff:192.168.1.25").Normalize();
Console.WriteLine(canonical.ToCanonicalString());
// 192.168.1.25

CidrNetwork network = CidrNetwork.Parse("192.168.1.123/24");
// normalized to 192.168.1.0/24

bool contained = network.Contains(canonical);
bool allowed = canonical.Matches(
    new[] { "10.0.0.0/8", "192.168.1.123/24" });

🧭 Parsing and matching behavior

Normalize() maps IPv4-mapped IPv6 addresses to IPv4. Native IPv6 addresses remain unchanged, including their ScopeId; ToCanonicalString() formats the normalized address while preserving a native IPv6 scope identifier.

CidrNetwork.Parse(...) and TryParse(...) accept both IPv4 and IPv6 CIDRs and clear host bits in the supplied address. For example, 192.168.1.123/24 becomes 192.168.1.0/24. Contains(...) returns false for an address from the other address family.

IPAddress.Matches(...) accepts one CIDR or a collection. A literal * matches every address; empty and invalid entries do not match. Parsed CIDRs, including invalid text, and repeated address/list evaluations are cached internally. Collection cache keys are independent of entry order.

🎯 Target frameworks

The package targets net8.0 and net10.0.

📄 License

MIT License

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Eigenverft.NetLib.Networking:

Package Downloads
Eigenverft.Routed.RequestFilters

ASP.NET Core request filtering, filter-event storage, and evaluation middleware for configurable request policies.

Eigenverft.WebLib.ClientNetwork

ASP.NET Core client-network middleware and forwarded client IP features backed by NetLib networking helpers.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0.5 99 9/29/2026
1.0.0.4 99 9/28/2026
1.0.0.3 322 9/12/2026

Initial capability package extracted from Eigenverft.NetLib.Infrastructure.