igd 0.12.1

Internet Gateway Protocol client
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
extern crate igd;

fn main() {
    match igd::search_gateway(Default::default()) {
        Err(ref err) => println!("Error: {}", err),
        Ok(gateway) => match gateway.remove_port(igd::PortMappingProtocol::TCP, 80) {
            Err(ref err) => {
                println!("There was an error! {}", err);
            }
            Ok(()) => {
                println!("It worked");
            }
        },
    }
}