GetRTTAndHopCount (Compact 2013)

3/26/2014

This function determines the round-trip time (RTT) and hop count to the specified destination.

Syntax

BOOL GetRTTAndHopCount(
  IPAddr DestIpAddress, 
  PULONG HopCount, 
  ULONG MaxHops, 
  PULONG RTT 
);

Parameters

  • DestIpAddress
    [in] IP address of the destination for which to determine the RTT and hop count, in the form of an IPAddr structure.
  • HopCount
    [out] Pointer to the hop count to the destination specified by the DestIpAddress parameter.
  • MaxHops
    [in] The maximum number of hops to search for the destination. If the number of hops to the destination exceeds this number, the function terminates the search and returns FALSE.
  • RTT
    [out] Round-trip time, in milliseconds, to the destination specified by DestIpAddress

Return Value

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE. Call GetLastError to obtain the error code for the failure.

Remarks

For information about the IPAddr data type, see Window Data Types. To convert an IP address between dotted decimal notation and IPAddr format, use the inet_addr and inet_ntoa functions.

Requirements

Header

iphlpapi.h

Library

Iphlpapi.lib

See Also

Reference

IP Helper Functions
IPAddr
GetBestInterface
GetBestRoute
GetBestInterface
GetBestRoute