- Source
Methods
getHostnameByIP6Addr(ip6addr) → {null|string}
Look up the hostname associated with the given IPv6 address.
| Name | Type | Description |
|---|---|---|
ip6addr | string | The IPv6 address to look up. |
- Source
Returns the hostname associated with the given IPv6 or null if no matching host could be found or if no hostname is known for the corresponding host.
- Type:
- null |
string
getHostnameByIPAddr(ipaddr) → {null|string}
Look up the hostname associated with the given IPv4 address.
| Name | Type | Description |
|---|---|---|
ipaddr | string | The IPv4 address to look up. |
- Source
Returns the hostname associated with the given IPv4 or null if no matching host could be found or if no hostname is known for the corresponding host.
- Type:
- null |
string
getHostnameByMACAddr(mac) → {null|string}
Look up the hostname associated with the given MAC address.
| Name | Type | Description |
|---|---|---|
mac | string | The MAC address to look up. |
- Source
Returns the hostname associated with the given MAC or null if no matching host could be found or if no hostname is known for the corresponding host.
- Type:
- null |
string
getIP6AddrByMACAddr(mac) → {null|string}
Look up the IPv6 address associated with the given MAC address.
| Name | Type | Description |
|---|---|---|
mac | string | The MAC address to look up. |
- Source
Returns the IPv6 address associated with the given MAC or null if no matching host could be found or if no IPv6 address is known for the corresponding host.
- Type:
- null |
string
getIPAddrByMACAddr(mac) → {null|string}
Look up the IPv4 address associated with the given MAC address.
| Name | Type | Description |
|---|---|---|
mac | string | The MAC address to look up. |
- Source
Returns the IPv4 address associated with the given MAC or null if no matching host could be found or if no IPv4 address is known for the corresponding host.
- Type:
- null |
string
getMACAddrByIP6Addr(ip6addr) → {null|string}
Look up the MAC address associated with the given IPv6 address.
| Name | Type | Description |
|---|---|---|
ip6addr | string | The IPv6 address to look up. |
- Source
Returns the MAC address associated with the given IPv6 or null if no matching host could be found or if no MAC address is known for the corresponding host.
- Type:
- null |
string
getMACAddrByIPAddr(ipaddr) → {null|string}
Look up the MAC address associated with the given IPv4 address.
| Name | Type | Description |
|---|---|---|
ipaddr | string | The IPv4 address to look up. |
- Source
Returns the MAC address associated with the given IPv4 or null if no matching host could be found or if no MAC address is known for the corresponding host.
- Type:
- null |
string
getMACHints(preferIp6opt) → {Array.<Array.<string>>}
Return an array of (MAC address, name hint) tuples sorted by MAC address.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
preferIp6 | boolean | <optional> | false | Whether to prefer IPv6 addresses ( |
- Source
Returns an array of arrays containing a name hint for each found MAC address on the system. The array is sorted ascending by MAC.
Each item of the resulting array is a two element array with the MAC being the first element and the name hint being the second element. The name hint is either the hostname, an IPv4 or an IPv6 address related to the MAC address.
If no hostname but both IPv4 and IPv6 addresses are known, the preferIP6 flag specifies whether the IPv6 or the IPv4 address is used as hint.
- Type:
- Array.<Array.<string>>