def init_rttable(rt_table, interface):
 if (rt_table in ['local', 'main', 'default']):
  return
 (stdout, _) = run(settings.ip, 'route', 'list', 'dev', interface)
 for line in stdout.split('\n'):
  args = (['route', 'add'] + [x for x in line.split(' ') if x])
  args += ['dev', interface, 'table', rt_table]
  run(settings.ip, *args)

def init_rttable ( rt_table , interface ) : if ( rt_table in [ 'local' , 'main' , 'default' ] ) : return ( stdout , _ ) = run ( settings . ip , 'route' , 'list' , 'dev' , interface ) for line in stdout . split ( '\n' ) : args = ( [ 'route' , 'add' ] + [ x for x in line . split ( ' ' ) if x ] ) args += [ 'dev' , interface , 'table' , rt_table ] run ( settings . ip , * args )
initialise routing table for this interface using routes from main table .