Package mosp :: Module routing
[hide private]
[frames] | no frames]

Module routing

source code

Store and calculate routing data


Author: F. Ludwig

Contact: henne@dcsec.uni-hannover.de

Copyright: (c) 2010-2011, DCSec, Leibniz Universitaet Hannover, Germany

License: GPLv3

Classes [hide private]
  RoutingNode
A routing node.
Functions [hide private]
 
init_array(n, value=0)
Yields n times the value (default=0) to init an array.array.
source code
 
calc(nodes, path=None, dist=True, check=True, setup=True)
Calculate routing tables
source code
 
slow_calc(nodes, path=None, dist=True, check=True, setup=True)
Calculate routing tables in a slower, but memory-saving way.
source code
Variables [hide private]
  __maintainer__ = 'B. Henne'
  __package__ = 'mosp'
Function Details [hide private]

init_array(n, value=0)

source code 

Yields n times the value (default=0) to init an array.array.

Author: F. Ludwig

calc(nodes, path=None, dist=True, check=True, setup=True)

source code 

Calculate routing tables

Parameters:
  • path - sets the base path. It is used to save a cached version of the routing tables
  • dist - if set to false the distance between every node to every other node is not held in memory
  • check - even if the routing tables are loaded from cache files its checked if they are complete - by doing at least one routing iteration. If check is false this is skipped

Author: F. Ludwig

slow_calc(nodes, path=None, dist=True, check=True, setup=True)

source code 

Calculate routing tables in a slower, but memory-saving way.

This method should be used, when big maps are used.

Parameters:
  • path - sets the base path. It is used to save a cached version of the routing tables
  • dist - if set to false the distance between every node to every other node is not held in memory
  • check - even if the routing tables are loaded from cache files its checked if they are complete - by doing at least one routing iteration. If check is false this is skipped

Author: P. Tute