prysm-pulse/vendor/github.com/jackpal/go-nat-pmp
Fynn 5b5cae693f accounts/abi: use unpackTuple to unpack event arguments
Events with just 1 argument fail before this change


Former-commit-id: 69cbb51c56054208417e464dc6e46a94ccb3bbeb [formerly fbb03244929beb0ce8f9c607ce33d107e8319b89]
Former-commit-id: 984154c1ba79f1fe8bf0106a604b2765ea312079
2018-02-16 11:46:25 +01:00
..
LICENSE accounts/abi: use unpackTuple to unpack event arguments 2018-02-16 11:46:25 +01:00
natpmp.go accounts/abi: use unpackTuple to unpack event arguments 2018-02-16 11:46:25 +01:00
network.go accounts/abi: use unpackTuple to unpack event arguments 2018-02-16 11:46:25 +01:00
README.md accounts/abi: use unpackTuple to unpack event arguments 2018-02-16 11:46:25 +01:00
recorder.go accounts/abi: use unpackTuple to unpack event arguments 2018-02-16 11:46:25 +01:00

go-nat-pmp

A Go language client for the NAT-PMP internet protocol for port mapping and discovering the external IP address of a firewall.

NAT-PMP is supported by Apple brand routers and open source routers like Tomato and DD-WRT.

See http://tools.ietf.org/html/draft-cheshire-nat-pmp-03

Build Status

Get the package

go get -u github.com/jackpal/go-nat-pmp

Usage

import (
    "github.com/jackpal/gateway"
    natpmp "github.com/jackpal/go-nat-pmp"
)

gatewayIP, err = gateway.DiscoverGateway()
if err != nil {
    return
}

client := natpmp.NewClient(gatewayIP)
response, err := client.GetExternalAddress()
if err != nil {
    return
}
print("External IP address:", response.ExternalIPAddress)

Clients

This library is used in the Taipei Torrent BitTorrent client http://github.com/jackpal/Taipei-Torrent

Complete documentation

http://godoc.org/github.com/jackpal/go-nat-pmp

License

This project is licensed under the Apache License 2.0.