diff options
author | Alexandre Van de Sande <alex.vandesande@ethdev.com> | 2015-02-16 21:43:30 +0800 |
---|---|---|
committer | Alexandre Van de Sande <alex.vandesande@ethdev.com> | 2015-02-16 21:43:30 +0800 |
commit | 3068e2688d88912ec33f3d80fd0fe26c4e897dcd (patch) | |
tree | ee32ccd17faf650f3e933e9a2d8b4ab52f0d7746 /p2p/nat.go | |
parent | 1878630b591b039fadb6f88e15340d04f4af3ed1 (diff) | |
parent | 68f6ddc5aaa7ff29d09c1519ccd38d9cf16c0f75 (diff) | |
download | dexon-3068e2688d88912ec33f3d80fd0fe26c4e897dcd.tar dexon-3068e2688d88912ec33f3d80fd0fe26c4e897dcd.tar.gz dexon-3068e2688d88912ec33f3d80fd0fe26c4e897dcd.tar.bz2 dexon-3068e2688d88912ec33f3d80fd0fe26c4e897dcd.tar.lz dexon-3068e2688d88912ec33f3d80fd0fe26c4e897dcd.tar.xz dexon-3068e2688d88912ec33f3d80fd0fe26c4e897dcd.tar.zst dexon-3068e2688d88912ec33f3d80fd0fe26c4e897dcd.zip |
merge conflicts
Diffstat (limited to 'p2p/nat.go')
-rw-r--r-- | p2p/nat.go | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/p2p/nat.go b/p2p/nat.go deleted file mode 100644 index 9b771c3e8..000000000 --- a/p2p/nat.go +++ /dev/null @@ -1,23 +0,0 @@ -package p2p - -import ( - "fmt" - "net" -) - -func ParseNAT(natType string, gateway string) (nat NAT, err error) { - switch natType { - case "UPNP": - nat = UPNP() - case "PMP": - ip := net.ParseIP(gateway) - if ip == nil { - return nil, fmt.Errorf("cannot resolve PMP gateway IP %s", gateway) - } - nat = PMP(ip) - case "": - default: - return nil, fmt.Errorf("unrecognised NAT type '%s'", natType) - } - return -} |