protocol() = tcp | udp
add_port_mapping/4 | |
add_port_mapping/5 | Add a port mapping with an infinie release time. |
add_port_mapping/6 | Add a port mapping and release after Timeout. |
delete_port_mapping/3 | Delete a port mapping from the router. |
discover/0 | discover the gateway and our IP to associate. |
discover/1 | discover the gateway and our IP to associate, stop to wait after a timeout (default is infinity). |
status_info/1 | get router status. |
add_port_mapping(Context::nat_upnp_proto:nat_upnp(), Protocol::protocol(), Port::integer(), Description::string()) -> ok | {error, term()}
add_port_mapping(Context::nat_upnp_proto:nat_upnp(), Protocol::protocol(), ExternalPort::integer(), InternalPort::integer(), Description::string()) -> ok | {error, term()}
Add a port mapping with an infinie release time
add_port_mapping(Context::nat_upnp_proto:nat_upnp(), Protocol::protocol(), ExternalPort::integer(), InternalPort::integer(), Description::string(), Timeout::integer()) -> ok | {error, term()}
Add a port mapping and release after Timeout
delete_port_mapping(Context::nat_upnp_proto:nat_upnp(), Protocol::protocol(), Port::integer()) -> ok | {error, term()}
Delete a port mapping from the router
discover() -> {ok, Context::nat_upnp_proto:nat_upnp()} | {error, term()}
discover the gateway and our IP to associate
discover(Timeout::integer()) -> {ok, Context::nat_upnp_proto:nat_upnp()} | {error, term()}
discover the gateway and our IP to associate, stop to wait after a timeout (default is infinity).
status_info(Context::nat_upnp_proto:nat_upnp()) -> {Status::string(), LastConnectionError::string(), Uptime::string()} | {error, term()}
get router status