229. Routing

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

229.1. Authors

  • Michal Svec <msvec@suse.cz>

229.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]]

229.3. Global Functions

229.3.1. Export

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

Return value

  • map - autoinstallation settings

229.3.2. GetDevices

Get the current devices list

Return value

  • list - devices list

229.3.3. GetGateway

Get the default gateway

Return value

  • string - gateway

229.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

229.3.5. Modified

Data was modified?

Return value

  • boolean - true if modified

229.3.6. Read

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

Return value

  • boolean - true if success

229.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

229.3.8. RemoveDefaultGw

Remove route with default gateway from Routes list

Return value

  • void

229.3.9. SetDevices

Set the available devices list (for expert routing dialog)

Function parameters

  • list devs

Return value

  • boolean - true if success

229.3.10. Summary

Create routing text summary

Return value

  • string - summary text

229.3.11. Write

Write routing settings and apply changes

Return value

  • boolean - true if success

229.4. Global Variables

229.4.1. Forward

Enable IP forwarding .sysconfig.sysctl.IP_FORWARD

229.4.2. Routes

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

229.5. Module Requirements

229.5.1. Module Imports

  • Map
  • NetHwDetection
  • NetworkInterfaces
  • Summary

229.5.2. Module Includes

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