Getting IP addresses of computers connected to the network I'm connected to
Good day
I want to get the IPs' of the different computers connected to the network my computer is on right now
How to do that?
I've looked over and used QNetworkInterface to get the list of active interfaces on my computer, but not the ip of the others computers.
Thanks!
Re: Getting IP addresses of computers connected to the network I'm connected to
You get the IP address of other computers by using DNS queries, by making a net directed broadcast and seeing who responds, by individually addressing every other IP in your subnet, by making ARP table queries to see who is already active... It depends what you need to achieve.
Re: Getting IP addresses of computers connected to the network I'm connected to
If I want to go with ARP requests, how to do that?
I'm using this with Linux
Thanks!
Re: Getting IP addresses of computers connected to the network I'm connected to
For a start look at the arp (1M) command to see what data is available. You will only see devices your interfaces have recently talked to.
Then read man 7 arp.