1

I'm writing a program in .NET c++. I'm sending a broadcast ping on my local network. All of my target devices are able to respond to a ping broadcast, and indeed i track all of their responses in Wireshark. My goal is to retrieve IP addresses of all responding stations.

Problem is, Microsoft's API does not include support for recording all replies in a given time interval.Functions like IcmpSendEcho simply return on first reply (although the API states that it can record more than one icmp reply), this is a known issue and after googling and searching here, everyone reports the same problem with these functions.

What can I do to achieve my goal without going too low-level for reply fetching? Does windows hold some sort of a record of icmp history? I'll be grateful for any suggestions!

psidemus
  • 63
  • 1
  • 5

1 Answers1

0
 1) First call FlushIpNetTable.
 2) Send the ping and ignore the response.
 3) Read the ARP table using the GetIpNetTable call.
Steve C
  • 647
  • 3
  • 6
  • 3
    Hi Steve, thanks for the quick reply. Unfortunately, pinging a broadcast address does not initiate an arp request, thus the arp table does not change. – psidemus Dec 26 '11 at 19:32