Ping (Windows CE 5.0)
You can use Ping.exe to send ICMPv6 or ICMP Echo Request messages to perform network diagnostics and test reachability for a specific destination. By default, ping queries for both IPv4 and IPv6 addresses, and uses the addresses that the operating system (OS) returns. You can override this behavior by using the –4 and –6 options.
ping [-t] [-a] [-nCount] [-lSize] [-f] [-iTTL] [-vTOS] [-rCount] [-sCount] [-jHostList] | [-kHostList]] [-wTimeout] [-R] [-SSrcAddr] [-d] [-4] [-6] TargetName
Parameters
- -t
Pings the specified computer until the Ping tool is interrupted. - -a
Resolves addresses to computer names. - -nCount
Sends the number of Echo Request messages specified in Count. The default is 4. - -l Size
Sends Echo Request messages that contain the amount of data specified by Size. The default is 32 bytes, and the maximum is 65,527 bytes. - -f
Sets the Don't Fragment flag in the packet (IPv4-only). - -iTTL
Specifies the Time to Live. This is the limit of the number of routers an IP packet may pass through before being discarded. - -vTOS
Specifies the Type Of Service (IPv4-only). - -r Count
Records the route for hop counts (IPv4-only). - -sCount
Specifies the source address in the Echo Request messages. This is required for link-local destination addresses. - -jHostList
Specifies a loose source route along the HostList (IPv4-only). - -kHostList
Specifies a strict source route along the HostList (IPv4-only). - -wTimeout
Specifies a time-out interval in milliseconds to wait for a reply. The default is 4000. - -R
Specifies that the round-trip path is traced (IPv6-only). - -SSrcAddr
Specifies the source address to use (IPv6-only). - -d
Sends output to the debug output window in Platform Builder. If this parameter is not used, the output is sent to the console. - -4
Specifies that IPv4 is used for the ping. This parameter is not necessary when identifying the target host with an IPv4 address, only when identifying the target host by name. - -6
Specifies that IPv6 is used for the ping. This parameter is not necessary when identifying the target host with an IPv6 address, only when identifying the target host by name. - TargetName
Specifies the destination host name.
Remarks
If the target name is a link-local address, you can ping a link-local IPv6 address of the computer by typing ping Address%ScopeID, where Address is the link-local address and ScopeID is the interface index for the interface to which the link-local address is assigned. A link-local address begins with FE80.
Before forwarding the packet, each router along the path is required to decrement the TTL by one. When the TTL on a packet reaches 0, the router should send an ICMP Time Exceeded message back to the source computer and discard the packet. A packet that arrives at the final destination with a TTL of 0 is still valid because the TTL is examined after the packet is considered for local delivery.
See Also
Network Utilities Application Development
Send Feedback on this topic to the authors