This package implements the Linux Kernel Netlink protocol, for interacting with the systems network stack and related subsystems.
The source for this project is hosted on both GitHub and Codeberg.
Warning
This package is still under heavy development, it's API may change unprompted, or may behave in unexpected or destructive ways.
USE AT YOUR OWN RISK!
Guiding Principles:
- Ecosystem compatibility:
- Use interfaces defined in the Go standard library, such as encoding.BinaryMarshaler and encoding.BinaryUnmarshaler.
- No third-party dependencies or shell commands.
go get -u go.jamescun.com/netlinkThe netlink package implements the encoding of and exchanging Netlink messages with a unix socket.
go get -u go.jamescun.com/netlink/genetlinkThe genetlink package contains helpers for interacting with the Generic Netlink protocol and it's associated families.
It also implements a client for the Generic Netlink Controller, for discovering what families are available and how to connect to them.
go get -u go.jamescun.com/netlink/rtThe rt package is an implementation of the rtnetlink family, for interacting with system network interfaces, addresses and routing and network neighbors.
The client is implemented in rt, while the individual families are implemented in:
See usage examples in the README.md.
go get -u go.jamescun.com/netlink/tuntapThe tuntap package is an implementation of Linux TUNTAP devices for creating and using Layer-3 TUN and Layer-3 TAP devices.
See usage examples in the README.md.
go get -u go.jamescun.com/netlink/wireguard