- Index
- »
- fan.inet
- »
- IpInterface
IpInterface
const class IpInterface : Obj
Network interface which models name and IP addresses assigned
Return string representation
Return true if interface supports multicast
Return list of IP addresses bound to this interface
Return list of all broadcast IP addresses bound to this interface
Find the interface by its name
Find the interface bound to the given IP address
List the interfaces on this machine
Display name of the interface
Return true if point to point interface (PPP through modem)
Maximum transmission unit of interface
Returns the network prefix length in bits for given address
Return true if interface is up and running
Equality is based on interface name and addresses
Media Access Control (MAC) or physical address for this interface return null if address does not exist
Name of the interface
Return true if a loopback interface
Hash code is based on interface name and addresses
IpAddr[] addrs()
Return list of IP addresses bound to this interface
IpAddr[] broadcastAddrs()
Return list of all broadcast IP addresses bound to this interface
Str dis()
Display name of the interface
virtual Bool equals(Obj? obj)
Equality is based on interface name and addresses
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.
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.
Buf? hardwareAddr()
Media Access Control (MAC) or physical address for this interface return null if address does not exist.
virtual Int hash()
Hash code is based on interface name and addresses
Bool isLoopback()
Return true if a loopback interface
Bool isPointToPoint()
Return true if point to point interface (PPP through modem)
Bool isUp()
Return true if interface is up and running
static IpInterface[] list()
List the interfaces on this machine
Int mtu()
Maximum transmission unit of interface
Str name()
Name of the interface
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).
Bool supportsMulticast()
Return true if interface supports multicast
virtual Str toStr()
Return string representation.