package natpmp

Import Path
	github.com/jackpal/go-nat-pmp (on go.dev)

Dependency Relation
	imports 3 packages, and imported by one package

Involved Source Files natpmp.go network.go recorder.go
Package-Level Type Names (total 3)
/* sort by: | */
Results of the NAT-PMP AddPortMapping operation InternalPort uint16 MappedExternalPort uint16 PortMappingLifetimeInSeconds uint32 SecondsSinceStartOfEpoc uint32 func (*Client).AddPortMapping(protocol string, internalPort, requestedExternalPort int, lifetime int) (result *AddPortMappingResult, err error)
Client is a NAT-PMP protocol client. Add (or delete) a port mapping. To delete a mapping, set the requestedExternalPort and lifetime to 0. Note that this call can take up to 128 seconds to return. Get the external address of the router. Note that this call can take up to 128 seconds to return. func NewClient(gateway net.IP) (nat *Client) func NewClientWithTimeout(gateway net.IP, timeout time.Duration) (nat *Client)
Results of the NAT-PMP GetExternalAddress operation. ExternalIPAddress [4]byte SecondsSinceStartOfEpoc uint32 func (*Client).GetExternalAddress() (result *GetExternalAddressResult, err error)
Package-Level Functions (total 2)
Create a NAT-PMP client for the NAT-PMP server at the gateway. Uses default timeout which is around 128 seconds.
Create a NAT-PMP client for the NAT-PMP server at the gateway, with a timeout. Timeout defines the total amount of time we will keep retrying before giving up.
Package-Level Constants (only one)