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:

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 169 86

  2. mptcp-pm mptcp-pm Public

    Rust 2 3

  3. ethtool ethtool Public

    Rust 10 13

  4. wl-nl80211 wl-nl80211 Public

    Rust 18 17

  5. audit audit Public

    Rust 7 4

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

    Used for new crate review

    1

Repositories

Showing 10 of 23 repositories
  • xfrmnetlink Public

    Rut crate for IPsec netlink protocol

    rust-netlink/xfrmnetlink’s past year of commit activity
    Rust 1 3 0 0 Updated Apr 11, 2026
  • netlink-packet-xfrm Public

    Netlink xfrm packet types for IPsec

    rust-netlink/netlink-packet-xfrm’s past year of commit activity
    Rust 2 4 0 1 Updated Apr 11, 2026
  • netlink-packet-route Public

    Rust crate for the netlink route protocol

    rust-netlink/netlink-packet-route’s past year of commit activity
    Rust 62 MIT 75 7 5 Updated Apr 7, 2026
  • iproute-rs Public

    CLI tool for rust-netlink

    rust-netlink/iproute-rs’s past year of commit activity
    Rust 4 3 0 2 Updated Apr 6, 2026
  • netlink-proto Public
    rust-netlink/netlink-proto’s past year of commit activity
    Rust 13 23 6 3 Updated Mar 31, 2026
  • netlink-sys Public

    netlink sockets, with optional integration with tokio

    rust-netlink/netlink-sys’s past year of commit activity
    Rust 18 16 2 3 Updated Mar 8, 2026
  • wl-nl80211 Public
    rust-netlink/wl-nl80211’s past year of commit activity
    Rust 18 17 6 3 Updated Mar 6, 2026
  • audit Public
    rust-netlink/audit’s past year of commit activity
    Rust 7 4 1 0 Updated Feb 26, 2026
  • rtnetlink Public
    rust-netlink/rtnetlink’s past year of commit activity
    Rust 169 86 28 11 Updated Feb 19, 2026
  • ethtool Public
    rust-netlink/ethtool’s past year of commit activity
    Rust 10 13 3 1 Updated Feb 3, 2026

Top languages

Loading…

Most used topics

Loading…