230. Routing

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

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

230.2. Global Functions

230.2.1. Export

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

Return value

  • map - autoinstallation settings

230.2.2. GetDevices

Get the current devices list

Return value

  • list - devices list

230.2.3. GetGateway

Get the default gateway

Return value

  • string - gateway

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

230.2.5. Modified

Data was modified?

Return value

  • boolean - true if modified

230.2.6. Read

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

Return value

  • boolean - true if success

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

230.2.8. RemoveDefaultGw

Remove route with default gateway from Routes list

Return value

  • void

230.2.9. SetDevices

Set the available devices list (for expert routing dialog)

Function parameters

  • list devs

Return value

  • boolean - true if success

230.2.10. Summary

Create routing text summary

Return value

  • string - summary text

230.2.11. Write

Write routing settings and apply changes

Return value

  • boolean - true if success

230.3. Global Variables

230.3.1. Forward

Enable IP forwarding .sysconfig.sysctl.IP_FORWARD

230.3.2. Routes

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

230.4. Module Requirements

230.4.1. Module Imports

  • Map
  • NetHwDetection
  • NetworkInterfaces
  • Summary

230.4.2. Module Includes

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