Module nattraverso.ipdiscover
Generic methods to retreive the IP address of the local machine.
TODO: Example
Version: 0.1.0
Author: Raphael Slinckx
Contact: raphael@slinckx.net
Copyright: Copyright 2005
License: LGPL
Function Summary |
twisted.internet.defer.Deferred
|
get_external_ip ()
Returns a deferred which will be called with a 2-uple (wan_flag,
ip_address): |
twisted.internet.defer.Deferred
|
get_local_ip ()
Returns a deferred which will be called with a 2-uple (lan_flag,
ip_address) : |
get_external_ip()
Returns a deferred which will be called with a 2-uple (wan_flag,
ip_address):
-
wan_flag:
-
True if it's a WAN address
-
False if it's a LAN address
-
None if it's a localhost (127.0.0.1) address
-
ip_address: the most accessible ip address of this machine
-
- Returns:
-
A deferred called with the above defined tuple
(type=twisted.internet.defer.Deferred )
|
get_local_ip()
Returns a deferred which will be called with a 2-uple (lan_flag,
ip_address) :
-
lan_flag:
-
True if it's a local network (RFC1918)
-
False if it's a WAN address
-
ip_address is the actual ip address
-
- Returns:
-
A deferred called with the above defined tuple
(type=twisted.internet.defer.Deferred )
|
__revision__
-
- Type:
-
str
- Value:
|