Icmp6ParseReplies function (icmpapi.h)

The Icmp6ParseReplies function parses the reply buffer provided and returns an IPv6 ICMPv6 echo response reply if found.

Syntax

IPHLPAPI_DLL_LINKAGE DWORD Icmp6ParseReplies(
  LPVOID ReplyBuffer,
  DWORD  ReplySize
);

Parameters

ReplyBuffer

A pointer to the buffer passed to the Icmp6SendEcho2 function. This parameter is points to an ICMPV6_ECHO_REPLY structure to hold the response.

ReplySize

The size, in bytes, of the buffer pointed to by the ReplyBuffer parameter.

Return value

The Icmp6ParseReplies function returns 1 on success. In this case, the Status member in the ICMPV6_ECHO_REPLY structure pointed to by the ReplyBuffer parameter will be either IP_SUCCESS if the target node responded or IP_TTL_EXPIRED_TRANSIT.

If the return value is zero, extended error information is available through GetLastError.

Return code Description
ERROR_GEN_FAILURE
A general failure occurred. This error is returned if the ReplyBuffer parameter is a NULL pointer or the ReplySize parameter is zero.
Other
Use FormatMessage to obtain the message string for the returned error.

Remarks

The Icmp6ParseReplies function is used by IPv6 to parse replies that result from an ICMPv6 echo request. The Icmp6ParseReplies function parses a reply buffer previously passed to the Icmp6SendEcho2 function. Use the Icmp6ParseReplies function only with the Icmp6SendEcho2 function.

The Icmp6ParseReplies function cannot be used on a reply buffer previously passed to IcmpSendEcho or IcmpSendEcho2 for IPv4.

For IPv4, use the IcmpCreateFile, IcmpSendEcho, IcmpSendEcho2, IcmpSendEcho2Ex, and IcmpParseReplies functions.

Note that the include directive for Iphlpapi.h header file must be placed before the Icmpapi.h header file.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header icmpapi.h
Library Iphlpapi.lib
DLL Iphlpapi.dll

See also

GetLastError

ICMPV6_ECHO_REPLY

ICMP_ECHO_REPLY

Icmp6CreateFile

Icmp6SendEcho2

IcmpCloseHandle

IcmpCreateFile

IcmpParseReplies

IcmpSendEcho

IcmpSendEcho2

IcmpSendEcho2Ex