swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
      Other Library Functions  
function   NETGetHostName    

Library: omnetutl - miscellaneous network utilities
Include: omnetutl.xin
Return type: String
Returns:       

Name of a host computer given its IP address.


Declaration

  define external stream function NETGetHostName
     By-IP value stream Host-IP optional


Purpose

This function allows you to retrieve the official name of a host computer given its Internet Protocol (IP) address. The IP address must be specified in dotted decimal format (for example, "127.0.0.1"). If no IP address is specified, NETGetHostName returns the name of the local host. If this function fails to retrieve the host name, it returns the passed IP address.

Argument:

Examples:

  ; get the official host name given its IP
  ;
  set host to "206.116.41.138"
  output "ip of %g(host) is: <" || NETGetHostName By-IP host || ">%n"

  ; get the name of the local host
  ;
  output "Local host name is: <" || NETGetHostName || ">%n"

        Other Library Functions
   from-net-long
   net-long
   NETGetHostIP
   NETGetHostName
   NETIsVersionCompatible
   NETLibraryVersion
   to-net-long
 
----  

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ OMX ] [ OMX ] [ ERRORS ]

Generated: August 11, 2000 at 3:07:34 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com

Copyright © OmniMark Technologies Corporation, 1988-2000.