Expand description
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"] }Re-exports§
pub use libc;
Structs§
Constants§
- MNL_
ALIGNTO - MNL_
CB_ ERROR - MNL_
CB_ OK - MNL_
CB_ STOP - MNL_
SOCKET_ AUTOPID - MNL_
TYPE_ BINARY - MNL_
TYPE_ FLAG - MNL_
TYPE_ MAX - MNL_
TYPE_ MSECS - MNL_
TYPE_ NESTED - MNL_
TYPE_ NESTED_ COMPAT - MNL_
TYPE_ NUL_ STRING - MNL_
TYPE_ STRING - MNL_
TYPE_ U8 - MNL_
TYPE_ U16 - MNL_
TYPE_ U32 - MNL_
TYPE_ U64 - MNL_
TYPE_ UNSPEC
Functions§
- MNL_
ALIGN - MNL_
SOCKET_ BUFFER_ SIZE - mnl_
attr_ ⚠get_ len - mnl_
attr_ ⚠get_ payload - mnl_
attr_ ⚠get_ payload_ len - mnl_
attr_ ⚠get_ str - mnl_
attr_ ⚠get_ type - mnl_
attr_ ⚠get_ u8 - mnl_
attr_ ⚠get_ u16 - mnl_
attr_ ⚠get_ u32 - mnl_
attr_ ⚠get_ u64 - mnl_
attr_ ⚠nest_ cancel - mnl_
attr_ ⚠nest_ end - mnl_
attr_ ⚠nest_ start - mnl_
attr_ ⚠nest_ start_ check - mnl_
attr_ ⚠next - mnl_
attr_ ⚠ok - mnl_
attr_ ⚠parse - mnl_
attr_ ⚠parse_ nested - mnl_
attr_ ⚠parse_ payload - mnl_
attr_ ⚠put - mnl_
attr_ ⚠put_ check - mnl_
attr_ ⚠put_ str - mnl_
attr_ ⚠put_ str_ check - mnl_
attr_ ⚠put_ strz - mnl_
attr_ ⚠put_ strz_ check - mnl_
attr_ ⚠put_ u8 - mnl_
attr_ ⚠put_ u8_ check - mnl_
attr_ ⚠put_ u16 - mnl_
attr_ ⚠put_ u32 - mnl_
attr_ ⚠put_ u64 - mnl_
attr_ ⚠put_ u16_ check - mnl_
attr_ ⚠put_ u32_ check - mnl_
attr_ ⚠put_ u64_ check - mnl_
attr_ ⚠type_ valid - mnl_
attr_ ⚠validate - mnl_
attr_ ⚠validate2 - mnl_
cb_ ⚠run - mnl_
cb_ ⚠run2 - mnl_
nlmsg_ ⚠batch_ current - mnl_
nlmsg_ ⚠batch_ head - mnl_
nlmsg_ ⚠batch_ is_ empty - mnl_
nlmsg_ ⚠batch_ next - mnl_
nlmsg_ ⚠batch_ reset - mnl_
nlmsg_ ⚠batch_ size - mnl_
nlmsg_ ⚠batch_ start - mnl_
nlmsg_ ⚠batch_ stop - mnl_
nlmsg_ ⚠fprintf - mnl_
nlmsg_ ⚠get_ payload - mnl_
nlmsg_ ⚠get_ payload_ len - mnl_
nlmsg_ ⚠get_ payload_ offset - mnl_
nlmsg_ ⚠get_ payload_ tail - mnl_
nlmsg_ ⚠next - mnl_
nlmsg_ ⚠ok - mnl_
nlmsg_ ⚠portid_ ok - mnl_
nlmsg_ ⚠put_ extra_ header - mnl_
nlmsg_ ⚠put_ header - mnl_
nlmsg_ ⚠seq_ ok - mnl_
nlmsg_ ⚠size - mnl_
socket_ ⚠bind - mnl_
socket_ ⚠close - mnl_
socket_ ⚠get_ fd - mnl_
socket_ ⚠get_ portid - mnl_
socket_ ⚠getsockopt - mnl_
socket_ ⚠open - mnl_
socket_ ⚠recvfrom - mnl_
socket_ ⚠sendto - mnl_
socket_ ⚠setsockopt