netutils
Network configuration utilities for Linux, includes ip, ss, tc and bridge.
netutils is a Rust implementation of iproute2, the standard tools for
configuring networking on Linux: ip, ss, tc and bridge. It is at a
very early stage. ip can parse ip link commands and print their help,
but doesn't talk to the kernel yet, and the other tools are placeholders.
iproute2
Linux networking is configured through netlink, a socket-based interface
between the kernel and userspace. Alexey Kuznetsov created netlink in the
Linux 2.0 era as a more flexible alternative to ioctl. He also wrote
iproute2, the tools that use it: ip for addresses, links, routes and
tunnels, ss for inspecting sockets, tc for traffic control and bridge
for bridge devices.
iproute2 is the modern replacement for the older net-tools: ip takes over
from ifconfig, route and arp, ss from netstat, and bridge from
brctl. Stephen Hemminger and David Ahern
maintain it today, and it is licensed under GPL-2.0.
This project
The iproute2 command syntax is unusual: commands are nested several levels
deep (ip link add … type vxlan …), and each object type has its own
grammar. netutils describes each command once, as an annotated Rust type, and
generates the parser, help text and shell completions from that definition.
Generating man pages from the same definitions is planned, and so is the
netlink side that actually applies the changes.