fromFile(klass,
f,
requireNames=True,
defaultRouteName=' *default* ' )
Class Method
| source code
|
Make a new routing table, populated from entries in an open file
object.
The entries are expected to have the form: IP-ADDRESS/MASK-BITS
ROUTE-NAME
The `#' character denotes a comment. Empty lines are allowed.
- Parameters:
f (open file object) - file from whence to read a routing table
requireNames (boolean, default to True) - whether to require route names in the file
defaultRouteName (anything, defaults to '*default*') - default name to give to a route if it does not have a name in the
file; only used if requireNames is False
|