{"id":13648707,"url":"https://github.com/little-dude/netlink","last_synced_at":"2025-04-22T11:32:58.208Z","repository":{"id":38554532,"uuid":"132674316","full_name":"little-dude/netlink","owner":"little-dude","description":"netlink libraries for rust","archived":true,"fork":false,"pushed_at":"2022-10-26T07:37:24.000Z","size":1379,"stargazers_count":331,"open_issues_count":36,"forks_count":89,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-05-01T16:49:01.497Z","etag":null,"topics":["linux","netlink","rtnetlink","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/little-dude.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":"audit/Cargo.toml","citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-08T23:03:11.000Z","updated_at":"2024-04-11T09:45:34.000Z","dependencies_parsed_at":"2022-07-21T21:32:42.491Z","dependency_job_id":null,"html_url":"https://github.com/little-dude/netlink","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-dude%2Fnetlink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-dude%2Fnetlink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-dude%2Fnetlink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-dude%2Fnetlink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/little-dude","download_url":"https://codeload.github.com/little-dude/netlink/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250232439,"owners_count":21396643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux","netlink","rtnetlink","rust"],"created_at":"2024-08-02T01:04:28.218Z","updated_at":"2025-04-22T11:32:57.703Z","avatar_url":"https://github.com/little-dude.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/little-dude/netlink.svg?branch=master)](https://travis-ci.org/little-dude/netlink)\n\n# This repository has been deprecated. Subsequent development will take place [@rust-netlink](https://github.com/rust-netlink).\n\n# Netlink\n\nThis project aims at providing building blocks for [netlink][man-netlink] (see `man 7 netlink`).\n\n## Organization\n\n- the [`netlink_sys`](./netlink-sys) crate provides netlink sockets. Integration with [`mio`][mio] and [`tokio`][tokio]\n  is optional.\n- Each netlink protocol has a `netlink-packet-\u003cprotocol_name\u003e` crate that provides the packets for this protocol:\n    - [`netlink-packet-route`](./netlink-packet-route) provides messages for the [route protocol][man-rtnetlink]\n    - [`netlink-packet-audit`](./netlink-packet-audit) provides messages for the [audit][man-audit] protocol\n    - [`netlink-packet-sock-diag`](./netlink-packet-sock-diag) provides messages for the [sock-diag][man-sock-diag]\n      protocol\n    - [`netlink-packet-generic`](./netlink-packet-generic) provides message for the [generic netlink][man-genl]\n      protocol\n    - [`netlink-packet-netfilter`](./netlink-packet-netfilter) provides message for the `NETLINK_NETFILTER`\n      protocol\n- the [`netlink-packet-core`](./netlink-packet-core) is the glue for all the other `netlink-packet-*` crates. It\n  provides a `NetlinkMessage\u003cT\u003e` type that represent any netlink message for any sub-protocol.\n- the [`netlink_proto`](./netlink-proto) crate is an asynchronous implementation of the netlink protocol. It only\n  depends on `netlink-packet-core` for the `NetlinkMessage` type and `netlink-sys` for the socket.\n- the [`rtnetlink`](./rtnetlink) crate provides higher level abstraction for the [route protocol][man-rtnetlink]\n- the [`audit`](./audit) crate provides higher level abstractions for the audit protocol.\n- the [`genetlink`](./genetlink) crate provide higher level abstraction for the\n  [generic netlink protocol][man-genl]\n- the [`ethtool`](./ethtool) crate provide higher level abstraction for\n  [ethtool netlink protocol][ethtool-kernel-doc]\n\n\n## Altnernatives\n\n- https://github.com/jbaublitz/neli: the main alternative to these crates, as it is actively developed.\n- Other but less actively developed alternatives:\n  - https://github.com/achanda/netlink\n  - https://github.com/polachok/pnetlink\n  - https://github.com/crhino/netlink-rs\n  - https://github.com/carrotsrc/rsnl\n  - https://github.com/TaborKelly/nl-utils\n\n## Credits\n\nMy main resource so far has been the source code of [`pyroute2`][pyroute2] (python) and [`netlink`][netlink-go] (golang)\na lot. These two projects are great, and very nicely written. As someone who does not read C fluently, and that does not\nknow much about netlink, they have been invaluable.\n\nI'd also like to praise [`libnl`][libnl] for its documentation. It helped me a lot in understanding the protocol basics.\n\nThe whole packet parsing logic is inspired by @whitequark excellent blog posts ([part 1][whitequark-1], [part\n2][whitequark-2] and [part 3][whitequark-3], although I've only really used the concepts described in the first blog\npost).\n\nThanks also to the people behind [tokio](tokio.rs) for the amazing\ntool they are building, and the support they provide.\n\n[man-netlink]: https://www.man7.org/linux/man-pages/man7/netlink.7.html\n[man-audit]: https://man7.org/linux/man-pages/man3/audit_open.3.html\n[man-sock-diag]: https://www.man7.org/linux/man-pages/man7/sock_diag.7.html\n[man-rtnetlink]: https://www.man7.org/linux/man-pages/man7/rtnetlink.7.html\n[man-genl]: https://www.man7.org/linux/man-pages/man8/genl.8.html\n[generic-netlink-lwn]: https://lwn.net/Articles/208755/\n[mio]: https://github.com/tokio-rs/mio\n[tokio]: https://github.com/tokio-rs/tokio\n[route-proto-doc]: https://www.infradead.org/~tgr/libnl/doc/route.html\n[netlink-go]: https://github.com/vishvananda/netlink\n[pyroute2]: https://github.com/svinota/pyroute2/tree/master/pyroute2/netlink\n[libnl]: https://www.infradead.org/~tgr/libnl\n[whitequark-1]: https://lab.whitequark.org/notes/2016-12-13/abstracting-over-mutability-in-rust\n[whitequark-2]: https://lab.whitequark.org/notes/2016-12-17/owning-collections-in-heap-less-rust\n[whitequark-3]: https://lab.whitequark.org/notes/2017-01-16/abstracting-over-mutability-in-rust-macros\n[ethtool-kernel-doc]: https://www.kernel.org/doc/html/latest/networking/ethtool-netlink.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittle-dude%2Fnetlink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flittle-dude%2Fnetlink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittle-dude%2Fnetlink/lists"}