Class Val.Inet


Lightweight IPv4 and IPv6 address type that stores the netmask and allows simple arithmetic and comparison operators.

Variable address

int Val.Inet.address


IP address converted to an integer. IPv4 addresses will be 32-bit or less.

Variable masklen

int Val.Inet.masklen


Defines the netmask. For both IPv4 and IPv6 addresses, masklen will be 128 in case of full addresses.

Method create

Val.Inet Val.Inet(int ip, void|int masklen)
Val.Inet Val.Inet()

Parameter ip

An IPv4 or IPv6 ip address.

Parameter masklen

Defines the netmask, always in the range between 0 and 128; i.e. for IPv4 addresses you should add 12 * 8 to the actual IPv4-masklen.