ActiveHost class
A device found on the network.
Host details are resolved lazily and cached: hostName, deviceName, mdnsInfo, arpData, vendor and getMacAddress only perform their lookup when first accessed, unless discovery already filled them in. Implements Comparable ordering by host id ascending.
Constructors
-
ActiveHost({required InternetAddress internetAddress, List<
OpenPort> openPorts = const [], String? macAddress, PingResponse? pingData, MdnsInfo? mdnsInfoVar, String? hostName}) -
ActiveHost.buildWithAddress({required String address, String? macAddress, List<
OpenPort> openPorts = const [], PingResponse? pingData, MdnsInfo? mdnsInfo}) -
factory
- ActiveHost.fromSendableActiveHost({required SendableActiveHost sendableActiveHost, String? macAddress, MdnsInfo? mdnsInfo})
-
factory
Properties
- address → String
-
The device's IPv4 or IPv6 address as a string.
no setter
-
arpData
→ Future<
ARPData?> -
The neighbor table entry for this address, or null when unavailable.
no setter
-
deviceName
→ Future<
String> -
A human-readable name for the device, suitable for display.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- hostId ↔ String
-
The device specific number in the ip address. In IPv4 numbers after the
last dot, in IPv6 the numbers after the last colon
getter/setter pair
-
hostName
→ Future<
String?> -
Host name of the device, resolved through reverse DNS (PTR).
no setter
- internetAddress ↔ InternetAddress
-
getter/setter pair
-
mdnsInfo
→ Future<
MdnsInfo?> -
mDNS information for this device, when discovery found any.
no setter
-
openPorts
↔ List<
OpenPort> -
List of all the open port of this device
getter/setter pair
- pingData → PingResponse?
-
The ICMP response recorded during discovery, or null when the host was
found through the neighbor table without answering ping.
no setter
- responseTime → Duration?
-
Round-trip time of the discovery ping, or null without pingData.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
vendor
→ Future<
Vendor?> -
The vendor that owns this device's MAC prefix, or null when the MAC
address or vendor table is unavailable. Resolved lazily.
no setter
- weirdHostName ↔ String
-
getter/setter pair
Methods
-
compareTo(
ActiveHost other) → int -
getMacAddress(
) → Future< String?> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveInfo(
) → Future< void> - Resolves every lazy detail of this host: neighbor table entry, device name, mDNS info and host name.
-
setARPData(
) → Future< ARPData?> -
setDeviceName(
) → Future< String> - Set some kind of device name. Will try couple of names, if all are null will just return generic
-
setHostInfo(
) → Future< String?> - Try to find the host name of this device, if not exist host name will stay null
-
setMdnsInfo(
) → Future< MdnsInfo?> - Try to find the mdns name of this device, if not exist mdns name will be null TODO: search mdns name for each device
-
setVendor(
) → Future< Vendor?> -
toString(
) → String -
A string representation of this object.
override
-
toStringFull(
) → Future< String>
Operators
-
operator ==(
Object o) → bool -
The equality operator.
override
Static Methods
-
getPingData(
String host) → PingResponse?
Constants
- generic → const String
- reverseLookupTimeout → const Duration
- Maximum time to wait for a reverse DNS answer before giving up.