aboutsummaryrefslogblamecommitdiff
path: root/src/gw.rs
blob: 4489cf9dff6e608c38a0107ba8c24070138ae5b3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                         
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);
}