resolvehost

Network name or network address

Syntax

name = resolvehost('host')
[name,address] = resolvehost('host')
out = resolvehost('host','returntype')

Arguments

'host'

The network name or network address of host.

'returntype'

Return either the name or address of host

name

Network name of host

address

Network address of host

Description

name = resolvehost('host') returns the name of the specified host. You can specify host as either a network name or a network address. For example, www.yourdomain.com is a network name and 144.212.100.10 is a network address.

[name,address] = resolvehost('host') returns the name and address of the specified host.

out = resolvehost('host','returntype') returns the host name if returntype is name and returns the host address if returntype is address.

Examples

The following commands show how you can return the host name and address.

[name,address] = resolvehost('144.212.100.10')
name = resolvehost('144.212.100.10','name')
address = resolvehost('www.yourdomain.com','address')

See Also

|

Introduced before R2006a