Compartir a través de


Internet Control Message Protocol (ICMP) (Windows CE 5.0)

Send Feedback

Internet Control Message Protocol (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.

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 inter-network. 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 about the Winsock API, see Windows Sockets.

For information about ICMP and IPv6, see Internet Control Message Protocol for IPv6 (ICMPv6).

See Also

Core Protocols of IPv4

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.