Package nattraverso :: Module ipdiscover
[show private | hide private]
[frames | no frames]

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

Classes
LocalNetworkMulticast Local IP discovery protocol via multicast:

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) :

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):
  • 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)

Variable Details

__revision__

Type:
str
Value:
'$id'                                                                  

Generated by Epydoc 2.1 on Tue Aug 30 14:56:47 2005 http://epydoc.sf.net