ph_ping1 PowerHome formula function
Description
Pings a machine on the network
using either a Catalyst ICMP control or function within Microsofts
ICMP.DLL.
Syntax
ph_ping1 ( type, ip, ttl, timeout
)
Argument |
Description |
type |
Integer. Determines the method that
will be used to ping the machine. Use 0 to ping using Microsofts ICMP.DLL
(same as the ph_ping function). Use any other value to ping using the
Catalyst ICMP control. |
ip |
String. The IP or URL you wish to
ping. |
ttl |
Integer. The Time To Live value to pass
to the ping function for the ICMP echo datagram. |
timeout
|
Long. The time in milliseconds before
the function
times out.
|
Return value
Long. Returns a positive value representing
the time in milliseconds to complete the ping operation. A negative return
indicates an
error occured.
Usage
Use this function to verify a machine is
available on
the network.
Examples
The following examples demonstrate typical syntax/usage for this function.
ph_ping1(1,"www.google.com",100,50)
The
above example will ping Google with a TTL value of 100 ms using the Catalyst
ICMP control. The function will timeout after 50 ms if the ping has not yet
returned.