NebriaChip.Ip.Win
1.1.0
dotnet add package NebriaChip.Ip.Win --version 1.1.0
NuGet\Install-Package NebriaChip.Ip.Win -Version 1.1.0
<PackageReference Include="NebriaChip.Ip.Win" Version="1.1.0" />
<PackageVersion Include="NebriaChip.Ip.Win" Version="1.1.0" />
<PackageReference Include="NebriaChip.Ip.Win" />
paket add NebriaChip.Ip.Win --version 1.1.0
#r "nuget: NebriaChip.Ip.Win, 1.1.0"
#:package NebriaChip.Ip.Win@1.1.0
#addin nuget:?package=NebriaChip.Ip.Win&version=1.1.0
#tool nuget:?package=NebriaChip.Ip.Win&version=1.1.0
NebriaChip.Ip.Win
This library is a simple wrapper around the Windows API for manipulating temporary IP addresses.
The IP addresses you add are temporary and will be discarded when the system is rebooted or when the network interface is reset.
This can also coexist with the interface’s DHCP-assigned address.
It is intended for scenarios where a temporary IP address is needed, such as testing.
For more details, see CreateUnicastIpAddressEntry.
Examples
Add an IP address and wait for DAD (Duplicate Address Detection) to complete.
using NebriaChip.Ip.Win;
var adapter = "Local Area Connection";
var address = new IPAddress([192, 168, 100, 10]);
var prefix = 24;
var addrOperator = new WinIpAddrOperator(new() { ThrowOnError = true });
addrOperator.CreateUnicastAddress(adapter, address, prefix);
using var timeout = new CancellationTokenSource(TimeSpan.FromSeconds(10));
var state = await addrOperator.WaitDadStateAsync(nwif, address, timeout.Token);
Console.WriteLine($"DAD State: {state}");
Polling-based DAD completion wait.
var state = await addrOperator.PollingDadStateAsync(nwif, address, timeout.Token);
Add an IP address with optimistic DAD (initial state set to Preferred).
await addrOperator.CreateUnicastAddress(adapter, address, prefix, optimistic: true);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows7.0 is compatible. |
-
net10.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.0 | 110 | 9/6/2026 |