YaST2 Developers Documentation: Network configuration

Network configuration

include/network/lan/wireless.ycp
Wireless dialogs

Imports

  • CWM
  • FileUtils
  • Label
  • Lan
  • Map
  • Message
  • Popup
  • Wizard

Includes

  • network/routines.ycp

Local Functions

local ComposeWepKey (string type, string key) -> string

Compose a typed key into a single-string representation

Parameters:
type "passphrase", "ascii", "hex"
key
Return value:
prefixed key
local CheckWirelessKey (string key, list<integer> lengths) -> boolean

Is the entered key valid? TODO: check according to the selected key length (or better adjust the length?)

Parameters:
key
lengths allowed real key lengths
local ParseKeyLengths (list<string> enc_modes) -> list<integer>

Takes the WEP items from the list and returns the key lengths as integers Like the input, uses the real length which is 24 bits shorter than the marketing one. If the input is nil, return the default set of key lengths.

Parameters:
enc_modes a subset of WEP40, WEP104, WEP128, WEP232, TKIP, CCMP
Return value:
of real key lengths
local AuthModeItems (list<string> authmodes) -> list<term>

Make a list of ComboBox items for authentication mode. We must translate WPA-PSK: it is "wpa-psk" in hwinfo but "psk" in syconfig (#74496).

Parameters:
authmodes allowed modes as returned by hwinfo. nil == don't know.
Return value:
combo box items
local WirelessDialog () -> any

Wireless devices configuration dialog

Return value:
dialog result
local WirelessExpertDialog () -> any

Wireless expert configuration dialog

Return value:
dialog result
local WirelessKeyPopup (string tkey, list<integer> lengths) -> string

Used to add or edit a key

Parameters:
tkey has s: for ascii or h: for passphrase
lengths allowed real key lengths
local WirelessKeysItems (list<string> keys, integer defaultk) -> list<term>

Generate items for the keys table

Parameters:
keys
defaultk
local FindGoodDefault (list<string> keys, integer defaultk) -> integer

In case the current default key is empty, find a nonempty one or the first one.

Parameters:
keys
defaultk
local WirelessKeysDialog () -> any

Wireless expert configuration dialog

Return value:
dialog result
local InitializeWidget (string key) -> void

function to initialize widgets

Parameters:
key widget id
local StoreWidget (string key, map event) -> void

function to store data from widget

Parameters:
key widget id
event ?
local HandleFileBrowse (string key, map event) -> symbol

Called when one of the two file browser buttons is pressed

Parameters:
key widget id
event ?
Return value:
nil so that the dialog does not exit
local ValidateFileExists (string key, map event) -> boolean

Called to validate that the file entered exists

Parameters:
key widget id
event ?
Return value:
ok?
local ValidateWpaEap (string key, map event) -> boolean

Called to validate that the whole dialog makes sense together

Parameters:
key widget id
event ?
Return value:
ok?
local AddButton (string id, string button_id) -> term

Lays out a text entry and a push button, with proper alignment

Parameters:
id
button_id
local WirelessWpaEapDialog () -> any

Settings for WPA-EAP

Return value:
dialog result