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

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

The IP of a host computer given its name.


Declaration

  define external stream function NETGetHostIP
     By-Name value stream Host-Name optional


Purpose

This function allows you to retrieve the Internet Protocol (IP) address of a host computer given its name. The IP address is returned in dotted decimal format (for example, "127.0.0.1"). If no host name is specified, NETGetHostIP returns the IP address of the local host. If NETGetHostIP fails to retrieve the IP address, it returns NETInvalidIP which is defined as "255.255.255.255".

Argument:

Examples:

  ; get host IP given its name or name alias
  ;
  set host to "www.omnimark.com"
  output "ip of %g(host) is: <" || NETGetHostIP By-Name host || ">%n"

  ; get the IP of the local host
  ;
  output "Local host ip is: <" || NETGetHostIP || ">%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.