neli
Type safe netlink library written in Rust
0.7.4
39M downloads/mo
#1443 most downloaded on crates.io
jbaublitz/neli
What this package is like to depend on
Last release 6 months ago
28 Jan 2026
Release timing varies
gaps range from 4 weeks to 1.4 years
Most releases are documented
notes for 19 of 26 stable releases
1 version withdrawn
withdrawn after publishing
9 years old
35 releases · first in 2018
3 releases in the last 12 months
see the full history below
Release timeline
35 releases · Jan 2018 to Jan 2026Releases
latest 35-
0.7.428 Jan 2026Release notes
Open source →Bug fixes
- Fix memory leak in asynchronous and synchronous router that causes threads not to
be cleaned up when the NlRouter object is dropped
- The fix should reliably signal to the thread to exit. Tested with valgrind.
- ctrl-list-multiple example allows testing multiple socket creation and drop operations to confirm the problem is resolved
- Please note that the underlying file descriptor had to be set to non-blocking to work with epoll. This mechanism allows waiting for either a thread exit signal or input from the socket.
- Fix memory leak in asynchronous and synchronous router that causes threads not to
be cleaned up when the NlRouter object is dropped
-
0.7.308 Dec 2025 -
0.7.204 Dec 2025Release notes
Open source →Features
- VLAN support
Bug fixes and maintenance
- Fix connector tests for endianness
- Clippy maintenance
- nl80211 example updates
- Doc improvements
-
0.7.123 Jul 2025Release notes
Open source →Features
- Support
FromBytesandToBytesfor statically sized arrays - Allow setting recv buffer size in socket
- Support for the connector protocol
Maintenance
- Clippy fixes
- Update to Rust 2024 edition
- Support
-
0.7.022 Jun 2025Release notes
Open source →Breaking changes
FromBytesandFromBytesWithInputhave had the lifetime parameter removed. This removes the ability to borrow data from the buffer written to by therecv()syscall. This is intentional as it provides more ergonomic support forNlRouterto send messages across threads. A new trait,FromBytesWithInputBorrowed, has been added to support the use case of borrowing payloads from attributes as&stror&[u8].- The
asyncfeature API has been completely redesigned to more closely resemble it's corresponding synchronous API. - All
new()methods and public fields on data structures used to construct packets have been replaced by the builder pattern. - The IO error variant is now the full IO error wrapped in an
Arc.
New Cargo features
synchas been added as a Cargo feature. If a user is only interested in asynchronous functionality,synccan be disabled to disable the higher level synchronous API and reduce the number of required dependencies.
Features
- Extended ACK support. Sockets now support parsing and enabling entended ACKs for more information in error cases.
- New router infrastructure allowing ACK handling, seq management, and PID validation for requests sent in parallel.
- Builder pattern defined for all data structures used to construct netlink packets.
-
0.7.0-rc316 Jan 2025 pre-releaseRelease notes
Open source →Merge pull request #257 from jbaublitz/release
neli-0.7.0-rc3 and neli-proc-macros-0.2.0-rc3
-
0.7.0-rc215 Aug 2023 pre-releaseNothing published for this version
-
0.7.0-rc122 Jan 2023 pre-releaseNothing published for this version
-
0.6.514 Jan 2025Nothing published for this version
-
0.6.421 Jan 2023Release notes
Open source →Bug fixes
- Fixed bug in error intepretation for Nlmsgerr.
Features
- Add
FromBytes/ToBytesimplementations foru128.
Thanks to the upstream contributors who provided the code for this release!
-
0.6.321 Oct 2022Release notes
Open source →Bug fixes
- Fixed memory bug in
NlSocket::drop_mcast_membership()unsafe code found using valgrind
Clean up
- CI and clippy maintenance
- Fixed memory bug in
-
0.6.213 Jul 2022Release notes
Open source →Enhancements
- Added support for option user header in netlink protocol for generic netlink
- Added method to get socket PID
- Added support for converting to a
FlagBufferfrom a bitmask
Bug fixes
- Fixed up
examplesdirectory to compile successfully withcargo build --examples
Clean up
- Removed unnecessary features and dependencies (PR from MaxVerevkin)
- CI and clippy maintenance
-
0.6.128 Jan 2022Release notes
Open source →Bug fixes
- Bug fix for
RtBufferandGenlBuffersize calculation - Bug fix for
Rtattrsize calculation - Bug fixes in tokio usage
- Bug fix where padding at the end of an empty netlink packet caused errors
Improvements
- Better debug logging
See all pull requests and issues that went into this release here!
- Bug fix for
-
0.6.007 Nov 2021Release notes
Open source →Bug fixes
- Fixed problem where
Tcmsgcould not be created due to padding. - Fixed problem with listing multicast groups.
Additions
- Addition of
neli-proc-macroscrate to handle most of trait generation. - More testing!
Breaking changes
- Changed the core traits from
Nlto a number of different, more granular traits. - Consolidated
iter()anditer2(). - Major changes to async module.
- Changes to how bit flag sets are handled.
- Fixed problem where
-
0.5.321 Mar 2021Release notes
Open source →Bug fixes
- Bug fix for
Ifinfomsg.ifi_changebeing serialized twice. - Bug fix for
Ndmsgwhere it could not be constructed due to private padding fields. - Bug fix for
Ifinfomsg.ifi_change. This should be of typeIffFlags, notIff. - Fixed assumption in
NlSocketHandle::recv()where this method never expected an ACK to be returned with no data.- The behavior of
NlSocketHandle::recv()has changed slightly. It will now return ACKs and only returnsNonewhen nonblocking. UseNlSocketHandle::iter()for handling of streams of messages.
- The behavior of
- Fixed bug for deserialization of errors returned at the application level.
- Fixed bug in subscription to multicast groups.
- The API has been changed and
U32Bitmaskhas been replaced byNetlinkBitArray.
- The API has been changed and
Additions
- More constants in
Arphrd. - More constants in
Ifla. - Addition of
NlSocketHandle::iter2()that does not restrict users to theNlWrapperTypetype for packet parsing. - Addition of convenience methods on
RtBufferandGenlBuffertypes to make parsing nested attributes easier.
Dependency updates
- Update to tokio 1.0.
- Bug fix for
-
0.5.204 Jan 2021Release notes
Open source →Bug fixes
- Fixed bug in
Ifaddrmsgserialization and deserialization. Thanks,@joshtriplett!
- Fixed bug in
-
0.5.101 Dec 2020Release notes
Open source →Bug fixes
- Fixed bug in ACK handling.
- This change makes
NlSocketHandleexclusively responsible for handling ACKs.
- This change makes
- Fixed bug in ACK handling.
-
0.5.027 Nov 2020Release notes
Open source →Breaking changes
- Change from
bufferingstructs for serialization to regular slices to allow buffer size tracking for each layer of serialization and deserialization and easy slicing into smaller, sized pieces. - Change
streamfeature toasyncfor clarity with higher level API. - Remove
seqandpidtracking. This will eventually be added to higher level APIs. - Make
NlSocket::send/::recvtake an immutable reference due to the case made for message vs. stream based sockets. - Remove universal exports of constants from the
constsmodule. - Update to tokio 0.3.
- Split lower level and higher level synchronous netlink socket calls
across two structs,
NlSocketandNlSocketHandle. - Factor out parsing code so that it can be used across multiple socket types.
- Add nested netlink attribute parsing for routing netlink attributes.
- Changes to the
Nlmsgstruct to support handling application errors returned by the kernel. Previously, there was no easy way to handle application errors returned inside of anNlmsgpacket. - Added the ability to define the visibility for constants defined by
the
constsmacros.
Additions
- Add genetlink ID to family name/multicast group name lookup.
- Add
Indextype for nested attributes returned as a numbered list. NlSocketfunctions to leave/list multicast groups.- Macro infrastructure for generating
serializeanddeserializemethods safely. attrmodule for shared attribute code.- Debug logging enabled through the
loggingfeature.
Deprecations
Nlattr.get_nested_attributes()in favor of.get_attr_handle()NlSocket.set_mcast_groups()in favor of.add_multicast_membership()
Bug fixes
- Bug fixes for rtnetlink
Documentation
- Updates to the documentation.
- More examples.
- Links to the referenced data structures.
- Change from
-
0.5.0-rc103 May 2020 pre-releaseRelease notes
Open source →Additions
- Feature flagged NFLOG support, in the
netfiltermodule.
Resolved issues
- Resolved issue relating to allowing documentation annotations in macros for enum variants representing netlink constants.
- Feature flagged NFLOG support, in the
-
0.4.410 Aug 2020Nothing published for this version
-
0.4.326 Sep 2019Release notes
Open source →Breaking changes
- Change
Nlattr.add_nested_attribute()to take a reference
Additions
- Support
RTM_*constants inconsts.rs - Fix length calculation errors
- Add methods to Nl trait with default implementations - does not break API
- Additional tests for padding
- Add design decision documentation for new padding handling
Deprecations
- Deprecate
.size()usage forVec<Nlattr>- use.asize()instead
Structure changes
consts.rsis nowconsts/with a corresponding submodule for each category of constant - not a breaking change- Start enforcing rustfmt in CI and use cargo fmt to switch over to new formatting
Fixes
- Merge PR fixing rtnetlink support
- Change
-
0.4.3-r207 Sep 2019 pre-releaseNothing published for this version
-
0.4.3-r113 Jul 2019 pre-releaseNothing published for this version
-
0.4.225 Jun 2019Release notes
Open source →Dependencies
- Update buffering to 0.3.4 minimum to force stable channel support for neli
-
0.4.118 Jun 2019Release notes
Open source →Breaking changes
- Revert to builder pattern for creating/parsing generic netlink messages with attributes
- Particular notable changes for nested attribute handling
- Revert to builder pattern for creating/parsing generic netlink messages with attributes
-
0.4.003 Jun 2019Release notes
Open source →Breaking changes
- Rework API in a number of places:
- Tokio support for sockets
- Many socket functions
- Generic netlink
Additions
- Support for rtnetlink
- Iterative message parsing from
NlSocket
Bug fixes
- Support parsing multiple netlink messages returned in the same socket read buffer
- Missing documentation added
- Fix alignment bugs when serializing netlink attributes
- Rework API in a number of places:
-
0.3.122 Jul 2018Release notes
Open source →Breaking changes
- Migration to buffering crate for buffer operations - this does change the API
NOTE:
For record keeping it should be noted that semantic versioning was misused here. 0.3.0-r1 and 0.3.0-r2 should have been 0.3.1 and 0.3.2 respectively.
-
0.3.027 May 2018 withdrawnRelease notes
Open source →Breaking changes
- Type signature of
bindandconnectcalls'groupsparameter was changed to be aVec<u32>which will allow specifying a list of IDs and the group bitmask will be calculated for the user. pollimplementation of forNlSocketfortokio::prelude::Streamtrait will now returnio::ErrorKind::InvalidDataif the socket file descriptor is not set to non-blocking before polling. This is intentional as Tokio docs rely on polls being non-blocking and my implementation requires a read that either returns anio::ErrorKind::WouldBlockvalue or the desired data.- There is now an
nlattrmodule to group together all of the netlink attribute code.
Additions
- A function
blockwas added to allow reversingnonblockfunction onNlSocket. is_blockingwas added and returns aboolindicating whether reads will block on this socket.
Deprecations
get_payload_aswas deprecated in favor ofget_payload_with.
Removed
None
- Type signature of
-
0.3.0-r227 May 2018 pre-release -
0.3.0-r127 May 2018 pre-releaseRelease notes
Open source →Bug fixes
- After looking at tokio's
Fileimplementation, the file descriptor should block for theStreamimplementation
- After looking at tokio's
-
0.2.127 May 2018Nothing published for this version
-
0.2.012 Apr 2018Nothing published for this version
-
0.1.206 Feb 2018Nothing published for this version
-
0.1.102 Feb 2018Nothing published for this version
-
0.1.020 Jan 2018Nothing published for this version