Documentation ¶
Overview ¶
Package nat implements NAT handling facilities
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NAT ¶
type NAT interface { // Type returns the kind of NAT port mapping service that is used Type() string // GetDeviceAddress returns the internal address of the gateway device. GetDeviceAddress() (addr net.IP, err error) // GetExternalAddress returns the external address of the gateway device. GetExternalAddress() (addr net.IP, err error) // GetInternalAddress returns the address of the local host. GetInternalAddress() (addr net.IP, err error) // AddPortMapping maps a port on the local host to an external port. // protocol is either "udp" or "tcp" AddPortMapping(protocol string, externalPort int, internalPort int, description string, timeout time.Duration) (mappedExternalPort, mappedInternalPort int, err error) // DeletePortMapping removes a port mapping. DeletePortMapping(protocol string, externalPort int) (err error) }
NAT is the nat interface
func DiscoverGateway ¶
DiscoverGateway attempts to find a gateway device.
Click to show internal directories.
Click to hide internal directories.