Jeff Leung jleung
  • Joined on 2020-12-07

Netlink.Managed.Native (1.3.1)

Published 2026-05-09 23:22:12 +00:00 by jleung

Installation

dotnet nuget add source --name jleung --username your_username --password your_token 
dotnet add package --source jleung --version 1.3.1 Netlink.Managed.Native

About 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-3 runtime 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 / ip
  • pkg-config
  • gcc (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

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.Native
  • src/Netlink.Managed
  • tests/Netlink.Managed.UnitTests
  • tests/Netlink.Managed.Fuzz
  • tests/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 (when zip is available)

License

NuGet packages are published with SPDX license expression LGPL-2.0-only.

Details
NuGet
2026-05-09 23:22:12 +00:00
5
libnl-dotnet contributors
17 KiB
Assets (2)
Versions (6) View all
1.3.1 2026-05-09
1.3.0 2026-05-07
1.0.1 2026-05-06
1.2.0 2026-02-27
1.1.0 2026-02-27