YaST2 Developers Documentation: Network configuration

Network configuration

include/network/hardware.ycp
Hardware routines

This module has an unstable interface.

All hardware settings are stored in a global variable Hardware. If you want to add a new HW type, you have to do the following steps: - add the type to ReadHardware - add the type to SelectHardware - add the type to ControllerType

Imports

  • Arch
  • Confirm
  • Map

Local Functions

local DeviceName (map hwdevice) -> string

Extract the device 'name'

Parameters:
hwdevice hardware device
Return value:
name consisting of vendor and device name
local ControllerType (map hwdevice) -> string

Simple convertor from subclass to controller type.

Parameters:
hwdevice map with card info containing "subclass"
Return value:
short device name
Example
 ControllerType() -> "eth"
local ReadHardware (string hwtype) -> list<map>

Read HW information

Parameters:
hwtype type of devices to read (netcard|modem|isdn)
Return value:
true if success
local FindHardware (list Hardware, integer which) -> map

Select the given hardware item or clean up structures (item == nil)

Parameters:
Hardware
which item to be chosen
local SelectHardwareMap (map sel) -> map

Select the given hardware item SelectHardware is a "virtual method", that is named SelectHW in "subclasses" like Lan and Modem.

Parameters:
sel item to be chosen
local SelectHardware (list Hardware, integer which) -> map

Select the given hardware item or clean up structures (item == nil)

Parameters:
Hardware
which item to be chosen