[][src]Crate igd

This library allows you to communicate with an IGD enabled device. Use one of the search_gateway functions to obtain a Gateway object. You can then communicate with the device via this object.

Modules

async

This module implements the same features as the main crate, but using async io.

Structs

Gateway

This structure represents a gateway found by the search functions.

Enums

AddAnyPortError

Errors returned by Gateway::add_any_port and Gateway::get_any_address

AddPortError

Errors returned by Gateway::add_port

GetExternalIpError

Errors returned by Gateway::get_external_ip

PortMappingProtocol

Represents the protocols available for port mapping.

RemovePortError

Errors returned by Gateway::remove_port

RequestError

Errors that can occur when sending the request to the gateway.

SearchError

Errors than can occur while trying to find the gateway.

Functions

search_gateway

Search gateway, bind to all interfaces and use a timeout of 3 seconds.

search_gateway_from

Search gateway, bind to the given interface and use a time of 3 seconds.

search_gateway_from_timeout

Search gateway, bind to the given interface and use the given duration for the timeout.

search_gateway_timeout

Search gateway, bind to all interfaces and use the given duration for the timeout.