YaST2 Developers Documentation: Network configuration

Network configuration

modules/NetHwDetection.ycp
Network detection
  • Michal Svec

This module has an unstable interface.

Detects network settings, using dhcp or sniffing network traffic

Detection process:

Initial stage:

  • hardware detection
  • load kernel modules (if not already active *1)
  • set up interface (if not already set up *2)
  • run detection

Final stage:

  • read detection data
  • shut down interfaces (if set up before, see *2)
  • remove kernel modules (if loaded before, see *1)

Used software:

  • dhcpcd(8)
  • netprobe(8) (currently not, originally by Caldera, license unclear)

Usage:

  • Detection::Start() somewhere at the start of installation

Later at the module:

  • if(Detection::running) Detection::Stop();
  • string gw = Detection::result["GATEWAY"]:"";

Imports

  • Directory
  • Package
  • String

Includes

  • network/hardware.ycp

Global Variables

Global Functions

Local Functions

global result -> map

Detection result (in dhcpcd-interface.info format)

global running -> boolean

True, if detection is running

local StartEthInterface () -> boolean

Set up the first eth interface, if not already running WATCH OUT, this is the place where modules are loaded

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

Start the detection

Return value:
true on success
global Stop () -> boolean

Stop the detection

Return value:
true on success
global DuplicateIP (string ip) -> boolean

Duplicate IP detection

Parameters:
ip tested IP address
Return value:
true if duplicate found
See
arping(8), ip(8)
global ResolveIP (string ip) -> string

Resolve IP to hostname

Parameters:
ip given IP address
Return value:
resolved host