package portmapper

Import Path
	github.com/tmc/go-iroh/internal/portmapper (on go.dev)

Dependency Relation
	imports 7 packages, and imported by one package

Involved Source Files Package portmapper is a minimal NAT-PMP (RFC 6886) client for requesting a UDP port mapping from a home gateway.
Package-Level Type Names (total 2)
/* sort by: | */
Mapping is a UDP port mapping returned by a gateway. ExternalAddr netip.AddrPort Lifetime time.Duration func NATPMPClient.MapUDP(ctx context.Context, internalPort uint16, suggestedExternalPort uint16, lifetime time.Duration) (Mapping, error)
NATPMPClient is a minimal NAT-PMP client. Gateway netip.Addr Port uint16 Timeout time.Duration ExternalIPv4 returns the public IPv4 address reported by the gateway. MapUDP maps internalPort through the NAT-PMP gateway, requesting the given lifetime. A lifetime of 0 deletes the mapping (RFC 6886 ยง3.4): the gateway removes any mapping for internalPort and returns a zero Mapping.