Netlink.Managed.Native (1.3.1)
Installation
dotnet nuget add source --name jleung --username your_username --password your_token dotnet add package --source jleung --version 1.3.1 Netlink.Managed.NativeAbout this package
Native libnl P/Invoke surface for Netlink.Managed.
libnl-dotnet
libnl-backed .NET 10 bindings and high-level helpers for Linux netlink/rtnetlink operations (VRF, bridge, veth, VXLAN, addresses, routes).
Requirements
Runtime:
- Linux
- .NET 10 runtime
libnl-3+libnl-route-3runtime libraries
Runtime policy:
- Production/native mode is supported on Linux amd64 only.
- On Linux amd64, platform initialization validates required libnl libraries/symbols and fails fast when missing.
- On non-Linux hosts (for example Windows development in Visual Studio), the platform runs in documented no-op mode.
- Linux non-amd64 runtimes are not supported for native operations.
Development / CI:
- .NET 10 SDK
iproute2/ippkg-configgcc(for ABI probe compilation in integration tests)- libnl development headers
- Rocky:
libnl3-devel - Ubuntu 24.04:
libnl-3-dev,libnl-route-3-dev - Debian 13:
libnl-3-dev,libnl-route-3-dev
- Rocky:
Helper setup scripts:
./eng/setup-rocky.sh./eng/setup-ubuntu.sh./eng/setup-debian.sh
Native library resolution policy (Linux amd64):
libnl-3.so.200(fallback:libnl-3.so,nl-3)libnl-route-3.so.200(fallback:libnl-route-3.so,nl-route-3)
Projects
src/Netlink.Managed.Nativesrc/Netlink.Managedtests/Netlink.Managed.UnitTeststests/Netlink.Managed.Fuzztests/Netlink.Managed.IntegrationTests
Running
Build:
dotnet build libnl-dotnet.slnx
Fast local validation:
./eng/test.sh fast
Full artifact run (root, Linux):
sudo ./eng/test.sh full
Targeted root suites:
sudo ./eng/test.sh abi
sudo ./eng/test.sh integration
sudo ./eng/test.sh stress
sudo ./eng/test.sh leak
Legacy direct runners remain available:
./eng/run-tests-with-artifacts.sh./eng/run-root-integration.sh./eng/run-fuzz-smoke.sh
Artifacts for full mode are written to artifacts/test-runs/<timestamp>/ and include per-suite TRX/logs, summary.txt, and run-manifest.json.
The ABI suite builds libnm_abi_probe.so from tests/Netlink.Managed.IntegrationTests/native/abi_probe.c using gcc + pkg-config.
NuGet Packaging
Create packages:
./eng/pack-nuget.sh
Version override (applies to both Netlink.Managed.Native and Netlink.Managed):
PACKAGE_VERSION=1.0.1 ./eng/pack-nuget.sh
Outputs:
- NuGet packages in
artifacts/nuget/ - Release bundle directory in
artifacts/release/netlink-managed-<version>/ - Release tarball in
artifacts/release/netlink-managed-<version>-nuget.tar.gz - Release zip in
artifacts/release/netlink-managed-<version>-nuget.zip(whenzipis available)
License
NuGet packages are published with SPDX license expression LGPL-2.0-only.