Nispor: Unified interface for querying network state
After battling with Linux Network APIs, I decided to create rust project
providing a state describing
API for querying linux kernel network state.
The new project is named as Nispor
, in the short of Network Inspector
.
Why Nispor
In short, existing solutions is not simple enough:
iproute The iproute provides json output, but command line output cannot be really called as a library considering the risk of changing format or string.
NetworkManager NetworkManager are spreading network states among many structs/objects. And it is based on dbus interface, you need to refresh the data using complex async actions.
sysfs Regardless the debate on whether sysfs is a API or not, gathering network state among sysfs folders is time consuming work.
What Nispor can provides
- Pure Rust with promise of memory safe, thread-safe.
- Rust crate.
- C binding written in rust
- Python binding written in Python using the c binding above.
- Best effort on point-in-time consistence of network state.
- Command line tool for debugging or scripting.
- Supporting:
- IPv4/IPv6 address
- Bond
- Linux Bridge
- Linux Bridge VLAN filtering
- VLAN
- VxLAN
- Route
- Dummy
- TUN/TAP
- Veth
- VRF(Virtual Routing and Forwarding)
- SR-IOV
- MacVlan
- MacVtap
How it looks like
The output of npc iface bond99
would be:
|
|
Future of Nispor
- Support applying network configure.
How to Contribute
- Simple good first issues of Nispor
- Contact
Gris
via IRC of Libera or email fge@redhat.com for helps.