YaST2 Developers Documentation: yast2

yast2

modules/Netmask.ycp
Netmask manipulation routines
  • Michal Svec

This module has an unstable interface.

Global Functions

global Check4 (string netmask) -> boolean

Check the IPv4 netmask Note that 0.0.0.0 is not a correct netmask.

Parameters:
netmask network mask
Return value:
true if correct
global Check6 (string netmask) -> boolean

Check the IPv6 netmask

Parameters:
netmask network mask
Return value:
true if correct
global Check (string netmask) -> boolean

Check the netmask

Parameters:
netmask network mask
Return value:
true if correct
global FromBits (integer bits) -> string

Convert netmask in bits form (20) to netmask string (255.255.240.0)

Parameters:
bits number of bits in netmask
Return value:
netmask string
global ToBits (string netmask) -> integer

Convert IPv4 netmask as string (255.255.240.0) to bits form (20)

Parameters:
netmask netmask as string
Return value:
number of bits in netmask; 32 for empty string