Immediately I want to upset you, dear readers. Qt does not have the functionality to work with the ICMP protocol and therefore have to use for this purpose API target operating system. However, this is not surprising. The
protocol is a low-level protocol, and to work with it requires the use of raw sockets, which are not implemented in Qt.
But this is not a particular problem, because the main target platform has the necessary API to implement ping packages. For example
provides the simple use of
function sends an IPv4 ICMP echo request and returns any echo response replies. The call returns when the time-out has expired or the reply buffer is filled.
_In_ HANDLE IcmpHandle,
_In_ IPAddr DestinationAddress,
_In_ LPVOID RequestData,
_In_ WORD RequestSize,
_In_opt_ PIP_OPTION_INFORMATION RequestOptions,
_Out_ LPVOID ReplyBuffer,
_In_ DWORD ReplySize,
_In_ DWORD Timeout