YaST2 Developers Documentation: Network configuration

Network configuration

modules/Routing.ycp
Routing data (/etc/sysconfig/network/routes)
  • Michal Svec

This module has an unstable interface.

See routes(5) Does not work with interface-specific routes yet (ifroute-lo...)

Imports

  • Map
  • NetHwDetection
  • NetworkInterfaces
  • Summary

Includes

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

Global Variables

Global Functions

Local Variables

global Routes -> list<map>

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

global Forward -> boolean

Enable IP forwarding .sysconfig.sysctl.IP_FORWARD

local devices -> list

List of available devices

local Orig_Routes -> list

All routes read at the start

local routes_file -> string

"routes" file location

global Modified () -> boolean

Data was modified?

Return value:
true if modified
global ReadFromGateway (string gw) -> boolean

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

Parameters:
gw ip of the default gateway
Return value:
true if success
global RemoveDefaultGw () -> void

Remove route with default gateway from Routes list

global Read () -> boolean

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

Return value:
true if success
global Write () -> boolean

Write routing settings and apply changes

Return value:
true if success
global Import (map settings) -> boolean

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

Parameters:
settings autoinstallation settings
Return value:
true if success
global Export () -> map

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

Return value:
autoinstallation settings
global GetDevices () -> list

Get the current devices list

Return value:
devices list
global GetGateway () -> string

Get the default gateway

Return value:
gateway
global SetDevices (list devs) -> boolean

Set the available devices list (for expert routing dialog)

Parameters:
devs new devices list
Return value:
true if success
global Summary () -> string

Create routing text summary

Return value:
summary text