#netlink #libmnl #minimalist #userspace #bindings #oriented #level

sys no-std mnl-sys

Low level FFI bindings to libmnl. A minimalistic user-space library oriented to Netlink developers

3 unstable releases

0.2.1 Feb 11, 2022
0.2.0 Sep 23, 2019
0.1.0 Aug 29, 2018

#904 in Unix APIs

Download history 5104/week @ 2024-07-22 4652/week @ 2024-07-29 3836/week @ 2024-08-05 5905/week @ 2024-08-12 5338/week @ 2024-08-19 5779/week @ 2024-08-26 5162/week @ 2024-09-02 2118/week @ 2024-09-09 4789/week @ 2024-09-16 4771/week @ 2024-09-23 3986/week @ 2024-09-30 2867/week @ 2024-10-07 4180/week @ 2024-10-14 4551/week @ 2024-10-21 3293/week @ 2024-10-28 2937/week @ 2024-11-04

15,115 downloads per month
Used in 2 crates (via mnl)

MIT/Apache

15KB
232 lines

mnl-sys

Low level FFI bindings to libmnl. A minimalistic user-space library oriented to Netlink developers. See mnl for a higher level safe abstraction.

These bindings were generated with bindgen. See the generate_bindings.sh script in the repository.

Linking to libmnl

By default this crate uses pkg-config to find and link to libmnl. To manually configure where to look for the library, set the environment variable LIBMNL_LIB_DIR to point to the directory where libmnl.so or libmnl.a resides.

Selecting version of libmnl

This crate has bindings for multiple versions of libmnl. All bindings are generated by bindgen via the generate_bindings.sh script in this repository.

Only one version of libmnl can be exposed via this crate. By default the crate exports the bindings for the oldest supported version (libmnl-1.0.3). To get newer versions activate the corresponding features. See Cargo.toml for available features/versions.

So for example, to get bindings to libmnl-1.0.4 depend on this crate like this:

[dependencies]
mnl-sys = { version = "0.1", features = ["mnl-1-0-4"] }

License: MIT/Apache-2.0

Dependencies

~48KB