diff options
author | Felix Lange <fjl@twurst.com> | 2015-02-12 00:19:31 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-02-13 18:39:31 +0800 |
commit | d0a2e655c9599f462bb20bd49bc69b8e1e330a21 (patch) | |
tree | ebd2685477461d33b80207b5eeee2f08ade33f3a /p2p/nat.go | |
parent | 1543833ca0b920d38e98994367f3871867d66781 (diff) | |
download | go-tangerine-d0a2e655c9599f462bb20bd49bc69b8e1e330a21.tar go-tangerine-d0a2e655c9599f462bb20bd49bc69b8e1e330a21.tar.gz go-tangerine-d0a2e655c9599f462bb20bd49bc69b8e1e330a21.tar.bz2 go-tangerine-d0a2e655c9599f462bb20bd49bc69b8e1e330a21.tar.lz go-tangerine-d0a2e655c9599f462bb20bd49bc69b8e1e330a21.tar.xz go-tangerine-d0a2e655c9599f462bb20bd49bc69b8e1e330a21.tar.zst go-tangerine-d0a2e655c9599f462bb20bd49bc69b8e1e330a21.zip |
cmd/ethereum, cmd/mist, eth, p2p: use package p2p/nat
This deletes the old NAT implementation.
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 -} |