0

IcmpSendEcho2 documentation says:

The ReplyBuffer contains the ICMP echo responses, if any.

For ICMP, if only one request is sent, wouldn't only zero or one responses be expected?

If that's the case, does that mean IcmpSendEcho2 can send multiple requests since it can receive multiple responses? And if so, is there any way to find out how many requests were sent?

The goal of all this is to try and get a packet loss %, but knowing how many requests were sent needs to be known.

Charles
  • 50,943
  • 13
  • 104
  • 142
DougN
  • 4,407
  • 11
  • 56
  • 81

1 Answers1

1

IcmpSendEcho2() sends 1 request, but that can generate multiple responses. The output is an array of responses, so you have to make sure the array is large enough to receive all of the responses.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • That's what the documentation says. But how does a single ping request generate multiple responses? It makes me think IcmpSendEcho2 must send multiple requests. – DougN May 15 '13 at 01:50
  • I assure you, it only sends 1 request. But that request can be to a broadcast IP, for instance, in which case multiple machines may reply at one time. – Remy Lebeau May 15 '13 at 02:29
  • Ahhhh, good point. But if it is not sent to a broadcast address, then at most one response would be returned. Is that correct? – DougN May 15 '13 at 12:59