toolshed v0.2.1 Toolshed.Net

Network related helpers

Link to this section Summary

Functions

Return the hostname

Print out the network interfaces and their addresses

Lookup the specified hostname in the DNS and print out the addresses

Check if a computer is up using TCP

Link to this section Functions

Link to this macro hostent(args \\ []) (macro)
Link to this macro hostent(record, args) (macro)
Link to this function hostname()
hostname() :: String.t()

Return the hostname

Examples

iex> hostname
"nerves-1234"
Link to this function ifconfig()
ifconfig() :: :"do not show this result in output"

Print out the network interfaces and their addresses.

Link to this function nslookup(name)
nslookup(String.t()) :: :"do not show this result in output"

Lookup the specified hostname in the DNS and print out the addresses.

Examples

iex> nslookup "google.com"
Name:     google.com
Address:  172.217.7.238
Address:  2607:f8b0:4004:804::200e
Link to this function tping(address)
tping(String.t()) :: :"do not show this result in output"

Check if a computer is up using TCP.

Examples

iex> tping "google.com"
Host google.com (172.217.7.238) is up

iex(18)> tping "192.168.1.1"
Host 192.168.1.1 (192.168.1.1) is up