Rod Hynes 8a972ef75d Use Go modules 3 lat temu
..
nlenc daa4cdb535 Vendor dependency missed in f035376 4 lat temu
.gitignore 8a972ef75d Use Go modules 3 lat temu
CHANGELOG.md f035376103 Update vendored github.com/mdlayher/netlink 4 lat temu
LICENSE.md f035376103 Update vendored github.com/mdlayher/netlink 4 lat temu
README.md f035376103 Update vendored github.com/mdlayher/netlink 4 lat temu
align.go f915f6fa7f Vendor packetman dependencies 5 lat temu
attribute.go f035376103 Update vendored github.com/mdlayher/netlink 4 lat temu
conn.go f035376103 Update vendored github.com/mdlayher/netlink 4 lat temu
conn_linux.go f035376103 Update vendored github.com/mdlayher/netlink 4 lat temu
conn_others.go f035376103 Update vendored github.com/mdlayher/netlink 4 lat temu
debug.go f915f6fa7f Vendor packetman dependencies 5 lat temu
doc.go f915f6fa7f Vendor packetman dependencies 5 lat temu
errors.go f035376103 Update vendored github.com/mdlayher/netlink 4 lat temu
fuzz.go f035376103 Update vendored github.com/mdlayher/netlink 4 lat temu
message.go f035376103 Update vendored github.com/mdlayher/netlink 4 lat temu
netlink.dot f035376103 Update vendored github.com/mdlayher/netlink 4 lat temu
netlink.svg f035376103 Update vendored github.com/mdlayher/netlink 4 lat temu
netns_linux.go f035376103 Update vendored github.com/mdlayher/netlink 4 lat temu
tools.go f035376103 Update vendored github.com/mdlayher/netlink 4 lat temu

README.md

netlink Test Status Go Reference Go Report Card

Package netlink provides low-level access to Linux netlink sockets. MIT Licensed.

For more information about how netlink works, check out my blog series on Linux, Netlink, and Go.

If you have any questions or you'd like some guidance, please join us on Gophers Slack in the #networking channel!

Stability

See the CHANGELOG file for a description of changes between releases.

This package has a stable v1 API and any future breaking changes will prompt the release of a new major version. Features and bug fixes will continue to occur in the v1.x.x series.

In order to reduce the maintenance burden, this package is only supported on Go 1.12+. Older versions of Go lack critical features and APIs which are necessary for this package to function correctly.

If you depend on this package in your applications, please use Go modules.

Design

A number of netlink packages are already available for Go, but I wasn't able to find one that aligned with what I wanted in a netlink package:

  • Straightforward, idiomatic API
  • Well tested
  • Well documented
  • Doesn't use package/global variables or state
  • Doesn't necessarily need root to work

My goal for this package is to use it as a building block for the creation of other netlink family packages.

Ecosystem

Over time, an ecosystem of Go packages has developed around package netlink. Many of these packages provide building blocks for further interactions with various netlink families, such as NETLINK_GENERIC or NETLINK_ROUTE.

To have your package included in this diagram, please send a pull request!

netlink ecosystem