GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • rust-netlink
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles

This view

  • Original page
  • New address

GeezerVison is showing github.com — rust-netlink

README.md

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:

  • The rtnetlink crate provides higher level abstraction for the route protocol
  • The audit crate provides higher level abstractions for the audit protocol.
  • The genetlink crate provides higher level abstraction for the generic netlink protocol
  • The ethtool crate provides higher level abstraction for ethtool netlink protocol
  • The mptcp-pm crate provides MPTCP path manager netlink protocol
  • The wl-nl80211 crate provides wireless nl80211 netlink protocol
  • The nl-wireguard crate provides wireguard netlink protocol
  • The nl-fou crate provides FOU (foo over UDP) netlink protocol
  • The nl-l2tp crate provides L2TP netlink protocol
  • The nl-macsec crate provides MACsec netlink protocol

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

  • Each netlink protocol has a netlink-packet-<protocol_name> crate that provides the packets for this protocol:
    • The netlink-packet-wireguard crate provide netlink message for wireguard.
    • netlink-packet-route provides messages for the route protocol
    • netlink-packet-audit provides messages for the audit protocol
    • netlink-packet-sock-diag provides messages for the sock-diag protocol
    • netlink-packet-generic provides message for the generic netlink protocol
    • netlink-packet-netfilter provides message for the NETLINK_NETFILTER protocol
    • netlink-packet-xfrm provides message for IPsec
    • netlink-packet-fou provides messages for the FOU (foo over UDP) generic netlink protocol
    • netlink-packet-l2tp provides messages for the L2TP generic netlink protocol
    • netlink-packet-macsec provides messages for the MACsec generic netlink protocol

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

  • https://github.com/jbaublitz/neli: the main alternative to these crates, as it is actively developed.
  • https://github.com/one-d-wide/netlink-bindings: Rust bindings for encoding/decoding Netlink messages generated from Linux kernel YAML netlink API
  • Other but less actively developed alternatives:
    • https://github.com/achanda/netlink
    • https://github.com/polachok/pnetlink
    • https://github.com/crhino/netlink-rs
    • https://github.com/carrotsrc/rsnl
    • https://github.com/TaborKelly/nl-utils

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

  • Crate github issue
  • Use Matrix room: #rust-netlink:fedora.im

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

Loading
Type
Language
Sort
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
  • netlink-packet-core Public
    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
View all repositories

People

@cathay4t @JohnTitor

Top languages

Rust

Most used topics

Loading…

Uh oh!

There was an error while loading. Please reload this page.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.