Internet Control Message Protocol (ICMP)

Windows CE 3.0

ICMP is a network layer protocol that delivers flow control, error messages, routing, and other data between Internet hosts. ICMP is primarily used by application developers for a network ping, which is also known as Packet Internet Groper. A ping is the process of sending an echo message to an IP address and reading the reply to verify a connection between TCP/IP hosts.

Internet Control Message Protocol (ICMP) is a maintenance protocol specified in RFC 792 and is normally considered to be part of the IP layer. ICMP messages are encapsulated within IP datagrams, so that they can be routed throughout an internetwork. ICMP is used by Windows CE to:

  • Build and maintain route tables.
  • Perform Router Discovery.
  • Assist in Path Maximum Transmission Unit (PMTU) discovery.
  • Diagnose problems (ping).
  • Adjust flow control to prevent link or router saturation.

Use the following Winsock API functions to write a ping application: IcmpCreateFile, IcmpSendEcho, and IcmpCloseHandle.

To send an ICMP request or determine if a host is available

  1. Call IcmpCreateFile to create a handle to issue requests.
  2. Call IcmpSendEcho to send an ICMP echo request.

    It returns any ICMP response from the intended host recipient, or returns an error if the network is inaccessible. A time-out value may be specified to limit the wait time in case the destination is inaccessible.

  3. Call IcmpCloseHandle to close the handle created by IcmpCreateFile.

For more information on the Winsock API, see Windows Sockets.

 Last updated on Friday, April 02, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.