Skip to content
@rust-netlink

rust-netlink

Netlink

This project aims at providing building blocks for netlink (see man 7 netlink).

If you seeking crates to communication with linux netlink, please try:

If you seeking crates to parsing or emitting netlink packet, please try:

We are also experimenting a do drop-in replacement of iproute2 in iproute-rs.

Shared crates but designed for internal usage:

  • The netlink_sys crate provides netlink sockets. Integration with mio and tokio is optional.
  • The netlink-packet-core is the glue for all the other netlink-packet-* crates. It provides a NetlinkMessage<T> type that represent any netlink message for any sub-protocol.
  • The netlink-proto crate is an asynchronous implementation of the netlink protocol. It only depends on netlink-packet-core for the NetlinkMessage type and netlink-sys for the socket.

If you want to add more netlink related crates into this organization, please open pull request to rust-netlink/new-crate-review.

Altnernatives

Architecture Decision Records

The architecture desion records are stored in https://github.com/rust-netlink/.github/tree/main/architecture_decisions

Credits

My main resource so far has been the source code of pyroute2 (python) and netlink (golang) a lot. These two projects are great, and very nicely written. As someone who does not read C fluently, and that does not know much about netlink, they have been invaluable.

I'd also like to praise libnl for its documentation. It helped me a lot in understanding the protocol basics.

The whole packet parsing logic is inspired by @whitequark excellent blog posts (part 1, part 2 and part 3, although I've only really used the concepts described in the first blog post).

Thanks also to the people behind tokio for the amazing tool they are building, and the support they provide.

Contact

Pinned Loading

  1. rtnetlink rtnetlink Public

    Rust 186 95

  2. mptcp-pm mptcp-pm Public

    Rust 3 5

  3. ethtool ethtool Public

    Rust 12 15

  4. wl-nl80211 wl-nl80211 Public

    Rust 19 21

  5. audit audit Public

    Rust 7 6

  6. new-crate-review new-crate-review Public

    Used for new crate review

    1

Repositories

Showing 10 of 23 repositories
  • rust-netlink/netlink-packet-core's past year of commit activity
    Rust 10 MIT 25 2 0 Updated Sep 15, 2026
  • nl-wireguard Public

    Rust crate for linux wireguard netlink management

    rust-netlink/nl-wireguard's past year of commit activity
    Rust 5 MIT 4 0 0 Updated Sep 14, 2026
  • netlink-packet-route Public

    Rust crate for the netlink route protocol

    rust-netlink/netlink-packet-route's past year of commit activity
    Rust 75 MIT 81 9 4 Updated Sep 14, 2026
  • xfrmnetlink Public

    Rut crate for IPsec netlink protocol

    rust-netlink/xfrmnetlink's past year of commit activity
    Rust 3 MIT 5 0 0 Updated Sep 13, 2026
  • wl-nl80211 Public
    rust-netlink/wl-nl80211's past year of commit activity
    Rust 19 MIT 21 4 1 Updated Sep 13, 2026
  • rtnetlink Public
    rust-netlink/rtnetlink's past year of commit activity
    Rust 186 MIT 95 27 11 Updated Sep 13, 2026
  • netlink-sys Public

    netlink sockets, with optional integration with tokio

    rust-netlink/netlink-sys's past year of commit activity
    Rust 20 MIT 21 2 2 Updated Sep 13, 2026
  • netlink-proto Public
    rust-netlink/netlink-proto's past year of commit activity
    Rust 13 MIT 26 6 3 Updated Sep 14, 2026
  • netlink-packet-xfrm Public

    Netlink xfrm packet types for IPsec

    rust-netlink/netlink-packet-xfrm's past year of commit activity
    Rust 3 MIT 6 0 0 Updated Sep 13, 2026
  • rust-netlink/netlink-packet-sock-diag's past year of commit activity
    Rust 11 MIT 16 4 1 Updated Sep 13, 2026

Top languages

Rust

Most used topics

Loading…