Implemented support for UPnP

This commit is contained in:
obscuren
2014-02-02 19:22:39 +01:00
parent ae0d4eb7aa
commit 3f503ffc7f
4 changed files with 182 additions and 125 deletions

12
nat.go Normal file
View File

@ -0,0 +1,12 @@
package eth
import (
"net"
)
// protocol is either "udp" or "tcp"
type NAT interface {
GetExternalAddress() (addr net.IP, err error)
AddPortMapping(protocol string, externalPort, internalPort int, description string, timeout int) (mappedExternalPort int, err error)
DeletePortMapping(protocol string, externalPort, internalPort int) (err error)
}