Difference between revisions of "Ns addrbyhost"

From AOLserver Wiki
Jump to navigation Jump to search
(imported from WiKit id 516)
 
 
Line 9: Line 9:
 
'''SYNOPSIS'''
 
'''SYNOPSIS'''
  
: '''ns_addrbyhost''' ''hostname''
+
: '''ns_addrbyhost''' ''?-all?'' ''hostname''
  
 
'''DESCRIPTION'''
 
'''DESCRIPTION'''
  
 
: This command resolves a hostname to its IP address.  If the hostname cannot be resolved, it throws an error.
 
: This command resolves a hostname to its IP address.  If the hostname cannot be resolved, it throws an error.
 +
 +
: -all switch is new in AOLserver 4.5 and will return a list of all IP addresses when more than one A or CNAME DNS record exists for this host.
  
 
'''EXAMPLES'''
 
'''EXAMPLES'''

Latest revision as of 21:46, 3 October 2009

Man page: http://aolserver.com/docs/tcl/ns_addrbyhost.html


NAME

ns_addrbyhost - Forward lookup a hostname to its IP address

SYNOPSIS

ns_addrbyhost ?-all? hostname

DESCRIPTION

This command resolves a hostname to its IP address. If the hostname cannot be resolved, it throws an error.
-all switch is new in AOLserver 4.5 and will return a list of all IP addresses when more than one A or CNAME DNS record exists for this host.

EXAMPLES

 % ns_addrbyhost www.aol.com
 64.12.187.22
 % ns_addrbyhost bogus.domain
 could not lookup bogus.domain
     while executing
 "ns_addrbyhost bogus.domain"

SEE ALSO

ns_hostbyaddr

Category Documentation - Category Core Tcl API