netfilter project logo

The "libmnl" project

What is libmnl?

libmnl is a minimalistic user-space library oriented to Netlink developers. There are a lot of common tasks in parsing, validating, constructing of both the Netlink header and TLVs that are repetitive and easy to get wrong. This library aims to provide simple helpers that allows you to re-use code and to avoid re-inventing the wheel.


This library is released under LGPLv2.1+.


You can check the library documentation generated in doxygen format.

Main Features

  • Small: the shared library requires around 30KB for an x86-based computer.
  • Simple: this library avoids complexity and elaborated abstractions that tend to hide Netlink details.
  • Easy to use: the library simplifies the work for Netlink-wise developers. It provides functions to make socket handling, message building, validating, parsing and sequence tracking, easier.
  • Easy to re-use: you can use the library to build your own abstraction layer on top of this library.
  • Decoupling: the interdependency of the main bricks that compose the library is reduced, i.e. the library provides many helpers, but the programmer is not forced to use them.

Git Tree

The current development version of libmnl can be accessed at


libmnl was mostly written by the Pablo Neira Ayuso with contributions from Jozsef Kadlecsik and Jan Engelhardt.

Copyright © 1999-2024 The Netfilter webmasters . Contact webmaster