mfontanini / libtins

High-level, multiplatform C++ network packet sniffing and crafting library.
http://libtins.github.io/
BSD 2-Clause "Simplified" License
1.89k stars 374 forks source link

ARP monitoring is not replying to all ping requests? win32 #474

Closed ahmedtalaat327 closed 2 years ago

ahmedtalaat327 commented 2 years ago

Recently I've installed the WInPcap and Managed to build this amazing lib But when I want to ask the arp to print all the current hosts on the network it seems slow and some hosts doesn't show even with pinging all the hosts IPs

screen shot: scr1445

Should I increase the timeout to 1000ms in ping method ?

ahmedtalaat327 commented 2 years ago

For future guidance I think I've solved this issue by sending request to the broadcast host but before starting the whole pinging , I had to clear addressed list so arp entities will be fresh each time

ahmedtalaat327 commented 2 years ago

Update: this lib depends on PCap which is a standalone Lib written in C language actually there is a bad behavior happens in Win32 environment anyone can ping using socket in .NET dll but there is a bad timing between PCap and the ping using windows sockets best solution is sending the request to the arp using lib tins and reading the Reply from the arp.