Topic Path: Symbol Reference > Classes > TIdIcmpClient Class
TIdIcmpClient Class

Implements an ICMP client.

TIdIcmpClient = class(TIdCustomIcmpClient);

TIdIcmpClient is a TIdRawClient descendant that implements an Internet Control Message Protocol client, as described in the Internet standards document: 

RFC 792 - Internet Control Message Protocol  

TIdIcmpClient is used to send an Internet Control Message Protocol (ICMP) packet to another computer. ICMP packets are used for ping and TraceRoute capability to help diagnose problems with connectivity. 

TIdIcmpClient is a descendant of the abstract class TIdRawClient, and uses the Protocol value Id_IPPROTO_ICMP (Decimal 1). TIdIcmpClient uses the message formats and algorithms as defined in RFC 792. 

Use TIdIcmpClient to diagnose a communications links by using Ping. Host identifies the IP address or computer name for the echo request. Use ReplyStatus and OnReply to access information received as a result of the echo request datagram. Set ReceiveTimeout to control the time to wait for a response to the echo request datagram. 

Use the TTL property to set the packet's Time To Live value: the maximum number of hops the packet will travel before being bounced. 

For Traceroute application, send ping echo requests with increased TTL values. Each reply will hold the IP address of the hop where the TTL expired, allowing the program to build the packet's route. 

TIdIcmpClient implements an overridden InitComponent used to sets default property value during component creation, including: 


Property Name 



For Windows NT and Windows 2000, administrator privileges are required to allow TIdICMPClient.Ping to work properly. The command line PING application does not exhibit this behavior because Microsoft chose to use undocumented calls in ICMP.DLL and its winsock implementation to get around the issue. In short: they cheated. Indy does not use ICMP.DLL to maintain Linux compatibility, and allow use of both Raw sockets and ICMP sockets.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.