net-route 0.4.6

This crate provides a cross-platform interface for manipulating the routing table
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use net_route::Handle;

#[tokio::main]
async fn main() -> std::io::Result<()> {
    let handle = Handle::new()?;

    if let Some(route) = handle.default_route().await? {
        println!("Default route:\n{:?}", route);
    } else {
        println!("No default route found!");
    }
    Ok(())
}