swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
      Other Library Functions  
function  

netutil.host-name

 
 

Library: Network utilities (OMNETUTIL)
Import: omnetutl.xmd
Return type: String

Returns: Name of a host computer given its IP address.


Declaration

define external stream function netutil.host-name
   of  value string Host-IP optional

Argument definitions

Host-IP
is the dotted decimal format IP address of the host computerof which you want to retrieve the name.


Purpose

Use netutil.host-name to retrieve the official name of a host computer given its Internet Protocol (IP) address.

Usage Notes

The IP address must be specified in dotted decimal format (for example, "127.0.0.1").

If no IP address is specified, netutil.host-name returns the name of the local host. If this function fails to retrieve the host name, it returns the passed IP address.

Example


  import "omnetutil.xmd" prefixed by netutil.
  
  process
    local stream address initial {"206.116.41.138"}
  
    output "The name of the machine at IP address " || address
        || " is: " || netutil.host-name of address
        || "%n"
  
    output "The local host name is: " || netutil.host-name || "%n"

        Other Library Functions
   netutil.from-net32
   netutil.host-ip
   netutil.host-name
   netutil.net32
   netutil.omnetutil-version
   netutil.to-net32
 
 

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

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.