Expand Minimize

Icmp6ParseReplies function

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

Syntax


DWORD Icmp6ParseReplies(
  _In_  LPVOID ReplyBuffer,
  _In_  DWORD ReplySize
);

Parameters

ReplyBuffer [in]

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 [in]

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 codeDescription
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]

Header

Icmpapi.h

Library

Iphlpapi.lib

DLL

Iphlpapi.dll

See also

GetLastError
ICMP_ECHO_REPLY
Icmp6CreateFile
Icmp6SendEcho2
IcmpCloseHandle
IcmpCreateFile
IcmpParseReplies
IcmpSendEcho
IcmpSendEcho2
IcmpSendEcho2Ex
ICMPV6_ECHO_REPLY

 

 

Community Additions

ADD
Show:
© 2014 Microsoft