I'm a starting C/C++ programmer.
What I want is the following thing:
Start program, starts to ping whole network and saves the addresses that where active. When done, get mac address from ip addresses that where stored before, and save them.
When done, loop trough the mac address list, and find 1 mac adress, when found, shout around that he found it.
Something like that does I want to make.
I've Googled a lot, but nothing realy helped me.
So my question, what do I need (which libraries, which statements), so I can program this.
On note, my OS is at the moment Windows, but I want to make it compatible with Linux in the future also.
Use the arp
tool on the commandline eg arp -a 192.168.0.100
From c++ it depends on your OS, on Windows it's SendArp()
To scan for all machines on the lan use nmap
- see How do I get a list of the active IP-addresses, MAC-addresses and NetBIOS names on the LAN?