class

IpInterface

const class IpInterface : Obj

Network interface which models name and IP addresses assigned

methods toStr

Return string representation

supportsMulticast

Return true if interface supports multicast

addrs

Return list of IP addresses bound to this interface

broadcastAddrs

Return list of all broadcast IP addresses bound to this interface

findByName

Find the interface by its name

findByAddr

Find the interface bound to the given IP address

list

List the interfaces on this machine

dis

Display name of the interface

isPointToPoint

Return true if point to point interface (PPP through modem)

mtu

Maximum transmission unit of interface

prefixSize

Returns the network prefix length in bits for given address

isUp

Return true if interface is up and running

equals

Equality is based on interface name and addresses

hardwareAddr

Media Access Control (MAC) or physical address for this interface return null if address does not exist

name

Name of the interface

isLoopback

Return true if a loopback interface

hash

Hash code is based on interface name and addresses

addrs IpAddr[] addrs()

Return list of IP addresses bound to this interface

broadcastAddrs IpAddr[] broadcastAddrs()

Return list of all broadcast IP addresses bound to this interface

dis Str dis()

Display name of the interface

equals virtual Bool equals(Obj? obj)

Equality is based on interface name and addresses

findByAddr static IpInterface? findByAddr(IpAddr addr, Bool checked)

Find the interface bound to the given IP address. If multiple interfaces are bound to the address it is undefined which one is returned. If no interfaces are bound then return null or raise UnresolvedErr based on checked flag.

findByName static IpInterface? findByName(Str name, Bool checked)

Find the interface by its name. If the interface is not found then return null or raise UnresolvedErr based on checked flag.

hardwareAddr Buf? hardwareAddr()

Media Access Control (MAC) or physical address for this interface return null if address does not exist.

hash virtual Int hash()

Hash code is based on interface name and addresses

isLoopback Bool isLoopback()

Return true if a loopback interface

isPointToPoint Bool isPointToPoint()

Return true if point to point interface (PPP through modem)

isUp Bool isUp()

Return true if interface is up and running

list static IpInterface[] list()

List the interfaces on this machine

mtu Int mtu()

Maximum transmission unit of interface

name Str name()

Name of the interface

prefixSize Int prefixSize(IpAddr addr)

Returns the network prefix length in bits for given address. This is also known as the subnet mask in the context of IPv4 addresses. Typical IPv4 values would be 8 (255.0.0.0), 16 (255.255.0.0) or 24 (255.255.255.0).

supportsMulticast Bool supportsMulticast()

Return true if interface supports multicast

toStr virtual Str toStr()

Return string representation.

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST