百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
N

netlink

> 编程语言
开源

用于 Rust 的 netlink 库

328 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

用于 Rust 的 netlink 库

This repository has been deprecated. Subsequent development will take place @rust-netlink.

Netlink

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

Organization

  • the netlink_sys crate provides netlink sockets. Integration with mio and tokio is optional.
  • Each netlink protocol has a netlink-packet- crate that provides the packets for this protocol:
    • 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
  • the netlink-packet-core is the glue for all the other netlink-packet-* crates. It provides a NetlinkMessage 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.
  • 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 provide higher level abstraction for the generic netlink protocol
  • the ethtool crate provide higher level abstraction for ethtool netlink protocol

Altnernatives

  • https://github.com/jbaublitz/neli: the main alternative to these crates, as it is actively developed.
  • 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

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.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustlinuxnetlinkrtnetlinkrust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言