NetworkDevice

com.malliina.network.NetworkDevice$
See theNetworkDevice companion trait

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Value members

Inherited methods

def addresses: Seq[InetAddress]

Attributes

Inherited from:
NetworkDevice
def adjacentIPs(sampleIP: String, radius: Int): List[String]

Given sampleIP, which is a numerical IP address, returns a list of addresses close to that IP. A subnet of 255.255.255.0 is assumed.

Given sampleIP, which is a numerical IP address, returns a list of addresses close to that IP. A subnet of 255.255.255.0 is assumed.

The IPs are returned in increasing order.

Example: if sampleIP is 10.0.0.6 and radius is 2, this method returns the following IPs: 10.0.0.4, 10.0.0.5, 10.0.0.7, 10.0.0.8.

Attributes

radius

the maximum distance from sampleIP of the returned addresses

sampleIP

a sample IP

Returns:

addresses in the same subnet as sampleIP, excluding sampleIP

Inherited from:
NetworkDevice
def hostAddresses: Seq[String]

Attributes

Inherited from:
NetworkDevice
def ipSplit(ip: String): (String, Int)

Attributes

ip

a numerical IP address

Returns:

the network part of the IP and its last octet

Inherited from:
NetworkDevice
def network(ip: String): String

Attributes

Inherited from:
NetworkDevice