YaST2 Developers Documentation: Network configuration

Network configuration

include/network/lan/address.ycp
Network card adresss configuration dialogs

This module has an unstable interface.

Imports

  • Arch
  • CWM
  • CWMTab
  • Detection
  • IP
  • Label
  • Lan
  • Netmask
  • NetworkDevices
  • Popup
  • ProductFeatures
  • Routing
  • SuSEFirewall4Network
  • Wizard

Includes

  • network/summary.ycp
  • network/widgets.ycp

Local Functions

local ChangeDefaults () -> symbol

obsoleted by GetDefaultsForHW

Return value:
`next
local ValueProp (string key) -> symbol

`RadioButtonGroup uses CurrentButton instead of Value, grrr

Parameters:
key widget id
Return value:
what property to ask for to get the widget value
local my2debug (string class, string msg) -> void

Debug messages configurable at runtime

Parameters:
class debug class
msg message to log
local InitAddrWidget (string key) -> void

Default function to init the value of a widget. Used for push buttons.

Parameters:
key id of the widget
local StoreAddrWidget (string key, map event) -> void

Default function to store the value of a widget.

Parameters:
key id of the widget
event the event being handled
local InitializeWidgetRbg (string key) -> void

Initialize a RadioButtonGroup Group called FOO has buttons FOO_bar FOO_qux and values bar qux

Parameters:
key id of the widget
local StoreWidgetRbg (string key, map event) -> void

Store a RadioButtonGroup Group called FOO has buttons FOO_bar FOO_qux and values bar qux

Parameters:
key id of the widget
event the event being handled
local HaveStaticAddress () -> boolean

Helper

Return value:
whether the address is static
local HandleIfcfg (string key, map event) -> symbol

Event handler for ifcfg name enable or disable depending on whether we are adding a new interface

Parameters:
key the widget receiving the event
event the event being handled
Return value:
nil so that the dialog loops on
local HandleStaticAddress (string key, map event) -> symbol

Event handler for static network information: enable or disable depending on whether static setup is enabled

Parameters:
key the widget receiving the event
event the event being handled
Return value:
nil so that the dialog loops on
local HandleButton (string key, map event) -> symbol

Remap the buttons to their Wizard Sequencer values

Parameters:
key the widget receiving the event
event the event being handled
Return value:
nil so that the dialog loops on
local ValidateAddrIP (string key, map event) -> boolean

Validator for IP adresses used for IPADDR and REMOTEIP

Parameters:
key the widget being validated
event the event being handled
Return value:
whether valid
local ValidateNetmask (string key, map event) -> boolean

Validator for network masks adresses

Parameters:
key the widget being validated
event the event being handled
Return value:
whether valid
local ValidateIfcfgType (string key, map event) -> boolean

Validator for ifcfg names

Parameters:
key the widget being validated
event the event being handled
Return value:
whether valid
local InitDialog (string key) -> void

Initialize the dialog as a whole Sets default focus

Parameters:
key id of the widget
local NeedToAssignFwZone (map event) -> boolean

If the traffic would be blocked, ask the user if he wants to change it

Parameters:
event the event being handled
Return value:
change it?
local ValidateDialog (string key, map event) -> boolean

Validator for network masks adresses

Parameters:
key the widget being validated
event the event being handled
Return value:
whether valid
local StoreDialog (string key, map event) -> void

Store values computed from the whole dialog

Parameters:
key the widget being validated
event the event being handled
local BuildTypesListCWM (list<string> types) -> list< list<string> >

Parameters:
types netowrk card types
Return value:
their descriptions for CWM
local CommonBox (term contents) -> term

Wrap contents to a box so that the tabs have the same size

Parameters:
contents the tab contents
Return value:
wrapped contents
local AddressDialog () -> any

Dialog for setting up IP address

Return value:
dialog result