aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/nat.go
diff options
context:
space:
mode:
authorPaweł Bylica <pawel.bylica@imapp.pl>2015-02-24 01:39:05 +0800
committerPaweł Bylica <pawel.bylica@imapp.pl>2015-02-24 01:39:05 +0800
commit114c3b4efe7f30ab7be0bec013210e7b4c3d08d7 (patch)
tree5230f6fee87dcbac36e1d71d6ab731b55eab8268 /p2p/nat.go
parentb9894c1d0979b9f3e8428b1dc230f1ece106f676 (diff)
parentdd086791acf477da7641c168f82de70ed0b2dca6 (diff)
downloaddexon-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar
dexon-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar.gz
dexon-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar.bz2
dexon-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar.lz
dexon-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar.xz
dexon-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar.zst
dexon-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.zip
Merge remote-tracking branch 'upstream/develop' into evmjit
Diffstat (limited to 'p2p/nat.go')
-rw-r--r--p2p/nat.go23
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
-}