Documentation ¶
Overview ¶
Taken from taipei-torrent
Just enough UPnP to be able to forward ports
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { XMLName xml.Name `xml:"device"` DeviceType string `xml:"deviceType"` DeviceList DeviceList `xml:"deviceList"` ServiceList ServiceList `xml:"serviceList"` }
type DeviceList ¶
type DeviceList struct {
Device []Device `xml:"device"`
}
type ExternalIPAddress ¶
type NAT ¶
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) }
protocol is either "udp" or "tcp"
type ServiceList ¶
type ServiceList struct {
Service []UPNPService `xml:"service"`
}
type SoapBody ¶
type SoapBody struct { XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"` ExternalIP *ExternalIPAddressResponse }
type UPNPCapabilities ¶
func Probe ¶
func Probe() (caps UPNPCapabilities, err error)
type UPNPService ¶
Notes ¶
Bugs ¶
TODO: use syscalls to get actual ourIP. http://pastebin.com/9exZG4rh
Click to show internal directories.
Click to hide internal directories.