Loadable Function: name = resolvehost (host)
Loadable Function: [name, address] = resolvehost (host)
Loadable Function: out = resolvehost (host, returntype)

Resolve a network host name or address to network name and address

Inputs

host - Host name or IP address string to resolve.
name - Resolved IP host name.
returntype - ’name’ to get host name, ’address’ to get IP address.

Outputs

name - Resolved IP host name.
address - Resolved IP host address.
out - host name if returntype is ’name’, ipaddress if returntype is ’address’

Example

%% get resolved ip name and address of www.gnu.org
[name, address] = resolvehost ('www.gnu.org');

%% get ip address of www.gnu.org
ipaddress = resolvehost ('www.gnu.org', 'address');

See also: tcp, udp.

Package: instrument-control