TorCtl.GeoIPSupport
index
/data/users/mikeperry/code/SOAT/torflow-trunk-clean/TorCtl/GeoIPSupport.py

 
Modules
       
TorCtl.StatsSupport
TorCtl.TorCtl
socket
struct

 
Classes
       
Continent
GeoIPConfig
TorCtl.TorCtl.Router
GeoIPRouter

 
class Continent
    Continent class: The group attribute is to partition the continents
in groups, to determine the number of ocean crossings
 
  Methods defined here:
__init__(self, continent_code)
contains(self, country_code)

 
class GeoIPConfig
    Class to configure GeoIP-based path building
 
  Methods defined here:
__init__(self, unique_countries=None, continent_crossings=4, ocean_crossings=None, entry_country=None, middle_country=None, exit_country=None, excludes=None)

 
class GeoIPRouter(TorCtl.TorCtl.Router)
    Router class extended to GeoIP
 
  Methods defined here:
__init__(self, router)
get_ip_dotted(self)
Convert long int back to dotted quad string

Methods inherited from TorCtl.TorCtl.Router:
__str__(self)
update_to(self, new)
Somewhat hackish method to update this router to be a copy of
'new'
will_exit_to(self, ip, port)
Check the entire exitpolicy to see if the router will allow
connections to 'ip':'port'

Data and other attributes inherited from TorCtl.TorCtl.Router:
build_from_desc = <TorCtl.TorUtil.Callable instance at 0xaef128ac>

 
Functions
       
get_continent(country_code)
Perform country -- continent mapping
get_country(ip)
Get the country via the library
get_country_from_record(ip)
Get the country code out of a GeoLiteCity record (not used)

 
Data
        africa = <TorCtl.GeoIPSupport.Continent instance at 0x826314c>
asia = <TorCtl.GeoIPSupport.Continent instance at 0x8263b6c>
continents = [<TorCtl.GeoIPSupport.Continent instance at 0x826314c>, <TorCtl.GeoIPSupport.Continent instance at 0x8263b6c>, <TorCtl.GeoIPSupport.Continent instance at 0x826e8ec>, <TorCtl.GeoIPSupport.Continent instance at 0x826ea4c>, <TorCtl.GeoIPSupport.Continent instance at 0x826e94c>, <TorCtl.GeoIPSupport.Continent instance at 0x826ee6c>]
europe = <TorCtl.GeoIPSupport.Continent instance at 0x826e8ec>
north_america = <TorCtl.GeoIPSupport.Continent instance at 0x826ea4c>
oceania = <TorCtl.GeoIPSupport.Continent instance at 0x826e94c>
south_america = <TorCtl.GeoIPSupport.Continent instance at 0x826ee6c>