Use this procedure to send an ICMP echo request to a foreign
host. When a response is received or the timeout limit is reached,
you receive a PingResponse notification.
Figure 1. PingRequest example procedure PingRequest
(
ForeignAddress: InternetAddressType;
Length: integer;
Timeout: integer;
var ReturnCode: integer
);
external;
- Parameter
- Description
- ForeignAddress
- The address of the foreign host to receive
an ICMP echo request.
- Length
- Indicates the length of the ICMP
packet, excluding the IP header. The range of values for this field
is 8 - 65507 bytes.
- Timeout
- The
amount of time to wait for a response, in seconds.
- ReturnCode
- Indicates success or failure of
a call. Possible return values are:
- OK
- ABNORMALcondition
- BADlengthARGUMENT
- CONNECTIONalreadyEXISTS
- VIRTUALmemoryTOOsmall
- NOTyetBEGUN
- TIMEOUTopen
- PARAMtimeout
- SOFTWAREerror
- TCPipSHUTDOWN
- UNAUTHORIZEDuser
For a description of Pascal return codes, see
Table 1.
Note: CONNECTIONalreadyEXISTS,
in this context, means a PING request is outstanding.