Enums§
- Errors that may occur when trying to map a port on the gateway, categorized by the root of the issue.
- Operation codes for NAT-PMP.
- Result codes from a NAT-PMP response. See https://www.rfc-editor.org/rfc/rfc6886#section-3.5
Constants§
- The RFC states that the first response timeout SHOULD be 250 milliseconds, and double on each successive failure.
- NAT-PMP does not require datagrams larger than 16 bytes.
- The default
TimeoutConfig
for NAT-PMP requests.
Functions§
- Attempts to remove a NAT-PMP mapping on the gateway. Using a local port of
None
will remove all port mappings for our client with the given protocol. - Attempt to complete the
ExternalAddress
operation. Returns the public IP address of the gateway. - Attempts to map a port on the gateway using NAT-PMP. Will try to use the given external port if it is
Some
, otherwise it will let the gateway choose. Will request the specified lifetime if it isSome
, otherwise it will use the RFC recommended lifetime.