blob: 4489cf9dff6e608c38a0107ba8c24070138ae5b3 (
plain) (
tree)
|
|
use igd::aio::search_gateway;
use anyhow::{Result, Context};
use log::*;
pub async fn get_gateway() -> Result<igd::aio::Gateway> {
let gw = search_gateway(Default::default())
.await
.context("Failed to find gateway")?;
info!("Gateway: {}", gw);
return Ok(gw);
}
|