Home | Trees | Index | Help |
---|
Package nattraverso :: Module ipdiscover |
|
Generic methods to retreive the IP address of the local machine.
TODO: ExampleVersion: 0.1.0
Author: Raphael Slinckx
Contact: raphael@slinckx.net
Copyright: Copyright 2005
License: LGPL
Classes | |
---|---|
LocalNetworkMulticast |
Local IP discovery protocol via multicast: |
Function Summary | |
---|---|
twisted.internet.defer.Deferred
|
Returns a deferred which will be called with a 2-uple (wan_flag, ip_address): |
twisted.internet.defer.Deferred
|
Returns a deferred which will be called with a 2-uple (lan_flag, ip_address) : |
Init a UDP socket ip discovery. | |
twisted.internet.defer.Deferred
|
Init a multicast ip address discovery. |
Called when we received the ip address via udp multicast. | |
Called when we got the local ip of this machine. | |
Called when we could not retreive by any mean the ip of this machine. | |
Called when the UPnP device failed to return external address. | |
Called when an external ip is found through UPNP. |
Variable Summary | |
---|---|
str |
__revision__ = '$id'
|
Function Details |
---|
get_external_ip()Returns a deferred which will be called with a 2-uple (wan_flag, ip_address):
|
get_local_ip()Returns a deferred which will be called with a 2-uple (lan_flag, ip_address) :
|
_get_via_connected_udp(ipaddr)Init a UDP socket ip discovery. We do a dns query, and retreive our ip address from the connected udp socket.
|
_get_via_multicast()Init a multicast ip address discovery.
|
_got_multicast_ip(ipaddr)Called when we received the ip address via udp multicast.
|
_on_local_ip(result)Called when we got the local ip of this machine. If we have a WAN address, we return immediately, else we try to discover ip address through UPnP.
|
_on_no_local_ip(error)Called when we could not retreive by any mean the ip of this machine. We simply assume there is no connectivity, and return localhost address. |
_on_no_upnp_external_found(error, ipaddr)Called when the UPnP device failed to return external address.
|
_on_upnp_external_found(ipaddr)Called when an external ip is found through UPNP.
|
Variable Details |
---|
__revision__
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Tue Aug 30 14:56:47 2005 | http://epydoc.sf.net |