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

  2. mptcp-pm mptcp-pm Public

    Rust 3 5

  3. ethtool ethtool Public

    Rust 12 17

  4. wl-nl80211 wl-nl80211 Public

    Rust 21 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 29 repositories
  • wl-nl80211 Public
    rust-netlink/wl-nl80211's past year of commit activity
    Rust 21 MIT 21 4 0 Updated Nov 17, 2026
  • rust-netlink/netlink-packet-core's past year of commit activity
    Rust 11 MIT 27 1 0 Updated Nov 15, 2026
  • iproute-rs Public

    CLI tool for rust-netlink

    rust-netlink/iproute-rs's past year of commit activity
    Rust 7 MIT 7 0 0 Updated Nov 15, 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 Nov 15, 2026
  • audit Public
    rust-netlink/audit's past year of commit activity
    Rust 7 MIT 6 1 0 Updated Nov 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 Nov 15, 2026
  • mptcp-pm Public
    rust-netlink/mptcp-pm's past year of commit activity
    Rust 3 MIT 5 0 0 Updated Nov 15, 2026
  • nl-l2tp Public
    rust-netlink/nl-l2tp's past year of commit activity
    Rust 0 MIT 1 0 0 Updated Nov 15, 2026
  • nl-fou Public
    rust-netlink/nl-fou's past year of commit activity
    Rust 0 MIT 1 0 0 Updated Nov 15, 2026
  • nl-macsec Public
    rust-netlink/nl-macsec's past year of commit activity
    Rust 0 MIT 1 0 0 Updated Nov 15, 2026

Top languages

Rust

Most used topics

Loading…