YaST2 Developers Documentation: yast2



functions
files
intro

yast2

modules/IP.ycp
IP manipulation routines

Global Functions

global Valid4 () -> string

Return value:
describe a valid IPv4 address

global Check4 (string ip) -> boolean

Check syntax of IPv4 address

Parameters:
ip IPv4 address
Return value:
true if correct

global Check6 (string ip) -> boolean

Check syntax of IPv6 address

Parameters:
ip IPv6 address
Return value:
true if correct

global Check (string ip) -> boolean

Check syntax of IP address

Parameters:
ip IP address
Return value:
true if correct

global ToInteger (string ip) -> integer

Convert IPv4 address from string to integer

Parameters:
ip IPv4 address
Return value:
ip address as integer

global ToString (integer ip) -> string

Convert IPv4 address from integer to string

Parameters:
ip IPv4 address
Return value:
ip address as string

global ToHex (string ip) -> string

Converts IPv4 address from string to hex format

Parameters:
ip IPv4 address as string in "ipv4" format
Return value:
representing IP in Hex
Example:
  IP::ToHex("192.168.1.1") -> "0xC0A80101"
  IP::ToHex("10.10.0.1") -> "0x0A0A0001"

global ComputeNetwork (string ip, string mask) -> string

Compute IPv4 network address from ip4 address and network mask.

Parameters:
ip IPv4 address
mask netmask
Return value:
computed subnet

global ComputeBroadcast (string ip, string mask) -> string

Compute IPv4 broadcast address from ip4 address and network mask. The broadcast address is the highest address of network address range.

Parameters:
ip IPv4 address
mask netmask
Return value:
computed broadcast

YaST2 Developers Documentation