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 189 94

  2. mptcp-pm mptcp-pm Public

    Rust 3 5

  3. ethtool ethtool Public

    Rust 12 16

  4. wl-nl80211 wl-nl80211 Public

    Rust 20 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 25 repositories
  • iproute-rs Public

    CLI tool for rust-netlink

    rust-netlink/iproute-rs's past year of commit activity
    Rust 6 MIT 7 0 0 Updated Oct 14, 2026
  • nl-fou Public
    rust-netlink/nl-fou's past year of commit activity
    Rust 0 MIT 1 0 0 Updated Oct 14, 2026
  • netlink-packet-fou Public

    Foo over UDP (FOU) generic netlink packet definitions

    rust-netlink/netlink-packet-fou's past year of commit activity
    Rust 0 MIT 1 0 0 Updated Oct 14, 2026
  • ethtool Public
    rust-netlink/ethtool's past year of commit activity
    Rust 12 MIT 16 3 1 Updated Oct 12, 2026
  • netlink-proto Public
    rust-netlink/netlink-proto's past year of commit activity
    Rust 13 MIT 26 7 3 Updated Oct 1, 2026
  • wl-nl80211 Public
    rust-netlink/wl-nl80211's past year of commit activity
    Rust 20 MIT 21 4 1 Updated Oct 1, 2026
  • rtnetlink Public
    rust-netlink/rtnetlink's past year of commit activity
    Rust 189 MIT 94 26 10 Updated Sep 18, 2026
  • netlink-packet-route Public

    Rust crate for the netlink route protocol

    rust-netlink/netlink-packet-route's past year of commit activity
    Rust 76 MIT 83 10 7 Updated Sep 18, 2026
  • rust-netlink/netlink-packet-core's past year of commit activity
    Rust 11 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 13, 2026

Top languages

Rust

Most used topics

Loading…