blob: f716a3faefad3cd4fc734b7321efc63297f43b9b (
plain) (
tree)
|
|
use igd::aio::Gateway;
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);
}
|