249. Routing

Routing data (/etc/sysconfig/network/routes)

249.1. Authors

  • Michal Svec <msvec@suse.cz>

249.2. Summary of Module Globals

List of Global Functions

  • Export - Dump the Routing settings to a map, for autoinstallation use.

  • GetDevices - Get the current devices list

  • GetGateway - Get the default gateway

  • Import - Get all the Routing configuration from a map. When called by routing_auto (preparing autoinstallation data) the map may be empty.

  • Modified - Data was modified?

  • Read - Read routing settings If no routes, sets a default gateway from Detection

  • ReadFromGateway - Set the routes to contain only the default route, if it is defined. Used when there is nothing better.

  • RemoveDefaultGw - Remove route with default gateway from Routes list

  • SetDevices - Set the available devices list (for expert routing dialog)

  • Summary - Create routing text summary

  • Write - Write routing settings and apply changes

List of Global Variables

  • Forward - Enable IP forwarding .sysconfig.sysctl.IP_FORWARD

  • Routes - All routes list <map <string, string> >: keys: destination, gateway, netmask, [device, [extrapara]]

249.3. Global Functions

249.3.1. Export

Dump the Routing settings to a map, for autoinstallation use.

Return value

  • map - autoinstallation settings

249.3.2. GetDevices

Get the current devices list

Return value

  • list - devices list

249.3.3. GetGateway

Get the default gateway

Return value

  • string - gateway

249.3.4. Import

Get all the Routing configuration from a map. When called by routing_auto (preparing autoinstallation data) the map may be empty.

Function parameters

  • map settings

Return value

  • boolean - true if success

249.3.5. Modified

Data was modified?

Return value

  • boolean - true if modified

249.3.6. Read

Read routing settings If no routes, sets a default gateway from Detection

Return value

  • boolean - true if success

249.3.7. ReadFromGateway

Set the routes to contain only the default route, if it is defined. Used when there is nothing better.

Function parameters

  • string gw

Return value

  • boolean - true if success

249.3.8. RemoveDefaultGw

Remove route with default gateway from Routes list

Return value

  • void

249.3.9. SetDevices

Set the available devices list (for expert routing dialog)

Function parameters

  • list devs

Return value

  • boolean - true if success

249.3.10. Summary

Create routing text summary

Return value

  • string - summary text

249.3.11. Write

Write routing settings and apply changes

Return value

  • boolean - true if success

249.4. Global Variables

249.4.1. Forward

Enable IP forwarding .sysconfig.sysctl.IP_FORWARD

249.4.2. Routes

All routes list <map <string, string> >: keys: destination, gateway, netmask, [device, [extrapara]]

249.5. Module Requirements

249.5.1. Module Imports

  • Map
  • NetHwDetection
  • NetworkInterfaces
  • Summary

249.5.2. Module Includes

  • network/routines.ycp
  • network/runtime.ycp