contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
function   NETGetHostIP    
      Other Library Functions  

Library: Network Utilities
Include: omnetutl.xin
Returns: String

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 [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:01:11 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.