Documentation
¶
Index ¶
Constants ¶
View Source
const RECOMMENDED_MAPPING_LIFETIME_SECONDS = 3600
The recommended mapping lifetime for AddPortMapping
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddPortMappingResult ¶
type AddPortMappingResult struct {
SecondsSinceStartOfEpoc uint32
InternalPort uint16
MappedExternalPort uint16
PortMappingLifetimeInSeconds uint32
}
Results of the NAT-PMP AddPortMapping operation
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a NAT-PMP protocol client.
func (*Client) AddPortMapping ¶
func (n *Client) AddPortMapping(protocol string, internalPort, requestedExternalPort int, lifetime int) (result *AddPortMappingResult, err error)
Add (or delete) a port mapping. To delete a mapping, set the requestedExternalPort and lifetime to 0
func (*Client) GetExternalAddress ¶
func (n *Client) GetExternalAddress() (result *GetExternalAddressResult, err error)
Get the external address of the router.
type GetExternalAddressResult ¶
Results of the NAT-PMP GetExternalAddress operation
Click to show internal directories.
Click to hide internal directories.