nispor

Unified interface for Linux network state querying

15 stable releases

1.2.14 Sep 18, 2023
1.2.12 Jul 10, 2023
1.2.10 Jan 31, 2023
1.2.9 Dec 13, 2022
0.1.0 Jul 3, 2020

#19 in #network

Download history 1426/week @ 2023-06-06 1646/week @ 2023-06-13 1539/week @ 2023-06-20 2059/week @ 2023-06-27 2030/week @ 2023-07-04 1512/week @ 2023-07-11 1778/week @ 2023-07-18 1259/week @ 2023-07-25 998/week @ 2023-08-01 1409/week @ 2023-08-08 1303/week @ 2023-08-15 1540/week @ 2023-08-22 2090/week @ 2023-08-29 1914/week @ 2023-09-05 1519/week @ 2023-09-12 1291/week @ 2023-09-19

7,016 downloads per month
Used in 7 crates (6 directly)

Apache-2.0

300KB
9K SLoC

The nispor(Network Inspector) project is designed to providing unified interface for Linux network state querying.

Currently providing:

  • Rust crate
  • Python binding
  • C binding
  • Command line tool -- npc

Install

make
sudo PREFIX=/usr make install

Usage

Print all network status

npc

Print network status of certain NIC

npc bond99

Print route entries

npc route

Supported features

  • 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

TODO:

  • Error handling instead of unwrap()/panic!/etc
  • SR-IOV VF-PF relation is possible
  • VLAN QoS
  • Route rule
  • Traffic control
  • Manpage for npc/npd
  • pkgconfig file for nispor C library

What should nispor not do

To make nispor only to small good things, this is the list of things could be done by nispor but should not do:

  • Ordering the network interface configuration base on child/parent, controller/port relationships.
  • Wrapping of multiple kernel options into simple ones.
  • User space networking.
  • Notification on network change.

Dependencies

~7–19MB
~221K SLoC